/* =========================================================================
   ExpertTravaux — feuille de style unique
   Direction : « le plan avant le chantier ». Dessin technique + revue editoriale.
   Aucune photographie : tout est trace, donc tout est verifiable.
   ========================================================================= */

/* ---------- 1. Polices auto-hebergees --------------------------------- */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/media/fonts/instrument-serif-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/media/fonts/instrument-serif-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/media/fonts/instrument-serif-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/media/fonts/inter-tight-400500-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/media/fonts/jetbrains-mono-400500-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* ---------- 2. Jetons -------------------------------------------------- */
:root {
  /* Encres et papiers : tout est chaud, rien n'est gris bleute */
  --encre:        #14130f;
  --encre-2:      #1c1b16;
  --encre-3:      #26241d;
  --craie:        #f4f0e6;
  --craie-2:      #ebe5d7;
  --craie-3:      #ddd5c2;

  /* Texte sur fond sombre */
  --texte:        #f2eee4;
  --texte-2:      #b8b2a2;
  --texte-3:      #8b8674;

  /* Texte sur fond clair */
  --texte-clair:   #14130f;
  --texte-clair-2: #4f4a3a;
  --texte-clair-3: #615c4b;

  /* Accents */
  --laiton:        #cfa254;
  --laiton-clair:  #e2c087;
  --laiton-sombre: #7f611f;
  --plan:          #7ba0dd;
  --plan-sombre:   #2b559d;
  --alerte:        #d68a55;
  --alerte-sombre: #9a4d15;

  /* Filets */
  --filet:            rgb(242 238 228 / 0.11);
  --filet-fort:       rgb(242 238 228 / 0.20);
  --filet-clair:      rgb(20 19 15 / 0.16);
  --filet-clair-fort: rgb(20 19 15 / 0.26);

  /* Rythme */
  --marge:           clamp(1.25rem, 5vw, 4rem);
  --colonne:         78rem;
  --colonne-etroite: 42rem;
  --bloc:            clamp(3.5rem, 7vw, 6.5rem);
  --rayon:           3px;
  --rayon-lg:        6px;

  /* Typographie */
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans:  'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Courbes */
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --douce:  cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

/* ---------- 3. Reinitialisation ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--encre-3) var(--encre);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--encre);
  color: var(--texte);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--laiton); color: var(--encre); }

/* ---------- 4. Accessibilite ------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--laiton-clair);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* L en-tete est fixe : sans cette marge, un element atteint au clavier ou
   par une ancre se retrouverait cache dessous. */
:where(a, button, summary, input, select, textarea, details, [tabindex]) {
  scroll-margin-top: 7rem;
  scroll-margin-bottom: 2rem;
}

.evitement {
  position: fixed;
  left: var(--marge);
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--laiton);
  color: #17150f;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.25s var(--sortie);
}
.evitement:focus { transform: translateY(0.75rem); }

.lecteur-seul {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 5. Typographie --------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.titre-geant {
  font-size: clamp(2.9rem, 1.4rem + 5.6vw, 7rem);
  line-height: 0.93;
  letter-spacing: -0.032em;
}
.titre-1 { font-size: clamp(2.35rem, 1.4rem + 4.2vw, 5.25rem); line-height: 0.99; letter-spacing: -0.026em; }
.titre-2 { font-size: clamp(1.9rem, 1.35rem + 2.5vw, 3.6rem); line-height: 1.03; letter-spacing: -0.022em; }
.titre-3 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.95rem); line-height: 1.14; letter-spacing: -0.014em; }
.titre-4 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.25; letter-spacing: -0.01em; }

em, .italique { font-style: italic; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--laiton-clair); }

.kicker {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--texte-3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.kicker::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: var(--laiton);
  flex: none;
}
.kicker--nu::before { display: none; }

.chapo {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.52;
  color: var(--texte-2);
  letter-spacing: -0.011em;
  max-width: 46ch;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chiffre {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--laiton-clair);
  letter-spacing: -0.02em;
}

a { color: inherit; }
.lien {
  color: var(--texte);
  text-decoration: none;
  background-image: linear-gradient(var(--laiton), var(--laiton));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.35s var(--sortie), color 0.2s;
  padding-bottom: 1px;
}
.lien:hover { background-size: 100% 2px; color: var(--laiton-clair); }

/* ---------- 6. Grille et sections -------------------------------------- */
.enveloppe {
  width: 100%;
  max-width: var(--colonne);
  margin-inline: auto;
  padding-inline: var(--marge);
}
.enveloppe--large { max-width: 96rem; }
.enveloppe--etroite { max-width: 52rem; }

.section { padding-block: var(--bloc); position: relative; }
.section--serree { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* Deux sections qui se suivent additionnaient leurs marges : 256 px de vide
   a chaque jonction, soit plus que le contenu de certaines sections. */
.section + .section,
.section + .appel { padding-top: calc(var(--bloc) * 0.62); }

/* Sections claires : le papier */
.papier {
  background: var(--craie);
  color: var(--texte-clair);
  --texte: var(--texte-clair);
  --texte-2: var(--texte-clair-2);
  --texte-3: var(--texte-clair-3);
  --filet: var(--filet-clair);
  --filet-fort: var(--filet-clair-fort);
  --laiton-clair: var(--laiton-sombre);
  --plan: var(--plan-sombre);
  --alerte: var(--alerte-sombre);
  --encre-2: var(--craie-2);
  --encre-3: var(--craie-3);
}
.papier .kicker::before { background: var(--laiton-sombre); }
.papier .chiffre,
.papier .case__num,
.papier .index__num,
.papier .resultat__cle { color: var(--laiton-sombre); }
.papier ::selection { background: var(--encre); color: var(--craie); }

/* Fond quadrille discret, dessine en CSS */
.quadrillage { position: relative; isolation: isolate; }
.quadrillage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--filet) 1px, transparent 1px),
    linear-gradient(to bottom, var(--filet) 1px, transparent 1px);
  background-size: 5.5rem 5.5rem;
  -webkit-mask-image: radial-gradient(ellipse 62% 52% at 50% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 62% 52% at 50% 45%, #000 0%, transparent 72%);
  pointer-events: none;
}

