/* ==========================================================================
   Blog-portfolio — Ilan Oudor
   Direction visuelle : noir profond teinté violet, display Geist en graisse
   légère et interlettrage serré, sigle pixel, dégradé chaud réservé au nom.
   Le fond ambiant est composé en CSS (aucune image importée).
   ========================================================================== */

:root {
  --nuit:      #05010e;
  --nuit-2:    #0b0618;
  --nuit-3:    #130c24;
  --bord:      #241a3a;
  --bord-vif:  #3a2b5c;

  --blanc:     #f3f3f1;
  --gris:      #a89fbd;
  --gris-2:    #6f6688;

  --or:        #f5a623;
  --rose:      #e94f8a;
  --violet:    #8b5cf6;
  --violet-2:  #a78bfa;
  --voile:     rgba(139, 92, 246, .12);
  --voile-bord:rgba(139, 92, 246, .3);

  --degrade: linear-gradient(96deg, var(--or) 0%, var(--rose) 42%, var(--violet) 78%);

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --pixel:'Silkscreen', 'Geist Mono', monospace;

  --page:   1120px;
  --etroit: 660px;
  --marge:  1.75rem;
  --rayon:  14px;
  --ease:   cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--nuit);
  color: var(--blanc);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.nav-ouverte { overflow: hidden; }

/* `overflow-x: hidden` sur body ferait de body un conteneur de défilement,
   ce qui casse les observateurs d'intersection et position:sticky.
   `clip` sur html coupe le débordement sans créer ce conteneur. */
html { overflow-x: clip; }

/* Fond ambiant : trois nappes lumineuses qui dérivent très lentement. */
.ambiance {
  position: fixed; inset: -20vmax; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38vmax 30vmax at 18% 12%, rgba(139, 92, 246, .20), transparent 60%),
    radial-gradient(32vmax 26vmax at 82% 8%,  rgba(233, 79, 138, .13), transparent 62%),
    radial-gradient(42vmax 32vmax at 60% 88%, rgba(90, 60, 180, .16), transparent 64%);
  filter: blur(30px);
  animation: derive 34s ease-in-out infinite alternate;
}
@keyframes derive {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -1.5%, 0) scale(1.06); }
  100% { transform: translate3d(-1.5%, 2%, 0) scale(1.02); }
}

/* Voile de bruit très léger : casse les aplats de dégradé. */
.ambiance::after {
  content: ""; position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .entete, .pied { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--violet-2); text-decoration: none; }
a:hover { color: var(--rose); }

:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-weight: 400; line-height: 1.08; letter-spacing: -.03em; margin: 0;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: -.015em; }
p  { margin: 0 0 1.15em; }

::selection { background: var(--violet); color: var(--blanc); }

.saut-contenu {
  position: fixed; left: -9999px; top: 0; z-index: 200;
  background: var(--violet); color: #fff; padding: .8rem 1.2rem; font-weight: 500;
}
.saut-contenu:focus { left: 0; }

/* Petites capitales pixel, l'équivalent des libellés de la référence */
.pixel {
  font-family: var(--pixel); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gris-2);
}

/* ------------------------------------------------------------------ trame */

.contenance { width: min(100% - 2 * var(--marge), var(--page)); margin-inline: auto; }
.contenance-etroite { width: min(100% - 2 * var(--marge), var(--etroit)); }
@media (max-width: 640px) { :root { --marge: 1.15rem; } }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: rgba(11, 6, 24, .55); border-block: 1px solid var(--bord); }

.section-tete {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.6rem;
}
.section-sur {
  font-family: var(--pixel); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--violet-2); margin: 0 0 .8rem;
}
.section-tete h2 { margin: 0; }

.lien-fleche {
  font-family: var(--mono); font-size: .8rem; color: var(--gris);
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
}
.lien-fleche::after { content: "→"; transition: transform .3s var(--ease); }
.lien-fleche:hover { color: var(--blanc); }
.lien-fleche:hover::after { transform: translateX(4px); }

