/* =========================================================
   PALETTE « FARINE » (mode clair), règle 60-30-10 :
   60 % neutres crème · 30 % brun croûte · 10 % rouge four (boutons)
   ========================================================= */
:root {
  /* 60 % : neutres */
  --fond: #f7efe2;
  --surface: #fffdf9;
  --kraft: #efe1cb;
  --ligne: rgb(107 58 28 / .22);
  --texte: #2a1b12;
  --texte-2: #664f3e;

  /* 30 % : couleur de marque */
  --croute: #6b3a1c;
  --ardoise: #2a211c;
  --craie: #f4ead9;
  --craie-2: #c9b8a3;

  /* 10 % : accent, réservé aux actions */
  --accent: #b8401f;
  --accent-hover: #9c3418;

  /* Les 6 tailles de texte du site, pas une de plus */
  --t-sm: 14px;
  --t-base: 17px;
  --t-md: 20px;
  --t-lg: 28px;
  --t-xl: clamp(32px, 4vw, 40px);
  --t-2xl: clamp(40px, 6vw, 68px);

  --r-btn: 10px;
  --r-card: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scrollbar-width: thin; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
}

h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 500; line-height: 1.12; letter-spacing: -.025em; } /* titres resserrés */
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); margin-bottom: 32px; }
h3 { font-size: var(--t-md); font-weight: 600; line-height: 1.3; }

.container { width: min(1088px, 100% - 48px); margin-inline: auto; }

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* ===== BANDEAU DÉMO ===== */
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  padding: 8px 16px;
  background: var(--ardoise);
  color: var(--craie-2);
  font-size: var(--t-sm);
}
.demo-bar a { display: inline-flex; align-items: center; gap: 4px; color: var(--craie); text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }

/* ===== EN-TÊTE ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--fond);
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.header.scrolle { border-color: var(--ligne); }

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-md);
  font-weight: 600;
  white-space: nowrap;
  color: var(--croute);
  text-decoration: none;
}

.nav { display: flex; gap: 32px; }
.nav a { padding-block: 8px; color: var(--texte-2); text-decoration: none; transition: color .15s; }
.nav a:hover { color: var(--accent); }

/* ===== BOUTONS : normal, survolé, appuyé, focus ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;               /* largeur = 2 x hauteur */
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { border-radius: var(--r-btn); }

/* Fantôme : uniquement pour l'action secondaire */
.btn--ghost { background: transparent; border-color: rgb(58 36 20 / .3); color: var(--texte); }
.btn--ghost:hover { background: var(--kraft); }

