/* ==========================================================================
   Les Joyeuses Graines — feuille de style principale
   Direction : sérigraphie sur sachet de semences.
   Encre brun chocolat (couleur exacte du logo), papier ivoire,
   trois encres d'appoint. Aucune dépendance externe.
   ========================================================================== */

/* --- Polices auto-hébergées (SIL Open Font License) ---------------------- */

@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/baloo2-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/baloo2-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/karla-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/karla-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/karla-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Jetons -------------------------------------------------------------- */

:root {
  /* Encres */
  --encre: #2b1406;          /* couleur relevée sur le logo */
  --encre-douce: #6b4a32;
  --encre-pale: #9c7c62;
  --vert: #3f7a2e;
  --vert-fonce: #2c5620;
  --coquelicot: #c4432b;
  --coquelicot-fonce: #9c3120;
  --pollen: #e3a02c;
  --bleuet: #3b5d96;

  /* Papiers */
  --papier: #f6eedd;
  --papier-clair: #fdf9f0;
  --papier-ombre: #ebdfc7;
  --papier-trait: #d8c8aa;

  /* Rythme */
  --pas: 8px;
  --largeur: 1180px;
  --largeur-texte: 68ch;
  --rayon: 14px;
  --rayon-petit: 8px;

  --ombre-papier: 0 2px 0 var(--papier-ombre), 0 10px 24px -14px rgba(43, 20, 6, 0.5);
  --ombre-levee: 0 4px 0 var(--papier-ombre), 0 22px 34px -18px rgba(43, 20, 6, 0.55);

  --transition: 180ms cubic-bezier(0.2, 0.7, 0.4, 1);
}

/* --- Réinitialisation ---------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--papier);
  color: var(--encre);
  font-family: 'Karla', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Fibre du papier : texture scannée, répétée, très discrète. */
body {
  background-image: url('../img/texture-papier.webp');
  background-size: 700px;
  background-blend-mode: multiply;
}

/* Grain d'impression par-dessus : très léger, uniquement décoratif. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.22'/%3E%3C/svg%3E");
}

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

a {
  color: var(--vert-fonce);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coquelicot-fonce);
}

:focus-visible {
  outline: 3px solid var(--pollen);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Typographie --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

.plomb {
  font-size: 1.2rem;
  color: var(--encre-douce);
  max-width: var(--largeur-texte);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vert-fonce);
  margin: 0 0 0.7em;
  display: block;
}

.mono {
  font-family: 'Consolas', 'SFMono-Regular', ui-monospace, monospace;
  font-size: 0.94em;
  letter-spacing: 0.02em;
}

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

/* --- Structure ----------------------------------------------------------- */

.contenu {
  flex: 1 0 auto;
  position: relative;
  z-index: 2;
}

.enveloppe {
  width: min(100% - 2.5rem, var(--largeur));
  margin-inline: auto;
}

