/* ==========================================================================
   Benoît Glineur — portfolio
   Direction : façade de console de studio. Peinture graphite, sérigraphie
   claire, un seul voyant orange. La console du hero est l'élément fort,
   le reste reste sobre et lisible.
   ========================================================================== */

/* ---------- Polices (hébergées localement, aucun appel à Google) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/permanent-marker-latin-400-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
    --paint:      #272A2F;   /* peinture de la console */
    --paint-2:    #2F3338;   /* surfaces */
    --paint-3:    #393D43;   /* surfaces relevées */
    --rule:       #474C53;   /* filets */
    --legend:     #ECE9E2;   /* sérigraphie / texte principal */
    --muted:      #B0B3B7;   /* texte secondaire */
    --faint:      #9DA1A6;   /* petites mentions */
    --signal:     #FF6B00;   /* le voyant — orange d'origine */
    --signal-ink: #FF8A3D;   /* orange lisible sur fond sombre */
    --on-signal:  #140A02;
    --tape:       #E8DFC6;   /* scotch de régie */
    --tape-ink:   #22201C;
    --led-off:    #121315;
    --metal-a:    #464B52;
    --metal-b:    #2E3236;

    --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    --f-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
    --f-hand: "Permanent Marker", "Comic Sans MS", cursive;

    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --radius: 3px;
    --radius-ios: 14px;   /* boutons et cartes cliquables, coins façon iPhone */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* entrées et sorties */
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* panneau qui monte, façon iOS */
    color-scheme: dark;
}
html.light {
    --paint:      #E4E5E3;
    --paint-2:    #EFF0EE;
    --paint-3:    #F8F8F6;
    --rule:       #C7CACB;
    --legend:     #18191B;
    --muted:      #4E5257;
    --faint:      #5E6268;
    --signal-ink: #A84300;
    --on-signal:  #140A02;
    --led-off:    #CDD0D2;
    --metal-a:    #D9DBDC;
    --metal-b:    #BFC2C4;
    color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    background: var(--paint);
    color: var(--legend);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: -0.005em; }
::selection { background: var(--signal); color: var(--on-signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip {
    position: absolute; left: 8px; top: -60px; z-index: 100;
    background: var(--signal); color: var(--on-signal); padding: 10px 14px; font-weight: 600;
}
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Barre du haut ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paint) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.01em; }
.brand-mark {
    display: inline-grid; place-items: center; width: 30px; height: 30px;
    background: var(--signal); color: var(--on-signal);
    font-size: 0.85rem; font-weight: 700; border-radius: 8px;   /* comme une icône d’app */
}
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 0.97rem; color: var(--muted); padding: 6px 0; transition: color .2s; }
.nav-links a:hover { color: var(--legend); }
.nav-links .btn { padding: 0 20px; gap: 10px; color: var(--legend); }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 40px; height: 40px; display: inline-grid; place-items: center;
    background: transparent; border: 1px solid var(--rule); border-radius: 12px;
    transition: border-color .2s, transform .15s;
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 18px; height: 18px; }
#hamburger { display: none; }
html.dark #icon-moon, html.light #icon-sun { display: none; }
#mobile-menu { display: none; border-top: 1px solid var(--rule); }
#mobile-menu.open { display: block; }
#mobile-menu ul { list-style: none; margin: 0; padding: 8px 0; }
#mobile-menu a { display: block; padding: 12px var(--gutter); text-decoration: none; font-weight: 500; }
@media (max-width: 860px) {
    .nav-links { display: none; }
    #hamburger { display: inline-grid; }
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 48px; padding: 0 22px;
    font-family: var(--f-head); font-weight: 600; font-size: 1.08rem; letter-spacing: 0.02em;
    text-decoration: none; border-radius: 999px;
    border: 1px solid var(--rule); background: transparent;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.btn:active, .icon-btn:active, .contact-link:active, .archive-index a:active { transform: scale(.97); }
.btn:hover { border-color: var(--legend); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn-primary:hover { background: #FF7E1F; border-color: #FF7E1F; }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 1.08rem; }

/* ---------- Voyant (remplace les points qui pulsent) ---------- */
.lamp {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--signal);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--signal) 22%, transparent), 0 0 8px color-mix(in srgb, var(--signal) 70%, transparent);
}

/* ---------- Titres de section ---------- */
.section { padding: clamp(48px, 6vw, 76px) 0; border-top: 1px solid var(--rule); }
.kicker { font-family: var(--f-head); font-weight: 500; font-size: 1.1rem; color: var(--signal-ink); margin: 0 0 10px; }
.section-title { font-size: clamp(2.4rem, 5.5vw, 4rem); text-transform: none; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-tags { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero-tags li { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-head); font-weight: 500; font-size: 1.08rem; color: var(--muted); }
.hero-tags li:first-child { color: var(--legend); }
@media (max-width: 560px) {
    .hero-tags { flex-direction: column; gap: 6px; }   /* une étiquette par ligne sur téléphone */
}

.hero-title {
    font-size: clamp(3.2rem, 6.6vw, 5.8rem);
    line-height: 0.92;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}
.hero-title .line { display: block; }
.hero-title .line-2 { padding-left: 0.5em; }
.hero-title .line-3 { padding-left: 1em; }
.hero-sub { color: var(--muted); font-size: clamp(1.08rem, 1.6vw, 1.22rem); max-width: 34em; margin-bottom: 32px; }
.hero-sub em { color: var(--legend); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: 0.98rem; }
.hero-meta > * { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--signal-ink); flex: none; }
.hero-meta a { text-decoration: none; }
.hero-meta a:hover { color: var(--legend); text-decoration: underline; text-underline-offset: 3px; }

