/* Socle de la démo CISABAC : couleurs et police du site cisabac.com, barre, étapes, composants communs.
   L'orange vif #FD4E0D sert aux filets, au logo et aux grands titres ; l'orange foncé aux textes et boutons (contraste). */
:root {
  --orange: #fd4e0d;
  --orange-titre: #e2470c;
  --orange-texte: #c2410c;
  --orange-fonce: #a3360a;
  --orange-voile: #fff1ea;
  --anthracite: #333132;
  --anthracite-2: #4a4a4a;
  --gris-logo: #737373;
  --papier: #f1f1f1;
  --feuille: #ffffff;
  --encre: #333132;
  --encre-2: #5b5b5b;
  --filet: #e3e3e3;
  --filet-fort: #cfcfcf;
  --ok: #1f7a3d;
  --ok-voile: #e7f4ea;
  --alerte: #b42318;
  --alerte-voile: #fdecea;
  --question: #8a6100;
  --question-voile: #fdf3d6;
  --commande: #2f5e9e;
  --commande-voile: #e8f0fa;
  --stylo: #24325c;
  --police: 'Open Sans', system-ui, sans-serif;
  --main: 'Caveat', 'Segoe Print', cursive;
  --rayon: 8px;
  --rayon-petit: 5px;
  --ombre: 0 1px 2px rgba(51, 49, 50, 0.08), 0 8px 24px rgba(51, 49, 50, 0.08);
  --largeur: 1320px;
  --marge: clamp(16px, 3vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 15px/1.5 var(--police);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange-texte); outline-offset: 2px; border-radius: 4px; }
.nombre { text-align: right; white-space: nowrap; }
.sans-coupure { white-space: nowrap; }

.evitement { position: absolute; left: -9999px; top: 8px; background: var(--feuille); padding: 8px 12px; z-index: 10; }
.evitement:focus { left: 8px; }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 40px var(--marge); }

