/* =============================================================
   Page "Équipe" — refonte
   -------------------------------------------------------------
   Même langage visuel que css/presentation.css, css/resultats.css
   et css/contact.css : base très claire, grandes respirations,
   titres en graisse légère, aplats pastel, rayons généreux,
   accents teal.
   Les portraits sources sont déjà en noir et blanc, sombres et de
   formats hétérogènes : c'est ce qui rendait l'ancienne bande
   pesante. On les recadre donc à un ratio commun, on les éclaircit
   légèrement et on les pose dans des cartes blanches où le nom et
   la fonction occupent une zone claire — la photo n'occupe plus
   toute la carte.
   Tout est préfixé .eq- et scopé à .eq-page.
   Retour arrière : restaurer equipe.backup.php.
   ============================================================= */

.eq-page {
    --eq-ink: #16171F;
    --eq-ink-soft: #6B6F76;
    --eq-line: rgba(2, 3, 22, 0.09);
    --eq-tint-neutral: #F6F7F8;
    background-color: var(--color-white);
}

/* Le thème colore et espace toutes les <section> (sélecteur `section`, 0-0-1).
   On neutralise à spécificité égale — la feuille étant chargée après, elle
   l'emporte — tout en restant surclassable par chaque bloc .eq-* (0-1-0). */
:where(.eq-page) section {
    background-color: transparent;
    padding: 0;
    overflow: visible;
}

.eq-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typographie commune ---------- */

.eq-title {
    margin: 0;
    font-weight: 300;
    letter-spacing: -0.015em;
    line-height: 1.08;
    color: var(--eq-ink);
    font-size: clamp(2rem, 4.4vw, 3.2rem);
}

.eq-subtitle {
    margin: 0;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--eq-ink);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.eq-text {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.75;
    font-weight: 300;
    color: var(--eq-ink-soft);
}

.eq-text:last-child {
    margin-bottom: 0;
}

.eq-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-teal);
}

.eq-eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background-color: currentColor;
}

/* ---------- Intro : titre à gauche, texte à droite ---------- */

.eq-intro {
    padding: clamp(80px, 9vw, 130px) 0 clamp(50px, 6vw, 80px);
}

.eq-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: end;
}

.eq-intro-text {
    padding-bottom: 6px;
}

/* ---------- En-tête de section (titre + compteur) ---------- */

.eq-section-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding-bottom: 20px;
    margin-bottom: clamp(34px, 4vw, 54px);
    border-bottom: 1px solid var(--eq-line);
}

.eq-section-count {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--color-teal);
}

/* ---------- Équipe : bande de portraits "posés" ----------
   Principe conservé de la version précédente (défilement horizontal,
   vignettes décalées en hauteur, "dossier" qui s'ouvre au clic), reprise
   aux valeurs de la page : fond très clair, grands rayons, portraits
   éclaircis, ombres douces. */

.eq-people {
    padding: clamp(60px, 7vw, 100px) 0 clamp(26px, 3.5vw, 46px);
    background-color: var(--color-white);
}

/* La piste déborde de la grille du site (bord à bord) mais sa première
   vignette reste alignée sur .eq-shell. */
.eq-band-track {
    display: flex;
    align-items: flex-start;
    gap: clamp(26px, 3.4vw, 52px);
    padding: 54px max(24px, calc((100% - 1180px) / 2 + 24px)) 34px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.eq-band-track::-webkit-scrollbar {
    display: none;
}

/* Barre de progression "designée" sous la piste : rend explicite le fait
   que la bande se parcourt au scroll, ET sert de vraie scrollbar
   cliquable/glissable (curseur saisissable, rail cliquable). */
.eq-band-progress {
    position: relative;
    height: 14px;
    margin: 0 0 clamp(36px, 5vw, 56px);
    padding: 5px 0;
    cursor: pointer;
    touch-action: none;
}

.eq-band-progress::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 999px;
    background-color: var(--eq-line);
    transform: translateY(-50%);
}

.eq-band-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    min-width: 36px;
    border-radius: 999px;
    background-color: var(--color-teal);
    transform: translateY(-50%);
    cursor: grab;
    transition: left 0.15s ease-out, width 0.15s ease-out, height 0.15s ease, top 0.15s ease;
}

.eq-band-progress-thumb:hover,
.eq-band-progress-thumb:active {
    height: 10px;
    cursor: grabbing;
}

.eq-band-item {
    flex: 0 0 auto;
    width: 268px;
    transform: translateY(var(--offset-y, 0px));
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.45s ease, opacity 0.3s ease;
}

.eq-band-item.is-active {
    width: 310px;
    transform: translateY(0);
    z-index: 5;
}

.eq-band-nav {
    display: flex;
    align-self: center;
    margin-left: auto;
    gap: 12px;
}

.eq-band-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--eq-line);
    background-color: var(--color-white);
    color: var(--eq-ink);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.eq-band-arrow:hover:not(:disabled) {
    border-color: transparent;
    background-color: var(--color-teal);
    color: var(--color-white);
}

.eq-band-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

/* ---------- Vignette "dossier" ---------- */

.eq-folder {
    position: relative;
    height: 400px;
}

.eq-folder-photo {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--color-white);
    transform-origin: top center;
    box-shadow: 0 16px 36px rgba(2, 3, 22, 0.12);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-radius 0.5s ease, box-shadow 0.5s ease;
}

.eq-folder-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    /* Portraits sources très sombres : on les éclaircit et on baisse le
       contraste pour que la bande ne forme plus un mur noir. */
    filter: grayscale(1) brightness(1.14) contrast(0.9);
    transition: filter 0.6s ease;
}

.eq-folder-photo:hover img {
    filter: grayscale(0) brightness(1.06) contrast(0.95);
}