.enveloppe--etroite {
  width: min(100% - 2.5rem, 780px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--serree {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section--encre {
  background-color: var(--encre);
  color: var(--papier);
}

.section--encre h2,
.section--encre h3 {
  color: var(--papier-clair);
}

.section--encre .eyebrow {
  color: var(--pollen);
}

.section--encre a {
  color: var(--pollen);
}

.section--pale {
  background-color: var(--papier-clair);
}

/* Dentelure : le bord découpé d'un sachet de graines.
   Sert de transition entre deux sections. */
.dentelure {
  height: 18px;
  position: relative;
  z-index: 2;
  --dent: 26px;
  -webkit-mask-image: radial-gradient(circle 11px at 50% 0, transparent 98%, #000 100%);
  mask-image: radial-gradient(circle 11px at 50% 0, transparent 98%, #000 100%);
  -webkit-mask-size: var(--dent) 100%;
  mask-size: var(--dent) 100%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}

.dentelure--encre { background-color: var(--encre); }
.dentelure--pale { background-color: var(--papier-clair); }
.dentelure--papier { background-color: var(--papier); }

/* --- Ornements gravés ----------------------------------------------------
   Dessins au trait détourés, dans l'esprit du logo. Employés avec parcimonie :
   un séparateur entre deux sections, des coins sur les blocs importants,
   une vrille en marge. Tous sont décoratifs et masqués aux lecteurs d'écran. */

.ornement {
  display: block;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
}

.ornement--separateur {
  width: min(320px, 62%);
  opacity: 0.8;
  margin-block: 0.4rem 2rem;
}

.ornement--separateur-bas {
  margin-block: 2.5rem 0;
  transform: rotate(180deg);
}

/* Coins gravés sur les blocs de contenu mis en avant. */
.encadre {
  position: relative;
}

.encadre::before,
.encadre::after {
  content: '';
  position: absolute;
  width: 86px;
  height: 76px;
  background-image: url('../img/deco/coin.webp');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

.encadre::before {
  top: -14px;
  left: -14px;
}

.encadre::after {
  bottom: -14px;
  right: -14px;
  transform: rotate(180deg);
}

/* Vrille grimpante, en marge des sections larges. */
.vrille {
  position: absolute;
  width: 78px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.vrille--gauche {
  left: -1rem;
  top: 12%;
}

.vrille--droite {
  right: -1rem;
  bottom: 8%;
  transform: scaleX(-1);
}

.section--encre .vrille {
  filter: invert(1) sepia(0.4) saturate(0.6) brightness(1.3);
  opacity: 0.3;
}

/* Cadre botanique complet, réservé aux mises en avant fortes. */
.cadre-grave {
  position: relative;
  padding: clamp(2.2rem, 6vw, 3.4rem);
  display: grid;
  place-items: center;
  text-align: center;
}

.cadre-grave::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/deco/cadre-botanique.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.75;
  pointer-events: none;
}

.section--encre .cadre-grave::before {
  filter: invert(1) sepia(0.35) saturate(0.7) brightness(1.25);
  opacity: 0.55;
}

@media (max-width: 900px) {
  .vrille {
    display: none;
  }

  .encadre::before,
  .encadre::after {
    width: 56px;
    height: 50px;
  }
}

/* --- Cachet encreur : l'élément signature -------------------------------- */

.cachet {
  display: inline-grid;
  place-items: center;
  text-align: center;
  border: 3px solid currentColor;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coquelicot);
  opacity: 0.9;
  transform: rotate(-11deg);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.cachet--vert { color: var(--vert-fonce); }
.cachet--pollen { color: var(--pollen); }

.cachet-logo {
  width: clamp(96px, 13vw, 148px);
  transform: rotate(-9deg);
  opacity: 0.92;
  mix-blend-mode: multiply;
}

/* --- En-tête ------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--papier);
  border-bottom: 2px solid var(--encre);
}

.entete__interieur {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.55rem;
}

.entete__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--encre);
  flex: 0 0 auto;
}

.entete__logo img {
  height: 54px;
  width: auto;
}

.entete__nom {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  max-width: 8ch;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav__lien {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--rayon-petit);
  text-decoration: none;
  color: var(--encre);
  font-weight: 700;
  font-size: 0.98rem;
  transition: background-color var(--transition), color var(--transition);
}

.nav__lien:hover {
  background-color: var(--papier-ombre);
  color: var(--encre);
}

.nav__lien[aria-current='page'] {
  background-color: var(--encre);
  color: var(--papier);
}

.nav__panier {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background-color: var(--vert-fonce);
  color: var(--papier-clair);
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--transition);
}

.nav__panier:hover {
  background-color: var(--encre);
  color: var(--papier-clair);
}

.nav__compteur {
  background-color: var(--pollen);
  color: var(--encre);
  border-radius: 999px;
  min-width: 1.55em;
  padding: 0 0.35em;
  text-align: center;
  font-size: 0.85rem;
}

.menu-bouton {
  display: none;
  margin-left: auto;
  background: none;
  border: 2px solid var(--encre);
  border-radius: var(--rayon-petit);
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--encre);
}

/* --- Boutons ------------------------------------------------------------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border: 2px solid var(--encre);
  border-radius: 999px;
  background-color: var(--vert-fonce);
  color: var(--papier-clair);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--encre);
  transition: transform var(--transition), box-shadow var(--transition),
    background-color var(--transition);
}

.bouton:hover {
  color: var(--papier-clair);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--encre);
}

.bouton:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--encre);
}

.bouton--secondaire {
  background-color: var(--papier-clair);
  color: var(--encre);
}

.bouton--secondaire:hover {
  background-color: var(--pollen);
  color: var(--encre);
}

.bouton--danger {
  background-color: var(--coquelicot-fonce);
}

.bouton--petit {
  padding: 0.4rem 0.9rem;
  font-size: 0.92rem;
  box-shadow: 0 2px 0 var(--encre);
}

.bouton[disabled],
.bouton[aria-disabled='true'] {
  background-color: var(--papier-ombre);
  color: var(--encre-pale);
  border-color: var(--encre-pale);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.lien-fleche {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  background-color: var(--encre);
  color: var(--papier);
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(0.85);
}

.hero__interieur {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 10vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}

/* Largeur en rem et non en ch : l'unité ch se calcule sur la taille du
   texte courant, ce qui étranglerait le grand titre. */
.hero__texte {
  max-width: 40rem;
}

.hero h1 {
  max-width: 15em;
}

.hero h1 {
  color: var(--papier-clair);
  text-shadow: 0 2px 0 rgba(43, 20, 6, 0.6);
}

.hero__accroche {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: #f0e4cd;
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero__actions .bouton {
  border-color: var(--papier-clair);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

/* --- Grilles ------------------------------------------------------------- */

.grille {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}

.grille--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grille--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Les cinq familles de végétaux tiennent sur une seule ligne en grand écran. */
.grille--categories {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 1.2rem;
}

.entete-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.entete-section p {
  margin: 0;
  max-width: 52ch;
  color: var(--encre-douce);
}

/* --- Carte produit ------------------------------------------------------- */

.produit {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--papier-clair);
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre-papier);
  transition: transform var(--transition), box-shadow var(--transition);
}

.produit:hover {
  transform: translateY(-4px);
  box-shadow: var(--ombre-levee);
}

.produit__lien {
  position: absolute;
  inset: 0;
  z-index: 3;
  text-indent: -999em;
  overflow: hidden;
}

.produit__visuel {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--papier-ombre);
  border-bottom: 2px solid var(--encre);
}

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

.produit__etiquette {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  background-color: var(--papier-clair);
  border: 2px solid var(--encre);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.produit__epuise {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background-color: rgba(246, 238, 221, 0.55);
}

.produit__corps {
  padding: 1.05rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.produit__nom {
  font-size: 1.22rem;
  margin: 0;
}

.produit__resume {
  margin: 0;
  color: var(--encre-douce);
  font-size: 0.96rem;
  flex: 1;
}

.produit__pied {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.3rem;
  padding-top: 0.7rem;
  border-top: 1.5px dashed var(--papier-trait);
}

.prix {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--coquelicot-fonce);
  line-height: 1;
}

.prix__unite {
  font-family: 'Karla', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--encre-douce);
}

.stock {
  font-size: 0.86rem;
  font-weight: 700;
}

.stock--ok { color: var(--vert-fonce); }
.stock--bas { color: var(--coquelicot-fonce); }
.stock--vide { color: var(--encre-pale); }

/* --- Carte catégorie ----------------------------------------------------- */

.categorie {
  position: relative;
  display: block;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  overflow: hidden;
  text-decoration: none;
  color: var(--papier-clair);
  background-color: var(--encre);
  box-shadow: var(--ombre-papier);
  min-height: 190px;
  transition: transform var(--transition);
}

.categorie:hover {
  transform: translateY(-4px);
  color: var(--papier-clair);
}

.categorie img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: opacity var(--transition), transform 400ms ease;
}

.categorie:hover img {
  opacity: 0.75;
  transform: scale(1.04);
}

.categorie__texte {
  position: relative;
  z-index: 2;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  background: linear-gradient(to top, rgba(43, 20, 6, 0.88), rgba(43, 20, 6, 0.05) 70%);
}

.categorie__texte h3 {
  margin: 0 0 0.2rem;
  color: var(--papier-clair);
}

.categorie__compte {
  font-size: 0.88rem;
  color: #e9d9bb;
}

/* --- Blocs de contenu ---------------------------------------------------- */

.carte {
  background-color: var(--papier-clair);
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--ombre-papier);
}

.carte--plate {
  box-shadow: none;
  border-width: 1.5px;
  border-color: var(--papier-trait);
}

.pilier {
  padding-top: 1.2rem;
  border-top: 3px solid var(--encre);
}

.pilier h3 {
  margin-bottom: 0.35rem;
}

.pilier p {
  color: var(--encre-douce);
  margin: 0;
}

.pilier__numero {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--coquelicot);
  letter-spacing: 0.1em;
}

.prose {
  max-width: var(--largeur-texte);
}

.prose h2 {
  margin-top: 2.2rem;
}

.prose ul {
  padding-left: 1.1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.liste-nue {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Messages ------------------------------------------------------------ */

.message {
  border: 2px solid var(--encre);
  border-left-width: 8px;
  border-radius: var(--rayon-petit);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  background-color: var(--papier-clair);
  font-weight: 500;
}

.message--succes { border-left-color: var(--vert); }
.message--erreur { border-left-color: var(--coquelicot); }
.message--avertissement { border-left-color: var(--pollen); }
.message--info { border-left-color: var(--bleuet); }

/* --- Formulaires --------------------------------------------------------- */

.champ {
  margin-bottom: 1.1rem;
}

.champ > label,
.champ-legende {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 0.96rem;
}

.champ__aide {
  display: block;
  font-size: 0.85rem;
  color: var(--encre-douce);
  margin-top: 0.25rem;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='url'],
input[type='password'],
input[type='number'],
input[type='search'],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--encre);
  background-color: var(--papier-clair);
  border: 2px solid var(--encre);
  border-radius: var(--rayon-petit);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:disabled,
select:disabled,
textarea:disabled {
  background-color: var(--papier-ombre);
  color: var(--encre-pale);
}

fieldset {
  border: 2px solid var(--papier-trait);
  border-radius: var(--rayon-petit);
  padding: 1rem 1.1rem;
  margin: 0 0 1.1rem;
}

legend {
  font-weight: 700;
  padding-inline: 0.4rem;
}

.choix {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1.5px dashed var(--papier-trait);
}

.choix:last-child {
  border-bottom: 0;
}

.choix input {
  margin-top: 0.35rem;
  accent-color: var(--vert-fonce);
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.champs-2 {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pot-de-miel {
  position: absolute;
  left: -9999px;
}

/* Sélecteur de quantité */
.quantite {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--encre);
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--papier-clair);
}

.quantite button {
  border: 0;
  background: none;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  width: 2.4rem;
  cursor: pointer;
  color: var(--encre);
}

.quantite button:hover {
  background-color: var(--pollen);
}

.quantite input {
  width: 3.2rem;
  border: 0;
  border-inline: 2px solid var(--encre);
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  padding: 0.5rem 0.2rem;
  -moz-appearance: textfield;
}

.quantite input::-webkit-outer-spin-button,
.quantite input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- Filtres de la boutique ---------------------------------------------- */

.filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  background-color: var(--papier-clair);
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  margin-bottom: 2rem;
}

.filtres__groupe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.puce {
  display: inline-block;
  padding: 0.32rem 0.85rem;
  border: 2px solid var(--encre);
  border-radius: 999px;
  text-decoration: none;
  color: var(--encre);
  font-weight: 700;
  font-size: 0.9rem;
  background-color: var(--papier);
  transition: background-color var(--transition), color var(--transition);
}

.puce:hover {
  background-color: var(--pollen);
  color: var(--encre);
}

.puce[aria-current='true'] {
  background-color: var(--encre);
  color: var(--papier-clair);
}

.recherche {
  display: flex;
  gap: 0.4rem;
}

.recherche input {
  min-width: 190px;
}

/* --- Fiche produit ------------------------------------------------------- */

/* Deux colonnes asymétriques. Les pages ajustent le rapport via les
   variables --colonne-1 / --colonne-2, jamais via grid-template-columns :
   un style en ligne sur la propriété elle-même empêcherait le passage
   sur une seule colonne en mobile. */
.fiche {
  --colonne-1: 1.05fr;
  --colonne-2: 1fr;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, var(--colonne-1)) minmax(0, var(--colonne-2));
  align-items: start;
}

.galerie__principale {
  position: relative;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  overflow: hidden;
  background-color: var(--papier-ombre);
  box-shadow: var(--ombre-papier);
}

.galerie__principale img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.galerie__vignettes {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.galerie__vignette {
  width: 78px;
  height: 62px;
  padding: 0;
  border: 2px solid var(--papier-trait);
  border-radius: var(--rayon-petit);
  overflow: hidden;
  background: none;
  cursor: pointer;
}

.galerie__vignette[aria-current='true'] {
  border-color: var(--encre);
}

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

.fiche__achat {
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  padding: 1.2rem 1.3rem;
  background-color: var(--papier-clair);
  box-shadow: var(--ombre-papier);
  margin: 1.4rem 0;
}

.fiche__achat form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.fiche__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.92rem;
  color: var(--encre-douce);
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}

.fiche__meta strong {
  color: var(--encre);
}

.fil-ariane {
  font-size: 0.88rem;
  color: var(--encre-douce);
  padding-block: 1.2rem 0;
}

.fil-ariane a {
  color: var(--encre-douce);
}

/* --- Panier -------------------------------------------------------------- */

.tableau {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--papier-clair);
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  overflow: hidden;
}

