/* Maison Levain, boulangerie. Style "Fournil".
   Le site vit à l'heure du fournil : la page dit ce qui s'y passe maintenant,
   et la frise de la journée met en avant l'étape en cours. */

@font-face {
  font-family: 'Young Serif';
  src: url('../fonts/young-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans Variable';
  src: url('../fonts/instrument-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --farine: #F2E6D0;
  --farine-claire: #FAF3E6;
  --croute: #8A4B22;
  --braise: #C4582A;          /* aplats, traits, grands titres */
  --braise-fond: #AC4D25;     /* aplat portant du petit texte clair, 4.56:1 */
  --braise-texte: #A8441C;    /* petit texte, 4.52:1 sur la farine */
  --charbon: #2B2420;
  --charbon-doux: #6B5F57;    /* 4.60:1 sur la farine */
  --filet: rgba(43, 36, 32, .2);
  --levee: cubic-bezier(.25, .6, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding: 0 clamp(1.25rem, 5vw, 4rem) 8rem;
  background: var(--farine);
  color: var(--charbon);
  font-family: 'Instrument Sans Variable', system-ui, sans-serif;
  font-size: clamp(1rem, .95rem + .25vw, 1.1rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--braise); color: var(--farine-claire); }

/* La chaleur du four, en bas de page, qui ne défile pas. */
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 42vh;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(196, 88, 42, .16), transparent 78%);
}
body > * { position: relative; z-index: 1; }

.feuille { max-width: 72rem; margin-inline: auto; }

/* ── En ce moment ─────────────────────────────────────────────────────── */

.maintenant { padding-block: clamp(3rem, 9vh, 6rem) clamp(2rem, 5vh, 3rem); }
.enseigne {
  margin: 0 0 clamp(2rem, 6vh, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1.5rem;
}
.enseigne b {
  font-family: 'Young Serif', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -.02em;
}
.enseigne span {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--charbon-doux);
}

.etat-label {
  margin: 0 0 .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--braise-texte);
}
/* La braise respire doucement : c'est le seul élément qui bouge en continu. */
.etat-label::before {
  content: "";
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--braise);
  animation: braiser 3.4s var(--levee) infinite;
}
@keyframes braiser { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.etat-phrase {
  margin: 0;
  max-width: 18ch;
  font-family: 'Young Serif', Georgia, serif;
  font-size: clamp(2.4rem, 8.5vw, 5.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--croute);
}
.etat-detail {
  max-width: 44ch;
  margin: 1.4rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--charbon-doux);
}

/* ── La frise de la journée ───────────────────────────────────────────── */

.frise-bloc { padding-block: clamp(2rem, 5vh, 3rem); }
.frise-titre {
  margin: 0 0 1.5rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--charbon-doux);
}
.frise {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--charbon);
  padding-top: 1.25rem;
}
@media (min-width: 52rem) { .frise { grid-template-columns: repeat(6, 1fr); gap: 1rem; } }

.etape {
  position: relative;
  padding: .9rem 1rem;
  border: 1px solid var(--filet);
  background: rgba(250, 243, 230, .5);
  transition: background-color .6s var(--levee), border-color .6s var(--levee);
}
.etape-h {
  margin: 0 0 .35rem;
  font-family: 'Young Serif', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}
.etape-quoi { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--charbon-doux); }
.etape.en-cours {
  border-color: var(--braise-fond);
  background: var(--braise-fond);
}
.etape.en-cours .etape-h, .etape.en-cours .etape-quoi { color: var(--farine-claire); }
.etape.en-cours::after {
  content: "en ce moment";
  position: absolute;
  top: -.65rem;
  left: 1rem;
  padding: 0 .4rem;
  background: var(--farine);
  color: var(--braise-texte);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ── Sections ─────────────────────────────────────────────────────────── */

section { padding-top: clamp(3rem, 8vh, 5.5rem); }
.section-h {
  margin: 0 0 1.5rem;
  font-family: 'Young Serif', Georgia, serif;
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--croute);
}