/* ===== ACCROCHE ===== */
.hero { padding-block: 48px 64px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

/* Cadre autour du texte d'accueil et des horaires */
.hero__content, .two-cols > .reveal { padding: 40px; border: 1px solid var(--ligne); border-radius: var(--r-card); background: var(--surface); }

.hero__small { margin-bottom: 16px; color: var(--croute); }
.hero__text { max-width: 32rem; margin: 24px 0 32px; font-size: var(--t-md); color: var(--texte-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__adresse { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--texte-2); }

/* ===== L'ARDOISE : le moment fort, seul bloc sombre de l'accueil ===== */
.ardoise {
  padding: 32px;
  border: 8px solid #a9713f;        /* le cadre en bois */
  border-radius: var(--r-card);
  background: var(--ardoise);
  color: var(--craie);
}
.ardoise__titre { margin-bottom: 8px; font-size: var(--t-sm); color: var(--craie-2); }
.ardoise__heures { font-size: var(--t-lg); line-height: 1.3; }
.ardoise hr { margin: 24px 0; border: 0; border-top: 1px dashed rgb(244 234 217 / .3); }

.ardoise__liste { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ardoise__liste li { display: flex; justify-content: space-between; gap: 16px; }
.ardoise__liste li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Badge Ouvert / Fermé (texte et classes ajoutés par script.js) */
.statut { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 600; }
.statut:empty { display: none; }
.statut::before { content: ""; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #2f9e5b; }
.statut--ferme::before { background: #9a8c80; }

/* ===== ENGAGEMENTS ===== */
.engagements { background: var(--croute); color: var(--craie); }
.engagements__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 32px;
  padding-block: 32px;
}
.engagement { display: flex; align-items: center; gap: 12px; }
/* Le pain est dessiné sur 64 px : on épaissit son trait pour l'aligner sur les autres */
.engagement:last-child .icon { stroke-width: 4; }

/* ===== SECTIONS ===== */
.section { padding-block: 96px; }
.section--alt { background: var(--kraft); }
.eyebrow { margin-bottom: 8px; color: var(--croute); }

/* ===== PRODUITS EN BENTO ===== */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento__wide { grid-column: span 2; }
.bento__full { grid-column: 1 / -1; }

.product {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--ligne);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 4px 24px rgb(58 36 20 / .06);   /* ombre à peine visible */
}
.product p { margin: 4px 0 16px; color: var(--texte-2); }

.product__img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  margin-bottom: 16px;
  fill: #f0cf9c;
  stroke: var(--croute);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price { margin-top: auto; font-size: var(--t-md); font-weight: 600; color: var(--croute); font-variant-numeric: tabular-nums; }

/* Produit phare : carte plus large, fond blé, grand dessin */
.product--phare { flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; background: #f2d7a9; }
.product--phare h3 { font-size: var(--t-lg); letter-spacing: -.02em; }
.product--phare p { color: #573a22; }
.product--phare .price { font-size: var(--t-lg); }
.product__img--xl { width: 200px; height: 200px; margin: 0; fill: #e0a55a; stroke-width: 1.25; }
.tag { display: block; margin-bottom: 8px; font-size: var(--t-sm); color: #573a22; }

/* Gâteaux sur commande : une bande avec son bouton */
.product--commande { flex-direction: row; align-items: center; gap: 24px; background: var(--kraft); box-shadow: none; }
.product--commande .product__img { margin: 0; fill: var(--surface); }
.product--commande p { margin-bottom: 0; }
.commande__texte { flex: 1; }
.btn--sombre { background: var(--croute); }
.btn--sombre:hover { background: #532b13; }

/* ===== HORAIRES & ACCÈS ===== */
.two-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }

.hours { width: 100%; margin-top: 16px; border-collapse: collapse; }
.hours td { padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.hours td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hours tr.aujourdhui td { font-weight: 600; color: var(--accent-hover); }
.hours tr.aujourdhui td:first-child::after { content: " · aujourd'hui"; font-size: var(--t-sm); font-weight: 400; }

.acces h2 { margin-bottom: 16px; }
.acces__adresse { margin-bottom: 12px; font-size: var(--t-md); }
.acces__note { margin-top: 12px; color: var(--texte-2); }

/* ===== PIED DE PAGE ===== */
.footer { padding: 32px 24px; text-align: center; font-size: var(--t-sm); color: var(--texte-2); }

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

/* ===== BOUTON « APPELER » : téléphone seulement ===== */
.call-fab { display: none; }

/* ===== TABLETTE ===== */
@media (max-width: 900px) {
  .hero__grid, .two-cols { grid-template-columns: 1fr; gap: 20px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .product__img--xl { width: 160px; height: 160px; }
}

/* ===== TÉLÉPHONE ===== */
@media (max-width: 640px) {
  .container { width: min(1088px, 100% - 32px); }
  .hero { padding-block: 16px 40px; }
  .section { padding-block: 64px; }
  .btn { width: 100%; }

  .header__inner { flex-direction: column; gap: 0; padding-block: 12px 4px; }
  .nav { gap: 24px; }

  .ardoise, .hero__content, .two-cols > .reveal { padding: 24px 20px; }

  .bento { grid-template-columns: 1fr; gap: 16px; }
  .bento__wide { grid-column: auto; }
  .product__img--xl { width: 104px; height: 104px; }
  .product--commande { flex-direction: column; align-items: flex-start; }

  .call-fab {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--r-btn);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 40px rgb(58 36 20 / .24);
  }
  .call-fab:active { background: var(--accent-hover); }
  body { padding-bottom: 80px; }   /* pour que le bouton ne cache pas le pied de page */
}

/* ===== ANIMATIONS AU DÉFILEMENT (moteur : animations.js) ===== */
/* Ardoise : chaque ligne s'écrit de gauche à droite, comme à la craie */
@keyframes craie { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.js .ardoise.visible li { animation: craie .7s ease-out calc(.5s + var(--i) * .25s) backwards; }

/* Les dessins se tracent, puis se colorient */
.js .reveal.visible .product__img { animation: dessiner 1.8s ease-out calc(var(--delai, 0s) + .2s) backwards; }

/* La grande baguette tourne doucement avec le défilement */
.product__img--xl { rotate: calc((var(--p, .5) - .5) * 40deg); }

/* Les horaires arrivent ligne par ligne */
.js .reveal.visible .hours tr { animation: ligne .6s var(--ease) calc(.2s + var(--i) * .1s) backwards; }