.tableau th,
.tableau td {
  padding: 0.8rem 0.9rem;
  text-align: left;
  border-bottom: 1.5px dashed var(--papier-trait);
  vertical-align: middle;
}

.tableau thead th {
  background-color: var(--encre);
  color: var(--papier-clair);
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  border-bottom: 0;
}

.tableau tbody tr:last-child td {
  border-bottom: 0;
}

.tableau--compact th,
.tableau--compact td {
  padding: 0.55rem 0.7rem;
  font-size: 0.94rem;
}

.aligne-droite { text-align: right; }

.panier-ligne__produit {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.panier-ligne__produit img {
  width: 66px;
  height: 52px;
  object-fit: cover;
  border: 2px solid var(--encre);
  border-radius: var(--rayon-petit);
  flex: 0 0 auto;
}

.panier-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.3rem;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
}

.recap {
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background-color: var(--papier-clair);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--ombre-papier);
}

.recap dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
}

.recap dt { color: var(--encre-douce); }
.recap dd { margin: 0; text-align: right; font-weight: 700; }

/* Liste de définitions en deux colonnes (fiche association, fiche client) */
.recap-infos {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .45rem 1rem;
  font-size: .95rem;
}

.recap-infos dt {
  color: var(--encre-douce);
  font-weight: 700;
}

