/* =====================================================================
   Créa-Mélie — Feuille de style
   Palette dérivée du logo officiel : rose cuivré, or, vert eucalyptus,
   crème et brun chaud.
   ===================================================================== */

/* ---------- 1. Jetons de design ---------- */
:root {
  --rose:        #c98b7a;
  --rose-clair:  #e8c3b8;
  --rose-pale:   #f7e6e0;
  --rose-fonce:  #a9695a;
  --or:          #d9a566;
  --or-pale:     #f3e3c8;
  --vert:        #8fa98a;
  --vert-pale:   #e6ede4;
  --creme:       #fdf8f4;
  --creme-2:     #f6ece5;
  --blanc:       #ffffff;
  --texte:       #4a3730;
  --texte-doux:  #8a736a;
  --bord:        #ecd9d0;
  --danger:      #c0564b;
  --succes:      #6f9464;

  --ombre-s: 0 1px 2px rgba(74, 55, 48, .06), 0 2px 6px rgba(74, 55, 48, .05);
  --ombre-m: 0 2px 6px rgba(74, 55, 48, .07), 0 10px 24px rgba(74, 55, 48, .08);
  --ombre-l: 0 8px 40px rgba(74, 55, 48, .16);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --r-pilule: 999px;

  --titre: 'Cormorant Garamond', 'Georgia', serif;
  --script: 'Parisienne', 'Brush Script MT', cursive;
  --corps: 'Nunito Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --haut-entete: 60px;
  --haut-nav: 64px;
  --safe-bas: env(safe-area-inset-bottom, 0px);
  --safe-haut: env(safe-area-inset-top, 0px);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--corps);
  font-size: 16px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--creme);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 {
  font-family: var(--titre);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--rose-fonce);
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
a { color: var(--rose-fonce); }

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

/* Accessibilité clavier */
:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 4px;
}

/* L'attribut hidden doit l'emporter sur les display: flex/grid des classes */
[hidden] { display: none !important; }

.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;
}

.centre { text-align: center; }
.muted  { color: var(--texte-doux); }
.petit  { font-size: .85rem; }
.mt     { margin-top: 1rem; }
.mb     { margin-bottom: 1rem; }

/* ---------- 3. Écran de démarrage ---------- */
#splash {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.25rem;
  background: radial-gradient(circle at 50% 35%, var(--blanc) 0%, var(--creme-2) 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
#splash.parti { opacity: 0; visibility: hidden; pointer-events: none; }

#splash .logo-principal {
  width: min(58vw, 230px);
  border-radius: var(--r-l);
  box-shadow: var(--ombre-m);
  animation: apparition .8s ease both;
}
#splash .barre {
  width: min(64vw, 260px); height: 5px;
  background: var(--rose-pale);
  border-radius: var(--r-pilule);
  overflow: hidden;
}
#splash .barre span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--rose-clair), var(--rose), var(--or));
  border-radius: inherit;
  transition: width .12s linear;
}
#splash .credit {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .5rem;
  font-size: .78rem; color: var(--texte-doux);
  animation: apparition 1s .3s ease both;
}
#splash .credit img { width: 30px; height: 30px; border-radius: 50%; }

@keyframes apparition {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 4. En-tête ---------- */
header.appbar {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: .6rem;
  padding: calc(.5rem + var(--safe-haut)) .9rem .5rem;
  min-height: var(--haut-entete);
  background: rgba(253, 248, 244, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
}
header.appbar .marque {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; color: inherit; margin-right: auto;
}
header.appbar .marque img { width: 36px; height: 36px; border-radius: 50%; }
header.appbar .marque strong {
  font-family: var(--script); font-size: 1.5rem;
  font-weight: 400; color: var(--rose-fonce); line-height: 1;
}
header.appbar .icone {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--rose-fonce);
  font-size: 1.25rem; cursor: pointer;
}
header.appbar .icone:active { background: var(--rose-pale); }
.pastille {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: var(--r-pilule);
  background: var(--rose-fonce); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 1;
}

/* ---------- 5. Zone principale ---------- */
main {
  min-height: calc(100vh - var(--haut-entete) - var(--haut-nav));
  padding: 1rem .9rem calc(var(--haut-nav) + 2.5rem + var(--safe-bas));
  max-width: 900px; margin: 0 auto;
  animation: entree .3s ease;
}
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ---------- 6. Navigation basse ---------- */
nav.barre-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--safe-bas);
  background: rgba(253, 248, 244, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--bord);
}
nav.barre-nav a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: .5rem 0 .45rem;
  text-decoration: none; color: var(--texte-doux);
  font-size: .68rem; font-weight: 600;
}
nav.barre-nav a .ic { font-size: 1.3rem; line-height: 1; }
nav.barre-nav a.actif { color: var(--rose-fonce); }
nav.barre-nav a.actif::before {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--rose);
}
nav.barre-nav .pastille { top: 4px; right: 50%; margin-right: -22px; }

