/* ==========================================================================
   KERNAREL — site vitrine
   Direction : « du programme à la pièce ». Fond blanc, encre marine et laiton du logo.
   Une seule famille (Archivo variable) : la largeur fait la hiérarchie, étendue pour
   les titres comme le logo, étroite pour les annotations, normale pour le texte.
   Le seul moment animé du site : le pupitre CN de l'accueil, qui usine la pièce.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --blanc: #ffffff;
  --acier: #f2f4f7;
  --tole: #f2f4f7;
  --papier: #ffffff;
  --encre: #121a2b;
  --encre-douce: #4a5468;
  --tracage: #8f6212;
  --laiton: #8f6212;
  --laiton-clair: #d9b266;
  --trait: #c3cad4;
  --trait-fin: #e1e5eb;
  --ecran: #0e1525;
  --ecran-ligne: #1e2a40;
  --ecran-texte: #e4eaf3;
  --ecran-doux: #7f8ca3;
  --conforme: #5cc48a;

  --pas: clamp(1rem, 0.6rem + 1.6vw, 1.5rem);
  --marge: clamp(1rem, 4vw, 3rem);
  --largeur: 76rem;
  --bloc: clamp(4rem, 2rem + 7vw, 8rem);

  --t-note: 0.875rem;
  --t-texte: 1.0625rem;
  --t-intro: clamp(1.15rem, 1rem + 0.6vw, 1.375rem);
  --t-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  --t-h2: clamp(1.75rem, 1.15rem + 2.2vw, 2.9rem);
  --t-h1: clamp(2.3rem, 1.1rem + 4.4vw, 4.4rem);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t-texte);
  font-stretch: 100%;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--laiton); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--encre); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--laiton); outline-offset: 3px; border-radius: 2px; }
.sombre :focus-visible { outline-color: var(--laiton-clair); }

h1, h2, h3 { margin: 0; line-height: 1.06; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--t-h1); font-stretch: 125%; letter-spacing: -0.03em; }
h2 { font-size: var(--t-h2); font-stretch: 118%; letter-spacing: -0.02em; }
h3 { font-size: var(--t-h3); font-stretch: 108%; line-height: 1.2; letter-spacing: -0.005em; }
p { margin: 0; max-width: 68ch; text-wrap: pretty; }
p + p { margin-top: 1em; }
ul { margin: 0; padding: 0; list-style: none; }

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

.evitement {
  position: absolute; left: var(--marge); top: -4rem; z-index: 30;
  background: var(--encre); color: var(--blanc); padding: 0.6rem 1rem;
}
.evitement:focus { top: 0.5rem; }

/* Annotation : le caractère étroit des cotes */
.note {
  font-stretch: 75%;
  font-size: var(--t-note);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--encre-douce);
}

.intro { font-size: var(--t-intro); line-height: 1.55; color: var(--encre-douce); max-width: 56ch; }

