/* =========================================================
   MADRAS — feuille de style
   Pour changer les couleurs du site, modifie seulement
   les valeurs dans :root ci-dessous.
   ========================================================= */

@font-face { font-family: "Bowlby One"; src: url("../fonts/bowlby-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Palette */
  --fond-sombre: #1F3A2C;      /* vert foncé : en-tête, accueil, pied de page */
  --creme: #F5EBDD;            /* texte sur fond sombre, fonds doux */
  --creme-attenue: #D3C9BC;    /* texte secondaire sur fond sombre */
  --brique: #A94F44;           /* boutons, icônes, ombre des titres sur fond sombre */
  --brique-clair: #EE9A7C;     /* lien actif du menu, accents sur fond sombre */
  --ombre-titre: #EBC0B1;      /* ombre des titres sur fond blanc */
  --ombre-titre-doux: #E2AE9C; /* ombre des titres sur fond crème */
  --texte: #1F1D1B;
  --texte-secondaire: #5E5750;
  --blanc: #FFFFFF;

  --titre: "Bowlby One", "Arial Black", sans-serif;
  --corps: "Work Sans", system-ui, sans-serif;
  --largeur: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--corps); color: var(--texte); background: var(--blanc); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
body.menu-ouvert { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 24px; }

/* ---------- Titres (avec ombre décalée façon étiquettes) ---------- */
h1, h2, h3 { font-family: var(--titre); font-weight: 400; margin: 0; line-height: 1.08; }
h2 { font-size: clamp(34px, 5vw, 48px); text-shadow: 3px 3px 0 var(--ombre-titre); }
h3 { font-size: 22px; text-shadow: 2px 2px 0 var(--ombre-titre); }
.section-titre { text-align: center; }
.section-titre p { max-width: 620px; margin: 14px auto 0; font-size: 18px; color: var(--texte-secondaire); }

/* ---------- En-tête : pilule verte translucide qui flotte en haut ---------- */
.entete { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.entete .conteneur { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 8px 24px; max-width: none; margin: 0; padding: 7px 7px 7px 22px; border-radius: 100px; }
/* le fond « verre dépoli » est sur une couche à part, pour ne pas gêner le menu plein écran du téléphone */
.entete .conteneur::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(31, 58, 44, .8); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); border: 1px solid rgba(245, 235, 221, .16); box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .08); }
.entete .logo { position: relative; z-index: 3; display: block; }
.entete .logo img { height: 22px; width: auto; }
.menu { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.menu a { display: block; font-family: var(--titre); font-size: 15px; color: var(--creme); text-decoration: none; padding: 10px 16px; border-radius: 100px; transition: background-color .25s, color .25s; }
.menu a:hover { background: rgba(245, 235, 221, .1); }
.menu a.actif { background: rgba(245, 235, 221, .18); }

/* ---------- Menu burger (téléphone et petite tablette) : carte qui se déplie sous la pilule ---------- */
.burger { display: none; position: relative; z-index: 3; width: 44px; height: 44px; background: none; border: 0; padding: 11px; border-radius: 50%; }
.burger span { display: block; height: 3px; border-radius: 3px; background: var(--creme); transition: transform .3s ease, opacity .2s; }
.burger span + span { margin-top: 5px; }
.menu-ouvert .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-ouvert .burger span:nth-child(2) { opacity: 0; }
.menu-ouvert .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.menu-reseaux { display: none; }

@media (max-width: 960px) {
  .entete { top: 10px; }
  .entete .conteneur { width: 100%; justify-content: space-between; padding: 5px 5px 5px 18px; }
  .entete .logo img { height: 20px; }
  .burger { display: block; }
  /* voile flou sur la page quand le menu est ouvert (un toucher dessus referme le menu) */
  .entete::before { content: ""; position: fixed; inset: 0; z-index: -2; background: rgba(12, 22, 17, .42); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .menu-ouvert .entete::before { opacity: 1; visibility: visible; pointer-events: auto; }
  /* la carte du menu */
  .navigation { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 2; padding: 8px; border-radius: 28px; background: rgba(31, 58, 44, .92); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(245, 235, 221, .16); box-shadow: 0 24px 50px rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.97); transform-origin: top right; transition: opacity .25s ease, transform .35s cubic-bezier(.2, .8, .2, 1), visibility .35s; }
  .menu-ouvert .navigation { opacity: 1; visibility: visible; transform: none; }
  .navigation .menu { flex-direction: column; flex-wrap: nowrap; gap: 2px; counter-reset: rubrique; }
  .navigation .menu li { counter-increment: rubrique; opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease; }
  .navigation .menu li + li { border-top: 1px solid rgba(245, 235, 221, .09); }
  .navigation .menu a { display: flex; align-items: center; gap: 14px; padding: 15px 14px; border-radius: 18px; font-size: 19px; line-height: 1.15; background: none; }
  .navigation .menu a::before { content: counter(rubrique, decimal-leading-zero); font-family: var(--corps); font-weight: 700; font-size: 12px; letter-spacing: .06em; color: var(--brique-clair); min-width: 20px; }
  .navigation .menu a::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); opacity: .45; transition: transform .25s ease, opacity .25s; }
  .navigation .menu a:active, .navigation .menu a:hover { background: rgba(245, 235, 221, .08); }
  .navigation .menu a.actif { background: rgba(245, 235, 221, .12); color: var(--creme); }
  .navigation .menu a.actif::after { opacity: 1; color: var(--brique-clair); transform: translateX(3px) rotate(45deg); }
  .menu-ouvert .navigation .menu li { opacity: 1; transform: none; }
  .menu-ouvert .navigation .menu li:nth-child(2) { transition-delay: .04s; }
  .menu-ouvert .navigation .menu li:nth-child(3) { transition-delay: .08s; }
  .menu-ouvert .navigation .menu li:nth-child(4) { transition-delay: .12s; }
  .menu-ouvert .navigation .menu li:nth-child(5) { transition-delay: .16s; }
  .menu-reseaux { display: flex; margin: 8px 4px 4px; }
  .menu-reseaux a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 100px; background: var(--brique-clair); color: var(--fond-sombre); font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); transition: filter .2s, transform .2s; }
  .menu-reseaux a:active, .menu-reseaux a:hover { filter: brightness(1.06); transform: translateY(-1px); }
  .menu-reseaux svg { width: 22px; height: 22px; }
}

