/* Orbite Construction : vocabulaire du plan (cotes, cartouche, nomenclature), une seule famille à largeur variable. */
@font-face {
  font-family: "Archivo";
  src: url("/polices/archivo-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}
:root {
  --beton: #E9EBE8;
  --papier: #FAFAF8;
  --ardoise: #1E2B30;
  --ardoise-2: #4A5B62;
  --crayon: #9AA5A8;
  --trait: #C9CFCD;
  --revision: #C9261B;
  --revision-fonce: #A51D14;
  --ok: #2E6B4F;
  --mesure: clamp(1rem, 0.6rem + 1.6vw, 1.5rem);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--beton); color: var(--ardoise);
  font: 400 1.0625rem/1.55 "Archivo", system-ui, sans-serif; font-stretch: 100%;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--revision-fonce); }
:focus-visible { outline: 3px solid var(--revision); outline-offset: 3px; border-radius: 2px; }
b { font-weight: 650; }

/* barre */
.barre {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem var(--mesure); border-bottom: 1px solid var(--trait); background: var(--beton);
}
.marque { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; }
.logo { width: 28px; height: 28px; color: var(--ardoise); }
.barre nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; font-size: 0.95rem; }
.barre nav a:not(.bouton) { text-decoration: none; color: var(--ardoise-2); }
.barre nav a:not(.bouton):hover { color: var(--ardoise); text-decoration: underline; }

/* boutons */
.bouton {
  display: inline-block; border: 2px solid var(--revision); background: var(--revision); color: #fff;
  font: inherit; font-weight: 650; font-stretch: 105%; padding: 0.8rem 1.4rem; border-radius: 3px;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.bouton:hover { background: var(--revision-fonce); border-color: var(--revision-fonce); color: #fff; }
.bouton.petit { padding: 0.45rem 0.9rem; font-size: 0.92rem; }
.bouton.secondaire { background: transparent; color: var(--ardoise); border-color: var(--ardoise-2); }
.bouton.secondaire:hover { background: var(--ardoise); color: #fff; }
.bouton.danger { background: var(--revision-fonce); border-color: var(--revision-fonce); }

/* ouverture */
.ouverture { padding: clamp(3rem, 8vw, 7rem) var(--mesure) clamp(2.5rem, 6vw, 5rem); max-width: 78rem; }
.ouverture h1 {
  margin: 0; font-weight: 800; font-stretch: 125%; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(2.6rem, 1.2rem + 6.4vw, 6.6rem); max-width: 14ch;
}
.ouverture-bas { display: grid; grid-template-columns: minmax(0, 36rem) auto; gap: 2rem 4rem; align-items: end; margin-top: clamp(2rem, 4vw, 3rem); }
.chapeau { font-size: 1.2rem; line-height: 1.5; color: var(--ardoise-2); margin: 0 0 1rem; max-width: 38rem; }
.actions .note { margin: 0.7rem 0 0; }
.note { font-size: 0.92rem; color: var(--ardoise-2); }

/* ligne de cote : trait, deux flèches, repères ; la seule pièce graphique du site */
.cote {
  --n: 6; list-style: none; margin: clamp(1.6rem, 3vw, 2.4rem) 0 0; padding: 1.9rem 0 0;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; max-width: 72rem;
  color: var(--revision);
}
.cote::before { /* trait de cote */
  content: ""; position: absolute; left: 0; right: 0; top: 0.95rem; border-top: 1.5px solid currentColor;
}
.cote::after { /* flèche de fin */
  content: ""; position: absolute; right: -1px; top: calc(0.95rem - 5px); border: 5.5px solid transparent; border-left: 11px solid currentColor; border-right: 0;
}
.cote li { position: relative; padding: 0.55rem 0.5rem 0 0; font-size: 0.9rem; font-stretch: 92%; color: var(--ardoise-2); line-height: 1.25; }
.cote li::before { /* repère */
  content: ""; position: absolute; left: 0; top: -1.45rem; height: 1.05rem; border-left: 1.5px solid var(--revision);
}
.cote li:first-child::after { /* flèche de départ */
  content: ""; position: absolute; left: -1px; top: calc(-0.95rem - 5px); border: 5.5px solid transparent; border-right: 11px solid var(--revision); border-left: 0;
}
.cote li span { display: block; padding-left: 0.5rem; border-left: 1px dotted var(--crayon); }
.cote li.fait span { color: var(--ardoise); }
.cote li.actif span { color: var(--ardoise); font-weight: 650; }
.cote li.actif::before { border-left-width: 3px; }

/* nomenclature (contenu du CRM) */
.contenu, .offre { padding: clamp(2.5rem, 6vw, 5rem) var(--mesure); border-top: 1px solid var(--trait); }
h2 { font-weight: 750; font-stretch: 118%; letter-spacing: -0.02em; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); line-height: 1.1; margin: 0 0 2rem; max-width: 22ch; }
.nomenclature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; max-width: 72rem; border-top: 2px solid var(--ardoise); }
.nomenclature > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 1.5rem 1.2rem 0; border-bottom: 1px solid var(--trait); }
.nomenclature > div:nth-child(odd) { padding-right: 2rem; }
.nomenclature dt { font-weight: 650; font-stretch: 108%; }
.nomenclature dd { margin: 0; color: var(--ardoise-2); max-width: 34rem; }