/* ---------------------------------------------------------------- entête */

.entete {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: transform .45s var(--ease), background .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.entete-fond {
  background: rgba(5, 1, 14, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--bord);
}
.entete-cachee { transform: translateY(-100%); }
.entete-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}

.marque { display: flex; align-items: center; gap: .6rem; }
.marque-sigle { display: none; }
.marque-txt { display: flex; flex-direction: column; gap: .1rem; }
.marque-nom {
  font-family: var(--pixel); font-size: .82rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blanc);
}
.marque-role { font-family: var(--mono); font-size: .64rem; color: var(--gris-2); }
.marque:hover .marque-nom { color: var(--violet-2); }

.nav { display: flex; gap: .3rem; align-items: center; }
.nav a {
  position: relative; font-size: .87rem; color: var(--gris);
  padding: .45rem .85rem; border-radius: 999px; transition: color .25s;
}
.nav a span { position: relative; z-index: 1; }
.nav a::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .06); opacity: 0; transform: scale(.9);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.nav a:hover { color: var(--blanc); }
.nav a:hover::before { opacity: 1; transform: scale(1); }
.nav a[aria-current="page"] { color: var(--blanc); }
.nav a[aria-current="page"]::before {
  opacity: 1; transform: scale(1);
  background: var(--voile); box-shadow: inset 0 0 0 1px var(--voile-bord);
}

.burger { display: none; background: none; border: 0; padding: .6rem .3rem; cursor: pointer; width: 40px; }
.burger span {
  display: block; width: 20px; height: 1.5px; background: var(--blanc);
  margin: 0 auto; border-radius: 2px; transition: transform .35s var(--ease);
}
.burger span:first-child { transform: translateY(-3px); }
.burger span:last-child { transform: translateY(3px); }
.burger.actif span:first-child { transform: translateY(.75px) rotate(45deg); }
.burger.actif span:last-child { transform: translateY(-.75px) rotate(-45deg); }

@media (max-width: 800px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch;
    gap: .15rem; background: rgba(5, 1, 14, .98); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--bord); padding: 1rem var(--marge) 1.6rem;
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav.ouvert { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: .8rem 1rem; font-size: 1rem; border-radius: 10px; }
  .nav a::before { border-radius: 10px; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  min-height: min(88vh, 780px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 9rem 0 4rem; position: relative; text-align: center;
}
.hero .contenance { width: min(100% - 2 * var(--marge), 900px); }

.hero-sur {
  font-family: var(--mono); font-size: .74rem; color: var(--gris);
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 auto 2rem;
  padding: .4rem 1rem; border: 1px solid var(--bord-vif); border-radius: 999px;
  background: rgba(255, 255, 255, .03);
}
.pastille {
  display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--violet-2);
  animation: battement 2.6s ease-in-out infinite;
}
@keyframes battement {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(167, 139, 250, .55); }
  60%      { opacity: .75; box-shadow: 0 0 0 6px rgba(167, 139, 250, 0); }
}

/* Le nom : très grand, graisse légère, interlettrage serré, dégradé chaud. */
.hero-titre {
  font-size: clamp(3rem, 10.5vw, 7rem);
  font-weight: 300; letter-spacing: -.045em; line-height: 1;
  margin: 0 0 1.5rem;
  background: var(--degrade);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero-role {
  font-size: clamp(1rem, 2.1vw, 1.2rem); color: var(--gris);
  max-width: 40ch; margin: 0 auto 2.6rem; font-weight: 300;
}
.hero-role .sep { display: none; }

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }

