/* =========================================================
   O’GOOD TIME — Page d'accueil
   Structure propre à l'accueil : ouverture, bandeau défilant,
   familles, sélection, carte affichée, maison, étapes, zone
   livrée, et le bloc « nous trouver ».
   Les couleurs et le mouvement viennent de tokens.css ;
   l'habillage vient de ogoodtime.css.
   ========================================================= */

/* ---------------- Ouverture ----------------
   Photo plein cadre, voile sombre, texte en bas à gauche.
   Sur téléphone la photo devient un bandeau plus court et le
   texte reprend toute la largeur. */
.opener {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding-inline: var(--gutter);
  isolation: isolate;
}
.opener__photo { position: absolute; inset: 0; z-index: -2; }
.opener__photo img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04);
  animation: ogt-slowzoom 22s var(--e-inout) infinite alternate;
}
@keyframes ogt-slowzoom { to { transform: scale(1.13); } }
.opener__veil {
  position: absolute; inset: 0; z-index: -1;
  background: var(--grad-veil);
}
.opener__inner { width: 100%; max-width: var(--maxw); margin-inline: auto;
                 padding-block: var(--s-9) var(--s-8); }

.opener__tag {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--c-creme);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: var(--r-full);
  padding: .5em 1em;
}
/* La pastille clignote doucement quand la cuisine est ouverte. */
.opener__tag i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-vert); flex: none;
  box-shadow: 0 0 0 0 rgba(111,191,115,.65);
  animation: ogt-ping 2.2s var(--e-out) infinite;
}
.opener__tag.is-closed i { background: var(--c-flamme); animation: none; }
@keyframes ogt-ping {
  70%  { box-shadow: 0 0 0 9px rgba(111,191,115,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,191,115,0); }
}

.opener h1 {
  color: var(--c-creme);
  font-size: var(--t-4xl);
  margin-top: var(--s-4);
  text-shadow: 0 2px 30px rgba(0,0,0,.55);
}
.opener h1 span { display: block; }
.opener__lede {
  color: rgba(248,244,236,.86);
  font-size: var(--t-lg);
  max-width: 44ch;
  margin-top: var(--s-4);
}
.opener__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

/* Trois chiffres sous les boutons : ce que le client veut savoir
   avant de cliquer — halal, délai, seuil de livraison. */
.opener__facts {
  display: flex; flex-wrap: wrap; gap: var(--s-6);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,.16);
}
.opener__facts > div { min-width: 0; }
.opener__facts b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-xl);
  color: var(--c-braise);
  line-height: 1;
}
.opener__facts span {
  display: block; margin-top: .35rem;
  font-size: var(--t-xs); letter-spacing: .13em;
  text-transform: uppercase; color: rgba(248,244,236,.66);
}

@media (max-width: 720px) {
  .opener { min-height: 78vh; }
  .opener__inner { padding-block: var(--s-8) var(--s-7); }
  .opener__facts { gap: var(--s-5); }
  .opener__cta .btn { flex: 1 1 100%; }
}

/* ---------------- Familles de la carte ----------------
   Alimentées par l'API (accueil.js écrit des .famille).
   Rail qui défile au doigt sur téléphone, grille au-delà. */
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.famille {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-height: 96px;
  transition: transform var(--d-fast) var(--e-out),
              border-color var(--d-fast), background var(--d-fast);
}
.famille:hover {
  transform: translateY(-3px);
  border-color: var(--c-braise);
  background: var(--bg-alt);
}
.famille__media {
  width: 72px; height: 72px; flex: none;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-alt);
  display: block;
}
.famille__media img { width: 100%; height: 100%; object-fit: cover;
                      transition: transform var(--d-mid) var(--e-out); }
.famille:hover .famille__media img { transform: scale(1.08); }
.famille__body { min-width: 0; display: block; }
.famille__name {
  display: block;
  font-family: var(--font-display); text-transform: uppercase;
  font-size: var(--t-base); letter-spacing: .015em; line-height: 1.15;
}
.famille__meta {
  display: block; margin-top: .25rem;
  font-size: var(--t-xs); color: var(--text-mute);
}
.famille__go {
  font-size: var(--t-lg); color: var(--c-braise);
  padding-right: var(--s-2);
  transition: transform var(--d-fast) var(--e-back);
}
.famille:hover .famille__go { transform: translateX(4px); }

@media (max-width: 620px) {
  .cats {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter); padding-bottom: var(--s-3);
    scrollbar-width: none;
  }
  .cats::-webkit-scrollbar { display: none; }
  .famille { flex: 0 0 268px; scroll-snap-align: start; }
}