/* Halo du voyant derrière le titre */
.hero { position: relative; isolation: isolate; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(70% 40% at 90% 18%, color-mix(in srgb, var(--signal) 16%, transparent), transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
            mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
}
/* Titre : la 2e ligne gravée en creux, la 3e allumée */
.hero-title .line-2 { color: transparent; -webkit-text-stroke: 1.5px var(--legend); }
.hero-title .line-3 { color: var(--signal-ink); }
@media (max-width: 560px) {
    .hero-title { font-size: clamp(3.2rem, 14.5vw, 4.6rem); }
}
/* Mise sous tension : les lignes du titre montent une à une */
.hero-title .line { animation: hero-line 700ms var(--ease-out) both; }
.hero-title .line-2 { animation-delay: 90ms; }
.hero-title .line-3 { animation-delay: 180ms; }
.hero-tags .lamp { animation: led-on 600ms var(--ease-out) 350ms both; }
@keyframes hero-line { from { opacity: 0; transform: translateY(0.35em); } }
@media (prefers-reduced-motion: reduce) {
    .hero-title .line { animation-name: hero-fade; animation-duration: 300ms; }
    .hero-tags .lamp { animation: none; }
}
@keyframes hero-fade { from { opacity: 0; } }

/* ---------- La console ---------- */
.console {
    position: relative;
    justify-self: center;
    width: min(100%, 470px);
    padding: 26px clamp(18px, 4vw, 34px) 30px;
    border-radius: 6px;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, var(--metal-a), var(--metal-b));
    border: 1px solid rgba(0,0,0,0.55);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(0,0,0,0.4),
        0 30px 60px -20px rgba(0,0,0,0.65);
}
html.light .console { border-color: #9DA1A4; box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 24px 50px -24px rgba(0,0,0,0.35); }
.screw {
    position: absolute; width: 10px; height: 10px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #8B9097, #43474D 70%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.45);
}
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4.5px; height: 1px; background: rgba(0,0,0,0.6); transform: rotate(-30deg); }
.screw.tl { top: 9px; left: 9px; } .screw.tr { top: 9px; right: 9px; }
.screw.bl { bottom: 9px; left: 9px; } .screw.br { bottom: 9px; right: 9px; }

