/* ==========================================================================
   Exemple : L'Épi Doré, boulangerie de quartier (fictive)

   Direction : la devanture peinte. Vert bouteille et lettres dorées, store
   rayé, papier farine. Une seule famille de caractères, Vollkorn (« pain
   complet » en allemand), en romain, italique et petites capitales.
   Composition centrée et symétrique, comme une vitrine.
   Mouvement lent et doux : le store se déroule à l'ouverture de la page,
   les photos se posent, les points de conduite de la carte s'écrivent.
   ========================================================================== */

@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/vollkorn-400-900.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/vollkorn-400-700-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Vollkorn SC";
  src: url("../fonts/vollkorn-sc-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

.bakery {
  --flour: #F7F2E7;
  --paper: #FFFCF5;
  --green: #1E3A2F;
  --green-2: #29493C;
  --gold: #D9B45F;
  --crust: #8B4F24;
  --ink: #2A2019;
  --muted: #6A5B4D;
  --rule: #E0D3BC;

  --serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --caps: "Vollkorn SC", "Vollkorn", Georgia, serif;
  --soft: cubic-bezier(0.25, 0.6, 0.3, 1);

  --reveal-from: translateY(16px);
  --reveal-duration: 1.1s;
  --reveal-ease: var(--soft);
  --reveal-stagger: 140ms;

  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--flour);
}

.bakery :focus-visible {
  outline: 2px solid var(--crust);
  outline-offset: 3px;
}

.bakery a {
  color: inherit;
}

.bakery h1,
.bakery h2,
.bakery h3 {
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}

.b-kicker {
  font-family: var(--caps);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--crust);
}

/* --------------------------------------------------------------------------
   Devanture : store rayé à festons, enseigne peinte, navigation
   -------------------------------------------------------------------------- */

.b-front {
  background: var(--green);
  color: var(--gold);
  text-align: center;
}

/* L'ombre est portée par le conteneur pour suivre la forme des festons,
   que le masque découpe dans le pseudo-élément. */
.b-awning {
  --stripe: clamp(30px, 4vw, 46px);
  --scallop: calc(var(--stripe) / 2);
  position: relative;
  z-index: 1;
  height: clamp(62px, 8vw, 96px);
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.35));
  transform-origin: top;
}

.b-awning::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.22), transparent 40%),
    repeating-linear-gradient(90deg, #356150 0 var(--stripe), #EFE6D2 0 calc(var(--stripe) * 2));
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--scallop)) no-repeat,
    radial-gradient(circle at 50% 0, #000 calc(var(--scallop) - 0.5px), transparent var(--scallop)) left bottom / var(--stripe) var(--scallop) repeat-x;
}

.js .b-awning {
  animation: unroll 1.2s var(--soft) 0.2s both;
}

@keyframes unroll {
  from {
    transform: scaleY(0.06);
  }

  70% {
    transform: scaleY(1.05);
  }

  to {
    transform: scaleY(1);
  }
}

.b-sign {
  padding: clamp(22px, 4vw, 44px) 20px clamp(18px, 3vw, 30px);
}

.js .b-sign {
  animation: sign-in 1.4s var(--soft) 0.7s both;
}

@keyframes sign-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.b-sign__trade,
.b-sign__since {
  font-family: var(--caps);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: #EFE6D2;
}

.b-sign__name {
  margin-block: 0.12em 2px;
  font-size: clamp(3.4rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--gold);
}

.b-sign__since {
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: none;
}

.b-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px clamp(18px, 4vw, 44px);
  padding: 14px 20px;
  border-top: 1px solid rgba(217, 180, 95, 0.4);
  background: var(--green);
}

.b-nav a {
  font-family: var(--caps);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: #EFE6D2;
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat 50% 100% / 0% 1px;
  transition: background-size 0.4s var(--soft);
}

.b-nav a:hover {
  background-size: 100% 1px;
  color: var(--gold);
}

.b-front :focus-visible {
  outline-color: var(--gold);
}

/* --------------------------------------------------------------------------
   Ouvert / fermé (rempli par script.js)
   -------------------------------------------------------------------------- */

.b-status {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-style: italic;
  color: var(--muted);
}

.b-status .open-status__label {
  font-family: var(--caps);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

.b-status[data-state="open"] .open-status__label {
  color: #2E6B45;
}

.b-status[data-state="closed"] .open-status__label {
  color: var(--crust);
}

.b-status--light,
.b-status--light[data-state] .open-status__label {
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Accueil
   -------------------------------------------------------------------------- */

.b-hero {
  padding: clamp(48px, 7vw, 96px) 20px 0;
  text-align: center;
}

.b-hero h1 {
  max-width: 15em;
  margin: 18px auto 0;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
  font-style: italic;
  font-weight: 700;
}

.b-hero__lead {
  max-width: 32em;
  margin: 22px auto 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--muted);
}

.b-hero__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  margin-top: 32px;
}

.b-button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--green);
  color: #EFE6D2 !important;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
}

.b-button:hover {
  background: var(--crust);
}

