/* ==========================================================================
   Miguel Heuya — système de design (v2)
   Identité : éditorial, sobre, orientée données.
   Serif (Fraunces) pour la voix · Sans (Instrument Sans) pour la lecture ·
   Mono (JetBrains Mono) pour les repères et les chiffres.
   Toutes les couleurs viennent des variables posées par theme.js.
   ========================================================================== */

:root {
  /* Valeurs par défaut = palette « Marine » (identiques à theme.js) */
  --bg: #0D1626; --surface: #131F35; --surface-2: #192A46; --line: #27395B;
  --text: #E7ECF5; --muted: #9AA9C3;
  --accent: #E3B866; --accent-text: #E3B866; --accent-ink: #1A1405; --accent-soft: #2A2A2F;
  --accent-rgb: 227, 184, 102;
  --primary: var(--accent); --primary-rgb: 227, 184, 102; --bg-custom: var(--bg); /* alias pages de réalisations */

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 4.2vw, 44px);
  --header-h: 68px;
  --r: 16px;
  --r-sm: 10px;
  --strong-line: color-mix(in srgb, var(--text) 24%, transparent);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- Typographie ---------- */
.serif { font-family: var(--serif); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; font-variation-settings: 'opsz' 96; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.35rem, 4.9vw, 4rem); line-height: 1.04; letter-spacing: -0.025em; font-variation-settings: 'opsz' 144; }
h2 { font-size: clamp(1.85rem, 3.5vw, 2.85rem); line-height: 1.1; }
.sec-head h2, .contact h2 { max-width: 22ch; }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.2; font-weight: 500; }
em { font-style: italic; color: var(--accent-text); }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.55; max-width: 56ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.tag, .label {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65em;
  min-height: 48px; padding: .75em 1.35em; border-radius: var(--r-sm);
  font-weight: 600; font-size: .98rem; line-height: 1.2; border: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn i { font-size: .9em; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.btn-ghost { border-color: var(--strong-line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }
.btn-sm { min-height: 40px; padding: .5em 1.05em; font-size: .9rem; }
.btn-ink { background: var(--accent-ink); color: var(--accent); }
.btn-ink:hover { transform: translateY(-1px); }
.arrow { transition: transform .2s ease; }
a:hover > .arrow, .btn:hover .arrow { transform: translateX(3px); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--bg); border-bottom: 1px solid var(--line);
  transition: background-color .35s ease, border-color .35s ease;
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); }
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.02rem; letter-spacing: -.02em;
}
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 1.18rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-role { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin-left: auto; }
.nav-link { position: relative; font-size: .93rem; font-weight: 500; color: var(--muted); padding: 6px 0; transition: color .2s ease; white-space: nowrap; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent-text); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--strong-line); background: transparent; color: var(--text);
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { border-color: var(--accent-text); color: var(--accent-text); }
#menu-btn { display: none; }

/* Panneau de thème */
.theme-panel {
  position: fixed; z-index: 60; top: calc(var(--header-h) + 10px); right: var(--gutter);
  width: 336px; max-width: calc(100vw - 2 * var(--gutter));
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.theme-panel.open { opacity: 1; visibility: visible; transform: none; }
.tp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tp-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.tp-custom { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset { background: none; border: 0; padding: 0; text-align: left; display: grid; gap: 6px; border-radius: 10px; }
.preset .sw {
  display: grid; align-content: center; gap: 5px; height: 52px; padding: 0 12px; border-radius: 9px;
  background: var(--sw-bg); border: 1px solid color-mix(in srgb, var(--sw-text) 18%, transparent);
  box-shadow: 0 0 0 0 var(--accent-text); transition: box-shadow .15s ease;
}
.sw i { display: block; height: 4px; border-radius: 2px; }
.sw-a { width: 38%; background: var(--sw-accent); height: 6px !important; }
.sw-b { width: 84%; background: var(--sw-text); opacity: .55; }
.sw-c { width: 62%; background: var(--sw-text); opacity: .3; }
.sw-name { font-size: .78rem; font-weight: 500; color: var(--muted); }
.preset[aria-pressed="true"] .sw { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-text); }
.preset[aria-pressed="true"] .sw-name { color: var(--text); }
.tp-sep { height: 1px; background: var(--line); margin: 18px 0 14px; }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; }
.tp-row label { font-weight: 500; }
input[type="color"] {
  -webkit-appearance: none; appearance: none; width: 52px; height: 34px; padding: 3px; border: 1px solid var(--strong-line);
  border-radius: 9px; background: var(--surface); cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 6px; }