.console-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 10px 14px; margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.35);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.console-model { font-family: var(--f-head); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: #C9CBCE; }
html.light .console-model { color: #3A3D41; }

.console-strips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strip { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 2px; }
.strip + .strip { border-left: 1px solid rgba(0,0,0,0.28); box-shadow: inset 1px 0 0 rgba(255,255,255,0.04); }
.strip-num { font-family: var(--f-head); font-weight: 600; font-size: 0.8rem; color: #9EA2A7; letter-spacing: 0.1em; }
html.light .strip-num { color: #50545A; }
.strip-body { display: flex; align-items: flex-end; gap: 30px; }

.vu-meter {
    width: 7px; height: 200px;
    display: flex; flex-direction: column-reverse; gap: 2px; padding: 2px;
    background: #0A0B0C; border-radius: 1px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6);
}
.led { width: 100%; flex: 1; background: var(--led-off); }
html.light .vu-meter { background: #2A2D31; }
html.light .led:not(.g):not(.o):not(.r) { background: #3A3D41; }
.led.g { background: #3BE36B; box-shadow: 0 0 4px rgba(59,227,107,0.6); }
.led.o { background: #FFB020; box-shadow: 0 0 4px rgba(255,176,32,0.6); }
.led.r { background: #FF3B30; box-shadow: 0 0 6px rgba(255,59,48,0.75); }

.fader-track {
    position: relative; width: 6px; height: 200px;
    background: #0B0C0D; border-radius: 3px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.06);
    cursor: pointer; touch-action: none;
}
.fader-scale {
    position: absolute; top: 0; bottom: 0; left: -19px; width: 8px; pointer-events: none;
    background: repeating-linear-gradient(to top, #8D9197 0 1px, transparent 1px 20px);
    opacity: .55;
}
html.light .fader-scale { background: repeating-linear-gradient(to top, #4B4F55 0 1px, transparent 1px 20px); }
.fader-knob {
    position: absolute; left: 50%; bottom: 90%;
    width: 34px; height: 46px;
    transform: translate(-50%, 50%);
    border-radius: 3px;
    background:
        repeating-linear-gradient(180deg, rgba(255,255,255,0.07) 0 2px, rgba(0,0,0,0.18) 2px 4px),
        linear-gradient(180deg, #4A4E54, #2A2D31);
    border: 1px solid #111;
    box-shadow: 0 6px 10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.18);
    cursor: grab; touch-action: none; user-select: none; z-index: 2;
}
.fader-knob::after {
    content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 3px; margin-top: -1.5px;
    background: var(--signal);
    box-shadow: 0 0 8px color-mix(in srgb, var(--signal) 80%, transparent);
}
.fader-knob:active { cursor: grabbing; }
.fader-knob:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* Bande de scotch annotée au marqueur */
.scribble {
    display: block; min-width: 76px; text-align: center;
    padding: 5px 6px 4px;
    background: var(--tape); color: var(--tape-ink);
    font-family: var(--f-hand); font-size: 0.95rem; line-height: 1.1;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.35);
    user-select: none;
}
.strip:nth-child(1) .scribble { transform: rotate(-1.6deg); }
.strip:nth-child(2) .scribble { transform: rotate(1deg); }
.strip:nth-child(3) .scribble { transform: rotate(-0.6deg); }
.strip:nth-child(4) .scribble { transform: rotate(1.8deg); }

@media (max-width: 420px) {
    .vu-meter, .fader-track { height: 170px; }
    .strip-body { gap: 22px; }
    .fader-scale { left: -15px; width: 6px; }
    .fader-knob { width: 28px; height: 40px; }
    .scribble { min-width: 0; width: 100%; font-size: 0.82rem; }
}

/* ---------- Bandeau chiffres (afficheurs) ---------- */
.readouts { border-top: 1px solid var(--rule); background: var(--paint-2); }
.readouts dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.readout { padding: 28px 20px 26px; display: flex; flex-direction: column-reverse; gap: 6px; }
.readout + .readout { border-left: 1px solid var(--rule); }
.readout dd { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: clamp(2.4rem, 4.6vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.readout dt { color: var(--muted); font-size: 0.98rem; line-height: 1.35; }
@media (max-width: 760px) {
    .readouts dl { grid-template-columns: repeat(2, 1fr); }
    .readout:nth-child(3) { border-left: 0; }
    .readout:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* ==========================================================================
   À PROPOS
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 88px); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.facts { margin: 36px 0 0; display: grid; gap: 18px; }
.facts div { border-left: 2px solid var(--signal); padding-left: 14px; }
.facts dt { color: var(--faint); font-size: 0.92rem; }
.facts dd { margin: 2px 0 0; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.lead { font-family: var(--f-head); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.22; margin-bottom: 28px; }
.prose { color: var(--muted); max-width: 66ch; margin-bottom: 1.1em; }
.prose strong, .looking strong { color: var(--legend); font-weight: 600; }
.looking {
    margin: 36px 0; padding: 22px 24px;
    background: var(--paint-2); border: 1px solid var(--rule); border-left: 3px solid var(--signal);
}
.looking h3 { font-size: 1.25rem; margin-bottom: 8px; }
.looking div { color: var(--muted); max-width: 66ch; }
.quote { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; max-width: 22em; }

/* ==========================================================================
   PASSIONS
   ========================================================================== */
.passions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 40px); }
@media (max-width: 720px) { .passions { grid-template-columns: 1fr; } }
.passion img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; background: var(--paint-2); }
.passion h3 { font-size: clamp(1.6rem, 2.4vw, 1.95rem); margin-bottom: 10px; }
.passion-desc { color: var(--muted); max-width: 62ch; }
.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
    font-size: 0.9rem; font-weight: 500; line-height: 1;
    padding: 7px 10px; border-radius: 2px;
    background: var(--paint-3); border: 1px solid var(--rule); color: var(--legend);
}

/* ==========================================================================
   COMPÉTENCES
   ========================================================================== */
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 7vw, 96px); }
@media (max-width: 860px) { .skills-grid { grid-template-columns: 1fr; } }
.sub-title { font-size: 1.45rem; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.skill { margin-bottom: 22px; }
.skill-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.skill-label { font-weight: 500; }
.skill-pct { font-family: var(--f-head); font-weight: 600; font-size: 1.1rem; color: var(--signal-ink); font-variant-numeric: tabular-nums; }
/* Barre segmentée façon afficheur LED */
.seg { position: relative; height: 10px; background: var(--paint-3); border-radius: 1px; overflow: hidden; }
.seg-fill {
    position: absolute; inset: 0 auto 0 0; width: var(--pct);
    background: var(--signal);
    transform-origin: left; transform: scaleX(0);
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.seg::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 2px), var(--paint) calc(5% - 2px) 5%);
}
.is-on .seg-fill { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .seg-fill { transition: none; } }
.tools { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { padding: 8px 12px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paint-2); font-weight: 500; font-size: 0.97rem; }
.softs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.softs li { display: flex; align-items: center; gap: 10px; }
.softs li::before { content: ""; width: 6px; height: 6px; background: var(--signal); border-radius: 1px; flex: none; }
.profile { margin-top: 40px; padding: 22px 24px; background: var(--paint-2); border: 1px solid var(--rule); border-left: 3px solid var(--signal); }
.profile h3 { font-size: 1.25rem; margin-bottom: 8px; }
.profile p { color: var(--muted); }

/* ==========================================================================
   PARCOURS
   ========================================================================== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.tl-item { position: relative; padding: 0 0 clamp(40px, 5vw, 56px) 40px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 8px 40px; }
.tl-item:last-child { padding-bottom: 0; }
@media (max-width: 760px) { .tl-item { grid-template-columns: 1fr; } }
.timeline::after {
    content: ""; position: absolute; left: 4.5px; top: 8px; width: 2px;
    height: calc((100% - 16px) * var(--progress, 0));
    background: var(--signal);
    box-shadow: 0 0 8px color-mix(in srgb, var(--signal) 60%, transparent);
}
.tl-dot { position: absolute; z-index: 1; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--paint); border: 2px solid var(--signal); transition: background .3s, box-shadow .3s; }
.tl-item.is-lit .tl-dot { background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 25%, transparent), 0 0 10px var(--signal); }
@media (prefers-reduced-motion: reduce) { .tl-dot { transition: none; } }
.tl-period { font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.tl-company { color: var(--muted); }
.tl-badge { display: inline-block; margin-top: 6px; font-size: 0.85rem; font-weight: 600; padding: 3px 8px; background: var(--signal); color: var(--on-signal); border-radius: 2px; }
.tl-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 10px; }
.tl-desc { color: var(--muted); max-width: 66ch; }
.tl-points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; max-width: 66ch; }
.tl-points li { position: relative; padding-left: 20px; }
.tl-points li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 9px; height: 1px; background: var(--signal-ink); }

/* ==========================================================================
   EXPERTISES
   ========================================================================== */
.cases-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) clamp(20px, 3vw, 32px); }
@media (max-width: 1080px) { .cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .cases-grid { grid-template-columns: 1fr; } }
.case-card { display: flex; flex-direction: column; cursor: pointer; }
.case-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; background: var(--paint-2); transition: filter .25s; }
.case-card:hover img { filter: brightness(1.08); }

.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; color: var(--muted); font-size: 0.95rem; }
.case-num { font-family: var(--f-head); font-weight: 700; color: var(--signal-ink); font-variant-numeric: tabular-nums; }
.case-tag { padding: 3px 8px; border: 1px solid var(--rule); border-radius: 2px; font-weight: 500; color: var(--legend); }
.case-card h3 { font-size: clamp(1.7rem, 2.4vw, 2.1rem); text-transform: uppercase; letter-spacing: 0.005em; }
.case-sub { color: var(--muted); font-weight: 500; margin: 2px 0 12px; }
.case-desc { color: var(--muted); max-width: 62ch; margin-bottom: 16px; }
.link-btn {
    align-self: flex-start; justify-self: start; margin-top: auto;
    padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--signal-ink);
    color: var(--legend); font-family: var(--f-head); font-weight: 600; font-size: 1.1rem; letter-spacing: 0.02em;
}
.link-btn:hover { color: var(--signal-ink); }
.center { text-align: center; margin-top: clamp(40px, 5vw, 64px); }

/* ---------- Vue détaillée ---------- */
.view { display: none; }
.view.active { display: block; }
.details { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 9vw, 112px); }   /* garde la marge latérale de .wrap */
.back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 0; margin-bottom: 40px; font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; color: var(--signal-ink); }
.back:hover { color: var(--legend); }
.details-intro { color: var(--muted); margin: 14px 0 0; }
.archive-index ol { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .archive-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .archive-index ol { grid-template-columns: 1fr; gap: 8px; } }
/* Grand écran : le sommaire occupe la place libre à droite du titre */
@media (min-width: 1100px) {
    .details-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
    .details-head .archive-index ol { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.archive-index a { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; height: 100%; padding: 10px; background: var(--paint-2); border: 1px solid var(--rule); border-radius: var(--radius-ios); color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.archive-index a:hover { border-color: var(--signal); transform: translateY(-2px); }
.archive-index img { width: 76px; height: 52px; object-fit: cover; border-radius: 9px; }
.archive-index a > span { display: flex; flex-direction: column; min-width: 0; }
.ai-num { font-family: var(--f-head); font-weight: 500; font-size: .95rem; color: var(--signal-ink); }
.ai-title { font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; line-height: 1.1; text-transform: uppercase; color: var(--legend); }
.ai-tag { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .archive-index a { transition: none; } .archive-index a:hover, .btn:active, .icon-btn:active, .contact-link:active, .archive-index a:active { transform: none; } }
.archive { padding: clamp(48px, 6vw, 72px) 0; border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.archive:first-of-type { margin-top: clamp(40px, 5vw, 64px); }
.archive-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(24px, 5vw, 56px); margin-bottom: clamp(28px, 4vw, 44px); align-items: start; }
@media (max-width: 800px) { .archive-head { grid-template-columns: 1fr; } }
.archive-head h3 { font-size: clamp(2rem, 3.6vw, 2.8rem); text-transform: uppercase; margin: 6px 0 14px; }
.archive-head img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--radius); background: var(--paint-2); }
.archive-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
@media (max-width: 900px) { .archive-cols { grid-template-columns: 1fr; } }
.archive-cols h4 { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--signal); display: inline-block; }
.archive-cols div div { color: var(--muted); }
.archive-cols strong { color: var(--legend); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-wrap { max-width: 920px; }
.contact-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 32px; }
@media (max-width: 760px) { .contact-links { grid-template-columns: 1fr; } }
.contact-link {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    border: 1px solid var(--rule); border-radius: var(--radius-ios); background: var(--paint-2);
    text-decoration: none; transition: border-color .2s, transform .15s;
}
.contact-link:hover { border-color: var(--signal); }
.contact-link svg { width: 20px; height: 20px; color: var(--signal-ink); flex: none; }
.contact-link small { display: block; color: var(--faint); font-size: 0.88rem; }
.contact-link span span { font-weight: 500; overflow-wrap: anywhere; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; padding: clamp(22px, 4vw, 40px); background: var(--paint-2); border: 1px solid var(--rule); border-radius: 20px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.97rem; }
.field label .opt { color: var(--faint); font-weight: 400; }
.inp {
    width: 100%; font: inherit; color: var(--legend);
    background: var(--paint); border: 1px solid var(--rule); border-radius: 12px;
    padding: 12px 14px; min-height: 48px;
    transition: border-color .2s;
}
.inp::placeholder { color: var(--faint); opacity: 1; }
.inp:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 1px var(--signal); }
textarea.inp { resize: vertical; min-height: 140px; }
.form .btn-primary { grid-column: 1 / -1; justify-content: center; }
.form .btn-primary[disabled] { opacity: .7; cursor: progress; }
.form-note { grid-column: 1 / -1; margin: 0; color: var(--faint); font-size: 0.92rem; }
.form-note a { color: var(--legend); }