.b-link {
  font-style: italic;
  font-weight: 600;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* La vitrine : une grande fenêtre cintrée */
.b-window {
  width: min(100%, 1180px);
  margin: clamp(44px, 6vw, 72px) auto 0;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  aspect-ratio: 16 / 8;
  background: var(--rule);
}

.b-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js .b-window img {
  animation: settle 2.2s var(--soft) both;
}

@keyframes settle {
  from {
    transform: scale(1.08);
  }
}

/* --------------------------------------------------------------------------
   Titres de section
   -------------------------------------------------------------------------- */

.b-title {
  max-width: 34em;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}

.b-title h2 {
  margin-top: 6px;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
}

.b-title > p:last-child {
  margin-top: 14px;
  font-style: italic;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   La carte : deux colonnes, points de conduite entre le nom et le prix
   -------------------------------------------------------------------------- */

.b-menu {
  padding: clamp(72px, 10vw, 128px) 20px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.b-menu__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 clamp(40px, 7vw, 110px);
  max-width: 1080px;
  margin-inline: auto;
}

.b-menu__col {
  display: grid;
  gap: clamp(40px, 5vw, 60px);
}

.b-list h3 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-family: var(--caps);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--crust);
}

.b-list h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold);
}

.b-list__note {
  margin: -4px 0 12px;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

.b-list li {
  display: flex;
  align-items: baseline;
  padding-block: 9px;
}

.b-item {
  max-width: 78%;
}

.b-item em {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Les points de conduite s'écrivent de gauche à droite, ligne après ligne */
.b-list li::after {
  content: "";
  order: 1;
  flex: 1;
  min-width: 24px;
  margin-inline: 10px;
  border-bottom: 2px dotted #C9B89A;
  transform-origin: left;
  transition: transform 0.9s var(--soft);
  transition-delay: calc(0.3s + var(--n, 0) * 0.12s);
}

.b-price {
  order: 2;
  font-weight: 600;
  font-variant-numeric: oldstyle-nums;
  white-space: nowrap;
}

.b-list li:nth-child(2) { --n: 1; }
.b-list li:nth-child(3) { --n: 2; }
.b-list li:nth-child(4) { --n: 3; }
.b-list li:nth-child(5) { --n: 4; }

.js .b-list:not(.is-visible) li::after {
  transform: scaleX(0);
}

.b-list--order {
  padding: 26px 28px 20px;
  background: #F1E4CB;
  border-radius: 4px;
}

/* Photos découpées : ronde, cintrée */
.b-cut {
  overflow: hidden;
  background: var(--rule);
}

.b-cut img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.8s var(--soft);
}

.js .b-cut:not(.is-visible) img {
  transform: scale(1.1);
}

.b-cut--round {
  width: min(78%, 320px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
}

.b-cut--arch {
  aspect-ratio: 4 / 3;
  border-radius: 999px 999px 4px 4px / 60% 60% 4px 4px;
}

/* --------------------------------------------------------------------------
   Les fournées : frise de 6 h à 19 h, aiguille à l'heure de Zurich
   -------------------------------------------------------------------------- */

.b-bakes {
  padding: clamp(72px, 10vw, 128px) 20px;
  background: var(--green);
  color: #EFE6D2;
}

.b-title--light .b-kicker {
  color: var(--gold);
}

.b-title--light h2 {
  color: #F7F2E7;
}

.b-bakes .b-title > p:last-child {
  color: #EFE6D2;
  font-size: 1.2rem;
}

/* Par défaut (téléphone, ou sans JavaScript) : une liste verticale.
   Sur grand écran, script.js place chaque fournée sur la frise (--at)
   et l'aiguille à l'heure actuelle (--now). */
.b-timeline {
  max-width: 30em;
  margin-inline: auto;
}

.b-timeline__rail {
  display: none;
}

.b-timeline__bakes {
  border-left: 2px solid var(--gold);
}

.b-timeline__bakes li {
  position: relative;
  padding: 0 0 26px 26px;
  font-size: 1rem;
  line-height: 1.35;
}

/* Le point sur la frise */
.b-timeline__bakes li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -8px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--green);
}

.b-timeline__bakes time {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
}

.b-timeline__bakes em {
  color: #CFC5AE;
}

/* Fournées déjà sorties ou absentes aujourd'hui : couleurs éteintes,
   mais contraste suffisant pour rester lisibles */
.b-timeline__bakes li.is-past time,
.b-timeline__bakes li.is-off time {
  color: #A89160;
}

.b-timeline__bakes li.is-past span,
.b-timeline__bakes li.is-off span {
  color: #BDB6A5;
}

.b-timeline__bakes li.is-off span {
  text-decoration: line-through;
}

.b-timeline__bakes li.is-past::before {
  background: var(--gold);
}

.b-timeline__bakes li.is-next::before {
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(217, 180, 95, 0.25);
}

