/* OCCTEC — feuille de dessin. Le site est une planche d'architecte : papier blanc, traits de construction, un seul rouge. */

@font-face { font-family: "Jost"; font-weight: 300; font-display: swap; src: url("/assets/fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("/assets/fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 300; font-display: swap; src: url("/assets/fonts/spectral-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 300; font-style: italic; font-display: swap; src: url("/assets/fonts/spectral-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-display: swap; src: url("/assets/fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: italic; font-display: swap; src: url("/assets/fonts/spectral-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --papier: #ffffff;
  --papier-lave: #f7f7f5;
  --graphite: #1a1a1a;
  --mine: #5a5a58;
  --trait: #d9d9d5;
  --trait-fort: #a3a39f;
  --rouge: #b3362f;
  --rouge-sombre: #8c2a24;
  --rouge-lavis: rgba(179, 54, 47, 0.10);

  --police-titre: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --police-texte: "Spectral", "Iowan Old Style", Georgia, serif;
  --police-note: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --marge: clamp(1rem, 4vw, 3.5rem);
  --colonne: 68rem;
  --guide: clamp(1.25rem, 3vw, 2.5rem);
  --duree-trace: 1.1s;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--graphite);
  font-family: var(--police-texte);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Marge de la feuille : un fil vertical qui court le long de la page, comme sur une planche. */
body::before {
  content: "";
  position: fixed;
  top: 0; bottom: 0;
  left: var(--guide);
  width: 1px;
  background: var(--trait);
  transform-origin: top;
  animation: tracer-vertical var(--duree-trace) ease-out both;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
p a, li a, dd a { border-bottom: 1px solid var(--trait-fort); transition: border-color .2s, color .2s; }
p a:hover, li a:hover, dd a:hover { color: var(--rouge); border-color: var(--rouge); }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }

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

h1, h2, h3 {
  font-family: var(--police-titre);
  font-weight: 300;
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: 0.02em; }
h3 { font-size: 1.05rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 400; }

p { margin: 0 0 1.2em; max-width: 38em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 400; }
em { font-style: italic; }

/* Annotation de plan : petite étiquette mono qui nomme chaque zone du dessin. */
.note {
  font-family: var(--police-note);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mine);
}

.page { position: relative; z-index: 1; }

.contenu {
  width: min(var(--colonne), 100% - 2 * var(--marge));
  margin-inline: auto;
}

/* ---- En-tête ---- */
.entete {
  padding: 1.4rem 0;
}
.entete .contenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--police-titre);
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.marque svg { width: 1.9rem; height: 1.9rem; }
.navigation { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.navigation a { position: relative; padding-bottom: 0.15rem; }
.navigation a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--rouge);
  transition: right .25s ease;
}
.navigation a:hover::after, .navigation a[aria-current]::after { right: 0; }

/* ---- Héros : le logo est la thèse ---- */
.heros { padding: clamp(2rem, 6vw, 5rem) 0 clamp(2.5rem, 6vw, 5rem); }
.heros-logo {
  position: relative;
  margin: 0 auto;
  width: min(60rem, 100%);
}
/* L'axe rouge du logo se prolonge d'un bord à l'autre de la feuille, puis s'efface à l'approche du dessin. */
.heros-logo::before, .heros-logo::after {
  content: "";
  position: absolute;
  top: 44.5%;
  height: 1px;
  width: 50vw;
  background: linear-gradient(to right, var(--rouge), transparent);
  transform-origin: left;
  animation: tracer-horizontal var(--duree-trace) ease-out both;
  animation-delay: 0.2s;
  pointer-events: none;
}
.heros-logo::before { right: 100%; transform-origin: right; background: linear-gradient(to left, transparent 12%, var(--rouge)); }
.heros-logo::after { left: 100%; background: linear-gradient(to right, transparent 12%, var(--rouge)); }
.heros-logo img {
  width: 100%;
  animation: apparaitre 0.9s ease-out both;
  animation-delay: 0.6s;
}
.heros-texte {
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  text-align: center;
  animation: apparaitre 0.9s ease-out both;
  animation-delay: 0.9s;
}
.heros h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  letter-spacing: 0.04em;
}
.heros h1 .point { color: var(--rouge); }
.heros-texte p {
  margin: 1.4rem auto 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  max-width: 34em;
}
.actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}
.bouton {
  font-family: var(--police-titre);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--graphite);
  transition: background .2s, color .2s, border-color .2s;
}
.bouton:hover { background: var(--graphite); color: var(--papier); }
.bouton-rouge { border-color: var(--rouge); color: var(--rouge); }
.bouton-rouge:hover { background: var(--rouge); border-color: var(--rouge); color: var(--papier); }

/* ---- Sections : une ligne de cote avec ses deux repères, l'étiquette posée dessus ---- */
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-cote {
  position: relative;
  border-top: 1px solid var(--trait);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-cote::before, .section-cote::after {
  content: "+";
  position: absolute;
  top: -0.72em;
  font-family: var(--police-note);
  font-size: 0.9rem;
  line-height: 1;
  color: var(--trait-fort);
  background: var(--papier);
}
.section-cote::before { left: -0.35em; }
.section-cote::after { right: -0.35em; }
.section-cote .note {
  position: absolute;
  top: -0.6em;
  left: 1.6rem;
  padding: 0 0.6rem;
  background: var(--papier);
  line-height: 1;
}
.section h2 { margin-bottom: 1.2rem; max-width: 22em; }
.section > .contenu > p, .chapeau { max-width: 38em; }
.chapeau { font-size: 1.2rem; }

/* Trois verbes : aider, faire évoluer, sauver */
.verbes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem 3rem;
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
}
.verbes h3 { margin-bottom: 0.7rem; }
.verbes h3::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 1px;
  background: var(--rouge);
  margin-bottom: 0.9rem;
}
.verbes p { font-size: 1.05rem; }

