/* L'Agenterie — feuille de style unique.
   Charte : celle de la bannière du 2026-09-07 (Syne 800 + Manrope, ambre sur nuit). */

:root {
  --nuit: #0d0b09;
  --bois: #17130f;
  --bois-clair: #221b14;
  --ambre: #e8a33d;
  --braise: #f0b45a;
  --cuivre: #b8672a;
  --ivoire: #efe9e0;
  --sable: #cdb692;
  --sable-sombre: #a8957a;
  --ligne: rgba(232, 163, 61, .18);
  --ligne-forte: rgba(232, 163, 61, .42);

  --display: "Syne", "Arial Black", sans-serif;
  --corps: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --mesure: 68ch;
  --gouttiere: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--nuit);
  color: var(--ivoire);
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

/* Surfaces du navigateur : elles portent la charte, elles aussi. */
::selection { background: var(--ambre); color: var(--nuit); }
html { scrollbar-color: var(--cuivre) var(--nuit); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--nuit); }
::-webkit-scrollbar-thumb { background: var(--cuivre); border-radius: 5px; border: 2px solid var(--nuit); }
:focus-visible { outline: 2px solid var(--braise); outline-offset: 4px; border-radius: 2px; }
a { color: var(--ambre); text-decoration-thickness: 1px; text-underline-offset: .2em; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }

.saut {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ambre); color: var(--nuit); padding: .6rem 1rem; border-radius: 4px;
  font-weight: 700; z-index: 100; transition: top .2s;
}
.saut:focus { top: 1rem; }

/* ─── Boutons ─────────────────────────────────────────────── */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.5rem;
  font-family: var(--corps); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border-radius: 6px; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out),
              transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .2s;
  border: 1.5px solid transparent;
}
.bouton--plein {
  background: var(--ambre); color: var(--nuit);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .7);
}
.bouton--plein:hover { background: var(--braise); transform: translateY(-2px); box-shadow: 0 12px 22px -10px rgba(0, 0, 0, .8); }
.bouton--plein:active { transform: translateY(0); }
.bouton--contour { color: var(--ivoire); border-color: var(--ligne-forte); background: rgba(13, 11, 9, .35); }
.bouton--contour:hover { border-color: var(--ambre); color: var(--braise); background: rgba(232, 163, 61, .08); }
.bouton--grand { font-size: clamp(1.05rem, 2vw, 1.35rem); padding: 1rem 2rem; font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }

/* ─── En-tête ─────────────────────────────────────────────── */
.entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: .75rem var(--gouttiere);
  background: rgba(13, 11, 9, .72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--ligne);
}
.marque {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em;
  color: var(--ivoire); text-decoration: none;
}
.marque img { width: 40px; height: 40px; }
.nav { display: flex; gap: 1.5rem; margin-inline: auto; flex-wrap: wrap; }
.nav a {
  color: var(--sable); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .5rem 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .2rem; height: 1.5px;
  background: var(--ambre); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav a:hover { color: var(--ivoire); }
.nav a:hover::after { transform: scaleX(1); }
.entete__contact { min-height: 42px; padding: .5rem 1.1rem; }

@media (max-width: 860px) {
  .nav { display: none; }
  .entete__contact { margin-left: auto; }
}

/* ─── Héro ────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate;
  min-height: calc(100svh - 66px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) var(--gouttiere) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}
.hero__fond, .hero__voile { position: absolute; inset: 0; z-index: -1; }
.hero__fond img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  animation: respirer 14s ease-in-out infinite alternate;
}
.hero__voile {
  background:
    linear-gradient(90deg, rgba(13, 11, 9, .88) 0%, rgba(13, 11, 9, .62) 45%, rgba(13, 11, 9, .5) 100%),
    linear-gradient(180deg, rgba(13, 11, 9, .15) 0%, rgba(13, 11, 9, 0) 40%, var(--nuit) 100%);
}
@keyframes respirer { from { transform: scale(1); filter: brightness(1); } to { transform: scale(1.045); filter: brightness(1.08); } }

.hero__titre {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: .98;
  letter-spacing: -.035em;
}
.hero__titre .ligne { display: block; }
.hero__titre em { font-style: normal; color: var(--ambre); }
.hero__sous {
  max-width: 34rem; margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--sable);
  font-weight: 500;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }

/* Chargement : les trois lignes du titre, puis le reste, dans l'ordre. */
.hero__titre .ligne, .hero__sous, .hero__actions, .etabli {
  opacity: 0; transform: translateY(18px); filter: blur(6px);
  animation: entrer .9s var(--ease-out) forwards;
}
.hero__titre .ligne:nth-child(1) { animation-delay: .05s; }
.hero__titre .ligne:nth-child(2) { animation-delay: .17s; }
.hero__titre .ligne:nth-child(3) { animation-delay: .29s; }
.hero__sous { animation-delay: .5s; }
.hero__actions { animation-delay: .65s; }
.etabli { animation-delay: .8s; }
@keyframes entrer { to { opacity: 1; transform: none; filter: none; } }

/* L'établi : le journal d'un agent, tapé ligne par ligne. */
.etabli {
  justify-self: end; width: min(100%, 30rem);
  background: rgba(23, 19, 15, .78);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .4) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: .85rem; line-height: 1.55;
}
.etabli__barre {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .95rem; border-bottom: 1px solid var(--ligne);
  color: var(--sable-sombre); font-size: .75rem; letter-spacing: .04em;
}
.etabli__voyant {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ambre);
}
.etabli__lignes { list-style: none; margin: 0; padding: .9rem .95rem 1rem; min-height: 15.5rem; }
.etabli__lignes li { color: var(--sable); white-space: pre-wrap; word-break: break-word; }
.etabli__lignes li.fait { color: var(--sable-sombre); }
.etabli__lignes li b { color: var(--ambre); font-weight: 500; }
.etabli__lignes li::before { content: "› "; color: var(--cuivre); }
.etabli__lignes li.encours::after {
  content: ""; display: inline-block; width: .55em; height: 1em; vertical-align: -.15em;
  background: var(--ambre); margin-left: .15em; animation: clignoter 1s steps(2) infinite;
}
@keyframes clignoter { to { opacity: 0; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .etabli { justify-self: stretch; width: 100%; }
}

/* ─── Blocs ───────────────────────────────────────────────── */
.bloc {
  padding: clamp(4rem, 9vw, 8rem) var(--gouttiere);
  max-width: 78rem; margin-inline: auto;
}
.bloc__tete {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.bloc__tete p { color: var(--sable); font-size: 1.1rem; max-width: var(--mesure); }
@media (max-width: 720px) { .bloc__tete { grid-template-columns: 1fr; } }

/* Apparition au défilement : une seule fois, discrète. */
.revele { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.revele.visible { opacity: 1; transform: none; }

/* Inventaire : une liste, pas des cartes. Deux colonnes séparées par des filets. */
.inventaire {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 5rem);
  border-top: 1px solid var(--ligne);
}
.inventaire li {
  padding: 1.75rem 0 1.85rem; border-bottom: 1px solid var(--ligne);
  display: grid; gap: .6rem;
  transition: transform .35s var(--ease-out);
  position: relative;
}
.inventaire li::before {
  content: ""; position: absolute; left: -1.4rem; top: 50%; width: .9rem; height: 2px; background: var(--ambre);
  transform: translateY(-50%) scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.inventaire li:hover { transform: translateX(1.4rem); }
.inventaire li:hover::before { transform: translateY(-50%) scaleX(1); }
.inventaire p { color: var(--sable); }
@media (max-width: 720px) { .inventaire { grid-template-columns: 1fr; } }

/* Bande image */
.bande { margin: 0; position: relative; }
.bande img { width: 100%; height: clamp(16rem, 42vw, 34rem); object-fit: cover; }
.bande figcaption {
  position: absolute; left: var(--gouttiere); right: var(--gouttiere); bottom: 1.5rem;
  max-width: 34rem; color: var(--ivoire); font-weight: 600; font-size: 1.05rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .9);
}
.bande::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--nuit) 0%, rgba(13, 11, 9, 0) 22%, rgba(13, 11, 9, 0) 65%, var(--nuit) 100%);
  pointer-events: none;
}
.bande figcaption { z-index: 1; }

