@font-face {
  font-family: "Prata"; font-style: normal; font-weight: 400;
  font-display: block; src: url("fonts/prata-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "RedHat"; font-style: normal; font-weight: 400;
  font-display: block; src: url("fonts/red-hat-text-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "RedHat"; font-style: normal; font-weight: 500;
  font-display: block; src: url("fonts/red-hat-text-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "RedHat"; font-style: normal; font-weight: 600;
  font-display: block; src: url("fonts/red-hat-text-latin-600-normal.woff2") format("woff2");
}

/* ------------------------------------------------------------------ le ton
   UN ATELIER DE DOREUR SE TIENT DANS LE SOMBRE : l'or ne se juge pas sous
   une lumière blanche. D'où un fond brun-noir, l'or en accent, et surtout
   le ROUGE DE L'ASSIETTE — cette terre que le doreur pose sous la feuille
   et qu'on aperçoit aux angles usés des vieux cadres. C'est la couleur du
   métier, et presque personne ne sait qu'elle est là. */
:root {
  --fond: #17120E;
  --fond2: #1E1813;
  --encre: #EFE6D6;
  --mine: #A89A86;
  --trait: #3B2F25;
  --or: #C9A227;
  --bolus: #B04A32;

  --sortie: cubic-bezier(0.22, 0.7, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: "RedHat", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, .p-n, .ens strong, .v-t, .g-v, .p-nom, caption {
  font-family: "Prata", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}

a { color: inherit; }
strong { font-weight: 600; }

/* ----------------------------------------------------------- la banderole */
.mock {
  background: #000; color: #CFC6B6;
  font-family: system-ui, sans-serif; font-size: 0.8125rem; line-height: 1.5;
  padding: 0.7rem 1rem; text-align: center;
}
.mock p { margin: 0 auto; max-width: 62ch; }
.mock strong { color: #fff; }
.mock-c { margin-top: 0.25rem; color: #938977; }
.mock-c a {
  color: #CFC6B6; text-decoration: underline; text-underline-offset: 2px;
  display: inline-block; padding: 0.55rem 0.2rem; min-height: 44px;
  line-height: 1.9;
}

/* -------------------------------------------------- le premier écran : UNE LISTE
   Pas de titre d'accroche suivi d'un chapô : l'empilement EST le sujet,
   alors il ouvre la page sous sa forme la plus nue, celle d'une
   nomenclature d'atelier. */
section { padding: 2.8rem 1.15rem; }

h1 {
  margin: 0 0 2rem; font-size: clamp(1.6rem, 6.6vw, 2.9rem);
  max-width: 20ch; text-wrap: balance;
}
.pile { list-style: none; margin: 0; padding: 0; counter-reset: c; }
/* La troisième colonne est FIXE, pas `auto` : dimensionnée sur le texte,
   elle changeait de largeur au chargement de la police et faisait valser
   toute la liste. Même piège que le `flex-wrap` de Locatelli. */
.pile li {
  counter-increment: c;
  display: grid; grid-template-columns: 1.6rem 1fr 5.4rem;
  gap: 0.1rem 0.8rem; align-items: baseline;
  padding: 0.85rem 0; border-top: 1px solid var(--trait);
}
.pile li::before {
  content: counter(c); grid-row: 1 / 3;
  color: var(--or); font-size: 0.82rem; font-variant-numeric: tabular-nums;
}
.p-n { font-size: 1.12rem; }
.p-e {
  color: var(--or); font-size: 0.92rem; font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
}
.p-q { grid-column: 2 / -1; color: var(--mine); font-size: 0.9rem; }

.ens { margin: 2.6rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--trait); }
.ens strong { display: block; font-size: 1.5rem; }
.ens span { display: block; font-size: 0.86rem; color: var(--mine); margin-top: 0.15rem; }
.appel {
  margin-top: 1.1rem; display: inline-block;
  min-height: 44px; padding: 0.76rem 1.4rem;
  background: var(--or); color: #17120E; text-decoration: none;
  font-size: 1rem; font-weight: 600;
  transition: background-color 180ms var(--sortie), transform 140ms var(--sortie);
}
.appel:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .appel:hover { background: #E0B93B; } }

/* ---------------------------------------------------------------- la coupe */
.coupe, .atelier { background: var(--fond2); border-block: 1px solid var(--trait); }
.logo-slot {
  margin: 0 0 1.8rem; font-size: 0.74rem; letter-spacing: 0.06em;
  color: var(--mine); border: 1px dashed var(--trait);
  padding: 0.5rem 0.7rem; width: fit-content;
}
h2 { margin: 0 0 1rem; font-size: clamp(1.45rem, 5.8vw, 2.2rem); max-width: 20ch; }
.large { margin: 0 0 1.8rem; max-width: 54ch; }

.choix { display: grid; gap: 0.5rem; margin-bottom: 1.6rem; }
.choix button {
  min-height: 48px; padding: 0.6rem 1rem; text-align: left;
  font-family: inherit; font-size: 1rem; font-weight: 500;
  color: var(--encre); background: transparent;
  border: 1px solid var(--trait); cursor: pointer;
  transition: border-color 170ms var(--sortie), color 170ms var(--sortie),
              transform 140ms var(--sortie);
}
.choix button:active { transform: scale(0.98); }
.choix button.choisi { border-color: var(--or); color: var(--or); }
@media (hover: hover) and (pointer: fine) {
  .choix button:hover { border-color: var(--mine); }
}

.vue { display: grid; gap: 1.8rem; }
/* Le fond et la marge sont sur le CONTENEUR, pas sur le <svg> : un dessin
   dont le trait touche le bord de son cadre se lit comme une erreur
   d'impression, même quand la baguette est volontairement coupée. */
.dessin { margin: 0; background: #120E0A; padding: 14px; }
#svg { display: block; width: 100%; height: auto; aspect-ratio: 680 / 360; }
figcaption {
  margin: 0.6rem 14px 0; font-size: 0.78rem; color: var(--mine); line-height: 1.5;
}

/* le dessin lui-même */
.bag { fill: var(--or); stroke: #8C6E17; stroke-width: 1; }
.cou { stroke: #120E0A; stroke-width: 0.8; }
.cou.verre { fill: #6E8A93; }
.cou.passe { fill: #E6DCC6; }
.cou.inter { fill: #3A3027; }
.cou.oeuvre { fill: var(--bolus); }
.cou.fond { fill: #8E8370; }
.biseau { fill: #FBF6E8; }
.limite { stroke: var(--bolus); stroke-width: 1.4; stroke-dasharray: 6 4; }
.cote { stroke: var(--mine); stroke-width: 1; }
.regle, .mur { stroke: var(--mine); stroke-width: 1; }
.mur { stroke-width: 1.6; }
.cou-t, .lim-t, .regle-t, .mur-t {
  font-family: "RedHat", system-ui, sans-serif; font-size: 11px;
  fill: var(--mine);
}
.lim-t { fill: var(--bolus); }
.cou-t { fill: var(--encre); }

.verdict { display: grid; gap: 0.9rem; align-content: start; }
.v-t { margin: 0; font-size: 1.35rem; color: var(--or); }
.v-d { margin: 0; color: var(--mine); max-width: 44ch; font-size: 0.95rem; }
.v-c { margin: 0; display: grid; gap: 0; }
.v-c > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0; border-top: 1px solid var(--trait);
}
.v-c dt { font-size: 0.92rem; color: var(--mine); }
.v-c dd {
  margin: 0; font-size: 1.02rem; font-variant-numeric: tabular-nums;
  font-weight: 600; white-space: nowrap;
}
.v-r {
  margin: 0; padding: 0.9rem 1rem; font-size: 0.95rem;
  border-left: 3px solid var(--or); background: #17120E;
}
.v-r.non { border-left-color: var(--bolus); }

.pointe {
  margin: 2rem 0 0; max-width: 52ch; font-size: 1.05rem;
  border-top: 1px solid var(--trait); padding-top: 1.2rem;
}
.src {
  margin: 1.4rem 0 0; font-size: 0.79rem; color: var(--mine);
  max-width: 60ch; line-height: 1.55;
}

/* -------------------------------------------------------------- le verre */
.deux { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.8rem; }
.deux li { border-top: 1px solid var(--trait); padding-top: 1.1rem; }
.g-n { margin: 0 0 0.3rem; font-size: 0.8rem; color: var(--mine);
       letter-spacing: 0.04em; }
.g-v { margin: 0 0 0.6rem; font-size: 1.1rem; }
.g-v em { font-style: normal; font-size: 2.6rem; color: var(--or);
          margin-right: 0.3rem; }
.g-q { margin: 0; color: var(--mine); max-width: 44ch; font-size: 0.95rem; }

/* ------------------------------------------------------------- l'atelier */
.heures { width: 100%; border-collapse: collapse; margin-top: 1.8rem;
          font-size: 0.97rem; }
.heures caption {
  text-align: left; font-size: 0.95rem; color: var(--or);
  padding-bottom: 0.5rem;
}
.heures th, .heures td {
  text-align: left; padding: 0.65rem 0.2rem; font-weight: 400;
  border-top: 1px solid var(--trait);
}
.heures th { width: 55%; }

.t-c {
  display: block; color: #E08B6E; font-size: 0.86rem; line-height: 1.5;
  border-left: 2px solid var(--bolus); padding-left: 0.65rem;
  margin-top: 0.7rem;
}
span.t-c { display: inline-block; margin-top: 0.5rem; }

/* ------------------------------------------------------------- le contact */
.intro { margin: 0 0 1.8rem; max-width: 50ch; color: var(--mine); }
.c-g { display: grid; gap: 2rem; }
.c-d { list-style: none; margin: 0; padding: 0; }
.c-d li {
  padding: 0.75rem 0; border-top: 1px solid var(--trait);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.7rem;
  font-size: 0.95rem;
}
.c-d li > span:first-child {
  flex: 0 0 100%; font-size: 0.75rem; color: var(--mine); letter-spacing: 0.03em;
}
.c-d a {
  min-height: 44px; display: inline-flex; align-items: center;
  font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--or); word-break: break-word;
  transition: color 170ms var(--sortie);
}
.c-d a:active { color: var(--or); }
@media (hover: hover) and (pointer: fine) { .c-d a:hover { color: var(--or); } }

/* Un mailto: n'ouvre RIEN sans logiciel de courrier configuré. L'adresse
   reste écrite en toutes lettres, et ce bouton la met dans le presse-papier. */
.copie {
  min-height: 44px; padding: 0.4rem 0.8rem;
  font-family: inherit; font-size: 0.78rem; color: var(--mine);
  background: none; border: 1px solid var(--trait); cursor: pointer;
  transition: color 170ms var(--sortie), border-color 170ms var(--sortie),
              transform 140ms var(--sortie);
}
.copie:active { transform: scale(0.97); }
.copie[data-fait] { color: var(--or); border-color: var(--or); }
@media (hover: hover) and (pointer: fine) {
  .copie:hover { color: var(--encre); border-color: var(--mine); }
}

.c-f p { margin: 0 0 1rem; }
.c-f label {
  display: block; font-size: 0.78rem; color: var(--mine); margin-bottom: 0.3rem;
}
.c-f input, .c-f textarea {
  width: 100%; min-height: 44px; padding: 0.6rem 0.75rem;
  font-family: inherit; font-size: 1rem; color: var(--encre);
  background: var(--fond2); border: 1px solid var(--trait);
}
.c-f textarea { min-height: 112px; resize: vertical; }
.c-f input:focus-visible, .c-f textarea:focus-visible {
  outline: 2px solid var(--or); outline-offset: 1px; border-color: transparent;
}
.c-f button {
  min-height: 44px; padding: 0.7rem 1.6rem;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  color: #17120E; background: var(--or); border: 0; cursor: pointer;
  transition: background-color 180ms var(--sortie), transform 140ms var(--sortie);
}
.c-f button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .c-f button:hover { background: #E0B93B; } }
.c-r { font-size: 0.88rem; color: var(--or); }
.pot { position: absolute; left: -9999px; }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--or); outline-offset: 3px;
}

/* ------------------------------------------------------------------ le pied */
.pied {
  padding: 1.9rem 1.15rem 2.6rem; border-top: 1px solid var(--trait);
  font-size: 0.83rem; color: var(--mine);
}
.pied p { margin: 0 0 0.3rem; }
.p-n { font-size: 1.05rem; color: var(--encre); font-family: "Prata", Georgia, serif; }
.pied a {
  text-decoration: underline; text-decoration-color: var(--trait);
  text-underline-offset: 3px;
  display: inline-block; padding: 0.8rem 0; line-height: 1.5;
}
.p-l { margin-top: 0.2rem; }

/* ------------------------------------------------------------- les annexes */
.legal { max-width: 62ch; }
.legal h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); margin: 0 0 1.4rem; max-width: none; }
.legal h2 { font-size: 1.1rem; margin: 2rem 0 0.6rem; max-width: none; }
.legal p { margin: 0 0 0.9rem; font-size: 0.95rem; }
.legal a { text-decoration: none; border-bottom: 2px solid var(--or); }
.enseigne {
  display: grid; gap: 0.8rem; padding: 1.3rem 1.15rem;
  border-bottom: 1px solid var(--trait);
}
.enseigne .ens { margin: 0; padding: 0; border: 0; }
.enseigne .appel { margin: 0; }

/* -------------------------------------------------------------- les écrans */
@media (min-width: 34em) {
  .choix { grid-template-columns: 1fr 1fr; }
  .enseigne { grid-template-columns: 1fr auto; align-items: center; }
  .enseigne .appel { justify-self: end; }
}

@media (min-width: 46em) {
  section { padding: 3.4rem 2rem; }
  .pied, .enseigne { padding-left: 2rem; padding-right: 2rem; }
  .deux { grid-template-columns: 1fr 1fr; gap: 2.4rem; }
  .c-g { grid-template-columns: 1fr 1.15fr; gap: 2.8rem; }
  .pile li { grid-template-columns: 2rem 1fr 5.4rem; }
}

@media (min-width: 64em) {
  section, .pied, .enseigne { padding-left: 3.6rem; padding-right: 3.6rem; }
  .choix { grid-template-columns: repeat(4, 1fr); }
  .choix button { text-align: center; }
  .vue { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.6rem;
         align-items: start; }
  .pile { max-width: 56rem; }
}

@media (min-width: 92em) {
  section, .pied, .enseigne {
    padding-left: max(3.6rem, calc((100vw - 84rem) / 2));
    padding-right: max(3.6rem, calc((100vw - 84rem) / 2));
  }
}

/* --------------------------------------------------------- mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* le jeu restant dans la feuillure, et le cas où ça dépasse */
.jeu { fill: #221B14; }
.deborde { fill: #4A1C12; }
.jeu-t { font-family: "RedHat", system-ui, sans-serif; font-size: 11px;
         fill: var(--mine); }
.rappel { fill: none; stroke: var(--trait); stroke-width: 1; }
.bag-t { font-family: "RedHat", system-ui, sans-serif; font-size: 11px;
         fill: #5C4708; }
