@font-face {
  font-family: "Frank"; font-style: normal; font-weight: 500;
  font-display: block; src: url("fonts/frank-ruhl-libre-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Frank"; font-style: normal; font-weight: 700;
  font-display: block; src: url("fonts/frank-ruhl-libre-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hind"; font-style: normal; font-weight: 400;
  font-display: block; src: url("fonts/hind-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hind"; font-style: normal; font-weight: 600;
  font-display: block; src: url("fonts/hind-latin-600-normal.woff2") format("woff2");
}

/* ------------------------------------------------------------------ le ton
   LE PAPIER DE BOUCHER. Pas le carrelage blanc du mur, qui ferait un site de
   laboratoire — le papier rose-beige dans lequel le morceau repart, qui est
   la seule couleur que le client emporte chez lui. Avec le rouge sombre de
   la viande en accent et le hêtre du billot en second. */
:root {
  --boucher: #E9D2CB;
  --papier: #F7EBE7;
  --encre: #211A18;
  --mine: #5A4A45;
  --trait: #D3BAB3;
  --acc: #8A2B22;

  --sortie: cubic-bezier(0.2, 0.68, 0.3, 1);
  --tombe: cubic-bezier(0.4, 0, 0.6, 1);
}

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

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

h1, h2, h3, .nom strong, .p-n, .kg, caption {
  font-family: "Frank", Georgia, serif;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.004em;
}

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

/* ----------------------------------------------------------- la banderole */
.mock {
  background: #171212; color: #E6E3DF;
  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: #B0ABA6; }
.mock-c a {
  color: #E6E3DF; text-decoration: underline; text-underline-offset: 2px;
  display: inline-block; padding: 0.55rem 0.2rem; min-height: 44px;
  line-height: 1.9;
}

/* ------------------------------------------------------------- la barre */
.barre {
  display: grid; grid-template-columns: 1fr; gap: 0.7rem;
  padding: 1.1rem 1.1rem 1rem;
  border-bottom: 2px solid var(--encre);
}
.logo-slot {
  margin: 0; font-size: 0.74rem; letter-spacing: 0.06em; color: var(--mine);
  border: 1px dashed var(--trait); padding: 0.5rem 0.7rem;
  width: fit-content; border-radius: 2px;
}
.nom { margin: 0; }
.nom strong { display: block; font-size: 1.42rem; }
.nom strong a {
  text-decoration: none; display: inline-block;
  min-height: 44px; line-height: 1.55;
}
.nom span {
  display: block; font-size: 0.78rem; color: var(--mine); margin-top: 0.1rem;
}
.appel {
  justify-self: start;
  display: inline-flex; align-items: baseline; gap: 0.45rem;
  min-height: 44px; padding: 0.6rem 1.05rem;
  background: var(--acc); color: #fff; text-decoration: none;
  font-size: 1.02rem; font-weight: 600; border-radius: 2px;
  transition: background-color 180ms var(--sortie), transform 140ms var(--sortie);
}
.appel span { font-size: 0.72rem; font-weight: 400; opacity: 0.85; }
.appel:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .appel:hover { background: var(--encre); } }

/* --------------------------------------------------------- la question
   Le premier écran est CENTRÉ, et c'est le seul de la page. On ne lit pas
   une question posée comme on lit un titre d'accroche : une question
   s'adresse à quelqu'un, elle se tient en face de lui, pas alignée dans
   une colonne de gauche. Le reste de la page repasse à gauche, parce que
   le reste de la page explique au lieu de demander. */
section { padding: 2.4rem 1.1rem; }
.quizz {
  padding-top: 3.4rem; padding-bottom: 3rem; text-align: center;
  background: var(--papier); border-bottom: 1px solid var(--trait);
}
h1 {
  margin: 0 auto; font-size: clamp(1.85rem, 8.6vw, 3.4rem); max-width: 15ch;
  text-wrap: balance;
}
.amorce {
  margin: 1.2rem auto 0; max-width: 44ch; color: #392E2A;
  text-wrap: balance;
}

.choix {
  list-style: none; margin: 2rem auto 0; padding: 0; max-width: 34rem;
  display: grid; gap: 0.6rem;
}
.choix button {
  width: 100%; min-height: 58px; padding: 0.85rem 1.1rem;
  font-family: "Frank", Georgia, serif; font-weight: 500; font-size: 1.14rem;
  color: var(--encre); background: var(--boucher);
  border: 2px solid var(--trait); border-radius: 2px;
  cursor: pointer; text-align: center;
  transition: border-color 170ms var(--sortie), background-color 170ms var(--sortie),
              transform 140ms var(--sortie);
}
.choix button:active { transform: scale(0.985); }
.choix button.choisi { border-color: var(--acc); background: var(--papier); }
@media (hover: hover) and (pointer: fine) {
  .choix button:hover { border-color: var(--encre); }
}

.verdict {
  margin: 1.6rem auto 0; max-width: 46ch; font-size: 1rem; text-align: left;
  border-top: 2px solid var(--mine); padding-top: 0.9rem;
}
.verdict.juste { border-top-color: var(--acc); }
.verdict strong { font-family: "Frank", Georgia, serif; font-weight: 700; }

/* -------------------------------------------------------------- le billot */
.billot { border-top: 1px solid var(--trait); }
h2 { margin: 0 0 1.2rem; font-size: clamp(1.4rem, 5.8vw, 2rem); }
h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }

.toile-c {
  position: relative; border: 1px solid var(--trait); overflow: hidden;
  /* EXACTEMENT la couleur d'effacement du moteur (relevée au pixel) : un
     canevas WebGL jamais dessiné reste TRANSPARENT et se compose sur ce
     qu'il y a derrière. Sans ça, le fondu d'apparition se voit. */
  background: #40321E;
}
/* Le moteur se charge sur trois images et dessine une première fois AVANT
   que la page ait eu le temps de vider le billot : sans ce voile, le lecteur
   voit un quart de seconde toute la viande, puis elle disparaît — et la
   démonstration est éventée avant d'avoir commencé. */
#toile {
  display: block; width: 100%; height: auto; aspect-ratio: 125 / 84;
  opacity: 0; transition: opacity 260ms var(--sortie);
}
#toile.prete { opacity: 1; }
.chargement {
  position: absolute; inset: auto 0 0 0; margin: 0;
  padding: 0.7rem 0.9rem; font-size: 0.82rem;
  color: #F2EDE6; background: rgba(40, 28, 18, 0.72);
}
.repli { margin: 0.9rem 0 0; color: var(--mine); font-size: 0.9rem; max-width: 50ch; }

/* Les chiffres sont un TABLEAU, pas trois colonnes de grands nombres : on
   compare des poids, et un tableau est fait pour ça. */
.repart, .heures {
  width: 100%; border-collapse: collapse; margin-top: 1.5rem;
  font-size: 0.95rem;
}
.repart caption, .heures caption {
  text-align: left; font-size: 0.82rem; font-weight: 500; color: var(--mine);
  padding-bottom: 0.5rem; letter-spacing: 0.02em;
}
.repart th, .repart td, .heures th, .heures td {
  text-align: left; padding: 0.68rem 0.2rem;
  border-bottom: 1px solid var(--trait); font-weight: 400;
}
.repart th { width: 46%; padding-left: 0.75rem; }
.repart .kg { font-size: 1.22rem; text-align: right; width: 28%; }
.repart .pc { color: var(--mine); font-size: 0.82rem; text-align: right; }
/* Une ligne en attente reste LISIBLE : on l'éteint par la couleur, pas par
   l'opacité. Un tableau qu'on ne peut pas lire tant qu'on n'a pas joué au
   jeu, c'est un tableau raté. */
.repart tr { color: var(--mine); }
.repart th, .repart .kg {
  transition: color 320ms var(--sortie), box-shadow 320ms var(--sortie);
}
.repart tr.pose { color: var(--encre); }
.repart tr.pose th {
  font-weight: 600; box-shadow: inset 3px 0 0 var(--trait);
}
#l-hache.pose th { box-shadow: inset 3px 0 0 var(--acc); }
#l-hache.pose .kg { color: var(--acc); }
.heures th { width: 52%; }
.heures .fort th, .heures .fort td { font-weight: 600; }

.pointe {
  margin: 1.7rem 0 0; max-width: 48ch; font-size: 1.05rem;
  border-top: 2px solid var(--encre); padding-top: 1.1rem;
}
.src {
  margin: 1.5rem 0 0; font-size: 0.79rem; color: var(--mine);
  max-width: 58ch; line-height: 1.5;
}

/* ----------------------------------------------------------- le reste */
.reste, .maison, .contact { border-top: 1px solid var(--trait); }
.large { margin: 0 0 1.8rem; max-width: 58ch; font-size: 1.02rem; }
.trois { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.trois li { padding-top: 0.9rem; border-top: 1px solid var(--trait); }
.trois p { margin: 0 0 0.6rem; font-size: 0.94rem; max-width: 42ch; }

.t-c {
  display: block; color: #8A3A1C; font-size: 0.82rem; line-height: 1.5;
  border-left: 2px solid #C08476; padding-left: 0.6rem;
}
span.t-c { display: inline-block; }

/* ------------------------------------------------------------- la maison */
.avis {
  margin: 0 0 1.6rem; padding: 1.1rem 1.2rem;
  background: var(--papier); border-left: 4px solid var(--acc);
}
.avis p {
  margin: 0; font-family: "Frank", Georgia, serif; font-weight: 500;
  font-size: 1.18rem; line-height: 1.38;
}
.avis footer { margin-top: 0.5rem; font-size: 0.8rem; color: var(--mine); }
.maison p { margin: 0 0 0.9rem; max-width: 54ch; font-size: 0.98rem; }

/* ------------------------------------------------------------ le contact */
.intro { margin: 0 0 1.6rem; max-width: 50ch; color: #392E2A; }
.c-g { display: grid; gap: 1.8rem; }
.c-d { list-style: none; margin: 0; padding: 0; }
.c-d li {
  padding: 0.75rem 0; border-bottom: 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(--acc); word-break: break-word;
  transition: color 170ms var(--sortie);
}
.c-d a:active { color: var(--acc); }
@media (hover: hover) and (pointer: fine) { .c-d a:hover { color: var(--acc); } }

/* 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); border-radius: 2px;
  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(--acc); border-color: var(--acc); }
@media (hover: hover) and (pointer: fine) {
  .copie:hover { color: var(--encre); border-color: var(--mine); }
}

.c-f { margin-top: 2rem; }
.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(--papier); border: 1px solid var(--trait); border-radius: 2px;
}
.c-f textarea { min-height: 112px; resize: vertical; }
.c-f input:focus-visible, .c-f textarea:focus-visible {
  outline: 2px solid var(--acc); 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: #fff; background: var(--acc); border: 0; border-radius: 2px;
  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: var(--encre); } }
.c-r { font-size: 0.88rem; color: var(--acc); }
.pot { position: absolute; left: -9999px; }

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

/* ------------------------------------------------------------------ le pied */
.pied {
  padding: 1.8rem 1.1rem 2.4rem; border-top: 2px solid var(--encre);
  font-size: 0.82rem; color: var(--mine);
}
.pied p { margin: 0 0 0.3rem; }
.p-n { font-size: 1rem; color: var(--encre); }
/* Un trait posé au bas d'une boîte de 44 px flotte loin sous le mot et se
   lit comme un tiret perdu. Le soulignement, lui, suit le texte ; la zone
   tactile se fait au rembourrage. */
.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;
}
.nb { white-space: nowrap; }
.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; }
.legal p { margin: 0 0 0.9rem; font-size: 0.95rem; }
.legal a { text-decoration: none; border-bottom: 2px solid var(--acc); }

/* -------------------------------------------------------------- les écrans */
@media (min-width: 34em) {
  .barre { grid-template-columns: 1fr auto; align-items: center; gap: 0.6rem 1.2rem; }
  .logo-slot { grid-column: 1 / -1; }
  .appel { justify-self: end; }
  .choix { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 46em) {
  .barre { padding: 1.3rem 2rem 1.1rem; }
  section { padding: 3rem 2rem; }
  .pied { padding: 2.2rem 2rem 3rem; }
  .trois { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
  .c-g { grid-template-columns: 1.1fr 1fr; gap: 2.6rem; }
}

@media (min-width: 68em) {
  .barre, section, .pied { padding-left: 3.4rem; padding-right: 3.4rem; }
  .vue {
    display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 2.4rem; align-items: start;
  }
  .repart { margin-top: 0; }
  .quizz { padding-top: 5rem; padding-bottom: 4.2rem; }
  .c-f { max-width: 42rem; }
}

@media (min-width: 92em) {
  .barre, section, .pied {
    padding-left: max(3.4rem, calc((100vw - 82rem) / 2));
    padding-right: max(3.4rem, calc((100vw - 82rem) / 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;
  }
}
