/* ============================================================
   NAJAC CANDIDAT·E·S — v3.4
   Charte : rouge #da442b / vert #9fcf69
   Fonts : DM Serif Display (display) + DM Sans (body)
   Changelog v3.4:
     - Modal large 2 colonnes (photo gauche / bio droite)
     - Emojis remplacés par SVG inline
     - Nav prev/next en bas avec noms
     - Bio scrollable si longue
     - z-index !important pour passer au-dessus de Divi
============================================================ */

:root {
    --nc-rouge: #da442b;
    --nc-rouge-dark: #b5351f;
    --nc-vert: #9fcf69;
    --nc-vert-dark: #7aad4e;
    --nc-vert-pale: #f4fae9;
    --nc-texte: #3a3a3a;
    --nc-texte-light: #5c5c5c;
    --nc-gris: #9a9a9a;
    --nc-border: #e8e5df;
    --nc-bg: #faf9f6;
    --nc-white: #fff;
    --nc-radius: 16px;
    --nc-shadow: 0 4px 24px rgba(0,0,0,.06);
    --nc-shadow-hover: 0 24px 64px rgba(0,0,0,.14);
    --nc-font-display: "DM Serif Display", Georgia, serif;
    --nc-font-body: "DM Sans", system-ui, sans-serif;
}

/* WRAPPER */
.nc-wrap {
    font-family: var(--nc-font-body);
    color: var(--nc-texte);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow-x: hidden;
}
.nc-wrap * { box-sizing: border-box; }

/* ============================================================
   SVG ICONS
============================================================ */
.nc-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: -2px;
    flex-shrink: 0;
}

/* ============================================================
   HERO
============================================================ */
.nc-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 5rem;
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.nc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(30,30,30,.5) 0%, rgba(30,30,30,.7) 100%),
        linear-gradient(160deg, rgba(159,207,105,.15) 0%, transparent 50%);
    z-index: 1;
}
.nc-hero::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--nc-vert), var(--nc-rouge), var(--nc-vert));
    z-index: 3;
}
.nc-hero-inner { position: relative; z-index: 2; max-width: 900px; }

.nc-hero--no-img { background:#9fcf69; }
.nc-hero--no-img::before {
    background:
        radial-gradient(circle at 15% 80%, rgba(159,207,105,.2) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(218,68,43,.08) 0%, transparent 50%) !important;
}
.nc-hero--no-img .nc-hero-label { background: var(--nc-rouge); }
.nc-hero--no-img .nc-hero-title { color: var(--nc-texte); text-shadow: none; }
.nc-hero--no-img .nc-hero-stat { background: rgba(255,255,255,.7); border-color: rgba(159,207,105,.25); }
.nc-hero--no-img .nc-hero-stat-num { color: var(--nc-vert-dark); }
.nc-hero--no-img .nc-hero-stat-lbl { color: var(--nc-texte-light); }
.nc-hero--no-img .nc-scroll svg { stroke: var(--nc-vert); opacity: 1; }

.nc-hero-label {
    display: inline-block;
    background: var(--nc-rouge);
    color: var(--nc-white);
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 4px;
    padding: 10px 28px; border-radius: 4px;
    margin-bottom: 1.6rem;
    animation: ncFadeUp .6s ease .1s both;
}
.nc-hero-title {
    font-family: var(--nc-font-display);
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    font-weight: 400; color: var(--nc-white);
    margin: 0 0 1rem; line-height: 1.08;
    text-shadow: 0 4px 30px rgba(0,0,0,.3);
    animation: ncFadeUp .6s ease .2s both;
}
.nc-hero-chapeau {
    display: inline-block;
    font-size: clamp(.78rem, 1.2vw, .88rem);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--nc-white);
    max-width: 720px;
    margin: .8rem auto 2rem;
    line-height: 1.7;
    padding: 1rem 2.6rem;
    background: rgba(218,68,43,.85);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    animation: ncFadeUp .6s ease .32s both;
}
.nc-hero--no-img .nc-hero-chapeau {
    background: var(--nc-rouge);
    color: var(--nc-white);
    box-shadow: 0 4px 20px rgba(218,68,43,.25);
}
.nc-hero-stats {
    display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
    animation: ncFadeUp .6s ease .45s both;
}
.nc-hero-stat {
    text-align: center;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 1.4rem 2.2rem; border-radius: 12px;
    border: 1px solid rgba(255,255,255,.15);
}
.nc-hero-stat-num {
    font-family: var(--nc-font-display);
    font-size: 2.8rem; color: var(--nc-vert); line-height: 1;
}
.nc-hero-stat-lbl {
    font-size: .72rem; color: rgba(255,255,255,.7);
    text-transform: uppercase; letter-spacing: 2px;
    margin-top: .4rem; font-weight: 700;
}

