/* ══════════════════════════════════════════════════════════════
   JOYEUX ANNIVERSAIRE RENAUD SOVI-GUIDI - DEV WEB BACK/FRONT-END
   Thème « IDE / Terminal / Déploiement », charte rouge & noir
   reprise du hero d'ouverture (portrait cyber sur fond HUD rouge).
   Palette  : rouge #E5142C · rouge clair #FF5568 · rouge foncé
              #A80F22 · noir #0B0303 · blanc cassé #F5F5F7
              (le vert #1F9D5B sert UNIQUEMENT aux états « succès »
              : tests passés, build déployé)
   Polices  : Space Grotesk (titres) + Inter (texte) + JetBrains
              Mono (terminal/code) + Archivo Black (nom du hero)
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Un seul rouge pour tout le site (le nom géant du hero utilisait un
     rouge plus vif à part ; unifié pour que le hero et le reste du site
     partagent exactement la même couleur). */
  --red: #e5142c;
  --red-soft: #ff5568;
  --red-deep: #a80f22;
  --ok: #1f9d5b;
  --ok-soft: #4ecb8a;
  --black: #0b0303;
  --black-2: #170608;
  --paper: #f5f5f7;
  --paper-2: #e8e8ec;
  --ink: #16161a;
  --ink-soft: #5d5d67;
  --white: #ffffff;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --radius: 20px;
  --shadow-soft: 0 18px 46px rgba(11, 3, 3, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.mono {
  font-family: var(--font-mono);
}
em {
  color: var(--red-deep);
  font-style: normal;
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap--narrow {
  max-width: 780px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--red-deep);
  background: rgba(229, 20, 44, 0.08);
  border: 1px solid rgba(229, 20, 44, 0.25);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
}
.eyebrow--dark {
  color: var(--red);
  background: rgba(255, 85, 104, 0.14);
  border-color: rgba(255, 85, 104, 0.32);
}
.section {
  position: relative;
  padding: 96px 0;
}
.section--dark {
  background: var(--black);
  color: var(--paper);
}
.section--dark em {
  color: var(--red);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  text-decoration: none;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(229, 20, 44, 0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(229, 20, 44, 0.42);
}
.btn--outline {
  background: transparent;
  color: inherit;
  border: 1.5px solid rgba(22, 22, 26, 0.3);
}
.section--dark .btn--outline {
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--outline:hover {
  border-color: var(--red);
  color: var(--red);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].vis {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════ BOOT LOADER "compiling..." ═══════════════ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--black);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.boot.done {
  display: none;
}
.boot__panel {
  width: min(90vw, 460px);
  padding: 28px 26px;
}
.boot__line {
  font-size: 0.9rem;
  opacity: 0;
  margin-bottom: 8px;
  transform: translateX(-8px);
  transition: opacity 0.4s, transform 0.4s;
}
.boot__line.show {
  opacity: 1;
  transform: translateX(0);
}
.boot__line--ok {
  color: var(--ok-soft);
}
.boot__bar {
  margin-top: 18px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.boot__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-deep), var(--red-soft));
  transition: width 0.3s linear;
}
.boot__hint {
  margin-top: 14px;
  font-size: 0.72rem;
  opacity: 0.55;
}

/* ═══════════════════ COVER - grand hero d'ouverture ═══════════ */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  isolation: isolate;
}
.cover__bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-cover-bg.png");
  background-size: cover;
  background-position: center right;
  z-index: -3;
}
/* Pas de fondu vers le blanc en bas : la section se termine net, la coupe
   de la photo tombe pile sur la limite du hero. */
.cover__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
      to bottom,
      rgba(6, 2, 2, 0.55) 0%,
      rgba(6, 2, 2, 0.05) 24%,
      rgba(6, 2, 2, 0.22) 100%
    ),
    linear-gradient(to right, rgba(6, 2, 2, 0.4), transparent 55%);
}
/* z-index 1 : au-dessus du fond/scrim (-3/-2), en dessous du titre (2) et
   du portrait (3). Le vortex tourne donc VISUELLEMENT derrière lui, tout en
   dépassant dans les zones vides autour de la silhouette. `screen` fait
   « briller » le rouge sur le fond sombre au lieu de le couvrir platement. */
.cover__vortex {
  position: absolute;
  inset: 0;
  z-index: 1;
  mix-blend-mode: screen;
  pointer-events: none;
}

.cover__topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
}
.cover__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cover__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.cover__brand-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.cover__menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Message de l'équipe : pas d'encart, juste du texte, mais assez gros,
   contrasté et animé pour qu'on le remarque. */