.tp-reset { margin-top: 8px; background: none; border: 0; padding: 4px 0; color: var(--accent-text); font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tp-note { margin-top: 10px; font-size: .78rem; color: var(--muted); line-height: 1.45; }

/* Menu mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 120; background: var(--bg); display: flex; flex-direction: column;
  padding: 22px var(--gutter) 32px; opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mm-top { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.mm-links { display: grid; gap: 4px; margin: 36px 0 auto; }
.mm-links a { font-family: var(--serif); font-size: 1.9rem; line-height: 1.2; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.mm-links a .mono { font-size: .72rem; color: var(--accent-text); }
.mobile-menu .btn { margin-top: 28px; width: 100%; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding-block: clamp(72px, 9vw, 128px); border-top: 1px solid var(--line); }
.kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kicker .num { color: var(--accent-text); font-weight: 500; }
.kicker .rule { width: 44px; height: 1px; background: var(--strong-line); }
.sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .lead { margin-top: 20px; color: var(--muted); }

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .65s ease, transform .65s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(64px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero .eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.hero .eyebrow span + span::before { content: '·'; margin-right: 10px; color: var(--muted); }
.hero h1 { max-width: 15.5ch; }
.hero .lead { margin-top: 28px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: .92rem; color: var(--muted); max-width: 46ch; }
.hero-meta strong { color: var(--text); font-weight: 600; }

.flow { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .35); }
.flow-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.flow ol { display: grid; }
.step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 16px; padding-bottom: 24px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: 16.5px; top: 36px; bottom: 2px; width: 1px; background: var(--strong-line); }
.step:last-child::before { display: none; }
.step-dot { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--strong-line); display: grid; place-items: center; font-family: var(--mono); font-size: .76rem; color: var(--muted); background: var(--surface); position: relative; z-index: 1; }
.step:last-child .step-dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; line-height: 1.25; padding-top: 3px; }
.step-desc { color: var(--muted); font-size: .93rem; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; padding: 4px 9px; border-radius: 6px; border: 1px dashed var(--strong-line); color: var(--muted); }
.chip.solid { border-style: solid; border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.minibars { display: flex; align-items: flex-end; gap: 5px; height: 26px; margin-top: 10px; }
.minibars i { display: block; width: 9px; border-radius: 2px 2px 0 0; background: var(--accent); }
.minibars i:nth-child(1) { height: 38%; opacity: .45; } .minibars i:nth-child(2) { height: 62%; opacity: .6; }
.minibars i:nth-child(3) { height: 48%; opacity: .75; } .minibars i:nth-child(4) { height: 100%; }

/* ---------- Problème : registre avant / après ---------- */
.ledger { border-top: 1px solid var(--strong-line); }
.ledger-head, .ledger-row { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 0 20px; align-items: baseline; }
.ledger-head { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ledger-head .tag:last-child { color: var(--accent-text); }
.ledger-row { padding: 22px 0; border-bottom: 1px solid var(--line); }
.ledger-row .from { color: var(--muted); }
.ledger-row .arrow-col { color: var(--accent-text); font-family: var(--mono); text-align: center; }
.ledger-row .to { font-family: var(--serif); font-size: 1.28rem; line-height: 1.3; font-weight: 500; }
.ledger-foot { margin-top: 28px; color: var(--muted); max-width: 60ch; }
.ledger-foot strong { color: var(--text); font-weight: 600; }

/* ---------- Offre : 3 services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; }
.service .tag { color: var(--accent-text); }
.service h3 { margin: 12px 0 22px; min-height: 2.5em; }
.s-row { padding: 14px 0; border-top: 1px solid var(--line); }
.s-row .label { display: block; margin-bottom: 4px; }
.s-row p { font-size: .98rem; line-height: 1.5; }
.s-row.result { background: var(--accent-soft); margin: 4px -14px 0; padding: 14px; border-radius: 10px; border-top: 0; }
.s-row.result .label { color: var(--accent-text); }
.s-row.result p { font-weight: 600; }
.service .chips { margin-top: auto; padding-top: 22px; }
.service .chip { border-style: solid; border-color: var(--line); }

.outcome { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--strong-line); }
.outcome > div { padding: 28px 28px 8px 0; }
.outcome > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.outcome h3 { font-size: clamp(1.7rem, 2.8vw, 2.25rem); white-space: nowrap; font-weight: 400; margin-bottom: 10px; }
.outcome h3 em { font-style: italic; }
.outcome p { color: var(--muted); max-width: 30ch; }

/* ---------- Réalisations ---------- */
.proj-groups { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(32px, 4vw, 56px); align-items: start; }
.proj-group-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; padding-bottom: 14px; border-bottom: 1px solid var(--strong-line); margin-bottom: 22px; }
.proj-grid { display: grid; gap: 20px; }
.proj-group.two .proj-grid { grid-template-columns: repeat(2, 1fr); }
.proj { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.proj:hover { border-color: var(--accent-text); transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(0, 0, 0, .45); }
.proj-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.proj-media img { width: 100%; height: 100%; object-fit: cover; }
.proj-badge { position: absolute; top: 14px; left: 14px; background: var(--surface); color: var(--text); font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); }
.proj-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.proj-title { font-family: var(--serif); font-size: 1.12rem; line-height: 1.42; font-weight: 500; color: var(--text); letter-spacing: -.005em; }
.proj-tech { font-size: .93rem; line-height: 1.55; color: var(--muted); }
.proj-tech strong { color: var(--text); font-weight: 600; }
.proj-go { margin-top: auto; display: flex; justify-content: flex-end; color: var(--accent-text); }
.section-cta { margin-top: clamp(36px, 5vw, 56px); display: flex; justify-content: center; }

/* ---------- Expérience ---------- */
.xp { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.xp-top { padding: clamp(24px, 3.4vw, 40px); display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.xp-org { font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2.15rem); line-height: 1.15; letter-spacing: -.015em; font-weight: 400; max-width: 22ch; }
.xp-role { margin-top: 10px; color: var(--accent-text); font-weight: 600; }
.xp-meta { display: grid; gap: 6px; text-align: right; }
.xp-meta strong { font-family: var(--serif); font-size: 2.2rem; line-height: 1; font-weight: 400; color: var(--text); }
.xp-cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.xp-col { padding: clamp(22px, 3vw, 34px) clamp(24px, 3.4vw, 40px); }
.xp-col + .xp-col { border-left: 1px solid var(--line); }
.xp-col .label { display: block; margin-bottom: 12px; }
.xp-col:last-child .label { color: var(--accent-text); }
.xp-col p { font-size: 1.02rem; }
.xp-col:last-child p { font-family: var(--serif); font-size: 1.28rem; line-height: 1.35; font-weight: 500; }
.xp-view { background: var(--accent-soft); padding: clamp(22px, 3vw, 34px) clamp(24px, 3.4vw, 40px); border-top: 1px solid var(--line); }
.xp-view .label { color: var(--accent-text); display: block; margin-bottom: 16px; }
.xp-axes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.axis { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; font-weight: 600; line-height: 1.3; }
.axis .mono { color: var(--accent-text); font-size: .78rem; font-weight: 500; }
.edu { margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.edu-card { border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 2.6vw, 28px); }
.edu-card .label { display: block; margin-bottom: 10px; color: var(--accent-text); }
.edu-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.edu-card p { color: var(--muted); font-size: .98rem; }

/* ---------- Compétences ---------- */
.skills { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.skill-group + .skill-group { margin-top: 36px; }
.sg-title { display: block; padding-bottom: 10px; border-bottom: 1px solid var(--strong-line); margin-bottom: 4px; color: var(--accent-text); }
.skill { padding: 16px 0; border-bottom: 1px solid var(--line); }
.skill-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.skill-name { font-weight: 600; }
.skill-lv { font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.skill-note { color: var(--muted); font-size: .9rem; margin-top: 2px; line-height: 1.45; }
.bar { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 11px; }
.bar i { display: block; height: 100%; width: var(--lv); background: var(--accent); border-radius: inherit; }
.js .bar i { width: 0; transition: width 1.1s cubic-bezier(.2, .7, .2, 1); }
.js .bar.in i { width: var(--lv); }
.ai-note { margin-top: 36px; padding: 20px 22px; border-radius: var(--r); background: var(--accent-soft); display: grid; gap: 6px; }
.ai-note .label { color: var(--accent-text); }
.ai-note p { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; font-weight: 500; }

/* ---------- Contact ---------- */
.contact { background: var(--accent); color: var(--accent-ink); border-radius: 24px; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.contact .kicker, .contact .kicker .num, .contact .kicker .rule { color: var(--accent-ink); }
.contact .kicker .rule { background: currentColor; opacity: .5; }
.contact h2 { max-width: 14ch; }
.contact .lead { margin-top: 20px; color: var(--accent-ink); max-width: 36ch; }
.channels { display: grid; border-top: 1px solid color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.channel { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid color-mix(in srgb, var(--accent-ink) 40%, transparent); transition: padding .2s ease; }
.channel:hover { padding-left: 8px; }
.channel .ci { width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font-size: 1.15rem; }
.channel .cl { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.channel .cv { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; font-weight: 500; }
.channel:first-child .cv { font-size: 1.55rem; }
.contact :focus-visible { outline-color: var(--accent-ink); }

.gift { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; }
.gift h3 { font-size: 1.3rem; margin-bottom: 6px; }
.gift p { color: var(--muted); max-width: 52ch; }
.gift-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gift-note { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 14px; font-size: .96rem; }
.gift-note ul { display: grid; gap: 10px; }
.gift-note li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muted); }
.gift-note li i { color: var(--accent-text); padding-top: 4px; }
.gift-note strong { color: var(--text); font-weight: 600; }
.signature { margin-top: clamp(40px, 6vw, 72px); text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--muted); letter-spacing: -.01em; }
.signature span { color: var(--accent-text); }

/* ---------- Ressources ---------- */
.reco { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.reco .tag { color: var(--accent-text); }
.reco h3 { margin: 8px 0 10px; font-size: 1.7rem; }
.reco p { color: var(--muted); max-width: 58ch; }
.reco-links { display: grid; gap: 8px; min-width: 250px; }
.reco-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: .93rem; font-weight: 500; transition: border-color .2s ease, color .2s ease; }
.reco-links a:hover { border-color: var(--accent-text); color: var(--accent-text); }
.reco-links a:first-child { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.reco-links a:first-child:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.vid-block { margin-top: clamp(36px, 5vw, 56px); }
.vid-block > h3 { font-size: 1.3rem; padding-bottom: 12px; border-bottom: 1px solid var(--strong-line); margin-bottom: 22px; }
.vids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 18px; }
.vid { display: block; }
.vid-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.vid:hover .vid-thumb img { transform: scale(1.03); }
.vid-play { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .78rem; padding-left: 2px; }
.vid-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; font-weight: 600; }
.vid-title .tag { white-space: nowrap; color: var(--accent-text); }
.vid-sub { color: var(--muted); font-size: .9rem; margin-top: 2px; line-height: 1.4; }
.res-note { margin-top: 28px; color: var(--muted); max-width: 70ch; font-size: .98rem; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 36px; margin-top: clamp(32px, 6vw, 80px); }
.f-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.f-grid .tagline { margin-top: 16px; color: var(--muted); max-width: 32ch; }
.f-col h4 { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 14px; }
.f-col a { display: block; padding: 5px 0; font-weight: 500; transition: color .2s ease; }
.f-col a:hover { color: var(--accent-text); }
.f-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .82rem; color: var(--muted); }

.to-top { position: fixed; left: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--text); border: 1px solid var(--strong-line); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease, visibility .25s, border-color .2s ease; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .nav { display: none; }
  #menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
  .brand-role { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .service h3 { min-height: 0; }
  .proj-groups { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .reco { grid-template-columns: 1fr; }
  .vids { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .header-btn-contact { display: none; }
  .ledger-head { display: none; }
  .ledger-row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .ledger-row .arrow-col { text-align: left; }
  .ledger-row .arrow-col::before { content: '↓'; }
  .ledger-row .arrow-col span { display: none; }
  .outcome { grid-template-columns: 1fr; }
  .outcome > div, .outcome > div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .proj-group.two .proj-grid { grid-template-columns: 1fr; }
  .xp-cols, .xp-axes, .edu { grid-template-columns: 1fr; }
  .xp-col + .xp-col { border-left: 0; border-top: 1px solid var(--line); }
  .xp-meta { text-align: left; }
  .gift { grid-template-columns: 1fr; }
  .f-grid { grid-template-columns: 1fr; gap: 28px; }
  .vids { grid-template-columns: 1fr; }
  .channel { grid-template-columns: 40px 1fr auto; gap: 12px; }
  .channel .ci { width: 40px; height: 40px; }
  .channel .cv, .channel:first-child .cv { font-size: 1.15rem; overflow-wrap: anywhere; }
  .theme-panel { right: 12px; left: 12px; width: auto; max-width: none; }
  .to-top { left: 14px; bottom: 14px; }
}
@media (min-width: 1181px) { .mobile-menu { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .bar i { width: var(--lv); }
}

/* Alignement des lignes entre les 3 cartes de service (grand écran) */
@media (min-width: 1041px) {
  @supports (grid-template-rows: subgrid) {
    .services { grid-template-rows: repeat(6, auto); }
    .service { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
    .service h3 { min-height: 0; }
    .service .s-row.result { align-self: start; }
  }
}


/* ---------- Accueil sans panneau latéral ---------- */
.hero-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.12fr); gap: clamp(16px, 3vw, 40px); }
.hero h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.12; max-width: none; }
.hero .lead { max-width: 50ch; }
.hero-visual { margin: 0; justify-self: center; align-self: center; width: 100%; }
.hero-visual img { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .28)); }
@media (max-width: 1040px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-visual { justify-self: center; max-width: 620px; } .hero h1 { font-size: clamp(1.8rem, 5.2vw, 2.5rem); } }

/* ---------- Avant : les problèmes (traits pointillés, tension) ---------- */
.sec-avant { --warn: color-mix(in srgb, #e0654f 78%, var(--text)); }
.pb-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.pb { position: relative; grid-column: span 2; display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.4vw, 28px); border: 1px dashed var(--strong-line); border-radius: var(--r); background: transparent; }
.pb.pb-a, .pb.pb-b { grid-column: span 3; }
.pb p { color: var(--muted); font-size: 1rem; }
.pb p strong { display: block; color: var(--text); font-family: var(--serif); font-weight: 500; font-size: 1.2rem; line-height: 1.25; margin-bottom: 8px; }
.pb-ic, .gn-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: .95rem; flex: none; }
.pb-ic { color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.pb-vis { display: flex; align-items: center; gap: 6px; height: 28px; margin-top: auto; order: 3; }
.pb-vis i { display: block; border-radius: 4px; background: color-mix(in srgb, var(--warn) 45%, transparent); }
.v-scatter i { width: 22px; height: 16px; border: 1px dashed var(--warn); background: transparent; }
.v-scatter i:nth-child(1) { transform: translateY(-6px) rotate(-6deg); } .v-scatter i:nth-child(2) { transform: translate(14px, 6px) rotate(5deg); }
.v-scatter i:nth-child(3) { transform: translate(-4px, -4px); } .v-scatter i:nth-child(4) { transform: translate(24px, 5px) rotate(-4deg); } .v-scatter i:nth-child(5) { transform: translate(6px, -7px) rotate(8deg); }
.v-wait i { width: 10px; height: 10px; border-radius: 50%; opacity: .25; } .v-wait i:nth-child(2) { opacity: .4; } .v-wait i:nth-child(3) { opacity: .55; } .v-wait i:nth-child(4) { opacity: .7; } .v-wait i:nth-child(5) { opacity: .85; } .v-wait i:nth-child(6) { opacity: 1; }
.v-files i { width: 18px; height: 22px; margin-left: -8px; border: 1px solid var(--warn); background: var(--bg); } .v-files i:first-child { margin-left: 0; }
.pb-foot { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px 24px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border-radius: 0 var(--r-sm) var(--r-sm) 0; max-width: 78ch; }
.pb-foot strong { color: var(--text); font-weight: 600; }
.pb-foot-ic { color: var(--warn); padding-top: 3px; }

/* ---------- Après : ce que j'apporte (surface pleine, ordre) ---------- */
.sec-apres { background: var(--surface); border-block: 1px solid var(--line); }
.gn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gn { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.4vw, 28px); background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); }
.gn-ic { color: var(--accent-ink); background: var(--accent); }
.gn p { color: var(--muted); font-size: 1rem; }
.gn p strong { display: block; color: var(--text); font-family: var(--serif); font-weight: 500; font-size: 1.2rem; line-height: 1.25; margin-bottom: 8px; }
.gn .chips, .gn .minibars, .gn-vis { margin-top: auto; padding-top: 4px; }
.gn .minibars { height: 30px; box-sizing: content-box; }
.gn .minibars.rise i:nth-child(1) { height: 30%; } .gn .minibars.rise i:nth-child(2) { height: 50%; } .gn .minibars.rise i:nth-child(3) { height: 75%; } .gn .minibars.rise i:nth-child(4) { height: 100%; }
.gn .chip .fas { font-size: .7rem; }
.gn-vis { display: flex; gap: 6px; }
.gn-vis span { width: 26px; height: 18px; border-radius: 4px; border: 1px solid var(--strong-line); }
.gn-vis span.on { background: var(--accent); border-color: var(--accent); }
.gn-vis.g-one span { width: 60px; }
@media (max-width: 1040px) { .gn-grid { grid-template-columns: repeat(2, 1fr); } .pb, .pb.pb-a, .pb.pb-b { grid-column: span 3; } .pb:last-child { grid-column: span 6; } }
@media (max-width: 760px) { .gn-grid { grid-template-columns: 1fr; } .pb-grid { grid-template-columns: 1fr; } .pb, .pb.pb-a, .pb.pb-b, .pb:last-child { grid-column: auto; } }