/* Les pains : une liste large, pas des cartes. */
.pains { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.pain {
  display: grid;
  gap: .2rem 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--filet);
}
@media (min-width: 48rem) { .pain { grid-template-columns: 1fr 10rem 7rem; align-items: baseline; } }
.pain-nom {
  font-family: 'Young Serif', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.15;
}
.pain-det { font-size: .9rem; color: var(--charbon-doux); max-width: 52ch; }
.pain-poids { font-size: .88rem; color: var(--charbon-doux); }
.pain-prix { font-weight: 700; color: var(--braise-texte); }
@media (min-width: 48rem) { .pain-prix { text-align: right; } }

/* Le levain : un bloc chaud, à part. */
.levain {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--charbon);
  color: var(--farine);
}
@media (min-width: 52rem) { .levain { grid-template-columns: 1fr 1fr; align-items: center; } }
.levain h2 {
  margin: 0 0 1rem;
  font-family: 'Young Serif', Georgia, serif;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--farine-claire);
}
.levain p { margin: 0 0 1rem; max-width: 46ch; color: rgba(242, 230, 208, .82); }
.levain p:last-child { margin-bottom: 0; }
.levain-chiffre {
  font-family: 'Young Serif', Georgia, serif;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: .9;
  color: var(--braise);
}
.levain-chiffre span {
  display: block;
  font-family: 'Instrument Sans Variable', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(242, 230, 208, .72);
}

/* ── Venir ────────────────────────────────────────────────────────────── */

.venir-grille { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 48rem) { .venir-grille { grid-template-columns: 1fr 1fr; } }
.venir-grille p { margin: 0 0 1rem; max-width: 46ch; }
.venir-grille a { color: var(--braise-texte); text-underline-offset: .25em; }
.venir-grille a:hover, .venir-grille a:focus-visible { color: var(--croute); }
.horaires { margin: 0; }
.horaire { display: flex; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--filet); }
.horaire dt { width: 10ch; font-weight: 600; }
.horaire dd { margin: 0 0 0 auto; color: var(--charbon-doux); }
.horaire.ferme dd { color: var(--braise-texte); }

.venir-grille .commander {
  display: inline-block;
  margin-top: .8rem;
  padding: .9rem 2rem;
  border: 2px solid var(--croute);
  background: var(--croute);
  color: var(--farine-claire);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  transition: background-color .45s var(--levee), color .45s var(--levee);
}
.venir-grille .commander:hover,
.venir-grille .commander:focus-visible { background: transparent; color: var(--croute); }
.commander:focus-visible { outline: 2px solid var(--braise); outline-offset: 3px; }

.pied {
  margin-top: clamp(3rem, 7vh, 5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--filet);
  font-size: .82rem;
  color: var(--charbon-doux);
}

/* ── Révélation : ça monte doucement, comme une pâte ──────────────────── */

.js .rv { opacity: 0; transform: translateY(22px); animation: secours 1s var(--levee) 2.8s forwards; }
.js .rv.vu {
  opacity: 1;
  transform: none;
  animation: none;
  transition: opacity 1.05s var(--levee) var(--retard, 0ms), transform 1.05s var(--levee) var(--retard, 0ms);
}
@keyframes secours { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .rv.vu { opacity: 1; transform: none; transition: none; animation: none; }
  .etat-label::before { animation: none; }
}

/* ── Bandeau Webot ────────────────────────────────────────────────────────
   Identique sur toutes les démos, volontairement neutre pour rester lisible
   quel que soit le style derrière. Police système : elle ne compte pas dans
   les deux familles de la démo. */

.webot-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: calc(100vw - 2rem);
  padding: .6rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(16, 16, 18, .92);
  color: #fff;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: .8125rem;
  line-height: 1.3;
  letter-spacing: .01em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
@supports (backdrop-filter: blur(8px)) {
  .webot-bar { background: rgba(16, 16, 18, .78); backdrop-filter: blur(10px); }
}
.webot-bar p { margin: 0; color: rgba(255, 255, 255, .78); }
.webot-bar a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .45);
  padding-bottom: 1px;
  white-space: nowrap;
}
.webot-bar a:hover { border-bottom-color: #fff; }
.webot-bar a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }
@media (max-width: 34rem) {
  .webot-bar { top: .75rem; bottom: auto; gap: .75rem; padding: .5rem .9rem; font-size: .75rem; }
}