.cover__quote {
  position: relative;
  z-index: 5;
  order: 2;
  max-width: 420px;
  padding: 6px 26px 0;
  font-family: var(--font-body);
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.8s var(--ease) 0.35s, transform 0.8s var(--ease) 0.35s;
}
.cover.is-live .cover__quote {
  opacity: 1;
  transform: translateX(0);
}
.cover__quote p {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  /* le fond du hero est chargé : une ombre portée décolle le texte */
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
  quotes: "«\00a0" "\00a0»";
}
.cover__quote p::before {
  content: open-quote;
  color: var(--red);
}
.cover__quote p::after {
  content: close-quote;
  color: var(--red);
}
.cover__quote-sign {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--red);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.cover__stage {
  order: 3;
  position: relative;
  flex: 1;
  min-height: 54vh;
  margin-top: 6px;
}
/* Tout le bloc titre (sur-titre + nom) passe DERRIÈRE le portrait
   (z-index 2 < 3). Le portrait étant un PNG détouré, les lettres
   réapparaissent de part et d'autre de sa silhouette. */
.cover__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  text-align: center;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
}
.cover__kicker {
  display: block;
  /* Bebas Neue : lettres hautes et étroites, bien plus « élancées » que
     l'Archivo Black utilisée avant sur ces deux textes du hero. */
  font-family: "Bebas Neue", var(--font-display), sans-serif;
  /* cette valeur de base ne s'applique qu'au vrai mobile : tablette et
     desktop ont chacun leur propre font-size plus bas dans le fichier */
  font-size: min(8.5vw, 4.4rem);
  letter-spacing: 0.3em;
  /* letter-spacing ajoute une chasse après la dernière lettre : on
     recentre en décalant de la moitié */
  margin-left: 0.17em;
  color: #fff;
  margin-bottom: 0.12em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(-22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.cover.is-live .cover__kicker {
  opacity: 1;
  transform: translateY(0);
}
.cover__name-line {
  display: block;
  font-family: "Bebas Neue", var(--font-display), sans-serif;
  font-size: min(35vw, 15.6rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: var(--red);
  /* liseré blanc autour de chaque lettre ; paint-order place le contour
     DERRIÈRE le remplissage, sinon le trait rongerait la lettre */
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
/* Le nom ne passe sur une seule ligne qu'à partir du vrai desktop : en
   dessous (tablette comprise), il reste empilé sur deux lignes. */
@media (min-width: 1025px) {
  .cover__name-line {
    display: inline-block;
    /* Bebas Neue est bien plus étroite qu'Archivo Black : on peut monter
       la taille sans que le nom ne devienne plus large qu'avant. */
    font-size: min(11.5vw, 11.8rem);
    -webkit-text-stroke-width: 4px;
  }
}
.cover__name-line--1 {
  transform: translateX(-60px);
}
.cover__name-line--2 {
  transform: translateX(60px);
  transition-delay: 0.12s;
}
.cover.is-live .cover__name-line--1,
.cover.is-live .cover__name-line--2 {
  opacity: 1;
  transform: translateX(0);
}

.cover__photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  height: min(82vh, 840px);
  max-width: 96vw;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  opacity: 0;
  transform: translateX(-50%) translateY(30px) scale(0.98);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5));
  transition: opacity 1s var(--ease) 0.25s, transform 1s var(--ease) 0.25s;
}
.cover.is-live .cover__photo {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.cover__foot {
  order: 4;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 26px;
}
.cover__birthday {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cover__scroll {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-body);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  animation: coverBounce 2.2s ease-in-out infinite;
}
@keyframes coverBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@media (min-width: 1025px) {
  /* Le pied sort du flux et se superpose au bas de la section : la scène
     (donc la coupe de la photo) descend alors jusqu'à la limite du hero. */
  .cover__foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
  }
  .cover__title {
    bottom: 50%;
  }
  /* Assez large pour dépasser de part et d'autre du portrait (~550 px) */
  .cover__kicker {
    font-size: min(5vw, 4.2rem);
  }
}

@media (max-width: 1024px) {
  .cover__quote {
    order: 4;
    max-width: 520px;
    margin: 14px auto 0;
    text-align: center;
    padding: 0 22px;
  }
  /* Marge basse pour dégager les boutons flottants (musique / haut de page) */
  .cover__foot {
    order: 5;
    justify-content: center;
    padding-bottom: 96px;
  }
  .cover__scroll {
    display: none;
  }
  .cover__stage {
    order: 3;
    min-height: 50vh;
  }
  /* Le nom passe derrière la tête/le buste et déborde volontairement
     sur les côtés (rogné par .cover), comme sur la maquette mobile. */
  .cover__title {
    bottom: 50%;
  }
  .cover__name-line {
    font-size: min(19vw, 7.6rem);
  }
  .cover__photo {
    height: min(60vh, 580px);
    max-width: 108vw;
  }
}

/* Tablette : même disposition qu'en mobile (nom empilé sur deux lignes,
   citation sous la photo), mais typographie nettement plus grosse.
   Placé APRÈS le bloc max-width:1024px pour le surcharger. */
@media (min-width: 769px) and (max-width: 1024px) {
  .cover__title {
    bottom: 38%;
  }
  .cover__name-line {
    font-size: min(17.5vw, 9rem);
  }
  .cover__kicker {
    font-size: min(5.6vw, 3.4rem);
  }
  .cover__photo {
    height: min(66vh, 700px);
    max-width: 96vw;
  }
  /* Sans largeur max, la citation tient presque sur une ligne et laisse le
     guillemet fermant orphelin sur la suivante. */
  .cover__quote {
    max-width: 620px;
    margin: 14px auto 0;
  }
  .cover__quote p {
    font-size: 1.35rem;
    text-wrap: balance;
  }
}

@media (max-width: 420px) {
  .cover__brand-text {
    font-size: 0.64rem;
  }
}

/* ═══════════════════════════ HERO ══════════════════════════════ */
.hero {
  position: relative;
  padding: 70px 0 90px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  /* stretch, pas center : les deux cartes doivent faire la même hauteur */
  align-items: stretch;
}
.hero__grid > * {
  min-width: 0;
}
.editor {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.editor__tabbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid rgba(22, 22, 26, 0.08);
}
.editor__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
/* Pastilles de fenêtre : on garde les couleurs macOS, reconnaissables */
.editor__dot--r {
  background: #ff5f57;
}
.editor__dot--y {
  background: #febc2e;
}
.editor__dot--g {
  background: #28c840;
}
.editor__tab {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--white);
  padding: 4px 12px;
  border-radius: 8px 8px 0 0;
}
.editor__body {
  padding: 34px 34px 38px;
}
.editor__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--white);
  background: var(--red);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero__cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--red);
  margin-left: 4px;
  vertical-align: -0.15em;
  animation: blink 1s step-end infinite;
}
.hero__title {
  font-size: clamp(2rem, 4vw, 2.7rem);
  margin-bottom: 6px;
}
.hero__role {
  font-family: var(--font-mono);
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 22px;
}
.hero__desc {
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__photo-wrap {
  position: relative;
}
/* Même carte que .editor à côté : fond blanc, coins arrondis, barre
   d'onglet façon fenêtre, pour que les deux moitiés du hero se répondent.
   height:100% + flex : la carte remplit toute la hauteur que le grid
   (align-items:stretch) lui donne, calée sur la hauteur de .editor. */
.photo-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.hero__photo {
  display: block;
  width: 100%;
  /* La photo (portrait, assez haute à l'origine) doit rester plus basse
     que .editor, sinon c'est elle qui impose sa hauteur à toute la ligne
     de la grille (et .editor s'étire avec du vide en dessous). Cet
     aspect-ratio plafonne sa hauteur "naturelle" ; flex:1 peut encore
     l'agrandir (jamais la réduire) si .editor s'avère plus haut. */
  aspect-ratio: 4/5;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  /* léger dé-jaunissement : le mur ocre de la photo jurait sur le blanc */
  filter: saturate(0.88) contrast(1.05);
}
.hero__glyph {
  position: absolute;
  font-family: var(--font-mono);
  color: rgba(229, 20, 44, 0.28);
  font-size: 1.6rem;
  animation: floaty 7s ease-in-out infinite;
}
.hero__glyph--1 {
  top: 14%;
  left: 4%;
  animation-delay: 0.4s;
}
.hero__glyph--2 {
  bottom: 18%;
  right: 8%;
  color: rgba(229, 20, 44, 0.32);
  animation-delay: 2s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

/* ═══════════════════════ GIT LOG / BIO ════════════════════════ */
.gitlog__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 18px;
}
.gitlog__list {
  border-left: 2px solid rgba(229, 20, 44, 0.25);
  padding-left: 26px;
  margin-top: 30px;
}
.gitlog__item {
  position: relative;
  padding-bottom: 26px;
}
.gitlog__item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--paper);
}
.gitlog__hash {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--red-deep);
}
.gitlog__msg {
  font-weight: 600;
  margin: 4px 0 4px;
}
.gitlog__body {
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ═══════════════════════ STACK & COMPTEURS ══════════════════════ */
.stack__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 10px;
}
.stack__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 46px;
}
.badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--paper);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  text-align: center;
  padding: 22px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--red);
}
.stat__label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