.nc-scroll {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%); z-index: 3;
    animation: ncBounce 2s infinite;
}
.nc-scroll svg { width: 30px; height: 30px; stroke: #fff; stroke-width: 2.5; fill: none; opacity: .6; }
@keyframes ncBounce {
    0%,20%,50%,80%,100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}
@keyframes ncFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
}

/* INNER */
.nc-inner { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   TÊTE DE LISTE
============================================================ */
.nc-lead {
    display: grid; grid-template-columns: 1fr 1.3fr;
    margin: 3rem 0; border-radius: var(--nc-radius);
    overflow: hidden; background: var(--nc-white);
    box-shadow: 0 12px 50px rgba(0,0,0,.08);
    min-height: 420px; opacity: 0; transform: translateY(24px);
    animation: ncFadeUp .7s ease .2s forwards;
    border-left: 5px solid var(--nc-vert);
}
.nc-lead-img { position: relative; overflow: hidden; }
.nc-lead-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.nc-lead:hover .nc-lead-img img { transform: scale(1.04); }
.nc-lead-img::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 35%;
    background: linear-gradient(transparent, rgba(0,0,0,.25)); pointer-events: none;
}
.nc-lead-badge {
    position: absolute; top: 22px; left: 22px;
    background: var(--nc-rouge); color: var(--nc-white);
    font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    padding: 10px 22px; border-radius: 4px; z-index: 5;
}
.nc-lead-content { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.nc-lead-role {
    font-size: .75rem; color: var(--nc-vert-dark); font-weight: 700;
    text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: .6rem;
}
.nc-lead-name {
    font-family: var(--nc-font-display); font-size: 2.2rem;
    color: var(--nc-texte); margin: 0 0 1rem; line-height: 1.15;
}
.nc-lead-bio { font-size: .95rem; color: var(--nc-texte-light); line-height: 1.75; }
.nc-lead-bio p { margin: 0 0 .8rem; }

/* META */
.nc-meta {
    list-style: none; padding: 0; margin: 0 0 1.2rem;
    display: flex; flex-wrap: wrap; gap: .8rem 1.5rem;
    font-size: .88rem; color: var(--nc-texte-light);
}
.nc-meta li { display: flex; align-items: center; gap: 6px; }
.nc-meta--sm { font-size: .8rem; gap: .6rem 1rem; margin-bottom: .8rem; }

/* ============================================================
   SECTION HEAD
============================================================ */
.nc-section-head { text-align: center; margin: 3.5rem 0 1rem; }
.nc-section-title {
    font-family: var(--nc-font-display); font-size: 1.8rem;
    color: var(--nc-texte); margin: 0 0 .6rem;
}
.nc-section-line {
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--nc-rouge), var(--nc-vert));
    margin: 0 auto; border-radius: 2px;
}

/* ============================================================
   GRILLE
============================================================ */
.nc-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 30px; margin-bottom: 4rem;
}