#notif {
    position: fixed; right: 16px; bottom: 16px; z-index: 90;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-radius: var(--radius-ios);
    background: var(--legend); color: var(--paint); font-weight: 600;
    transform: translateY(calc(100% + 32px)); visibility: hidden;
    transition: transform .35s ease, visibility 0s linear .35s;
}
#notif.show { transform: translateY(0); visibility: visible; transition: transform .35s ease; }
#notif svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { #notif { transition: none; } }

/* ==========================================================================
   PIED DE PAGE
   ========================================================================== */
.footer { border-top: 1px solid var(--rule); padding: 36px 0 44px; color: var(--faint); font-size: 0.95rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--legend); text-decoration: underline; text-underline-offset: 3px; }
.ai-note { margin: 20px 0 0; max-width: 80ch; }

/* ==========================================================================
   PAGE MENTIONS LÉGALES
   ========================================================================== */
.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 104px); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin-bottom: 12px; }
.legal h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 52px 0 14px; padding-top: 24px; border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.legal h3 { font-size: 1.3rem; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--muted); max-width: 70ch; }
.legal strong { color: var(--legend); font-weight: 600; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--legend); text-underline-offset: 3px; }
.legal .updated { color: var(--faint); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.legal dt { color: var(--faint); }
.legal dd { margin: 0; color: var(--legend); }
@media (max-width: 560px) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-bottom: 8px; } }
.todo { background: #FFE58A; color: #3A2C00; padding: 0 4px; border-radius: 2px; font-weight: 600; }

/* ==========================================================================
   IMPRESSION
   ========================================================================== */
@media print {
    body { background: #fff; color: #111; }
    .topbar, #notif, .console, .footer ul, .hero-actions, .skip, #details-view, .center, .link-btn { display: none !important; }
    .section { padding: 24px 0; break-inside: avoid; }
    .hero-grid { grid-template-columns: 1fr; }
    .prose, .passion-desc, .tl-desc, .case-desc, .hero-sub { color: #333; }
}

/* ==========================================================================
   ASSISTANT IA
   ========================================================================== */
.chat-launcher {
    position: fixed; right: 20px; bottom: 20px; z-index: 80;
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 48px; padding: 0 18px;
    background: var(--paint-3); color: var(--legend);
    border: 1px solid var(--rule); border-radius: 999px;
    font-family: var(--f-head); font-weight: 600; font-size: 1.08rem; letter-spacing: 0.02em;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,0.55);
    transition: border-color .2s, transform .2s;
}
.chat-launcher:hover { border-color: var(--signal); }
.chat-launcher.is-open { border-color: var(--signal); }
.chat-launcher[hidden] { display: none; }
.chat-panel {
    position: fixed; right: 20px; bottom: 80px; z-index: 85;
    width: min(390px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px));
    display: flex; flex-direction: column;
    background: var(--paint-2); border: 1px solid var(--rule); border-radius: 20px;
    box-shadow: 0 24px 60px -18px rgba(0,0,0,0.6);
    overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); background: var(--paint-3); }
