/* --------------------------------------------------------------------------
   PAGE D'ACCUEIL
   Séquence : hero → bandeau → 50 ans → immersion (scroll) → panneaux → témoignages → CTA
-------------------------------------------------------------------------- */

.cb-section {
    padding-block: clamp(4rem, 9vw, 8rem);
}

.cb-eyebrow {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: var(--cb-green);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.cb-section-title {
    margin: 0 0 clamp(2.5rem, 5vw, 4rem);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.1;
    text-align: center;
}

.cb-section-title::after {
    content: '';
    display: block;
    width: 3.5rem;
    height: 2px;
    margin: 1.4rem auto 0;
    background: var(--cb-green);
}

/* --------------------------------------------------------------------------
   HERO — lettres qui montent une à une, image qui se pose, parallax
-------------------------------------------------------------------------- */
.cb-hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(100svh - var(--cb-header-h));
    overflow: hidden;
    background: var(--cb-navy-dark);
    color: #fff;
    text-align: center;
}

.cb-hero-media {
    position: absolute;
    inset: -8% 0;
    will-change: transform;
}

.cb-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: cb-hero-zoom 2.8s var(--cb-ease) both;
}

@keyframes cb-hero-zoom {
    from { transform: scale(1.18); filter: brightness(0.55); }
    to { transform: scale(1); filter: brightness(1); }
}

.cb-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 22, 46, 0.55) 0%, rgba(10, 22, 46, 0.18) 45%, rgba(10, 22, 46, 0.7) 100%);
}

.cb-hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem 1.25rem 8rem;
    max-width: 66rem;
}

.cb-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    animation: cb-fade-in 1s 0.2s var(--cb-ease) both;
}

.cb-hero-eyebrow::before,
.cb-hero-eyebrow::after {
    content: '';
    width: 3rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.65);
    transform-origin: center;
    animation: cb-grow-x 1.2s 0.5s var(--cb-ease) both;
}

