/* ============================================================
   Bonne Maille, thème « réveillon 1982 »
   Papier peint brun, orange et moutarde des années 70-80,
   laine rouge et verte de Noël.
   ============================================================ */

:root {
  --bg: #2A1A12;
  --bg-2: #33211A;
  --panel: #3A261C;
  --panel-2: #452E21;
  --line: rgba(243, 236, 221, 0.12);
  --cream: #F3ECDD;
  --cream-dim: #CDBFA6;
  --orange: #D9772B;
  --orange-hi: #EE8E3E;
  --mustard: #D8A23C;
  --red: #A51F2B;
  --red-hi: #C4313D;
  --green: #2F6B42;
  --ok: #8FBF72;
  --warn: #F0B35A;
  --display: "Cooper Black", "Cooper Std", "Rockwell Extra Bold", "Rockwell", "Georgia", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 162, 60, 0.045) 0 18px, transparent 19px) 0 0 / 64px 64px,
    radial-gradient(circle at 50% 50%, rgba(217, 119, 43, 0.035) 0 30px, transparent 31px) 32px 32px / 64px 64px,
    var(--bg);
  color: var(--cream);
  font-family: var(--body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--mustard); }
a:hover { color: var(--orange-hi); }
img, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(42, 26, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); user-select: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 45%, var(--cream) 46% 54%, transparent 55%) 0 0 / 10px 10px,
    linear-gradient(225deg, transparent 45%, var(--cream) 46% 54%, transparent 55%) 0 0 / 10px 10px,
    var(--red);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}
.brand-name { font-family: var(--display); font-size: 1.4rem; letter-spacing: 0.01em; }
.brand-name .oe { color: var(--orange-hi); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--cream-dim); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--cream); }
.nav-jls { border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }

/* ---------------- Boutons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 24px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 0 #6E1219; }
.btn-primary:hover { background: var(--red-hi); color: #fff; }
.btn-ghost { background: transparent; color: var(--cream); border: 1.5px solid rgba(243, 236, 221, 0.35); }
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); }
.btn-gold { background: var(--mustard); color: #2A1A12; box-shadow: 0 4px 0 #8E6520; }
.btn-gold:hover { background: #E8B652; color: #2A1A12; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--mustard); text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: 0.92rem; }
.link-btn:hover { color: var(--orange-hi); }

/* ---------------- Hero ---------------- */
.hero { padding: 56px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(800px 420px at 80% 30%, rgba(217, 119, 43, 0.16), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--orange-hi); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-family: var(--display); font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; font-weight: 400; margin-bottom: 20px; }
.hero h1 .hl { color: var(--mustard); }
.lead { font-size: 1.12rem; color: var(--cream-dim); max-width: 34em; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; background: rgba(243, 236, 221, 0.07); border: 1px solid var(--line); }
.pills li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.hero-visual { position: relative; }
.hero-visual canvas {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 8px rgba(243, 236, 221, 0.05);
  transform: rotate(1.5deg);
}
.hero-caption { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--cream-dim); font-style: italic; }

/* ---------------- Sections ---------------- */
section { scroll-margin-top: 72px; }
.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; }
.section-sub { color: var(--cream-dim); margin-bottom: 28px; }

/* ---------------- Outil ---------------- */
.tool { padding: 56px 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18) 20%, rgba(0, 0, 0, 0.18) 80%, transparent); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.controls { display: flex; flex-direction: column; gap: 22px; }
.field { border: 0; }
.field legend { font-weight: 700; font-size: 1.02rem; margin-bottom: 10px; color: var(--cream); }
.opt { font-weight: 400; color: var(--cream-dim); font-size: 0.9rem; }

.dropzone {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 104px; padding: 14px; border-radius: 12px; cursor: pointer;
  border: 2px dashed rgba(243, 236, 221, 0.28); background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--mustard); background: rgba(216, 162, 60, 0.08); }