/* Accueil : image centrée dans la première hauteur d'écran (sous l'en-tête) */
@media (min-width: 1041px) {
  .hero-visual { align-self: start; height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 420px; display: grid; place-items: center; margin-top: calc(-1 * clamp(48px, 8vw, 104px)); }
  .hero-visual img { max-height: 100%; width: 100%; object-fit: contain; }
}


/* ==========================================================================
   Ajouts : titre plus lisible · diaporama d'accueil · animations Avant/Après
   (n'utilisent que les variables du thème : toutes les palettes restent valides)
   ========================================================================== */

/* ---------- Titre d'accueil : police très lisible (Lexend) ---------- */
.hero h1 {
  font-family: 'Lexend', var(--sans);
  font-weight: 500;
  font-variation-settings: normal;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  word-spacing: .04em;
}
@media (max-width: 1040px) { .hero h1 { font-size: clamp(1.55rem, 4.6vw, 2.15rem); } }

/* ---------- Diaporama d'accueil (fondu enchaîné) ---------- */
.hero-slides { position: relative; width: 100%; aspect-ratio: 3 / 2; max-height: 100%; }
.slides-stage { position: absolute; inset: 0; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .28)); }
.hero-visual .slides-stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; filter: none; }
.slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: none; will-change: opacity, transform; }
.slide.is-prev { opacity: 1; transform: none; z-index: 1; }
.slide.is-active { opacity: 1; transform: none; z-index: 2; transition: opacity 1.2s ease, transform 6.5s cubic-bezier(.2, .6, .2, 1); }
@supports (not (aspect-ratio: 1)) { .hero-slides { height: 0; padding-bottom: 66.66%; } }