.hero-defiler {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  width: 1px; height: 40px; overflow: hidden;
  background: linear-gradient(var(--bord-vif), transparent);
}
.hero-defiler span {
  position: absolute; inset: 0 auto auto 0; width: 1px; height: 14px;
  background: var(--violet-2); animation: glisse 2.4s var(--ease) infinite;
}
@keyframes glisse {
  0%   { transform: translateY(-14px); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}
@media (max-width: 800px) { .hero-defiler { display: none; } }

/* --------------------------------------------------------------- boutons */

.bouton {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.4rem; border-radius: 999px;
  border: 1px solid var(--bord-vif); color: var(--blanc);
  font-size: .88rem; font-weight: 400; background: rgba(255, 255, 255, .03);
  transition: border-color .3s var(--ease), transform .3s var(--ease), color .3s;
}
.bouton svg { width: 15px; height: 15px; flex: none; }
.bouton > * { position: relative; z-index: 1; }
.bouton::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: rgba(255, 255, 255, .07);
  transform: translateY(101%); transition: transform .4s var(--ease);
}
.bouton:hover { border-color: var(--voile-bord); transform: translateY(-2px); color: var(--blanc); }
.bouton:hover::before { transform: translateY(0); }

.bouton-plein {
  background: var(--blanc); color: #0a0512; border-color: transparent; font-weight: 500;
}
.bouton-plein::before { background: rgba(0, 0, 0, .08); }
.bouton-plein:hover { color: #0a0512; }

/* ------------------------------------------------------- bandeau défilant */

.ruban {
  border-block: 1px solid var(--bord);
  background: rgba(11, 6, 24, .5);
  padding: 1.1rem 0; overflow: hidden;
  display: flex; align-items: center; gap: 2rem;
}
/* Le libellé reste fixe pendant que la piste défile dessous : il lui faut
   donc son propre plan et un fond, sinon les deux se superposent. */
.ruban-libelle {
  flex: none; position: relative; z-index: 2;
  margin: 0; padding: 0 1.6rem 0 var(--marge);
  background: var(--nuit);
  box-shadow: 1.6rem 0 1.6rem -.6rem var(--nuit);
  font-family: var(--pixel); font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gris-2); line-height: 1.6;
}
.ruban-piste { display: flex; gap: 3rem; white-space: nowrap; animation: defile 38s linear infinite; }
.ruban:hover .ruban-piste { animation-play-state: paused; }
.ruban-item {
  font-family: var(--mono); font-size: .85rem; color: var(--gris);
  display: inline-flex; align-items: center; gap: .55rem;
}
.ruban-item::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--violet); opacity: .6;
}
@keyframes defile { to { transform: translateX(-50%); } }
@media (max-width: 640px) { .ruban-libelle { display: none; } }

/* -------------------------------------------------------------- chiffres */

.bande { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.grille-chiffres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px;
  background: var(--bord); border: 1px solid var(--bord); border-radius: var(--rayon);
  overflow: hidden;
}
.chiffre {
  background: var(--nuit); padding: 1.6rem 1.4rem;
  display: flex; flex-direction: column; gap: .3rem;
}
.chiffre-val {
  font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 300; letter-spacing: -.04em;
  line-height: 1; font-variant-numeric: tabular-nums;
  background: var(--degrade);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.chiffre-txt .chiffre-val { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.chiffre-lib {
  font-family: var(--mono); font-size: .7rem; color: var(--gris-2); line-height: 1.45;
}

/* --------------------------------------------------------------- cartes */

.grille-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.grille-cartes-liste { grid-template-columns: 1fr; }

.carte {
  position: relative; border: 1px solid var(--bord); border-radius: var(--rayon);
  background: rgba(11, 6, 24, .5); overflow: hidden;
  transition: border-color .35s var(--ease), transform .35s var(--ease), background .35s;
}
.carte::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(22rem 12rem at 50% 0%, rgba(139, 92, 246, .12), transparent 70%);
  transition: opacity .4s var(--ease);
}
.carte:hover { border-color: var(--bord-vif); transform: translateY(-3px); }
.carte:hover::before { opacity: 1; }

.carte-lien { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.6rem; height: 100%; }
.carte-num {
  font-family: var(--pixel); font-size: .68rem; color: var(--gris-2);
  padding-top: .35rem; flex: none; transition: color .3s;
}
.carte:hover .carte-num { color: var(--violet-2); }
.carte-corps { flex: 1; min-width: 0; }

.carte-meta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .71rem; color: var(--gris-2); margin-bottom: .6rem;
}
.puce { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.carte-titre {
  font-size: 1.22rem; font-weight: 500; letter-spacing: -.02em;
  margin: 0 0 .45rem; line-height: 1.3; color: var(--blanc);
  transition: color .3s;
}
.carte:hover .carte-titre { color: var(--violet-2); }
.carte-extrait { color: var(--gris); font-size: .9rem; margin: 0 0 .85rem; }

.carte-fleche {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--bord); border-radius: 50%; color: var(--gris-2); align-self: center;
  transition: transform .4s var(--ease), border-color .3s, color .3s, background .3s;
}
.carte-fleche svg { width: 15px; height: 15px; }
.carte:hover .carte-fleche {
  transform: translateX(3px); border-color: var(--voile-bord);
  color: var(--violet-2); background: var(--voile);
}