/* ═══════════════════════ CHANGELOG TIMELINE ══════════════════════ */
.changelog__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 10px;
}
.changelog__list {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.changelog__item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.changelog__version {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--red);
}
.changelog__item h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.changelog__item p {
  color: var(--ink-soft);
}
.changelog__todo {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--red-deep);
  background: rgba(229, 20, 44, 0.1);
  border-radius: 6px;
  padding: 2px 8px;
}
.changelog__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.changelog__gallery img {
  border-radius: 12px;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ═══════════════════════ QUIZ "run tests" ══════════════════════ */
.quiz__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.quiz__card {
  margin-top: 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 30px;
  /* carte claire posée sur une section sombre : on rétablit l'encre,
     sinon le texte hérite du blanc de .section--dark et disparaît */
  color: var(--ink);
}
.quiz__progress {
  height: 6px;
  border-radius: 4px;
  background: var(--paper-2);
  overflow: hidden;
  margin-bottom: 14px;
}
.quiz__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ok);
  transition: width 0.4s var(--ease);
}
.quiz__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.quiz__question {
  font-weight: 600;
  margin-bottom: 16px;
}
.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz__option {
  font-family: var(--font-body);
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(22, 22, 26, 0.14);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.quiz__option:hover:not(:disabled) {
  border-color: var(--red);
}
.quiz__option.correct {
  border-color: var(--ok);
  background: rgba(31, 157, 91, 0.16);
}
.quiz__option.wrong {
  border-color: var(--red);
  background: rgba(229, 20, 44, 0.14);
}
.quiz__result {
  text-align: center;
}
.quiz__result-icon {
  font-size: 2rem;
  color: var(--ok);
  margin-bottom: 10px;
}
.quiz__result p {
  color: var(--ink-soft);
  margin: 10px 0 18px;
}

/* ═══════════════════════ COMMIT FEED (vœux) ══════════════════════ */
.feed__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.feed__panel {
  margin-top: 30px;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.feed__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--black);
}
.feed__bar .editor__dot {
  width: 10px;
  height: 10px;
}
.feed__filename {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}
.feed__list {
  max-height: 560px;
  overflow-y: auto;
  padding: 8px 0;
}
.feed__row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.feed__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feed__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  color: var(--paper);
}
.feed__hash {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red);
}
.feed__name {
  font-weight: 600;
}
.feed__role {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}
.feed__msg {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.85);
  /* certains vœux (ex. celui de M. TOSSAVI) ont des retours à la ligne
     volontaires dans leur texte ; sans pre-line ils seraient aplatis */
  white-space: pre-line;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.feed__row.open .feed__msg {
  /* certains vœux ont 3 paragraphes (Emery, Magloire) : marge large pour
     qu'ils ne soient jamais coupés, y compris sur mobile où ça wrap plus */
  max-height: 640px;
}
.feed__hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 8px;
}
.feed__more {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--black);
  color: var(--red);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
}
.feed__more:hover {
  background: var(--black-2);
}
.feed__row[hidden] {
  display: none;
}