/* Logo : carré gris LGi, puis bandeau orange CiSABAC, comme sur le site */
.logo { display: inline-flex; align-items: stretch; height: 30px; font-family: var(--police); line-height: 1; flex: none; }
.logo__lgi {
  display: flex; align-items: center; padding: 0 7px; background: var(--gris-logo); color: #fff;
  font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.logo__lgi em { font-style: normal; color: var(--orange); }
.logo__nom {
  display: flex; align-items: center; padding: 0 12px; background: var(--orange); color: #fff;
  font-weight: 300; font-size: 19px; letter-spacing: 0.12em;
}
.logo__nom em { font-style: normal; font-weight: 400; color: var(--anthracite-2); }

/* Barre du haut */
.barre {
  display: flex; align-items: center; gap: 20px;
  padding: 10px var(--marge);
  background: var(--anthracite); color: #fff;
  border-bottom: 3px solid var(--orange);
  position: sticky; top: 0; z-index: 5;
}
.barre__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.barre__site { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.barre__titre { display: grid; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.18); min-width: 0; }
.barre__titre strong { font-weight: 600; font-size: 16px; }
.barre__titre span { color: rgba(255, 255, 255, 0.72); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre__date { margin-left: auto; font-size: 13px; color: rgba(255, 255, 255, 0.75); white-space: nowrap; }

/* Étapes : une vraie séquence, donc numérotée */
.etapes { background: var(--feuille); border-bottom: 1px solid var(--filet); overflow-x: auto; scrollbar-width: none; }
.etapes ol { list-style: none; margin: 0 auto; padding: 0 var(--marge); display: flex; gap: 4px; max-width: var(--largeur); }
.etapes button {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px 11px;
  background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer;
  color: var(--encre-2); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.etapes button span {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid currentColor; font-size: 12px;
}
.etapes button:hover { color: var(--encre); }
.etapes button[aria-current] { color: var(--anthracite); border-bottom-color: var(--orange); }
.etapes button[aria-current] span { background: var(--anthracite); border-color: var(--anthracite); color: #fff; }
.etapes button.faite span { background: var(--orange-texte); border-color: var(--orange-texte); color: #fff; }

/* Page */
main { outline: none; }
.page { max-width: var(--largeur); margin: 0 auto; padding: 26px var(--marge) 72px; }
.page.entree { animation: entree 0.32s ease-out both; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 20px; }
.entete h1 { font-size: clamp(23px, 2.8vw, 30px); max-width: 36ch; color: var(--anthracite); font-weight: 700; }
.entete p { color: var(--encre-2); max-width: 68ch; margin-top: 8px; }

.panneau { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); }
.panneau__titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; border-bottom: 1px solid var(--filet); }
.panneau__titre h2 { font-size: 16px; color: var(--anthracite); }
.panneau__titre > span { color: var(--encre-2); font-size: 13px; }
.carte-info { padding: 16px 18px; display: grid; gap: 10px; }
.carte-info h2 { font-size: 15px; color: var(--anthracite); }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: 4px;
  background: var(--orange-texte); color: #fff; border: 1px solid var(--orange-texte);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.bouton:hover { background: var(--orange-fonce); }
.bouton[aria-disabled='true'] { opacity: 0.4; cursor: default; pointer-events: none; }
.bouton--large { width: 100%; }
.bouton--petit { min-height: 32px; padding: 4px 14px; font-size: 13px; }
.bouton--discret { background: var(--feuille); color: var(--anthracite); border-color: var(--filet-fort); }
.bouton--discret:hover { background: var(--papier); }
.lien { background: none; border: 0; padding: 0; text-align: left; color: var(--orange-texte); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }

/* Pastilles */
.etat { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.etat--pret { background: var(--ok-voile); color: var(--ok); }
.etat--question { background: var(--question-voile); color: var(--question); }
.etat--verifier { background: var(--orange-voile); color: var(--orange-texte); }
.etat--commande { background: var(--commande-voile); color: var(--commande); }
.metier { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.metier::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--couleur); }
.metier--batiment { --couleur: var(--orange); }
.metier--cloture { --couleur: var(--anthracite-2); }
.canal {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--anthracite-2); background: var(--papier); padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.canal--photo { background: var(--orange-voile); color: var(--orange-texte); }
.canal--fax { background: #ececec; }

.coches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.coches li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.coches li::before { content: '✓'; color: var(--orange-texte); font-weight: 700; }

.chiffre { font-weight: 300; font-size: 28px; letter-spacing: -0.02em; color: var(--anthracite); line-height: 1.1; }
.muet { color: var(--encre-2); }
.defile { overflow-x: auto; }

/* Compteurs d'en-tête */
.compteurs { display: flex; gap: 26px; margin: 0; }
.compteurs div { display: grid; }
.compteurs dt { font-size: 14px; color: var(--encre-2); order: 2; }
.compteurs dd { margin: 0; font-size: 36px; line-height: 1.05; order: 1; white-space: nowrap; }
.compteurs__alerte dd { color: var(--alerte); }

/* Message de confirmation */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--anthracite); color: #fff; padding: 12px 18px; border-radius: var(--rayon);
  border-left: 4px solid var(--orange);
  box-shadow: var(--ombre); font-size: 14px; max-width: min(560px, calc(100vw - 32px)); z-index: 20;
  animation: toast 0.25s ease-out both;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Profil redessiné (SVG), partagé par le devis, le document et la fiche de fabrication */
.profil { display: block; width: 100%; height: auto; color: var(--orange-texte); overflow: visible; }
.profil__trait { stroke: var(--anthracite); stroke-width: 5; stroke-linecap: round; }
.profil__attache { stroke: var(--filet-fort); stroke-width: 1.2; }
.profil__cote line { stroke: currentColor; stroke-width: 1.4; }
.profil__cote text { fill: currentColor; font: 600 17px var(--police); }
.profil__cote--note text { font-size: 14px; }
.profil__mur { color: #dcdcdc; }
.profil__mur path { fill: none; stroke: #b9b9b9; stroke-width: 1.4; stroke-dasharray: 6 5; }
.profil__mur text { fill: var(--encre-2); font: 600 14px var(--police); paint-order: stroke; stroke: var(--feuille); stroke-width: 6px; }
.profil__pli circle { fill: var(--orange); }
.profil__pli text { fill: #fff; font: 700 13px var(--police); }

@media (max-width: 720px) {
  body { font-size: 14px; }
  .barre { gap: 12px; }
  .logo { height: 26px; }
  .logo__nom { font-size: 16px; padding: 0 9px; }
  .logo__lgi { font-size: 11px; padding: 0 5px; }
  .barre__site, .barre__date { display: none; }
  .barre__titre { padding-left: 12px; }
  .barre__titre strong { font-size: 15px; }
  .page { padding-top: 20px; }
  .compteurs { gap: 16px; flex-wrap: wrap; }
  .compteurs dd { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