.chat-title { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }
.chat-sub { color: var(--muted); font-size: 0.88rem; display: flex; align-items: center; gap: 7px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 0.97rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.bot { align-self: flex-start; background: var(--paint-3); border: 1px solid var(--rule); border-bottom-left-radius: 3px; }
.chat-msg.user { align-self: flex-end; background: var(--signal); color: var(--on-signal); border-bottom-right-radius: 3px; }
.chat-msg.typing { color: var(--muted); font-style: italic; }
.chat-msg.refused { border-color: color-mix(in srgb, var(--signal) 45%, var(--rule)); }
.chat-msg.error { color: var(--muted); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-suggest[hidden] { display: none; }
.chat-suggest button { padding: 7px 11px; border-radius: 999px; background: transparent; border: 1px solid var(--rule); color: var(--legend); font-size: 0.9rem; font-weight: 500; }
.chat-suggest button:hover { border-color: var(--signal); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--rule); }
.chat-form .inp { min-height: 44px; }
.chat-send { min-height: 44px; padding: 0 14px; }
.chat-send[disabled] { opacity: .55; cursor: progress; }
.chat-note { margin: 0; padding: 0 16px 12px; color: var(--faint); font-size: 0.8rem; line-height: 1.4; }
.chat-note a { color: var(--legend); }
@media (max-width: 560px) {
    .chat-launcher { right: 12px; bottom: 12px; }
    .chat-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 82vh; border-radius: 20px 20px 0 0; }
}
@media print { .chat-launcher, .chat-panel { display: none !important; } }

/* ==========================================================================
   ANIMATIONS (une fois par visite, transform/opacity uniquement)
   ========================================================================== */
/* Surtitres de section : une LED s'allume quand la section arrive à l'écran */
.section .kicker::before {
    content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; vertical-align: 0.12em;
    border-radius: 50%; background: var(--signal);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--signal) 22%, transparent), 0 0 8px color-mix(in srgb, var(--signal) 70%, transparent);
}
.power-anim .section .kicker::before { opacity: .18; }
.power-anim .section.is-lit .kicker::before { animation: led-on 420ms var(--ease-out) 120ms both; }
@keyframes led-on { 0% { opacity: .18; } 35% { opacity: 1; } 50% { opacity: .45; } 100% { opacity: 1; } }

/* Cartes Expertises : les voies s'allument une à une */
.power-anim .case-card { opacity: 0; transform: translateY(12px); }
.power-anim #expertise-grid.is-lit .case-card {
    opacity: 1; transform: none;
    transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 60ms);
}
.power-anim #expertise-grid.is-lit .case-num { animation: led-on 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 200ms); }

/* Portfolio ↔ Rapports : fondu au lieu d'un saut */
.views-anim .view.active { transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
@starting-style { .views-anim .view.active { opacity: 0; transform: translateY(8px); } }

/* Assistant : la fenêtre sort du bouton et y retourne */
.chat-panel {
    transform-origin: bottom right;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), display 220ms allow-discrete;
}
.chat-panel[hidden] { opacity: 0; transform: scale(.96) translateY(8px); }
@starting-style { .chat-panel:not([hidden]) { opacity: 0; transform: scale(.96) translateY(8px); } }
@media (max-width: 560px) {
    .chat-panel { transition-duration: 320ms; transition-timing-function: var(--ease-drawer); }
    .chat-panel[hidden] { opacity: 1; transform: translateY(100%); }
    @starting-style { .chat-panel:not([hidden]) { opacity: 1; transform: translateY(100%); } }
}