/* ---------- 7. Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem;
  padding: .72rem 1.15rem;
  min-height: 44px;
  border: 0; border-radius: var(--r-pilule);
  background: var(--rose); color: #fff;
  font: inherit; font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--ombre-s);
  transition: transform .12s ease, background .18s ease, opacity .18s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.plein { width: 100%; }
.btn.secondaire { background: var(--blanc); color: var(--rose-fonce); border: 1.5px solid var(--rose-clair); }
.btn.fantome    { background: transparent; color: var(--texte-doux); box-shadow: none; }
.btn.or         { background: var(--or); }
.btn.danger     { background: var(--danger); }
.btn.petit      { padding: .4rem .8rem; min-height: 36px; font-size: .84rem; }

/* ---------- 8. Cartes ---------- */
.carte {
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: var(--r-m);
  padding: 1rem;
  box-shadow: var(--ombre-s);
  margin-bottom: 1rem;
}

.grille-produits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .8rem;
}
@media (min-width: 620px) {
  .grille-produits { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

.produit {
  display: flex; flex-direction: column;
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--ombre-s);
  transition: transform .15s ease, box-shadow .15s ease;
}
.produit:active { transform: scale(.985); }
.produit .visuel {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--creme-2);
  overflow: hidden;
}
.produit .visuel img { width: 100%; height: 100%; object-fit: cover; }
.produit .visuel .vide {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 2rem; color: var(--rose-clair);
}
.etiquette {
  position: absolute; top: .5rem; left: .5rem;
  padding: .18rem .55rem;
  border-radius: var(--r-pilule);
  background: var(--or); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
}
.etiquette.inactif { background: var(--texte-doux); }
.produit .corps { padding: .65rem .7rem .8rem; display: flex; flex-direction: column; flex: 1; gap: .35rem; }
.produit h3 { font-size: 1rem; margin: 0; color: var(--texte); }
.produit .desc {
  font-size: .8rem; color: var(--texte-doux); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.produit .prix {
  font-family: var(--titre); font-size: 1.2rem; font-weight: 700;
  color: var(--rose-fonce); margin-top: auto;
}

/* Sélecteur de quantité */
.quantite {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--bord); border-radius: var(--r-pilule);
  background: var(--blanc); overflow: hidden;
}
.quantite button {
  width: 34px; height: 34px; border: 0;
  background: transparent; color: var(--rose-fonce);
  font-size: 1.15rem; font-weight: 700; cursor: pointer;
}
.quantite button:active { background: var(--rose-pale); }
.quantite input {
  width: 34px; border: 0; text-align: center;
  font: inherit; font-weight: 700; font-size: .9rem;
  color: var(--texte); background: transparent;
  -moz-appearance: textfield;
}
.quantite input::-webkit-outer-spin-button,
.quantite input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ligne-ajout { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.ligne-ajout .btn { flex: 1; padding-inline: .6rem; font-size: .82rem; }

/* ---------- 9. Formulaires ---------- */
.champ { margin-bottom: .85rem; }
.champ label {
  display: block; margin-bottom: .28rem;
  font-size: .82rem; font-weight: 700; color: var(--texte-doux);
}
.champ input, .champ select, .champ textarea {
  width: 100%; padding: .7rem .85rem;
  border: 1.5px solid var(--bord); border-radius: var(--r-s);
  background: var(--blanc); color: var(--texte);
  font: inherit; font-size: 16px; /* évite le zoom iOS */
}
.champ textarea { min-height: 110px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: 0; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-pale);
}
.champ .aide { font-size: .75rem; color: var(--texte-doux); margin-top: .25rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 420px) { .duo { grid-template-columns: 1fr; gap: 0; } }

.case {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .7rem .85rem;
  border: 1.5px solid var(--bord); border-radius: var(--r-s);
  background: var(--blanc); cursor: pointer;
  margin-bottom: .85rem;
}
.case input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rose); flex: none; }
.case span { font-size: .88rem; }

/* Recherche */
.recherche { position: relative; margin-bottom: 1rem; }
.recherche input {
  width: 100%; padding: .78rem 2.6rem .78rem 2.6rem;
  border: 1.5px solid var(--bord); border-radius: var(--r-pilule);
  background: var(--blanc); font: inherit; font-size: 16px;
}
.recherche input:focus { outline: 0; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-pale); }
.recherche .loupe { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--texte-doux); }
.recherche .effacer {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--texte-doux); font-size: 1.1rem; cursor: pointer;
}

