/* ---------- Couleurs (modifier ici pour changer la charte) ---------- */
:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111a2e; --text: #e2e8f0; --muted: #94a3b8;
    --border: #1e293b; --accent: #60a5fa; --accent-soft: #1e3a5f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111a2e; --text: #e2e8f0; --muted: #94a3b8;
  --border: #1e293b; --accent: #60a5fa; --accent-soft: #1e3a5f; color-scheme: dark;
}

/* ---------- Bilinguisme : on masque la langue inactive ---------- */
html[lang="fr"] [data-lang="en"],
html[lang="en"] [data-lang="fr"] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1100px, 100% - 32px); margin-inline: auto; }
.section { padding: 80px 0 0; }
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; margin-bottom: .5em; }
.lead { color: var(--muted); font-size: 1.1rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--text); }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  font: inherit; font-size: .85rem; font-weight: 600;
  min-width: 40px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 72px 0 48px; }
.avatar { width: 144px; height: 144px; border-radius: 50%; margin: 0 auto 20px; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.tagline { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; margin-bottom: .4em; }
.hero .lead { max-width: 680px; margin-inline: auto; }

.chips { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .chips { justify-content: center; }
.chips li {
  padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}

.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 640px; margin: 48px auto 0; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stats dt { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stats dd { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Grilles et cartes ---------- */
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card > p { color: var(--muted); }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.about p { color: var(--muted); }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.values li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; color: var(--muted); }
.values strong { display: block; color: var(--text); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* ---------- Parcours : chronologie verticale, du bas (le plus ancien) vers le haut ---------- */
/* Couleur de chaque type d'étape (pastille + étiquette) */
.journey [data-kind="work"]  { --k: #3b82f6; }
.journey [data-kind="study"] { --k: #8b5cf6; }
.journey [data-kind="cert"]  { --k: #22d3ee; }

.journey { position: relative; padding-left: 44px; --rail: 13px; --fill-time: 2.4s;
  overflow-x: clip; overflow-clip-margin: 12px; /* évite une barre de défilement pendant l'apparition des cartes */ }
/* Le rail (gris) et son remplissage (dégradé) qui monte depuis « Départ » */
.journey::before, .journey-fill {
  content: ""; position: absolute; left: var(--rail); top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
}
.journey::before { background: var(--border); }
.journey-fill {
  background: linear-gradient(to top, #22d3ee, #8b5cf6 50%, #3b82f6);
  box-shadow: 0 0 10px rgba(139,92,246,.45);
  transform-origin: 50% 100%;
  transition: transform var(--fill-time) linear;
}
.js .journey:not(.lit) .journey-fill { transform: scaleY(0); }

.journey-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.journey-list > li { position: relative; }
/* Pastille : s'allume quand le remplissage l'atteint (--t posé par script.js) */
.journey-list > li::before {
  content: ""; position: absolute; left: calc(var(--rail) + 1px - 44px - 9px); top: 26px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--k); border: 4px solid var(--bg);
  box-shadow: 0 0 0 2px var(--k), 0 0 16px var(--k);
  transition: background .3s, box-shadow .3s; transition-delay: var(--t, 0s);
}
.js .journey:not(.lit) .journey-list > li::before {
  background: var(--bg); box-shadow: 0 0 0 2px color-mix(in srgb, var(--k) 45%, transparent);
}
.j-tag {
  display: inline-block; margin-bottom: .6em; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent);
}
.journey-list .org { margin-bottom: 0; }
.journey-list ul { margin: .6em 0 0; padding-left: 20px; color: var(--muted); }
.journey-list .card > p:last-child { margin-top: .6em; }

/* Extrémités : « Aujourd'hui » (flèche en haut) et « Départ » (cercle en bas) */
.journey-end {
  position: relative; margin: 0; padding: 4px 0;
  color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
}
.journey-now { margin-bottom: 16px; }
.journey-start { margin-top: 16px; }
.journey-end::before { content: ""; position: absolute; top: 50%; translate: 0 -50%; }
.journey-now::before {
  left: calc(var(--rail) + 1px - 44px - 9px); width: 18px; height: 14px;
  background: #3b82f6; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transition: background .3s var(--fill-time);
}
.journey-now { color: var(--accent); transition: color .3s var(--fill-time); }
.js .journey:not(.lit) .journey-now { color: var(--muted); }
.js .journey:not(.lit) .journey-now::before { background: var(--border); }
.journey-start::before {
  left: calc(var(--rail) + 1px - 44px - 7px); width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid #22d3ee; background: var(--bg);
}

.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.tl-head h3 { margin: 0; }
.tl-head time { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.org { color: var(--accent); font-weight: 500; font-size: .95rem; margin: .2em 0 .6em; }

/* Grand écran : rail au centre, étapes en alternance à gauche et à droite */
@media (min-width: 761px) {
  .journey { padding-left: 0; --rail: calc(50% - 1px); --gap: 36px; }
  .journey-list > li { width: calc(50% - var(--gap)); }
  .journey-list > li:nth-child(odd)  { justify-self: start; }
  .journey-list > li:nth-child(even) { justify-self: end; }
  .journey-list > li:nth-child(odd)::before  { left: auto; right: calc(-1 * var(--gap) - 9px); }
  .journey-list > li:nth-child(even)::before { left: calc(-1 * var(--gap) - 9px); }
  .journey-end { padding-left: calc(50% + 20px); }
  .journey-now::before { left: calc(50% - 9px); }
  .journey-start::before { left: calc(50% - 7px); }
}

/* ---------- Réalisations ---------- */
.tag { display: inline-block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: .6em; }
.project .result { color: var(--text); font-weight: 700; margin-top: 1em; }

/* ---------- Contact & pied de page ---------- */
.contact { text-align: center; padding-bottom: 80px; }
.footer { border-top: 1px solid var(--border); padding: 24px 0; text-align: center; color: var(--muted); font-size: .9rem; }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */

/* ---------- Décor d'arrière-plan : orbes flottants, blobs qui se déforment, grille ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
  animation: float 18s ease-in-out infinite; will-change: transform;
}
.orb-1 { width: 560px; height: 560px; top: 2%; right: -8%; background: radial-gradient(circle, rgba(139,92,246,.35), transparent 70%); }
.orb-2 { width: 480px; height: 480px; top: 36%; left: -10%; background: radial-gradient(circle, rgba(59,130,246,.32), transparent 70%); animation-delay: -6s; }
.orb-3 { width: 520px; height: 520px; bottom: 6%; right: 2%; background: radial-gradient(circle, rgba(34,211,238,.22), transparent 70%); animation-delay: -12s; }
.blob {
  position: absolute; filter: blur(55px); opacity: .4;
  background: linear-gradient(135deg, rgba(96,165,250,.6), rgba(167,139,250,.55), rgba(103,232,249,.4));
  animation: morph 14s ease-in-out infinite, float 24s ease-in-out infinite; will-change: transform, border-radius;
}
.blob-1 { width: 420px; height: 420px; top: 15%; left: 55%; }
.blob-2 { width: 340px; height: 340px; bottom: 10%; left: 8%; animation-delay: -7s; }
.grid-pattern {
  position: absolute; inset: 0; opacity: .7;
  background-image:
    linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 20%, #000 30%, transparent 100%);
}
@keyframes float {
  0%, 100% { transform: translate(0) scale(1); }
  25% { transform: translate(40px, -30px) scale(1.08); }
  50% { transform: translate(-30px, 40px) scale(.94); }
  75% { transform: translate(25px, 25px) scale(1.04); }
}
@keyframes morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
  75% { border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%; }
}

/* ---------- Barre de progression de lecture ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #22d3ee);
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ---------- Navigation : devient opaque après défilement ---------- */
.nav { background: transparent; border-bottom-color: transparent; transition: background .3s, box-shadow .3s, border-color .3s; }
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(15, 23, 42, .06);
}

/* ---------- Hero : projecteur, particules, titre en dégradé, anneau photo ---------- */
.hero { position: relative; }
.hero > :not(.hero-fx) { position: relative; z-index: 1; }
.hero-fx { position: absolute; inset: -72px -16px 0; overflow: hidden; pointer-events: none; }
.spotlight {
  position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 130%; height: 90%; filter: blur(24px);
  background: conic-gradient(from 90deg at 50% 0%, transparent 42%, rgba(59,130,246,.1) 47%, rgba(139,92,246,.16) 50%, rgba(59,130,246,.1) 53%, transparent 58%);
}
.particle {
  position: absolute; bottom: 18%; width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: linear-gradient(135deg, #60a5fa, #a78bfa); box-shadow: 0 0 12px rgba(139,92,246,.5);
  animation: particle-rise 9s linear infinite;
}
@keyframes particle-rise {
  0% { transform: translateY(0) scale(.5); opacity: 0; }
  12% { opacity: .8; }
  80% { opacity: .35; }
  100% { transform: translateY(-55vh) scale(1.2); opacity: 0; }
}

.title-gradient {
  background: linear-gradient(100deg, var(--text) 0%, #1d4ed8 38%, #7c3aed 68%, #c026d3 95%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: gradient-x 7s ease-in-out infinite;
}
@keyframes gradient-x { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.avatar-ring {
  width: 156px; height: 156px; margin: 0 auto 20px; padding: 6px; border-radius: 50%;
  background: conic-gradient(from var(--angle), #3b82f6, #8b5cf6, #22d3ee, #3b82f6);
  animation: spin 6s linear infinite, glow 3s ease-in-out infinite;
}
.avatar-ring .avatar { margin: 0; border: 4px solid var(--bg); box-shadow: none; }
@keyframes spin { to { --angle: 360deg; } }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 18px rgba(139,92,246,.25); }
  50% { box-shadow: 0 0 40px rgba(139,92,246,.45), 0 0 60px rgba(59,130,246,.15); }
}

.dot { position: relative; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.5s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* Indicateur « Défiler » avec souris animée */
.scroll-hint {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 48px;
  color: var(--muted); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .15em;
  opacity: 0; animation: fade-in 1s 1.5s forwards; transition: opacity .4s;
}
.scroll-hint:hover { text-decoration: none; color: var(--accent); }
.scroll-hint .mouse { width: 24px; height: 40px; border: 2px solid color-mix(in srgb, #8b5cf6 45%, transparent); border-radius: 999px; display: flex; justify-content: center; padding-top: 6px; }
.scroll-hint .mouse span { width: 4px; height: 8px; border-radius: 4px; background: #8b5cf6; animation: wheel 1.6s ease-in-out infinite; }
.scrolled-past .scroll-hint { opacity: 0 !important; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Titres de section : souligné en dégradé animé ---------- */
.section h2::after {
  content: ""; display: block; width: 76px; height: 4px; margin-top: 14px; border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #22d3ee, #3b82f6); background-size: 250% 100%;
  animation: gradient-x 4s linear infinite; box-shadow: 0 2px 10px rgba(139,92,246,.4);
}
.contact h2::after { margin-inline: auto; }

/* ---------- Cartes : verre dépoli, soulèvement, reflet au survol, bordure animée ---------- */
.card, .values li, .stats div {
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), box-shadow .35s, border-color .35s;
}
.card:hover, .values li:hover, .stats div:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,.55);
  box-shadow:
    0 0 0 1px rgba(139,92,246,.25),
    0 18px 45px rgba(139,92,246,.28),
    -12px 0 40px rgba(59,130,246,.18),
    12px 0 40px rgba(34,211,238,.16);
}
/* Halo coloré bleu → violet → cyan qui s'allume au survol */
.card::after, .values li::after, .stats div::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(59,130,246,.16), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(34,211,238,.14), transparent 60%),
    linear-gradient(135deg, rgba(139,92,246,.08), rgba(139,92,246,.12));
  opacity: 0; transition: opacity .45s ease;
}
.card:hover::after, .values li:hover::after, .stats div:hover::after { opacity: 1; }
.project::before {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(59,130,246,.7), rgba(139,92,246,.65), rgba(34,211,238,.4), rgba(139,92,246,.7));
  background-size: 300% 300%; animation: gradient-x 8s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.chips li { transition: transform .25s, border-color .25s, color .25s; }
.chips li:hover { transform: translateY(-3px) scale(1.05); border-color: var(--accent); color: var(--accent); }
.btn { transition: transform .25s, box-shadow .25s, filter .25s, border-color .25s; }
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn.primary { background: linear-gradient(110deg, #2563eb, #7c3aed, #2563eb); background-size: 200% auto; border: 0; animation: gradient-x 6s ease infinite; box-shadow: 0 8px 24px rgba(99,102,241,.3); }
.values strong { display: block; }
.values li:hover strong { animation: wiggle .5s ease; }
@keyframes wiggle { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }

/* ---------- Tuiles « Certifications » et « Langues » : bulles reliées par des traits ---------- */
.hero > .stats { z-index: 3; }
.stats .pop-tile { overflow: visible; cursor: pointer; outline: none; }
.pop-tile:focus-visible { border-color: var(--accent); }
.tile-pop {
  --line-h: 56px;
  position: absolute; top: 100%; left: 50%;
  transform: translateX(calc(-50% + var(--shift, 0px)));
  padding-top: var(--line-h);
  visibility: hidden; pointer-events: none;
  transition: visibility 0s .4s;
}
.tile-pop ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.tile-pop li {
  width: 132px; padding: 12px 10px; border-radius: var(--radius); text-align: center;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 28%, transparent);
  opacity: 0; transform: translateY(-28px) scale(.6);
  transition: opacity .25s, transform .25s, box-shadow .3s;
}
.tile-pop li:hover { box-shadow: 0 14px 36px color-mix(in srgb, var(--c) 45%, transparent); }
.tile-pop strong { display: block; font-size: 1.05rem; color: var(--text); }
.tile-pop li > span { display: block; font-size: .75rem; color: var(--muted); }
.tile-lines { position: absolute; top: 0; left: 0; overflow: visible; filter: drop-shadow(0 0 4px rgba(139,92,246,.45)); }
.tile-lines path {
  fill: none; stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .2s;
}

/* Ouvert : au survol, au focus clavier, ou au toucher (classe .open) */
.pop-tile:hover .tile-pop, .pop-tile:focus-visible .tile-pop, .pop-tile.open .tile-pop {
  visibility: visible; pointer-events: auto; transition: visibility 0s;
}
.pop-tile:hover .tile-lines path, .pop-tile:focus-visible .tile-lines path, .pop-tile.open .tile-lines path {
  stroke-dashoffset: 0; transition: stroke-dashoffset .5s cubic-bezier(.65, 0, .35, 1);
}
.pop-tile:hover li, .pop-tile:focus-visible li, .pop-tile.open li {
  opacity: 1; transform: none;
  transition: opacity .35s, transform .6s cubic-bezier(.22, 1.4, .36, 1), box-shadow .3s;
}
/* Cascade : --i (0, 1, 2…) est posé par script.js sur chaque bulle et chaque trait */
.pop-tile:hover li, .pop-tile:focus-visible li, .pop-tile.open li { transition-delay: calc(.3s + var(--i) * .08s); }
.pop-tile:hover .tile-lines path, .pop-tile:focus-visible .tile-lines path, .pop-tile.open .tile-lines path { transition-delay: calc(var(--i) * .06s); }
@media (max-width: 520px) {
  .tile-pop { --line-h: 44px; }
  .tile-pop ul { gap: 8px; }
  .tile-pop li { width: 104px; padding: 10px 6px; }
  .tile-pop li:nth-last-child(4), .tile-pop li:nth-last-child(4) ~ li { width: 82px; padding: 8px 4px; }
  .tile-pop li:nth-last-child(4) strong, .tile-pop li:nth-last-child(4) ~ li strong { font-size: .9rem; }
  .tile-pop li:nth-last-child(4) > span, .tile-pop li:nth-last-child(4) ~ li > span { font-size: .68rem; }
}

/* ---------- Apparition au défilement (activée par script.js) ---------- */
.js [data-reveal] {
  opacity: 0;
  transition: opacity .8s ease-out, transform .9s cubic-bezier(.22, 1.2, .36, 1);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="up"] { transform: translateY(60px); }
.js [data-reveal="left"] { transform: translateX(-80px); }
.js [data-reveal="right"] { transform: translateX(80px); }
.js [data-reveal="zoom"] { transform: scale(.85); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Pastilles de la chronologie qui « rebondissent » quand le remplissage les atteint */
.journey.lit .journey-list > li::before { animation: pulse-in .6s var(--t, 0s); }
@keyframes pulse-in { 60% { transform: scale(1.35); } }
@keyframes bounce-in {
  0% { opacity: 0; transform: scale(.5); }
  60% { opacity: 1; transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---------- Respect de « réduire les animations » ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .scroll-hint { opacity: 1; }
}

/* ---------- Page contact (contact.html, merci.html) ---------- */
.contact-page { max-width: 640px; padding-bottom: 80px; }
.contact-page.thanks { text-align: center; min-height: 60vh; }
.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea { resize: vertical; }
.contact-form .btn { align-self: flex-start; font: inherit; font-weight: 600; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { color: var(--muted); font-size: .85rem; margin: -8px 0 0; }
.form-error { color: #dc2626; font-size: .9rem; margin: 0; }
.honey { display: none; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