.grille-cartes-liste .carte-lien { padding: 1.8rem 1.9rem; }
.grille-cartes-liste .carte-titre { font-size: clamp(1.25rem, 2.3vw, 1.5rem); }
.grille-cartes-liste .carte-extrait { max-width: 72ch; }

@media (max-width: 560px) {
  .carte-lien { padding: 1.3rem; gap: .9rem; }
  .carte-fleche { display: none; }
}

.etiquettes { display: flex; gap: .4rem; flex-wrap: wrap; }
.etiquette {
  font-family: var(--mono); font-size: .68rem; color: var(--gris);
  border: 1px solid var(--bord); border-radius: 999px; padding: .15rem .6rem;
}

/* ---------------------------------------------------------- tête de page */

.tete-page { padding: clamp(7rem, 13vw, 9.5rem) 0 0; }
.tete-page h1 { margin-bottom: .5rem; font-size: clamp(2.2rem, 5.5vw, 3.4rem); }
.tete-chapo { color: var(--gris); max-width: 58ch; font-size: 1.05rem; font-weight: 300; margin: 0; }
.tete-page-404 { padding-bottom: clamp(4rem, 10vw, 8rem); }
.tete-page-404 .hero-actions { margin-top: 2rem; justify-content: flex-start; }

/* ------------------------------------------------------------- article */

.progression { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; }
.progression span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: var(--degrade);
}

.article-tete {
  padding: clamp(6.5rem, 12vw, 8.5rem) 0 2.4rem;
  border-bottom: 1px solid var(--bord); margin-bottom: 3rem;
}
.article-tete h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: .5rem 0 .8rem; }
.article-chapo { color: var(--gris); font-size: 1.05rem; font-weight: 300; margin-bottom: 1.2rem; }
.lien-retour {
  font-family: var(--mono); font-size: .78rem; color: var(--gris-2);
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.6rem;
  transition: gap .25s var(--ease), color .25s;
}
.lien-retour svg { width: 14px; height: 14px; }
.lien-retour:hover { color: var(--violet-2); gap: .65rem; }

