/**
 * GEREJE — Sector Expertise
 * Editorial gallery : spacieux, luxueux, moderne
 * Inspiré des standards PE/IB 2025 : whitespace, typographie retenue, grille modulaire
 */

/* ─── Hero ─── */
.page-sector-expertise .gj-page-hero {
    min-height: 54vh;
    padding: clamp(120px, 14vw, 160px) 0 clamp(72px, 8vw, 96px);
}

.page-sector-expertise .gj-page-hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(15, 15, 18, 0.42) 0%,
        rgba(15, 15, 18, 0.62) 55%,
        rgba(15, 15, 18, 0.78) 100%
    );
}

.page-sector-expertise .gj-page-hero__inner {
    max-width: 820px;
    text-align: center;
}

.page-sector-expertise .gj-page-hero h1 {
    font-family: 'Trajan Pro', serif;
    font-size: clamp(1.85rem, 4.2vw, 2.75rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    line-height: 1.25;
    margin: 0 0 28px;
    text-wrap: balance;
}

.page-sector-expertise .gj-page-hero__lead {
    max-width: 620px;
    margin: 0 auto;
    font-family: 'Trajan Pro', serif;
    font-size: clamp(0.95rem, 1.35vw, 1.0625rem);
    line-height: 1.8;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.82);
}

.page-sector-expertise .gj-page-hero__lead p {
    margin: 0;
}

.page-sector-expertise .gj-hero-scroll {
    width: 44px;
    height: 44px;
    border-color: rgba(255, 255, 255, 0.28);
    font-size: 14px;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.page-sector-expertise .gj-hero-scroll:hover,
.page-sector-expertise .gj-hero-scroll:focus-visible {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(134, 0, 33, 0.35);
}

/* ─── Section gallery ─── */
.page-sector-expertise .gj-expertise-section--gallery {
    margin-top: 0;
    padding: clamp(72px, 9vw, 108px) 0 clamp(80px, 9vw, 112px);
    background: #fff;
}

.page-sector-expertise .gj-expertise-section--gallery > .gj-section-divider {
    top: -28px;
}

.page-sector-expertise .gj-expertise-section--gallery .gj-expertise-section__inner {
    padding-top: clamp(48px, 6vw, 64px);
}

.page-sector-expertise .gj-expertise-section--gallery .gj-expertise-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    max-width: none;
    margin: 0 0 clamp(48px, 6vw, 72px);
    padding-bottom: clamp(24px, 3vw, 36px);
    border-bottom: 1px solid rgba(25, 25, 25, 0.08);
    text-align: left;
}

.page-sector-expertise .gj-expertise-section--gallery .gj-expertise-header__intro {
    flex: 1 1 auto;
}

.page-sector-expertise .gj-expertise-section--gallery .gj-sub {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-align: left;
}

.page-sector-expertise .gj-expertise-header__count--gallery {
    margin: 0;
    padding: 8px 16px;
    border: 1px solid rgba(134, 0, 33, 0.18);
    background: rgba(134, 0, 33, 0.04);
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.2em;
}

/* ─── Grille éditoriale ─── */
.page-sector-expertise .gj-expertise-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(20px, 2.4vw, 32px);
}

.page-sector-expertise .gj-expertise-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    background: #fff;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

a.gj-expertise-card {
    cursor: pointer;
}

a.gj-expertise-card:hover,
a.gj-expertise-card:focus-visible {
    transform: translateY(-4px);
}

.page-sector-expertise .gj-expertise-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--gj-ink);
}

.page-sector-expertise .gj-expertise-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(18%) brightness(0.96);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.page-sector-expertise .gj-expertise-card__index {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    font-family: 'Trajan Pro', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.35s ease;
}

.page-sector-expertise .gj-expertise-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(15, 15, 18, 0.35) 100%);
    pointer-events: none;
    transition: opacity 0.45s ease;
}

a.gj-expertise-card:hover .gj-expertise-card__img,
a.gj-expertise-card:focus-visible .gj-expertise-card__img {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1);
}

a.gj-expertise-card:hover .gj-expertise-card__index,
a.gj-expertise-card:focus-visible .gj-expertise-card__index {
    color: #fff;
}

a.gj-expertise-card:focus-visible {
    outline: 2px solid var(--gj-brand);
    outline-offset: 4px;
}

.page-sector-expertise .gj-expertise-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(18px, 2vw, 24px) 4px 0;
}

.page-sector-expertise .gj-expertise-card__title {
    margin: 0;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: clamp(0.9rem, 1.05vw, 1rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gj-ink);
    text-wrap: balance;
    transition: color 0.35s ease;
}

a.gj-expertise-card:hover .gj-expertise-card__title,
a.gj-expertise-card:focus-visible .gj-expertise-card__title {
    color: var(--gj-brand);
}

.page-sector-expertise .gj-expertise-card__text {
    margin: 0;
    font-family: 'Trajan Pro', serif;
    font-size: 12px;
    line-height: 1.65;
    letter-spacing: 0.02em;
    color: #6b6560;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-sector-expertise .gj-expertise-card__cta {
    margin-top: 4px;
    font-family: 'Trajan Pro', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gj-brand);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease, letter-spacing 0.3s ease;
}

a.gj-expertise-card:hover .gj-expertise-card__cta,
a.gj-expertise-card:focus-visible .gj-expertise-card__cta {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.22em;
}

.page-sector-expertise .gj-expertise-card__cta::after {
    content: " →";
}

