/* Square Gourmet's, maquette. Le design system de la marque : design.md. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sacramento";
  src: url("fonts/sacramento-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette */
  --nuit: #0D1028;
  --roi: #133A87;
  --creme: #F8E5D2;
  --rose: #E2689A;
  --dragee: #A9CCE3;
  --accent: var(--rose);
  --rose-appuye: color-mix(in srgb, var(--rose) 82%, var(--nuit));
  --halo-1: color-mix(in srgb, var(--rose) 60%, transparent);
  --halo-2: color-mix(in srgb, var(--rose) 35%, transparent);

  /* texte */
  --t-1: 56px;
  --t-2: 32px;
  --t-3: 22px;
  --t-texte: 17px;
  --t-petit: 14px;
  --t-script: 44px;

  /* espacement */
  --e-1: 4px;
  --e-2: 8px;
  --e-3: 12px;
  --e-4: 16px;
  --e-5: 24px;
  --e-6: 32px;
  --e-7: 48px;
  --e-8: 72px;

  /* rayons */
  --r-1: 4px;
  --r-pill: 999px;

  --gouttiere: var(--e-4);
  --bande: var(--e-7);
  --largeur: 1200px;
}
@media (max-width: 479px) {
  :root { --t-1: 44px; }
}
@media (min-width: 768px) {
  :root { --gouttiere: var(--e-6); --bande: var(--e-8); }
}

/* surfaces */
.s-nuit {
  --fond: var(--nuit);
  --encre: var(--creme);
  --encre-douce: color-mix(in srgb, var(--creme) 72%, var(--nuit));
  --encre-eteinte: color-mix(in srgb, var(--creme) 22%, var(--nuit));
}
.s-roi {
  --fond: var(--roi);
  --encre: var(--creme);
  --encre-douce: var(--creme);
}
.s-creme {
  --fond: var(--creme);
  --encre: var(--nuit);
  --encre-douce: color-mix(in srgb, var(--nuit) 75%, var(--creme));
}
.s-nuit, .s-roi, .s-creme {
  background-color: var(--fond);
  color: var(--encre);
}
.s-nuit {
  position: relative;
  isolation: isolate;
}
.s-nuit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("photos/texture.webp") repeat;
  background-size: 512px;
  opacity: 0.5;
  pointer-events: none;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--nuit);
}
body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--t-texte);
  line-height: 1.45;
  font-weight: 400;
  font-stretch: 100%;
  background-color: var(--creme);
  color: var(--nuit);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, figure, table { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
  border-radius: var(--r-1);
}
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.cadre {
  width: 100%;
  max-width: calc(var(--largeur) + 2 * var(--gouttiere));
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

h1 {
  font-size: var(--t-1);
  line-height: 1;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
}
h2 {
  font-size: var(--t-2);
  line-height: 1.1;
  font-weight: 800;
  font-stretch: 112%;
}

.lien {
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
.lien:active { color: var(--encre-douce); }

/* le seul bouton plein */
.bouton {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 14px var(--e-5);
  border-radius: var(--r-pill);
  background-color: var(--rose);
  color: var(--nuit);
  font-size: var(--t-texte);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.bouton:active { background-color: var(--rose-appuye); }
.bouton:focus-visible { outline-color: var(--creme); }

/* ---------- en-tête ---------- */
.entete { z-index: 10; }
.entete-grille {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-4);
  padding-top: var(--e-4);
  padding-bottom: var(--e-3);
}
.logotype {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
  padding-bottom: var(--e-1);
}
.logotype-square {
  font-size: 26px;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  color: var(--creme);
}
.logotype-gourmets {
  font-family: "Sacramento", cursive;
  font-size: var(--t-script);
  font-weight: 400;
  line-height: 0.5;
  color: var(--rose);
  margin-top: 8px;
  margin-left: 22px;
  transform: rotate(-5deg);
  transform-origin: left center;
  text-shadow: 0 0 6px var(--halo-1), 0 0 22px var(--halo-2);
}

.nav { position: relative; }
.nav-bouton {
  font: inherit;
  font-weight: 600;
  color: var(--creme);
  background: none;
  border: 1.5px solid var(--encre-douce);
  border-radius: var(--r-pill);
  min-height: 44px;
  padding: 8px 18px;
  cursor: pointer;
}
.nav-bouton:active { background-color: color-mix(in srgb, var(--creme) 12%, var(--nuit)); }
.nav-liste {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + var(--e-2));
  z-index: 20;
  min-width: 220px;
  padding: var(--e-2) 0;
  background-color: var(--nuit);
  border: 1.5px solid var(--encre-eteinte);
  border-radius: var(--r-1);
}
.nav.est-ouvert .nav-liste { display: block; }
.nav-liste a {
  display: block;
  padding: var(--e-3) var(--e-5);
  color: var(--creme);
  font-weight: 600;
  text-decoration: none;
}
.nav-liste a:active { color: var(--encre-douce); }

@media (min-width: 768px) {
  .nav-bouton { display: none; }
  .nav-liste {
    display: flex;
    position: static;
    gap: var(--e-6);
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
  }
  .nav-liste a { padding: var(--e-2) 0; }
}

/* ---------- premier écran ---------- */
.premier { padding-bottom: var(--bande); }
.hero {
  display: grid;
  grid-template-areas: "texte" "neon" "action" "photo";
  row-gap: var(--e-5);
  padding-top: var(--e-5);
}
.hero-texte { grid-area: texte; }
.hero h1 { max-width: 12ch; }
.hero-intro {
  margin-top: var(--e-4);
  max-width: 34em;
  color: var(--encre-douce);
}
.hero-adresse {
  margin-top: var(--e-2);
  font-weight: 600;
}
.hero-action { grid-area: action; }
.hero-photo {
  grid-area: photo;
  width: 100%;
  border-radius: var(--r-1);
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas:
      "texte photo"
      "action photo"
      "neon neon";
    column-gap: var(--e-7);
    row-gap: var(--e-6);
    padding-top: var(--e-7);
    align-items: start;
  }
  .hero-texte { align-self: end; }
  .hero-photo { align-self: center; }
  .neon { margin-top: var(--e-4); }
}