/* Publics : liste de définitions, rythme éditorial. */
.publics { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 5vw, 5rem); }
.publics div { display: grid; gap: .55rem; padding-top: 1.1rem; border-top: 2px solid var(--ambre); }
.publics dt { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.publics dd { margin: 0; color: var(--sable); }
@media (max-width: 720px) { .publics { grid-template-columns: 1fr; } }

/* Étapes : la sequence porte une information, donc les numéros sont légitimes. */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; display: grid; gap: 0; }
.etapes li {
  counter-increment: etape;
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start;
  padding: 1.75rem 0; border-top: 1px solid var(--ligne);
}
.etapes li:last-child { border-bottom: 1px solid var(--ligne); }
.etapes li::before {
  content: counter(etape, decimal-leading-zero);
  font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: var(--ambre); letter-spacing: -.04em;
}
.etapes li::before { grid-row: 1 / span 2; }
.etapes h3, .etapes p { grid-column: 2; }
.etapes p { color: var(--sable); max-width: var(--mesure); margin-top: -.4rem; }
@media (max-width: 560px) { .etapes li { grid-template-columns: 1fr; gap: .4rem; } .etapes li::before { grid-row: auto; } .etapes h3, .etapes p { grid-column: 1; } }

/* Niveaux de données */
.niveaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--ligne); border: 1px solid var(--ligne); border-radius: 10px; overflow: hidden; }
.niveau { background: var(--bois); padding: 2rem 1.75rem; display: grid; gap: .75rem; align-content: start; transition: background .3s; }
.niveau:hover { background: var(--bois-clair); }
.niveau p { color: var(--sable); }
@media (max-width: 860px) { .niveaux { grid-template-columns: 1fr; } }

/* En direct */
.bloc--direct {
  display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.direct__sceau {
  width: 100%; max-width: 18rem; filter: drop-shadow(0 24px 32px rgba(0, 0, 0, .7));
  animation: flotter 7s ease-in-out infinite alternate;
}
@keyframes flotter { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-10px) rotate(1.5deg); } }
.direct__texte p { color: var(--sable); font-size: 1.1rem; max-width: var(--mesure); margin-top: 1.25rem; }
.direct__liens { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
@media (max-width: 720px) { .bloc--direct { grid-template-columns: 1fr; } .direct__sceau { max-width: 11rem; } }

/* Contact */
.contact {
  text-align: center; padding: clamp(4rem, 10vw, 8rem) var(--gouttiere);
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(232, 163, 61, .16), transparent 70%),
    var(--bois);
  border-top: 1px solid var(--ligne);
  display: grid; justify-items: center; gap: 1.25rem;
}
.contact h2 { max-width: 22ch; }
.contact p { color: var(--sable); font-size: 1.1rem; }
.contact .bouton { margin-top: .75rem; }

/* Pied */
.pied {
  padding: 3rem var(--gouttiere) 2.5rem; border-top: 1px solid var(--ligne);
  display: grid; gap: 1.75rem; max-width: 78rem; margin-inline: auto;
  font-size: .92rem; color: var(--sable-sombre);
}
.pied__marque { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 800; color: var(--ivoire); }
.pied__legal { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .9rem 2rem; }
.pied__legal dt { font-weight: 700; color: var(--sable); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.pied__legal dd { margin: .15rem 0 0; }
.pied__legal a { color: var(--sable); }
.pied__note { font-size: .85rem; }

/* Mouvement réduit : tout arrive déjà en place. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__titre .ligne, .hero__sous, .hero__actions, .etabli { animation: none; opacity: 1; transform: none; filter: none; }
  .hero__fond img, .direct__sceau { animation: none; }
  .revele { opacity: 1; transform: none; transition: none; }
  .etabli__lignes li.encours::after { animation: none; }
  .bouton, .inventaire li, .inventaire li::before, .nav a::after { transition: none; }
}