/* ---------- Accueil : lettres en relief + formes en profondeur ---------- */
.accueil { position: relative; overflow: hidden; background: var(--fond-sombre); color: var(--creme); text-align: center; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; }
.accueil .conteneur { max-width: 1000px; padding-top: 120px; padding-bottom: 160px; position: relative; z-index: 5; }
.accueil .couche { position: absolute; z-index: 1; pointer-events: none; will-change: transform; }
.accueil .couche svg { display: block; width: 100%; height: auto; }
.accueil .couche.ombre svg { filter: drop-shadow(0 14px 22px rgba(5, 15, 10, .35)); }
.accueil .couche.premier-plan { z-index: 6; filter: blur(2px); }
.surtitre { margin: 0 0 18px; font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--brique-clair); }
.accueil h1 { margin: 0; }
.accueil-pre { display: block; font-size: clamp(24px, 4vw, 38px); color: var(--brique-clair); text-shadow: 3px 3px 0 #16291F; }
.relief { display: flex; justify-content: center; margin-top: 4px; font-size: clamp(64px, 17vw, 210px); line-height: .95; color: var(--creme); }
.relief .interrogation { margin-left: .14em; }
.relief span { display: inline-block; transform: translateY(var(--y)) rotate(var(--r)); text-shadow: var(--extrusion, 1px 1px 0 #A94F44, 2px 2px 0 #A94F44, 3px 3px 0 #A94F44, 4px 4px 0 #A94F44, 5px 5px 0 #A94F44, 6px 6px 0 #A94F44, 7px 7px 0 #A94F44, 8px 8px 0 #7A3530, 9px 9px 0 #7A3530, 14px 16px 24px rgba(0, 0, 0, .35)); }
.accueil .boutons { margin-top: 44px; }
.accueil p.intro { max-width: 520px; margin: 26px auto 34px; font-size: 20px; color: var(--creme-attenue); }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.bouton { display: inline-block; font-family: var(--titre); font-size: 17px; padding: 15px 30px; border-radius: 100px; text-decoration: none; background: var(--brique); color: #FFF6EC; transition: transform .15s; }
.bouton:hover { transform: translateY(-2px); }
.bouton-contour { font-family: var(--corps); font-weight: 700; background: transparent; color: var(--creme); border: 2px solid var(--creme); padding: 13px 22px; }
.vague { position: absolute; z-index: 7; left: -5%; right: -5%; bottom: -1px; height: 90px; background: var(--blanc); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }

/* ---------- Le concept ---------- */
.concept { padding: 40px 0 90px; }
/* Quatre panneaux colorés : celui sous la souris s'élargit et passe au premier plan */
.arguments { display: flex; gap: 16px; margin-top: 52px; height: 340px; }
.argument { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 28px; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--creme); outline: none;
  transition: flex-grow .55s cubic-bezier(.2, .8, .2, 1), transform .4s ease, box-shadow .4s ease, filter .4s ease; }
.argument-vert { background: var(--fond-sombre); }
.argument-brique { background: var(--brique); }
.argument-sable { background: #D9C9B1; color: var(--texte); }
.argument-sauge { background: #A9B99A; color: var(--fond-sombre); }
.argument-sauge h3 { text-shadow: 2px 2px 0 rgba(255, 255, 255, .35); }
.argument-sauge .argument-numero { color: var(--fond-sombre); opacity: .18; }
/* Grand numéro en haut à gauche : c'est lui qui habille le haut du panneau */
.argument-numero { position: absolute; left: 22px; top: 6px; font-family: var(--titre); font-size: 160px; line-height: 1; letter-spacing: -.02em; opacity: .16; pointer-events: none; transform-origin: left top; transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s; }
.argument-sable .argument-numero { color: var(--brique); opacity: .22; }
/* Fin trait au-dessus du titre, qui s'allonge à l'ouverture */
.argument-texte::before { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: currentColor; opacity: .5; margin-bottom: 16px; transition: width .55s cubic-bezier(.2, .8, .2, 1); }
.argument-sable .argument-texte::before { background: var(--brique); opacity: .8; }
.argument h3 { margin: 0 0 8px; font-size: 24px; line-height: 1.1; color: inherit; text-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
.argument-sable h3 { text-shadow: 2px 2px 0 var(--ombre-titre-doux); }
.argument p { margin: 0; font-size: 16px; line-height: 1.5; color: inherit; max-width: 36ch; }

@media (hover: hover) and (min-width: 761px) {
  /* Le texte n'apparaît que sur le panneau ouvert. Sans survol, le premier panneau est ouvert. */
  .argument p { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s ease, opacity .35s ease; }
  .arguments:not(:hover):not(:focus-within) .argument:first-child,
  .arguments .argument:hover, .arguments .argument:focus-visible { flex-grow: 2.6; box-shadow: 0 24px 44px rgba(0, 0, 0, .22); }
  .arguments:hover .argument:not(:hover), .arguments:focus-within .argument:not(:focus-visible):not(:hover) { flex-grow: .8; filter: saturate(.85); }
  .arguments:not(:hover):not(:focus-within) .argument:first-child p,
  .argument:hover p, .argument:focus-visible p { max-height: 8em; opacity: .9; transition-delay: .12s; }
  .arguments:not(:hover):not(:focus-within) .argument:first-child .argument-texte::before,
  .argument:hover .argument-texte::before, .argument:focus-visible .argument-texte::before { width: 72px; }
  .arguments:not(:hover):not(:focus-within) .argument:first-child .argument-numero,
  .argument:hover .argument-numero, .argument:focus-visible .argument-numero { transform: scale(1.04); opacity: .26; }
  .argument:focus-visible { outline: 3px solid var(--brique-clair); outline-offset: 3px; }
}
@media (max-width: 760px), (hover: none) {
  .arguments { flex-direction: column; height: auto; }
  .argument { flex: none; justify-content: flex-start; gap: 0; }
  /* Sur téléphone, le numéro reste au-dessus du texte au lieu de passer derrière */
  .argument-numero { position: static; font-size: 84px; margin: -6px 0 10px; }
  .argument p { opacity: .9; }
}


/* =========================================================
   NOS MÉLANGES : les cartes glissent à l'horizontale quand on fait défiler
   la page. La « piste » est haute ; le « cadre » reste figé à l'écran.
   ========================================================= */
/* Fond sable un peu plus foncé : les couleurs des cartes au survol ressortent mieux */
.melanges { background: #D9C9B1; }
.melanges h2 { text-shadow: 3px 3px 0 #C49A86; }
.melanges .section-titre p { color: #4A433C; }

.melanges-cadre { padding: 90px 0; }
.rail { margin-top: 44px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.rail::-webkit-scrollbar { display: none; }
.rail-cartes { display: flex; gap: 28px; width: max-content; padding: 12px max(24px, calc((100vw - var(--largeur)) / 2 + 24px)) 36px; }
.progression { height: 4px; border-radius: 4px; background: rgba(31, 29, 27, .16); overflow: hidden; }
.progression span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--brique); }

/* Version animée (activée par le script) */
.defilement .melanges-piste { position: relative; }
.defilement .melanges-cadre { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 88px 0 24px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.defilement .rail { overflow: visible; scroll-snap-type: none; margin-top: 32px; }
.defilement .rail-cartes { will-change: transform; }
.melanges-cadre > .conteneur { width: 100%; }
.melanges:not(.defilement) .progression { display: none; }

/* ---------- Cartes en verre teinté de la couleur du mélange ; couleur pleine au survol ---------- */
.carte { position: relative; flex: 0 0 auto; width: clamp(260px, 30vw, 370px); scroll-snap-align: center; border-radius: 24px; padding: 16px 16px 22px;
  background: rgba(255, 255, 255, .5);
  background: linear-gradient(150deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .25) 65%), color-mix(in srgb, var(--couleur) 24%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--couleur) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: background-color .35s ease, transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.carte img { width: 100%; border-radius: 14px; }
.carte h3 { margin: 16px 0 2px; font-size: 24px; transition: color .35s ease, text-shadow .35s ease; }
.carte p { margin: 0; font-size: 15px; color: var(--texte-secondaire); transition: color .35s ease; }
.carte-plus { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; font-size: 14px; color: var(--texte); transition: color .35s ease; }
.carte-plus span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--couleur) 22%, transparent); font-size: 16px; line-height: 1; transition: transform .3s ease, background-color .3s; }
.carte-ouvrir { position: absolute; inset: 0; width: 100%; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.carte-ouvrir:focus-visible { outline: 3px solid var(--brique); outline-offset: 3px; }
.carte:hover, .carte.en-vue { background: linear-gradient(150deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%), color-mix(in srgb, var(--couleur) 88%, transparent); border-color: rgba(255, 255, 255, .45); transform: translateY(-6px); box-shadow: 0 20px 36px color-mix(in srgb, var(--couleur) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); }
/* --encre : couleur du texte sur la carte colorée (crème par défaut, foncé pour Raclette) */
.carte:hover h3, .carte.en-vue h3 { color: var(--encre, #FFF6EC); text-shadow: 2px 2px 0 rgba(0, 0, 0, .3); }
.carte:hover p, .carte.en-vue p, .carte:hover .carte-plus, .carte.en-vue .carte-plus { color: var(--encre, #FFF1E3); }
.carte:hover .carte-plus span, .carte.en-vue .carte-plus span { background: rgba(255, 255, 255, .25); }
.carte:hover .carte-plus span { transform: rotate(90deg); }

/* ---------- Fiche détaillée (fenêtre en verre) ---------- */
body.fiche-ouverte { overflow: hidden; }
.fiche { width: min(980px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 28px; background: transparent; color: var(--creme); overflow: visible; }
.fiche::backdrop { background: rgba(10, 22, 15, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.fiche[open] { animation: fiche-entree .35s cubic-bezier(.2, .8, .2, 1); }
.fiche[open]::backdrop { animation: fondu .35s ease; }
@keyframes fiche-entree { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fondu { from { opacity: 0; } }
.fiche-panneau { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); overflow: auto; padding: 32px; border-radius: inherit;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--couleur, #A94F44) 55%, transparent), transparent 60%), rgba(31, 58, 44, .82);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .15); }
.fiche-visuel { align-self: start; position: sticky; top: 0; }
.fiche-image { width: 100%; border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
/* Sachet 3D de la fiche mélange : occupe toute la hauteur de la colonne de gauche */
.fiche-melange .fiche-visuel { height: min(calc(100vh - 96px), 760px); height: min(calc(100svh - 96px), 760px); display: grid; place-items: center; }
.fiche-melange .fiche-visuel::before { content: ""; position: absolute; inset: 10% 6% 6%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--couleur, #A94F44) 34%, transparent), transparent); opacity: 0; transition: opacity .6s ease; pointer-events: none; }
/* L'image de l'étiquette reste cachée pendant le chargement de la 3D ; elle n'apparaît que si la 3D est impossible */
.fiche-melange .fiche-image { opacity: 0; visibility: hidden; transition: opacity .4s ease; }
.fiche-melange .sans-3d .fiche-image { opacity: 1; visibility: visible; }
.sachet3d { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.fiche-melange .en-3d::before, .en-3d .sachet3d { opacity: 1; }
.en-3d .sachet3d { pointer-events: auto; }
.sachet3d-canvas { position: relative; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; outline: none; border-radius: 18px; }
.sachet3d-glisse .sachet3d-canvas { cursor: grabbing; }
.sachet3d-canvas:focus-visible { outline: 3px solid var(--brique-clair); outline-offset: -3px; }
.sachet3d-aide { position: absolute; left: 50%; bottom: 4px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--creme); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transform: translateX(-50%); pointer-events: none; transition: opacity .5s ease, transform .5s ease; }
.sachet3d-aide svg { width: 15px; height: 15px; }
.fiche-fermer { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: var(--creme); transition: background-color .2s; }
.fiche-fermer:hover { background: rgba(255, 255, 255, .2); }
.fiche-fermer svg { width: 20px; height: 20px; }
.fiche-titre { font-size: clamp(34px, 4vw, 48px); color: var(--creme); text-shadow: 3px 3px 0 var(--brique); padding-right: 44px; }
.fiche-denomination { margin: 6px 0 14px; font-size: 15px; color: var(--creme-attenue); }
.fiche-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.fiche-tags li { padding: 6px 14px; border-radius: 100px; font-size: 14px; font-weight: 700; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); }
.fiche-corps p { margin: 0 0 10px; font-size: 16px; color: #E9E1D5; }
.fiche-corps h4 { margin: 20px 0 6px; font-family: var(--titre); font-weight: 400; font-size: 17px; color: var(--brique-clair); }
.fiche-corps strong { color: var(--creme); }
.fiche-achat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.fiche-achat strong { display: block; font-size: 16px; }
.fiche-achat span { font-size: 14px; color: var(--creme-attenue); }
.fiche-achat .bouton { font-size: 15px; padding: 12px 22px; }
.fiche-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.fiche-nav button { padding: 10px 4px; border: 0; background: none; color: var(--creme); font-weight: 700; font-size: 15px; opacity: .8; }
.fiche-nav button:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.fiche-note { margin: 10px 0 0; font-size: 12.5px; color: var(--creme-attenue); opacity: .85; }

@media (max-width: 760px) {
  .fiche { width: 100%; max-height: 100%; height: 100%; margin: 0; border-radius: 0; }
  .fiche-panneau { grid-template-columns: 1fr; gap: 20px; max-height: 100vh; max-height: 100svh; height: 100%; border-radius: 0; padding: 20px 20px 28px; }
  .fiche-visuel { position: static; padding-right: 52px; }
  .fiche-melange .fiche-visuel { position: relative; height: 46vh; height: 46svh; min-height: 300px; padding-right: 0; }
  .fiche[open] { animation-name: fiche-entree-mobile; }
  @keyframes fiche-entree-mobile { from { transform: translateY(100%); } }
}

/* Téléphone : les 6 mélanges en grille de 2 colonnes, en couleur, sans défilement horizontal */
@media (max-width: 640px) {
  .rail { overflow: visible; scroll-snap-type: none; margin-top: 28px; }
  .rail-cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: auto; padding: 0 16px 8px; }
  .carte { width: auto; padding: 10px 10px 14px; border-radius: 18px;
    background: linear-gradient(150deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%), color-mix(in srgb, var(--couleur) 88%, transparent); border-color: rgba(255, 255, 255, .45); }
  .carte img { border-radius: 10px; }
  .carte h3 { margin: 10px 0 2px; font-size: 18px; color: var(--encre, #FFF6EC); text-shadow: 2px 2px 0 rgba(0, 0, 0, .3); }
  .carte p { font-size: 13px; line-height: 1.35; color: var(--encre, #FFF1E3); }
  .carte { display: flex; flex-direction: column; }
  .carte-plus { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--encre, #FFF1E3); }
  .carte-plus span { background: rgba(255, 255, 255, .25); width: 20px; height: 20px; font-size: 14px; }
  .carte:hover, .carte.en-vue { transform: none; }
}
@media (max-height: 700px) and (min-width: 641px) {
  .carte { width: clamp(240px, 26vw, 300px); }
}
@media (max-height: 620px) {
  .defilement .melanges-cadre h2 { font-size: 32px; }
  .defilement .melanges-cadre .section-titre p { margin-top: 6px; font-size: 16px; }
  .defilement .melanges-cadre .prix { margin-top: 6px; font-size: 14px; }
  .defilement .rail { margin-top: 14px; }
  .defilement .rail-cartes { padding-bottom: 20px; }
  .carte { width: clamp(220px, 22vw, 260px); }
  .carte h3 { margin-top: 10px; font-size: 20px; }
}


/* ---------- Recettes ---------- */
.recettes { padding: 90px 0; background: var(--creme); }
.filtres { display: grid; gap: 10px; justify-items: center; margin-top: 36px; }
.filtres-ligne { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.filtre { padding: 9px 16px; border-radius: 100px; border: 1px solid rgba(31, 29, 27, .18); background: rgba(255, 255, 255, .55); color: var(--texte); font-weight: 700; font-size: 14px; transition: background-color .2s, color .2s, border-color .2s; }
.filtre:hover { border-color: rgba(31, 29, 27, .4); }
.filtre[aria-pressed="true"] { background: var(--fond-sombre); border-color: var(--fond-sombre); color: var(--creme); }
.recettes-compte { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--texte-secondaire); }
.grille-recettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 18px; }
.recette { position: relative; border-radius: 22px; overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .35) 65%), color-mix(in srgb, var(--couleur) 20%, transparent);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 12px 26px color-mix(in srgb, var(--couleur) 18%, transparent);
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, opacity .3s ease; }
.recette.cachee { display: none; }
.recette-visuel { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.recette-visuel img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform .5s ease; }
.recette-pastille { position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 100px; font-weight: 700; font-size: 13px; color: var(--encre, #FFF6EC); background: color-mix(in srgb, var(--couleur) 82%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .35); }
.recette-texte { padding: 16px 18px 20px; }
.recette h3 { font-size: 20px; line-height: 1.15; text-shadow: none; }
.recette-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; color: var(--texte-secondaire); }
.recette-meta span + span::before { content: "·"; margin-right: 14px; opacity: .6; }
.recette-ouvrir { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; border-radius: inherit; }
.recette-ouvrir:focus-visible { outline: 3px solid var(--brique); outline-offset: -3px; }
.recette:hover { transform: translateY(-5px); box-shadow: 0 20px 34px color-mix(in srgb, var(--couleur) 30%, transparent); }
.recette:hover .recette-visuel img { transform: scale(1.14); }
.recettes-vide { margin: 30px 0 0; text-align: center; color: var(--texte-secondaire); }

/* Fiche d'une recette (reprend le style de la fiche mélange) */
.fiche-recette .recette-meta { margin: 8px 0 14px; color: var(--creme-attenue); }
.fiche-recette .fiche-corps ul, .fiche-recette .fiche-corps ol { margin: 0; padding-left: 22px; color: #E9E1D5; }
.fiche-recette .fiche-corps li { margin-bottom: 6px; }
.fiche-recette .fiche-corps ol li::marker { font-family: var(--titre); color: var(--brique-clair); }
.fiche-recette .fiche-image { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Où les trouver ---------- */
.ou { padding: 90px 0; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 44px; }
.point { background: var(--creme); border-radius: 16px; padding: 18px 22px; }
.point strong { display: block; font-family: var(--titre); font-weight: 400; font-size: 18px; }
.point span { font-size: 15px; color: var(--texte-secondaire); }
.point.direct { background: var(--fond-sombre); }
.point.direct strong { color: var(--brique-clair); }
.point.direct span { color: var(--creme-attenue); }
.point.direct a { color: var(--creme); }

/* ---------- Contact / pied de page ---------- */
.contact { background: var(--fond-sombre); color: var(--creme); text-align: center; padding: 80px 0 40px; }
.contact h2 { font-size: clamp(38px, 6vw, 52px); color: var(--creme); text-shadow: 4px 4px 0 var(--brique); }
.hashtag { margin: 10px 0 22px; font-family: var(--titre); font-size: 18px; color: var(--brique-clair); }
.contact .liens { margin: 0; font-size: 17px; color: var(--creme-attenue); }
.contact .liens a { color: var(--creme); }
/* Réseaux et e-mail en bas de page */
.reseaux { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.reseau { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 100px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(245, 235, 221, .22); color: var(--creme); font-weight: 700; font-size: 15px; text-decoration: none; transition: background-color .2s, transform .15s; }
.reseau:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.reseau:focus-visible { outline: 3px solid var(--brique-clair); outline-offset: 3px; }
.reseau svg { width: 20px; height: 20px; flex: none; }
.contact .logo-pied { height: 26px; width: auto; margin: 56px auto 18px; }
.mentions { margin: 0; font-size: 14px; color: var(--creme-attenue); }
.mentions a { color: var(--creme-attenue); }

/* ---------- Pages légales ---------- */
.page-texte { padding: 130px 0 90px; }
.page-texte .conteneur { max-width: 760px; }
.page-texte h1 { font-size: clamp(34px, 5vw, 46px); text-shadow: 3px 3px 0 var(--ombre-titre); margin-bottom: 30px; }
.page-texte h2 { font-size: 24px; text-shadow: 2px 2px 0 var(--ombre-titre); margin: 36px 0 10px; }
.page-texte p, .page-texte li { color: var(--texte-secondaire); }
.retour { display: inline-block; margin-top: 40px; font-weight: 700; }

/* =========================================================
   4. APPARITIONS AU DÉFILEMENT
   (classe « apparait » dans le HTML ; « d1 », « d2 »… = petit décalage)
   ========================================================= */
.js .apparait { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .apparait.visible { opacity: 1; transform: none; }
.js .apparait.d1 { transition-delay: .1s; }
.js .apparait.d2 { transition-delay: .2s; }
.js .apparait.d3 { transition-delay: .3s; }

/* ---------- Téléphone ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .accueil .conteneur { padding-top: 96px; padding-bottom: 120px; }
  .relief { font-size: 14.5vw; }
  .accueil .couche.premier-plan { display: none; }
  .accueil p.intro { font-size: 18px; }
  .vague { height: 50px; }
  .melanges-cadre, .ou, .recettes { padding: 64px 0; }
  .concept { padding-bottom: 64px; }
}

/* ---------- Téléphone : accueil plus grand, concept en cartes empilées ---------- */
@media (max-width: 640px) {
  /* Accueil : « MADRAS ? » occupe toute la largeur, moins de vide autour */
  .accueil { min-height: 92vh; min-height: 92svh; }
  .accueil .conteneur { padding-top: 104px; padding-bottom: 110px; }
  /* formes du fond agrandies (elles sont calculées en largeur d'écran, donc petites en portrait) */
  .accueil .couche { scale: 1.35; }
  .accueil .couche.ombre { scale: 1.9; }
  .accueil .couche[data-p="0.6"] { scale: 2.6; }
  .accueil-pre { font-size: 7.4vw; }
  .relief { font-size: 16.4vw; margin-top: 10px; }
  .accueil .boutons { margin-top: 40px; }

  /* Concept : les 4 panneaux deviennent des cartes qui s'arrêtent sous le menu
     et se recouvrent les unes les autres en défilant */
  .arguments { gap: 18px; margin-top: 28px; padding-bottom: 8px; }
  .argument { position: sticky; top: 76px; min-height: 200px; padding: 22px 22px 24px; border-radius: 24px; justify-content: flex-end; box-shadow: 0 -12px 28px rgba(20, 30, 24, .16); }
  .argument:nth-child(2) { top: 90px; }
  .argument:nth-child(3) { top: 104px; }
  .argument:nth-child(4) { top: 118px; }
  .argument-numero { position: absolute; left: auto; right: 16px; top: 2px; margin: 0; font-size: 92px; }
  .argument-texte::before { margin-bottom: 12px; }
  .argument h3 { font-size: 22px; padding-right: 70px; }
  .argument p { font-size: 15px; line-height: 1.45; }
}

/* ---------- Pour les personnes qui désactivent les animations ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carte, .navigation, .navigation .menu li { transition: none; }
  .fiche[open], .fiche[open]::backdrop { animation: none; }
  .js .apparait { opacity: 1; transform: none; transition: none; }
  .carte:hover, .carte.en-vue { transform: none; }
}