/* ─── CTA footer ─── */
.page-sector-expertise .gj-expertise-footer {
    margin-top: clamp(56px, 7vw, 80px);
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid rgba(25, 25, 25, 0.08);
}

.page-sector-expertise .gj-expertise-footer .gj-btn-dark-border {
    padding: 16px 36px;
    letter-spacing: 0.14em;
    transition: background 0.4s ease, color 0.35s ease, box-shadow 0.4s ease;
}

.page-sector-expertise .gj-expertise-footer .gj-btn-dark-border:hover,
.page-sector-expertise .gj-expertise-footer .gj-btn-dark-border:focus-visible {
    box-shadow: 0 12px 32px rgba(25, 25, 25, 0.12);
}

/* ─── Entrées animées ─── */
@media (prefers-reduced-motion: no-preference) {
    .page-sector-expertise .gj-expertise-card {
        opacity: 0;
        transform: translateY(18px);
        animation: gj-sector-card-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .page-sector-expertise .gj-expertise-card:nth-child(1) { animation-delay: 0.04s; }
    .page-sector-expertise .gj-expertise-card:nth-child(2) { animation-delay: 0.08s; }
    .page-sector-expertise .gj-expertise-card:nth-child(3) { animation-delay: 0.12s; }
    .page-sector-expertise .gj-expertise-card:nth-child(4) { animation-delay: 0.16s; }
    .page-sector-expertise .gj-expertise-card:nth-child(5) { animation-delay: 0.2s; }
    .page-sector-expertise .gj-expertise-card:nth-child(6) { animation-delay: 0.24s; }
    .page-sector-expertise .gj-expertise-card:nth-child(7) { animation-delay: 0.28s; }
    .page-sector-expertise .gj-expertise-card:nth-child(8) { animation-delay: 0.32s; }
    .page-sector-expertise .gj-expertise-card:nth-child(9) { animation-delay: 0.36s; }
    .page-sector-expertise .gj-expertise-card:nth-child(10) { animation-delay: 0.4s; }

    a.gj-expertise-card:hover,
    a.gj-expertise-card:focus-visible {
        transform: translateY(-4px);
    }
}

@keyframes gj-sector-card-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-sector-expertise .gj-expertise-card {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .page-sector-expertise .gj-expertise-card__cta {
        opacity: 1;
        transform: none;
    }
}

/* ─── Responsive ─── */
@media (max-width: 1280px) {
    .page-sector-expertise .gj-expertise-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: clamp(18px, 2vw, 28px);
    }
}

@media (max-width: 991px) {
    .page-sector-expertise .gj-page-hero {
        min-height: 48vh;
        padding-top: 110px;
    }

    .page-sector-expertise .gj-expertise-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .page-sector-expertise .gj-expertise-card__text {
        -webkit-line-clamp: 3;
    }

    .page-sector-expertise .gj-expertise-card__cta {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 560px) {
    .page-sector-expertise .gj-expertise-gallery {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .page-sector-expertise .gj-expertise-card__media {
        aspect-ratio: 16 / 11;
    }
}

/* ─── Fiche secteur ─── */
.page-sector-detail .gj-sector-hero {
    min-height: 48vh;
    padding: clamp(120px, 14vw, 150px) 0 clamp(64px, 7vw, 80px);
}

.page-sector-detail .gj-sector-hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(15, 15, 18, 0.45) 0%,
        rgba(15, 15, 18, 0.72) 100%
    );
}

.page-sector-detail .gj-sector-hero h1 {
    font-weight: 400;
    letter-spacing: 0.14em;
    text-wrap: balance;
}

.page-sector-detail .gj-page-hero__lead {
    max-width: 640px;
    font-family: 'Trajan Pro', serif;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.page-sector-detail .gj-sector-detail {
    padding: clamp(72px, 8vw, 96px) 0;
    background: #fff;
}

.page-sector-detail .gj-sector-detail__body {
    font-size: 17px;
    line-height: 1.85;
    color: #4a4541;
}

.page-sector-detail .gj-sector-detail__aside img {
    border-radius: 2px;
    box-shadow: 0 24px 64px rgba(25, 25, 25, 0.1);
}

/* ─── Présentation SlideShare « Our Added Value » ─── */
.page-sector-detail .gj-sector-deck {
    margin-top: clamp(56px, 7vw, 80px);
    padding-top: clamp(40px, 5vw, 56px);
    border-top: 1px solid rgba(25, 25, 25, 0.08);
}

.page-sector-detail .gj-sector-deck__header {
    max-width: 640px;
    margin-bottom: 1.75rem;
}

.page-sector-detail .gj-sector-deck__lead {
    margin: 0.5rem 0 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a4541;
}

.page-sector-detail .gj-sector-deck__frame {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 10;
    background: #f4f2ef;
    border: 1px solid rgba(25, 25, 25, 0.08);
}

.page-sector-detail .gj-sector-deck__frame--pdf {
    aspect-ratio: 16 / 11;
    min-height: min(72vh, 720px);
}

.page-sector-detail .gj-sector-deck__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.page-sector-detail .gj-sector-deck__consent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4541;
    pointer-events: none;
}

.page-sector-detail .gj-sector-deck__frame iframe[src]:not([src=""]) + .gj-sector-deck__consent {
    display: none;
}

.page-sector-detail .gj-sector-deck__link {
    margin: 1.5rem 0 0;
}