.slide-dots {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 99px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.slide-dot { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--strong-line); transition: width .35s ease, background-color .25s ease; }
.slide-dot::after { content: ''; position: absolute; inset: -9px -4px; }           /* zone de toucher plus large */
.slide-dot:hover { background: var(--muted); }
.slide-dot[aria-current="true"] { width: 24px; background: var(--accent); }

/* ---------- Avant : les problèmes — animations ---------- */
@keyframes pbIn      { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pbIcSway  { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes pbFlip    { 0%, 55% { transform: rotate(0); } 80%, 100% { transform: rotate(180deg); } }
@keyframes pbBob     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pbHammer  { 0%, 60%, 100% { transform: rotate(0); } 75% { transform: rotate(-22deg); } 88% { transform: rotate(8deg); } }
@keyframes pbWobble  { 0%, 55%, 100% { transform: rotate(0) scale(1); } 65% { transform: rotate(-12deg) scale(1.08); } 75% { transform: rotate(10deg) scale(1.08); } 85% { transform: rotate(-5deg); } }
@keyframes pbDrift1  { 0%, 100% { translate: 0 0; } 50% { translate: 7px -4px; } }
@keyframes pbDrift2  { 0%, 100% { translate: 0 0; } 50% { translate: -6px 4px; } }
@keyframes pbWave    { 0%, 100% { scale: .7; } 50% { scale: 1.25; } }
@keyframes pbFiles   { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes pbWarn    { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

.js .pb { transition: border-color .25s ease, transform .25s ease, background-color .25s ease; }
.js .pb.reveal.in { animation: pbIn .7s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: var(--d, 0s); }
.pb-grid > .pb:nth-child(1) { --d: 0s; }   .pb-grid > .pb:nth-child(2) { --d: .1s; }
.pb-grid > .pb:nth-child(3) { --d: .2s; }  .pb-grid > .pb:nth-child(4) { --d: .3s; }
.pb-grid > .pb:nth-child(5) { --d: .4s; }
.pb:hover { border-color: var(--warn); border-style: solid; background: color-mix(in srgb, var(--warn) 5%, transparent); }

.js .pb.in .pb-ic i { display: inline-block; transform-origin: 50% 50%; }
.js .pb-a.in .pb-ic i { animation: pbIcSway 4.2s ease-in-out 1s infinite; }
.js .pb-b.in .pb-ic i { animation: pbFlip 5.5s ease-in-out 1.2s infinite; }
.js .pb-c.in:nth-child(3) .pb-ic i { animation: pbBob 2.8s ease-in-out 1s infinite; }
.js .pb-c.in:nth-child(4) .pb-ic i { animation: pbHammer 3.6s ease-in-out 1.2s infinite; transform-origin: 80% 80%; }
.js .pb-c.in:nth-child(5) .pb-ic i { animation: pbWobble 4.4s ease-in-out 1.4s infinite; }

.js .v-scatter.pb-vis i:nth-child(odd)  { animation: pbDrift1 3.6s ease-in-out infinite; }
.js .v-scatter.pb-vis i:nth-child(even) { animation: pbDrift2 4.2s ease-in-out infinite; }
.js .v-wait.pb-vis i { animation: pbWave 1.5s ease-in-out infinite; }
.js .v-wait.pb-vis i:nth-child(2) { animation-delay: .12s; } .js .v-wait.pb-vis i:nth-child(3) { animation-delay: .24s; }
.js .v-wait.pb-vis i:nth-child(4) { animation-delay: .36s; } .js .v-wait.pb-vis i:nth-child(5) { animation-delay: .48s; }
.js .v-wait.pb-vis i:nth-child(6) { animation-delay: .6s; }
.js .v-files.pb-vis i { animation: pbFiles 2.4s ease-in-out infinite; }
.js .v-files.pb-vis i:nth-child(2) { animation-delay: .2s; } .js .v-files.pb-vis i:nth-child(3) { animation-delay: .4s; }
.js .pb-foot.in .pb-foot-ic i { display: inline-block; animation: pbWarn 2.2s ease-in-out 1s infinite; }

/* ---------- Après : les solutions — animations ---------- */
@keyframes gnIn     { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes gnPop    { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes gnGrow   { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes gnFill   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gnChip   { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes gnPulse  { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); } 60% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); } }
@keyframes gnTilt   { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-10deg) scale(1.08); } 65% { transform: rotate(8deg) scale(1.08); } }

.js .gn { transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.js .gn.reveal.in { animation: gnIn .7s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: var(--d, 0s); }
.gn:hover { transform: translateY(-4px); box-shadow: 0 22px 38px -26px rgba(0, 0, 0, .5); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); border-top-color: var(--accent); }
.gn-ic { transition: transform .3s ease; }
.gn:hover .gn-ic i { animation: gnTilt .7s ease-in-out; }
.gn-ic i { display: inline-block; }

.js .gn.in .gn-ic { animation: gnPop .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--d, 0s) + .15s); }
.js .gn.in .minibars i { transform-origin: bottom; animation: gnGrow .7s cubic-bezier(.2, .8, .2, 1) both; }
.js .gn.in .minibars i:nth-child(1) { animation-delay: calc(var(--d, 0s) + .35s); } .js .gn.in .minibars i:nth-child(2) { animation-delay: calc(var(--d, 0s) + .45s); }
.js .gn.in .minibars i:nth-child(3) { animation-delay: calc(var(--d, 0s) + .55s); } .js .gn.in .minibars i:nth-child(4) { animation-delay: calc(var(--d, 0s) + .65s); }
.js .gn.in .gn-vis span { animation: gnChip .5s ease both; }
.js .gn.in .gn-vis span:nth-child(1) { animation-delay: calc(var(--d, 0s) + .35s); } .js .gn.in .gn-vis span:nth-child(2) { animation-delay: calc(var(--d, 0s) + .5s); }
.js .gn.in .gn-vis span:nth-child(3) { animation: gnChip .5s ease calc(var(--d, 0s) + .65s) both, gnPulse 2.6s ease-out calc(var(--d, 0s) + 1.4s) infinite; }
.js .gn.in .gn-vis.g-one span { transform-origin: left; animation: gnFill .9s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0s) + .35s) both, gnPulse 2.6s ease-out calc(var(--d, 0s) + 1.6s) infinite; }
.js .gn.in .chips .chip { animation: gnChip .45s ease both; }
.js .gn.in .chips .chip:nth-child(1) { animation-delay: calc(var(--d, 0s) + .4s); } .js .gn.in .chips .chip:nth-child(2) { animation-delay: calc(var(--d, 0s) + .55s); }
.js .gn.in .chips .chip:nth-child(3) { animation-delay: calc(var(--d, 0s) + .7s); }