/* ============================================================
   CARTE
============================================================ */
.nc-card {
    background: var(--nc-white); border-radius: var(--nc-radius);
    overflow: hidden; box-shadow: var(--nc-shadow);
    display: flex; flex-direction: column; cursor: pointer;
    position: relative; opacity: 0; transform: translateY(20px);
    animation: ncFadeUp .6s ease forwards;
    transition: transform .35s ease, box-shadow .35s ease;
}
.nc-card:hover { transform: translateY(-10px); box-shadow: var(--nc-shadow-hover); }
.nc-card::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--nc-vert), var(--nc-vert-dark));
    transform: scaleX(0); transform-origin: left;
    transition: transform .4s ease; z-index: 10;
}
.nc-card:hover::after { transform: scaleX(1); }

.nc-card-visual { position: relative; height: 320px; overflow: hidden; }
.nc-card-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease; }
.nc-card:hover .nc-card-visual img { transform: scale(1.08); }

.nc-card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 5;
    background: var(--nc-white); padding: 14px 20px;
    border-top: 3px solid var(--nc-vert);
}
.nc-card-name { font-family: var(--nc-font-display); font-size: 1.25rem; color: var(--nc-texte); margin: 0; }
.nc-card-role {
    font-size: .72rem; font-weight: 700; color: var(--nc-vert-dark);
    text-transform: uppercase; letter-spacing: 1.2px; margin-top: 3px; display: block;
}
.nc-card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.nc-card-excerpt {
    font-size: .86rem; color: #6a6a6a; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 0;
}
.nc-card-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--nc-border); }
.nc-btn-see {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--nc-vert-dark) !important; font-weight: 700; font-size: .8rem;
    text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
    text-decoration: none; transition: all .25s;
}
.nc-arrow-circle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--nc-vert); color: var(--nc-white);
    font-size: .82rem; transition: all .25s;
}
.nc-btn-see:hover .nc-arrow-circle {
    background: var(--nc-vert-dark); transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(159,207,105,.35);
}

/* ============================================================
   MODAL — v3.4 : large 2 colonnes, photo gauche / bio droite
============================================================ */

/* Backdrop */
.nc-backdrop {
    position: fixed !important; inset: 0 !important;
    z-index: 999999998 !important;
    background: rgba(0,0,0,0);
    pointer-events: none;
    transition: background .3s ease;
}
.nc-backdrop.active {
    background: rgba(0,0,0,.6) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

/* Modal container */
.nc-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.nc-modal.active {
    display: flex;
    animation: ncFade .25s ease;
}
@keyframes ncFade { from { opacity: 0; } to { opacity: 1; } }

/* Box — hauteur fixe pour un affichage homogène quelle que soit la bio */
.nc-modal-box {
    background: var(--nc-white);
    border-radius: var(--nc-radius);
    max-width: 1000px; width: 100%;
    height: min(600px, 88vh);
    box-shadow: 0 20px 80px rgba(0,0,0,.3);
    position: relative;
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: ncSlide .35s ease;
}
@keyframes ncSlide {
    from { transform: translateY(20px) scale(.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* Transition flou entre candidats */
.nc-modal-content {
    transition: filter .15s ease, opacity .15s ease;
}
.nc-modal-content.nc-blur {
    filter: blur(6px);
    opacity: .4;
}

/* Close */
.nc-modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 20;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: rgba(0,0,0,.06); color: var(--nc-texte);
    font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; line-height: 1;
}
.nc-modal-close:hover { background: rgba(0,0,0,.12); }

/* 2 colonnes */
.nc-modal-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    flex: 1; min-height: 0; overflow: hidden;
}

/* Photo gauche */
.nc-modal-photo { position: relative; overflow: hidden; background: #e5e5e5; }
.nc-modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nc-modal-photo-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,.7) 100%);
    padding: 3rem 1.5rem 1.3rem; color: var(--nc-white);
}
.nc-modal-name {
    font-family: var(--nc-font-display); font-size: 1.6rem;
    margin: 0 0 4px; line-height: 1.2;
}
.nc-modal-role {
    font-size: .72rem; color: var(--nc-vert); font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
}

/* Bio droite — scrollable */
.nc-modal-right { display: flex; flex-direction: column; min-height: 0; }
.nc-modal-scroll {
    flex: 1; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 2rem 2.2rem 1.5rem;
}