/* Assistant : chaque nouvelle bulle se pose en douceur */
.chat-msg { transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
@starting-style { .chat-msg { opacity: 0; transform: translateY(6px); } }

/* Menu téléphone : descend légèrement en s'ouvrant */
#mobile-menu.open ul { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
@starting-style { #mobile-menu.open ul { opacity: 0; transform: translateY(-8px); } }

/* Réduire les animations : on garde les fondus, on retire les déplacements et le clignotement */
@media (prefers-reduced-motion: reduce) {
    .power-anim .case-card, .chat-panel[hidden] { transform: none; }
    .power-anim #expertise-grid.is-lit .case-card { transition: opacity 200ms ease; transition-delay: 0ms; }
    .power-anim .section.is-lit .kicker::before, .power-anim #expertise-grid.is-lit .case-num { animation: none; opacity: 1; }
    .views-anim .view.active, .chat-msg, #mobile-menu.open ul { transition: opacity 200ms ease; }
    @starting-style { .views-anim .view.active, .chat-msg, #mobile-menu.open ul, .chat-panel:not([hidden]) { transform: none; } }
}
@media print { .power-anim .case-card { opacity: 1; transform: none; } }

/* ==========================================================================
   ICÔNES ANIMÉES (2026-11-09)
   ========================================================================== */
/* Menu : les trois traits se croisent en ✕ */
.hb path { transform-origin: 12px 12px; transition: transform 300ms var(--ease-out), opacity 200ms var(--ease-out), stroke-dasharray 300ms var(--ease-out); }
.hb-3 { stroke-dasharray: 10 16; }
#hamburger[aria-expanded="true"] .hb-1 { transform: rotate(45deg) translateY(5px); }
#hamburger[aria-expanded="true"] .hb-2 { opacity: 0; transform: scaleX(.2); }
#hamburger[aria-expanded="true"] .hb-3 { stroke-dasharray: 16 0; transform: rotate(-45deg) translateY(-5px); }
#hamburger[aria-expanded="true"] { border-color: var(--signal); }

/* Flèche « défiler » : en bas de l'écran d'accueil, disparaît dès qu'on descend */
.scroll-cue {
    position: fixed; left: 50%; bottom: 18px; z-index: 70;
    width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center;
    border: 1px solid var(--rule); border-radius: 999px;
    background: color-mix(in srgb, var(--paint) 80%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: var(--signal-ink);
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s linear 0s;
    animation: cue-in 600ms var(--ease-out) 900ms both;
}
.scroll-cue svg { width: 22px; height: 22px; }
.scroll-cue .cue-1 { animation: cue-chevron 1.6s var(--ease-out) infinite; }
.scroll-cue .cue-2 { animation: cue-chevron 1.6s var(--ease-out) 150ms infinite; }
.scrolled .scroll-cue { opacity: 0; transform: translateY(10px); visibility: hidden; pointer-events: none; transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s linear 300ms; }
@keyframes cue-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes cue-chevron { 0%, 100% { opacity: .25; transform: translateY(-2px); } 40% { opacity: 1; transform: translateY(2px); } }

/* Retour en haut : apparaît après un écran de défilement, la flèche décolle au clic */
.to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 80;
    width: 48px; height: 48px; display: grid; place-items: center;
    background: var(--paint-3); color: var(--legend);
    border: 1px solid var(--rule); border-radius: 999px;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,0.55);
    opacity: 0; transform: translateY(16px) scale(.9); visibility: hidden;
    transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), border-color .2s, visibility 0s linear 250ms;
}
.to-top.show { opacity: 1; transform: none; visibility: visible; transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), border-color .2s; }
.to-top:hover { border-color: var(--signal); color: var(--signal-ink); }
.to-top:hover svg { transform: translateY(-2px); }
.to-top svg { width: 20px; height: 20px; transition: transform 200ms var(--ease-out); }
.to-top.launch svg { animation: top-launch 550ms var(--ease-out); }
@keyframes top-launch { 0% { transform: none; } 45% { transform: translateY(-26px); opacity: 0; } 46% { transform: translateY(18px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.chat-launcher:not([hidden]) ~ .to-top { bottom: 80px; }
@media (max-width: 560px) {
    .to-top { right: 12px; bottom: 12px; }
    .chat-launcher:not([hidden]) ~ .to-top { bottom: 72px; }
}

/* Notification : le cercle puis la coche se dessinent ; croix si erreur */
.notif-icon { width: 22px !important; height: 22px !important; flex: none; }
.notif-ring, .notif-ok, .notif-err { stroke-dasharray: 1; stroke-dashoffset: 1; }
.notif-err { display: none; }
#notif.is-error .notif-ok { display: none; }
#notif.is-error .notif-err { display: inline; }
#notif.show .notif-ring { animation: draw 450ms var(--ease-out) 250ms forwards; }
#notif.show .notif-ok, #notif.show .notif-err { animation: draw 350ms var(--ease-out) 600ms forwards; }
#notif.is-error .notif-ring { stroke: #FF3B30; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    .hb path, .to-top, .to-top.show, .scroll-cue, .scrolled .scroll-cue { transition-duration: 1ms; }
    .scroll-cue, .scroll-cue .cue-1, .scroll-cue .cue-2, .to-top.launch svg { animation: none; }
    .notif-ring, .notif-ok, .notif-err, #notif.show .notif-ring, #notif.show .notif-ok, #notif.show .notif-err { animation: none; stroke-dashoffset: 0; }
}
@media print { .scroll-cue, .to-top { display: none !important; } }
/* La flèche se cache sous le menu ouvert ; sur téléphone, elle laisse le centre si l'assistant est affiché */
html:has(#mobile-menu.open) .scroll-cue { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 560px) {
    html:has(.chat-launcher:not([hidden])) .scroll-cue { left: var(--gutter); margin-left: 0; bottom: 14px; }
}

/* ==========================================================================
   DOMAINES (sans pourcentage) ET FORMATION — 2026-11-10
   ========================================================================== */
.domains { list-style: none; margin: 0; padding: 0; }
.domains li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 500; font-size: 1.08rem; }
.domains li:first-child { padding-top: 0; }
.domains .lamp { flex: none; }

.formation { margin-top: clamp(48px, 6vw, 72px); }
.formation-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 40px); }
@media (max-width: 760px) { .formation-list { grid-template-columns: 1fr; } }
.formation-list li { border-left: 2px solid var(--signal); padding-left: 16px; }
.formation-list h4 { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; line-height: 1.2; margin: 0 0 4px; }
.formation-list p { margin: 0; color: var(--muted); max-width: 60ch; }
.formation-list .fo-school { color: var(--legend); font-weight: 500; margin-bottom: 6px; }

/* ---------- Portrait du hero (2026-11-10) : à droite des étiquettes sur téléphone, à gauche sur grand écran ---------- */
.hero-top { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }
.hero-top .hero-tags { margin: 0; }
.hero-top:has(.hero-portrait) .hero-tags { flex-direction: column; gap: 6px; }
.hero-portrait {
    flex: none; width: 108px; height: 108px; box-sizing: border-box;
    border-radius: 50%; object-fit: cover; object-position: 50% 22%;
    padding: 3px; border: 2px solid var(--signal); background: var(--paint);
    box-shadow: 0 0 22px color-mix(in srgb, var(--signal) 28%, transparent);
}
@media (max-width: 560px) {
    .hero-top { justify-content: space-between; }
    .hero-portrait { order: 2; width: 112px; height: 112px; }
}
@media print { .hero-portrait { box-shadow: none; } }

/* Tablette et ordinateur (2026-11-10, v3) : petit portrait aligné sur la ligne des étiquettes. La console n'est pas touchée. */
@media (min-width: 561px) {
    .hero-top { gap: 16px; }
    .hero-top:has(.hero-portrait) .hero-tags { flex-direction: row; gap: 8px 22px; }
    .hero-portrait { width: 60px; height: 60px; padding: 2px; border-width: 2px; box-shadow: 0 0 14px color-mix(in srgb, var(--signal) 25%, transparent); }
}

/* ==========================================================================
   NAVIGATION (2026-11-14) : rubrique en cours, retour toujours visible,
   confirmation d'envoi qui reste affichée
   ========================================================================== */
@media (max-width: 1000px) {
    .nav-links { display: none; }
    #hamburger { display: inline-grid; }
}
.nav-links a[aria-current] { color: var(--legend); box-shadow: inset 0 -2px 0 var(--signal); }
#mobile-menu a[aria-current] { color: var(--signal-ink); box-shadow: inset 3px 0 0 var(--signal); }

/* Rapports : « Retour au portfolio » reste sous la barre du haut pendant la lecture */
.back-top {
    position: sticky; top: 64px; z-index: 40;
    margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
    padding: 10px var(--gutter); width: calc(100% + 2 * var(--gutter));
    background: color-mix(in srgb, var(--paint) 92%, transparent);
    backdrop-filter: blur(10px);
}
.archive { scroll-margin-top: 130px; }
.back-bottom { margin: 32px 0 0; }