@keyframes cb-grow-x {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.cb-hero-title {
    margin: 0 0 3rem;
    color: #fff;
    font-size: clamp(2.8rem, 8vw, 6.4rem);
    line-height: 1.02;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.cb-hero-title .cb-line {
    display: block;
}

.cb-hero-title .cb-word {
    display: inline-block;
    overflow: hidden;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
    vertical-align: top;
}

.cb-hero-title i {
    display: inline-block;
    font-style: normal;
    transform: translateY(115%) rotate(7deg);
    opacity: 0;
    animation: cb-char-up 1.1s calc(0.35s + var(--i) * 32ms) var(--cb-ease) forwards;
}

@keyframes cb-char-up {
    to { transform: none; opacity: 1; }
}

.cb-hero-cta {
    animation: cb-fade-in 1s 1.3s var(--cb-ease) both;
    --cb-btn-bg: rgba(24, 49, 95, 0.92);
    --cb-btn-bg-hover: var(--cb-green);
}

@keyframes cb-fade-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.cb-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 0.6rem;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-decoration: none;
}

.cb-scroll-hint::after {
    content: '';
    width: 1px;
    height: 3rem;
    background: linear-gradient(#fff, rgba(255, 255, 255, 0));
    transform-origin: top;
    animation: cb-scroll-line 2.2s var(--cb-ease) infinite;
}

@keyframes cb-scroll-line {
    0% { transform: scaleY(0); opacity: 1; }
    60% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* --------------------------------------------------------------------------
   BANDEAU DÉFILANT (marquee)
-------------------------------------------------------------------------- */
.cb-marquee {
    overflow: hidden;
    padding-block: 1.6rem;
    background: var(--cb-navy);
}

.cb-marquee-track {
    display: flex;
    width: max-content;
    animation: cb-marquee 38s linear infinite;
}

.cb-marquee:hover .cb-marquee-track {
    animation-play-state: paused;
}

.cb-marquee-group {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.cb-marquee-item {
    padding-inline: 2.2rem;
    font-family: var(--cb-font-title);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.cb-marquee-item:nth-child(3n + 1) {
    color: #fff;
    -webkit-text-stroke: 0;
}

.cb-marquee-star {
    color: var(--cb-green);
    font-size: 1.2rem;
}

@keyframes cb-marquee {
    to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   50 ANS D'EXPERTISE
-------------------------------------------------------------------------- */
.cb-years {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: 2rem;
    line-height: 0.85;
}

.cb-years-number {
    font-family: var(--cb-font-title);
    font-size: clamp(6rem, 14vw, 11rem);
    color: transparent;
    -webkit-text-stroke: 2px var(--cb-navy);
    font-variant-numeric: tabular-nums;
}

.cb-years-label {
    font-family: var(--cb-font-title);
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--cb-navy);
}

.cb-lead {
    margin-bottom: 1.5rem;
    color: var(--cb-navy);
    font-size: 1.25rem;
    line-height: 1.6;
}

.cb-prose p {
    max-width: 36rem;
    margin-bottom: 1.1rem;
    color: var(--cb-ink-soft);
    font-size: 1.02rem;
    line-height: 1.85;
}

.cb-portrait {
    position: relative;
    max-width: 26rem;
    margin-inline: auto;
}

.cb-portrait::before {
    content: '';
    position: absolute;
    inset: 2rem -2rem -2rem 2rem;
    border: 2px solid var(--cb-green);
    z-index: 0;
    transition: transform 0.7s var(--cb-ease);
}

.cb-portrait:hover::before {
    transform: translate(-0.75rem, -0.75rem);
}

.cb-portrait-frame {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: var(--cb-mist);
}

.cb-portrait img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 1.4s var(--cb-ease);
}

.cb-portrait:hover img {
    transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   IMMERSION — l'arche s'ouvre jusqu'au plein écran pendant le scroll
   Variables --p / --t posées par le contrôleur `immersion`.
-------------------------------------------------------------------------- */
.cb-immersion {
    --p: 1; /* état final si le JS ne tourne pas */
    --t: 1;
    position: relative;
    height: 260vh;
    background: var(--cb-paper);
}

.cb-immersion-sticky {
    position: sticky;
    top: var(--cb-header-h);
    height: calc(100svh - var(--cb-header-h));
    overflow: hidden;
}

.cb-immersion-media {
    position: absolute;
    inset: 0;
    --ix: calc((1 - var(--p)) * 30%);
    --iy: calc((1 - var(--p)) * 9%);
    --ir: calc((1 - var(--p)) * 46vw);
    clip-path: inset(var(--iy) var(--ix) var(--iy) var(--ix) round var(--ir) var(--ir) 0 0);
    will-change: clip-path;
}

.cb-immersion-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(calc(1.3 - var(--p) * 0.3));
    will-change: transform;
}

.cb-immersion-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 22, 46, 0.78) 0%, rgba(10, 22, 46, 0.25) 60%, rgba(10, 22, 46, 0.1) 100%);
    opacity: var(--t);
}

.cb-immersion-text {
    position: absolute;
    inset: auto 0 clamp(2.5rem, 8vh, 5rem);
    z-index: 1;
    color: #fff;
    opacity: var(--t);
    transform: translateY(calc((1 - var(--t)) * 40px));
}

.cb-immersion-text .cb-eyebrow {
    color: #fff;
}

.cb-immersion-title {
    max-width: 18ch;
    margin: 0 0 1.75rem;
    color: #fff;
    font-size: clamp(2.2rem, 6vw, 5.2rem);
    line-height: 1.04;
}

.cb-immersion-title em {
    font-style: normal;
    background: linear-gradient(var(--cb-green), var(--cb-green)) 0 92% / 100% 0.08em no-repeat;
}

/* --------------------------------------------------------------------------
   PANNEAUX — notre expertise (accordéon horizontal)
-------------------------------------------------------------------------- */
.cb-expertise {
    background: var(--cb-mist);
}

.cb-panels-wrap {
    position: relative;
}

.cb-panels {
    display: flex;
    gap: 0.75rem;
    height: clamp(30rem, 74vh, 44rem);
}

.cb-panel {
    position: relative;
    flex: 1 1 0;
    overflow: hidden;
    background: var(--cb-navy);
    color: #fff;
    text-decoration: none;
    transition: flex-grow 0.9s var(--cb-ease);
}

.cb-panel.is-active {
    flex-grow: 4.2;
}

.cb-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    filter: saturate(0.85) brightness(0.8);
    transition: transform 1.3s var(--cb-ease), filter 0.9s ease;
}