/* ---------------- Sélection : mosaïque ----------------
   La première tuile est deux fois plus grande. Sur téléphone,
   toutes reprennent la même taille. */
.stars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.stars > :first-child { grid-column: span 2; grid-row: span 2; }
.star {
  position: relative; display: flex; align-items: flex-end;
  min-height: 264px; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  transition: transform var(--d-mid) var(--e-out), box-shadow var(--d-mid) var(--e-out);
}
.stars > :first-child.star { min-height: 544px; }
.star:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.star img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--d-slow) var(--e-out);
}
.star:hover img { transform: scale(1.07); }
.star__veil { position: absolute; inset: 0; z-index: 1; background: var(--grad-veil); }
.star__body { position: relative; z-index: 2; padding: var(--s-5); width: 100%; }
.star__body h3 {
  font-size: var(--t-lg); color: var(--c-creme);
  text-shadow: 0 1px 16px rgba(0,0,0,.7);
}
.stars > :first-child .star__body h3 { font-size: var(--t-2xl); }
.star__body p {
  font-size: var(--t-sm); color: rgba(248,244,236,.80);
  margin-top: .35rem;
}
.star__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-top: var(--s-4);
}
.star__price { font-family: var(--font-display); font-size: var(--t-xl); color: var(--c-braise); }
.star__badge {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .10em;
  text-transform: uppercase;
  background: var(--grad-braise); color: var(--c-blanc);
  border-radius: var(--r-sm); padding: .3em .6em;
}

@media (max-width: 1080px) { .stars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .stars { grid-template-columns: 1fr; }
  .stars > :first-child { grid-column: span 1; grid-row: span 1; }
  .stars > :first-child.star { min-height: 300px; }
  .stars > :first-child .star__body h3 { font-size: var(--t-xl); }
}

/* ---------------- La carte affichée ----------------
   Deux colonnes de lignes pointillées, comme la carte au mur.
   Alimentée par l'API : chaque famille sort avec ses plats. */
.carte { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-8); margin-top: var(--s-6); }
.carte__col { min-width: 0; }
.carte__list { margin-top: var(--s-2); }
.carte-line { color: inherit; }
.carte-line:hover b { color: var(--c-braise); }
@media (max-width: 820px) { .carte { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ---------------- La maison ---------------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.story__media {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4 / 3; border: 1px solid var(--line);
}
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.story__stamps { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.story__points { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.story__point { display: flex; gap: var(--s-4); align-items: flex-start; }
.story__point svg { width: 22px; height: 22px; flex: none; color: var(--c-braise); margin-top: 4px; }
.story__point b {
  display: block; font-family: var(--font-display);
  text-transform: uppercase; font-size: var(--t-base); letter-spacing: .015em;
}
.story__point span { font-size: var(--t-sm); color: var(--text-mute); }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ---------------- Étapes : comment commander ---------------- */
.steps {
  display: grid;
  /* auto-fit plutôt qu'un nombre fixe : à 820 px, trois colonnes
     figées débordaient de la fenêtre. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--s-4); margin-top: var(--s-6);
}
.step {
  padding: var(--s-5);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.step h3 { font-size: var(--t-lg); margin-top: var(--s-2); }
.step p { font-size: var(--t-sm); color: var(--text-mute); margin-top: var(--s-2); }


/* ---------------- Zone livrée ----------------
   Utile au client, et utile au référencement local : les
   communes voisines figurent en toutes lettres dans le texte. */
.zones { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.zone {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--t-sm); font-weight: 500;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: .5em 1em;
  background: var(--bg-raise);
}
.zone b { font-weight: 700; }
.zone small { color: var(--text-mute); font-size: var(--t-xs); }
.zone--hq { border-color: var(--c-braise); color: var(--c-braise); }

/* ---------------- Nous trouver ---------------- */
.find { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s-8); }
.find__h { font-size: var(--t-2xl); margin-top: var(--s-3); }
.find__addr {
  font-style: normal; font-size: var(--t-lg);
  line-height: 1.5; margin-top: var(--s-4); color: var(--c-creme);
}
.find__links { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.find__label {
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--c-braise);
}
.hours { margin-top: var(--s-4); display: grid; gap: 0; }
.hours li {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding-block: var(--s-3);
  border-bottom: 1px dashed rgba(255,255,255,.14);
  font-size: var(--t-sm);
}
.hours li:last-child { border-bottom: 0; }
.hours .is-today { color: var(--c-braise); font-weight: 700; }
.hours .is-off { color: var(--text-mute); }
.find__note { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--text-mute); }
@media (max-width: 900px) { .find { grid-template-columns: 1fr; gap: var(--s-6); } }