.article-corps { padding-bottom: 4rem; font-size: 1.02rem; }
.article-corps p { color: #ddd8e8; }
.article-corps h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.6em 0 .7em; }
.article-corps h3 { margin: 2em 0 .5em; color: var(--blanc); }
.article-corps > :first-child { margin-top: 0; }
.article-corps ul, .article-corps ol { padding-left: 1.3rem; margin: 0 0 1.3em; color: #ddd8e8; }
.article-corps li { margin-bottom: .5em; }
.article-corps li::marker { color: var(--violet); }
.article-corps hr { border: 0; border-top: 1px solid var(--bord); margin: 3rem 0; }
.article-corps strong { color: var(--blanc); font-weight: 500; }
.article-corps a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

blockquote {
  margin: 1.9rem 0; padding: 1.1rem 1.4rem;
  border-left: 2px solid var(--violet); border-radius: 0 var(--rayon) var(--rayon) 0;
  background: rgba(139, 92, 246, .06); color: var(--blanc);
}
blockquote p:last-child { margin-bottom: 0; }

.bloc-code {
  background: #07030f; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1.1rem 1.2rem; overflow-x: auto; margin: 1.7rem 0; position: relative;
}
.bloc-code[data-lang] { padding-top: 2rem; }
.bloc-code[data-lang]::before {
  content: attr(data-lang); position: absolute; top: .5rem; left: 1.2rem;
  font-family: var(--pixel); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gris-2);
}
.bloc-code code { font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: #cfc6e4; white-space: pre; }
:not(pre) > code {
  font-family: var(--mono); font-size: .85em; color: var(--violet-2);
  background: rgba(139, 92, 246, .1); border: 1px solid var(--bord);
  padding: .1em .35em; border-radius: 5px;
}

.table-scroll { overflow-x: auto; margin: 1.8rem 0; border: 1px solid var(--bord); border-radius: var(--rayon); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--bord); }
th {
  background: rgba(255, 255, 255, .03); color: var(--blanc); font-weight: 500;
  font-family: var(--mono); font-size: .74rem; white-space: nowrap;
}
td { color: var(--gris); }
tbody tr:last-child td { border-bottom: 0; }

figure { margin: 2.2rem 0; }
figure svg { width: 100%; height: auto; display: block; }
.schema { background: rgba(11, 6, 24, .6); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.5rem; }
figcaption {
  margin-top: .9rem; font-family: var(--mono); font-size: .73rem;
  color: var(--gris-2); text-align: center; line-height: 1.55;
}