.dz-empty { display: flex; flex-direction: column; gap: 2px; }
.dz-empty span { font-size: 0.88rem; color: var(--cream-dim); }
.dz-full { display: flex; align-items: center; gap: 14px; }
.dz-full img {
  max-height: 72px; max-width: 140px; object-fit: contain; border-radius: 6px;
  background: repeating-conic-gradient(#d9d2c2 0 25%, #f3ecdd 0 50%) 0 0 / 14px 14px;
}
.dz-full span { font-size: 0.9rem; color: var(--cream-dim); word-break: break-all; }
.logo-actions { margin-top: 8px; }

.hint { font-size: 0.86rem; color: var(--cream-dim); margin-top: 8px; }
.warn { font-size: 0.88rem; color: #2A1A12; background: var(--warn); padding: 8px 12px; border-radius: 8px; margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(243, 236, 221, 0.06); color: var(--cream); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 0.92rem;
}
.chip:hover { border-color: rgba(243, 236, 221, 0.4); }
.chip.is-on { background: var(--cream); color: #2A1A12; border-color: var(--cream); font-weight: 700; }

.input {
  width: 100%; background: rgba(0, 0, 0, 0.25); color: var(--cream);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 1rem;
}
.input:focus { border-color: var(--mustard); outline: none; }
textarea.input { resize: vertical; min-height: 84px; }
.inline-label { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.95rem; }
.input-year { width: 92px; text-align: center; font-weight: 700; letter-spacing: 0.08em; }
.block-label { display: block; font-size: 0.92rem; margin: 12px 0 6px; color: var(--cream-dim); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.suggest { display: flex; gap: 10px; align-items: center; font-size: 0.88rem; color: var(--cream-dim); flex-wrap: wrap; }
.counter { font-size: 0.82rem; color: var(--cream-dim); font-variant-numeric: tabular-nums; }

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, 0.2); border: 1.5px solid var(--line); color: var(--cream);
  border-radius: 12px; padding: 10px 6px; font-size: 0.82rem;
}
.swatch.is-on { border-color: var(--mustard); background: rgba(216, 162, 60, 0.12); }
.sw-dots { display: flex; }
.sw-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -5px; }
.sw-dots i:first-child { margin-left: 0; }
.custom { margin-top: 12px; }
.custom summary { cursor: pointer; font-size: 0.92rem; color: var(--cream-dim); }
.pickers { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
.pickers label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.pickers input[type="color"] { width: 42px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; cursor: pointer; }

/* Aperçu */
.preview { position: sticky; top: 84px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; background: rgba(0, 0, 0, 0.22); padding: 4px; border-radius: 999px; }
.tab { flex: 1; background: none; border: 0; color: var(--cream-dim); padding: 8px 10px; border-radius: 999px; font-size: 0.92rem; }
.tab.is-on { background: var(--cream); color: #2A1A12; font-weight: 700; }
.stage { display: flex; align-items: center; justify-content: center; background: #1B140F; border-radius: 12px; padding: 14px; min-height: 200px; }
.stage canvas { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.stage[data-format="story"] canvas { width: auto; max-height: 560px; max-width: 100%; }
.stage-actions { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 18px; gap: 10px; flex-wrap: wrap; }
.stage-format { font-size: 0.82rem; color: var(--cream-dim); }

.deliver { display: flex; flex-direction: column; gap: 10px; }
.link-box { display: flex; gap: 10px; align-items: center; }
.link-box .input { font-size: 0.82rem; padding: 8px 10px; }
.pack { margin-top: 8px; padding: 16px; border-radius: 12px; background: rgba(216, 162, 60, 0.08); border: 1px solid rgba(216, 162, 60, 0.3); }
.pack-title { font-weight: 700; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge { font-size: 0.74rem; font-weight: 700; background: var(--mustard); color: #2A1A12; padding: 2px 8px; border-radius: 999px; }
.pack-list { list-style: none; margin-bottom: 14px; font-size: 0.9rem; color: var(--cream-dim); }
.pack-list li::before { content: "❄ "; color: var(--cream); }
.progress { margin-top: 12px; }
.bar { height: 8px; background: rgba(0, 0, 0, 0.3); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--mustard)); transition: width 0.2s; }
.progress p { font-size: 0.85rem; color: var(--cream-dim); margin-top: 6px; }
.success { color: var(--ok); font-weight: 700; text-align: center; }

/* ---------------- Comment ---------------- */
.how { padding: 64px 0; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.steps li { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-num {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--orange); color: #2A1A12; font-family: var(--display); font-size: 1.3rem; margin-bottom: 12px;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: var(--cream-dim); font-size: 0.95rem; }

/* ---------------- Réassurance ---------------- */
.trust { padding: 24px 0 64px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--mustard); }
.card p { font-size: 0.92rem; color: var(--cream-dim); }
.card-honest { border-color: rgba(217, 119, 43, 0.5); }
.card-honest h3 { color: var(--orange-hi); }

/* ---------------- FAQ ---------------- */
.faq { padding: 48px 0 64px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.04rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mustard); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--cream-dim); }

/* ---------------- Studio ---------------- */
.studio { padding: 56px 0; background: var(--red); }
.studio-inner { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 32px; align-items: center; }
.studio .kicker { color: #FFD9A0; }
.studio h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; margin-bottom: 12px; }
.studio p { color: #F6E3D2; }
.studio-cta { text-align: center; }
.studio-small { font-size: 0.85rem; margin-top: 10px; }

/* ---------------- Footer ---------------- */
.site-footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--cream-dim); }
.footer-inner { display: flex; flex-direction: column; gap: 10px; }
.footer-inner p:first-child { font-style: italic; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--cream); color: #2A1A12; padding: 12px 18px; border-radius: 12px; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); transition: transform 0.25s ease; z-index: 60; max-width: calc(100% - 32px);
}
.toast.is-on { transform: translate(-50%, 0); }

/* ---------------- Modale ---------------- */
dialog { margin: auto; position: relative; } /* le reset écrase le centrage natif */
.email-modal {
  width: min(460px, calc(100% - 32px)); border: 0; border-radius: 18px; padding: 28px;
  background: var(--panel); color: var(--cream); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.email-modal::backdrop { background: rgba(20, 12, 8, 0.75); backdrop-filter: blur(3px); }
.email-modal h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin-bottom: 8px; }
.email-modal > p { color: var(--cream-dim); font-size: 0.95rem; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--cream-dim); font-size: 1.2rem; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; font-size: 0.9rem; color: var(--cream-dim); }
.check input { margin-top: 4px; accent-color: var(--mustard); }
.error { color: var(--warn); font-size: 0.88rem; min-height: 1.2em; margin-bottom: 8px; }
.fine { font-size: 0.78rem; color: var(--cream-dim); margin-top: 10px; text-align: center; }

.rec-canvas { position: fixed; left: -12000px; top: 0; width: 1080px; height: 1080px; pointer-events: none; }

/* ---------------- Easter egg ---------------- */
body.is-moche { --bg: #3B3A1A; --panel: #4A4720; --red: #E2771C; --red-hi: #F08A33; --mustard: #B9B23A; }
body.is-moche .brand-mark { background-color: #6E6A2C; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .hero-grid, .tool-grid, .studio-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; width: 100%; }
  .preview { position: static; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav a:not(.nav-jls) { display: none; }
  .hero { padding: 32px 0 40px; }
  .trust-grid { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 16px; }
  .hero-visual canvas { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
