/* ============ La Légenderie — design system « Golden Hour » ============ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Nunito+Sans:opsz,wght@6..12,400;6..12,700;6..12,800&display=swap');

:root {
  --primary: #e86a33;        /* corail coucher de soleil */
  --primary-dark: #c2521f;
  --secondary: #f4a950;      /* ambre doré */
  --rose: #c94f6d;           /* rose crépuscule */
  --plum: #2d1b3d;           /* nuit qui arrive */
  --cta: #e86a33;
  --bg: #fff6e9;             /* crème chaude */
  --surface: #ffffff;
  --ink: #41282f;            /* brun profond */
  --ink-soft: #7a6055;
  --ok: #3e7d5a;
  --err: #c0392b;
  --radius: 20px;
  --radius-sm: 14px;
  --border: 1px solid rgba(65, 40, 47, 0.12);
  --shadow: 0 14px 34px rgba(65, 40, 47, 0.16);
  --shadow-lift: 0 24px 50px rgba(65, 40, 47, 0.24);
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  --z-nav: 50;
  --z-modal: 60;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.orientation-pick { border: 0; padding: 0; margin: 0 0 24px; }
.orientation-pick legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.orientation-pick .muted { margin-bottom: 12px; }
.orientation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.orientation-card { display: grid; gap: 5px; text-align: left; padding: 16px; border: 2px solid rgba(65,40,47,.16); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer; }
.orientation-card span { color: var(--ink-soft); font-size: .9rem; }
.orientation-card.selected { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(65,40,47,.12); }
@media (max-width: 520px) { .orientation-grid { grid-template-columns: 1fr; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -80px, rgba(244, 169, 80, 0.22), transparent 60%),
    radial-gradient(800px 480px at -120px 45%, rgba(201, 79, 109, 0.10), transparent 60%),
    var(--bg);
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
section { padding: 72px 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ Boutons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 800; font-size: 1.02rem;
  padding: 14px 30px; min-height: 48px;
  border-radius: 999px; border: none;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-cta {
  background: linear-gradient(135deg, var(--primary), var(--rose));
  color: #fff; box-shadow: 0 12px 28px rgba(232, 106, 51, 0.35);
}
.btn-cta:hover { filter: brightness(1.06); box-shadow: 0 16px 34px rgba(232, 106, 51, 0.42); }
.btn-primary { background: var(--rose); color: #fff; box-shadow: 0 10px 24px rgba(201, 79, 109, 0.32); }
.btn-primary:hover { background: #b34460; }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid rgba(65, 40, 47, 0.22); box-shadow: 0 6px 16px rgba(65, 40, 47, 0.08);
}
.btn-ghost:hover { background: #fff3e2; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-lg { font-size: 1.15rem; padding: 18px 38px; }

/* ============ Navbar ============ */
.nav {
  position: sticky; top: 12px; z-index: var(--z-nav);
  margin: 12px auto 0; max-width: 1120px; padding: 0 20px;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255, 252, 245, 0.9); backdrop-filter: blur(10px);
  border: var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(65, 40, 47, 0.12); padding: 12px 22px;
}
.logo {
  font-family: var(--font-head); font-weight: 700; font-size: 1.45rem;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.logo svg { flex: none; }
.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 800; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.btn { color: #fff; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; left: 20px; right: 20px; top: 78px;
    background: var(--surface); border: var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lift); padding: 22px;
  }
  .nav-burger { display: block; }
}

/* ============ Hero ============ */
.hero { padding: 64px 0 48px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; right: -110px; top: -50px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffd9a0, var(--secondary) 55%, rgba(244, 169, 80, 0) 72%);
  filter: blur(2px); opacity: 0.85; pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .kicker {
  display: inline-block; color: var(--rose);
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero .accent {
  background: linear-gradient(90deg, var(--primary), var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.hero-proof { margin-top: 22px; font-weight: 700; color: var(--ink-soft); font-size: 0.95rem; }

/* Mur de posters */
.poster-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.poster {
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lift);
  transform: rotate(-3deg);
  transition: transform 0.25s ease;
}
.poster:hover { transform: rotate(-3deg) translateY(-5px); }
.poster:nth-child(2) { transform: rotate(3deg) translateY(16px); }
.poster:nth-child(2):hover { transform: rotate(3deg) translateY(11px); }
.poster .art { aspect-ratio: 3/4; display: grid; place-items: center; position: relative; }
.poster .label {
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  padding: 10px 14px; background: var(--surface);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.poster .label .tag { background: #fff3e2; color: var(--primary-dark); border-radius: 999px; padding: 1px 10px; font-size: 0.72rem; font-family: var(--font-body); font-weight: 800; letter-spacing: 0.04em; }

/* ============ Bandeau défilant ============ */
.marquee {
  background: linear-gradient(90deg, var(--plum), #7a2e4d 55%, #a4404a);
  color: #ffe8c7; padding: 13px 0; overflow: hidden; white-space: nowrap;
}
.marquee-track { display: inline-block; animation: scroll 28s linear infinite; }
.marquee span { font-family: var(--font-head); font-weight: 600; margin: 0 28px; }
.marquee .dot { color: var(--secondary); font-style: normal; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ Cartes / grilles ============ */
.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards-3, .cards-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}
.card .icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 16px; color: #fff;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* Cartes de style (landing + wizard) */
.style-card {
  cursor: pointer; overflow: hidden; padding: 0; text-align: left;
  background: var(--surface); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-body); font-size: inherit; color: inherit; width: 100%;
}
.style-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.style-card .swatch { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.style-card .swatch img { width: 100%; height: 100%; object-fit: cover; }
.style-card .body { padding: 16px 18px 18px; }
.style-card .tagline { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.style-card.selected { outline: 3px solid var(--primary); outline-offset: -3px; }
.style-card.selected .body::after {
  content: 'Sélectionné ✓'; display: inline-block; margin-top: 8px;
  background: linear-gradient(135deg, var(--primary), var(--rose)); color: #fff;
  font-weight: 800; font-size: 0.8rem; padding: 2px 12px; border-radius: 999px;
}

/* Étapes "comment ça marche" */
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 10px 22px rgba(232, 106, 51, 0.3); margin-bottom: 16px;
}

/* Formats & prix */
.format-card { text-align: center; position: relative; }
.format-card .dims { color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; }
.format-card .prix { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; color: var(--primary); }
.format-card .badge {
  position: absolute; top: -14px; right: 14px;
  background: var(--rose); color: #fff;
  font-weight: 800; font-size: 0.78rem; padding: 4px 14px; border-radius: 999px;
  box-shadow: 0 6px 14px rgba(201, 79, 109, 0.35); transform: rotate(3deg);
}
.paper-stack { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 12px 0 6px; }
.paper-stack .sheet { background: #fff3e2; border: 1.5px solid #d9b98c; border-radius: 4px; }

/* Témoignages */
.quote-card .stars { color: #d97c1e; font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 10px; }
.quote-card footer { font-weight: 800; margin-top: 12px; }
.quote-card footer .muted { font-weight: 600; }

/* ============ Wizard (creer.html) ============ */
.wizard-steps {
  display: flex; gap: 8px; justify-content: center; margin: 32px 0 40px; flex-wrap: wrap;
}
.wizard-steps .wstep {
  display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.9rem;
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid rgba(65, 40, 47, 0.18);
  background: var(--surface); color: var(--ink-soft);
}
.wizard-steps .wstep.active {
  background: linear-gradient(135deg, var(--primary), var(--rose));
  color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(232, 106, 51, 0.3);
}
.wizard-steps .wstep.done { background: var(--ok); color: #fff; border-color: transparent; }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: fadeUp 0.3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wizard-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

/* Zone d'upload */
.dropzone {
  border: 2px dashed rgba(232, 106, 51, 0.6); border-radius: var(--radius);
  background: var(--surface); padding: 56px 24px; text-align: center;
  cursor: pointer; transition: background-color 0.2s, border-color 0.2s;
}
.dropzone:hover, .dropzone.dragover { background: #fff3e2; border-color: var(--rose); }
.dropzone svg { margin: 0 auto 16px; color: var(--primary); }
.upload-preview { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
@media (max-width: 700px) { .upload-preview { grid-template-columns: 1fr; } }
.upload-preview .frame {
  border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-lift);
  background: var(--surface); padding: 8px;
}
.upload-preview .frame img { border-radius: 8px; }

/* Aperçu transformation */
.preview-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 780px) { .preview-stage { grid-template-columns: 1fr; } }
.preview-frame {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lift); background: #fff; position: relative;
}
.preview-frame img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.preview-frame .corner {
  position: absolute; top: 14px; left: -38px; transform: rotate(-45deg);
  background: var(--rose); color: #fff; font-weight: 800; font-size: 0.78rem;
  padding: 4px 40px; box-shadow: 0 4px 10px rgba(65, 40, 47, 0.25);
}
.loader {
  display: none; position: absolute; inset: 0; background: rgba(255, 246, 233, 0.93);
  z-index: 5; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  font-weight: 800; text-align: center; padding: 20px;
}
.loader.on { display: flex; }
.spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 6px solid var(--secondary); border-top-color: var(--rose);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Formats dans le wizard */
.format-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .format-pick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .format-pick { grid-template-columns: 1fr; } }
.format-pick .fcard {
  cursor: pointer; background: var(--surface); border: var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-family: var(--font-body); font-size: inherit; color: inherit;
}
.format-pick .fcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.format-pick .fcard.selected { outline: 3px solid var(--primary); outline-offset: -3px; background: #fff3e2; }

/* Panier / récap */
.cart-line {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
  border-bottom: 2px dashed rgba(65, 40, 47, 0.18);
}
.cart-line img { width: 56px; height: 74px; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 14px rgba(65, 40, 47, 0.2); }
.cart-line .grow { flex: 1; }
.cart-line .price { font-family: var(--font-head); font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 800; padding-top: 18px; }

/* ============ Formulaires ============ */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 16px; border: 1.5px solid #e3cdb4; border-radius: var(--radius-sm);
  background: #fff; min-height: 48px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--secondary); outline-offset: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-msg { font-weight: 800; margin-top: 12px; display: none; }
.form-msg.err { display: block; color: var(--err); }
.form-msg.ok { display: block; color: var(--ok); }

/* ============ FAQ ============ */
details.faq-item {
  background: var(--surface); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 4px 24px; margin-bottom: 16px;
}
details.faq-item summary {
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem;
  padding: 16px 0; cursor: pointer; list-style: none; position: relative; padding-right: 40px;
}
details.faq-item summary::after {
  content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--primary); transition: transform 0.2s;
}
details.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.faq-item .answer { padding-bottom: 18px; color: var(--ink-soft); }

/* ============ CTA final & footer ============ */
.big-cta {
  background: linear-gradient(160deg, var(--plum), #7a2e4d 50%, #d4573b);
  color: #fff; border-radius: 28px;
  box-shadow: var(--shadow-lift); padding: 60px 32px; text-align: center; position: relative; overflow: hidden;
}
.big-cta::before {
  content: ''; position: absolute; left: 50%; bottom: -180px; transform: translateX(-50%);
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 169, 80, 0.35), transparent 65%);
  pointer-events: none;
}
.big-cta h2 { color: #ffe8c7; }
.big-cta p { color: #f2d8c2; }
.big-cta > * { position: relative; }
footer.site {
  background: var(--plum); color: #d9c2ce; padding: 48px 0 32px; margin-top: 80px;
}
footer.site a { color: #ffe8c7; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site .legal { margin-top: 32px; font-size: 0.85rem; color: #a583a0; }
footer.site p[style*='font-weight:800'] { color: #ffe8c7; }

/* ============ Tableau admin ============ */
table.admin { width: 100%; border-collapse: collapse; background: #fff; border: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.admin th, table.admin td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f3e3cc; font-size: 0.95rem; }
table.admin th { background: #fdf0dd; font-family: var(--font-head); }
.status-pill { padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: 0.8rem; border: 1.5px solid rgba(65, 40, 47, 0.25); }
.status-nouvelle { background: #fdeccd; }
.status-en_production { background: #fde0d3; }
.status-expediee { background: #ddedd9; }
.status-annulee { background: #f6d7d2; }

/* Notice mode démo */
.demo-note {
  background: #fff3e2; border: 2px dashed var(--secondary); border-radius: var(--radius-sm);
  padding: 12px 18px; font-weight: 700; font-size: 0.92rem; margin: 18px 0;
}
