:root {
  --brun: #2b1d16;
  --brun-2: #4a2a18;
  --creme: #fffaf3;
  --sable: #f4e9dc;
  --caramel: #d9a86c;
  --caramel-fonce: #a86a2c;
  --texte: #2b1d16;
  --gris: #7a6a5f;
  --rayon: 18px;
  --ombre: 0 10px 30px rgba(43, 29, 22, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--creme);
  line-height: 1.55;
}

.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brun); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- En-tête ---------- */
.header { position: sticky; top: 0; z-index: 5; background: rgba(255, 250, 243, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid #eadccb; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.1rem; color: var(--brun); text-decoration: none; }
.logo span { color: var(--caramel-fonce); }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--brun); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
nav a:hover { color: var(--caramel-fonce); }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(circle at 80% 20%, #4a2a18 0%, #2b1d16 60%); color: #fdf3e7; padding: 72px 0 80px; }
.hero-in { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--caramel); font-weight: 700; margin: 0 0 10px; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 18px; }
h1 em { font-style: normal; color: var(--caramel); }
.lead { font-size: 1.1rem; max-width: 520px; opacity: 0.9; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.npm { font: 0.92rem ui-monospace, Menlo, monospace; color: inherit; background: rgba(255, 255, 255, 0.08); border: 1px dashed rgba(255, 255, 255, 0.3); padding: 10px 16px; border-radius: 12px; cursor: pointer; font-size: 0.92rem; }
.npm:hover { background: rgba(255, 255, 255, 0.14); }

/* Tasse décorative du hero */
.hero-cup { position: relative; height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.cup { position: relative; width: 150px; height: 120px; background: #fdf3e7; border-radius: 0 0 60px 60px; overflow: hidden; }
.cup::after { content: ""; position: absolute; right: -36px; top: 20px; width: 50px; height: 56px; border: 12px solid #fdf3e7; border-radius: 50%; }
.cup-coffee { position: absolute; inset: 10px 10px auto; height: 18px; border-radius: 50%; background: radial-gradient(#c8955c, #4a2a18 70%); }
.hero-cup .cup { overflow: visible; }
.saucer { width: 230px; height: 16px; background: #e9d8c3; border-radius: 50%; margin-top: -4px; }
.steam { display: flex; gap: 22px; margin-bottom: 10px; }
.steam span { width: 8px; height: 50px; border-radius: 8px; background: rgba(255, 255, 255, 0.5); filter: blur(3px); animation: vapeur 2.6s ease-in-out infinite; }
.steam span:nth-child(2) { animation-delay: 0.6s; }
.steam span:nth-child(3) { animation-delay: 1.2s; }
@keyframes vapeur { 0% { transform: translateY(14px) scaleY(0.6); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-22px) scaleY(1.1); opacity: 0; } }

/* ---------- Boutons ---------- */
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 12px 26px; cursor: pointer; transition: transform 0.15s, filter 0.15s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-main { background: var(--caramel); color: var(--brun); }
:focus-visible { outline: 3px solid var(--caramel-fonce); outline-offset: 2px; }

.chip { font: inherit; font-size: 0.85rem; font-weight: 600; border: 1px solid #dcc7ae; background: #fff; color: var(--brun); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.chip:hover { background: var(--sable); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--sable); }
h2 { font-size: 1.7rem; margin: 0 0 6px; }
h3 { font-size: 1.05rem; margin: 0 0 12px; }
.sub { color: var(--gris); margin: 0 0 26px; }
.muted { color: var(--gris); }
.card { background: #fff; border-radius: var(--rayon); padding: 24px; box-shadow: var(--ombre); }
.alert { background: #fde8e4; color: #8a2a17; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }

/* Formulaires */
label { display: block; font-weight: 600; margin: 0 0 6px; }
input:not([type]), input[type="text"] { width: 100%; font: inherit; padding: 11px 14px; border-radius: 12px; border: 1.5px solid #dcc7ae; background: #fffdf9; margin-bottom: 18px; }
input:focus { border-color: var(--caramel-fonce); outline: none; box-shadow: 0 0 0 3px rgba(217, 168, 108, 0.35); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-weight: 600; margin-bottom: 10px; }

/* Menu des cafés */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.boisson { position: relative; }
.boisson input { position: absolute; opacity: 0; }
.boisson span { display: block; height: 100%; padding: 14px; border: 2px solid #eadccb; border-radius: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; font-weight: 400; }
.boisson strong { display: block; font-size: 1rem; }
.boisson small { color: var(--gris); display: block; margin-top: 4px; }
.boisson em { font-style: normal; font-size: 0.78rem; color: var(--caramel-fonce); font-weight: 700; display: block; margin-top: 6px; }
.boisson input:checked + span { border-color: var(--caramel-fonce); background: #fff6ea; }
.boisson input:focus-visible + span { outline: 3px solid var(--caramel-fonce); outline-offset: 2px; }

/* Atelier */
.atelier { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: start; }
.couleurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.couleurs label { font-size: 0.85rem; text-align: center; }
.couleurs input { display: block; width: 100%; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; margin-top: 4px; }
input[type="range"] { width: 100%; accent-color: var(--caramel-fonce); margin-bottom: 18px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 18px; }
.check input { accent-color: var(--caramel-fonce); width: 18px; height: 18px; }
.themes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.code-card { background: #1e1511; color: #f5e6d3; position: sticky; top: 80px; }
.code-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; }
pre { margin: 0; overflow-x: auto; font-size: 0.86rem; line-height: 1.6; }
.etapes pre, .etapes code { background: #1e1511; color: #f5e6d3; }
.etapes pre { padding: 14px; border-radius: 12px; }

/* Comptoir */
.comptoir { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.commandes { list-style: none; padding: 0; margin: 0; }
.commandes li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0e4d6; }
.commandes li:last-child { border-bottom: 0; }
.commandes time { color: var(--gris); font-size: 0.85rem; white-space: nowrap; }
.commandes li.nouveau { animation: arrivee 0.6s ease; }
@keyframes arrivee { from { background: #fff1dc; transform: translateX(-8px); } to { background: transparent; transform: none; } }

.stats { display: grid; gap: 10px; }
.stat-ligne { display: grid; grid-template-columns: 130px 1fr 34px; gap: 10px; align-items: center; font-size: 0.92rem; }
.stat-barre { height: 12px; background: #f0e4d6; border-radius: 99px; overflow: hidden; }
.stat-barre div { height: 100%; background: linear-gradient(90deg, var(--caramel), var(--brun-2)); border-radius: inherit; transition: width 0.6s ease; }
.stat-ligne b { text-align: right; font-variant-numeric: tabular-nums; }
.avis-titre { margin-top: 26px; }
.etoiles { display: flex; gap: 4px; }
.etoiles button { font-size: 1.8rem; background: none; border: 0; cursor: pointer; color: #dcc7ae; padding: 0 2px; transition: transform 0.15s, color 0.15s; }
.etoiles button:hover, .etoiles button.on { color: var(--caramel-fonce); transform: scale(1.12); }

.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.footer { background: var(--brun); color: #d9c6b2; padding: 28px 0; font-size: 0.9rem; text-align: center; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .hero-in, .atelier, .comptoir, .etapes { grid-template-columns: 1fr; }
  .hero-cup { display: none; }
  .code-card { position: static; }
  nav { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