/* ═══════════════════════ CITATION FINALE ══════════════════════ */
.quote {
  text-align: center;
  padding: 90px 0;
}
.quote__mark {
  font-size: 2rem;
  color: var(--red);
  margin-bottom: 14px;
}
.quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  max-width: 720px;
  margin: 0 auto 18px;
}
.quote__sign {
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

/* ═══════════════════════ FOOTER "deploy success" ══════════════════════ */
.footer {
  background: var(--black);
  color: var(--paper);
  padding: 60px 0 40px;
  text-align: center;
}
.footer__banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ok-soft);
  background: rgba(31, 157, 91, 0.12);
  border: 1px solid rgba(31, 157, 91, 0.3);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 18px;
}
.footer__wish {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.footer__copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ═══════════════════════ GALLERY - carrousel 3D ══════════════════════ */
.gallery__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.gallery__stage {
  position: relative;
  height: clamp(360px, 46vw, 560px);
  margin-top: 44px;
  /* la perspective, c'est ce qui donne sa profondeur au carrousel : sans
     elle, rotateY/translateZ n'ont aucun effet visuel de 3D. */
  perspective: 1600px;
  /* les photos latérales se dissolvent dans le fond plutôt que d'être
     coupées net sur les bords de la mise en page */
  mask-image: linear-gradient(
    to right,
    transparent,
    black 14%,
    black 86%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 14%,
    black 86%,
    transparent
  );
}
.gallery__stage::before {
  /* halo rouge derrière la carte active, discret, façon projecteur */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(70vw, 460px);
  height: 70%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(229, 20, 44, 0.16),
    transparent 70%
  );
  z-index: 0;
  pointer-events: none;
}
.gallery__track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.gallery__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(58vw, 320px);
  aspect-ratio: 3/4;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 25px 55px rgba(11, 3, 3, 0.32);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.85s ease,
    box-shadow 0.85s ease;
  will-change: transform, opacity, filter;
}
.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery__slide.is-active {
  cursor: default;
  box-shadow: 0 35px 70px rgba(229, 20, 44, 0.3),
    0 15px 34px rgba(11, 3, 3, 0.38);
}
.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s, color 0.2s;
}
.gallery__nav:hover {
  transform: translateY(-50%) scale(1.08);
  color: var(--red);
}
.gallery__nav--prev {
  left: 2%;
}
.gallery__nav--next {
  right: 2%;
}
.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 30px;
}
.gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--paper-2);
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s, background 0.3s;
}
.gallery__dot.active {
  background: var(--red);
  transform: scale(1.35);
}