/* Info bar */
.nc-modal-info {
    display: flex; flex-wrap: wrap; gap: 6px 18px;
    padding-bottom: 1.2rem; margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--nc-border);
    font-size: .85rem; color: var(--nc-texte-light);
}
.nc-modal-info span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.nc-modal-info:empty { display: none; }

/* Bio */
.nc-modal-bio-head {
    font-family: var(--nc-font-display); font-size: 1.15rem;
    color: var(--nc-texte); margin: 0 0 .8rem;
    padding-bottom: .6rem; border-bottom: 3px solid var(--nc-vert);
}
.nc-modal-bio { font-size: .92rem; line-height: 1.85; color: var(--nc-texte-light); }
.nc-modal-bio p { margin: 0 0 1rem; }
.nc-modal-bio p:last-child { margin-bottom: 0; }
.nc-modal-bio strong, .nc-modal-bio b { color: var(--nc-texte); font-weight: 600; }
.nc-modal-bio a { color: var(--nc-vert-dark); text-decoration: underline; }
.nc-modal-bio ul, .nc-modal-bio ol { margin: 0 0 1rem 1.2rem; line-height: 1.7; }

/* Nav bar en bas */
.nc-modal-nav {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: .8rem 1.5rem;
    border-top: 1px solid var(--nc-border);
    background: var(--nc-bg);
}
.nc-modal-nav-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 8px;
    border: 1px solid var(--nc-border);
    background: var(--nc-white); color: var(--nc-texte);
    font-family: var(--nc-font-body); font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.nc-modal-nav-btn:hover {
    background: var(--nc-vert-pale);
    border-color: var(--nc-vert);
    color: var(--nc-vert-dark);
}
.nc-modal-nav-btn svg {
    width: 16px; height: 16px;
    stroke: currentColor; stroke-width: 2.5; fill: none;
    flex-shrink: 0;
}
.nc-modal-nav-name {
    max-width: 160px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 960px) {
    .nc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .nc-hero { min-height: 45vh; padding: 5rem 1.5rem 4rem; }
    .nc-hero-stats { gap: 1rem; }
    .nc-hero-stat { padding: 1rem 1.5rem; }
    .nc-hero-stat-num { font-size: 2.2rem; }
    .nc-lead { grid-template-columns: 1fr; border-left: none; border-top: 5px solid var(--nc-vert); }
    .nc-lead-img { height: 340px; }
    .nc-lead-content { padding: 2rem; }
    .nc-lead-name { font-size: 1.7rem; }
}

@media (max-width: 800px) {
    .nc-modal { padding: 12px; }
    .nc-modal-box { height: min(600px, 92vh); }
    .nc-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 240px 1fr;
    }
    .nc-modal-photo-overlay { padding: 2rem 1.2rem 1rem; }
    .nc-modal-name { font-size: 1.35rem; }
    .nc-modal-scroll { padding: 1.2rem 1.4rem 1rem; }
    .nc-modal-close { background: rgba(0,0,0,.45); color: var(--nc-white); }
    .nc-modal-close:hover { background: rgba(0,0,0,.7); }
}

@media (max-width: 600px) {
    .nc-grid { grid-template-columns: 1fr; gap: 20px; }
    .nc-card-visual { height: 280px; }
    .nc-hero { min-height: 40vh; padding: 4rem 1rem 3rem; }
    .nc-hero-title { font-size: 2.2rem; }
    .nc-lead-img { height: 260px; }

    .nc-modal { padding: 0; align-items: flex-end; }
    .nc-modal-box {
        height: 95vh; height: 95dvh;
        border-radius: var(--nc-radius) var(--nc-radius) 0 0;
    }
    .nc-modal-content { grid-template-rows: 200px 1fr; }
    .nc-modal-scroll { padding: 1rem 1.2rem .8rem; }
    .nc-modal-nav { padding: .6rem 1rem; }
    .nc-modal-nav-btn { padding: 8px 12px; font-size: .78rem; }
    .nc-modal-nav-name { max-width: 100px; }
}