/* offre + cartouche */
.offre { display: grid; grid-template-columns: minmax(0, 44rem) minmax(18rem, 26rem); gap: 3rem 5rem; align-items: start; }
.etapes { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.9rem; max-width: 38rem; }
.etapes li::marker { color: var(--revision); font-weight: 700; }
.adresse { font-stretch: 92%; background: var(--papier); padding: 0.05rem 0.35rem; border: 1px solid var(--trait); border-radius: 2px; white-space: nowrap; }
.cartouche { background: var(--papier); border: 2px solid var(--ardoise); }
.cartouche table { width: 100%; border-collapse: collapse; }
.cartouche th, .cartouche td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--ardoise); font-size: 0.97rem; }
.cartouche th { width: 38%; font-weight: 600; font-stretch: 90%; color: var(--ardoise-2); border-right: 1px solid var(--ardoise); }
.cartouche-pied { padding: 1rem 0.9rem; }

/* formulaires et pages simples */
.feuille { max-width: 40rem; margin: clamp(2rem, 6vw, 4.5rem) auto; padding: 0 var(--mesure); }
.feuille h1 { font-weight: 800; font-stretch: 118%; letter-spacing: -0.03em; font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); line-height: 1.02; margin: 0 0 1rem; }
.feuille .cote { margin-bottom: 1.8rem; }
form { display: grid; gap: 1.2rem; margin-top: 1.8rem; }
.champ { display: grid; gap: 0.35rem; }
.champ label { font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=password], .adresse-saisie {
  font: inherit; color: var(--ardoise); background: var(--papier); border: 1.5px solid var(--crayon); border-radius: 3px; padding: 0.7rem 0.8rem; width: 100%;
}
input:focus { outline: none; border-color: var(--ardoise); box-shadow: 0 0 0 3px rgba(201, 38, 27, 0.25); }
.adresse-saisie { display: flex; align-items: center; padding: 0; overflow: hidden; }
.adresse-saisie span { padding: 0 0.6rem; color: var(--ardoise-2); font-stretch: 90%; white-space: nowrap; }
.adresse-saisie input { border: 0; border-radius: 0; padding-left: 0.2rem; padding-right: 0.2rem; min-width: 6ch; box-shadow: none; }
.adresse-saisie:focus-within { border-color: var(--ardoise); box-shadow: 0 0 0 3px rgba(201, 38, 27, 0.25); }
.aide { margin: 0; font-size: 0.9rem; color: var(--ardoise-2); }
.aide.libre { color: var(--ok); }
.aide.prise { color: var(--revision-fonce); }
.erreur { margin: 0; font-size: 0.92rem; color: var(--revision-fonce); font-weight: 550; }
.erreur.bloc { border-left: 3px solid var(--revision); padding: 0.6rem 0.8rem; background: var(--papier); }
.en-erreur input, .en-erreur .adresse-saisie { border-color: var(--revision); }
.case { grid-template-columns: auto 1fr; align-items: start; column-gap: 0.6rem; }
.case input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--revision); }
.case label { font-weight: 400; }
.case .erreur { grid-column: 2; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form .bouton { justify-self: start; }
.texte h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; }
.texte p { max-width: 65ch; }

/* administration */
.admin main { padding: 2rem var(--mesure) 4rem; }
.admin-tete { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: baseline; }
.admin-tete h1 { margin: 0; font-stretch: 115%; font-size: 2rem; letter-spacing: -0.02em; }
.admin-tete form { margin: 0 0 0 auto; }
.avis { background: var(--papier); border-left: 3px solid var(--ok); padding: 0.6rem 0.9rem; }
.tableau-defile { overflow-x: auto; margin: 1.5rem 0 3rem; border-top: 2px solid var(--ardoise); }
.liste { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.liste th { text-align: left; font-weight: 600; font-stretch: 92%; color: var(--ardoise-2); padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--ardoise); }
.liste td { padding: 0.75rem 0.8rem 0.75rem 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.sous { display: block; color: var(--ardoise-2); font-size: 0.88rem; }
.statut { font-weight: 600; }
.s-pret { color: var(--ok); }
.s-erreur, .s-suspendu { color: var(--revision-fonce); }
.actions-admin { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: start; }
.actions-admin form { margin: 0; display: block; }
.supprimer summary { cursor: pointer; color: var(--revision-fonce); font-size: 0.92rem; padding: 0.45rem 0; }
.supprimer form { display: grid; gap: 0.5rem; margin-top: 0.5rem; max-width: 16rem; }
.supprimer label { display: grid; gap: 0.3rem; font-size: 0.9rem; }
.supprimer input { padding: 0.45rem 0.6rem; }
.journal { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.journal time { color: var(--ardoise-2); margin-right: 0.5rem; }
.visuel-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* pied */
.pied { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; padding: 1.5rem var(--mesure); border-top: 1px solid var(--trait); font-size: 0.9rem; color: var(--ardoise-2); }
.pied p { margin: 0; }

/* téléphone */
@media (max-width: 760px) {
  .ouverture-bas, .offre { grid-template-columns: 1fr; }
  .nomenclature { grid-template-columns: 1fr; }
  .nomenclature > div, .nomenclature > div:nth-child(odd) { grid-template-columns: 1fr; gap: 0.3rem; padding-right: 0; }
  .cote { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
  .cote::before, .cote::after, .cote li:first-child::after { display: none; }
  .cote li { padding-top: 0.2rem; }
  .cote li::before { top: -0.6rem; height: 0.7rem; }
  .barre nav a:not(.bouton) { display: none; }
  .barre { flex-wrap: nowrap; }
  .marque span { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .ouverture .cote::before { transform-origin: left; animation: tracer 900ms cubic-bezier(.2,.7,.2,1) both 150ms; }
  @keyframes tracer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