.filet-haut { border-top: 1px solid var(--filet); }
.filet-bas { border-bottom: 1px solid var(--filet); }

/* ---------- 7. Boutons -------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  border-radius: var(--rayon);
  border: 1px solid transparent;
  position: relative;
  transition: color 0.3s var(--douce), border-color 0.3s var(--douce), background-color 0.3s var(--douce);
  white-space: nowrap;
}
.bouton .fleche { transition: transform 0.4s var(--sortie); flex: none; }
.bouton:hover .fleche { transform: translateX(4px); }

.bouton--plein { background: var(--laiton); color: #17150f; }
.bouton--plein:hover { background: var(--laiton-clair); color: #17150f; }
.papier .bouton--plein { background: var(--encre); color: var(--craie); }
.papier .bouton--plein:hover { background: var(--encre-3); color: var(--craie); }

.bouton--filet { border-color: var(--filet-fort); color: var(--texte); }
.bouton--filet:hover { border-color: var(--laiton); color: var(--laiton-clair); }

.bouton--nu { padding-inline: 0; color: var(--texte); border: 0; border-radius: 0; }
.bouton--nu::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--filet-fort);
  transition: background-color 0.3s;
}
.bouton--nu:hover { color: var(--laiton-clair); }
.bouton--nu:hover::after { background: var(--laiton); }

.bouton[disabled] { opacity: 0.42; cursor: not-allowed; }
.bouton[disabled]:hover .fleche { transform: none; }

/* ---------- 8. En-tete -------------------------------------------------- */
.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: transform 0.45s var(--sortie), background-color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.entete--pose {
  background: rgb(20 19 15 / 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgb(242 238 228 / 0.10);
}
.entete--cachee { transform: translateY(-102%); }

.entete__grille { display: flex; align-items: center; gap: 1.5rem; height: 4.5rem; }
@media (min-width: 60rem) { .entete__grille { height: 5.25rem; } }

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.06em;
  font-family: var(--serif);
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--texte);
  flex: none;
  line-height: 1;
  padding-block: 0.45rem;
}
.logo b { font-weight: 400; }
.logo i { font-style: italic; color: var(--laiton-clair); }
.logo span {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  color: var(--texte-3);
  text-transform: uppercase;
  transform: translateY(-0.55em);
}

.nav { margin-left: auto; display: none; }
@media (min-width: 80rem) { .nav { display: block; } }
.nav ul { display: flex; align-items: center; gap: 0.15rem; }
.nav a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  font-size: 0.875rem;
  color: var(--texte-2);
  text-decoration: none;
  border-radius: var(--rayon);
  transition: color 0.25s;
  position: relative;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--texte); }
.nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.2rem;
  height: 1px;
  background: var(--laiton);
}
.entete__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
@media (min-width: 80rem) { .entete__actions { margin-left: 1rem; } }
.entete__cta { display: none; }
@media (min-width: 48rem) { .entete__cta { display: inline-flex; padding: 0.7rem 1.2rem; font-size: 0.875rem; } }
/* L'appel court : plus discret que le cadrage, et un peu plus etroit.
   Entre 80rem et 82.5rem, la navigation vient d'apparaitre et la barre est
   pleine a cent pixels pres : on resserre les entretoises plutot que de faire
   disparaitre un bouton la ou le panneau n'existe plus pour le rattraper. */
.entete__cta--rapide { padding-inline: 1rem; }
@media (min-width: 80rem) and (max-width: 82.5rem) {
  .nav a { padding-inline: 0.6rem; }
  .entete__cta { padding-inline: 0.9rem; }
  .entete__cta--rapide { padding-inline: 0.75rem; }
}

.burger {
  width: 2.75rem; height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon);
  flex: none;
}
@media (min-width: 80rem) { .burger { display: none; } }
.burger span {
  display: block;
  width: 1.1rem; height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--sortie), opacity 0.2s;
}
.burger span + span { margin-top: 5px; }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.panneau {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--encre);
  padding: 6rem var(--marge) 3rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5rem);
  transition: opacity 0.4s var(--douce), transform 0.5s var(--sortie), visibility 0.4s;
}
.panneau[data-ouvert='true'] { opacity: 1; visibility: visible; transform: none; }
.panneau ul { border-top: 1px solid var(--filet); }
.panneau li { border-bottom: 1px solid var(--filet); }
.panneau a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.05rem 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--texte);
}
.panneau a i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.5625rem;
  color: var(--texte-3);
  letter-spacing: 0.12em;
}
.panneau .bouton { margin-top: 2rem; width: 100%; justify-content: center; }
/* Les deux appels du panneau : empiles, un seul ecart au-dessus du bloc. */
.panneau .rangee { display: grid; gap: 0.75rem; margin-top: 2rem; }
.panneau .rangee .bouton { margin-top: 0; }

/* ---------- 9. L'arrivee au defilement ---------------------------------- */
.arrivee { position: relative; height: 380svh; }
@media (min-width: 64rem) { .arrivee { height: 460svh; } }
@media (prefers-reduced-motion: reduce) { .arrivee { height: auto; } }

