/* Inter (SIL Open Font License 1.1, voir assets/fonts/OFL.txt), hébergée avec le site : aucun appel à un service tiers */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0B1110;
    --bg-alt: #0F1716;
    --surface: #131D1B;
    --surface-2: #192624;
    --border: #22312E;
    --border-strong: #2E423E;
    --text: #E7EFED;
    --text-secondary: #A2B4AF;
    --text-tertiary: #6E827D;
    --accent: #2DD4BF;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --accent-glow: rgba(45, 212, 191, 0.35);
    --gold: #F5C451;
    --gold-soft: rgba(245, 196, 81, 0.15);
    --raw: #7C8F8A;
    --radius: 14px;
    --radius-sm: 8px;
    --header-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
button { font: inherit; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; }

.skip-link {
    position: absolute; left: -9999px; top: 8px;
    background: var(--accent); color: var(--bg); padding: 8px 16px; border-radius: var(--radius-sm); z-index: 200;
}
.skip-link:focus { left: 8px; }

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

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.975rem; border: 1px solid transparent;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
}
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-primary { background: var(--accent); color: #062420; }
.btn-primary:hover { background: #5EEAD4; }

/* HEADER */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11, 17, 16, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.logo-short { display: none; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { white-space: nowrap; }
.nav a:not(.btn) { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; transition: color 0.15s; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"] { color: var(--accent); }

/* ACCUEIL : contenu centré dans l'écran */
.hero {
    display: flex; flex-direction: column; justify-content: center;
    min-height: calc(100vh - var(--header-height) - 70px);
    padding: 48px 0;
    text-align: center;
    background:
        radial-gradient(900px 420px at 85% 0%, rgba(45, 212, 191, 0.10), transparent 70%),
        radial-gradient(700px 360px at 0% 100%, rgba(20, 184, 166, 0.06), transparent 70%),
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 24px 24px;
}
.eyebrow { font-weight: 600; color: var(--accent); font-size: 0.95rem; margin-bottom: 14px; }
.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); white-space: nowrap; margin-bottom: 22px; }
.grad { background: linear-gradient(90deg, #5EEAD4, var(--accent) 45%, #22D3EE); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead span { display: block; }
.lead-1 { font-size: 1.15rem; color: var(--text); font-weight: 500; margin-bottom: 8px; text-wrap: balance; }
.lead-2 { font-size: 1.05rem; color: var(--text-secondary); max-width: 1000px; margin: 0 auto; text-wrap: balance; }
.frame-line { margin-top: 32px; color: var(--text-secondary); }
.hero .flow, .hero .flow-panels { text-align: left; }

/* PIPELINE */
.flow { margin-top: 48px; }
.flow-grid {
    display: grid; align-items: center; height: 300px;
    grid-template-columns: 226px minmax(0, 1fr) 230px;
}

.sources { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 10px 0; }
.src {
    display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
    border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
    font-size: 0.88rem; color: var(--text); white-space: nowrap;
}
.dots { display: inline-flex; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.dots i + i { margin-left: -2px; outline: 2px solid var(--surface); }

/* --lead : largeur réservée aux canaux avant la première station */
.core { position: relative; height: 300px; --lead: 96px; --hub: calc(var(--lead) + (100% - var(--lead)) / 8); }

.channels { position: absolute; left: 0; top: 0; height: 300px; width: calc(var(--hub) - 24px); overflow: visible; }
.channels path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.channels .pipe path { stroke: #1A2725; stroke-width: 9; }
.channels .stream path { stroke-width: 2.5; stroke-dasharray: 2 13; opacity: 0.85; animation: stream 1.3s linear infinite; }
@keyframes stream { to { stroke-dashoffset: -15; } }

.tube, .particles { position: absolute; left: var(--hub); right: -14px; top: 122px; height: 56px; }
.tube {
    border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong);
    background: linear-gradient(90deg, #172421 0%, #16302B 38%, rgba(45, 212, 191, 0.2) 80%, rgba(245, 196, 81, 0.3) 100%);
}
.particles { pointer-events: none; z-index: 1; }
.particles span {
    position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
    background: var(--raw); opacity: 0; animation: travel 5s linear infinite;
}
.particles span:nth-child(1) { animation-delay: 0s; }
.particles span:nth-child(2) { animation-delay: 0.62s; margin-top: -12px; }
.particles span:nth-child(3) { animation-delay: 1.25s; margin-top: 5px; }
.particles span:nth-child(4) { animation-delay: 1.87s; margin-top: -10px; }
.particles span:nth-child(5) { animation-delay: 2.5s; margin-top: 4px; }
.particles span:nth-child(6) { animation-delay: 3.12s; }
.particles span:nth-child(7) { animation-delay: 3.75s; margin-top: -13px; }
.particles span:nth-child(8) { animation-delay: 4.37s; margin-top: 6px; }
.particles span.reject { animation-name: reject; }
/* L'entonnoir du tri couvre ~22 à 33 % du trajet : les points y entrent gris et en ressortent
   turquoise, puis deviennent dorés en arrivant au résultat */
@keyframes travel {
    0% { left: 0; opacity: 0; background: var(--raw); box-shadow: none; }
    4% { opacity: 1; }
    25% { background: var(--raw); box-shadow: none; }
    30% { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
    88% { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
    94% { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
    98% { opacity: 1; }
    100% { left: 100%; opacity: 0; background: var(--gold); }
}
/* Écarté par le tri : il entre dans l'entonnoir et n'en ressort pas */
@keyframes reject {
    0% { left: 0; opacity: 0; }
    4% { opacity: 1; }
    26% { left: 26%; opacity: 1; }
    27%, 100% { left: 27%; opacity: 0; }
}

.stations { position: absolute; top: 0; bottom: 0; left: var(--lead); right: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); z-index: 2; }
.station {
    width: 100%; height: 100%; background: none; border: 0; cursor: pointer; color: var(--text);
    display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 122px;
}
.station-icon {
    width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px;
    background: var(--bg); border: 1.5px solid var(--accent); color: var(--accent);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s;
}
.stations li:first-child .station-icon { box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.07); }
.station-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.station-text { display: flex; flex-direction: column; align-items: inherit; }
.station-label { font-weight: 600; font-size: 0.95rem; }
.station:hover .station-icon { transform: scale(1.08); box-shadow: 0 0 0 7px var(--accent-soft); }
.station[aria-expanded="true"] .station-icon { background: var(--accent); color: #062420; box-shadow: 0 0 26px var(--accent-glow); }
.station[aria-expanded="true"] .station-label { color: var(--accent); }

/* Résultat : un mini tableau de bord doré, alimenté par le tuyau */
.result {
    position: relative; z-index: 3; align-self: center;
    padding: 14px 16px 12px; border-radius: var(--radius);
    border: 1px solid rgba(245, 196, 81, 0.5);
    background: linear-gradient(165deg, rgba(245, 196, 81, 0.13), rgba(245, 196, 81, 0.02) 70%), #101412;
    animation: glow 3s ease-in-out infinite;
}
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 rgba(245, 196, 81, 0); } 50% { box-shadow: 0 0 36px rgba(245, 196, 81, 0.22); } }
.result-kicker { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 10px; }
.result-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.rk { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rk strong { font-size: 0.86rem; white-space: nowrap; }
.ring { position: relative; width: 58px; height: 58px; }
.ring > svg:first-child { width: 58px; height: 58px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--gold-soft); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; animation: fill 4s ease-out infinite; filter: drop-shadow(0 0 4px rgba(245, 196, 81, 0.55)); }
.ring-fill-2 { animation-delay: 0.3s; }
@keyframes fill { 0% { stroke-dashoffset: 163.4; } 45%, 85% { stroke-dashoffset: 34; } 100% { stroke-dashoffset: 163.4; } }
.ring-icon { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.clock-hand { transform-box: view-box; transform-origin: 12px 12px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-chart { height: 52px; display: flex; align-items: flex-end; gap: 6px; padding: 0 2px; border-bottom: 1px solid rgba(245, 196, 81, 0.3); }
.result-chart span {
    flex: 1; height: var(--h); border-radius: 3px 3px 0 0; transform-origin: bottom;
    background: linear-gradient(180deg, #FCD86B, rgba(245, 196, 81, 0.3));
    animation: grow 4s ease-out infinite; animation-delay: var(--d);
}
@keyframes grow { 0% { transform: scaleY(0.12); opacity: 0.5; } 40%, 85% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0.12); opacity: 0.5; } }

.flow-panels { margin-top: 18px; }
.flow-panel {
    background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm); padding: 24px 28px; margin-bottom: 12px;
}
.js .flow-panel { display: none; margin-bottom: 0; }
.js .flow-panel.is-open { display: block; animation: open 0.25s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.flow-panel h3 { font-size: 1.15rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.flow-panel h3 span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; }
.flow-panel p { color: var(--text-secondary); max-width: 80ch; margin-bottom: 12px; }
.example { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.example strong { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 0.8rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* PAGES INTÉRIEURES */
.page { padding: 64px 0 88px; }
.page-title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page-lead { font-size: 1.1rem; color: var(--text-secondary); max-width: 82ch; margin-bottom: 44px; }
.page-note { margin-top: 28px; font-size: 0.85rem; color: var(--text-tertiary); }

/* PROJETS */
.featured {
    display: grid; grid-template-columns: 1.45fr 1fr; margin-bottom: 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.featured:hover, .project-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.featured-visual { background: var(--bg-alt); border-right: 1px solid var(--border); padding: 20px; display: flex; align-items: center; }
.featured-visual img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.featured-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { font-size: 1.45rem; margin-bottom: 12px; }
.featured-body > p:not(.project-context) { color: var(--text-secondary); margin-bottom: 18px; }
.featured-body .chips { margin-bottom: 20px; }

/* Gabarit du tableau de bord réel, en attendant la capture */
.dash-skeleton {
    position: relative; width: 100%; aspect-ratio: 16 / 9; display: grid; grid-template-columns: 11% 1fr; gap: 2%;
    background: #0E1514; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2%;
}
.dash-skeleton i { display: block; background: var(--surface-2); border-radius: 4px; }
.sk-side { display: flex; flex-direction: column; gap: 8%; padding-top: 30%; }
.sk-side i { height: 14%; }
.sk-main { display: grid; grid-template-rows: 6% 14% 18% 1fr; gap: 3%; }
.sk-head { background: var(--surface-2); border-radius: 4px; }
.sk-kpis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2%; }
.sk-kpis i:nth-child(2), .sk-kpis i:nth-child(3) { background: rgba(45, 212, 191, 0.18); }
.sk-pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1%; }
.sk-pipe i:nth-child(1) { background: rgba(45, 212, 191, 0.45); }
.sk-pipe i:nth-child(2) { background: rgba(45, 212, 191, 0.3); }
.sk-pipe i:nth-child(3) { background: rgba(45, 212, 191, 0.18); }
.sk-table { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6%; }
.sk-label {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    background: rgba(11, 17, 16, 0.85); border: 1px solid var(--border-strong); color: var(--text-secondary);
    font-size: 0.82rem; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, transform 0.2s;
}
.project-visual { aspect-ratio: 16 / 9; background: var(--bg-alt); border-bottom: 1px solid var(--border); overflow: hidden; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.project-visual.placeholder {
    display: grid; place-items: center; color: var(--text-tertiary); font-size: 0.85rem;
    background-image: repeating-linear-gradient(135deg, transparent 0 12px, rgba(45, 212, 191, 0.04) 12px 24px);
}
.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project-context { font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.project-body h2 { font-size: 1.2rem; margin-bottom: 8px; }
.project-body > p:not(.project-context) { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 16px; }
.more { margin-top: auto; font-weight: 600; color: var(--accent); font-size: 0.95rem; }

.more-block { margin-top: 32px; }
.more-block summary {
    cursor: pointer; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; list-style: none;
}
.more-block summary::-webkit-details-marker { display: none; }
.more-block summary::before {
    content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    border: 1.5px solid var(--accent); font-size: 1rem; line-height: 1;
}
.more-block[open] summary::before { content: "−"; }
.more-block[open] summary { margin-bottom: 20px; }

.others { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.other { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.other-thumb { flex: 0 0 120px; height: 84px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: #fff; padding: 0; }
.other-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.other figcaption { font-size: 0.92rem; color: var(--text-secondary); }
.other figcaption strong { display: block; color: var(--text); margin-bottom: 4px; }

/* À PROPOS */
.hec {
    background: linear-gradient(160deg, rgba(45, 212, 191, 0.12), rgba(45, 212, 191, 0.02));
    border: 1px solid rgba(45, 212, 191, 0.35); border-radius: var(--radius); padding: 32px; margin-bottom: 56px;
}
.hec h2 { font-size: 1.8rem; }
.hec-program { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 24px; }
.hec-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hec-courses li { background: rgba(11, 17, 16, 0.55); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.hec-courses strong { display: block; font-size: 0.95rem; line-height: 1.35; margin-bottom: 4px; }
.hec-courses .course-detail { display: block; font-size: 0.85rem; color: var(--text-secondary); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-bottom: 56px; }
.about-block h2, .skills h2 { font-size: 1.3rem; margin-bottom: 16px; }
.about-block p { color: var(--text-secondary); margin-bottom: 14px; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 1px solid var(--border-strong); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.timeline .when { font-size: 0.8rem; color: var(--text-tertiary); display: block; }
.timeline .what { font-weight: 600; }
.timeline .where { color: var(--text-secondary); font-size: 0.92rem; }
.skills-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.skill-card h3 { font-size: 1rem; margin-bottom: 12px; }
.skill-note { color: var(--text-secondary); font-size: 0.92rem; }

/* CONTACT */
.contact-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 820px; margin-top: 36px; }
.contact-item {
    display: flex; align-items: center; gap: 16px; padding: 20px 22px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color 0.2s, transform 0.2s;
}
.contact-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-icon { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-label { display: block; font-size: 0.8rem; color: var(--text-tertiary); }
.contact-value { display: block; font-weight: 600; word-break: break-word; }

/* FOOTER */
.footer { padding: 24px 0; font-size: 0.85rem; color: var(--text-tertiary); border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.footer a { color: var(--text-secondary); transition: color 0.15s; }
.footer a:hover { color: var(--accent); }

/* APPARITION AU DÉFILEMENT */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(4, 8, 7, 0.94); display: flex; align-items: center; justify-content: center; padding: 32px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); background: #fff; }
.lightbox-close { position: absolute; top: 12px; right: 20px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* RESPONSIVE */
@media (min-width: 1100px) {
    .frame-line { white-space: nowrap; }
}

@media (min-width: 1140px) {
    .lead-1 { white-space: nowrap; }
}

@media (max-width: 1080px) {
    .featured { grid-template-columns: 1fr; }
    .featured-visual { border-right: 0; border-bottom: 1px solid var(--border); }
    .skills-detail { grid-template-columns: repeat(2, 1fr); }
    .hec-courses { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

@media (max-width: 960px) {
    .hero { text-align: left; min-height: 0; }
    .lead-2 { margin: 0; }
    .hero-title { white-space: normal; }
    .flow-grid { display: flex; flex-direction: column; align-items: stretch; height: auto; gap: 20px; }
    .sources { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; height: auto; gap: 8px; padding: 0; }
    .src { width: max-content; }
    .channels { display: none; }
    .core { height: auto; }
    .stations { position: relative; left: auto; right: auto; display: flex; flex-direction: column; gap: 14px; }
    .station { flex-direction: row; align-items: center; text-align: left; padding-top: 0; gap: 16px; height: auto; }
    .station-icon { margin-bottom: 0; }
    .station-text { align-items: flex-start; }
    .tube, .particles { left: 25px; right: auto; width: 6px; top: 28px; bottom: -34px; height: auto; }
    .tube { border: 0; border-radius: 3px; background: linear-gradient(180deg, #172421 0%, #16302B 30%, rgba(45, 212, 191, 0.5) 80%, rgba(245, 196, 81, 0.6) 100%); }
    .particles span { left: 50% !important; top: 0; margin: 0 0 0 -4px !important; animation-name: travel-v; }
    .particles span.reject { animation-name: reject-v; }
    /* En vertical, l'entonnoir couvre ~15 à 36 % du trajet */
    @keyframes travel-v {
        0% { top: 0; opacity: 0; background: var(--raw); box-shadow: none; }
        4% { opacity: 1; }
        20% { background: var(--raw); box-shadow: none; }
        30% { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
        86% { background: var(--accent); }
        94% { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
        100% { top: 100%; opacity: 0; background: var(--gold); }
    }
    @keyframes reject-v {
        0% { top: 0; opacity: 0; }
        4% { opacity: 1; }
        24% { top: 24%; opacity: 1; }
        25%, 100% { top: 25%; opacity: 0; }
    }
    .result { align-self: stretch; }
    .result-kpis { max-width: 300px; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .logo-full { display: none; }
    .logo-short { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--accent); color: var(--accent); font-size: 0.9rem; }
    .header-inner { gap: 10px; }
    .nav { gap: 10px; }
    .nav a:not(.btn) { font-size: 0.84rem; }
    .nav .btn-sm { padding: 6px 10px; font-size: 0.84rem; }
    .nav a.lang { font-size: 0.75rem; padding: 2px 7px; }
    .hero { padding: 40px 0 48px; }
    .lead-1 { font-size: 1.05rem; }
    .lead-2 { font-size: 1rem; }
    .page { padding: 40px 0 64px; }
    .projects, .others, .contact-list, .skills-detail { grid-template-columns: 1fr; }
    .other { flex-direction: column; }
    .other-thumb { flex: none; width: 100%; height: 160px; }
    .flow-panel { padding: 20px; }
    .featured-body { padding: 24px; }
    .hec { padding: 22px; }
    .hec h2 { font-size: 1.4rem; }
    .sk-label { font-size: 0.72rem; }
}

@media (max-width: 380px) {
    .logo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .particles, .channels .stream { display: none; }
    .result, .clock-hand, .ring-fill, .result-chart span { animation: none; }
    .ring-fill { stroke-dashoffset: 34; }
    .js .flow-panel.is-open { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* LANGUE */
.lang { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-tertiary); border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 9px; }
.nav a.lang:hover { color: var(--accent); border-color: var(--accent); }

/* PAGE PROJET */
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 28px; }
.crumb:hover { color: var(--accent); }
.project-head { max-width: 860px; margin-bottom: 32px; }
.project-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); margin: 6px 0 14px; }
.project-head .summary { font-size: 1.12rem; color: var(--text-secondary); }

.shot { margin: 0; }
.shot button { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; transition: border-color 0.2s; }
.shot button:hover { border-color: var(--border-strong); }
.shot img { width: 100%; height: auto; }
.shot figcaption { font-size: 0.85rem; color: var(--text-tertiary); margin-top: 8px; }
.shot-detail { margin-top: 22px; }
.shot-main { margin-bottom: 40px; }

.brief { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.brief > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.brief h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
.brief p { color: var(--text-secondary); font-size: 0.97rem; }

.detail { border-top: 1px solid var(--border); }
.detail:last-of-type { border-bottom: 1px solid var(--border); }
.detail summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 1.15rem; font-weight: 600; }
.detail summary::-webkit-details-marker { display: none; }
.detail summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 500; }
.detail[open] summary::after { content: "−"; }
.detail summary:hover { color: var(--accent); }
.detail-body { padding: 0 0 28px; }
.detail-body > p { color: var(--text-secondary); max-width: 80ch; margin-bottom: 14px; }

.circuit { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; margin: 8px 0 4px; counter-reset: step; }
.circuit li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; counter-increment: step; }
.circuit li::before { content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.8rem; font-weight: 700; margin-bottom: 10px; }
.circuit li:not(:last-child)::after { content: ""; position: absolute; top: 28px; right: -12px; width: 10px; height: 10px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
.circuit strong { display: block; margin-bottom: 4px; font-size: 0.97rem; }
.circuit span { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; display: block; }
.circuit .is-final { border-color: rgba(245, 196, 81, 0.5); }
.circuit .is-final::before { background: var(--gold-soft); color: var(--gold); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.facts { display: grid; gap: 10px; max-width: 86ch; }
.facts li { position: relative; padding-left: 20px; color: var(--text-secondary); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.facts strong { color: var(--text); font-weight: 600; }

.project-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; }
.project-foot a { color: var(--accent); font-weight: 600; }

@media (max-width: 960px) {
    .brief, .gallery { grid-template-columns: 1fr; }
    .circuit { grid-auto-flow: row; }
    .circuit li:not(:last-child)::after { top: auto; bottom: -12px; right: auto; left: 22px; transform: rotate(135deg); }
}
/* MENTIONS LÉGALES */
.legal { max-width: 780px; }
.legal section { padding: 26px 0; border-top: 1px solid var(--border); }
.legal h2 { font-size: 1.15rem; margin-bottom: 12px; }
.legal p { color: var(--text-secondary); }
.legal p + p { margin-top: 10px; }
.legal a { color: var(--accent); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; }
.legal dt { color: var(--text-tertiary); }
.legal dd { color: var(--text-secondary); }
@media (max-width: 640px) {
    .legal dl { grid-template-columns: 1fr; gap: 0; }
    .legal dd { margin-bottom: 10px; }
}

/* Outils d'une page projet */
.project-tools { margin-top: 40px; }
.project-tools h2 { font-size: 1.1rem; margin-bottom: 12px; }