/* ═══════════════════════ LIGHTBOX GALLERIE ══════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 3, 3, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox:not([hidden]) {
  opacity: 1;
}
.lightbox[hidden] {
  display: flex; /* garde la transition d'opacity jouable avant la coupe */
  pointer-events: none;
}
.lightbox__frame {
  position: relative;
  max-width: min(88vw, 760px);
  max-height: 84vh;
  margin: 0;
  transform: scale(0.94);
  transition: transform 0.3s var(--ease);
}
.lightbox:not([hidden]) .lightbox__frame {
  transform: scale(1);
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.lightbox__counter {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}
.lightbox__close,
.lightbox__nav {
  position: fixed;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--red);
  transform: scale(1.06);
}
.lightbox__close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 1.1rem;
}
.lightbox__nav:hover {
  transform: translateY(-50%) scale(1.06);
}
.lightbox__nav--prev {
  left: 3%;
}
.lightbox__nav--next {
  right: 3%;
}
@media (max-width: 640px) {
  .lightbox__nav {
    width: 42px;
    height: 42px;
  }
  .lightbox__nav--prev {
    left: 10px;
  }
  .lightbox__nav--next {
    right: 10px;
  }
  .lightbox__close {
    top: 14px;
    right: 14px;
  }
}

/* ═══════════════════════ BOOK 3D ══════════════════════ */
.book-section__title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.book-stage {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 48px;
}
/* Chaque .book3d__unit occupe la moitié droite (la page pas encore
   tournée) ; se coucher à -180° l'amène, visuellement, sur la moitié
   gauche (déjà lue) en pivotant autour de la reliure (transform-origin
   à gauche). La perspective sur .book3d est ce qui rend ce pivot en 3D
   au lieu d'un simple aplatissement. */
.book3d {
  position: relative;
  width: min(88vw, 680px);
  height: min(66vw, 480px);
  perspective: 2600px;
}
.book3d::before {
  /* ombre de reliure au centre, par-dessus toutes les pages */
  content: "";
  position: absolute;
  top: 1%;
  left: 50%;
  width: 26px;
  height: 98%;
  transform: translateX(-50%);
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.16),
    transparent
  );
  z-index: 300;
  pointer-events: none;
}
.book-stage::after {
  /* ombre portée au sol, pour ancrer le livre visuellement */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: min(70vw, 520px);
  height: 30px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(11, 3, 3, 0.28),
    transparent 72%
  );
  z-index: 0;
}
.book3d__unit {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 1s cubic-bezier(0.4, 0.1, 0.2, 1);
  cursor: pointer;
}
.book3d__unit.is-flipped {
  transform: rotateY(-180deg);
}
.book3d__unit--base {
  cursor: default;
  z-index: 1;
}
.book3d__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 20px 46px rgba(11, 3, 3, 0.28);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.book3d__face--front {
  border-radius: 0 14px 14px 0;
}
.book3d__face--back {
  transform: rotateY(180deg);
  border-radius: 14px 0 0 14px;
  background: var(--paper-2);
  align-items: center;
  justify-content: center;
}
.book3d__face--front img {
  width: 100%;
  height: 56%;
  object-fit: cover;
  flex-shrink: 0;
}
.book3d__wish {
  padding: 14px 18px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
  overflow-y: auto;
}
.book3d__glyph {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: rgba(229, 20, 44, 0.15);
}