.recap-infos dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .recap-infos {
    grid-template-columns: 1fr;
    gap: .15rem;
  }

  .recap-infos dd {
    margin-bottom: .5rem;
  }
}

.etapes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--encre-pale);
}

.etapes li[aria-current='step'] {
  color: var(--encre);
}

.etapes li[aria-current='step']::before,
.etapes li::before {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background-color: currentColor;
  margin-right: 0.45rem;
  vertical-align: 0.1em;
}

/* --- Pied de page -------------------------------------------------------- */

.pied {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  background-color: var(--encre);
  color: #e0cfb2;
  padding-block: 3rem 1.5rem;
}

.pied a {
  color: var(--papier-clair);
  text-decoration: none;
}

.pied a:hover {
  color: var(--pollen);
  text-decoration: underline;
}

.pied__grille {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.pied h4 {
  font-family: 'Baloo 2', sans-serif;
  color: var(--papier-clair);
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.pied__logo {
  width: 120px;
  filter: invert(1) sepia(0.25) saturate(0.5) brightness(1.15);
  margin-bottom: 0.8rem;
}

.pied ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.pied__bas {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1.5px solid rgba(224, 207, 178, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: space-between;
  font-size: 0.87rem;
}

/* --- Divers -------------------------------------------------------------- */

.vide {
  text-align: center;
  padding: 3rem 1rem;
  border: 2px dashed var(--papier-trait);
  border-radius: var(--rayon);
  color: var(--encre-douce);
}

.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}

.badge--nouvelle { color: var(--bleuet); }
.badge--paiement_envoye { color: var(--pollen); }
.badge--payee { color: var(--vert-fonce); }
.badge--prete { color: var(--vert-fonce); }
.badge--retiree { color: var(--encre-pale); }
.badge--annulee { color: var(--coquelicot-fonce); }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .fiche {
    grid-template-columns: 1fr;
  }

  .hero__interieur {
    grid-template-columns: 1fr;
  }

  .hero .cachet-logo {
    display: none;
  }
}

@media (max-width: 760px) {
  .menu-bouton {
    display: block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding-bottom: 0.8rem;
  }

  .nav.est-ouvert {
    display: flex;
  }

  .entete__interieur {
    flex-wrap: wrap;
  }

  .nav__panier {
    justify-content: center;
  }

  .tableau,
  .tableau thead,
  .tableau tbody,
  .tableau tr,
  .tableau td {
    display: block;
    width: 100%;
  }

  .tableau thead {
    display: none;
  }

  .tableau tr {
    border-bottom: 2px solid var(--encre);
  }

  .tableau tr:last-child {
    border-bottom: 0;
  }

  .tableau td {
    border-bottom: 0;
    padding-block: 0.35rem;
  }

  .tableau td[data-libelle]::before {
    content: attr(data-libelle) ' : ';
    font-weight: 700;
  }

  .tableau td.aligne-droite {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .entete,
  .pied,
  .bouton,
  body::before {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