/* --------------------------------------------------------------------------
   En-tête : le logo { KERNAREL } sur blanc, collé en haut au défilement
   -------------------------------------------------------------------------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 255 255 / 0.94);
  border-bottom: 1px solid var(--trait-fin);
}
@supports (backdrop-filter: blur(8px)) {
  .entete { background: rgb(255 255 255 / 0.82); backdrop-filter: saturate(1.4) blur(10px); }
}
.entete .conteneur {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 2rem; padding-block: 0.8rem;
}
.marque { display: block; text-decoration: none; }
.marque img { height: 2.4rem; width: auto; }

.navigation ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.75rem; }
.navigation a { color: var(--encre); text-decoration: none; font-weight: 500; padding: 0.4rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.navigation a:hover { border-bottom-color: var(--laiton-clair); color: var(--encre); }
.navigation a[aria-current="page"] { border-bottom-color: var(--laiton); }

/* --------------------------------------------------------------------------
   Boutons : encre pleine, contour fin ; le laiton reste pour le survol
   -------------------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; font: inherit; font-weight: 600; font-stretch: 108%;
  padding: 0.85rem 1.45rem; border: 1.5px solid var(--encre); border-radius: 6px;
  background: var(--encre); color: var(--blanc); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.bouton:hover { background: var(--laiton); border-color: var(--laiton); color: var(--blanc); }
.bouton-contour { background: transparent; color: var(--encre); border-color: var(--trait); }
.bouton-contour:hover { background: transparent; color: var(--encre); border-color: var(--encre); }
.sombre .bouton { background: var(--laiton-clair); border-color: var(--laiton-clair); color: var(--encre); }
.sombre .bouton:hover { background: var(--blanc); border-color: var(--blanc); color: var(--encre); }
.navigation a.bouton { color: var(--blanc); padding: 0.55rem 1.05rem; border: 1.5px solid var(--encre); }
.navigation a.bouton:hover { border-color: var(--laiton); color: var(--blanc); }
.navigation a.bouton[aria-current="page"] { border-color: var(--laiton); }
.texte-court { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Ouverture (accueil) : le texte à gauche, le pupitre CN à droite
   -------------------------------------------------------------------------- */
.ouverture { padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) clamp(3rem, 1rem + 6vw, 6rem); border-bottom: 1px solid var(--trait-fin); }
.ouverture-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem clamp(2rem, 5vw, 4.5rem); align-items: center; }
.ouverture-texte .intro { margin-top: 1.6rem; }
.pile { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 2.25rem; }
.pile li {
  font-stretch: 80%; font-size: 0.86rem; font-weight: 600; color: var(--encre-douce);
  border: 1px solid var(--trait-fin); background: var(--acier); border-radius: 4px; padding: 0.2rem 0.6rem;
}