/* Filtres catégories */
.puces { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .8rem; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  flex: none; padding: .42rem .9rem;
  border: 1.5px solid var(--bord); border-radius: var(--r-pilule);
  background: var(--blanc); color: var(--texte-doux);
  font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.puce.actif { background: var(--rose); border-color: var(--rose); color: #fff; }

/* ---------- 10. Sections ---------- */
.entete-section {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem; margin: 1.5rem 0 .7rem;
}
.entete-section h2 { margin: 0; }
.entete-section a { font-size: .82rem; font-weight: 700; text-decoration: none; }

.avenir {
  padding: 1.4rem 1rem; text-align: center;
  border: 1.5px dashed var(--rose-clair); border-radius: var(--r-m);
  background: var(--rose-pale);
  color: var(--rose-fonce); font-family: var(--titre);
  font-size: 1.15rem; font-weight: 600;
}

.vide-etat { text-align: center; padding: 2.5rem 1rem; color: var(--texte-doux); }
.vide-etat .emoji { font-size: 2.6rem; display: block; margin-bottom: .6rem; }

/* Bannière héro */
.hero {
  position: relative; text-align: center;
  padding: 1.6rem 1.1rem;
  border-radius: var(--r-l);
  background: linear-gradient(160deg, var(--blanc) 0%, var(--rose-pale) 60%, var(--or-pale) 100%);
  border: 1px solid var(--bord);
  margin-bottom: 1.2rem;
}
.hero img { width: 92px; margin: 0 auto .7rem; border-radius: 50%; box-shadow: var(--ombre-m); }
.hero h1 { font-family: var(--script); font-size: 2.3rem; font-weight: 400; margin: 0 0 .15rem; }
.hero p { margin: 0; color: var(--texte-doux); font-size: .92rem; }

/* Bannière nouveauté */
.banniere-nouveaute {
  display: flex; align-items: center; gap: .7rem;
  padding: .8rem .9rem; margin-bottom: 1rem;
  border-radius: var(--r-m);
  background: linear-gradient(120deg, var(--or), var(--rose));
  color: #fff; box-shadow: var(--ombre-m);
  animation: entree .4s ease;
}
.banniere-nouveaute .txt { flex: 1; font-size: .88rem; font-weight: 600; }
.banniere-nouveaute button {
  border: 0; background: rgba(255,255,255,.25); color: #fff;
  border-radius: 50%; width: 30px; height: 30px; font-size: 1rem; cursor: pointer;
}

/* ---------- 11. Boutons réseaux fixes ---------- */
.reseaux-fixes {
  position: fixed; right: .7rem; z-index: 480;
  bottom: calc(var(--haut-nav) + var(--safe-bas) + .8rem);
  display: flex; flex-direction: column; gap: .55rem;
}
.reseaux-fixes a {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%; color: #fff;
  box-shadow: var(--ombre-m);
  text-decoration: none;
  transition: transform .15s ease;
}
.reseaux-fixes a:active { transform: scale(.9); }
.reseaux-fixes a svg { width: 24px; height: 24px; fill: currentColor; }
.reseaux-fixes .fb { background: #1877f2; }
.reseaux-fixes .ig { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }

/* ---------- 12. Invitation à installer ---------- */
.invite-install {
  position: fixed; left: .7rem; right: .7rem; z-index: 700;
  bottom: calc(var(--haut-nav) + var(--safe-bas) + .8rem);
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem;
  background: var(--blanc);
  border: 1px solid var(--bord); border-radius: var(--r-m);
  box-shadow: var(--ombre-l);
  animation: monte .35s ease;
}
@keyframes monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; } }
.invite-install img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.invite-install .txt { flex: 1; min-width: 0; }
.invite-install .txt strong { display: block; font-size: .92rem; }
.invite-install .txt span { font-size: .76rem; color: var(--texte-doux); }
.invite-install .fermer {
  border: 0; background: transparent; color: var(--texte-doux);
  font-size: 1.2rem; cursor: pointer; width: 30px; height: 30px; flex: none;
}

/* ---------- 13. Fenêtres modales ---------- */
.voile {
  position: fixed; inset: 0; z-index: 800;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(74, 55, 48, .45);
  backdrop-filter: blur(3px);
  animation: fondu .2s ease;
}
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
.modale {
  width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto;
  padding: 1.2rem 1.1rem calc(1.2rem + var(--safe-bas));
  background: var(--creme);
  border-radius: var(--r-l) var(--r-l) 0 0;
  animation: monte .28s ease;
}
@media (min-width: 620px) {
  .voile { align-items: center; }
  .modale { border-radius: var(--r-l); }
}
.modale .poignee {
  width: 42px; height: 4px; margin: 0 auto .9rem;
  background: var(--bord); border-radius: var(--r-pilule);
}

/* ---------- 14. Notifications éphémères ---------- */
#toasts {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-haut) + .8rem); z-index: 950;
  display: flex; flex-direction: column; gap: .5rem;
  width: min(92vw, 460px); pointer-events: none;
}
.toast {
  padding: .75rem 1rem;
  border-radius: var(--r-m);
  background: var(--texte); color: #fff;
  font-size: .88rem; font-weight: 600;
  box-shadow: var(--ombre-l);
  animation: descend .28s ease;
}
.toast.succes { background: var(--succes); }
.toast.erreur { background: var(--danger); }
@keyframes descend { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; } }

