/* Tony Hardwood — carte à imprimer (6 × 4 po, paysage) */

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

* {
  margin: 0;
}

:root {
  --bg: #070d1a;
  --bg-2: #0b1426;
  --card: #10203a;
  --line: rgba(136, 198, 228, .16);
  --tony: #88c6e4;
  --tony-deep: #4fa8d6;
  --gold: #d4b46a;
  --gold-deep: #a8873a;
  --ink: #f3efe6;
  --muted: #9aa8bd;
  --no: #e07a6a;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Jost", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;

  --hair-gold: rgba(212, 180, 106, .38);
}

html,
body {
  height: 100%;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

/* ---------- Écran (masqué à l'impression) ---------- */

.ecran {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 36px 20px;
}

.scene {
  width: 576px;
  height: 384px;
  flex: none;
}

.chrome {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.btn-primary {
  background: var(--tony);
  color: #061020;
}

.btn-primary:hover {
  background: var(--tony-deep);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--tony);
  color: var(--tony);
}

/* ---------- La carte : 576 × 384 px = 6 × 4 po ---------- */

.carte {
  width: 576px;
  height: 384px;
  padding: 12px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

.cadre {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 14px;
  border: 1px solid var(--hair-gold);
  background: var(--card);
  overflow: hidden;
}

/* En-tête */

.tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold);
}

.tete-texte {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
}

.eyebrow {
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}

.tete-pichet {
  width: auto;
  height: 62px;
  flex: none;
}

/* Corps : recette à gauche, code QR à droite */

.corps {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 152px;
  gap: 18px;
}

.recette {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.ingredients {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ingredients li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: baseline;
  gap: 8px;
}

.qte {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold);
}

.nom {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.pas {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.pas li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: baseline;
  gap: 8px;
}

.pas-n {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .06em;
  color: var(--gold);
}

.pas-t {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink);
}

/* Code QR */

.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.qr-plaque {
  padding: 5px;
  background: #ffffff;
  border-radius: 2px;
}

.qr-plaque img {
  width: 120px;
  height: 120px;
}

.qr-legende {
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

.qr-bars {
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--muted);
}

/* Pied de carte */

.pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.couleur {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink);
}

.chip {
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--hair-gold);
  border-radius: 2px;
  background: var(--tony);
}

.legal {
  max-width: 200px;
  font-size: 8.5px;
  line-height: 1.3;
  text-align: right;
  color: var(--muted);
}

/* ---------- Aperçu sur petit écran ---------- */

@media screen and (max-width: 700px) {
  .scene {
    width: 346px;
    height: 231px;
  }

  .carte {
    transform: scale(.6);
    transform-origin: top left;
  }
}

/* ---------- Impression : une seule page 6 × 4 po ---------- */

@page {
  size: 6in 4in;
  margin: 0;
}

@media print {
  html,
  body {
    height: auto;
    background: #ffffff;
    overflow: hidden;
  }

  .ecran {
    display: block;
    min-height: 0;
    padding: 0;
    gap: 0;
  }

  .scene {
    width: 6in;
    height: 4in;
  }

  .carte {
    width: 6in;
    height: 4in;
    transform: none;
    box-shadow: none;
  }

  .chrome {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* 7up : optionnel, variation */
.ingredients li.opt {
  grid-template-columns: auto 1fr;
}

.qte-opt {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--gold);
}

.var {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