/* ---------- Mouvement réduit : tout est statique ---------- */
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active { transition: none !important; transform: none !important; }
  .js .pb.reveal.in, .js .gn.reveal.in,
  .js .pb.in .pb-ic i, .js .pb-vis i, .js .pb-foot.in .pb-foot-ic i,
  .js .gn.in .gn-ic, .js .gn.in .minibars i, .js .gn.in .gn-vis span, .js .gn.in .chips .chip,
  .gn:hover .gn-ic i { animation: none !important; }
  .gn:hover, .pb:hover { transform: none; }
}

/* ---------- Bouton WhatsApp flottant (couleurs fixes WhatsApp) ---------- */
.wa-fab { position: fixed; right: 92px; bottom: 20px; z-index: 9998; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #25D366; color: #fff; font-size: 30px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: transform .2s ease, background-color .2s ease; }
.wa-fab:hover { background: #1EBE5A; color: #fff; transform: translateY(-2px) scale(1.05); }
.wa-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) { .wa-fab { font-size: 26px; } }

/* ---------- Bouton WhatsApp : attire le regard (halo, secousse, badge, bulle) ---------- */
@keyframes waPop    { 0% { transform: scale(0) } 70% { transform: scale(1.15) } 100% { transform: scale(1) } }
@keyframes waHalo   { 0% { box-shadow: 0 6px 18px rgba(0,0,0,.3), 0 0 0 0 rgba(37,211,102,.65) } 70%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.3), 0 0 0 20px rgba(37,211,102,0) } }
@keyframes waShake  { 0%, 62%, 100% { transform: rotate(0) } 66% { transform: rotate(-16deg) } 71% { transform: rotate(14deg) } 76% { transform: rotate(-10deg) } 81% { transform: rotate(8deg) } 86% { transform: rotate(0) } }
@keyframes waBubble { 0%, 12% { opacity: 0; transform: translateY(8px) scale(.9) } 18%, 58% { opacity: 1; transform: none } 64%, 100% { opacity: 0; transform: translateY(8px) scale(.9) } }

