/* Fournil — site de démonstration La Balise.
   Aucune règle inline dans la page : la CSP du domaine (style-src 'self') les bloquerait. */

@font-face { font-family: "Fraunces"; src: url("/exemples/boulangerie/fonts/fraunces-soft.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/exemples/boulangerie/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #FBF3E4; --bg-2: #F3E6CC; --card: #FFFCF5; --ink: #3B2314; --muted: #6A5545;
  --line: rgba(59, 35, 20, .13); --line-2: rgba(59, 35, 20, .3);
  --deep: #3B2314; --deep-ink: #FBF3E4; --deep-muted: #D9C4A8;
  --acc: #E8B04B; --acc-2: #DDA23A; --acc-ink: #3B2314; --acc-text: #A8481A;
  --err: #B3261E; --err-light: #FFB4AB;
  --radius: 20px; --shadow: 0 1px 0 rgba(59, 35, 20, .05), 0 24px 44px -30px rgba(59, 35, 20, .55);
  --head: "Fraunces", Georgia, serif; --head-w: 600; --font: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); }
main, .foot { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: var(--head-w, 400); line-height: 1.02; letter-spacing: -0.01em; }
h1 em, h2 em { color: var(--acc-text); font-style: italic; }
.dark h1 em, .dark h2 em { color: var(--acc); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--acc-text); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible { outline-color: var(--acc); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }

/* Bandeau démo */
.demo-bar { position: relative; z-index: 60; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; background: #14181b; color: #c9d1d6; font: 400 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; text-align: center; }
.demo-bar strong { color: #fff; font-weight: 700; }
.demo-bar a { color: #ffd479; font-weight: 700; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }
.demo-sim { color: #ffd479; font-weight: 700; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.is-scrolled { border-color: var(--line); box-shadow: 0 10px 24px -22px rgba(0,0,0,.5); }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font: var(--head-w, 400) 25px/1 var(--head); letter-spacing: -0.01em; }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--acc); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font: 700 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s, background-color .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-main { background: var(--acc); color: var(--acc-ink); }
.btn-main:hover { background: var(--acc-2); }
.btn-line { border-color: currentColor; background: transparent; color: inherit; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.top-cta { min-height: 42px; padding: 8px 18px; font-size: 15px; }

/* Typo de section */
.kicker { font: 700 13px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--acc-text); margin-bottom: 14px; }
.dark .kicker { color: var(--acc); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(34px, 5vw, 58px); }
.section-lead { margin-top: 16px; font-size: 18px; color: var(--muted); }
.dark { background: var(--deep); color: var(--deep-ink); }
.dark .section-lead { color: var(--deep-muted); }
.alt { background: var(--bg-2); }
.fine { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.dark .fine { color: var(--deep-muted); }

/* Hero */
.hero { padding: clamp(40px, 6vw, 84px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(42px, 6.6vw, 82px); }
.hero-lead { margin-top: 20px; font-size: 19px; max-width: 540px; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; color: var(--muted); }
.hero-facts strong { color: var(--ink); }

/* Cartes, champs, pastilles */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font: 600 15px/1.2 var(--font); cursor: pointer; transition: background-color .15s, border-color .15s; }
.chip:hover { border-color: var(--acc-text); }
.chip.is-on, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.field { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; color: #1a1a1a; font: 400 16px/1.4 var(--font); }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--acc-text); outline-offset: 1px; }
.form-error { min-height: 1.3em; margin-top: 8px; color: var(--err); font-size: 14px; font-weight: 600; }
.dark .form-error { color: var(--err-light); }
/* Cartes claires posées sur un fond sombre : on reprend les couleurs du fond clair */
.dark .basket .fine, .dark .card .fine, .dark .item .fine { color: var(--muted); }
.dark .basket .form-error, .dark .card .form-error { color: var(--err); }
.dark .basket .btn-line, .dark .card .btn-line, .dark .item .btn-line { color: var(--ink); }
.dark .basket :focus-visible, .dark .card :focus-visible { outline-color: var(--ink); }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--card); color: var(--ink); }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; font: 700 20px/1 var(--font); cursor: pointer; }
.stepper button:hover { background: var(--bg-2); }
.stepper output { min-width: 34px; text-align: center; font-weight: 700; }
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 700 15px/1.2 var(--font); }
.step-label span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; }
.dark .step-label span { background: var(--acc); color: var(--acc-ink); }
.step { margin-bottom: 26px; }

/* Panier */
.book-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.basket { position: sticky; top: 92px; padding: 24px; border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.basket-label { font: 700 12px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--acc-text); }
.basket-lines { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.basket-lines li { display: flex; justify-content: space-between; gap: 12px; }
.basket-lines li.sub { color: var(--muted); font-size: 14px; }
.basket-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 4px; padding-top: 14px; border-top: 1.5px solid var(--line-2); font: 700 15px/1.2 var(--font); }
.basket-total strong { font: var(--head-w, 400) 34px/1 var(--head); }
.basket form { margin-top: 12px; }
.done { text-align: center; padding: 8px 0 0; }
.done h3 { font-size: 30px; margin: 12px 0 8px; }
.done-mark { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; }
.done-mark svg { width: 32px; height: 32px; }

/* FAQ */
.faq { margin: 0; display: grid; gap: 0; }
.faq > div { padding: 18px 0; border-top: 1px solid var(--line-2); }
.faq dt { font-weight: 700; }
.faq dd { margin: 6px 0 0; color: var(--muted); }

/* Pied de page */
.foot { padding: 52px 0 96px; background: var(--ink); color: #d7dcd8; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; font-size: 15px; }
.foot .brand-name { color: #fff; font-size: 28px; }
.foot a { color: #fff; }
.foot-small { margin-top: 6px; font-size: 13px; opacity: .75; }
.foot-credit a { text-decoration: none; font-weight: 700; color: #ffd479; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); display: none; }

@media (max-width: 960px) {
  .hero-grid, .book-grid { grid-template-columns: 1fr; }
  .basket { position: static; }
  .nav { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .sticky-cta { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

.hero h1 { font-weight: 600; }
.hero h1 em { font-weight: 500; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--bg-2); }
.hero-side .status { margin: -36px 20px 0; position: relative; }
.bread-img { width: 100%; height: 110px; object-fit: cover; border-radius: 12px; margin-bottom: 6px; background: var(--bg-2); }
.status { padding: 26px; background: var(--deep); color: var(--deep-ink); border-color: transparent; }
.status-title { font: 700 14px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.status-date { display: block; margin-top: 2px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--deep-muted); }
.status-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font: var(--head-w) 34px/1 var(--head); }
.status-pill::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #6FD08C; box-shadow: 0 0 0 5px rgba(111, 208, 140, .25); }
.status-pill.is-closed::before { background: #E88A6A; box-shadow: 0 0 0 5px rgba(232, 138, 106, .25); }
.status-line { margin-top: 8px; color: var(--deep-muted); }
.status-next { margin: 20px 0 14px; padding-top: 16px; border-top: 1px solid rgba(251, 243, 228, .2); }
.status-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--deep-muted); }
.status-big { margin-top: 4px; font: 600 22px/1.25 var(--head); }
.status .fine { color: var(--deep-muted); }
.bread-grid { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bread { padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.bread-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bread h3 { font-size: 20px; line-height: 1.15; }
.bread-price { font: 700 16px/1 var(--font); white-space: nowrap; }
.bread-note { font-size: 14px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #E5F2E3; color: #1F5A2E; }
.tag.low { background: #FFE9C2; color: #7A4300; }
.tag.out { background: #F3DDD7; color: #8A2A1A; }
.tag.hot { background: #1F5A2E; color: #fff; }
.tag.wait { background: var(--bg-2); color: var(--muted); }
.season { padding: 22px; margin-bottom: 14px; }
.season h3 { font-size: 26px; }
.season-sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.season-dates { margin-top: 10px; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); }
.season .rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.season .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.row-price { font-weight: 700; margin-left: 10px; color: var(--acc-text); }
.next-season { padding: 22px; display: grid; gap: 8px; }
.next-season h3 { font-size: 24px; }
.cake { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 22px; }
.cake-svg { width: 100%; height: auto; background: var(--bg-2); border-radius: 16px; }
.cake-frame { position: relative; }
.cake-photo { display: none; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--bg-2); }
.cake-pill { display: none; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: 88%; padding: 5px 16px; border-radius: 999px; background: rgba(59,35,20,.7); color: #fff; font: 600 15px/1.3 var(--head); text-align: center; overflow-wrap: anywhere; }
.has-photo .cake-photo { display: block; }
.has-photo .cake-pill:not([hidden]) { display: block; }
.has-photo .cake-svg { display: none; }
.cake-allerg { margin-top: 10px; }
.cake-form .field:first-child { margin-top: 0; }
.cake-form .chip { min-height: 40px; padding: 6px 13px; font-size: 14px; }
.field small { font-weight: 400; color: var(--muted); }
.row-inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cake-price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1.5px solid var(--line-2); font-size: 14.5px; color: var(--muted); }
.cake-price strong { font: var(--head-w) 28px/1 var(--head); color: var(--ink); }
.cake-form .btn { margin-top: 8px; }
.cake-msg { font-family: var(--head); font-weight: 600; fill: #fff; }
.step-note { margin-bottom: 10px; }
.chips-slots { margin-top: 10px; }
.basket-lines button { margin-left: 8px; border: 0; background: none; color: var(--acc-text); font: 600 13px/1 var(--font); text-decoration: underline; cursor: pointer; padding: 6px 2px; }
.basket-lines .empty { color: var(--muted); }
.hours { display: grid; gap: 0; margin: 0 0 28px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.hours div.today { font-weight: 800; color: var(--acc-text); }
.hours dt, .hours dd { margin: 0; }
.infos-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.infos-grid h2 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 20px; }
.pad { padding: 24px; }
.pad h3 { font-size: 24px; margin-bottom: 10px; }
.plain { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 960px) { .infos-grid { grid-template-columns: 1fr; } .cake { grid-template-columns: 1fr; } .cake-preview { max-width: 340px; } }

/* ================= Calendrier de l'Avent ================= */
.avent-note { margin: -12px 0 22px; color: var(--deep-muted); }
.avent-note a { color: var(--acc); font-weight: 600; }
.avent-grid { max-width: 860px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 760px) { .avent-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }
.door { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; background: #2a170c; cursor: pointer; perspective: 700px; font: inherit; color: inherit; }
.door-in { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), inset 0 10px 18px rgba(0, 0, 0, .45); }
.door-in img { width: 100%; height: 100%; object-fit: cover; }
.door-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 12px; line-height: 1.2; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(30, 15, 6, .85)); }
.door-leaf { position: absolute; inset: 0; border-radius: 12px; transform-origin: left center; backface-visibility: hidden; background: linear-gradient(140deg, #c98b3c, #a8662a 55%, #8f5420); box-shadow: inset 0 0 0 1.5px rgba(255, 236, 200, .35), 0 6px 14px -8px rgba(0, 0, 0, .6); display: grid; place-items: center; transition: transform .25s ease; }
.door-leaf::after { content: ""; position: absolute; inset: 6px; border-radius: 8px; border: 1.5px dashed rgba(255, 240, 210, .45); }
.door-num { font: 600 clamp(22px, 3.4vw, 34px)/1 var(--head); color: #fff6e6; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.door.locked .door-leaf { filter: saturate(.75) brightness(.9); }
.door.locked:hover .door-leaf { transform: rotateY(-8deg); }
.door.today .door-leaf { background: linear-gradient(140deg, var(--acc), #d48a1e); box-shadow: inset 0 0 0 1.5px rgba(255, 246, 220, .7), 0 0 0 3px rgba(232, 176, 75, .35), 0 0 26px rgba(232, 176, 75, .55); animation: door-glow 2.4s ease-in-out infinite; }
.door.today .door-num { color: var(--acc-ink); text-shadow: none; }
.door.today:hover .door-leaf { transform: rotateY(-22deg); }
@keyframes door-glow { 50% { box-shadow: inset 0 0 0 1.5px rgba(255, 246, 220, .7), 0 0 0 6px rgba(232, 176, 75, .18), 0 0 34px rgba(232, 176, 75, .75); } }
.door.open .door-leaf { transform: rotateY(-115deg); opacity: 0; pointer-events: none; }
.door.opening .door-leaf { transition: transform .9s cubic-bezier(.3, .1, .2, 1), opacity .35s ease .6s; }
.door.sel { outline: 3px solid var(--acc); outline-offset: 3px; }
.door.nope { animation: door-nope .42s ease; }
@keyframes door-nope { 20% { transform: translateX(-5px) rotate(-1deg); } 40% { transform: translateX(5px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.avent-detail { min-height: 96px; margin-top: 22px; }
.avent-msg { color: var(--deep-muted); font-style: italic; }
.avent-card { display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: var(--radius); background: rgba(255, 246, 230, .07); border: 1px solid rgba(255, 246, 230, .14); animation: avent-in .45s ease; }
.avent-card img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; flex: none; }
.avent-card h3 { font: 600 22px/1.15 var(--head); margin: 2px 0 4px; }
.avent-day { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
@keyframes avent-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .door, .door-leaf, .door.today .door-leaf, .avent-card { animation: none !important; transition: none !important; } }
