/* ============================================================
   Job details — refonte visuelle (Piste A)
   Palette : variables deja definies dans style.css
   --color-primary       #00b0a2
   --color-primary-dark  #4da5aa
   --color-primary-darker#357f84
   --color-primary-light #e3f2f3
   --color-secondary     #1f3640
   --color-muted         #647481
   --color-bg-soft       #f5fbfc
   ============================================================ */

.jd-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 12px 140px;      /* bottom padding to clear sticky CTA on mobile */
}

/* --------- Main card --------- */
.jd-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(31, 54, 64, .08),
                0 1px 3px rgba(31, 54, 64, .05);
    overflow: hidden;
    margin-bottom: 24px;
}

/* --------- Hero (photos + overlay) --------- */
.jd-hero {
    position: relative;
    background: var(--color-primary-light);
}

.jd-hero__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-light), #d6ecee);
}

.jd-hero__media .carousel,
.jd-hero__media .carousel-inner,
.jd-hero__media .carousel-item {
    height: 100%;
}

.jd-hero__media .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* fallback default image : don't crop it, contain inside */
.jd-hero__media .carousel-item img[src*="default_user_profile"] {
    object-fit: contain;
    padding: 24px;
}

/* Carousel arrows — floating, circular, over the image */
.jd-hero__media .carousel-control-prev,
.jd-hero__media .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: background .2s, transform .2s;
    z-index: 2;
}
.jd-hero__media .carousel-control-prev { left: 12px; }
.jd-hero__media .carousel-control-next { right: 12px; }

.jd-hero__media .carousel-control-prev:hover,
.jd-hero__media .carousel-control-next:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.jd-hero__media .carousel-control-prev-icon,
.jd-hero__media .carousel-control-next-icon {
    filter: invert(32%) sepia(76%) saturate(1024%) hue-rotate(145deg) brightness(90%) contrast(90%);
    width: 20px;
    height: 20px;
}

/* gradient to make overlay text readable */
.jd-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
                rgba(31, 54, 64, .72) 0%,
                rgba(31, 54, 64, .25) 40%,
                rgba(31, 54, 64, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.jd-hero__overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 20px 24px;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}

.jd-hero__badge {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.jd-hero__title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 6px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.jd-hero__loc {
    margin: 0;
    font-size: .95rem;
    opacity: .95;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jd-hero__loc svg { flex-shrink: 0; }

/* --------- Body --------- */
.jd-body {
    padding: 24px 28px;
}

.jd-quote {
    font-size: 1.05rem;
    color: var(--color-secondary);
    text-align: center;
    font-style: italic;
    line-height: 1.5;
    padding: 0 0 20px;
    margin: 0 auto 24px;
    border-bottom: 2px dotted #C6D1BF;
    max-width: 720px;
}

/* --------- Section titles --------- */
.jd-section { margin-top: 28px; }
.jd-section:first-child { margin-top: 0; }

.jd-section__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-darker);
    letter-spacing: .02em;
    text-transform: uppercase;
    margin: 0 0 18px;
    text-align: center;
}
.jd-section__title::before,
.jd-section__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #c6d1bf, transparent);
    max-width: 80px;
}

/* --------- Chips (meta info) --------- */
.jd-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px 24px;
}

.jd-meta__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jd-meta__label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
}

.jd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jd-chip {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary-darker);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.4;
}

.jd-chip--muted {
    background: #f0f3f5;
    color: var(--color-muted);
    font-style: italic;
}

.jd-chip--outline {
    background: #fff;
    border: 1px solid var(--color-primary-light);
    color: var(--color-primary-darker);
}

/* --------- Recruiter block --------- */
.jd-recruiter__name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0 0 8px;
}

.jd-recruiter__desc {
    color: var(--color-secondary);
    line-height: 1.55;
    margin-bottom: 20px;
    white-space: pre-line;
    overflow-wrap: break-word;
}

.jd-recruiter__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 24px;
    margin-bottom: 16px;
}

.jd-recruiter__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jd-recruiter__item-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
}

.jd-recruiter__item-value {
    color: var(--color-secondary);
    font-size: .95rem;
}

.jd-equipments {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.jd-equipments li {
    background: var(--color-bg-soft);
    border-left: 3px solid var(--color-primary);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    font-size: .92rem;
    color: var(--color-secondary);
}
.jd-equipments li strong {
    color: var(--color-primary-darker);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.jd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.jd-badges img {
    height: 72px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(31, 54, 64, .15));
    transition: transform .2s;
}
.jd-badges img:hover { transform: scale(1.08); }

/* --------- Group block (hidden by default) --------- */
.jd-group {
    background: var(--color-bg-soft);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}
.jd-group__users {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
}
.jd-group__users li {
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e4ebec;
}
.jd-group__users a {
    color: var(--color-primary-darker);
    text-decoration: none;
    font-weight: 500;
}
.jd-group__users a:hover { text-decoration: underline; }

/* --------- Video --------- */
.jd-video { text-align: center; margin-top: 16px; }
.jd-video video,
.jd-video iframe {
    border-radius: 12px;
    max-width: 100%;
}

/* --------- Actions (bottom CTA strip) --------- */
.jd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 24px 28px;
    border-top: 1px solid #eef2f3;
    background: var(--color-bg-soft);
}

.jd-actions .btn,
.jd-actions .p_btn,
.jd-actions .p_btn_desactivated {
    margin: 0 !important;
}

/* Like button override — circular icon button */
.jd-actions .like {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--color-primary-light);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, box-shadow .15s;
}
.jd-actions .like:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 10px rgba(0, 176, 162, .25);
}
.jd-actions .like img {
    width: 22px;
    height: 22px;
}

/* --------- Alerts --------- */
.jd-alerts { padding: 0 28px 20px; }
.jd-alerts .alert { margin: 0 0 10px; border-radius: 10px; }

/* --------- Closed state --------- */
.jd-closed {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-muted);
}
.jd-closed h2 { color: var(--color-secondary); font-weight: 600; }

/* --------- Sticky mobile CTA --------- */
.jd-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .jd-wrap { padding: 0 8px 100px; }
    .jd-body { padding: 20px 18px; }
    .jd-hero__overlay { padding: 16px; }
    .jd-hero__title { font-size: 1.35rem; }
    .jd-hero__media { aspect-ratio: 4 / 3; }
    .jd-actions { padding: 18px; }
    .jd-section__title { font-size: 1rem; }

    .jd-sticky-cta {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 12px 16px;
        background: #fff;
        border-top: 1px solid #e4ebec;
        box-shadow: 0 -4px 16px rgba(31, 54, 64, .08);
        gap: 10px;
        z-index: 100;
        align-items: center;
    }
    .jd-sticky-cta .btn {
        flex: 1;
        margin: 0 !important;
    }
    .jd-sticky-cta .like {
        flex: 0 0 48px;
    }
}

/* --------- Social share spacing --------- */
.jd-social {
    padding: 16px 28px 24px;
    border-top: 1px solid #eef2f3;
}