.wa-fab { animation: waPop .6s cubic-bezier(.3, 1.4, .5, 1) 1s backwards, waHalo 2.2s ease-out 1.8s infinite; }
.wa-fab i { animation: waShake 5s ease-in-out 2s infinite; }
.wa-fab::before { content: 'Une question ? Écrivez-moi'; position: absolute; right: 0; bottom: calc(100% + 14px); width: max-content; white-space: nowrap; padding: 9px 14px; border-radius: 14px 14px 4px 14px; background: #fff; color: #111; font: 600 14px/1.3 system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); opacity: 0; pointer-events: none; animation: waBubble 14s ease-in-out 3s infinite; }
.wa-fab:hover, .wa-fab:focus-visible { animation: none; }
.wa-fab:hover i { animation: none; }
.wa-fab:hover::before { animation: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .wa-fab, .wa-fab i,   .wa-fab::before { display: none; }
}

/* ---------- Réseaux sociaux ---------- */
.soc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; }
.soc-grid > .soc-card:nth-child(2) { --d: .1s; }
.soc-card { display: flex; align-items: center; gap: 22px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.soc-card:hover, .soc-card:focus-visible { transform: translateY(-4px); border-color: var(--accent-text); box-shadow: 0 22px 38px -26px rgba(0, 0, 0, .55); }
.soc-avatar { position: relative; flex: none; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--accent-text); font-family: var(--serif); font-size: 1.6rem; color: var(--text); }
.soc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soc-body { display: grid; gap: 4px; min-width: 0; }
.soc-net { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.soc-name { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; font-weight: 500; color: var(--text); }
.soc-cta { font-size: .88rem; color: var(--muted); transition: color .2s ease; }
.soc-card:hover .soc-cta { color: var(--text); }
@media (max-width: 700px) {
  .soc-grid { grid-template-columns: 1fr; }
  .soc-avatar { width: 72px; height: 72px; }
}

/* ---------- En-tête : place pour l'onglet « Réseaux » ---------- */
@media (min-width: 1041px) { .nav { gap: 10px; } .nav-link { font-size: .88rem; } }
@media (min-width: 1041px) and (max-width: 1180px) {
  .nav { display: none; }
  #menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
  .brand-role { display: none; }
}
@media (max-height: 740px) { .mm-links { margin-top: 20px; } .mm-links a { font-size: 1.6rem; padding: 7px 0; } }

/* ---------- À propos : photo à gauche, texte à droite ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 76px); align-items: start; }
.about-media { position: sticky; top: calc(var(--header-h) + 28px); isolation: isolate; }
.about-media::before { content: ''; position: absolute; inset: 16px -14px -14px 16px; z-index: 0; border: 1.5px solid var(--accent-text); border-radius: calc(var(--r) + 6px); opacity: .5; }
.about-photo { position: relative; z-index: 1; margin: 0; padding: 12px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); box-shadow: 0 26px 48px -30px rgba(0, 0, 0, .5); }
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--r); background: var(--surface-2); }
.about-photo figcaption { display: grid; gap: 4px; padding: 16px 6px 0; }
.about-name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; font-weight: 500; color: var(--text); }
.about-role { font-size: .92rem; line-height: 1.4; color: var(--muted); }
.about-place { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }

.about-body { max-width: 64ch; }
.about-body p { font-size: 1.03rem; line-height: 1.78; color: color-mix(in srgb, var(--text) 88%, transparent); margin: 0 0 1.05em; }
.about-body strong { color: var(--text); font-weight: 600; }
.about-h { display: flex; align-items: center; gap: 12px; margin: 1.9em 0 .7em; font-family: var(--mono); font-size: .76rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.about-h::before { content: ''; width: 22px; height: 1px; background: currentColor; flex: none; }
.about-intro > .about-h:first-child, .about-more-inner > .about-h:first-child { margin-top: 0; }
.about-more-inner > .about-h:first-child { margin-top: 1.9em; }
.about-body .about-quote { margin: 1.4em 0; padding: .3em 0 .3em 20px; border-left: 3px solid var(--accent-text); font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; font-weight: 500; color: var(--text); }

/* Repli / dépli (activé par about.js ; sans JS tout le texte reste visible) */
.about-toggle { margin-top: 10px; }
.about-toggle .fa-chevron-down { transition: transform .35s ease; font-size: .8em; }
.about-body.is-open .about-toggle .fa-chevron-down { transform: rotate(180deg); }
.about-body.is-collapsible .about-more { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .55s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .55s; }
.about-body.is-collapsible.is-open .about-more { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .55s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.about-body.is-collapsible .about-more-inner { min-height: 0; overflow: hidden; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { position: relative; top: auto; max-width: 460px; margin-right: 14px; }
  .about-media::before { inset: 12px -10px -10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .about-body.is-collapsible .about-more, .about-toggle .fa-chevron-down { transition: none !important; }
}
body:has(.mobile-menu.open) .wa-fab { display: none; }
