/* ==========================================================================
   Régime Saiyan — feuille de style
   Thème sombre, aura orange (gi de Sangoku), accents bleu ceinture.
   ========================================================================== */

:root {
  --fond: #0b0e14;
  --fond-doux: #121824;
  --carte: #161d2b;
  --carte-haute: #1d2637;
  --ligne: #2a3446;
  --texte: #e9eef7;
  --texte-doux: #8fa0b8;

  --orange: #ff8b1f;
  --orange-fonce: #e06f00;
  --or: #ffd23f;
  --bleu: #3b82f6;
  --vert: #22c55e;
  --rouge: #f87171;
  --violet: #a78bfa;

  --aura: var(--orange);
  --rayon: 14px;
  --ombre: 0 10px 30px rgba(0, 0, 0, .45);
}

/* Aura : la couleur d'accent change avec le rang atteint */
body.aura-tortue  { --aura: #f59e0b; }
body.aura-saiyan  { --aura: #ff8b1f; }
body.aura-kaioken { --aura: #ef4444; }
body.aura-ssj     { --aura: #ffd23f; }
body.aura-ssj2    { --aura: #fde047; }
body.aura-ssj3    { --aura: #fb923c; }
body.aura-blue    { --aura: #38bdf8; }
body.aura-ui      { --aura: #e2e8f0; }

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--texte);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(255, 139, 31, .16), transparent 60%),
    radial-gradient(800px 500px at 88% 0%, rgba(59, 130, 246, .12), transparent 55%),
    var(--fond);
}

h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.25; }
h1 { font-size: 1.3rem; }
h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: 1px; color: var(--texte-doux); font-weight: 700; }
h3 { font-size: .9rem; color: var(--texte); margin-top: 1.2rem; }
p  { margin: 0 0 .5rem; }
a  { color: var(--aura); }

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .7rem 1.2rem;
  background: rgba(11, 14, 20, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ligne);
}

.marque { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--texte); }
.marque-icone { font-size: 1.7rem; filter: drop-shadow(0 0 10px var(--aura)); }
.marque strong { display: block; font-size: 1rem; letter-spacing: .4px; }
.marque small { display: block; font-size: .74rem; color: var(--texte-doux); }

.onglets { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.onglet {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--texte-doux);
  text-decoration: none;
  font-size: .85rem;
  cursor: pointer;
  transition: .15s;
}
.onglet:hover { color: var(--texte); background: var(--carte); }
.onglet.actif { background: var(--aura); color: #10151f; font-weight: 700; }
.onglet-sortie { font-size: 1rem; }
.form-inline-logout { display: inline; }

/* ---------- Structure ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 1.3rem 1.1rem 4rem; }
.page-nue { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.carte {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--ombre);
}
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.grille { display: grid; gap: 1rem; margin-bottom: 1rem; }
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grille-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grille-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grille .carte { margin-bottom: 0; }

.pied {
  max-width: 1180px; margin: 0 auto; padding: 1rem 1.1rem 2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--texte-doux); font-size: .78rem;
}

/* ---------- Messages ---------- */
.flash {
  border-radius: var(--rayon);
  padding: .75rem 1rem;
  margin-bottom: .8rem;
  border: 1px solid var(--ligne);
  background: var(--carte-haute);
  font-size: .9rem;
}
.flash-ok     { border-color: var(--vert);   background: rgba(34, 197, 94, .12); }
.flash-erreur { border-color: var(--rouge);  background: rgba(248, 113, 113, .12); }
.flash-alerte { border-color: var(--or);     background: rgba(255, 210, 63, .12); }
.flash-info   { border-color: var(--bleu);   background: rgba(59, 130, 246, .12); }
.flash-badge  { border-color: var(--orange); background: rgba(255, 139, 31, .16); font-weight: 600; }

.bandeau-badge {
  border: 1px solid var(--orange);
  background: linear-gradient(90deg, rgba(255, 139, 31, .22), rgba(255, 210, 63, .08));
  border-radius: var(--rayon);
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}

/* ---------- Textes utilitaires ---------- */
.etiquette { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--texte-doux); margin: 0 0 .3rem; }
.muted { color: var(--texte-doux); font-size: .86rem; }
.note { color: var(--texte-doux); font-size: .82rem; line-height: 1.6; }
.note-alerte { color: var(--or); }
.carte-note { border-color: rgba(255, 210, 63, .35); }
.lien { color: var(--aura); text-decoration: none; font-size: .85rem; }
.lien:hover { text-decoration: underline; }
.unite { font-size: .7em; color: var(--texte-doux); margin-left: .2rem; }
.separateur { border: none; border-top: 1px solid var(--ligne); margin: 1.2rem 0; }

.baisse { color: var(--vert); }
.hausse { color: var(--rouge); }
.neutre { color: var(--texte-doux); }

.stat-valeur { font-size: 1.7rem; font-weight: 800; margin: 0; letter-spacing: -.5px; }
.stat-sous { font-size: .78rem; color: var(--texte-doux); margin: .25rem 0 0; }
.stat-encadre { background: var(--carte-haute); border: 1px solid var(--ligne); border-radius: 12px; padding: .8rem .9rem; }
.stat-encadre .stat-valeur { font-size: 1.35rem; }

.pastille {
  display: inline-block; font-size: .68rem; padding: .1rem .5rem; border-radius: 999px;
  background: var(--carte-haute); border: 1px solid var(--ligne); color: var(--texte-doux);
  margin-left: .3rem; vertical-align: middle;
}
.pastille-ok        { border-color: var(--vert);  color: var(--vert); }
.pastille-attention { border-color: var(--or);    color: var(--or); }
.pastille-alerte    { border-color: var(--rouge); color: var(--rouge); }

/* ---------- Jauges ---------- */
.jauge {
  height: 9px; background: var(--fond-doux); border: 1px solid var(--ligne);
  border-radius: 999px; overflow: hidden; margin: .6rem 0 .5rem;
}
.jauge-haute { height: 13px; }
.jauge-remplissage {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--orange-fonce), var(--aura));
  box-shadow: 0 0 12px var(--aura);
  transition: width .5s ease;
}
.jauge-remplissage.depassement { background: linear-gradient(90deg, #b91c1c, var(--rouge)); box-shadow: none; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: .78rem; color: var(--texte-doux); }
input, select, textarea {
  width: 100%; margin-top: .25rem; padding: .5rem .65rem;
  background: var(--fond-doux); border: 1px solid var(--ligne); border-radius: 9px;
  color: var(--texte); font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--aura); outline-offset: 1px; border-color: transparent; }
input[type="file"] { padding: .35rem; font-size: .82rem; }
.champ-court { max-width: 110px; }

.form-ligne { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.form-ligne > label { flex: 0 1 auto; min-width: 120px; }
.form-compact { gap: .35rem; }
.form-compact input, .form-compact select { margin-top: 0; }
.form-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; }
.form-vertical { display: grid; gap: .8rem; }
.pleine-largeur { grid-column: 1 / -1; }
.form-inline { display: inline; }

fieldset { border: 1px solid var(--ligne); border-radius: 10px; padding: .6rem .8rem; }
legend { font-size: .75rem; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .8px; }

.case { display: inline-flex; align-items: flex-start; gap: .45rem; margin-right: .9rem; color: var(--texte); font-size: .85rem; }
.case input { width: auto; margin: .2rem 0 0; }
.case small { display: block; color: var(--texte-doux); font-size: .75rem; }

.bouton {
  display: inline-block;
  background: var(--carte-haute); color: var(--texte);
  border: 1px solid var(--ligne); border-radius: 9px;
  padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: .15s;
}
.bouton:hover { border-color: var(--aura); color: var(--aura); }
.bouton-plein {
  background: linear-gradient(90deg, var(--orange-fonce), var(--orange));
  color: #14100a; border-color: transparent;
  box-shadow: 0 0 18px rgba(255, 139, 31, .35);
}
.bouton-plein:hover { color: #14100a; filter: brightness(1.08); }
.bouton-fin { padding: .35rem .7rem; font-size: .82rem; font-weight: 500; }

.croix {
  background: transparent; border: none; color: var(--texte-doux);
  cursor: pointer; font-size: 1rem; padding: .1rem .4rem; border-radius: 6px; width: auto;
}
.croix:hover { color: var(--rouge); background: rgba(248, 113, 113, .12); }
.form-suppression { display: inline; }

.filtres { display: flex; gap: .3rem; flex-wrap: wrap; }
.filtre {
  padding: .3rem .7rem; border-radius: 999px; font-size: .8rem;
  color: var(--texte-doux); text-decoration: none; border: 1px solid var(--ligne);
}
.filtre:hover { color: var(--texte); }
.filtre.actif { background: var(--aura); color: #10151f; border-color: transparent; font-weight: 600; }

.navigation-date { display: flex; align-items: center; gap: .4rem; }
.navigation-date input { margin: 0; }

/* ---------- Tableaux ---------- */
.table-defilante { overflow-x: auto; margin-top: .6rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .8px;
  color: var(--texte-doux); padding: .45rem .55rem; border-bottom: 1px solid var(--ligne); white-space: nowrap;
}
td { padding: .5rem .55rem; border-bottom: 1px solid rgba(42, 52, 70, .55); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.ligne-bannie { opacity: .45; }
.cellule-actions { display: flex; gap: .4rem; align-items: center; }

.liste-simple { margin: .5rem 0; padding-left: 1.1rem; color: var(--texte-doux); font-size: .87rem; }
.liste-simple li { margin-bottom: .2rem; }

/* ---------- Puissance / rang ---------- */
.carte-puissance {
  border-color: var(--aura);
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(255, 139, 31, .16), transparent 70%),
    var(--carte);
}
.puissance-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.puissance-valeur {
  font-size: 2.4rem; font-weight: 900; margin: 0; letter-spacing: -1px;
  color: var(--aura); text-shadow: 0 0 22px rgba(255, 139, 31, .45);
}
.puissance-rang { display: flex; align-items: center; gap: .5rem; }
.rang-icone { font-size: 2rem; filter: drop-shadow(0 0 12px var(--aura)); }
.rang-nom { font-weight: 800; letter-spacing: .5px; }

.detail-puissance { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .4rem; margin: .8rem 0; }
.ligne-detail {
  display: flex; justify-content: space-between; gap: .6rem;
  background: var(--carte-haute); border: 1px solid var(--ligne);
  border-radius: 9px; padding: .4rem .7rem; font-size: .84rem;
}
.points { color: var(--aura); font-weight: 700; }

/* ---------- Défi du jour ---------- */
.carte-defi { border-color: rgba(255, 139, 31, .45); }
.defi-corps { padding: .6rem 0; }
.defi-groupe { font-size: .72rem; letter-spacing: 1.4px; color: var(--aura); margin: 0; }
.defi-nom { font-size: 1.35rem; font-weight: 800; margin: .1rem 0; }
.defi-format { font-weight: 600; margin-bottom: .3rem; }
.defi-valide { color: var(--vert); font-weight: 700; }
.defi-repos { color: var(--bleu); font-weight: 600; }
.defi-fait { opacity: .85; }

.frise-defis { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .8rem; }
.case-defi {
  width: 30px; height: 26px; border-radius: 6px; font-size: .62rem; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
  background: var(--fond-doux); border: 1px solid var(--ligne); color: var(--texte-doux);
}
.case-fait { background: rgba(34, 197, 94, .22); border-color: var(--vert); color: var(--vert); }
.case-repos { background: rgba(59, 130, 246, .18); border-color: var(--bleu); color: var(--bleu); }

/* ---------- Paliers ---------- */
.paliers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: .8rem; }
.palier {
  border: 1px dashed var(--ligne); border-radius: 12px; padding: .6rem;
  text-align: center; background: var(--fond-doux); opacity: .6;
}
.palier-ok {
  opacity: 1; border-style: solid; border-color: var(--aura);
  background: rgba(255, 139, 31, .1); box-shadow: 0 0 16px rgba(255, 139, 31, .18);
}
.palier-icone { display: block; font-size: 1.5rem; }
.palier-seuil { display: block; font-weight: 800; }
.palier-nom { display: block; font-size: .74rem; color: var(--texte-doux); }
.palier-reste { display: block; font-size: .68rem; color: var(--texte-doux); margin-top: .2rem; }

/* ---------- Graphiques ---------- */
.graphique { margin-top: .5rem; }
.graphique svg { width: 100%; height: auto; display: block; }
.graphique .vide { color: var(--texte-doux); font-size: .85rem; padding: 1.2rem 0; text-align: center; }
.grille-graphiques { margin-top: 1rem; }
.carte-graphique { background: var(--carte-haute); }
.graphique-valeur { font-size: 1.4rem; font-weight: 800; margin: 0; }
.ecart { font-size: .8rem; font-weight: 600; margin-left: .4rem; }

/* ---------- Séances ---------- */
.seances { display: grid; gap: .8rem; margin-top: .8rem; }
.seance { background: var(--carte-haute); border: 1px solid var(--ligne); border-radius: 12px; overflow: hidden; }
.seance-faite { border-color: var(--vert); }
.seance-repos { opacity: .65; }
.seance-tete {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; padding: .75rem 1rem; cursor: pointer; flex-wrap: wrap;
}
.seance-tete:hover { background: rgba(255, 255, 255, .03); }
.seance-jour { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--aura); margin: 0; }
.seance-titre { font-weight: 700; margin: .1rem 0; }
.seance-meta { font-size: .8rem; color: var(--texte-doux); margin: 0; }
.seance-corps { display: none; padding: 0 1rem 1rem; }
.seance.ouverte .seance-corps { display: block; }
.seance.ouverte .chevron { transform: rotate(180deg); }
.chevron { color: var(--texte-doux); transition: transform .2s; }
.coche { color: var(--vert); font-weight: 700; }
.ex-consigne { display: block; font-size: .76rem; color: var(--texte-doux); font-weight: 400; margin-top: .1rem; }

.etiquette-groupe {
  display: inline-block; font-size: .66rem; text-transform: uppercase; letter-spacing: .6px;
  padding: .1rem .45rem; border-radius: 999px; margin-right: .25rem;
  background: rgba(255, 139, 31, .16); color: var(--orange);
}
.etiquette-pecs    { background: rgba(255, 139, 31, .16); color: var(--orange); }
.etiquette-epaules { background: rgba(59, 130, 246, .18); color: #7fb1ff; }
.etiquette-abdos   { background: rgba(167, 139, 250, .18); color: var(--violet); }
.etiquette-cardio  { background: rgba(255, 210, 63, .18); color: var(--or); }

/* ---------- Nutrition ---------- */
.bloc-repas { background: var(--carte-haute); border: 1px solid var(--ligne); border-radius: 12px; padding: .7rem .8rem; }
.bloc-repas header { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; }
.bloc-kcal { font-weight: 700; margin: 0; }
.liste-menu { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.liste-menu .case { margin: 0; }
.groupe-reco { margin-top: .9rem; }
.jetons { display: flex; flex-wrap: wrap; gap: .35rem; }
.jeton-form { display: inline; }
.jeton {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  background: var(--fond-doux); border: 1px solid var(--ligne); border-radius: 10px;
  padding: .35rem .6rem; color: var(--texte); font: inherit; font-size: .82rem; cursor: pointer;
  width: auto; transition: .15s;
}
.jeton small { color: var(--texte-doux); font-size: .68rem; }
.jeton:hover { border-color: var(--aura); color: var(--aura); }
.jeton-banni { border-color: var(--rouge); color: var(--rouge); background: rgba(248, 113, 113, .1); }
.jeton-proteine { border-left: 3px solid var(--rouge); }
.jeton-feculent { border-left: 3px solid var(--or); }
.jeton-legume   { border-left: 3px solid var(--vert); }
.jeton-fruit    { border-left: 3px solid var(--violet); }
.jeton-laitier  { border-left: 3px solid var(--bleu); }
.jeton-matiere_grasse { border-left: 3px solid var(--orange); }

.bloc-journal { margin-top: .9rem; }
.vignette { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ligne); display: block; }

/* ---------- Calendrier ---------- */
.calendrier { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.mois { background: var(--carte-haute); border: 1px solid var(--ligne); border-radius: 12px; padding: .7rem; }
.mois-tete { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; margin-bottom: .5rem; }
.grille-jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.entete-jour { font-size: .62rem; color: var(--texte-doux); text-align: center; }
.jour {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: .68rem; color: var(--texte-doux); border-radius: 5px; background: var(--fond-doux);
  border: 1px solid transparent;
}
.jour-vide { background: transparent; }
.jour-actuel { border-color: var(--aura); font-weight: 800; color: var(--texte); }
.fond-baisse { background: rgba(34, 197, 94, .55);  color: #06210f; font-weight: 700; }
.fond-hausse { background: rgba(248, 113, 113, .55); color: #260a0a; font-weight: 700; }
.fond-stable { background: rgba(148, 163, 184, .35); color: var(--texte); }
.fond-repos  { background: rgba(59, 130, 246, .35);  color: #dbeafe; }
.avec-seance::after {
  content: ""; position: absolute; bottom: 2px; right: 2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--or);
  box-shadow: 0 0 6px var(--or);
}

.legende { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .76rem; color: var(--texte-doux); margin-top: .8rem; }
.pastille-couleur { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; }
.point-seance { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--or); vertical-align: 1px; margin-right: .3rem; }

/* ---------- Badges ---------- */
.grille-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .7rem; margin-top: .8rem; }
.badge {
  background: var(--carte-haute); border: 1px solid var(--ligne); border-radius: 12px;
  padding: .8rem .7rem; text-align: center;
}
.badge-verrouille { opacity: .45; filter: grayscale(.7); }
.badge-gagne { border-color: var(--aura); box-shadow: 0 0 18px rgba(255, 139, 31, .2); }
.badge-icone { font-size: 1.8rem; display: block; }
.badge-nom { font-weight: 700; font-size: .88rem; margin: .3rem 0 .2rem; }
.badge-description { font-size: .74rem; color: var(--texte-doux); margin: 0; }
.badge-date { font-size: .68rem; color: var(--aura); margin: .4rem 0 0; }
.badge-points { font-size: .68rem; color: var(--texte-doux); margin: .4rem 0 0; }

/* ---------- Boss de la semaine ---------- */
.carte-boss {
  border-color: rgba(248, 113, 113, .5);
  background:
    radial-gradient(600px 200px at 90% 0%, rgba(248, 113, 113, .12), transparent 70%),
    var(--carte);
}
.carte-boss.boss-vaincu { border-color: var(--vert); }
.boss-identite { display: flex; align-items: center; gap: .8rem; }
.boss-icone { font-size: 2.6rem; filter: drop-shadow(0 0 14px rgba(248, 113, 113, .6)); }
.boss-vaincu .boss-icone { filter: grayscale(.8) drop-shadow(0 0 8px var(--vert)); }
.boss-nom { font-size: 1.3rem; font-weight: 800; margin: 0; }
.boss-phrase { font-size: .8rem; color: var(--texte-doux); font-style: italic; margin: .1rem 0 0; }
.boss-pv { text-align: right; }
.boss-pv-valeur { font-size: 1.5rem; font-weight: 900; color: var(--rouge); }
.boss-ko { font-size: 1.2rem; font-weight: 900; color: var(--vert); letter-spacing: 1px; }
.jauge-boss .jauge-vie {
  background: linear-gradient(90deg, #b91c1c, var(--rouge));
  box-shadow: 0 0 12px rgba(248, 113, 113, .5);
}

/* ---------- Scouter ---------- */
.scouter {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 6, .82); backdrop-filter: blur(4px);
  padding: 1rem;
}
.scouter-cadre {
  position: relative; overflow: hidden;
  width: 100%; max-width: 440px;
  background: #06120a;
  border: 2px solid #22c55e;
  border-radius: var(--rayon);
  box-shadow: 0 0 40px rgba(34, 197, 94, .35), inset 0 0 60px rgba(34, 197, 94, .08);
  padding: 1.4rem 1.5rem;
  color: #86efac;
  font-family: "Consolas", "Segoe UI Mono", monospace;
}
.scouter-scan {
  position: absolute; left: 0; right: 0; top: -40%; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(34, 197, 94, .18));
  animation: scouter-balayage 1.6s ease-in-out 2;
  pointer-events: none;
}
@keyframes scouter-balayage {
  0% { top: -40%; } 100% { top: 100%; }
}
.scouter-titre {
  text-align: center; letter-spacing: 3px; font-size: .8rem;
  color: #4ade80; margin-bottom: 1rem;
  animation: scouter-clignote 1s steps(2) 3;
}
@keyframes scouter-clignote { 50% { opacity: .25; } }
.scouter-lignes { display: grid; gap: .45rem; margin-bottom: 1.2rem; }
.scouter-ligne {
  margin: 0; font-size: .95rem; opacity: 0; transform: translateX(-8px);
  transition: opacity .4s, transform .4s;
}
.scouter-ligne.visible { opacity: 1; transform: none; }
.scouter-ligne strong { color: #dcfce7; }
.scouter-puissance { font-size: 1.3rem; text-shadow: 0 0 14px rgba(34, 197, 94, .7); }
.scouter-badge { color: var(--or); }
.scouter-fermer { width: 100%; }

/* ---------- Galerie d'évolution ---------- */
.comparaison { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
.comparaison-photo { margin: 0; }
.comparaison-photo img {
  width: 100%; max-height: 480px; object-fit: contain;
  background: var(--fond-doux); border: 1px solid var(--ligne); border-radius: 12px;
}
.comparaison-photo figcaption { font-size: .8rem; color: var(--texte-doux); margin-top: .3rem; text-align: center; }

.galerie-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-top: .8rem; }
.galerie-vignette { margin: 0; }
.galerie-vignette img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border: 1px solid var(--ligne); border-radius: 10px; display: block;
}
.galerie-vignette figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: .3rem;
  font-size: .76rem; color: var(--texte-doux); margin-top: .25rem; flex-wrap: wrap;
}
.galerie-vignette small { flex-basis: 100%; }

/* ---------- Jeûne intermittent ---------- */
.carte-jeune { border-color: rgba(167, 139, 250, .45); }
.jeune-etat {
  display: inline-block;
  background: var(--carte-haute); border: 1px solid var(--ligne);
  border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .9rem;
}
.jeune-ouverte { border-color: var(--vert); color: var(--vert); background: rgba(34, 197, 94, .1); }
.jeune-fermee  { border-color: var(--violet); color: var(--violet); background: rgba(167, 139, 250, .1); }

.lien-discret {
  background: none; border: none; padding: 0; width: auto;
  color: var(--texte-doux); font: inherit; font-size: .72rem;
  text-decoration: underline; cursor: pointer;
}
.lien-discret:hover { color: var(--rouge); }

/* ---------- Écarts et grignotages ---------- */
.carte-ecart { border-color: rgba(255, 210, 63, .38); }
.fieldset-fin { padding: .3rem .6rem; }
.fieldset-fin .case { margin-right: .4rem; }
.fieldset-fin select { margin-top: .2rem; }
.bloc-extra { border: 1px dashed rgba(255, 210, 63, .45); border-radius: 12px; padding: .5rem .7rem; }
.jeton-ecart {
  flex-direction: row; align-items: center; gap: .45rem; cursor: default;
  border-left: 3px solid var(--or);
}
.jeton-ecart:hover { border-color: var(--ligne); border-left-color: var(--or); color: var(--texte); }
.jeton-ecart .vignette { width: 38px; height: 38px; }

/* ---------- Réglage des repas ---------- */
.carte-repas { border-color: rgba(255, 139, 31, .35); }
.cases-repas {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .5rem; margin: .8rem 0 1rem;
}
.case-repas {
  margin: 0; padding: .55rem .7rem; border-radius: 10px;
  background: var(--fond-doux); border: 1px solid var(--ligne);
  transition: .15s;
}
.case-repas-active { border-color: var(--aura); background: rgba(255, 139, 31, .08); }
.case-repas small { margin-top: .1rem; }

/* ---------- Mode magasin ---------- */
.magasin { max-width: 620px; margin: 0 auto; }
.magasin-tete {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-bottom: .3rem;
}
.magasin-compteur { font-size: 1.2rem; margin: 0; }
.magasin-compteur strong { font-size: 1.7rem; color: var(--aura); }
.magasin-rayon { margin-top: 1.2rem; }
.magasin-rayon h2 { color: var(--texte); font-size: 1rem; margin-bottom: .4rem; }

.ligne-magasin {
  display: flex; align-items: stretch; gap: .4rem;
  background: var(--carte); border: 1px solid var(--ligne);
  border-radius: 12px; margin-bottom: .45rem; overflow: hidden;
}
.ligne-principale { flex: 1; display: flex; }
.magasin-bouton {
  flex: 1; display: flex; align-items: center; gap: .7rem;
  /* Cible tactile confortable : on coche d'une main, en marchant. */
  min-height: 62px; padding: .6rem .8rem;
  background: none; border: none; color: var(--texte);
  font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.magasin-bouton:active { background: rgba(255, 255, 255, .06); }
.magasin-coche { font-size: 1.7rem; line-height: 1; color: var(--aura); flex-shrink: 0; }
.magasin-libelle { flex: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.magasin-nom { font-size: 1rem; font-weight: 600; }
.magasin-libelle small { font-size: .78rem; }

.ligne-secondaire { display: flex; }
.bouton-introuvable {
  height: 100%; min-width: 74px; padding: .4rem .5rem;
  background: var(--carte-haute); border: none; border-left: 1px solid var(--ligne);
  color: var(--texte-doux); font: inherit; font-size: .72rem; cursor: pointer;
}
.bouton-introuvable:active { background: rgba(255, 210, 63, .18); color: var(--or); }

.ligne-pris { opacity: .45; }
.ligne-pris .magasin-nom { text-decoration: line-through; }
.ligne-introuvable { border-color: var(--or); background: rgba(255, 210, 63, .07); }
.ligne-introuvable .bouton-introuvable { color: var(--or); }
.envoi-en-cours { opacity: .5; }
.magasin-pied { margin-top: 1.2rem; }

@media (max-width: 720px) {
  .magasin-bouton { min-height: 68px; }
  .magasin-nom { font-size: 1.05rem; }
}

/* ---------- Courses ---------- */
.carte-courses { border-color: rgba(56, 189, 248, .35); }
.rayon { margin-top: 1rem; }
.rayon h3 { margin: 0 0 .3rem; color: var(--texte); }

.liste-courses { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.article {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: .5rem;
  background: var(--carte-haute); border: 1px solid var(--ligne);
  border-radius: 10px; padding: .4rem .6rem;
}
.article-pris { opacity: .5; }
.article-pris .article-nom { text-decoration: line-through; }
.article-introuvable { border-color: var(--or); background: rgba(255, 210, 63, .07); }
.article-nom { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: .9rem; }
.article-nom small { font-size: .72rem; }
.article-quantite { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.case-course {
  background: none; border: none; color: var(--aura);
  font-size: 1.2rem; cursor: pointer; padding: 0 .2rem; width: auto; line-height: 1;
}
.conseils {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
  padding-top: .35rem; font-size: .78rem;
}
.jeton-conseil { flex-direction: row; align-items: center; gap: .4rem; cursor: default; }
.jeton-conseil:hover { border-color: var(--ligne); color: var(--texte); }

.nutriscore {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px;
  font-weight: 800; font-size: .72rem; color: #10151f;
}
.nutri-a { background: #22c55e; }
.nutri-b { background: #84cc16; }
.nutri-c { background: #facc15; }
.nutri-d { background: #fb923c; }
.nutri-e { background: #ef4444; color: #fff; }

.grille-jeune {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: .5rem; margin: .8rem 0 1rem;
}
.jour-jeune {
  background: var(--fond-doux); border: 1px solid var(--ligne);
  border-radius: 10px; padding: .5rem; text-align: center;
}
.jour-jeune-actif { border-color: var(--violet); background: rgba(167, 139, 250, .1); }
.jour-jeune-nom { display: block; font-weight: 700; color: var(--texte); font-size: .85rem; }
.jour-jeune-date { display: block; font-size: .7rem; color: var(--texte-doux); margin-bottom: .3rem; }
.jour-jeune select { font-size: .78rem; padding: .25rem; }

.jour-menu { background: var(--carte-haute); border: 1px solid var(--ligne); border-radius: 12px; padding: .7rem .8rem; }
.jour-menu-jeune { border-color: rgba(167, 139, 250, .45); }
.jour-passe { opacity: .55; }
.etiquette-repas { margin-top: .6rem; color: var(--aura); }

/* ---------- Jeûne long ---------- */
.carte-jeune-long {
  border-color: rgba(129, 140, 248, .5);
  background:
    radial-gradient(600px 200px at 15% 0%, rgba(129, 140, 248, .14), transparent 70%),
    var(--carte);
}
.jeune-long-duree {
  font-size: 2.2rem; font-weight: 900; margin: 0; letter-spacing: -1px;
  color: #a5b4fc; text-shadow: 0 0 20px rgba(129, 140, 248, .45);
}
.jeune-long-cible { text-align: right; }
.jeune-long-ok { font-weight: 800; color: var(--vert); }

/* ---------- Gainage ---------- */
.carte-gainage { border-color: rgba(167, 139, 250, .4); }
.gainage-objectif { font-size: 1.2rem; margin: .2rem 0 .1rem; }
.gainage-objectif strong { color: var(--violet); }
.gainage-resultat { font-size: 1.3rem; font-weight: 800; color: var(--vert); margin: .2rem 0; }

/* ---------- Catalogue d'exercices écartés ---------- */
.details-catalogue summary {
  cursor: pointer; font-size: .85rem; color: var(--aura);
  padding: .35rem 0; user-select: none;
}
.details-catalogue summary:hover { text-decoration: underline; }
.details-catalogue h3 { margin-top: .9rem; }

/* ---------- Hydratation ---------- */
.jauge-eau .jauge-remplissage {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, .45);
}
.jeton-boisson { flex-direction: row; align-items: center; gap: .3rem; cursor: default; }
.jeton-boisson:hover { border-color: var(--ligne); color: var(--texte); }

/* ---------- Connexion ---------- */
.ecran-connexion { width: 100%; max-width: 420px; }
.carte-connexion { border-color: var(--orange); }
.connexion-entete { text-align: center; margin-bottom: 1.2rem; }
.connexion-dragon { font-size: 3rem; display: block; filter: drop-shadow(0 0 18px var(--orange)); }

/* ---------- Petits écrans ---------- */
@media (max-width: 720px) {
  .topbar { padding: .6rem .8rem; }
  .onglets { width: 100%; justify-content: space-between; }
  .onglet-texte { display: none; }
  .onglet { flex: 1 1 auto; justify-content: center; font-size: 1.05rem; padding: .5rem .4rem; }
  .puissance-valeur { font-size: 1.9rem; }
  .page { padding: 1rem .7rem 3rem; }
  .carte { padding: .9rem; }
  .comparaison { grid-template-columns: 1fr; }
  .boss-pv { text-align: left; }
}