/* High tech / low tech : deux colonnes séparées par un fil */
.deux-voies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
  margin-top: 2.5rem;
}
.deux-voies > div + div { border-left: 1px solid var(--trait); padding-left: 3rem; }
.deux-voies h3 { margin-bottom: 1rem; }
.deux-voies ul { margin: 0; padding: 0; list-style: none; }
.deux-voies li { padding: 0.55rem 0; border-top: 1px solid var(--trait); font-size: 1.05rem; }
.deux-voies li:first-child { border-top: 0; }
.deux-voies li span { display: block; color: var(--mine); font-size: 0.95rem; font-style: italic; }
.verdict {
  margin-top: 2.5rem;
  font-family: var(--police-titre);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing: 0.02em;
  max-width: 28em;
}
.verdict .point { color: var(--rouge); }

/* Critères : une nomenclature, comme sur un plan */
.criteres {
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--trait-fort);
}
.criteres > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.4rem 2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--trait);
}
.criteres dt {
  font-family: var(--police-titre);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding-top: 0.25rem;
}
.criteres dd { margin: 0; }

/* Parcours : la seule vraie séquence du site, donc la seule numérotée */
.parcours {
  counter-reset: etape;
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem 2rem;
}
.parcours li { counter-increment: etape; font-size: 1rem; }
.parcours li::before {
  content: counter(etape, decimal-leading-zero);
  display: block;
  font-family: var(--police-note);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--rouge);
  padding-bottom: 0.5rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--trait);
}
.parcours strong { display: block; font-family: var(--police-titre); font-weight: 400; letter-spacing: 0.06em; margin-bottom: 0.3rem; }

/* Questions */
.faq { border-top: 1px solid var(--trait); }
.faq summary {
  cursor: pointer;
  padding: 1.1rem 2.2rem 1.1rem 0;
  list-style: none;
  font-family: var(--police-titre);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 1rem;
  font-family: var(--police-note);
  color: var(--rouge);
  transition: transform .25s;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 1.4rem; color: var(--mine); }
.questions { margin-top: 2.5rem; border-bottom: 1px solid var(--trait); }

/* Nous rejoindre : trois portes */
.portes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--trait);
  border: 1px solid var(--trait);
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}
.portes li {
  background: var(--papier);
  padding: 2rem 1.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background .25s;
}
.portes li:hover { background: var(--papier-lave); }
.portes .note { color: var(--rouge); }
.portes h3 { letter-spacing: 0.1em; font-size: 1.1rem; }
.portes p { font-size: 1.02rem; flex: 1; }
.portes a.bouton { align-self: flex-start; }
.adresse-unique { margin-top: 2rem; color: var(--mine); }

/* ---- Cartouche : le pied de page est le cartouche de la planche ---- */
.cartouche {
  margin: clamp(3rem, 7vw, 6rem) 0 2.5rem;
}
.cartouche-grille {
  display: grid;
  grid-template-columns: 2fr 3fr 1fr 1fr;
  border: 1px solid var(--graphite);
}
.cartouche-grille > div {
  padding: 0.9rem 1.1rem;
  border-left: 1px solid var(--graphite);
  min-height: 4.6rem;
}
.cartouche-grille > div:first-child { border-left: 0; }
.cartouche-grille .note { display: block; margin-bottom: 0.4rem; font-size: 0.62rem; }
.cartouche-grille .valeur { font-family: var(--police-titre); font-size: 0.95rem; letter-spacing: 0.06em; }
.cartouche-grille .valeur.grande { font-size: 1.2rem; letter-spacing: 0.3em; text-transform: uppercase; }
.cartouche-grille .valeur a { border-bottom: 1px solid var(--trait-fort); }
.cartouche-grille .valeur a:hover { color: var(--rouge); border-color: var(--rouge); }
.cartouche-legal {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}
.cartouche-legal a { border-bottom: 1px solid transparent; }
.cartouche-legal a:hover { color: var(--rouge); border-color: var(--rouge); }

/* ---- Pages secondaires ---- */
.article { padding: clamp(2rem, 5vw, 4rem) 0; }
.article h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 2rem; letter-spacing: 0.02em; }
.article h2 { font-size: 1.35rem; margin: 2.2rem 0 0.8rem; }
.article p, .article ul { max-width: 40em; }
.article ul { padding-left: 1.2em; }
.retour { display: inline-block; margin-top: 2.5rem; }

/* ---- Mouvement ---- */
@keyframes tracer-vertical { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes tracer-horizontal { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes apparaitre { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, .heros-logo::before, .heros-logo::after, .heros-logo img, .heros-texte { animation: none; }
}

/* ---- Écrans étroits ---- */
@media (max-width: 48rem) {
  body::before { display: none; }
  .entete .contenu { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .navigation { gap: 1.2rem; }
  .deux-voies { grid-template-columns: 1fr; }
  .deux-voies > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--trait); margin-top: 2rem; padding-top: 2rem; }
  .criteres > div { grid-template-columns: 1fr; gap: 0.3rem; }
  .cartouche-grille { grid-template-columns: 1fr 1fr; }
  .cartouche-grille > div:nth-child(3) { border-left: 0; }
  .cartouche-grille > div:nth-child(n + 3) { border-top: 1px solid var(--graphite); }
}

.sous-titre { margin-top: 3.5rem; }