.cb-panel.is-active img {
    transform: scale(1);
    filter: none;
}

.cb-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 22, 46, 0.8) 0%, rgba(10, 22, 46, 0) 55%);
}

.cb-panel-num {
    position: absolute;
    top: 1.6rem;
    left: 1.75rem;
    z-index: 1;
    font-family: var(--cb-font-title);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
}

.cb-panel-label {
    position: absolute;
    left: 1.75rem;
    bottom: 1.75rem;
    z-index: 1;
    max-width: calc(100% - 3.5rem);
}

/* Libellé vertical quand le panneau est refermé, horizontal et grand quand il est ouvert */
.cb-panel-title {
    display: block;
    margin: 0;
    color: #fff;
    font-family: var(--cb-font-title);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.05;
    white-space: nowrap;
    transform-origin: left bottom;
    transition: transform 0.9s var(--cb-ease);
}

.cb-panel:not(.is-active) .cb-panel-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

.cb-panel-more {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.7s var(--cb-ease);
}

.cb-panel.is-active .cb-panel-more {
    opacity: 1;
    transform: none;
    transition-delay: 0.35s;
}

.cb-panel-more::before {
    content: '';
    width: 2.2rem;
    height: 2px;
    background: var(--cb-green);
}

/* Pastille « Découvrir » qui suit la souris */
.cb-cursor {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    background: var(--cb-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    scale: 0.3;
    transition: opacity 0.35s ease, scale 0.5s var(--cb-ease);
}

.cb-cursor.is-on {
    opacity: 1;
    scale: 1;
}

/* Tactile / mobile : pas d'accordéon, tout est ouvert et empilé */
@media (hover: none), (max-width: 767.98px) {
    .cb-panels {
        flex-direction: column;
        height: auto;
    }

    .cb-panel,
    .cb-panel.is-active {
        flex: none;
        height: 17rem;
    }

    .cb-panel img {
        transform: none;
        filter: none;
    }

    .cb-panel:not(.is-active) .cb-panel-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: clamp(1.6rem, 3vw, 2.6rem);
    }

    .cb-panel-more {
        opacity: 1;
        transform: none;
    }

    .cb-cursor {
        display: none;
    }
}

/* Styles du slider témoignages : voir site.css (composant partagé home + avis clients) */

/* --------------------------------------------------------------------------
   APPEL À L'ACTION FINAL
-------------------------------------------------------------------------- */
.cb-cta {
    padding-block: clamp(5rem, 11vw, 10rem);
    border-top: 1px solid var(--cb-line);
    text-align: center;
    overflow: hidden;
}

.cb-cta-title {
    margin: 0 0 2.75rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    color: var(--cb-navy);
}

.cb-cta-title em {
    display: block;
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--cb-navy);
    transition: color 0.8s var(--cb-ease);
}

.cb-cta:hover .cb-cta-title em {
    color: var(--cb-green);
    -webkit-text-stroke-color: var(--cb-green);
}

@media (max-width: 767.98px) {
    .cb-portrait::before {
        inset: 1.25rem -0.75rem -1.25rem 0.75rem;
    }

    .cb-immersion {
        height: 220vh;
    }

    .cb-immersion-media {
        --ix: calc((1 - var(--p)) * 14%);
        --ir: calc((1 - var(--p)) * 60vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-hero-media img,
    .cb-hero-eyebrow,
    .cb-hero-eyebrow::before,
    .cb-hero-eyebrow::after,
    .cb-hero-title i,
    .cb-hero-cta,
    .cb-scroll-hint::after {
        animation: none;
    }

    .cb-hero-title i {
        transform: none;
        opacity: 1;
    }

    .cb-marquee-track {
        animation: none;
    }

    .cb-panel,
    .cb-panel img,
    .cb-panel-title {
        transition: none;
    }
}