/* Anne-Sophie Hue : photo à garder en noir et blanc en toute circonstance
   (y compris au survol), quel que soit l'effet appliqué aux autres membres. */
.eq-folder-photo[aria-controls="eq-panel-hue"] img,
.eq-folder-photo[aria-controls="eq-panel-hue"]:hover img {
    filter: grayscale(1) brightness(1.14) contrast(0.9) !important;
}

/* Les deux pastilles sont empilées dans un conteneur ancré en bas : une
   fonction longue passe à la ligne sans jamais chevaucher le nom. */
.eq-folder-tags {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.eq-folder-tag {
    display: inline-block;
    max-width: 100%;
    border-radius: 12px;
    background-color: var(--color-white);
    box-shadow: 0 8px 20px rgba(2, 3, 22, 0.12);
    text-align: left;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.eq-folder-tag-name {
    padding: 7px 12px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--eq-ink);
}

.eq-folder-tag-role {
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 300;
    line-height: 1.4;
    color: var(--eq-ink-soft);
}

.eq-folder-plus {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: var(--color-white);
    font-size: 0.75rem;
    box-shadow: 0 6px 16px rgba(2, 3, 22, 0.22);
    transition: transform 0.35s ease;
}

.eq-folder-photo:hover .eq-folder-plus {
    transform: scale(1.15);
}

/* Le dossier de texte : hauteur nulle tant que la vignette est fermée,
   puis il remonte devant la photo (qui, elle, passe derrière). */
.eq-folder-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    background-color: var(--color-white);
    box-shadow: 0 -12px 34px rgba(2, 3, 22, 0.12);
    opacity: 0;
    transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.eq-folder-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 22px 22px 20px;
}

.eq-folder-panel-name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--eq-ink);
}

.eq-folder-panel-role {
    margin: 0 0 14px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-teal);
}

.eq-folder-panel-bio {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 300;
    color: var(--eq-ink-soft);
    /* Masque progressif en bas : indique qu'il reste du texte à faire
       défiler sans ajouter de barre de scroll visible. */
    mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
    scrollbar-width: none;
}

.eq-folder-panel-bio::-webkit-scrollbar {
    display: none;
}

.eq-folder-panel-foot {
    flex: 0 0 auto;
    padding-top: 14px;
}

.eq-folder.is-open .eq-folder-photo {
    z-index: 1;
    transform: scale(0.5) rotate(-6deg) translate(-6%, -14%);
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(2, 3, 22, 0.22);
}

.eq-folder.is-open .eq-folder-plus {
    transform: rotate(45deg);
}

.eq-folder.is-open .eq-folder-tag {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.eq-folder.is-open .eq-folder-panel {
    z-index: 3;
    height: 80%;
    opacity: 1;
}

.eq-link-in {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--eq-line);
    background-color: var(--color-white);
    color: var(--eq-ink-soft);
    font-size: 0.85rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.eq-link-in:hover,
.eq-link-in:focus {
    border-color: transparent;
    background-color: var(--color-blue);
    color: var(--color-white);
}

/* ---------- Collaborateurs : bande teintée, lignes horizontales ----------
   Les surfaces colorées de la page sont des bandes pleine largeur (comme
   celle de l'équipe) et non des cartes posées dans une section blanche :
   c'est le contenu, pas le conteneur, qui porte les rayons. */

.eq-collab {
    padding: clamp(70px, 8vw, 110px) 0 clamp(60px, 7vw, 90px);
    background-color: #F9FBFE;
}

.eq-collab .eq-section-head {
    border-bottom-color: rgba(2, 3, 22, 0.08);
}

.eq-collab-lead {
    max-width: 62ch;
    margin-bottom: clamp(34px, 4vw, 50px);
}

.eq-collab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.eq-collab-item {
    display: flex;
    gap: 20px;
    padding: 26px 28px;
    border-radius: 20px;
    background-color: var(--color-white);
}

.eq-collab-photo {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--eq-tint-neutral);
}

.eq-collab-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: grayscale(1) brightness(1.14) contrast(0.9);
}

/* Avatar de secours quand aucune photo n'est encore disponible. */
.eq-collab-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eq-ink-soft);
    font-size: 1.3rem;
    opacity: 0.45;
}

.eq-collab-body {
    min-width: 0;
}

.eq-collab-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--eq-ink);
}

.eq-collab-name .eq-link-in {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    background-color: transparent;
}

.eq-collab-role {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-teal);
}

.eq-collab-bio {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 300;
    color: var(--eq-ink-soft);
}

/* ---------- Bandeau de fin ---------- */

.eq-cta {
    padding: clamp(60px, 7vw, 90px) 0;
    background-color: #F1F7FF;
}

.eq-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.eq-cta-text {
    max-width: 56ch;
}

.eq-cta-lead {
    margin-top: 14px;
}

.eq-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    border-radius: 999px;
    background-color: var(--eq-ink);
    color: var(--color-white);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.eq-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.eq-btn:hover i {
    transform: translateX(4px);
}

.eq-btn:hover,
.eq-btn:focus {
    background-color: var(--color-blue-dark);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .eq-intro-grid {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 26px;
    }

    .eq-collab-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .eq-band-track {
        gap: 22px;
        padding-top: 44px;
        padding-bottom: 26px;
    }

    .eq-band-item {
        width: 224px;
    }

    .eq-band-item.is-active {
        width: 250px;
    }

    .eq-folder {
        height: 340px;
    }
}

@media (max-width: 575px) {
    .eq-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {

    .eq-band-track {
        scroll-behavior: auto;
    }

    .eq-band-item,
    .eq-folder-photo,
    .eq-folder-photo img,
    .eq-folder-panel,
    .eq-btn {
        transition: none;
    }

    .eq-btn:hover {
        transform: none;
    }
}