.svg-boite  { fill: rgba(255,255,255,.03); stroke: #3a2b5c; stroke-width: 1.2; }
.svg-accent { fill: #8b5cf6; }
.svg-trait  { stroke: #3a2b5c; stroke-width: 1.2; fill: none; }
.svg-flux   { stroke: #a78bfa; stroke-width: 1.2; fill: none; }
.svg-bloque { stroke: #e94f8a; stroke-width: 1.2; fill: none; stroke-dasharray: 5 4; }
.svg-texte  { fill: #f3f3f1; font-family: 'Geist Mono', monospace; font-size: 10.5px; }
.svg-libel  { fill: #a89fbd; font-family: 'Geist Mono', monospace; font-size: 9px; }
.schema svg { color: #a78bfa; }

@media (max-width: 640px) {
  .schema { overflow-x: auto; padding: .9rem; }
  .schema svg { min-width: 520px; }
}

.article-nav { border-top: 1px solid var(--bord); padding: 2.5rem 0 4rem; }
.article-nav-in { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.article-nav-lien {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 1.4rem;
  border: 1px solid var(--bord); border-radius: var(--rayon);
  transition: border-color .3s var(--ease), background .3s, transform .3s var(--ease);
}
.article-nav-lien:hover { border-color: var(--bord-vif); background: rgba(255,255,255,.03); transform: translateY(-2px); }
.article-nav-sens { font-family: var(--mono); font-size: .7rem; color: var(--gris-2); }
.article-nav-titre { font-size: .95rem; font-weight: 500; color: var(--blanc); letter-spacing: -.01em; }
.align-fin { text-align: right; align-items: flex-end; }
@media (max-width: 620px) {
  .article-nav-in { grid-template-columns: 1fr; }
  .align-fin { text-align: left; align-items: flex-start; }
}

/* ------------------------------------------------------------- à propos */

.grille-apropos { display: grid; grid-template-columns: 1fr 20rem; gap: 3.5rem; align-items: start; }
@media (max-width: 940px) { .grille-apropos { grid-template-columns: 1fr; gap: 2.4rem; } }
.apropos-texte p { color: var(--gris); max-width: 62ch; font-weight: 300; font-size: 1.02rem; }

.fiche {
  border: 1px solid var(--bord); border-radius: var(--rayon);
  background: rgba(11, 6, 24, .55); padding: 1.6rem; position: sticky; top: 92px;
}
@media (max-width: 940px) { .fiche { position: static; } }
.fiche-titre {
  font-family: var(--pixel); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--violet-2); margin: 0 0 1.2rem;
}
.fiche p { font-size: .92rem; color: var(--gris); }
.fiche-liste { margin: 0 0 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: .7rem 1rem; font-size: .89rem; }
.fiche-liste dt { font-family: var(--mono); font-size: .7rem; color: var(--gris-2); padding-top: .15rem; }
.fiche-liste dd { margin: 0; color: var(--blanc); line-height: 1.45; }
.fiche-actions { display: flex; flex-direction: column; gap: .6rem; }
.fiche-actions .bouton { justify-content: center; }

/* Chronologie */
.chrono { list-style: none; padding: 0; margin: 0; }
.chrono-item {
  display: grid; grid-template-columns: 11rem 1fr; gap: 1.6rem;
  padding: 1.6rem 0; border-top: 1px solid var(--bord); position: relative;
}
.chrono-item:first-child { border-top: 0; padding-top: 0; }
.chrono-item::after {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--degrade); transition: width .6s var(--ease);
}
.chrono-item:hover::after { width: 130px; }
@media (max-width: 720px) { .chrono-item { grid-template-columns: 1fr; gap: .4rem; } }
.chrono-periode { font-family: var(--mono); font-size: .76rem; color: var(--violet-2); padding-top: .3rem; }
.chrono-titre { font-size: 1.12rem; font-weight: 500; margin: 0 0 .15rem; }
.chrono-lieu { color: var(--gris); font-size: .92rem; margin: 0 0 .4rem; }
.chrono-details { color: var(--gris-2); font-size: .9rem; margin: 0; max-width: 66ch; }

/* Projets */
.grille-projets { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.projet {
  border: 1px solid var(--bord); border-radius: var(--rayon);
  background: rgba(11, 6, 24, .5); padding: 1.6rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.projet:hover { border-color: var(--bord-vif); transform: translateY(-3px); }
.projet-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.projet-tete h3 { margin: 0; }
.projet-periode { font-family: var(--mono); font-size: .7rem; color: var(--gris-2); white-space: nowrap; }
.projet-cadre { font-family: var(--mono); font-size: .74rem; color: var(--violet-2); margin: .25rem 0 1rem; }
.projet ul { padding-left: 1.1rem; margin: 0; }
.projet li { font-size: .89rem; color: var(--gris); margin-bottom: .45em; }
.projet li::marker { color: var(--bord-vif); }

/* Compétences */
.grille-competences { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.bloc-comp {
  border: 1px solid var(--bord); border-radius: var(--rayon);
  background: rgba(11, 6, 24, .45); padding: 1.4rem;
  transition: border-color .3s;
}
.bloc-comp:hover { border-color: var(--bord-vif); }
.bloc-comp h3 {
  font-family: var(--pixel); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet-2); margin: 0 0 1rem; font-weight: 400;
}
.puces-comp { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.puces-comp li {
  font-family: var(--mono); font-size: .76rem; color: var(--gris);
  border: 1px solid var(--bord); border-radius: 7px; padding: .25rem .6rem;
  transition: color .25s, border-color .25s;
}
.puces-comp li:hover { color: var(--blanc); border-color: var(--bord-vif); }

.grille-deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; margin-top: 2.8rem; }
.sous-titre {
  font-family: var(--pixel); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet-2); margin: 0 0 1rem;
}
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple li {
  font-size: .9rem; color: var(--gris); padding: .55rem 0; border-bottom: 1px solid var(--bord);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.liste-simple li:last-child { border-bottom: 0; }
.liste-simple strong { color: var(--blanc); font-weight: 500; }

/* --------------------------------------------------------------- contact */

.grille-contact { display: grid; grid-template-columns: 1fr 20rem; gap: 3.5rem; align-items: start; }
@media (max-width: 940px) { .grille-contact { grid-template-columns: 1fr; gap: 2.4rem; } }
.contact-liste { display: flex; flex-direction: column; gap: .8rem; }
.contact-carte {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 1.5rem;
  border: 1px solid var(--bord); border-radius: var(--rayon);
  background: rgba(11, 6, 24, .5);
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s;
}
.contact-carte:hover { border-color: var(--voile-bord); transform: translateX(4px); background: rgba(139,92,246,.06); }
.contact-icone {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--bord); border-radius: 10px; color: var(--violet-2);
  background: var(--voile);
}
.contact-icone svg { width: 18px; height: 18px; }
.contact-corps { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.contact-libelle { font-family: var(--pixel); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris-2); }
.contact-valeur { color: var(--blanc); word-break: break-word; }
.contact-fleche { flex: none; color: var(--gris-2); transition: transform .35s var(--ease), color .3s; }
.contact-fleche svg { width: 17px; height: 17px; }
.contact-carte:hover .contact-fleche { transform: translateX(3px); color: var(--violet-2); }

/* ----------------------------------------------------------------- appel */

.appel {
  border: 1px solid var(--bord); border-radius: calc(var(--rayon) + 6px);
  padding: clamp(2.2rem, 6vw, 3.6rem); text-align: center;
  background: radial-gradient(30rem 14rem at 50% 0%, rgba(139, 92, 246, .12), transparent 70%), rgba(11, 6, 24, .5);
}
.appel h2 { margin-bottom: .6rem; max-width: 24ch; margin-inline: auto; }
.appel p { color: var(--gris); max-width: 52ch; margin-inline: auto; margin-bottom: 1.8rem; }

/* ------------------------------------------------------------------ pied */

.pied { border-top: 1px solid var(--bord); padding: clamp(3rem, 6vw, 4rem) 0 2.2rem; background: rgba(11, 6, 24, .5); }
.pied-haut { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .pied-haut { grid-template-columns: 1fr 1fr; } .pied-marque { grid-column: 1 / -1; } }
.pied-nom { font-family: var(--pixel); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .6rem; }
.pied-note { font-family: var(--mono); font-size: .74rem; color: var(--gris-2); margin: 0; line-height: 1.7; }
.pied-col { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.pied-titre { font-family: var(--pixel); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris-2); margin: 0 0 .3rem; }
.pied-col a { font-size: .87rem; color: var(--gris); transition: color .25s, transform .25s var(--ease); }
.pied-col a:hover { color: var(--violet-2); transform: translateX(3px); }
.pied-copy {
  font-family: var(--mono); font-size: .72rem; color: var(--gris-2);
  margin: 2.4rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--bord);
}

/* ------------------------------------------------------ mouvement réduit */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ruban-piste { animation: none; }
  .ambiance { animation: none; }
  [data-anim] { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------- impression */

@media print {
  body { background: #fff; color: #111; }
  .ambiance, .entete, .pied, .article-nav, .progression, .ruban,
  .hero-actions, .fiche-actions, .saut-contenu, .hero-defiler, .carte-fleche { display: none !important; }
  .section, .tete-page, .article-tete, .hero, .bande { padding: 0 0 1rem; border: 0; min-height: 0; }
  .contenance, .contenance-etroite { width: 100%; }
  .hero-titre, .chiffre-val { -webkit-text-fill-color: #111; color: #111; background: none; }
  h1, h2, h3, .article-corps p, .article-corps li, td, .carte-titre { color: #111; }
  .carte, .projet, .bloc-comp, .fiche, .appel, .bloc-code, .schema, blockquote, .contact-carte {
    background: #fff; border: 1px solid #ccc; break-inside: avoid;
  }
  a { color: #111; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  h2, h3 { break-after: avoid; }
}