.form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; color: var(--signal-ink); }
.form-status.is-error { color: #E5484D; }
html.light .form-status.is-error { color: #B42318; }
@media print { .back { display: none !important; } }

/* ---------- Propositions validées le 2026-11-14 ---------- */
/* Légende sous la console (la console elle-même n'est pas modifiée) */
.console-wrap { justify-self: center; width: min(100%, 470px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.console-wrap .console { justify-self: auto; width: 100%; }
.console-hint { margin: 0; font-family: var(--f-head); font-weight: 500; font-size: 0.98rem; color: var(--faint); letter-spacing: 0.04em; }
.console-hint::before { content: "↕ "; color: var(--signal-ink); }
/* Ligne simple sous le titre des cartes Réalisations */
.case-plain { margin: 2px 0 4px; color: var(--legend); font-weight: 500; }
/* Bouton assistant : texte complet sauf sur petit téléphone */
@media (max-width: 420px) { .chat-launcher-more { display: none; } }

/* ==========================================================================
   ANIMATIONS PLUS VISIBLES (2026-11-14) : plus lentes et plus amples.
   Les retours de clic (boutons, menu, survols) restent rapides exprès.
   ========================================================================== */
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } }

/* Accueil : le titre monte ligne par ligne, puis le texte et les boutons suivent */
.hero-title .line { animation-duration: 1100ms; }
.hero-title .line-2 { animation-delay: 180ms; }
.hero-title .line-3 { animation-delay: 360ms; }
@keyframes hero-line { from { opacity: 0; transform: translateY(0.6em); } }
.hero-sub     { animation: rise-in 900ms var(--ease-out) 600ms both; }
.hero-actions { animation: rise-in 900ms var(--ease-out) 750ms both; }
.hero-meta    { animation: rise-in 900ms var(--ease-out) 900ms both; }
.hero-tags .lamp { animation-duration: 1000ms; animation-delay: 500ms; }

/* Sections : le titre puis le contenu montent quand la section arrive à l'écran */
.power-anim #main-view .section > .wrap > * { opacity: 0; transform: translateY(28px); }
.power-anim #main-view .section.is-lit > .wrap > * {
    opacity: 1; transform: none;
    transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.power-anim #main-view .section.is-lit > .wrap > *:nth-child(2) { transition-delay: 180ms; }
.power-anim #main-view .section.is-lit > .wrap > *:nth-child(3) { transition-delay: 360ms; }
.power-anim #main-view .section.is-lit > .wrap > *:nth-child(n+4) { transition-delay: 480ms; }
/* La grille des Réalisations garde son propre effet carte par carte */
.power-anim #main-view #expertises > .wrap > #expertise-grid { opacity: 1; transform: none; }

/* LED des surtitres : clignotement de mise sous tension plus lent */
.power-anim .section.is-lit .kicker::before { animation-duration: 1000ms; animation-delay: 250ms; }

/* Cartes Réalisations : arrivée plus ample, une à une */
.power-anim .case-card { transform: translateY(32px); }
.power-anim #expertise-grid.is-lit .case-card {
    transition: opacity 850ms var(--ease-out), transform 850ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 140ms + 150ms);
}
.power-anim #expertise-grid.is-lit .case-num { animation-duration: 1000ms; animation-delay: calc(var(--i, 0) * 140ms + 450ms); }

/* Compétences : chaque domaine s'allume l'un après l'autre, puis les badges */
.power-anim #competences .domains li { opacity: 0; transform: translateX(-18px); }
.power-anim #competences .domains .lamp { opacity: .18; }
.power-anim #competences .domains.is-on li { opacity: 1; transform: none; transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out); }
.power-anim #competences .domains.is-on .lamp { animation: led-on 900ms var(--ease-out) both; }
.power-anim #competences .tools li { opacity: 0; transform: translateY(10px); }
.power-anim #competences .tools.is-on li { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.power-anim #competences .domains.is-on li:nth-child(1) { transition-delay: 80ms; } .power-anim #competences .domains.is-on li:nth-child(1) .lamp { animation-delay: 260ms; }
.power-anim #competences .domains.is-on li:nth-child(2) { transition-delay: 160ms; } .power-anim #competences .domains.is-on li:nth-child(2) .lamp { animation-delay: 340ms; }
.power-anim #competences .domains.is-on li:nth-child(3) { transition-delay: 240ms; } .power-anim #competences .domains.is-on li:nth-child(3) .lamp { animation-delay: 420ms; }
.power-anim #competences .domains.is-on li:nth-child(4) { transition-delay: 320ms; } .power-anim #competences .domains.is-on li:nth-child(4) .lamp { animation-delay: 500ms; }
.power-anim #competences .domains.is-on li:nth-child(5) { transition-delay: 400ms; } .power-anim #competences .domains.is-on li:nth-child(5) .lamp { animation-delay: 580ms; }
.power-anim #competences .domains.is-on li:nth-child(6) { transition-delay: 480ms; } .power-anim #competences .domains.is-on li:nth-child(6) .lamp { animation-delay: 660ms; }
.power-anim #competences .domains.is-on li:nth-child(7) { transition-delay: 560ms; } .power-anim #competences .domains.is-on li:nth-child(7) .lamp { animation-delay: 740ms; }
.power-anim #competences .domains.is-on li:nth-child(8) { transition-delay: 640ms; } .power-anim #competences .domains.is-on li:nth-child(8) .lamp { animation-delay: 820ms; }
.power-anim #competences .tools.is-on li:nth-child(1) { transition-delay: 60ms; }
.power-anim #competences .tools.is-on li:nth-child(2) { transition-delay: 120ms; }
.power-anim #competences .tools.is-on li:nth-child(3) { transition-delay: 180ms; }
.power-anim #competences .tools.is-on li:nth-child(4) { transition-delay: 240ms; }
.power-anim #competences .tools.is-on li:nth-child(5) { transition-delay: 300ms; }
.power-anim #competences .tools.is-on li:nth-child(6) { transition-delay: 360ms; }
.power-anim #competences .tools.is-on li:nth-child(7) { transition-delay: 420ms; }
.power-anim #competences .tools.is-on li:nth-child(8) { transition-delay: 480ms; }
.power-anim #competences .tools.is-on li:nth-child(9) { transition-delay: 540ms; }
.power-anim #competences .tools.is-on li:nth-child(10) { transition-delay: 600ms; }
.power-anim #competences .tools.is-on li:nth-child(11) { transition-delay: 660ms; }
.power-anim #competences .tools.is-on li:nth-child(12) { transition-delay: 720ms; }