/* ---------- la signature, le néon des horaires ---------- */
.neon { grid-area: neon; }
.neon-etat { min-height: 32px; margin-bottom: var(--e-2); }
.neon-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  padding: 5px 14px 5px 12px;
  border: 1.5px solid currentColor;
  border-radius: var(--r-pill);
  font-size: var(--t-petit);
  line-height: 1.4;
  font-weight: 600;
  color: var(--encre-douce);
}
.neon-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}
.neon.est-ouvert .neon-badge { color: var(--rose); }
.neon.est-ouvert .neon-badge::before { box-shadow: 0 0 6px var(--halo-1), 0 0 22px var(--halo-2); }

.neon-piste {
  position: relative;
  height: 64px;
  margin-inline: 2px;
}
.np-ligne, .np-allume, .np-passe {
  position: absolute;
  top: 28px;
  height: 2px;
  border-radius: 1px;
}
.np-ligne { left: 0; right: 0; background-color: var(--encre-eteinte); }
.np-passe { background-color: var(--encre-eteinte); }
.np-allume {
  background-color: var(--rose);
  box-shadow: 0 0 6px var(--halo-1), 0 0 22px var(--halo-2);
}
.np-heure {
  position: absolute;
  top: 25px;
  width: 1px;
  height: 8px;
  background-color: var(--encre-eteinte);
}
.np-repere {
  position: absolute;
  top: 21px;
  width: 2px;
  height: 16px;
  margin-left: -1px;
  background-color: var(--encre-douce);
}
.np-mot, .np-borne, .np-temps {
  position: absolute;
  font-size: var(--t-petit);
  line-height: 1.4;
  white-space: nowrap;
  color: var(--encre-douce);
}
.np-mot { top: 20px; left: 50%; transform: translateX(-50%); }
.np-borne { top: 40px; font-weight: 600; color: var(--encre); }
.np-debut { left: 0; }
.np-fin { right: 0; }
.np-point {
  position: absolute;
  top: 23px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background-color: var(--creme);
}
.np-temps { top: -2px; transform: translateX(-50%); font-weight: 600; color: var(--encre); }
.np-temps.a-gauche { transform: none; }
.np-temps.a-droite { transform: translateX(-100%); }
.neon.est-ferme .np-allume { display: none; }
.neon-texte { margin-top: var(--e-2); }

/* ---------- en rayon ---------- */
.rayon { padding-block: var(--bande); }
.rayon-tete {
  display: grid;
  gap: var(--e-4);
  margin-bottom: var(--e-6);
}
.rayon-intro { max-width: 36em; color: var(--encre-douce); }
@media (min-width: 1024px) {
  .rayon-tete {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: end;
    column-gap: var(--e-7);
    margin-bottom: var(--e-7);
  }
}
.produits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-5) var(--e-3);
}
.produits img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-1);
}
.produit-nom {
  margin-top: var(--e-3);
  font-size: var(--t-3);
  line-height: 1.25;
  font-weight: 700;
}
@media (max-width: 479px) {
  .produit-nom { font-size: 19px; }
}
@media (min-width: 768px) {
  .produits { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-6) var(--e-5); }
}