.arrivee__scene {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 33rem;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background:
    radial-gradient(120% 85% at 50% 112%, #2a2619 0%, transparent 60%),
    radial-gradient(90% 60% at 50% -12%, #201e16 0%, transparent 70%),
    var(--encre);
}
@media (prefers-reduced-motion: reduce) {
  .arrivee__scene { position: relative; height: auto; }
}

/* Le dessin occupe la zone haute, le texte la zone basse. */
.arrivee__dessin {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 4.25rem var(--marge) 0.25rem;
  min-height: 0;
  overflow: hidden;
}
.arrivee__cadre { width: min(100%, 70rem); min-height: 0; }
.plan { width: 100%; height: 100%; overflow: visible; }
.plan .trait { fill: none; stroke: var(--texte); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.plan .trait--fin { stroke: var(--texte-3); stroke-width: 1; }
.plan .trait--cote { stroke: var(--laiton); stroke-width: 1; }
.plan .trait--tirets { stroke-dasharray: 5 5; }
.plan .aplat { fill: rgb(242 238 228 / 0.04); stroke: none; }
.plan .aplat--neuf { fill: rgb(207 162 84 / 0.11); stroke: none; }
.plan .etiquette {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--laiton-clair);
}
.plan .etiquette--pale { fill: var(--texte-3); }
.plan .compact { display: none; }

/* Sous 48rem, le dessin est cadre serre : les cotes fines deviendraient
   illisibles, on ne garde que ce qui reste dechiffrable. */
@media (max-width: 63.99rem) {
  .plan .detail { display: none; }
  .plan .compact { display: block; }
  .plan .etiquette { font-size: 15px; letter-spacing: 0.14em; }
  .plan .trait { stroke-width: 1.4; }
}

/* Les couches sont promues des le depart : sinon leur toute premiere
   apparition coute une trame au milieu du defilement. */
.calque { opacity: 0; will-change: opacity; }
@media (prefers-reduced-motion: reduce) { .calque { opacity: 1 !important; transform: none !important; } }

.arrivee__texte {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(3rem, 7vh, 5rem);
}
.arrivee__texte::before {
  content: '';
  position: absolute;
  inset: -7rem 0 0 0;
  z-index: -1;
  background: linear-gradient(to bottom, transparent, #14130f 42%);
  pointer-events: none;
}
.arrivee__bas {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.75rem 3rem;
}
.arrivee__bas > .pile { gap: 1.15rem; }
.arrivee__bas > .pile:last-child { gap: 1.5rem; }
@media (min-width: 62rem) {
  .arrivee__bas > .pile:last-child { max-width: 30rem; padding-bottom: 0.4rem; }
}

.etape {
  position: absolute;
  top: 38%;
  right: var(--marge);
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  z-index: 3;
}
@media (min-width: 64rem) { .etape { display: flex; } .molette { left: 50%; right: auto; } }
.etape li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--texte-3);
  transition: color 0.4s var(--douce);
  text-align: right;
}
.etape li::after {
  content: '';
  width: 1.5rem; height: 1px;
  background: currentColor;
  transition: width 0.55s var(--sortie), background-color 0.4s;
  flex: none;
}
.etape li[data-actif='true'] { color: var(--laiton-clair); }
.etape li[data-actif='true']::after { width: 3rem; background: var(--laiton); }

.etape-mobile {
  opacity: 0;
  position: absolute;
  left: 0; right: 0;
  bottom: 0.75rem;
  z-index: 4;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--laiton-clair);
  pointer-events: none;
  transition: opacity 0.4s var(--douce);
}
@media (min-width: 64rem) { .etape-mobile { display: none; } }

.molette {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--texte-3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: opacity 0.5s;
  pointer-events: none;
}
.molette i {
  display: block;
  width: 1.75rem; height: 1px;
  background: var(--laiton);
  transform-origin: left;
  animation: coule 2.4s var(--douce) infinite;
}
@keyframes coule {
  0%   { transform: scaleX(0); opacity: 0; }
  35%  { transform: scaleX(1); opacity: 1; }
  70%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1) translateX(0.4rem); opacity: 0; }
}

/* ---------- 10. Revelations au defilement ------------------------------- */
[data-anime] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s var(--douce), transform 0.95s var(--sortie);
  transition-delay: var(--retard, 0ms);
}

/* Un enfant de grille ne doit pas etre transforme : la couche composee que
   cela cree peut etre peinte a une taille perimee pendant un defilement, et
   les colonnes apparaissent alors repliees. L opacite seule suffit. */
.grille > [data-anime],
.planches > [data-anime],
.outils-liste > [data-anime],
.metiers > [data-anime],
.index > [data-anime] {
  transform: none;
  transition: opacity 0.85s var(--douce);
}
[data-anime='vu'] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-anime] { opacity: 1; transform: none; } }

.trace { transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--sortie); opacity: 1; }
.trace[data-anime='vu'] { transform: scaleX(1); }