/* Couverture : recto façon jaquette, verso façon dédicace */
.book3d__unit--cover {
  z-index: 200; /* toujours au-dessus tant qu'elle n'est pas tournée */
}
.book3d__unit--cover.is-flipped {
  z-index: 199;
}
.book3d__face--cover {
  /* pas de position:relative ici : ça écraserait le position:absolute
     de la règle de base, qui donne son plein format à la face
     (inset:0) ; .book3d__face est déjà positionné, inutile de le
     redéfinir pour servir de contexte à l'<img> interne. */
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.book3d__face--cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.08) brightness(0.5);
}
.book3d__cover-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 22px 22px 26px;
  background: linear-gradient(
    to top,
    rgba(11, 3, 3, 0.92),
    rgba(11, 3, 3, 0.2) 55%,
    rgba(11, 3, 3, 0.5)
  );
  color: var(--white);
}
.book3d__cover-tag {
  display: inline-block;
  background: var(--red);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  margin-bottom: 12px;
}
.book3d__cover-overlay h3 {
  font-family: "Bebas Neue", var(--font-display), sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.book3d__cover-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  animation: bookHintPulse 1.8s ease-in-out infinite;
}
@keyframes bookHintPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
.book3d__face--dedicace {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 28px;
}
.book3d__face--dedicace i {
  color: var(--red);
  font-size: 1.3rem;
}
.book3d__face--dedicace p {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 30ch;
}
.book3d__face--closing {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
}
.book3d__face--closing i {
  font-size: 2rem;
  color: var(--red);
}
.book3d__face--closing span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.book3d__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 250;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, color 0.2s, opacity 0.2s;
}
.book3d__nav:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.08);
  color: var(--red);
}
.book3d__nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.book3d__nav--prev {
  left: 0;
}
.book3d__nav--next {
  right: 0;
}
.book-section__page {
  text-align: center;
  margin-top: 34px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .book3d {
    width: min(78vw, 420px);
    height: min(104vw, 560px);
  }
  .book3d__nav {
    width: 40px;
    height: 40px;
  }
  .book3d__nav--prev {
    left: -6px;
  }
  .book3d__nav--next {
    right: -6px;
  }
  .book3d__wish {
    font-size: 0.78rem;
    padding: 10px 14px;
  }
  .book3d__face--front img {
    height: 60%;
  }
}

/* ═══════════════════════ FLOATING BUTTONS ══════════════════════ */
.floating {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 60;
}
.floating__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.floating__btn:hover {
  transform: scale(1.08);
}
/* Le bouton reste toujours rouge, que la musique joue ou non : c'est
   l'icône qui bouge pour indiquer l'état, pas la couleur du bouton. */
.floating__btn.playing i {
  animation: musicPulse 1.1s ease-in-out infinite;
}
@keyframes musicPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}
.floating__btn--top {
  background: var(--white);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
}
.floating__btn--top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

/* ═══════════════════════ RESPONSIVE ══════════════════════ */
@media (max-width: 1024px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__photo-wrap {
    min-height: 340px;
    order: -1;
  }
  .section {
    padding: 70px 0;
  }
  .changelog__item {
    grid-template-columns: 1fr;
  }
  .gallery__slide {
    width: min(66vw, 300px);
  }
  .gallery__nav {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }
  .editor__body {
    padding: 24px 22px 28px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .feed__row {
    grid-template-columns: 32px 1fr;
    padding: 12px 14px;
  }
}
@media (max-width: 420px) {
  .hero__title {
    font-size: 1.7rem;
  }
  .quote__text {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .cover__quote,
  .cover__kicker,
  .cover__name-line {
    opacity: 1 !important;
    transform: none !important;
  }
  /* .cover__photo garde translateX(-50%) : ce n'est pas l'animation
     d'entrée, c'est ce qui le centre horizontalement (left:50%). Un
     `transform:none` ici le décale hors centre. */
  .cover__photo {
    opacity: 1 !important;
    transform: translateX(-50%) !important;
  }
}
