/* yvesrobert.com : le système commun aux quatre pages.
   Un seul langage partout, celui de la page Gate by Gate : fond d'encre, texte crème,
   grande image en ouverture, titres gras, pastilles, cartes. Chaque page ne change que
   sa couleur d'accent : rouge pour les romans, ambre pour Gate by Gate, azur pour
   l'enseignement. */

/* ── Polices, hébergées avec le site (toutes sous licence libre) ───────────── */
@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("/assets/fonts/mulish.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --didone: "Bodoni Moda", Didot, "Bodoni MT", "Playfair Display", Georgia, serif;
  --sans: "Mulish", "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --fond: #0f1115;
  --surface: #151920;
  --creux: #0a0c0f;
  --trait: #272c35;
  --texte: #f3efe6;
  --doux: #d7d2c6;
  --discret: #9ba4ae;

  --rouge: #e8553f;
  --ambre: #ffb020;
  --azur: #6cb2ff;

  --accent: var(--rouge);          /* chaque page redéfinit ces trois-là */
  --accent-fond: var(--accent);
  --sur-accent: #0f1115;

  --marge: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: var(--sans); font-size: clamp(1.02rem, .96rem + .22vw, 1.14rem); line-height: 1.62;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hors-ecran {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Mise en page et texte ────────────────────────────────────────────────── */
.colonne { max-width: 72rem; margin-inline: auto; padding-inline: var(--marge); }
.partie { padding-top: clamp(4rem, 9vw, 7rem); }
.partie:last-child { padding-bottom: clamp(4rem, 9vw, 7rem); }

main p { margin: 0 0 1em; }
h2 { margin: 0 0 1rem; font-weight: 900; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.08; letter-spacing: -.015em; }
h3 { margin: 0 0 .4rem; font-weight: 800; font-size: 1.16em; line-height: 1.25; }
code { font-family: var(--mono); font-size: .9em; }
cite { font-style: italic; }
.intro { max-width: 38rem; color: #cfcabd; }
.accent { color: var(--accent); }
.lien { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.lien:hover { text-decoration-thickness: 2px; }

/* ── En-tête ──────────────────────────────────────────────────────────────── */
/* elle reste en haut de l'écran quand on fait défiler la page */
.entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .4rem 2rem;
  padding: .9rem var(--marge);
  background: rgba(15, 17, 21, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(39, 44, 53, .8);
}
.marque {
  font-family: var(--didone); font-optical-sizing: auto; font-weight: 400;
  font-size: 1.5rem; line-height: 1.2; letter-spacing: .005em;
  color: var(--texte); text-decoration: none;
}
.marque .point { color: var(--accent); }
.portes { display: flex; align-items: baseline; gap: clamp(1.1rem, 3vw, 2.2rem); margin: 0; padding: 0; list-style: none; }
.portes a {
  display: inline-block; padding: .3rem 0;
  font-weight: 700; font-size: .95rem; line-height: 1.2; letter-spacing: .01em;
  color: var(--discret); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s;
}
.portes a:hover { color: var(--texte); }
.portes a[aria-current="page"] { color: var(--texte); border-bottom-color: var(--accent); }

/* ── Boutons et pastilles ─────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.7rem 0 0; }
.bouton {
  display: inline-block; padding: .72rem 1.5rem;
  border: 1.5px solid var(--texte); border-radius: 99px;
  color: var(--texte); text-decoration: none;
  font-weight: 800; font-size: .98rem; line-height: 1.2; letter-spacing: .01em;
  transition: background-color .2s, color .2s, border-color .2s, filter .2s;
}
.bouton:hover { background: var(--texte); color: var(--fond); }
.bouton--plein { background: var(--accent-fond); border-color: var(--accent-fond); color: var(--sur-accent); }
.bouton--plein:hover { background: var(--accent-fond); border-color: var(--accent-fond); color: var(--sur-accent); filter: brightness(1.12); }

.etat { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pastille {
  display: inline-block; padding: .3rem .78rem;
  border: 1.5px solid var(--accent); border-radius: 99px;
  font-family: var(--mono); font-size: .72rem; font-weight: 700; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.pastille--attente { border-color: #3b424d; color: #aab2bc; }

.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 1.1rem; }

/* ── Ouverture d'une page : une grande image, le titre posé en haut ───────── */
.hero-scene { position: relative; isolation: isolate; }
.hero-image { width: 100%; aspect-ratio: 16 / 9; max-height: 84vh; object-fit: cover; object-position: 50% 68%; }
.hero-scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 17, 21, .88) 0%, rgba(15, 17, 21, .4) 20%, rgba(15, 17, 21, 0) 36%),
    linear-gradient(0deg, #0f1115 0%, rgba(15, 17, 21, 0) 28%);
}
.hero-titre { position: absolute; z-index: 2; top: 0; left: 0; right: 0; padding-top: clamp(1rem, 2.6vw, 2.4rem); }
.hero h1 {
  margin: 0;
  font-weight: 900; font-size: clamp(1.4rem, 3.1vw, 2.8rem); line-height: 1.04; letter-spacing: -.012em; text-transform: uppercase;
  text-shadow: 0 .05em .5em rgba(0, 0, 0, .6);
}
.hero-suite { position: relative; z-index: 2; margin-top: clamp(-4.5rem, -5vw, -2rem); }
.hero-chapeau { max-width: 40rem; font-size: 1.12em; color: #e6e1d5; }
.hero-legende { max-width: 40rem; font-size: .9rem; color: var(--discret); }

/* ── Une piste : une ligne, une pastille ronde par étape ──────────────────── */
.piste { margin: .4rem 0 0; padding: 0; list-style: none; }
.piste li { position: relative; padding: 0 0 1.8rem 2.5rem; }
.piste li:last-child { padding-bottom: 0; }
.piste li::before { content: ""; position: absolute; left: .47rem; top: 1.3rem; bottom: -.22rem; width: 2px; background: var(--accent); }
.piste li::after { content: ""; position: absolute; left: 0; top: .22rem; width: 1.06rem; height: 1.06rem; border: 3px solid var(--accent); border-radius: 50%; }
.piste .fait--dernier::before, .piste .a-venir::before { background: repeating-linear-gradient(180deg, #414955 0 5px, transparent 5px 10px); }
.piste .a-venir::after { border-color: #414955; }
.piste li:last-child::before { display: none; }
.piste h3 { margin-bottom: .2rem; font-size: 1.1em; }
.piste .a-venir h3 { color: #c9c4b8; }
.piste p { margin: 0; color: var(--discret); }
.repere { display: block; margin-bottom: .15rem; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .02em; color: var(--accent); }

/* ── Un bloc de code ──────────────────────────────────────────────────────── */
.terminal { margin: .3rem 0 0; }
.terminal pre {
  margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto;
  background: var(--creux); border: 1px solid var(--trait); border-radius: .7rem;
  font-family: var(--mono); font-size: .78rem; line-height: 1.85; color: var(--texte);
}
.terminal pre code { font-size: 1em; }
.terminal .rem { color: #717b87; }
.terminal figcaption { margin-top: .75rem; font-size: .9rem; color: var(--discret); }

/* ── Pied de page ─────────────────────────────────────────────────────────── */
.pied {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .6rem 2rem;
  padding: 1.6rem var(--marge) 2rem;
  border-top: 1px solid var(--trait);
  font-size: .92rem; line-height: 1.5; color: var(--discret);
}
.pied p { margin: 0; }
.pied ul { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.pied a { color: var(--texte); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.pied a:hover { text-decoration-thickness: 2px; }

/* ── Écrans étroits ───────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero h1 span { display: block; }
  .hero h1 { font-size: clamp(1.4rem, 5.6vw, 3.4rem); }
}
@media (max-width: 760px) {
  .hero-titre { position: static; padding-top: 1rem; padding-bottom: 1.2rem; }
  .hero-image { aspect-ratio: 16 / 11; object-position: 58% 60%; }
  .hero-scene::after { background: linear-gradient(0deg, #0f1115 0%, rgba(15, 17, 21, 0) 30%); }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 6.5rem; }
  .entete { gap: .1rem 1rem; padding: .6rem var(--marge); }
  .marque { font-size: 1.3rem; }
  .portes { gap: 1rem; }
  .portes a { padding: .2rem 0; font-size: .88rem; }
}