/* ---------- 11. Blocs editoriaux ---------------------------------------- */
.duo { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.duo > * { min-width: 0; }
@media (min-width: 58rem) {
  .duo { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
  .duo--inverse { grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); }
  .duo--collant > :first-child { position: sticky; top: 7rem; }
}

.paire { display: grid; gap: clamp(2.5rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 62rem) { .paire { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.paire > * { min-width: 0; width: 100%; }

.entete-section { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.entete-section .chapo { max-width: 52ch; }

.grille { display: grid; gap: 1px; background: var(--filet); border: 1px solid var(--filet); }
@media (min-width: 46rem) { .grille--2, .grille--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .grille--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 74rem) { .grille--4 { grid-template-columns: repeat(4, 1fr); } }

.case {
  min-width: 0;
  background: var(--encre);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: grid;
  gap: 0.8rem;
  align-content: start;
  position: relative;
  transition: background-color 0.4s var(--douce);
}
.papier .case { background: var(--craie); }
.case:hover { background: var(--encre-2); }
.case__num { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.18em; color: var(--laiton); margin-bottom: 0.35rem; }
.case p { color: var(--texte-2); font-size: 0.9375rem; }

.carte {
  min-width: 0;
  display: grid;
  gap: 0.95rem;
  align-content: start;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--encre);
  text-decoration: none;
  position: relative;
  transition: background-color 0.45s var(--douce);
  overflow: hidden;
}
.papier .carte { background: var(--craie); }
.carte::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--laiton);
  transition: width 0.6s var(--sortie);
}
.carte:hover::after { width: 100%; }
.carte:hover { background: var(--encre-2); }
.carte__titre { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.carte__titre .fleche { color: var(--laiton); opacity: 0; transform: translate(-6px, 6px); transition: opacity 0.4s, transform 0.5s var(--sortie); flex: none; }
.carte:hover .carte__titre .fleche { opacity: 1; transform: none; }
.carte p { color: var(--texte-2); font-size: 0.9375rem; }
.carte__meta { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texte-3); }

.index { border-top: 1px solid var(--filet); }
.index a, .index__ligne {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  padding: clamp(1.4rem, 3vw, 2.1rem) 0;
  border-bottom: 1px solid var(--filet);
  text-decoration: none;
  transition: padding-left 0.5s var(--sortie), background-color 0.4s;
}
@media (min-width: 58rem) {
  .index a, .index__ligne { grid-template-columns: 3.25rem minmax(0, 24rem) minmax(0, 1fr) auto; gap: 0 1.5rem; }
}
.index a:hover { padding-left: 1rem; }
.index__num { font-family: var(--mono); font-size: 0.6875rem; color: var(--laiton); letter-spacing: 0.1em; }
.index__titre { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem); line-height: 1.12; grid-column: 2; }
@media (min-width: 58rem) { .index__titre { grid-column: auto; } }
.index__note { color: var(--texte-2); font-size: 0.9375rem; grid-column: 2; }
@media (min-width: 58rem) { .index__note { grid-column: auto; } }
.index__fin {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--texte-3);
  letter-spacing: 0.1em;
  white-space: nowrap;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
@media (min-width: 58rem) { .index__fin { grid-column: auto; justify-content: flex-end; } }

.chiffres { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 46rem) { .chiffres { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 70rem) { .chiffres { grid-template-columns: repeat(4, 1fr); } }
.chiffres > li { display: grid; gap: 0.5rem; align-content: start; }
.chiffres b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 2rem + 3vw, 4.25rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--laiton-clair);
  font-variant-numeric: tabular-nums;
}
.chiffres small { font-size: 0.9375rem; color: var(--texte-2); line-height: 1.45; }
.chiffres .source { font-family: var(--mono); font-size: 0.5625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texte-3); }

/* ---------- 12. Contenu long -------------------------------------------- */
.prose { max-width: 40rem; min-width: 0; }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: clamp(1.65rem, 1.3rem + 1.6vw, 2.4rem); margin-top: 2.5em; margin-bottom: 0.1em; scroll-margin-top: 7rem; }
.prose h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem); margin-top: 2em; scroll-margin-top: 7rem; }
.prose p { color: var(--texte-2); }
.prose strong { color: var(--texte); font-weight: 500; }
.prose a { color: var(--texte); text-decoration: underline; text-decoration-color: var(--laiton); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--laiton-clair); }
.prose ul, .prose ol { display: grid; gap: 0.7rem; color: var(--texte-2); }
.prose ul > li { padding-left: 1.5rem; position: relative; }
.prose ul > li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 0.5rem; height: 1px; background: var(--laiton); }
.prose ol { counter-reset: n; }
.prose ol > li { padding-left: 2.25rem; position: relative; counter-increment: n; }
.prose ol > li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 0.12em; font-family: var(--mono); font-size: 0.75rem; color: var(--laiton); }
.prose blockquote {
  border-left: 1px solid var(--laiton);
  padding-left: 1.5rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.35;
  color: var(--texte);
}
.prose figure { margin: 2.25em 0; }
.prose figcaption { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texte-3); margin-top: 0.85rem; }

.encadre {
  border: 1px solid var(--filet);
  border-left: 2px solid var(--laiton);
  padding: clamp(1.25rem, 2.5vw, 1.85rem);
  display: grid;
  gap: 0.6rem;
  background: var(--encre-2);
}
.encadre__titre { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--laiton-clair); }
.encadre p, .encadre li { font-size: 0.9375rem; color: var(--texte-2); }
.encadre--alerte { border-left-color: var(--alerte); }
.encadre--alerte .encadre__titre { color: var(--alerte); }

.reponse {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.9vw, 1.7rem);
  line-height: 1.34;
  color: var(--texte);
  border-top: 1px solid var(--filet);
  border-bottom: 1px solid var(--filet);
  padding-block: 1.5rem;
}