/* ---------- 15. Panier ---------- */
.ligne-panier {
  display: flex; gap: .75rem; align-items: center;
  padding: .7rem; margin-bottom: .6rem;
  background: var(--blanc);
  border: 1px solid var(--bord); border-radius: var(--r-m);
}
.ligne-panier .vign {
  width: 62px; height: 62px; flex: none;
  border-radius: var(--r-s); object-fit: cover; background: var(--creme-2);
}
.ligne-panier .info { flex: 1; min-width: 0; }
.ligne-panier .info strong { display: block; font-size: .92rem; }
.ligne-panier .info .pu { font-size: .78rem; color: var(--texte-doux); }
.ligne-panier .supprimer {
  border: 0; background: transparent; color: var(--danger);
  font-size: 1.1rem; cursor: pointer; width: 32px; height: 32px; flex: none;
}
.total {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1rem; margin: 1rem 0;
  background: var(--rose-pale); border-radius: var(--r-m);
  font-family: var(--titre); font-size: 1.3rem; font-weight: 700;
  color: var(--rose-fonce);
}

/* Choix du paiement */
.paiement {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem; margin-bottom: .6rem;
  border: 2px solid var(--bord); border-radius: var(--r-m);
  background: var(--blanc); cursor: pointer;
}
.paiement.choisi { border-color: var(--rose); background: var(--rose-pale); }
.paiement input { width: 20px; height: 20px; accent-color: var(--rose); flex: none; }
.paiement .nom { font-weight: 700; font-size: .95rem; }
.paiement .det { font-size: .78rem; color: var(--texte-doux); }

.bloc-coord {
  padding: .85rem; border-radius: var(--r-s);
  background: var(--creme-2); border: 1px dashed var(--rose-clair);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .82rem; word-break: break-all;
}

/* ---------- 16. Onglets ---------- */
.onglets {
  display: flex; gap: .3rem; overflow-x: auto;
  border-bottom: 1px solid var(--bord);
  margin-bottom: 1.1rem; scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets button {
  flex: none; padding: .65rem .85rem;
  border: 0; border-bottom: 3px solid transparent;
  background: transparent; color: var(--texte-doux);
  font: inherit; font-weight: 700; font-size: .85rem;
  cursor: pointer; white-space: nowrap;
}
.onglets button.actif { color: var(--rose-fonce); border-bottom-color: var(--rose); }

/* Listes admin */
.item-liste {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .8rem; margin-bottom: .5rem;
  background: var(--blanc); border: 1px solid var(--bord);
  border-radius: var(--r-s);
}
.item-liste .vign { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: var(--creme-2); }
.item-liste .info { flex: 1; min-width: 0; }
.item-liste .info strong { display: block; font-size: .9rem; }
.item-liste .info span { font-size: .76rem; color: var(--texte-doux); }
.item-liste .actions { display: flex; gap: .3rem; flex: none; }
.item-liste .actions button {
  width: 34px; height: 34px; border: 1px solid var(--bord);
  border-radius: 8px; background: var(--blanc);
  font-size: .95rem; cursor: pointer;
}
.item-liste .actions button.sup { color: var(--danger); border-color: #eccfcb; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.stat {
  padding: .8rem; text-align: center;
  background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--r-m);
}
.stat b { display: block; font-family: var(--titre); font-size: 1.6rem; color: var(--rose-fonce); }
.stat span { font-size: .74rem; color: var(--texte-doux); font-weight: 700; }