/* Parcours : les points et les blocs s'allument plus lentement au défilement */
.tl-dot { transition: background .6s, box-shadow .6s; }
.power-anim .tl-item > div:not(.tl-dot) { opacity: .45; transition: opacity 700ms var(--ease-out); }
.power-anim .tl-item.is-lit > div { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .hero-sub, .hero-actions, .hero-meta { animation: none; }
    .power-anim #main-view .section > .wrap > *, .power-anim #main-view .section.is-lit > .wrap > *,
    .power-anim #competences .domains li, .power-anim #competences .tools li { opacity: 1; transform: none; transition: none; }
    .power-anim #competences .domains .lamp, .power-anim #competences .domains.is-on .lamp { opacity: 1; animation: none; }
    .power-anim .tl-item > div:not(.tl-dot) { opacity: 1; transition: none; }
}
@media print {
    .power-anim #main-view .section > .wrap > *, .power-anim #competences .domains li, .power-anim #competences .tools li, .power-anim .tl-item > div { opacity: 1 !important; transform: none !important; }
}

/* Domaines : ligne de preuve sous chaque intitulé + badge optionnel (2026-11-14) */
.domains li { align-items: flex-start; }
.domains li .lamp { margin-top: 0.5em; }
.domain-txt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.domain-label { font-weight: 500; }
.domain-proof { flex-basis: 100%; color: var(--muted); font-weight: 400; font-size: 0.95rem; line-height: 1.45; }
.domain-badge { font-family: var(--f-head); font-weight: 600; font-size: 0.82rem; line-height: 1; padding: 4px 8px; border-radius: 2px; border: 1px solid var(--signal); color: var(--signal-ink); white-space: nowrap; }

/* Étiquettes du haut sur une ligne quand la place le permet (2026-11-14, « Coordinateur technique studio » plus long) */
@media (min-width: 561px) {
    .hero-top:has(.hero-portrait) { gap: 14px; }
    .hero-top:has(.hero-portrait) .hero-tags { gap: 6px 14px; }
    .hero-top .hero-tags li { font-size: 1rem; }
}

/* ========== FORMATION = même frise que le Parcours (2026-11-27) ==========
   Même trait qui se remplit au défilement, mêmes points qui s'allument
   (classes .timeline / .tl-item / .tl-dot, JS updateTimeline). */
.formation-list.timeline { display: block; }
.formation-list .tl-item { grid-template-columns: 1fr; padding-bottom: clamp(28px, 4vw, 40px); }
.formation-list .tl-item:last-child { padding-bottom: 0; }
.formation-list li.fo-item { border-left: 0; padding-left: 40px; }
.formation-list .fo-item h4 { margin-top: 2px; }

/* ========== MICRO-SOUDURE (2026-11-27) ==========
   Le badge de compétence « chauffe » comme une LED, puis garde un léger halo. */
.domain-badge { box-shadow: 0 0 8px color-mix(in srgb, var(--signal) 30%, transparent); }
.power-anim .domain-badge:not(.is-lit) { opacity: .3; box-shadow: none; }
.power-anim .domain-badge.is-lit { animation: badge-heat 1700ms var(--ease-out) 300ms both; }
@keyframes badge-heat {
    0%   { opacity: .3; box-shadow: none; background: transparent; }
    30%  { opacity: 1; box-shadow: 0 0 16px var(--signal); background: color-mix(in srgb, var(--signal) 22%, transparent); }
    48%  { opacity: .55; box-shadow: 0 0 4px color-mix(in srgb, var(--signal) 40%, transparent); background: transparent; }
    66%  { opacity: 1; box-shadow: 0 0 14px color-mix(in srgb, var(--signal) 70%, transparent); background: color-mix(in srgb, var(--signal) 12%, transparent); }
    100% { opacity: 1; box-shadow: 0 0 8px color-mix(in srgb, var(--signal) 30%, transparent); background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .power-anim .domain-badge { animation: none !important; opacity: 1 !important; }
}

/* ========== FRISES EN PISTE DE CIRCUIT IMPRIMÉ (2026-11-27) ==========
   Parcours et Formation : piste SVG (.tl-trace, dessinée par drawTrace()),
   pastilles de soudure (.tl-dot) et vias dans les détours. Le cuivre éteint
   devient orange quand le « courant » passe. Remplace les ::before/::after. */
.timeline.has-trace::before, .timeline.has-trace::after { display: none; }
.tl-trace { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.tl-trace path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tl-trace-base { stroke: color-mix(in srgb, var(--signal) 22%, var(--rule)); }
.tl-trace-fill { stroke: var(--signal); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--signal) 55%, transparent)); }
.tl-via { fill: var(--paint); stroke: color-mix(in srgb, var(--signal) 22%, var(--rule)); stroke-width: 2; transition: stroke .5s, filter .5s; }
.tl-via.is-lit { stroke: var(--signal); filter: drop-shadow(0 0 3px var(--signal)); }

/* Pastille de soudure : anneau de cuivre percé au centre */
.tl-dot { left: -1px; top: 7px; width: 13px; height: 13px; background: var(--paint); border: 3px solid color-mix(in srgb, var(--signal) 30%, var(--rule)); box-shadow: 0 0 0 2px var(--paint); }
.tl-item.is-lit .tl-dot { background: var(--paint); border-color: var(--signal); box-shadow: 0 0 0 2px var(--paint), 0 0 10px var(--signal); }
html.light .tl-dot, html.light .tl-item.is-lit .tl-dot, html.light .tl-via { background: var(--paint); }
@media (prefers-reduced-motion: reduce) { .tl-via { transition: none; } }

/* Compétences (2026-11-27) : la grille ne fait plus le fondu général de section
   (il s'ajoutait à l'animation propre des listes, le contenu apparaissait en retard).
   Les domaines et outils s'animent dès qu'ils arrivent à l'écran (revealSkillLists). */
.power-anim #main-view #competences > .wrap > .skills-grid { opacity: 1; transform: none; transition: none; }