.tableau-enveloppe { overflow-x: auto; max-width: 100%; border: 1px solid var(--filet); overscroll-behavior-x: contain; }
.tableau { font-size: 0.9375rem; min-width: 30rem; }
.tableau th, .tableau td { padding: 0.9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--filet); }
.tableau thead th {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--texte-3);
  background: var(--encre-2);
  white-space: nowrap;
}
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody th { font-weight: 400; color: var(--texte); }
.tableau td { color: var(--texte-2); }
.tableau td.chiffree {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--laiton-clair);
  white-space: nowrap;
}
.tableau tbody tr { transition: background-color 0.25s; }
.tableau tbody tr:hover { background: var(--encre-2); }
.tableau caption {
  caption-side: bottom;
  padding: 0.85rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--texte-3);
  text-align: left;
  border-top: 1px solid var(--filet);
  line-height: 1.7;
}

.sommaire { display: grid; gap: 0.5rem; font-size: 0.875rem; }
.sommaire a { color: var(--texte-2); text-decoration: none; transition: color 0.25s; display: block; padding: 0.15rem 0; }
.sommaire a:hover, .sommaire a[data-actif='true'] { color: var(--laiton-clair); }
.sommaire a[data-niveau='3'] { padding-left: 1rem; font-size: 0.8125rem; }

.ariane { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-3); }
.ariane ol { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ariane a { text-decoration: none; color: var(--texte-3); transition: color 0.25s; }
.ariane a:hover { color: var(--laiton-clair); }
.ariane li + li::before { content: '/'; margin-right: 0.5rem; color: var(--filet-fort); }

.faq { border-top: 1px solid var(--filet); }
.faq details { border-bottom: 1px solid var(--filet); }
.faq summary {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.3rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.25;
  transition: color 0.25s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: ''; }
.faq summary:hover { color: var(--laiton-clair); }
.faq summary i { flex: none; width: 0.875rem; height: 0.875rem; position: relative; transform: translateY(-0.1em); }
.faq summary i::before, .faq summary i::after { content: ''; position: absolute; background: var(--laiton); transition: transform 0.35s var(--sortie), opacity 0.25s; }
.faq summary i::before { inset: 50% 0 auto 0; height: 1px; transform: translateY(-50%); }
.faq summary i::after { inset: 0 50% 0 auto; width: 1px; transform: translateX(50%); }
.faq details[open] summary i::after { opacity: 0; transform: translateX(50%) rotate(90deg); }
.faq__corps { padding-bottom: 1.6rem; max-width: 46rem; }
.faq__corps p, .faq__corps li { color: var(--texte-2); font-size: 0.9375rem; }
.faq__corps > * + * { margin-top: 0.85rem; }

/* ---------- 13. Outils et formulaires ----------------------------------- */
.outil { border: 1px solid var(--filet); background: var(--encre-2); display: grid; }
@media (min-width: 64rem) { .outil { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); } }

.outil__questions { padding: clamp(1.5rem, 3.5vw, 2.75rem); display: grid; gap: 1.75rem; align-content: start; }
.outil__resultat {
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--filet);
  background: var(--encre);
  display: grid;
  gap: 1.15rem;
  align-content: start;
}
.papier .outil__resultat { background: var(--craie); }
@media (min-width: 64rem) {
  .outil__resultat { border-top: 0; border-left: 1px solid var(--filet); position: sticky; top: 6rem; align-self: start; }
}

.champ { display: grid; gap: 0.55rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.champ > label, .champ > legend, .champ__titre {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--texte);
  padding: 0;
  line-height: 1.4;
}
.champ__aide { font-size: 0.8125rem; color: var(--texte-3); line-height: 1.5; }
.champ input[type='text'],
.champ input[type='email'],
.champ input[type='tel'],
.champ input[type='number'],
.champ select,
.champ textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--encre);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon);
  color: var(--texte);
  font-size: 0.9375rem;
  transition: border-color 0.25s, background-color 0.25s;
}
.papier .champ input, .papier .champ select, .papier .champ textarea { background: var(--craie); }
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--laiton); }
.champ textarea { min-height: 7rem; resize: vertical; }
.champ select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1.1rem center, right 0.85rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}
.champ__erreur { font-size: 0.8125rem; color: var(--alerte); }
.champ--invalide input, .champ--invalide select, .champ--invalide textarea { border-color: var(--alerte); }

.choix { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choix label {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon);
  font-size: 0.875rem;
  color: var(--texte-2);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}
.choix input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.choix label:hover { border-color: var(--texte-3); color: var(--texte); }
.choix label:has(input:checked) { border-color: var(--laiton); color: var(--laiton-clair); background: rgb(207 162 84 / 0.09); }
.choix label:has(input:focus-visible) { outline: 2px solid var(--laiton-clair); outline-offset: 2px; }
.choix--colonne { flex-direction: column; align-items: stretch; }
.choix--colonne label { justify-content: flex-start; text-align: left; line-height: 1.4; }

.curseur { display: grid; gap: 0.7rem; }
.curseur__valeur { font-family: var(--mono); font-size: 1.5rem; color: var(--laiton-clair); font-variant-numeric: tabular-nums; }
input[type='range'] { appearance: none; -webkit-appearance: none; width: 100%; height: 1px; background: var(--filet-fort); cursor: pointer; }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: var(--laiton);
  border: 3px solid var(--encre-2);
  box-shadow: 0 0 0 1px var(--laiton);
  transition: transform 0.2s;
}
input[type='range']::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type='range']::-moz-range-thumb {
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: var(--laiton);
  border: 3px solid var(--encre-2);
  box-shadow: 0 0 0 1px var(--laiton);
}
.curseur__bornes { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.625rem; color: var(--texte-3); letter-spacing: 0.1em; }