.pupitre {
  margin: 0; background: var(--ecran); color: var(--ecran-texte); border-radius: 14px;
  border: 1px solid #263450;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 30px 60px -30px rgb(18 26 43 / 0.55), 0 12px 24px -16px rgb(18 26 43 / 0.4);
  overflow: hidden; font-family: var(--mono); font-size: 0.82rem;
}
.pupitre-tete, .pupitre-etat {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.25rem;
  padding: 0.65rem 1rem; color: var(--ecran-doux);
}
.pupitre-tete { border-bottom: 1px solid var(--ecran-ligne); }
.pupitre-mode { color: var(--laiton-clair); font-weight: 600; }
.pupitre-corps { display: grid; grid-template-columns: minmax(0, 1fr); }
.pupitre-vue { padding: 1.5rem 1.25rem 0.75rem; border-bottom: 1px solid var(--ecran-ligne); background: radial-gradient(ellipse at 50% 60%, #15203a, var(--ecran) 70%); }
.pupitre-vue svg { width: 100%; overflow: visible; }
.vue-axe { stroke: #3a4a68; stroke-width: 1; stroke-dasharray: 16 4 3 4; fill: none; }
.vue-brut { fill: #1a2438; stroke: #2c3a56; stroke-width: 1; }
.vue-piece { fill: #2b3a57; stroke: var(--ecran-texte); stroke-width: 1.4; stroke-linejoin: miter; }
.vue-rapide, .vue-degagement { stroke: var(--ecran-doux); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.vue-passe { stroke: var(--laiton-clair); stroke-width: 2.6; fill: none; stroke-linejoin: miter; }
.vue-outil { fill: var(--laiton-clair); }
.vue-outil path { transform: translate(0, -1px); }
.vue-cotes text { fill: var(--ecran-doux); font-family: "Archivo", Arial, sans-serif; font-stretch: 75%; font-size: 12px; font-weight: 500; }

.pupitre-programme {
  list-style: none; margin: 0; padding: 0.75rem 0; line-height: 1.62; color: var(--ecran-doux);
  white-space: nowrap; overflow: hidden; columns: 2; column-gap: 0; column-rule: 1px solid var(--ecran-ligne);
}
.pupitre-programme li { break-inside: avoid; }
.pupitre-programme li { padding: 0 1rem; border-left: 2px solid transparent; }
.pupitre-etat { border-top: 1px solid var(--ecran-ligne); justify-content: flex-start; }
.pupitre-controle { color: var(--conforme); font-weight: 600; }
.pupitre-relancer {
  margin-left: auto; font: inherit; font-size: 0.78rem; color: var(--ecran-texte); cursor: pointer;
  background: transparent; border: 1px solid #34456a; border-radius: 5px; padding: 0.2rem 0.6rem;
}
.pupitre-relancer:hover { border-color: var(--laiton-clair); color: var(--laiton-clair); }
.pupitre-relancer[hidden] { display: none; }

/* Cycle animé : le programme défile en même temps que l'outil suit le profil.
   Temps de départ (--t) et durée (--d) de chaque bloc, calés sur la longueur de passe. */
.pupitre-programme li:nth-child(1)  { --t: 0s;     --d: 0.15s; }
.pupitre-programme li:nth-child(2)  { --t: 0.15s;  --d: 0.15s; }
.pupitre-programme li:nth-child(3)  { --t: 0.3s;   --d: 0.15s; }
.pupitre-programme li:nth-child(4)  { --t: 0.45s;  --d: 0.1s; }
.pupitre-programme li:nth-child(5)  { --t: 0.55s;  --d: 0.05s; }
.pupitre-programme li:nth-child(6)  { --t: 0.6s;   --d: 0.032s; }
.pupitre-programme li:nth-child(7)  { --t: 0.632s; --d: 0.023s; }
.pupitre-programme li:nth-child(8)  { --t: 0.655s; --d: 0.786s; }
.pupitre-programme li:nth-child(9)  { --t: 1.441s; --d: 0.16s; }
.pupitre-programme li:nth-child(10) { --t: 1.601s; --d: 1.364s; }
.pupitre-programme li:nth-child(11) { --t: 2.965s; --d: 0.112s; }
.pupitre-programme li:nth-child(12) { --t: 3.077s; --d: 1.123s; }
.pupitre-programme li:nth-child(13) { --t: 4.2s;   --d: 0.3s; }
.pupitre-programme li:nth-child(14) { --t: 4.5s;   --d: 0.5s; }

.pupitre-programme li { color: var(--ecran-texte); }
@media (prefers-reduced-motion: no-preference) {
  .pupitre-programme li {
    color: var(--ecran-doux);
    animation: bloc-execute 0.01s var(--t) forwards, bloc-courant var(--d) var(--t) step-end;
  }
  .pupitre-programme li:last-child { animation: bloc-execute 0.01s var(--t) forwards, bloc-courant var(--d) var(--t) step-end forwards; }
  .vue-passe { stroke-dasharray: 1; stroke-dashoffset: 1; animation: passe 3.6s 0.6s linear forwards; }
  .vue-piece { opacity: 0; animation: apparaitre 0.6s 4.2s ease-out forwards; }
  .vue-brut { animation: disparaitre 0.6s 4.2s ease-out forwards; }
  .vue-degagement { opacity: 0; animation: apparaitre 0.2s 4.2s forwards; }
  .vue-outil { opacity: 0; animation: apparaitre 0.15s 0.5s forwards; }
  .vue-cotes { opacity: 0; animation: apparaitre 0.6s 4.5s ease-out forwards; }
  .pupitre-controle { opacity: 0; animation: apparaitre 0.4s 4.7s ease-out forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .vue-outil, .vue-brut, .vue-rapide, .vue-degagement { display: none; }
}
@keyframes bloc-execute { to { color: var(--ecran-texte); } }
@keyframes bloc-courant {
  from { background: rgb(217 178 102 / 0.16); border-left-color: var(--laiton-clair); color: #fff; }
  to { background: rgb(217 178 102 / 0.16); border-left-color: var(--laiton-clair); color: #fff; }
}
@keyframes passe { to { stroke-dashoffset: 0; } }
@keyframes apparaitre { to { opacity: 1; } }
@keyframes disparaitre { to { opacity: 0; } }

/* Cartouche (calculateur) */
.cartouche { display: grid; grid-template-columns: 1.4fr 1fr; border-top: 1.5px solid var(--encre); margin: 0; }
.cartouche > div { padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--trait); min-width: 0; }
.cartouche > div:nth-child(odd) { border-right: 1px solid var(--trait); }
.cartouche > div:nth-last-child(-n + 2) { border-bottom: 0; }
.cartouche dt { font-stretch: 75%; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.03em; color: var(--encre-douce); }
.cartouche dd { margin: 0; font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.cartouche .cartouche-large { grid-column: 1 / -1; border-right: 0; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.bloc { padding-block: var(--bloc); }
.bloc-serre { padding-block: calc(var(--bloc) * 0.6); }
.bloc-papier { background: var(--acier); }
.bloc-tete { display: grid; gap: 1.25rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); max-width: 52rem; }

.sombre { background: var(--encre); color: #f5f7f9; }
.sombre .citation { color: #fff; border-left-color: var(--laiton-clair); }
.sombre h2 { color: #fff; }
.sombre .intro, .sombre .note { color: #b9c3d1; }
.sombre a { color: var(--laiton-clair); }

.page-tete { padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--trait-fin); background: linear-gradient(var(--acier), var(--blanc)); }
.page-tete h1 { font-size: clamp(2.1rem, 1.1rem + 3.8vw, 3.9rem); max-width: 17ch; }
.page-tete .intro { margin-top: 1.25rem; }

/* Prestations : lignes réglées, pas de cartes */
.lignes { border-top: 1.5px solid var(--encre); }
.ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1rem 2.5rem; padding-block: clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--trait);
}
.ligne ul li { padding-left: 1.1rem; position: relative; color: var(--encre-douce); }
.ligne ul li + li { margin-top: 0.3rem; }
.ligne ul li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.55rem; height: 1px; background: var(--tracage); }

/* Deux colonnes de texte */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start; }
.duo-texte p { color: var(--encre-douce); }
.sombre .duo-texte p { color: #c9d1dc; }
.citation { font-size: var(--t-h3); font-stretch: 105%; font-weight: 600; line-height: 1.35; color: var(--encre); border-left: 3px solid var(--laiton); padding-left: 1.25rem; max-width: 30ch; }

/* --------------------------------------------------------------------------
   La gamme de fabrication
   -------------------------------------------------------------------------- */
.gamme { width: 100%; border-collapse: collapse; background: var(--blanc); border: 1.5px solid var(--encre); }
.gamme caption { text-align: left; padding-bottom: 0.75rem; }
.gamme th, .gamme td { text-align: left; vertical-align: top; padding: 1rem 1.1rem; border-bottom: 1px solid var(--trait); border-right: 1px solid var(--trait-fin); }
.gamme th:last-child, .gamme td:last-child { border-right: 0; }
.gamme tbody tr:last-child > * { border-bottom: 0; }
.gamme thead th { font-stretch: 75%; font-size: var(--t-note); font-weight: 600; letter-spacing: 0.03em; color: var(--encre-douce); border-bottom: 1.5px solid var(--encre); padding-block: 0.6rem; background: var(--tole); }
.gamme .phase { font-stretch: 75%; font-weight: 700; font-size: 1.5rem; color: var(--laiton); white-space: nowrap; line-height: 1.1; width: 5.5rem; }
.gamme .operation strong { display: block; font-stretch: 105%; font-size: 1.1rem; margin-bottom: 0.3rem; }
.gamme .operation span { color: var(--encre-douce); }
.gamme .moyens, .gamme .controle { color: var(--encre-douce); font-size: 0.98rem; }
.gamme .controle { color: var(--encre); font-weight: 500; }

/* Règles d'atelier */
.regles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--encre); }
.regle { padding: 1.75rem 1.75rem 1.75rem 0; }
.regle + .regle { border-left: 1px solid var(--trait); padding-left: 1.75rem; }
.regle h3 { margin-bottom: 0.75rem; }
.regle p { color: var(--encre-douce); }
.sombre .regles { border-top-color: var(--laiton-clair); }
.sombre .regle + .regle { border-left-color: #3a465c; }
.sombre .regle p { color: #c9d1dc; }

/* Diagnostic : la boucle hypothèse / test / mesure / correction */
.boucle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: etape; border: 1.5px solid var(--encre); background: var(--papier); }
.boucle li { padding: 1.25rem 1.25rem 1.4rem; position: relative; }
.boucle li + li { border-left: 1px solid var(--trait); }
.boucle li strong { display: block; font-stretch: 105%; font-size: 1.1rem; margin-bottom: 0.35rem; }
.boucle li span { color: var(--encre-douce); font-size: 0.98rem; }
.boucle li::before { counter-increment: etape; content: counter(etape); font-stretch: 75%; font-weight: 700; color: var(--tracage); display: block; margin-bottom: 0.4rem; }

/* Outillage (compétences) */
.outillage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.outillage h3 { font-size: 1.05rem; padding-bottom: 0.6rem; margin-bottom: 0.8rem; border-bottom: 1.5px solid var(--encre); }
.outillage li { color: var(--encre-douce); padding-block: 0.2rem; }

/* --------------------------------------------------------------------------
   Réalisations
   -------------------------------------------------------------------------- */
.realisations { border-top: 1.5px solid var(--encre); }
.realisation {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.8fr);
  gap: 0.4rem 2.5rem; align-items: baseline; padding-block: 1.25rem; border-bottom: 1px solid var(--trait);
}
.realisation h3 { font-size: 1.2rem; }
.realisation p { color: var(--encre-douce); }
.realisation-phare { padding-block: 2rem; }
.realisation-phare h3 { font-size: var(--t-h2); font-stretch: 112%; }
.etiquette { display: inline-block; font-stretch: 75%; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em; border: 1px solid var(--laiton); color: var(--laiton); padding: 0.05rem 0.5rem; margin-left: 0.6rem; vertical-align: middle; border-radius: 2px; }
.capture { grid-column: 1 / -1; margin: 0.75rem 0 0; }
.capture img { border: 1px solid var(--trait); width: 100%; }

/* --------------------------------------------------------------------------
   Tarifs
   -------------------------------------------------------------------------- */
.tarif-affiche { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem clamp(1.5rem, 5vw, 4rem); align-items: center; }
.tarif-nombre { font-size: clamp(3.5rem, 2rem + 8vw, 7.5rem); font-weight: 700; font-stretch: 118%; line-height: 0.95; letter-spacing: -0.03em; white-space: nowrap; }
.tarif-nombre small { font-size: 0.3em; font-stretch: 100%; font-weight: 500; letter-spacing: 0; margin-left: 0.2em; }

.grille { width: 100%; border-collapse: collapse; border-top: 1.5px solid var(--encre); }
.grille th, .grille td { text-align: left; padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--trait); vertical-align: baseline; }
.grille thead th { font-stretch: 75%; font-size: var(--t-note); font-weight: 600; letter-spacing: 0.03em; color: var(--encre-douce); padding-block: 0.6rem; }
.grille tbody th { font-weight: 600; font-stretch: 105%; font-size: 1.1rem; }
.grille td { color: var(--encre-douce); }
.grille td:last-child, .grille th:last-child { text-align: right; padding-right: 0; white-space: nowrap; color: var(--encre); font-weight: 600; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.coordonnees { border-top: 1.5px solid var(--encre); margin: 0; }
.coordonnees div { padding-block: 0.9rem; border-bottom: 1px solid var(--trait); }
.coordonnees dt { font-stretch: 75%; font-size: var(--t-note); font-weight: 500; letter-spacing: 0.03em; color: var(--encre-douce); }
.coordonnees dd { margin: 0; font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }

.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; background: var(--acier); border: 1px solid var(--trait-fin); border-radius: 12px; padding: clamp(1.25rem, 3vw, 2.25rem); }
.champ { display: grid; gap: 0.35rem; }
.champ-large { grid-column: 1 / -1; }
.champ label { font-weight: 600; font-size: 0.95rem; }
.champ input, .champ select, .champ textarea {
  font: inherit; color: var(--encre); background: #fff; border: 1px solid var(--trait); border-radius: 6px;
  padding: 0.7rem 0.8rem; width: 100%;
}
.champ textarea { min-height: 9rem; resize: vertical; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible { outline-offset: 0; border-color: var(--laiton); }
.formulaire-etat { grid-column: 1 / -1; font-weight: 500; min-height: 1.5em; margin: 0; }
.formulaire-etat[data-etat="erreur"] { color: #a12318; }
.formulaire-etat[data-etat="ok"] { color: #1c6b3a; }
.piege { position: absolute; left: -200vw; }

/* Champ non renseigné dans site.config.json */
.a-completer { background: #ffe9a8; color: #4a3500; padding: 0.05em 0.4em; border: 1px dashed #a07400; font-weight: 600; font-size: 0.95em; }

/* --------------------------------------------------------------------------
   Texte long (mentions légales)
   -------------------------------------------------------------------------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--t-h3); margin-top: 2.75rem; margin-bottom: 0.8rem; padding-top: 1rem; border-top: 1px solid var(--trait); }
.prose p, .prose li { color: var(--encre-douce); }
.prose ul { list-style: none; margin-top: 0.75rem; }
.prose ul li { padding-block: 0.15rem; }
.prose strong { color: var(--encre); }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.pied { padding-block: 3rem; font-size: 0.95rem; border-top: 1px solid #24314b; }
.pied-logo { height: 1.9rem; width: auto; margin-bottom: 1rem; }
.pied .conteneur { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.pied p { color: #b9c3d1; max-width: 44ch; }
.pied ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.pied strong { color: #f5f7f9; }

/* --------------------------------------------------------------------------
   Utilitaires (remplacent les anciens style="..." en ligne : compatibles CSP stricte)
   -------------------------------------------------------------------------- */
.espace-haut { margin-top: 1.25rem; }
.espace-haut-large { margin-top: 2rem; }
.sans-filet { border-bottom: 0; }
.prose h2.premier { margin-top: 0; border-top: 0; padding-top: 0; }
.boucle { list-style: none; margin: 0; padding: 0; }
.lien-suite { grid-column: 2 / -1; font-weight: 600; }
.lien-suite a::after { content: " \2192"; }

/* --------------------------------------------------------------------------
   Questions fréquentes
   -------------------------------------------------------------------------- */
.faq { border-top: 1.5px solid var(--encre); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--trait); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 600; font-stretch: 105%; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.9rem; font-size: 1.4rem; line-height: 1;
  color: var(--tracage); font-weight: 500;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--encre-douce); padding-bottom: 1.25rem; }

/* --------------------------------------------------------------------------
   Calculateur de gain
   -------------------------------------------------------------------------- */
.calcul { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); align-items: start; }
.calcul-saisie { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; background: var(--acier); border: 1px solid var(--trait-fin); border-radius: 12px; padding: clamp(1.25rem, 3vw, 2.25rem); }
.calcul-legende { grid-column: 1 / -1; }
.calcul-saisie .champ { align-content: end; }
.calcul-resultat { position: sticky; top: 1rem; }
.cartouche-resultat { border: 1.5px solid var(--encre); background: var(--blanc); border-radius: 12px; overflow: hidden; }
.cartouche-resultat dd { font-size: 1.1rem; }
.cartouche-resultat > div:nth-last-child(2) { border-bottom: 1px solid var(--trait); }
.cartouche-resultat .resultat-fort { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-stretch: 112%; color: var(--tracage); line-height: 1.15; }

/* Formulaire de contact sans e-mail configuré : message prêt à envoyer par SMS ou à copier */
.secours { display: grid; gap: 0.5rem; border-top: 1px solid var(--trait); padding-top: 1rem; }
.secours label { font-weight: 600; font-size: 0.95rem; }
.secours textarea { font: inherit; font-size: 0.95rem; color: var(--encre); background: #fff; border: 1px solid var(--trait); border-radius: 2px; padding: 0.7rem 0.8rem; width: 100%; min-height: 9rem; resize: vertical; }
.secours .actions { margin-top: 0.5rem; }

/* --------------------------------------------------------------------------
   Écrans étroits
   -------------------------------------------------------------------------- */
@media (max-width: 60rem) {
  .ouverture-grille { grid-template-columns: 1fr; }
  .ligne, .realisation { grid-template-columns: 1fr; }
  .duo, .contact-grille { grid-template-columns: 1fr; }
  .regles { grid-template-columns: 1fr; }
  .regle { padding: 1.5rem 0; }
  .regle + .regle { border-left: 0; padding-left: 0; border-top: 1px solid var(--trait); }
  .sombre .regle + .regle { border-top-color: #3a465c; }
  .boucle { grid-template-columns: 1fr 1fr; }
  .boucle li:nth-child(3) { border-left: 0; }
  .boucle li:nth-child(n + 3) { border-top: 1px solid var(--trait); }
  .outillage { grid-template-columns: 1fr 1fr; }
  .tarif-affiche { grid-template-columns: 1fr; }
  .calcul { grid-template-columns: 1fr; }
  .calcul-resultat { position: static; }
  .lien-suite { grid-column: auto; }
}

@media (max-width: 44rem) {
  .pupitre-programme { font-size: 0.72rem; }
  .pupitre-programme li { padding: 0 0.6rem; }
  .pupitre-vue { padding-inline: 0.5rem; }
  .marque img { height: 1.75rem; }
  .entete { position: static; }
  .entete .conteneur { padding-block: 0.7rem; }
  .navigation a.bouton { padding: 0.4rem 0.8rem; }
  .navigation .texte-long { display: none; }
  .navigation .texte-court { display: inline; }
  .navigation ul { gap: 0.1rem 1rem; font-size: 0.95rem; }
  .gamme, .gamme tbody, .gamme tr, .gamme td, .gamme th { display: block; }
  .gamme thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gamme caption { display: block; }
  .gamme tr { border-bottom: 1.5px solid var(--encre); padding: 1rem 1.1rem; }
  .gamme tbody tr:last-child { border-bottom: 0; }
  .gamme th, .gamme td { border: 0; padding: 0.2rem 0; width: auto; }
  .gamme .phase { width: auto; }
  .gamme td[data-colonne]::before { content: attr(data-colonne) " : "; font-stretch: 75%; font-size: var(--t-note); font-weight: 600; color: var(--encre-douce); letter-spacing: 0.03em; }

  .grille thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .grille, .grille tbody, .grille tr, .grille th, .grille td { display: block; }
  .grille tr { padding-block: 1rem; border-bottom: 1px solid var(--trait); }
  .grille th, .grille td { border: 0; padding: 0.1rem 0; }
  .grille td:last-child { text-align: left; }

  .formulaire, .calcul-saisie { grid-template-columns: 1fr; }
  .boucle, .outillage { grid-template-columns: 1fr; }
  .boucle li + li { border-left: 0; border-top: 1px solid var(--trait); }
  .cartouche { grid-template-columns: 1fr; }
  .cartouche > div:nth-child(odd) { border-right: 0; }
  .cartouche > div:nth-last-child(2) { border-bottom: 1px solid var(--trait); }
}

@media print {
  .entete, .pied, .actions, .formulaire { display: none; }
  body { background: #fff; }
}

/* Appel final : la question entre les accolades du logo */
.accolades::before, .accolades::after { color: var(--laiton-clair); font-weight: 500; font-stretch: 100%; }
.accolades::before { content: "{ "; }
.accolades::after { content: " }"; }
