/* ==========================================================================
   Option Festive — mobile-first stylesheet
   Breakpoints: 480px, 768px, 1024px (min-width only)
   ========================================================================== */

:root {
  /* Brand palette */
  --vert-profond: #0F4C43;
  --or-mil: #E8A33D;
  --bissap: #A3243B;
  --sable: #EFE7DA;
  --blanc-chaud: #FBF9F5;
  --encre: #1A1A18;

  /* Derived tones — kept AA-compliant on --blanc-chaud */
  --encre-doux: #4F4F49;
  --vert-clair: #1C6A5E;
  --trait: #DCD3C4;

  --police-titre: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --police-texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rayon: 4px;
  --marge-page: 16px;
  --largeur-max: 1180px;
  --hauteur-banniere: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--blanc-chaud);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--vert-profond);
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--or-mil);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--marge-page);
  z-index: 20;
  padding: 10px 16px;
  background-color: var(--or-mil);
  color: var(--encre);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--rayon);
}

.skip-link:focus {
  top: 8px;
}

/* --------------------------------------------------------------------------
   Banner
   -------------------------------------------------------------------------- */

.banner {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--vert-profond);
  border-bottom: 3px solid var(--or-mil);
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--hauteur-banniere);
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 6px var(--marge-page);
}

.banner-title {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--blanc-chaud);
}

.banner-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 2px solid var(--or-mil);
  border-radius: var(--rayon);
  color: var(--or-mil);
  font-weight: 600;
  text-decoration: none;
}

.banner-whatsapp:hover,
.banner-whatsapp:focus-visible {
  background-color: var(--or-mil);
  color: var(--vert-profond);
}

.banner-whatsapp-label {
  display: none;
}

.icon-whatsapp {
  flex: none;
  width: 24px;
  height: 24px;
}

/* --------------------------------------------------------------------------
   Main
   -------------------------------------------------------------------------- */

main {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 var(--marge-page) 48px;
}

.lead {
  max-width: 46ch;
  margin: 24px 0 8px;
  font-size: 1.0625rem;
  color: var(--encre-doux);
}

.etat-chargement,
.etat-erreur {
  margin: 32px 0;
  padding: 16px;
  background-color: var(--sable);
  border-left: 4px solid var(--vert-profond);
  border-radius: var(--rayon);
  color: var(--encre-doux);
}

.etat-erreur {
  border-left-color: var(--bissap);
}

/* --------------------------------------------------------------------------
   Categories
   -------------------------------------------------------------------------- */

.categorie {
  margin-top: 32px;
}

.categorie-titre {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--trait);
  font-family: var(--police-titre);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--vert-profond);
}

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
   Product card
   -------------------------------------------------------------------------- */

.carte {
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  overflow: hidden;
}

.carte-media {
  aspect-ratio: 4 / 3;
  background-color: var(--sable);
}

.carte-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Photo missing or failed to load: keep the sand block, no broken icon */
.carte-media img[hidden] {
  display: none;
}

.carte-corps {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
}

.carte-titre {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--encre);
}

.carte-description {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--encre-doux);
}

/* Pushed to the bottom of the card so prices line up across a row,
   whatever the length of the descriptions above. */
.carte-prix {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 8px;
}

.prix-montant {
  padding: 4px 10px;
  background-color: var(--or-mil);
  border-radius: var(--rayon);
  color: var(--encre);
  font-family: var(--police-titre);
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.prix-montant.prix-sur-demande {
  background-color: var(--sable);
  font-size: 1rem;
  font-weight: 700;
}

.prix-unite {
  font-size: 0.875rem;
  color: var(--encre-doux);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.pied {
  background-color: var(--vert-profond);
  color: var(--blanc-chaud);
  border-top: 3px solid var(--or-mil);
}

.pied-inner {
  display: grid;
  gap: 28px;
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 32px var(--marge-page);
}

.pied-bloc p {
  margin: 0 0 8px;
  font-size: 0.9375rem;
}

.pied-titre {
  margin: 0 0 10px;
  font-family: var(--police-titre);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--or-mil);
}

.pied-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 16px;
  background-color: var(--or-mil);
  border-radius: var(--rayon);
  color: var(--encre);
  font-weight: 600;
  text-decoration: none;
}

.pied-whatsapp:hover,
.pied-whatsapp:focus-visible {
  background-color: var(--blanc-chaud);
}

.pied-mentions {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 var(--marge-page) 28px;
  font-size: 0.8125rem;
  color: var(--sable);
}

/* --------------------------------------------------------------------------
   480px and up
   -------------------------------------------------------------------------- */

@media (min-width: 480px) {
  :root {
    --marge-page: 24px;
  }

  .banner-title {
    font-size: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   768px and up — tablet
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  :root {
    --hauteur-banniere: 64px;
  }

  .banner-whatsapp-label {
    display: inline;
  }

  .banner-whatsapp {
    padding: 0 16px;
  }

  .categorie {
    margin-top: 48px;
  }

  .categorie-titre {
    font-size: 1.75rem;
  }

  .lead {
    margin-top: 32px;
    font-size: 1.125rem;
  }

  .pied-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* --------------------------------------------------------------------------
   1024px and up — desktop
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
  :root {
    --marge-page: 32px;
  }

  .banner-title {
    font-size: 1.75rem;
  }

  .grille {
    gap: 24px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

/* The stylesheet declares no animation and no transition; only the smooth
   scroll of the skip link needs to be neutralised. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
