/* Bonne Marge — feuille de style unique */
@font-face { font-family: "Zilla Slab"; src: url("fonts/zilla-slab-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-prime-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-prime-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --carrelage: #f5f6f2;
  --joint: #dfe2da;
  --sang: #7a1f1f;
  --sang-fonce: #571414;
  --ardoise: #25302d;
  --gris: #5d6661;
  --ticket: #fffefa;
  --encre: #34322f;
  --blanc: #ffffff;
  --slab: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --texte: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --ticket-font: "Courier Prime", "Courier New", monospace;
  --mesure: 64ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ardoise);
  background: var(--blanc);
}
img { max-width: 100%; height: auto; }
a { color: var(--sang); text-underline-offset: 0.18em; }
a:hover { color: var(--sang-fonce); }
:focus-visible { outline: 3px solid var(--sang); outline-offset: 3px; border-radius: 2px; }

.enveloppe { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* En-tête */
.entete { border-bottom: 1px solid var(--joint); background: var(--blanc); }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.marque { text-decoration: none; color: var(--sang); display: flex; flex-direction: column; line-height: 1.1; }
.marque strong { font-family: var(--slab); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.01em; }
.marque span { font-size: 0.8rem; color: var(--gris); }
.nav { display: flex; gap: 1.4rem; font-size: 0.98rem; }
.nav a { color: var(--ardoise); text-decoration: none; }
.nav a:hover { color: var(--sang); text-decoration: underline; }

/* Bandeau d'ouverture : mur carrelé de boucherie et ticket de balance */
.ouverture {
  background-color: var(--carrelage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg stroke='%23dfe2da' stroke-width='2' fill='none'%3E%3Cpath d='M0 1H96M0 49H96M1 0V48M49 48V96'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
  border-bottom: 1px solid var(--joint);
}
.ouverture .enveloppe {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.accroche {
  background: rgba(255, 255, 255, 0.94);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-left: 6px solid var(--sang);
}
h1, h2, h3 { font-family: var(--slab); color: var(--ardoise); line-height: 1.1; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.25rem, 4.6vw, 3.6rem); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
.chapeau { font-size: 1.2rem; max-width: 46ch; margin: 0 0 1.6rem; }
.achat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; }
.bouton {
  display: inline-block;
  background: var(--sang);
  color: var(--blanc);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
  border: 2px solid var(--sang);
}
.bouton:hover { background: var(--sang-fonce); border-color: var(--sang-fonce); color: var(--blanc); }
.bouton.secondaire { background: transparent; color: var(--sang); }
.bouton.secondaire:hover { background: var(--sang); color: var(--blanc); }
.precision { font-size: 0.92rem; color: var(--gris); margin: 0; }
.autre-metier { margin-top: 1.4rem; padding-top: 0.9rem; border-top: 1px solid var(--joint); }

/* Le ticket */
.ticket {
  font-family: var(--ticket-font);
  font-size: 0.95rem;
  color: var(--encre);
  background: var(--ticket);
  width: min(100%, 340px);
  justify-self: center;
  padding: 1.4rem 1.3rem 1.8rem;
  box-shadow: 0 1px 0 var(--joint), 0 18px 30px -18px rgba(37, 48, 45, 0.45);
  position: relative;
  transform: rotate(-1.2deg);
  animation: impression 1.1s cubic-bezier(.2,.8,.25,1) both 0.2s;
}
.ticket::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 8px;
  background: radial-gradient(circle at 7px 8px, transparent 6px, var(--ticket) 6.5px) 0 0 / 14px 8px repeat-x;
}
.ticket p { margin: 0; }
.ticket .boutique { text-align: center; font-weight: 700; }
.ticket .date { text-align: center; margin-bottom: 0.7rem; }
.ticket hr { border: 0; border-top: 1px dashed #9a9893; margin: 0.6rem 0; }
.ticket dl { margin: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; row-gap: 0.15rem; }
.ticket dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket dd { margin: 0; text-align: right; font-weight: 700; white-space: nowrap; }
.ticket .pied { text-align: center; margin-top: 0.8rem; font-size: 0.82rem; }
@keyframes impression {
  from { transform: translateY(-26px) rotate(-1.2deg); clip-path: inset(0 0 100% 0); }
  to { transform: translateY(0) rotate(-1.2deg); clip-path: inset(0 0 0 0); }
}

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section.grise { background: var(--carrelage); border-block: 1px solid var(--joint); }
.texte { max-width: var(--mesure); }
.intro { font-size: 1.15rem; max-width: 56ch; margin-bottom: 2.2rem; }

.onglets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 3rem; margin: 0; padding: 0; list-style: none; }
.onglets li { border-top: 3px solid var(--sang); padding-top: 1rem; }
.onglets h3 { margin-bottom: 0.35em; }
.onglets .nom { font-family: var(--texte); font-size: 0.9rem; color: var(--gris); display: block; margin-bottom: 0.2rem; }
.onglets p { margin: 0; max-width: 46ch; }

/* Ce que le kit fait gagner */
.avant-apres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 3rem; }
.avant-apres h3 { margin-bottom: 0.8rem; }
.avant-apres ul { list-style: none; margin: 0; padding: 0; }
.avant-apres li { position: relative; padding-left: 1.4rem; margin-bottom: 0.75rem; max-width: 46ch; }
.avant { border-top: 3px dashed #a9ada6; padding-top: 1rem; color: var(--gris); }
.avant h3 { color: var(--gris); }
.avant li::before { content: ""; position: absolute; left: 0.1rem; top: 0.72em; width: 0.6rem; border-top: 2px solid #a9ada6; }
.apres { border-top: 3px solid var(--sang); padding-top: 1rem; }
.apres li::before { content: ""; position: absolute; left: 0.15rem; top: 0.45em; width: 0.35rem; height: 0.65rem; border: solid var(--sang); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.calcul {
  margin-top: 2.8rem;
  background: var(--ardoise);
  color: #e9ece7;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 1.2rem 2.4rem;
  align-items: center;
}
.calcul p { margin: 0; max-width: 34ch; }
.calcul .chiffre { display: block; font-family: var(--slab); font-weight: 700; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.05; color: var(--blanc); margin-bottom: 0.25rem; }
.calcul p:first-child .chiffre { color: #e7a9a9; }
.calcul .bouton { border-color: var(--blanc); }

/* Aperçu de l'onglet Production */
.apercu { margin-top: 2rem; overflow-x: auto; background: var(--blanc); border: 1px solid #c9ccc4; }
.apercu table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.95rem; }
.apercu caption { text-align: left; padding: 0.7rem 0.9rem; font-size: 0.9rem; color: var(--gris); caption-side: bottom; border-top: 1px solid #c9ccc4; }
.apercu th, .apercu td { border: 1px solid #d5d8d0; padding: 0.45rem 0.7rem; }
.apercu thead th { background: var(--sang); color: var(--blanc); font-weight: 700; text-align: center; }
.apercu tbody th { text-align: left; font-weight: 400; }
.apercu td { text-align: center; font-variant-numeric: tabular-nums; }
.apercu tbody tr:nth-child(odd) { background: #fbf8f3; }
.apercu .total { font-weight: 700; color: var(--sang); }

/* Auteur */
.auteur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.auteur blockquote { margin: 0; font-family: var(--slab); font-size: clamp(1.35rem, 2.3vw, 1.7rem); font-weight: 600; line-height: 1.3; color: var(--sang); }

/* Prix */
.prix { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.montant { font-family: var(--slab); font-weight: 700; font-size: clamp(3rem, 6vw, 4.2rem); line-height: 1; color: var(--sang); margin: 0 0 0.3rem; }
.montant small { font-size: 0.4em; font-weight: 600; color: var(--ardoise); }
.liste { padding-left: 1.2rem; margin: 0 0 1.4rem; }
.liste li { margin-bottom: 0.45rem; }
.encadre { background: var(--blanc); border: 1px solid var(--joint); padding: 1.6rem; }

/* Questions */
.questions { max-width: 760px; }
.questions details { border-bottom: 1px solid var(--joint); padding: 1rem 0; }
.questions summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; font-family: var(--slab); font-size: 1.5rem; line-height: 1; color: var(--sang); }
.questions details[open] summary::after { content: "–"; }
.questions details p { margin: 0.6rem 0 0; max-width: 62ch; }

/* Catalogue des outils : deux ardoises de prix */
.catalogue-tete { padding-bottom: 0; }
.catalogue-tete h1 { margin-bottom: 0.4em; }
.catalogue { padding-top: 2rem; }
.ardoises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: start; }
.ardoise { background: var(--ardoise); color: #e9ece7; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: 3px; }
.ardoise h2 { color: var(--blanc); font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 1.2rem; }
.ardoise ul { list-style: none; margin: 0; padding: 0; }
.ardoise li { padding: 0.9rem 0; border-top: 1px solid rgba(233, 236, 231, 0.18); }
.ardoise li a { display: flex; align-items: baseline; gap: 0.5rem; color: var(--blanc); text-decoration: none; }
.ardoise li a:hover .nom { text-decoration: underline; text-underline-offset: 0.2em; }
.ardoise .nom { font-family: var(--slab); font-weight: 600; font-size: 1.2rem; }
.ardoise .points { flex: 1; border-bottom: 2px dotted rgba(233, 236, 231, 0.45); transform: translateY(-0.3em); min-width: 1.5rem; }
.ardoise .tarif { font-weight: 700; white-space: nowrap; }
.ardoise li p { margin: 0.3rem 0 0; font-size: 0.98rem; color: #c9cfc8; max-width: 46ch; }
.ardoise .boite { margin-top: 1.2rem; background: var(--blanc); color: var(--ardoise); padding: 1.2rem 1.3rem; border-left: 5px solid var(--sang); }
.ardoise .boite p { margin: 0 0 0.8rem; }
.ardoise .boite .boite-titre { font-family: var(--slab); font-weight: 700; font-size: 1.25rem; color: var(--sang); margin-bottom: 0.3rem; }
.guides-liste { margin: 0; padding-left: 1.2rem; }
.guides-liste li { margin-bottom: 0.6rem; font-size: 1.1rem; }
.nav a[aria-current="page"] { color: var(--sang); font-weight: 700; }

/* Pied de page */
.pied-page { background: var(--ardoise); color: #d7dcd6; padding-block: 2.5rem; font-size: 0.95rem; }
.pied-page a { color: var(--blanc); }
.pied-page .enveloppe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.pied-page nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.pied-page p { margin: 0; }

/* Pages de texte (mentions, CGV…) */
.document { padding-block: clamp(2.5rem, 6vw, 4rem); }
.document .texte h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.document .texte h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.document .texte p, .document .texte li { max-width: var(--mesure); }
.maj { color: var(--gris); font-size: 0.92rem; }

/* Téléchargements */
.fichiers { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 1rem; max-width: 720px; }
.fichiers li { border: 1px solid var(--joint); border-left: 5px solid var(--sang); padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem; background: var(--blanc); }
.fichiers strong { display: block; }
.fichiers span { color: var(--gris); font-size: 0.93rem; }

@media (max-width: 820px) {
  .ouverture .enveloppe, .auteur, .prix, .avant-apres, .calcul, .ardoises { grid-template-columns: 1fr; }
  .onglets { grid-template-columns: 1fr; }
  .nav { gap: 0.9rem; font-size: 0.92rem; }
  .ticket { transform: none; animation: none; }
}
@media (max-width: 520px) {
  .nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket { animation: none; }
}