.consentement { display: grid; gap: 0.9rem; }
.consentement label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; font-size: 0.8125rem; color: var(--texte-2); line-height: 1.55; cursor: pointer; }
.consentement input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem; height: 1.05rem;
  border: 1px solid var(--filet-fort);
  border-radius: 2px;
  margin-top: 0.18em;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
}
.consentement input[type='checkbox']:checked { background: var(--laiton); border-color: var(--laiton); }
.consentement input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 0.32rem; top: 0.1rem;
  width: 0.26rem; height: 0.55rem;
  border: solid #17150f;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.resultat__valeur {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  line-height: 0.96;
  color: var(--laiton-clair);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.resultat__ligne { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--filet); font-size: 0.875rem; }
.resultat__ligne:last-child { border-bottom: 0; }
.resultat__ligne span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--texte); white-space: nowrap; }
.resultat__ligne span:first-child { color: var(--texte-2); }

.barre { display: flex; height: 0.35rem; overflow: hidden; border-radius: 2px; background: var(--filet); }
.barre i { display: block; height: 100%; transition: width 0.7s var(--sortie); }

.progression { display: flex; gap: 0.4rem; }
.progression i { flex: 1; height: 2px; background: var(--filet-fort); transition: background-color 0.45s var(--douce); }
.progression i[data-faite='true'] { background: var(--laiton); }

[hidden] { display: none !important; }

/* ---------- 14. Pied de page -------------------------------------------- */
.pied { background: var(--encre); border-top: 1px solid var(--filet); padding-block: clamp(3.5rem, 7vw, 6rem) 2.5rem; }
.pied__haut { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 58rem) { .pied__haut { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }
.pied__colonnes { display: grid; gap: 2.25rem; }
@media (min-width: 34rem) { .pied__colonnes { grid-template-columns: repeat(3, 1fr); } }
.pied h2 { font-family: var(--mono); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--texte-3); margin-bottom: 1.1rem; }
.pied ul { display: grid; gap: 0.25rem; }
.pied ul a { display: inline-block; padding-block: 0.35rem; font-size: 0.9375rem; color: var(--texte-2); text-decoration: none; transition: color 0.25s; }
.pied ul a:hover { color: var(--laiton-clair); }
.pied__bas {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--filet);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--texte-3);
}
.pied__bas ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.pied__bas a { display: inline-block; padding-block: 0.35rem; color: var(--texte-3); text-decoration: none; transition: color 0.25s; }
.pied__bas a:hover { color: var(--laiton-clair); }

/* ---------- 15. Utilitaires --------------------------------------------- */
.ruban { display: flex; gap: 0.7rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-3); }
.ruban li { display: flex; align-items: center; gap: 0.7rem; }
.ruban li + li::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--laiton); flex: none; }

.marque-maj { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-3); }
.marque-maj::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--laiton); flex: none; }

.pile { display: grid; gap: 1.5rem; align-content: start; justify-items: start; min-width: 0; }
.pile--serree { gap: 0.8rem; }
.rangee { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.hr { height: 1px; background: var(--filet); border: 0; }
.centre { text-align: center; justify-items: center; }

/* Liens de liste : cible tactile d au moins 30 px. */
.case ul a.lien, .pile ul a.lien { display: inline-block; padding-block: 0.35rem; }
.limite-45 { max-width: 45ch; }

/* ---------- 16. Rendu des resultats d'outils ---------------------------- */
/* Ces classes remplacent des styles en ligne : la politique de securite du
   contenu interdit l'attribut style, y compris dans le HTML injecte par JS. */
.resultat__cle { color: var(--laiton-clair); }
.resultat__verdict { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.015em; }
.resultat__note { color: var(--texte-2); font-size: 0.875rem; }
.resultat__note--pale { color: var(--texte-3); font-size: 0.9375rem; }
.resultat__erreur { color: var(--alerte); font-size: 0.9375rem; }
.resultat__rubrique { margin-top: 0.85rem; }
.resultat__valeur--plage {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.02em 0.4em;
}
.resultat__entre {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.26em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texte-3);
}
.resultat__ligne--libre span:last-child { white-space: normal; text-align: right; }
.barre--suite, .encadre--suite { margin-top: 0.6rem; }
.encadre__fin { font-size: 0.8125rem; }
.liste-points { display: grid; gap: 0.5rem; }
.liste-points li { font-size: 0.875rem; color: var(--texte-2); }
.confirmation { display: grid; gap: 1.25rem; justify-items: start; }
.confirmation .chapo { max-width: 46ch; }
.confirmation__suite { font-size: 0.875rem; color: var(--texte-2); max-width: 44ch; }

/* ---------- 17. Impression ---------------------------------------------- */
/* Un tableau de prix et une reference d'article se lisent souvent sur
   papier, en mairie ou face a une entreprise. Autant que ce soit lisible. */