@media (min-width: 861px) {
  .js .b-timeline {
    position: relative;
    max-width: 1080px;
    padding-top: 92px;
  }

  .js .b-timeline__rail {
    display: block;
    position: relative;
    height: 14px;
    border-bottom: 2px solid var(--gold);
    /* une graduation par heure : 13 intervalles entre 6 h et 19 h */
    background: repeating-linear-gradient(90deg, rgba(217, 180, 95, 0.7) 0 1px, transparent 1px calc(100% / 13));
    background-size: calc(100% + 1px) 100%;
  }

  .js .b-timeline__bakes {
    position: relative;
    height: 150px;
    border-left: 0;
  }

  .js .b-timeline__bakes li {
    position: absolute;
    top: 0;
    left: var(--at);
    width: 12em;
    padding: 26px 0 0;
    translate: -7px 0;
  }

  .js .b-timeline__bakes li::before {
    top: -8px;
    left: 0;
  }

  /* une fournée sur deux au-dessus de la frise, pour que les textes respirent */
  .js .b-timeline__bakes li:nth-child(even) {
    top: auto;
    bottom: calc(100% + 42px);
    padding-top: 0;
  }

  .js .b-timeline__bakes li:nth-child(even)::before {
    top: auto;
    bottom: -50px;
  }
}

.b-timeline__needle {
  position: absolute;
  left: var(--now, 0%);
  bottom: -2px;
  width: 2px;
  height: 118px;
  background: #F7F2E7;
  transition: left 1.6s var(--soft) 0.3s;
}

.js .b-timeline:not(.is-visible) .b-timeline__needle {
  left: 0%;
}

.b-timeline__needle[hidden] {
  display: none;
}

.b-timeline__needle span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  translate: -50% -6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #F7F2E7;
  color: var(--green);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
}

.b-bakes__sunday {
  max-width: 1080px;
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(217, 180, 95, 0.35);
  font-style: italic;
  text-align: center;
  color: #CFC5AE;
}

/* --------------------------------------------------------------------------
   Notre histoire : une lettre signée
   -------------------------------------------------------------------------- */

.b-story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(36px, 7vw, 100px);
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(72px, 10vw, 136px) 20px;
}

.b-story__photo {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 6px 6px / 42% 42% 6px 6px;
  background: var(--rule);
}

.b-story__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.8s var(--soft);
}

.js .b-story__photo:not(.is-visible) img {
  transform: scale(1.1);
}

.b-story__letter {
  position: relative;
}

.b-story h2 {
  margin-block: 6px 24px;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
}

.b-story__letter > p:not(.b-kicker, .b-signature) {
  margin-top: 16px;
  max-width: 32em;
}

.b-signature {
  margin-top: 26px;
  font-size: 1.9rem;
  font-style: italic;
  font-weight: 500;
  color: var(--crust);
}

/* L'épi se dessine trait par trait */
.b-ear {
  position: absolute;
  right: 0;
  bottom: -10px;
  width: 56px;
  height: auto;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.b-ear path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s var(--soft);
}

.b-ear path:nth-child(2) { transition-delay: 0.5s; }
.b-ear path:nth-child(3) { transition-delay: 0.7s; }
.b-ear path:nth-child(4) { transition-delay: 0.9s; }
.b-ear path:nth-child(5) { transition-delay: 1.1s; }

.js .b-story__letter:not(.is-visible) .b-ear path {
  stroke-dashoffset: 1;
}

/* --------------------------------------------------------------------------
   Horaires : une plaque émaillée
   -------------------------------------------------------------------------- */

.b-hours {
  padding: 0 20px clamp(72px, 10vw, 128px);
}

.b-hours__inner {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 52px) clamp(24px, 5vw, 56px);
  background: var(--green);
  color: #EFE6D2;
  text-align: center;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 6px var(--green),
    inset 0 0 0 8px var(--gold);
}

.b-hours h2 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--gold);
}

.b-hours .b-status {
  margin-top: 10px;
}

.b-hours__table {
  width: 100%;
  margin-top: 26px;
  font-size: 1.2rem;
}

.b-hours__table th,
.b-hours__table td {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(217, 180, 95, 0.3);
  font-weight: 400;
}

.b-hours__table th {
  text-align: left;
}

.b-hours__table td {
  text-align: right;
  font-variant-numeric: oldstyle-nums;
}

.b-hours__table tr.is-today {
  color: var(--gold);
}

.b-hours__table tr.is-today th {
  font-weight: 700;
}

.b-hours__table tr.is-today th::after {
  content: "aujourd’hui";
  margin-left: 10px;
  font-family: var(--caps);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #EFE6D2;
}

.b-hours__address {
  margin-top: 26px;
  font-size: 1.15rem;
}

.b-hours__address a {
  font-weight: 600;
  color: var(--gold);
}

.b-hours__holiday {
  margin-top: 10px;
  font-size: 0.95rem;
  font-style: italic;
  color: #CFC5AE;
}

.b-hours :focus-visible {
  outline-color: var(--gold);
}

.b-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Écrans moyens et petits
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .b-menu__grid,
  .b-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .b-menu__col + .b-menu__col {
    margin-top: 48px;
  }

  .b-story__photo {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .b-window {
    aspect-ratio: 4 / 3;
    border-radius: 50% 50% 0 0 / 26% 26% 0 0;
  }
}
