: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);
}

*,
*::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 (style alternatif, portrait non tronqué) ===== */

.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;
}

/* L'image de Jacques : plus de zoom, seulement le passage N&B → couleur */
.featured .img img {
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter .4s ease;
    animation: none; /* on coupe le zoomPulse qui la fait “gonfler” en continu */
    box-shadow: 0 0 30px rgba(109, 76, 255, .22);
}

.featured:hover .img img {
    filter: grayscale(0);
    /* plus de transform: scale(...) => l'image ne grandit plus */
}
.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;
}

/* ===== Cartes de l’équipe ===== */

.grid {
    display: grid;
    gap: 18px;
    margin-top: 26px;
    grid-template-columns: repeat(12, 1fr);
}

.card {
    grid-column: span 4;
    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;
}

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

.card .ph {
    aspect-ratio: 3/3;
    overflow: hidden;
    background: #e5e7eb;
    display: grid;
    place-items: center;
    position: relative; /* pour positionner le badge LinkedIn */
}

.card .ph img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    object-position: center;
    filter: grayscale(100%);
    transition: filter .35s ease, transform .35s ease;
}

.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);
}

/* Compactage vertical pour limiter la hauteur totale */
.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;
}

/* (Ancien style pour l’icône inline – conservé en commentaire)
.topline .icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

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

.icon:hover svg {
    fill: #6d4cff;
    transform: scale(1.2);
}
*/

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

@media (max-width:1024px) {
    .card {
        grid-column: span 6;
    }
}

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

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

    .card {
        grid-column: span 6;
    }

    .card .ph {
        aspect-ratio: 1/1.1;
    }
}

@media (max-width:520px) {
    .card {
        grid-column: span 12;
    }
}

/* Orientation : ajuster le nombre de colonnes */
@media (orientation: portrait) and (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (orientation: landscape) and (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ===== 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;
    }
}

@keyframes zoomPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

: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;
    }
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}