@media print {
  :root {
    --encre: #fff;
    --encre-2: #fff;
    --encre-3: #fff;
    --craie: #fff;
    --craie-2: #fff;
    --texte: #000;
    --texte-2: #1c1c1c;
    --texte-3: #444;
    --filet: #bbb;
    --filet-fort: #888;
    --laiton: #6b5010;
    --laiton-clair: #6b5010;
    color-scheme: light;
  }

  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.45; }
  .papier, .appel, .case, .carte, .outil, .outil__resultat, .encadre { background: #fff !important; }

  /* Ce qui ne sert qu'a l'ecran. */
  .entete, .panneau, .molette, .etape, .etape-mobile, .evitement,
  .arrivee, .quadrillage::before, .pied__haut > .pile > .bouton,
  .bouton--filet, .bouton--plein, .bouton--nu { display: none !important; }

  .section { padding-block: 0.8cm; }
  .duo, .paire, .grille, .chiffres { display: block; }
  .grille > *, .duo > * { border: 0; margin-bottom: 0.6cm; }
  [data-anime] { opacity: 1 !important; transform: none !important; }

  h1, h2, h3 { break-after: avoid; color: #000; }
  .tableau-enveloppe, .encadre, figure, .faq details { break-inside: avoid; }
  .tableau { min-width: 0; }
  .tableau thead th { background: #f0f0f0; color: #000; }
  .faq details { display: block; }
  .faq__corps { display: block !important; }

  /* Le lecteur doit pouvoir retrouver la source hors ligne. */
  .prose a[href^="/"]::after { content: " (expert-travaux.com" attr(href) ")"; font-size: 9pt; color: #444; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }

  .pied { border-top: 1px solid #bbb; padding-block: 0.6cm 0; }
  .pied__colonnes, .pied__bas ul { display: none; }
}

/* ---------- 18. Les metiers ---------------------------------------------- */
.metiers { border-top: 1px solid var(--filet); }
.metiers > li {
  display: grid;
  gap: 1.25rem 3rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--filet);
}
@media (min-width: 58rem) {
  .metiers > li { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
}
.metier__entete { display: grid; gap: 0.6rem; align-content: start; }
.metier__role { color: var(--texte-2); font-size: 0.9375rem; max-width: 30ch; }
.metier__detail { display: grid; gap: 0.35rem 1.5rem; align-content: start; }
@media (min-width: 40rem) {
  .metier__detail { grid-template-columns: 10.5rem minmax(0, 1fr); }
}
.metier__detail dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--texte-3);
  padding-top: 0.35em;
}
.metier__detail dd { margin: 0 0 0.9rem; color: var(--texte-2); font-size: 0.9375rem; }
.metier__detail dd:last-child { margin-bottom: 0; }

/* ---------- 19. Photographies -------------------------------------------- */
/* Traitees comme les planches d'un dossier : un filet fin, une legende en
   chasse fixe, aucun effet. La photographie montre, le dessin explique. */
.photo { margin: 0; display: grid; gap: 0.85rem; min-width: 0; }
.photo picture { display: block; border: 1px solid var(--filet); background: var(--encre-2); }
.photo img { width: 100%; height: auto; display: block; }
.photo figcaption {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texte-3);
  line-height: 1.7;
}

/* Une planche cliquable : le filet se dore, l'image respire a peine. */
.photo--lien picture { overflow: hidden; }
.photo--lien img { transition: transform 0.7s var(--sortie), opacity 0.4s; }
a:hover > .photo--lien img, a:hover .photo--lien img { transform: scale(1.025); }
a:hover > .photo--lien picture, a:hover .photo--lien picture { border-color: var(--laiton); }

.prose .photo { margin-block: 2.5em; }

/* ---------- 20. Planches photographiques --------------------------------- */
/* Rythme de reportage : les largeurs alternent, sans que rien ne soit
   centre ni symetrique. */
.planches { display: grid; gap: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 2.5vw, 2rem); }
@media (min-width: 42rem) { .planches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) {
  .planches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* La colonne du milieu descend d'un cran : la grille reste une grille,
     mais l'oeil n'y lit pas une rangee bien alignee. */
  .planches > *:nth-child(3n + 2) { margin-top: clamp(1.5rem, 3vw, 2.75rem); }
}
.planches > * { min-width: 0; }

/* Une carte qui porte une photographie : l'image d'abord, le texte ensuite. */
.carte--photo { padding: 0; gap: 0; overflow: hidden; }
.carte--photo > .photo { margin-bottom: clamp(1.4rem, 2.5vw, 1.75rem); }
.carte--photo > .photo picture { border: 0; border-bottom: 1px solid var(--filet); }
.carte--photo > :not(.photo) { padding-inline: clamp(1.75rem, 3vw, 2.5rem); }
.carte--photo > :last-child { padding-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.carte--photo .carte__meta + .carte__titre { margin-top: 0.85rem; }
.carte--photo .carte__titre + p { margin-top: 0.85rem; }

/* ---------- 21. Signature de redaction ----------------------------------- */
.signature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.signature__nom {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.signature__nom + .marque-maj::before { display: none; }
.signature .marque-maj { padding-left: 1rem; border-left: 1px solid var(--filet); }

/* La ligne de referentiel des cartes d'outil : en capitales elle occupait
   trois lignes et pesait plus que le titre. */
.carte__source {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--texte-3);
  margin-top: 0.85rem;
}

/* ---------- 22. Formulaires professionnels -------------------------------- */
.requis { color: var(--laiton); }
.consentement__cle { color: var(--texte); font-weight: 500; }
.outil__questions > .champ + .champ { margin-top: 1.5rem; }
.outil__questions > .champ + .rangee { margin-top: 2rem; }
/* Deux champs courts par ligne : le formulaire court tient alors sur un ecran,
   ce qui est toute sa raison d'etre. Une seule colonne sur petit ecran. */
.duo-champs { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .duo-champs { grid-template-columns: 1fr 1fr; } }

/* ---------- 23. Niveaux et formules --------------------------------------- */
.niveau__prix {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--laiton-clair);
  font-variant-numeric: tabular-nums;
  margin-top: 0.35rem;
}
.niveau__contenu { margin-top: 0.35rem; }
.niveau__contenu li { font-size: 0.8125rem; }