.rayon-pied {
  display: grid;
  gap: var(--e-5);
  margin-top: var(--e-7);
  padding-top: var(--e-5);
  border-top: 2px solid var(--nuit);
}
.petits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-3);
}
.petits li { max-width: 180px; }
.petits img { width: 100%; max-width: 180px; border-radius: var(--r-1); }
.petits p { margin-top: var(--e-2); font-weight: 600; line-height: 1.4; }
.rayon-aussi { max-width: 40em; }
.rayon-aussi strong { font-weight: 700; }
@media (min-width: 1024px) {
  .rayon-pied {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--e-7);
    align-items: start;
  }
  .petits { grid-template-columns: repeat(2, 180px); gap: var(--e-5); }
  .rayon-aussi { padding-top: var(--e-1); }
}

/* ---------- livraison le soir ---------- */
.soir { padding-block: var(--bande); }
.soir-grille {
  display: grid;
  gap: var(--e-6);
}
.soir-heure {
  margin-top: var(--e-4);
  font-size: var(--t-3);
  line-height: 1.25;
  font-weight: 700;
}
.script {
  margin-top: var(--e-1);
  font-family: "Sacramento", cursive;
  font-size: var(--t-script);
  line-height: 1;
  color: var(--creme);
}
.soir-photo { width: 100%; border-radius: var(--r-1); }
@media (min-width: 1024px) {
  .soir-grille {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--e-7);
    align-items: center;
  }
}

.soir-formule {
  margin-top: var(--e-6);
  max-width: 30em;
}
.soir-formule p + p { margin-top: var(--e-3); }
.soir-offerte { font-weight: 700; }
.soir-formule .lien { font-weight: 600; }
.soir .lien:active { text-decoration-thickness: 3px; }

/* ---------- venir ---------- */
.venir { padding-bottom: var(--bande); }
.auvent {
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--rose) 0 24px, var(--dragee) 24px 48px);
}
.venir-grille {
  display: grid;
  grid-template-areas: "titre" "photo" "infos" "blason";
  gap: var(--e-5);
  padding-top: var(--bande);
}
.venir-titre { grid-area: titre; }
.venir-photo { grid-area: photo; width: 100%; border-radius: var(--r-1); }
.venir-infos { grid-area: infos; }
.venir-adresse {
  font-size: var(--t-3);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: var(--e-3);
}
.jours {
  margin-top: var(--e-5);
  border-collapse: collapse;
  width: 100%;
  max-width: 22em;
}
.jours th, .jours td {
  padding: var(--e-1) 0;
  text-align: left;
  vertical-align: top;
}
.jours th { font-weight: 400; color: var(--encre-douce); padding-right: var(--e-5); }
.jours td { font-variant-numeric: tabular-nums; }
.jours td span { display: block; }
.jours tr.est-aujourdhui th, .jours tr.est-aujourdhui td { color: var(--rose); font-weight: 600; }
.reseaux { margin-top: var(--e-5); display: grid; gap: var(--e-1); color: var(--encre-douce); }
.reseaux a { color: var(--encre); font-weight: 600; }
.venir-blason {
  grid-area: blason;
  justify-self: center;
  width: 240px;
  margin-top: var(--e-5);
  /* le blason a son propre vignettage : on efface le carré pour que ses bords disparaissent dans la nuit */
  -webkit-mask-image: radial-gradient(closest-side, var(--nuit) 80%, transparent 100%);
  mask-image: radial-gradient(closest-side, var(--nuit) 80%, transparent 100%);
}
@media (min-width: 1024px) {
  .venir-grille {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "photo titre"
      "photo infos"
      "blason infos";
    grid-template-rows: auto auto 1fr;
    column-gap: var(--e-7);
    row-gap: var(--e-5);
    align-items: start;
  }
  .venir-blason { margin-top: var(--e-5); }
}

/* ---------- pied ---------- */
.pied { padding-block: var(--e-7); }
.pied-grille {
  display: grid;
  gap: var(--e-4);
}
.pied-nom { font-size: var(--t-3); font-weight: 800; font-stretch: 112%; line-height: 1.25; }
.pied-reseaux { display: flex; flex-wrap: wrap; gap: var(--e-5); }
.pied a { text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.pied a:active { color: var(--encre-douce); }
.pied-legal { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); font-size: var(--t-petit); color: var(--encre-douce); }
@media (min-width: 1024px) {
  .pied-grille { grid-template-columns: auto 1fr auto; align-items: center; column-gap: var(--e-6); }
}

/* ---------- le bouton épinglé, téléphone seulement ---------- */
.bouton-epingle {
  position: fixed;
  left: 50%;
  bottom: var(--e-4);
  z-index: 30;
  transform: translate(-50%, 0);
  box-shadow: 0 0 0 3px var(--nuit);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease-out, visibility 0s linear 160ms;
}
.bouton-epingle.est-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease-out, visibility 0s;
}
@media (max-width: 767px) {
  body { padding-bottom: 80px; }
}
@media (min-width: 768px) {
  .bouton-epingle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton-epingle, .bouton-epingle.est-visible { transition: none; }
}
.logotype-gourmets .apos { margin-inline: -0.02em -0.05em; position: relative; top: 0.08em; }
