:root {
    --bg: #f3f5f7;
    --card: #fff;
    --ink: #0f172a;
    --muted: #64748b;
    --accent: #6d4cff;
    --accent-2: #8b5cf6;
    --ring: rgba(109, 76, 255, .3);
    --radius: 22px;
    --shadow: 0 10px 25px rgba(15, 23, 42, .08);
}

/* ===== Reset de base ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #cde8c2, #f4f9ef, #cde8c2);
    background-size: 300% 300%;
    animation: bgShift 25s ease-in-out infinite;
}

/* ===== Conteneur principal ===== */

.wrap {
    max-width: 1120px;
    margin: 40px auto;
    padding: 0 20px 32px;
    display: flex;
    flex-direction: column;
}

@media (min-width:1280px) {
    .wrap {
        max-width: 1200px;
    }
}

/* ===== Titre & sous-titre ===== */

.title {
    text-align: center;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: .2px;
    margin: 10px 0 28px;
    color: #1a4f85;
    background: linear-gradient(90deg, #1a4f85, #3ba776, #1a4f85);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shimmer 6s linear infinite;
}

@supports not ((-webkit-background-clip:text) or (background-clip:text)) {
    .title {
        color: #1a4f85;
        background: none;
    }
}

.lead {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
    color: var(--muted);
}

/* ===== Bloc vedette (Jacques) ===== */

.featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 28px;
    background: var(--card);
    border-radius: 30px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: transform .3s ease, box-shadow .3s ease;
    will-change: transform;
    align-items: center;
}

.featured:hover {
    transform: translateY(-3px) scale(1.01); /* léger zoom de la carte entière */
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

/* Conteneur image : on laisse respirer le portrait, sans ratio forcé */
.featured .img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 24px;
    background: #dbe2ea;
    position: relative;
}

/* L’image du leader n’est plus rognée */
.featured .img picture,
.featured .img img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Passage N&B → couleur au survol, sans zoom d’image */
.featured .img img {
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter .4s ease;
    animation: none;
    box-shadow: 0 0 30px rgba(109, 76, 255, .22);
}

.featured:hover .img img {
    filter: grayscale(0);
}

.kicker {
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--muted);
    font-weight: 700;
}

.name {
    font-size: clamp(24px, 2.8vw, 34px);
    margin: 8px 0 6px;
}

.desc {
    color: var(--muted);
    line-height: 1.6;
}

/* ===== Grille des membres ===== */

/* Grille auto-adaptative : entre 220px et 1fr, 2–4 cartes par ligne */
.grid {
    display: grid;
    gap: 18px;
    margin-top: 26px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Chaque carte occupe 1 colonne de la grille */
.card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity .8s ease-out,
        transform .8s ease-out,
        box-shadow .2s ease;
    will-change: transform, opacity;

    display: flex;
    flex-direction: column;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Zone photo : carré centré, même style pour tout le monde */
.card .ph {
    position: relative;              /* pour le badge LinkedIn */
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Portrait : entier mais harmonisé */
.card .ph img {
    width: 100%;
    height: 100%;
    object-fit: contain;             /* on ne rogne pas les têtes */
    object-position: center;
    filter: grayscale(100%);
    transition: filter .35s ease, transform .35s ease;
}

/* Effet au survol : léger zoom + couleur, pas plus */
.card:hover img {
    filter: grayscale(0);
    transform: scale(1.03);
}

/* Badge LinkedIn en haut à droite de la photo */
.badge-linkedin {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.badge-linkedin svg {
    width: 18px;
    height: 18px;
    fill: #111827;
    transition: transform .2s ease, fill .2s ease;
}

.badge-linkedin:hover svg,
.badge-linkedin:focus-visible svg {
    fill: #6d4cff;
    transform: scale(1.16);
}

/* Zone texte de la carte */
.card .meta {
    padding: 8px 10px 10px;
}

.card .person {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.card .job {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.25;
}

.card .job:empty {
    display: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

/* Ligne du nom + info à droite (âge) */

.topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Affichage de l’âge à droite du nom */
.meta-age {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f9fafb;
}

/* ===== Responsif ===== */

@media (max-width:720px) {
    .featured {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }

    .featured .img {
        max-width: 260px;
        margin: 0 auto;
    }
}

/* Un léger plafonnage de la taille des photos sur mobile */
@media (max-width:720px) {
    .card .ph {
        max-width: 260px;
        max-height: 340px;
        margin: 0 auto;
    }
}

/* ===== Footer ===== */

footer {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    margin: 34px 0 0;
}

/* ===== Animations & accessibilité ===== */

@keyframes bgShift {
    0%,
    100% {
        background-position: left top;
    }

    50% {
        background-position: right bottom;
    }
}

@keyframes shimmer {
    to {
        background-position: -200% center;
    }
}

:focus-visible {
    outline: 3px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 10px;
}

@media (prefers-reduced-motion:reduce) {

    body,
    .title,
    .featured .img img {
        animation: none;
    }

    .card {
        transition: none;
    }
}

/* ===== Comportement dans l'iframe ===== */

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: hidden !important;  /* pas de scroll interne : c'est le parent qui scrolle */
}