/* ---------- 24. Offre commerciale ----------------------------------------- */
.offre {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--laiton);
  border-radius: var(--rayon);
  background: var(--encre-2);
}
.papier .offre { background: var(--craie-2); }
.offre__prix {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 2rem + 2.4vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--laiton-clair);
  font-variant-numeric: tabular-nums;
}
.offre__duree { font-size: 0.875rem; color: var(--texte-2); }
.offre__liste { display: grid; gap: 0.55rem; margin-top: 0.35rem; }
.offre__liste li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.875rem;
  color: var(--texte-2);
  line-height: 1.5;
}
.offre__liste li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.42em;
  width: 0.3rem; height: 0.6rem;
  border: solid var(--laiton);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.offre__action { margin-top: 0.6rem; justify-content: center; }
.offre__note { font-size: 0.75rem; color: var(--texte-3); line-height: 1.6; }

.ruban--themes { gap: 0.5rem 0.7rem; margin-block: 1.5rem; }
.ruban--themes li + li::before { background: var(--texte-3); }

.outil--acces { max-width: 62rem; }
.tarifs__entete { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.tarifs__entete--suite { margin-top: clamp(2.5rem, 5vw, 4rem); }
.tarifs__note { max-width: 46rem; }

/* ---------- 25. Liste des outils ------------------------------------------ */
/* Cinq outils cote a cote. Trois en haut, deux en bas : la grille compte six
   colonnes pour que la seconde rangee remplisse la largeur au lieu de laisser
   un trou. En dessous de 68rem, deux colonnes ; en dessous de 46rem, une. */
.outils-liste {
  display: grid;
  gap: clamp(1rem, 1.6vw, 1.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 46rem) {
  .outils-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* A deux colonnes, le cinquieme resterait seul : il prend la rangee. */
@media (min-width: 46rem) and (max-width: 67.99rem) {
  .outils-liste > li:nth-child(5) { grid-column: span 2; }
}
@media (min-width: 68rem) {
  .outils-liste { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .outils-liste > li { grid-column: span 2; }
  .outils-liste > li:nth-child(4),
  .outils-liste > li:nth-child(5) { grid-column: span 3; }
}
.outils-liste > li {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.85rem;
  min-width: 0;
  padding: clamp(1.5rem, 2.2vw, 2rem);
  border: 1px solid var(--filet);
  background: var(--encre-2);
  background: color-mix(in srgb, var(--encre-2) 55%, transparent);
  transition: border-color 0.4s var(--douce), background 0.4s var(--douce);
}
.outils-liste > li:hover,
.outils-liste > li:focus-within {
  border-color: var(--laiton);
  background: color-mix(in srgb, var(--encre-2) 85%, transparent);
}
.outils-liste__num {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--laiton);
  white-space: nowrap;
}
.outils-liste > li .titre-3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.6rem); text-wrap: balance; }
.outils-liste__corps { display: grid; gap: 0.6rem; min-width: 0; align-content: start; }
.outils-liste__texte { color: var(--texte-2); font-size: 0.9375rem; }
.outils-liste__source {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--texte-3);
}
.outils-liste__action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--filet);
}
.outils-liste__action .bouton { white-space: nowrap; }
.outils-liste__note { margin-top: clamp(2rem, 4vw, 3rem); max-width: 46rem; }

/* ---------- 26. Reperes chiffres d'en-tete -------------------------------- */
/* Les valeurs sont des fourchettes — « 1 800 à 3 500 €/m² » —, pas des
   nombres courts. Le tres grand corps les cassait en quatre lignes. */
.reperes { display: grid; gap: 1.75rem 2.5rem; }
@media (min-width: 34rem) { .reperes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 58rem) { .reperes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.reperes > li { display: grid; gap: 0.45rem; align-content: start; min-width: 0; }
.reperes .source {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texte-3);
}
.reperes__valeur {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--laiton-clair);
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}
.reperes small { font-size: 0.875rem; color: var(--texte-2); line-height: 1.45; }

/* ---------- 27. Pages territoriales --------------------------------------- */
/* Le maillage interne : des listes courtes dans la colonne laterale, sous le
   sommaire. Elles restent lisibles, sans se replier en colonne etroite. */
.maillage { display: grid; gap: 0.7rem; padding-top: 1.4rem; border-top: 1px solid var(--filet); }
.maillage__liste { display: grid; gap: 0.5rem; font-size: 0.9375rem; }
.maillage__liste a { display: block; }

/* Les sources publiques : le nom, ce qu'on y trouve, et comment y descendre.
   Sans la troisieme ligne, un lien vers un portail national ne sert a rien. */
.liens-officiels {
  display: grid;
  gap: 1px;
  margin-top: 1.75rem;
  background: var(--filet);
  border: 1px solid var(--filet);
}
@media (min-width: 46rem) { .liens-officiels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.liens-officiels__item {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: var(--encre);
  min-width: 0;
}
.papier .liens-officiels__item { background: var(--craie); }
.liens-officiels__item .lien { font-size: 0.9375rem; }
.liens-officiels__quoi { font-size: 0.9375rem; color: var(--texte-2); }
.liens-officiels__comment {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.65;
  color: var(--texte-3);
}

/* Le ruban de base est en petites capitales de chasse fixe : illisible pour
   une liste de noms de communes. Ce modificateur lui rend une casse normale. */
.ruban--territoires {
  font-family: var(--sans);
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
  gap: 0.6rem 1.1rem;
  color: var(--texte-2);
}
.ruban--territoires li + li::before { margin-right: 0.5rem; }
.insecable { white-space: nowrap; }