/* Zone de dépôt photo */
.depot {
  display: grid; place-items: center; gap: .3rem;
  aspect-ratio: 1; padding: .5rem;
  border: 2px dashed var(--rose-clair); border-radius: var(--r-m);
  background: var(--blanc); color: var(--texte-doux);
  font-size: .78rem; text-align: center; cursor: pointer;
  overflow: hidden; position: relative;
}
.depot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.depot .retirer {
  position: absolute; top: .3rem; right: .3rem; z-index: 2;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: .9rem; cursor: pointer;
}

/* ---------- 16 bis. Statistiques ---------- */
.evolution {
  display: block; margin-top: .3rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em;
}
.evolution.hausse { color: var(--succes); }
.evolution.baisse { color: var(--danger); }
.evolution.stable { color: var(--texte-doux); }

/* Jauge horizontale (répartitions, pourcentages) */
.jauge {
  height: 8px; border-radius: var(--r-pilule);
  background: var(--creme-2); overflow: hidden;
}
.jauge span {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose-clair), var(--rose));
}

/* Histogramme mensuel */
.graphe {
  display: flex; align-items: flex-end; gap: .25rem;
  height: 160px; margin: .8rem 0 .2rem;
}
.graphe-colonne {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%;
}
.graphe-valeur {
  font-size: .6rem; font-weight: 800; color: var(--texte-doux);
  margin-bottom: 2px; white-space: nowrap;
}
.graphe-barre {
  width: 100%; min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--rose), var(--rose-clair));
  transition: height .3s ease;
}
.graphe-mois {
  font-size: .62rem; color: var(--texte-doux);
  margin-top: 4px; white-space: nowrap;
}

/* ---------- 17. Fiche produit ---------- */
.galerie { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 1rem; scrollbar-width: none; }
.galerie::-webkit-scrollbar { display: none; }
.galerie img {
  flex: none; width: 100%; aspect-ratio: 1;
  object-fit: cover; scroll-snap-align: center;
  border-radius: var(--r-m); background: var(--creme-2);
}

/* ---------- 18. Pied de page / soutien développeur ---------- */
.soutien {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1rem; margin-top: 2rem;
  border-radius: var(--r-m);
  background: linear-gradient(120deg, #101a2e, #1b2c4d);
  color: #dbe7ff; text-decoration: none;
  box-shadow: var(--ombre-m);
}
.soutien img { width: 46px; height: 46px; border-radius: 50%; flex: none; background: #0b1220; }
.soutien .txt { flex: 1; min-width: 0; }
.soutien .txt strong { display: block; font-size: .9rem; color: #fff; }
.soutien .txt span { font-size: .75rem; opacity: .8; }
.soutien .fleche { font-size: 1.2rem; opacity: .7; }
.soutien-liens { display: flex; gap: .5rem; margin-top: .55rem; }
.soutien-liens a {
  flex: 1; text-align: center; padding: .5rem;
  border-radius: var(--r-s); text-decoration: none;
  font-size: .8rem; font-weight: 700;
  background: var(--blanc); border: 1px solid var(--bord); color: var(--texte);
}

footer.pied {
  margin-top: 2rem; padding-top: 1.2rem;
  border-top: 1px solid var(--bord);
  text-align: center; font-size: .78rem; color: var(--texte-doux);
}
footer.pied nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .9rem; margin-bottom: .7rem; }
footer.pied a { color: var(--texte-doux); text-decoration: none; font-weight: 700; }

/* ---------- 19. Pages légales ---------- */
.legal { font-size: .9rem; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6rem; }
.legal h3 { font-size: 1rem; margin-top: 1.1rem; color: var(--texte); }
.legal ul { padding-left: 1.15rem; }
.legal li { margin-bottom: .35rem; }
.legal .avertissement {
  padding: .8rem .9rem; border-radius: var(--r-s);
  background: #fff6e5; border: 1px solid var(--or);
  font-size: .82rem;
}

/* ---------- 20. Chargement ---------- */
.chargement { display: grid; place-items: center; padding: 2.5rem; }
.rondelle {
  width: 34px; height: 34px;
  border: 3px solid var(--rose-pale); border-top-color: var(--rose);
  border-radius: 50%; animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

.squelette {
  background: linear-gradient(90deg, var(--creme-2) 25%, var(--rose-pale) 50%, var(--creme-2) 75%);
  background-size: 200% 100%;
  animation: brille 1.3s infinite;
  border-radius: var(--r-m);
}
@keyframes brille { to { background-position: -200% 0; } }

/* ---------- 21. Bandeau hors-ligne ---------- */
.hors-ligne {
  position: fixed; left: 0; right: 0; z-index: 900;
  top: calc(var(--safe-haut));
  padding: .4rem; text-align: center;
  background: var(--texte); color: #fff;
  font-size: .78rem; font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
