/* myStrava V2 — thème "Ascension" (unique, assumé, pas de bascule clair/sombre).
   Couchant sur un col : violet nocturne -> braise -> ambre, brume, soleil qui respire,
   profil altimétrique comme motif récurrent. Choix validé par l'utilisateur. */

* { box-sizing: border-box; }

/* Rendu texte IA riche (2026-08-17) — sortie de formatAiText()/formatAiBold() (layout.php),
   utilisé partout où Gemini génère du texte libre : Coach IA, analyse d'activité, bilan
   bien-être, bannières du plan. Générique (pas scopé à une classe parente) car ces mêmes
   marqueurs (**gras**, *italique*, ==surligné==, __souligné__, listes à puces, ##titres)
   ressortent dans des conteneurs différents selon la page. */
strong { font-weight: 700; }
em { font-style: italic; color: #E3BBA0; }
mark { background: rgba(255,194,77,0.32); color: inherit; padding: 0 3px; border-radius: 3px; }
u { text-decoration: underline; text-decoration-color: #FFC24D; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.ai-heading { font-weight: 700; color: #FFC24D; font-size: 1.02em; margin: 12px 0 4px; }
.ai-heading:first-child { margin-top: 0; }
.ai-list { margin: 4px 0 8px; padding-left: 20px; }
.ai-list li { margin-bottom: 4px; }
.ai-list li::marker { color: #FFC24D; }
.ai-table-wrap { overflow-x: auto; margin: 6px 0 10px; -webkit-overflow-scrolling: touch; }
.ai-table { border-collapse: collapse; font-size: 0.86em; min-width: 100%; }
.ai-table th { text-align: left; font-weight: 700; color: #FFC24D; padding: 6px 10px; border-bottom: 1px solid rgba(255,194,77,0.4); white-space: nowrap; }
.ai-table td { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: top; }
.ai-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  /* Filet de sécurité inconditionnel : aucune page de ce site n'a besoin de défilement
     horizontal, et un débordement local (mot trop long, chaîne flex imbriquée sans min-width:0
     quelque part) ne doit jamais élargir la page entière plutôt que déborder proprement dans son
     propre conteneur (retour utilisateur 2026-08-16 sur coach.php, persistant malgré plusieurs
     correctifs ciblés — ceci les rend redondants mais pas inutiles : mieux vaut ne jamais
     dépendre uniquement de ce filet). */
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #FBF3EA;
  background: linear-gradient(180deg, #1B0F2E 0%, #4A2140 32%, #A83F26 68%, #E07A1E 100%);
  background-attachment: fixed;
}

a { color: #FFC24D; }
a:hover { color: #FF7A1A; }

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

/* Atmosphère (brume + soleil), injectée par renderHeader() sur chaque page ---------------- */
.atmosphere { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.atmosphere .mist {
  position: absolute; border-radius: 50%; filter: blur(30px);
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
}
.atmosphere .mist.m1 { width: 340px; height: 140px; top: 12%; left: -5%; animation: drift1 22s ease-in-out infinite; }
.atmosphere .mist.m2 { width: 260px; height: 110px; top: 26%; right: -8%; animation: drift2 26s ease-in-out infinite; }
.atmosphere .mist.m3 { width: 200px; height: 90px;  top: 6%;  left: 40%; animation: drift1 30s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translateX(0); } 50% { transform: translateX(60px); } }
@keyframes drift2 { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-70px); } }
.atmosphere .sun {
  position: absolute; left: 50%; top: 34%; width: 260px; height: 260px; margin-left: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,140,0.7) 0%, rgba(255,150,50,0.28) 45%, rgba(255,150,50,0) 72%);
  animation: sunpulse 4.5s ease-in-out infinite;
}
@keyframes sunpulse { 0%,100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* Nav ------------------------------------------------------------------------------------- */
.topnav {
  /* z-index 20 (pas 10) : .nav-links est un DESCENDANT de .topnav, donc son propre z-index:16
     (plus bas) n'est comparé qu'aux autres enfants de .topnav — il ne "sort" jamais du contexte
     d'empilement créé ici par position+z-index. Avec .topnav à 10, .nav-backdrop (z-index:15,
     un frère de <nav>, pas un enfant) passait DEVANT tout le bloc .topnav, tiroir ouvert inclus
     — d'où le menu qui s'assombrissait lui aussi au lieu du seul fond (bug rapporté 2026-08-16). */
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  padding: 16px 24px;
  background: rgba(10,6,14,0.32);
  backdrop-filter: blur(8px);
  overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.topnav .brand { font-weight: 800; letter-spacing: 0.01em; margin-right: 20px; color: #FBF3EA; flex-shrink: 0; }
/* Bandeau STAGING (2026-08-26) — bordure + fond distincts, intégrés à la nav sticky existante
   plutôt qu'un bandeau séparé, pour rester visible en permanence sans dupliquer la logique de
   sticky. N'apparaît que si layout.php: renderHeader() détecte APP_ENV=staging (absent en prod). */
.topnav-staging { background: rgba(255,122,26,0.22); border-bottom: 2px solid #FF7A1A; }
.staging-tag { font-size: 0.68rem; font-weight: 700; color: #FF7A1A; background: rgba(255,122,26,0.18); border: 1px solid #FF7A1A66; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

/* Bannière de maintenance (étape 8, phasage V3) — app_config.maintenance_banner, réglable depuis
   admin/config.php. Sous la nav (déjà sticky), pas de position propre : défile avec le contenu. */
.maintenance-banner { background: rgba(255,60,60,0.16); border-bottom: 2px solid #ff5555; color: #fbf3ea; text-align: center; padding: 8px 16px; font-size: 0.85rem; font-weight: 600; }
.topnav a {
  color: rgba(251,243,234,0.68); text-decoration: none;
  font-size: 0.84rem; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  transition: all .2s;
  /* Sans ça, les liens se tassaient (flex-shrink par défaut) au lieu de faire défiler
     proprement la barre sur mobile — l'overflow-x:auto ci-dessus ne servait à rien tant que
     les items pouvaient encore rétrécir pour tenir dans le viewport. */
  flex-shrink: 0;
}
.topnav a.active {
  color: #2A1509;
  background: linear-gradient(90deg, #FF7A1A, #FFC24D);
  box-shadow: 0 0 14px rgba(255,122,26,0.45);
  animation: navglow 2.6s ease-in-out infinite;
}
@keyframes navglow { 0%,100% { box-shadow: 0 0 12px rgba(255,122,26,0.35); } 50% { box-shadow: 0 0 20px rgba(255,122,26,0.7); } }
.topnav a:hover:not(.active) { background: rgba(255,255,255,0.1); color: #FBF3EA; text-decoration: none; }
.topnav .spacer { flex: 1; }

/* Nav mobile — menu hamburger (2026-08-16, remplace une première tentative de simple défilement
   horizontal, jugée peu utilisable : les liens se tassaient/défilaient mal au doigt). Sous 640px,
   les liens quittent le flux de la topnav pour un tiroir plein écran qui glisse depuis la droite,
   avec des cibles tactiles larges plutôt que la barre compacte du desktop. */
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-toggle {
  display: none; background: none; border: none; color: #FBF3EA; font-size: 1.4rem;
  cursor: pointer; padding: 4px 10px; margin-left: auto; flex-shrink: 0; line-height: 1;
}
.nav-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(10,6,14,0.6); z-index: 15;
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .topnav { overflow: visible; }
  .nav-links {
    position: fixed; top: 0; left: 0; height: 100dvh; width: min(270px, 80vw);
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #1B0F2E; padding: 76px 16px 24px; box-sizing: border-box;
    transform: translateX(-100%); transition: transform .25s ease;
    z-index: 16; overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 13px 16px; font-size: 0.95rem; }
  .nav-links .spacer { display: none; }
  .nav-backdrop.open { display: block; }
}

/* Hero (en-tête de page : titre + stats + profil altimétrique) ---------------------------- */
.hero { position: relative; z-index: 2; max-width: 1040px; margin: 0 auto; padding: 40px 28px 0; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-row h1 { font-size: 1.9rem; font-weight: 800; margin: 0; letter-spacing: -0.015em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,0.35); }
.hero-row .sub { font-size: 0.85rem; color: #E3BBA0; }
.hero-row .sub b { color: #FFC24D; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 16px;
  backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(20px) scale(0.97); filter: blur(6px);
  animation: climb 0.7s cubic-bezier(.2,.8,.2,1) forwards;
  transition: transform .25s, box-shadow .25s;
}
.stat:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.stat:nth-child(1) { animation-delay: .05s; } .stat:nth-child(2) { animation-delay: .13s; }
.stat:nth-child(3) { animation-delay: .21s; } .stat:nth-child(4) { animation-delay: .29s; }
.stat:nth-child(5) { animation-delay: .37s; } .stat:nth-child(6) { animation-delay: .45s; }
@keyframes climb { to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
.stat .n { font-size: 1.65rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #FFC24D; }
.stat.hi .n { text-shadow: 0 0 18px rgba(255,194,77,0.6); }
.stat .l { font-size: 0.68rem; color: #E3BBA0; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

.profile-wrap { position: relative; margin: 12px 0 -6px; }
.profile { display: block; width: 100%; height: 90px; overflow: visible; }
.profile-hover { position: absolute; inset: 0; z-index: 3; cursor: crosshair; }
.profile-hover > div { position: absolute; opacity: 0; transition: opacity .12s; pointer-events: none; }
.profile-hover.on > div { opacity: 1; }
.profile-hover .ph-line { top: 0; bottom: 0; width: 1px; background: rgba(255,231,184,0.45); }
.profile-hover .ph-dot { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #FFE7B8; box-shadow: 0 0 10px rgba(255,194,77,0.9); }
.profile-hover .ph-tip { transform: translateX(-50%); white-space: nowrap; font-size: 0.72rem; font-weight: 600; color: #2A1509; background: #FFC24D; padding: 3px 8px; border-radius: 6px; }
.profile-caption { position: absolute; top: -14px; right: 0; font-size: 0.66rem; color: #E3BBA0; z-index: 3; }
.profile-caption a { color: #FFC24D; }
.profile path.fill { animation: fillrise 1.6s ease-out forwards; transform-origin: bottom; }
@keyframes fillrise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.profile path.line {
  stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: hikedraw 2s ease-out forwards;
  filter: drop-shadow(0 0 6px rgba(255,194,77,0.7));
}
@keyframes hikedraw { to { stroke-dashoffset: 0; } }
.hiker {
  offset-path: path("M0,60 L120,40 L260,55 L400,20 L540,45 L680,15 L820,50 L960,30");
  animation: hike 9s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255,194,77,0.9));
}
@keyframes hike { 0% { offset-distance: 0%; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* Panel (contenu principal, fond assombri lisible même sur une longue liste) --------------- */
.panel {
  position: relative; z-index: 2;
  background: rgba(16,8,14,0.62); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 28px 28px 64px;
  min-height: 40vh;
}
.panel-inner { max-width: 1000px; margin: 0 auto; }
.panel h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; color: #FBF3EA; }
.panel h2:not(:first-child) { margin-top: 28px; }

/* Listes à lignes (activités, matériel, parcours, cache IA...) -----------------------------
   Pas de tilt 3D ici : sur un élément aussi large et plat qu'une ligne pleine largeur, une
   rotation même légère produit un cisaillement visuel disproportionné (repéré en test réel).
   Le tilt "carte" reste réservé aux .stat (carrées) du hero. */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  position: relative; overflow: hidden; z-index: 1;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 14px 16px;
  text-decoration: none; color: inherit;
  transition: transform .18s ease-out, background .2s, box-shadow .25s, border-color .2s, opacity .25s, filter .25s;
}
.row::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 50%), rgba(255,194,77,0.18), transparent 70%);
  opacity: 0; transition: opacity .25s;
}
.row:hover {
  background: rgba(255,122,26,0.1); border-color: rgba(255,122,26,0.55);
  box-shadow: 0 14px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,194,77,0.2);
  transform: translateY(-3px) scale(1.008);
  z-index: 2;
  text-decoration: none;
}
.row:hover::before { opacity: 1; }
.row > * { position: relative; z-index: 1; }
.list:has(.row:hover) .row:not(:hover) { opacity: 0.55; filter: saturate(0.7) blur(0.3px); transform: scale(0.985); }

.row .icon { font-size: 1.15rem; filter: drop-shadow(0 0 6px rgba(0,0,0,0.4)); }
.row .name { flex: 1 1 160px; font-weight: 600; font-size: 0.92rem; min-width: 0; }
.row .date { color: #E3BBA0; font-size: 0.8rem; width: 74px; flex-shrink: 0; }
.row .value { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 70px; text-align: right; color: #FFC24D; flex-shrink: 0; }
.row .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Ligne d'activité (activities.php) — deux groupes (.row-primary : icône/nom/date,
   .row-stats : valeurs) plutôt que des enfants à plat, pour pouvoir les empiler en carte 2
   lignes sous 640px sans dupliquer les règles .row .name/.date/.value ci-dessus (sélecteurs
   descendants, ils s'appliquent quelle que soit la profondeur d'imbrication). */
.row-primary { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0; }
.row-stats { display: flex; align-items: center; gap: 16px; }
.stat-extra { display: none; }
.day-label { display: none; }

@media (max-width: 640px) {
  /* Regroupement par jour (maquette validée 2026-08-16) : label discret + ligne fine, purement
     visuel — le regroupement lui-même est déjà fait côté PHP (activityDayBucket()). */
  .day-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    color: #9C8778; margin: 18px 2px 8px;
  }
  .day-label:first-child { margin-top: 2px; }
  .day-label::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.08); }

  /* Carte : fond translucide sans bordure dure (la bordure lisible en desktop devient superflue
     une fois qu'on est en pile de cartes, elle alourdissait plutôt qu'elle ne délimitait). */
  .row {
    flex-direction: column; align-items: stretch; gap: 10px;
    border-color: transparent; border-radius: 16px; padding: 12px;
  }
  .row-primary { gap: 10px; }
  .row-stats { flex-wrap: wrap; gap: 6px; padding-left: 44px; }
  .row .date { width: auto; margin-left: auto; }
  .stat-extra { display: inline; }

  /* Badge rond coloré par sport, à la place de l'icône nue — se lit avant même le texte. */
  .row .icon {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; filter: none;
  }
  .row .icon.badge-run { background: rgba(255,122,26,0.16); }
  .row .icon.badge-ride { background: rgba(96,165,250,0.16); }
  .row .icon.badge-walk { background: rgba(52,211,153,0.16); }
  .row .icon.badge-workout { background: rgba(167,139,250,0.16); }

  /* Stats en pastilles — colorée pour la distance (identifie le sport une 2e fois, en chiffres
     cette fois), neutre pour le reste (durée/allure/D+), plutôt que des valeurs alignées à droite. */
  .row .value {
    text-align: left; min-width: 0; font-size: 0.68rem; font-weight: 700;
    padding: 2px 8px; border-radius: 20px; color: #FBF3EA;
  }
  .row .value.chip-run { background: rgba(255,122,26,0.14); }
  .row .value.chip-ride { background: rgba(96,165,250,0.14); }
  .row .value.chip-walk { background: rgba(52,211,153,0.14); }
  .row .value.chip-workout { background: rgba(167,139,250,0.14); }
  .row .value.chip-neutral { background: rgba(255,255,255,0.06); color: #E3BBA0; font-weight: 600; }

  /* Survol/tilt hérités du desktop — sans sens au doigt, et peuvent rester "collés" après un tap
     sur certains navigateurs mobiles (:hover persistant). Neutralisés plutôt que retirés : la
     transition reste utilisable au clavier/souris si la page est ouverte sur un mobile connecté
     à un trackpad. */
  .row:hover {
    background: rgba(255,255,255,0.055); border-color: transparent;
    box-shadow: none; transform: none;
  }
  .row:active { background: rgba(255,255,255,0.09); transform: scale(0.985); }
  .row:hover::before { opacity: 0; }
  .list:has(.row:hover) .row:not(:hover) { opacity: 1; filter: none; transform: none; }
}

/* Sections repliables (<details>/<summary>, ex. Tours/Graphiques sur activity.php) — remplace le
   triangle natif du navigateur par un chevron qui pivote à l'ouverture, cohérent avec le reste
   de l'identité "Ascension" plutôt que le style par défaut du navigateur. */
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "›"; display: inline-block; margin-left: 8px; color: #9C8778;
  transition: transform .2s; transform: rotate(90deg); font-weight: 700;
}
details:not([open]) summary::after { transform: rotate(0deg); }

/* Retour à la liste (activity.php) — bouton rond discret plutôt qu'un lien texte souligné, plus
   proche d'un geste de navigation ("‹ retour") que d'un lien de contenu (2026-08-16). */
.back-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 16px;
  background: rgba(255,255,255,0.05); color: #E3BBA0; font-size: 1.05rem;
  text-decoration: none; transition: background .15s, color .15s;
}
.back-link:hover { background: rgba(255,255,255,0.1); color: #FBF3EA; text-decoration: none; }
.back-link:active { background: rgba(255,255,255,0.14); }

/* Cartes de section repliables (activity.php : Météo/Tours/Graphiques/Progression/Coach IA/
   Kudos — maquette validée 2026-08-16) : même traitement que les autres cartes translucides de
   l'appli, le <summary> sert d'en-tête cliquable pleine largeur plutôt qu'un <h2> à part. */
.section { background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.10); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.section > summary { padding: 14px 16px; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.section-body { padding: 0 16px 16px; }

/* Hero-chips du détail d'activité (activity.php, mobile uniquement — maquette validée
   2026-08-16) : les cartes .stats du hero génériques sont masquées sur mobile, ce composant
   dédié restaure les chiffres-clés de LA séance consultée. */
.activity-hero-chips { display: none; }
@media (max-width: 640px) {
  .activity-hero-chips { display: flex; gap: 8px; margin: 0 0 16px; }
  .hero-chip { flex: 1 1 70px; background: rgba(255,255,255,0.045); border-radius: 12px; padding: 10px 8px; text-align: center; }
  .hero-chip .v { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #60A5FA; line-height: 1.1; }
  .hero-chip .l { font-size: 0.62rem; color: #E3BBA0; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }

  /* Carte réduite en hauteur (320px fixe était la plus grosse source de "lourdeur" signalée). */
  .activity-map { height: 160px; }
}

/* Cartes génériques (semaines de plan, blocs) ---------------------------------------------- */
.card {
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 16px;
}

/* Matériel — grille de cartes (portage fidèle de .gear-grid/.gear-card, style.css V1 l.1095-1167,
   couleurs seules adaptées à Ascension) : préféré par l'utilisateur à un format liste. */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gear-card {
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  padding: 20px 16px; display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; transition: box-shadow .15s ease, transform .15s ease;
}
.gear-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.35); transform: translateY(-3px); }
.gear-icon { font-size: 2.4rem; margin-bottom: 10px; }
.gear-name { font-weight: 700; font-size: 0.9rem; color: #FBF3EA; margin-bottom: 4px; }
.gear-dist { font-size: 1.4rem; font-weight: 800; color: #FF7A1A; margin-bottom: 2px; }
.gear-count { font-size: 0.72rem; color: #E3BBA0; }
.gear-edit-btn {
  position: absolute; top: 12px; right: 12px; border: none; background: rgba(255,255,255,0.08);
  border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 0.78rem; color: #E3BBA0; transition: all .15s ease;
}
.gear-edit-btn:hover { background: #FF7A1A; color: #2A1509; transform: rotate(15deg); }
.gear-card .edit-panel { text-align: left; width: 100%; }
.gear-card .edit-panel form { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

@media (max-width: 640px) {
  /* Déjà proche du style cible (maquette validée 2026-08-16, préféré par l'utilisateur à un
     format liste — cf. commentaire ci-dessus) : ajustement mineur, pas de refonte. 1 colonne
     pleine largeur plutôt que 2 colonnes serrées à ~180px sur les écrans les plus larges de la
     tranche mobile, et champs du panneau d'édition en pleine largeur (cibles tactiles). */
  .gear-grid { grid-template-columns: 1fr; }
  .gear-card { padding: 16px 14px; }
  .gear-card .edit-panel input, .gear-card .edit-panel select { width: 100%; }
}

/* Répartition par type d'activité (activities.php, 2026-08-17) — nb sorties/km/temps par sport,
   TOUJOURS visible desktop+mobile (contrairement aux chips .stats du hero, masquées sur mobile
   ci-dessus : retour utilisateur signalant justement ces chiffres introuvables en mobile). */
.type-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.type-stats-card { background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 14px; }
.type-stats-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.85rem; margin-bottom: 10px; }
.type-stats-icon { font-size: 1.1rem; }
.type-stats-row { display: flex; justify-content: space-between; gap: 6px; }
.type-stats-v { font-size: 1rem; font-weight: 800; color: #FFC24D; font-variant-numeric: tabular-nums; text-align: center; }
.type-stats-l { font-size: 0.62rem; color: #E3BBA0; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; margin-top: 2px; }
@media (max-width: 640px) {
  .type-stats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .type-stats-card { padding: 12px; }
}

/* Usure matériel (portage fidèle de .gear-progress-bg/-fill, style.css V1 l.1156-1167) -------- */
.gear-progress-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.gear-progress-fill { height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.34, 1.20, 0.64, 1); }

/* Planning — Calendrier mensuel (portage fidèle de .cal-*, style.css V1 l.996-1089, couleurs
   seules adaptées à Ascension : accent #FF7A1A, texte secondaire #E3BBA0, tertiaire #8C7A72). */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-nav-center { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; color: #FBF3EA; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; overflow: hidden; }
.cal-weekday-header { background: rgba(255,255,255,0.08); color: #E3BBA0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; text-align: center; padding: 8px 0; }
.cal-day-cell { background: rgba(20,10,20,0.5); min-height: 84px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-day-cell.other-month { background: rgba(20,10,20,0.25); opacity: 0.5; }
.cal-day-cell.today { background: linear-gradient(to bottom, rgba(255,122,26,0.14), transparent 60%); box-shadow: inset 0 0 0 1.5px #FF7A1A; }
.cal-day-number { font-size: 12px; font-weight: 700; color: #E3BBA0; }
.cal-day-cell.today .cal-day-number { color: #FF7A1A; }
.cal-event-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-event-chip { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; flex-shrink: 0; text-decoration: none; transition: transform .15s; }
.cal-event-chip:hover { transform: scale(1.15); }
.cal-event-chip.done { background: #FF7A1A; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.cal-event-chip.planned { background: rgba(255,255,255,0.08); border: 1.5px solid #8C7A72; }
@media (max-width: 600px) {
  .cal-day-cell { min-height: 56px; padding: 4px; }
  .cal-event-chip { width: 18px; height: 18px; font-size: 10px; }
  .cal-weekday-header { font-size: 9px; padding: 4px 0; }
}

/* Planning — comparaison de 2 semaines (pas de classe dédiée en V1, construite en JS inline à
   l'époque) : réutilise .card + une petite grille de mini-stats, même esprit que le badge de
   compliance mini-renfo/gros-renfo déjà présent dans la vue semaine de plan.php. */
.week-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .week-compare-grid { grid-template-columns: 1fr; } }
.week-compare-ministat { text-align: center; padding: 8px; background: rgba(255,255,255,0.06); border-radius: 8px; }
.week-compare-ministat .n { font-size: 18px; font-weight: 700; }
.week-compare-ministat .l { font-size: 11px; color: #E3BBA0; }
.week-compare-row { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* Forme & Récupération (KPIs Garmin + check-in subjectif) — pas de classe V1 directement
   réutilisable (kpi-grid/kpi-card de V1 sont pensées "compactes horizontales", ici chaque carte
   porte beaucoup plus d'info : icône/label/valeur/badge/sous-texte/barre) : nouvelles classes
   dans le même esprit que .gear-card déjà en place (mêmes tokens de surface/bordure). */
.forme-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.forme-kpi-card { background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 16px; }
.forme-kpi-icon { font-size: 1.4rem; margin-bottom: 6px; }
.forme-kpi-label { font-size: 0.72rem; color: #E3BBA0; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.forme-kpi-value { font-size: 1.5rem; font-weight: 800; }
.forme-kpi-unit { font-size: 0.7rem; font-weight: 500; opacity: 0.7; }
.forme-kpi-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.forme-kpi-sub { font-size: 0.72rem; color: #8C7A72; margin-top: 6px; }
/* Distingue visuellement les tuiles rafraîchies à chaque cron (~20 min) de celles figées au
   réveil (HRV/sommeil/Body Battery de référence) — ajouté le 2026-08-17 après retour utilisateur
   ("je ne vois pas de notion de live"), le passage live/cœur étant jusque-là invisible en UI. */
.forme-kpi-tag { display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em; text-transform: none; margin-left: 6px; }
.forme-kpi-tag.is-live { color: #34D399; }
.forme-kpi-tag.is-live::before { content: '● '; }
.forme-kpi-tag.is-frozen { color: #8C7A72; }
.forme-kpi-tag.is-frozen::before { content: '○ '; }

/* Tuile Body Battery à double vue (live / réveil), alternée au clic — ajouté le 2026-08-17 à la
   demande de l'athlète pour comparer les deux d'un coup d'œil sans les afficher simultanément.
   Les deux vues sont rendues côté PHP, seule leur visibilité change ici : évite de dupliquer le
   formatage (couleurs, arrondis, pluriels) en JS. */
.forme-kpi-toggle { cursor: pointer; }
.forme-kpi-toggle .bb-tag-wake { display: none; }
.forme-kpi-toggle .bb-view-wake { display: none; }
.forme-kpi-toggle.show-wake .bb-tag-live { display: none; }
.forme-kpi-toggle.show-wake .bb-tag-wake { display: inline-block; }
.forme-kpi-toggle.show-wake .bb-view-live { display: none; }
.forme-kpi-toggle.show-wake .bb-view-wake { display: block; }
.forme-no-data { color: #E3BBA0; font-size: 0.85rem; grid-column: 1/-1; }

@media (max-width: 640px) {
  /* 2 colonnes fixes plutôt que auto-fill(190px) : à 190px la 2e colonne ne tient déjà plus sur
     un écran ~360-390px, retombant en 1 seule colonne large (maquette validée 2026-08-16 visait
     explicitement 2 pastilles par ligne, pas une pile de cartes pleine largeur). */
  .forme-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .forme-kpi-card { padding: 12px; }
  .forme-kpi-value { font-size: 1.2rem; }
}

.checkin-form { display: flex; flex-direction: column; gap: 12px; }
.checkin-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.checkin-label { font-size: 0.85rem; min-width: 90px; }
.checkin-scale { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.checkin-hint { font-size: 0.72rem; color: #8C7A72; margin-left: 6px; }
/* Boutons d'échelle = <label> associés à un <input type=radio> caché (pas de JS) : le style
   "actif" suit simplement :checked, cohérent avec la philosophie formulaires-natifs du projet. */
.checkin-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.checkin-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #FBF3EA; font-weight: 700; cursor: pointer; user-select: none; }
.checkin-radio:checked + .checkin-btn { background: #FF7A1A; border-color: #FF7A1A; color: #2A1509; }
.checkin-radio:focus-visible + .checkin-btn { outline: 2px solid #FFC24D; outline-offset: 2px; }

/* Tables (fallback pour contenu tabulaire dense) ------------------------------------------- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th {
  text-align: left; padding: 8px 10px; color: #E3BBA0; font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid rgba(255,255,255,0.14);
}
table.data td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); vertical-align: middle; }
table.data tr:hover td { background: rgba(255,122,26,0.08); }

/* Forms & buttons --------------------------------------------------------------------------- */
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password],
select, textarea {
  font-family: inherit; font-size: 0.86rem; padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 8px;
  background: rgba(255,255,255,0.06); color: #FBF3EA;
}
input::placeholder, textarea::placeholder { color: #8C7A72; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #FF7A1A; box-shadow: 0 0 0 3px rgba(255,122,26,0.25);
}

button, .btn {
  font-family: inherit; font-size: 0.78rem; font-weight: 600; border-radius: 8px; padding: 6px 13px;
  cursor: pointer; background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.16);
  color: #FBF3EA; transition: all .15s;
  text-decoration: none; display: inline-block; /* <a class="btn"> : jamais souligné (retour de Thomas, 2026-09-24) */
}
button:hover, .btn:hover { filter: brightness(1.2); transform: translateY(-1px); }
a.btn:hover { color: #FBF3EA; text-decoration: none; }
a.btn.primary:hover { color: #2A1509; }
button.primary, .btn.primary {
  background: linear-gradient(90deg, #FF7A1A, #FFC24D); color: #2A1509; border: none;
}

form { margin: 0; }
form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Panneau "Modifier" (rename/delete) : caché par défaut, révélé au clic — cf. retour
   utilisateur : les actions destructives ne doivent pas être exposées à cru dans la liste. */
.edit-panel { display: none; margin-top: 14px; }
.edit-panel.show { display: block; }

/* Badges ------------------------------------------------------------------------------------ */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.badge.done    { background: rgba(52,211,153,0.18); color: #34D399; }
.badge.skipped { background: rgba(248,113,113,0.18); color: #F87171; }
.badge.pending { background: rgba(255,255,255,0.08); color: #E3BBA0; }

/* Détail d'activité riche : carte, météo, kudos, commentaires (portage fidèle des classes V1
   style.css l.1213-1687 — .weather-strip, .kudo-*, .comment-*, couleurs seules adaptées) -------- */
.activity-map { width: 100%; height: 320px; border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.weather-strip { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.weather-strip-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: #E3BBA0; white-space: nowrap; }
.weather-strip-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.18); flex-shrink: 0; }

.kudos-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.kudo-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kudo-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.12); transition: transform .15s ease; }
.kudo-avatar:hover { transform: scale(1.15); }
.kudo-name { font-size: 0.62rem; color: #8C7A72; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }

.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.comment-item { background: rgba(255,255,255,0.06); padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-weight: 600; color: #E3BBA0; font-size: 0.75rem; }
.comment-date { font-weight: 500; color: #8C7A72; }
.comment-text { color: #FBF3EA; line-height: 1.5; font-size: 0.85rem; }

/* Login screen ------------------------------------------------------------------------------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 2; }
.login-card {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16); border-radius: 18px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  padding: 44px 40px; text-align: center; max-width: 360px;
  opacity: 0; transform: translateY(16px) scale(0.98); filter: blur(4px);
  animation: climb 0.8s cubic-bezier(.2,.8,.2,1) forwards;
}
.login-card h1 { font-size: 1.5rem; margin: 0 0 8px; text-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.login-card p { color: #E3BBA0; font-size: 0.88rem; margin: 0 0 20px; }
.strava-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px;
  background: linear-gradient(90deg, #FF7A1A, #FFC24D); color: #2A1509; border-radius: 10px;
  font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(255,122,26,0.35);
  transition: all .2s;
}
.strava-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,122,26,0.5); color: #2A1509; text-decoration: none; }

@media (max-width: 640px) {
  .hero, .panel-inner { padding-left: 16px; padding-right: 16px; }
  .row { gap: 10px; }
  .row .name { font-size: 0.88rem; }
  .topnav { padding: 12px 16px; }
  /* Cartes de stats du hero jugées peu lisibles/pas utiles en mobile (retour 2026-08-16) —
     masquées plutôt que retravaillées : le contenu qui suit (liste, plan, etc.) reste identique. */
  .stats { display: none; }
}

/* Plan — vue semaine ------------------------------------------------------------------------
   Portage fidèle des classes de index.php V1 (style.css l.2077-2420 : plan-overview-card,
   session-card, plan-ai-banner, session-detail-blocks…) — seules les couleurs sont adaptées à la
   palette Ascension (var(--color-primary) -> #FF7A1A, --color-accent -> #34D399, --color-info ->
   #60A5FA, --color-purple -> #A78BFA, --color-warning -> #FFC24D, --color-danger -> #F87171),
   la structure/les noms de classes restent ceux de la V1. Remplace une première tentative de
   grille de cartes maison jugée "texte en vrac" par l'utilisateur — la liste verticale de cartes
   horizontales (icône/corps/actions) de la V1 est le design de référence, pas à réinventer. */
.plan-overview-card {
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.plan-overview-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.plan-overview-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.plan-overview-name { font-size: 1rem; font-weight: 700; color: #FBF3EA; }
.plan-overview-meta { font-size: 0.78rem; color: #E3BBA0; margin-top: 2px; }
.plan-overview-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.plan-week-badge { font-size: 0.82rem; font-weight: 600; color: #E3BBA0; }
.plan-phase-badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; }

.plan-progress-bar-wrap { height: 4px; background: rgba(255,255,255,0.1); overflow: hidden; margin: 0 0 16px; }
.plan-progress-bar { height: 100%; background: linear-gradient(90deg, #FF7A1A, #FFC24D); transition: width .4s ease; }

.plan-week-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.plan-week-header { background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.plan-week-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: #FBF3EA; }
.plan-week-desc { font-size: 0.82rem; color: #E3BBA0; margin-bottom: 8px; }
.plan-soreness-rules { font-size: 0.76rem; color: #E3BBA0; padding: 8px 12px; background: rgba(255,255,255,0.06); border-radius: 8px; border-left: 3px solid #FFC24D; }

/* Bannière IA (analyse/ajustements/impact) ---------------------------------------------------- */
.plan-ai-banner { background: linear-gradient(135deg, rgba(167,139,250,.1), rgba(96,165,250,.08)); border: 1px solid rgba(167,139,250,0.25); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.plan-ai-banner-header { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: #A78BFA; margin-bottom: 8px; }
.plan-ai-banner-header small { font-weight: 400; color: #E3BBA0; font-size: 0.72rem; }
.plan-ai-section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #E3BBA0; margin-bottom: 4px; }
.plan-ai-readiness { background: rgba(52,211,153,0.08); border-left: 3px solid #34D399; border-radius: 0 8px 8px 0; padding: 10px 12px; margin-bottom: 8px; font-size: 0.85rem; color: #FBF3EA; line-height: 1.55; }
.plan-ai-analysis, .plan-ai-note { font-size: 0.85rem; color: #E3BBA0; margin-bottom: 8px; line-height: 1.55; padding: 8px 12px; background: rgba(255,255,255,0.06); border-radius: 8px; }
.plan-ai-impact { background: rgba(167,139,250,0.08); border-left: 3px solid #A78BFA; border-radius: 0 8px 8px 0; padding: 10px 12px; font-size: 0.85rem; color: #FBF3EA; line-height: 1.55; }

/* Bannière réajustement après séance non réalisée --------------------------------------------- */
.plan-week-adjustment { background: rgba(96,165,250,0.1); color: #93C5FD; border: 1px solid rgba(96,165,250,0.3); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: 0.85rem; line-height: 1.5; }
.plan-week-adjustment.no-change { background: rgba(255,255,255,0.055); color: #E3BBA0; border-color: rgba(255,255,255,0.12); }
.plan-week-adjustment-notes { font-size: 0.76rem; opacity: .85; margin-top: 4px; font-style: italic; }

.plan-ai-generate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,0.04); border: 1px dashed rgba(255,255,255,0.22); border-radius: 10px; padding: 14px 16px; margin-top: 8px; }

/* Sessions : liste verticale de cartes horizontales (icône | corps | actions), pas une grille ---- */
.plan-sessions-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.session-card {
  background: rgba(255,255,255,0.055); border-radius: 10px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border-left: 3px solid transparent; transition: all .15s ease; position: relative;
}
.session-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,0.35); transform: translateX(2px); }
.session-card.type-run, .session-card.type-marchrun { border-left-color: #FF7A1A; }
.session-card.type-strength { border-left-color: #60A5FA; }
.session-card.type-cross { border-left-color: #34D399; }
.session-card.type-mobility { border-left-color: #A78BFA; }
.session-card.type-rest { border-left-color: rgba(255,255,255,0.16); opacity: .7; cursor: default; }
.session-card.session-done { background: rgba(52,211,153,0.08); border-left-color: #34D399; opacity: .85; }
.session-card.session-skipped { opacity: .5; background: rgba(255,255,255,0.03); }

.session-card-left { position: relative; flex-shrink: 0; }
.session-type-icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.session-done-overlay { position: absolute; inset: 0; background: #34D399; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #0A0610; font-size: 1.1rem; font-weight: 700; }

.session-card-body { flex: 1; min-width: 0; }
.session-day-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8C7A72; font-weight: 600; }
.session-name { font-size: 0.9rem; font-weight: 700; margin: 2px 0 4px; line-height: 1.3; color: #FBF3EA; }
.session-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-type-badge { font-size: 0.68rem; font-weight: 600; color: #E3BBA0; background: rgba(255,255,255,0.08); padding: 2px 7px; border-radius: 999px; }
.session-duration { font-size: 0.76rem; color: #E3BBA0; font-weight: 600; }
.session-intensity { font-size: 0.7rem; }
.session-status-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.session-status-badge.done { background: rgba(52,211,153,0.15); color: #34D399; }
.session-status-badge.skipped { background: rgba(255,255,255,0.1); color: #E3BBA0; }
.session-status-badge.adjusted { background: rgba(167,139,250,0.15); color: #A78BFA; }
.strava-card-badge { display: inline-block; margin-top: 4px; margin-left: 6px; font-size: 0.68rem; font-weight: 700; color: #FC4C02; text-decoration: none; padding: 2px 8px; border: 1px solid #FC4C02; border-radius: 999px; white-space: nowrap; }
.strava-card-badge:hover { background: #FC4C02; color: #fff; }

.session-card-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.session-btn-done, .session-btn-undo, .session-btn-skip, .session-btn-target {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06); color: #FBF3EA; cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; transition: all .15s ease; padding: 0;
}
.session-btn-done { background: rgba(52,211,153,0.15); border-color: #34D399; color: #34D399; }
.session-btn-done:hover { background: #34D399; color: #0A0610; }
.session-btn-undo:hover { background: rgba(255,255,255,0.14); }
.session-btn-skip { color: #E3BBA0; }
.session-btn-skip:hover { background: #FFC24D; border-color: #FFC24D; color: #2A1509; }
/* Cible du jour (🎯, chantier "jour libre" 2026-09-01) — remplace l'ancien bouton d'échange de
   jour (.session-btn-swap), devenu sans objet sans jour fixe à échanger. */
.session-btn-target:hover { background: #FF7A1A; border-color: #FF7A1A; color: #2A1509; }
.session-target-badge {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 0.85rem; background: rgba(255,122,26,0.18); border: 1px solid #FF7A1A;
}

/* Échelles de sélection façon pilule (douleur, mini-renfo, motif de séance sautée) — portage de
   .pain-scale/.pain-btn (style.css V1 l.2433-2449), radio caché + label stylé (même idiome sans
   JS que .checkin-radio/.checkin-btn, réutilisé ici avec le style "pilule couleur" de la V1). */
.pain-scale { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.pain-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.pain-btn {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--pain-color, #8C7A72); background: transparent; color: var(--pain-color, #E3BBA0);
  font-size: 0.8rem; font-weight: 600; cursor: pointer; user-select: none; transition: all .15s ease;
}
.pain-radio:checked + .pain-btn, .pain-btn:hover { background: var(--pain-color, #8C7A72); color: #1B0F2E; }
.pain-radio:focus-visible + .pain-btn { outline: 2px solid #FFC24D; outline-offset: 2px; }

@media (max-width: 640px) {
  /* Séances de la semaine (plan.php, maquette validée 2026-08-16) : la carte icône|corps|actions
     du desktop reste en place (elle porte déjà le contenu réel de la séance, contrairement à
     l'ancienne liste dense de la V1) — seul le vocabulaire visuel est aligné sur le reste de
     l'appli : icône ronde colorée (comme .row .icon.badge-*) et badge/durée en pastilles au lieu
     de texte brut à plat. */
  .session-type-icon { border-radius: 50%; background: rgba(255,255,255,0.1); }
  .session-card.type-run .session-type-icon, .session-card.type-marchrun .session-type-icon { background: rgba(255,122,26,0.16); }
  .session-card.type-strength .session-type-icon { background: rgba(96,165,250,0.16); }
  .session-card.type-cross .session-type-icon { background: rgba(52,211,153,0.16); }
  .session-card.type-mobility .session-type-icon { background: rgba(167,139,250,0.16); }
  .session-duration { padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,0.06); }

  /* Fait/Sauté/Échanger vivent déjà dans la modale de détail ouverte au tap sur la carte —
     les répéter en colonne d'icônes sur la carte elle-même double les cibles tactiles pour la
     même action et resserre inutilement la carte en largeur mobile. */
  .session-card-actions { display: none; }

  /* Nav de semaine (plan.php) : trop de boutons texte pour tenir sur une largeur mobile sans
     s'étaler sur 3-4 lignes — les actions secondaires passent en icône seule (même idiome que
     .back-link), les libellés restent au survol/lecteur d'écran via aria-label/title portés par
     le lien lui-même en PHP. */
  .plan-week-nav .btn-label { display: none; }
}

/* Détail de séance (modale <dialog>) : mêmes blocs colorés que la V1 -------------------------- */
.session-dialog { width: min(560px, 92vw); max-height: 86vh; overflow-y: auto; padding: 26px; border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; background: #1B0F2E; color: #FBF3EA; }
.session-dialog.modal-sm { width: min(400px, 92vw); }
.session-dialog::backdrop { background: rgba(10,6,14,0.65); backdrop-filter: blur(4px); }
.session-dialog .dialog-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: #FF7A1A; color: #2A1509; border: none; font-weight: 700; cursor: pointer; }
.session-detail-blocks { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.session-detail-block { background: rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 14px; border-left: 3px solid transparent; }
.session-detail-block.warmup { border-left-color: #FFC24D; }
.session-detail-block.main { border-left-color: #FF7A1A; }
.session-detail-block.cooldown { border-left-color: #60A5FA; }
.session-detail-block.tips { border-left-color: #A78BFA; background: rgba(167,139,250,0.08); }
.sdb-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #E3BBA0; margin-bottom: 6px; }
.sdb-content { font-size: 0.85rem; line-height: 1.6; color: #FBF3EA; white-space: pre-line; }

.plan-banner.weather { border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-size: 0.85rem; line-height: 1.5; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-left: 3px solid #F87171; }
.plan-banner .banner-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: #E3BBA0; margin-bottom: 4px; font-weight: 700; }
.plan-banner .banner-section { margin-top: 8px; }
.plan-banner .banner-section:first-child { margin-top: 0; }

/* Chat Coach IA (coach.php, 2026-08-16) : deux colonnes (liste de conversations + fil actif),
   même palette que le reste (fond translucide + bordure claire des .card, accent #FFC24D). */
.chat-layout { display: flex; gap: 18px; align-items: flex-start; }
.chat-sidebar { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.chat-new { text-align: center; margin-bottom: 8px; }
.chat-empty-hint { color: #E3BBA0; font-size: 0.82rem; padding: 8px 4px; }
.chat-conv-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; min-width: 0;
  background: rgba(255,255,255,0.04); border: 1px solid transparent; text-decoration: none; color: #FBF3EA;
}
.chat-conv-item:hover { background: rgba(255,255,255,0.08); }
.chat-conv-item.active { border-color: rgba(255,194,77,0.5); background: rgba(255,194,77,0.10); }
.chat-conv-icon {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,194,77,0.12); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.chat-conv-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-conv-title { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-date { font-size: 0.7rem; color: #E3BBA0; }
/* Archivage (2026-10-01) : icône à droite de chaque conversation, liens Archives / retour. */
.chat-conv-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.chat-conv-row .chat-conv-item { flex: 1; }
.chat-conv-archive { margin: 0; flex-shrink: 0; }
.chat-conv-archive button {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
  background: transparent; color: #E3BBA0; opacity: 0.45; transition: opacity .15s, background .15s;
}
.chat-conv-row:hover .chat-conv-archive button, .chat-conv-archive button:focus { opacity: 1; }
.chat-conv-archive button:hover { background: rgba(255,255,255,0.1); }
.chat-archives-link { font-size: 0.8rem; color: #E3BBA0; text-decoration: none; padding: 6px 4px; }
.chat-archives-link:hover { color: #FBF3EA; text-decoration: none; }
.chat-archives-title { font-size: 0.85rem; font-weight: 700; padding: 2px 4px 4px; }

/* Barre du fil (retour + titre + nouvelle conversation) — masquée par défaut, visible en mode
   "fil" sur mobile uniquement (cf. @media 720px ci-dessous) ; sur desktop la sidebar toujours
   visible à côté du fil rend ce bandeau redondant. */
.chat-thread-topbar {
  display: none; align-items: center; gap: 10px; padding: 10px 14px; min-width: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.12);
  /* min-width:0 seul mesuré insuffisant en pratique (683px sur un viewport de 430px, retour
     utilisateur 2026-08-16, confirmé DevTools) malgré min-width:0 sur toute la chaîne flex
     parente — cause exacte non identifiée avec certitude à distance. max-width en vw (jamais
     relatif à un ancêtre flex) comme filet imparable en plus du min-width:0. */
  max-width: 100vw;
  box-sizing: border-box;
}
.chat-thread-topbar .back-link { margin-bottom: 0; flex-shrink: 0; }
.chat-thread-title {
  flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* max-width en vw, PAS en % ni en flex-shrink : mesuré à 683px de large sur un viewport
     iPhone 15 (430px) malgré min-width:0 sur toute la chaîne flex parente (retour utilisateur
     2026-08-16, confirmé via DevTools) — un titre de conversation long en white-space:nowrap
     semble empêcher le rétrécissement flex quelque part dans la chaîne, cause exacte non
     identifiée avec certitude à distance. Un vw est relatif au VIEWPORT réel, jamais à un
     ancêtre flex, donc ce plafond tient quoi qu'il arrive plus haut dans la chaîne. */
  max-width: calc(100vw - 100px);
}
.chat-thread-new-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255,255,255,0.05); color: #E3BBA0; font-size: 1.2rem;
  text-decoration: none; flex-shrink: 0; transition: background .15s, color .15s;
}
.chat-thread-new-btn:hover { background: rgba(255,255,255,0.1); color: #FBF3EA; text-decoration: none; }

.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 62vh; padding: 0; margin-bottom: 0; overflow: hidden; }
.chat-messages {
  flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 18px; display: flex; flex-direction: column; gap: 12px;
  /* Sans min-height:0, un enfant flex ne rétrécit jamais sous la hauteur de son contenu (même
     piège que min-width:0 déjà documenté plus haut pour l'axe horizontal, ici sur l'axe
     vertical) : .chat-messages grandissait à la hauteur totale de la conversation (~4000px sur
     un long fil, retour utilisateur 2026-08-17, confirmé DevTools Computed) au lieu de rester
     bornée par .chat-main avec défilement interne — la page entière scrollait au lieu de la
     seule zone de messages. */
  min-height: 0;
}
.chat-msg { display: flex; min-width: 0; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg-model { justify-content: flex-start; }
.chat-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.55;
  /* Plus de white-space:pre-line ici : formatAiText() (layout.php) construit maintenant les
     sauts de ligne lui-même (<br>/<ul>) — le garder en plus aurait doublé chaque saut de ligne
     (le \n littéral ET le <br> auraient chacun créé une ligne vide, retour utilisateur
     2026-08-17 sur des réponses trop aérées/décousues). */
  /* Un seul "mot" trop long (URL, terme technique sans espace) sans ce filet fixait le
     min-content de toute la chaîne flex body -> ... -> .chat-messages introduite pour le mode
     fil plein page ci-dessous, forçant TOUTE LA PAGE plus large que le viewport — d'où le
     scroll horizontal signalé le 2026-08-16 ("je dois me déplacer à gauche et à droite"), pas
     un souci de mise en page mais de propagation de taille min-content en contexte flex. */
  overflow-wrap: anywhere; word-break: break-word;
}
.chat-msg-user .chat-bubble { background: #FF7A1A; color: #2A1509; font-weight: 500; border-bottom-right-radius: 4px; }
.chat-msg-model .chat-bubble { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-bottom-left-radius: 4px; }
.chat-input-row {
  display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
}
.chat-input-row textarea { flex: 1; min-width: 0; resize: none; }
.chat-input-row button { flex-shrink: 0; align-self: flex-end; }

/* Carte de proposition de modification de plan (coach.php, 2026-08-16) — jamais appliquée
   automatiquement, d'où la mise en avant visuelle distincte des bulles de conversation. */
.chat-proposal {
  max-width: 78%; margin-top: 6px; align-self: flex-start; background: rgba(255,194,77,0.08);
  border: 1px solid rgba(255,194,77,0.35); border-radius: 12px; padding: 12px 14px; font-size: 0.85rem;
  overflow-wrap: anywhere; word-break: break-word;
}
.chat-msg-model .chat-proposal { margin-left: 0; }
/* Cartes (propositions, faits à retenir) SOUS la bulle et non à côté (phase 8, retour visuel :
   la carte « Retenir ce fait ? » était écrasée à droite de la réponse). */
.chat-msg-model { flex-wrap: wrap; }
.chat-msg-model .chat-proposal { flex-basis: 100%; }
.chat-proposal-header { font-weight: 700; color: #FFC24D; margin-bottom: 6px; font-size: 0.8rem; }
.chat-proposal-before { color: #E3BBA0; text-decoration: line-through; }
.chat-proposal-after { color: #FBF3EA; font-weight: 700; }
.chat-proposal-reason { margin: 6px 0 0; color: #E3BBA0; font-size: 0.82rem; line-height: 1.5; }
.chat-proposal-actions { display: flex; gap: 8px; margin-top: 10px; }
.chat-proposal-actions button { font-size: 0.8rem; padding: 6px 14px; }
.chat-proposal-status-label { margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: #34D399; }
.chat-proposal[data-status="dismissed"] .chat-proposal-status-label { color: #E3BBA0; }

@media (max-width: 720px) {
  /* Deux écrans façon appli de messagerie (maquette validée 2026-08-16, remplace la sidebar en
     bandeau horizontal + fil compressé à 68vh sous le hero, jugés illisibles) : liste de
     conversations en pleine page OU fil en pleine page, jamais les deux empilés. Le mode est
     décidé côté PHP (coach.php : $showConversationListOnMobile), pas en CSS pur, pour rester
     cohérent avec le rendu server-side du reste du site. */
  .chat-layout { flex-direction: column; }
  .chat-layout.mode-list .chat-main { display: none; }
  .chat-layout.mode-thread .chat-sidebar { display: none; }

  .chat-sidebar { width: 100%; }
  .chat-conv-item { padding: 12px 14px; }
  .chat-conv-icon { width: 36px; height: 36px; font-size: 1rem; }

  .chat-layout.mode-thread .chat-thread-topbar { display: flex; }

  /* Fil en vraie pleine page (retour utilisateur 2026-08-16 : "page beaucoup trop grande" à
     l'entrée d'une conversation) — la première version soustrayait une hauteur de nav devinée
     à la louche (calc(100dvh - 54px)) et débordait déjà à cause du margin-bottom hérité de
     .card sur .chat-main (jamais neutralisé, cf. règle de base ci-dessus). Remplacé par une
     vraie chaîne flex body -> panel -> panel-inner -> chat-layout -> chat-main qui se partage
     EXACTEMENT la hauteur du viewport sous la nav sticky, quelle que soit sa hauteur réelle.
     min-height:0 à chaque niveau est indispensable : sans ça un enfant flex garde sa taille de
     contenu et déborde au lieu de laisser .chat-messages (flex:1, overflow-y:auto) être le seul
     scroll interne. Hero + chrome de carte (bordure/coins arrondis/padding du panel) retirés en
     mode fil pour un rendu plein-écran, pas une carte flottante dans la page. */
  /* height (pas min-height) est indispensable ici : html,body n'a globalement que
     min-height:100% (règle de base en tête de fichier), donc toute la chaîne flex qui suit
     (panel -> panel-inner -> chat-layout -> chat-main -> chat-messages) n'avait AUCUNE hauteur
     définie à distribuer tant que body restait en min-height seul — flex:1/min-height:0 plus
     bas dans la chaîne n'avaient rien à borner, .chat-messages grandissait donc à la taille de
     son contenu (~4000px sur un long fil, retour utilisateur 2026-08-17, confirmé DevTools)
     malgré min-height:0 posé correctement sur .chat-messages. Scopé à .chat-layout.mode-thread
     via :has() pour ne pas fixer la hauteur du body sur les autres pages/modes. */
  body:has(.chat-layout.mode-thread) { display: flex; flex-direction: column; height: 100dvh; min-height: 100dvh; min-width: 0; overflow: hidden; }
  body:has(.chat-layout.mode-thread) .hero { display: none; }
  body:has(.chat-layout.mode-thread) .panel { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 0; }
  /* padding:0 indispensable : .panel-inner a par ailleurs (règle générale mobile, ligne ~507)
     padding-left/right:16px non neutralisé ici jusqu'au 2026-08-17 — décalait tout le contenu du
     mode fil de 16px vers la droite sans que .chat-main/.chat-messages (dimensionnés en 100vw,
     donc indifférents au padding d'un ancêtre) ne s'y adaptent, d'où 16px qui débordaient
     réellement hors écran à droite (confirmé en direct via getBoundingClientRect() : rect.right
     dépassait window.innerWidth de 16px pile). */
  body:has(.chat-layout.mode-thread) .panel-inner { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 0; }
  .chat-layout.mode-thread { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .chat-layout.mode-thread .chat-main { flex: 1; min-height: 0; min-width: 0; max-width: 100vw; height: auto; border: none; border-radius: 0; box-sizing: border-box; overflow: hidden; }

  /* Padding des bulles un peu plus généreux qu'en desktop (retour utilisateur 2026-08-17 :
     bulle jugée trop proche du bord droit) — 18px mesurés au Computed n'étaient pas nuls ni
     écrasés, juste visuellement serrés une fois comparés au padding du reste du chrome mobile
     (topbar, etc.). */
  .chat-messages { padding: 18px 22px; }
}

/* ── Nav réduite (onboarding.php, phase 4 étape 3 : renderHeader($active, false)) ──
   Uniquement la marque + Déconnexion, jamais transformée en tiroir mobile. */
.nav-links-bare { justify-content: flex-end; }
@media (max-width: 640px) {
  .nav-links-bare { position: static; height: auto; width: auto; flex-direction: row; transform: none; padding: 0; background: none; }
  .nav-links-bare a { padding: 8px 12px; font-size: 0.85rem; }
}

/* ── Formulaires de profil (settings.php, onboarding.php — phase 4) ── */
.f-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; align-items: flex-start; }
.f-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: #E3BBA0; }
.f-hint { color: #8C7A72; font-size: 0.72rem; }
/* Dans une ligne, chaque label est une grille « légende (hauteur fixe) / champ / aide » : les
   champs d'une même ligne partagent ainsi la même ligne de base, qu'ils aient ou non une aide
   dessous (align-items:flex-end les décalait dès qu'une aide manquait à l'un d'eux). */
.f-row > .f-label { display: grid; grid-template-rows: 1.3em auto; align-content: start; white-space: nowrap; }
.f-row > .f-label .f-hint { white-space: normal; max-width: 240px; }
/* Cases, boutons et aides posés directement dans la ligne : alignés sur la rangée des champs. */
.f-row > .f-check, .f-row > button, .f-row > .f-hint { margin-top: calc(1.3 * 0.78rem + 4px); min-height: 32px; box-sizing: border-box; }
.f-row > .f-hint { display: flex; align-items: center; }
.f-check { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #E3BBA0; }
.f-check input { width: auto; }
.f-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.f-chips label { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: #E3BBA0; border: 1px solid rgba(255,255,255,0.14); border-radius: 20px; padding: 4px 10px; cursor: pointer; }
.f-chips input { width: auto; margin: 0; }
.row-item { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.08); padding: 8px 0; }
.row-item:first-of-type { border-top: none; }
.row-item form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.row-item .btn-sm, .btn-sm { font-size: 0.72rem; padding: 4px 8px; }
.saved-banner { background: rgba(52,211,153,0.15); border-left: 3px solid #34D399; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 0.85rem; color: #34D399; }
.error-banner { background: rgba(248,113,113,0.15); border-left: 3px solid #F87171; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 0.85rem; color: #F87171; }
.sub-block { border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.sub-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }

/* ── Onboarding : fil d'étapes + consentements ── */
.ob-steps { display: flex; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; flex-wrap: wrap; }
.ob-steps li { flex: 1 1 120px; font-size: 0.75rem; color: #8C7A72; border-top: 3px solid rgba(255,255,255,0.14); padding-top: 6px; }
.ob-steps li.done { color: #34D399; border-top-color: #34D399; }
.ob-steps li.current { color: #FFC24D; border-top-color: #FFC24D; font-weight: 600; }
.ob-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.ob-actions .back { color: #E3BBA0; font-size: 0.85rem; text-decoration: none; }
.consent-box { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,194,77,0.35); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.consent-box p { margin: 0 0 8px; font-size: 0.82rem; color: #E3BBA0; }
.consent-box .f-check { align-items: flex-start; margin-top: 8px; }
.consent-box .f-check input { margin-top: 3px; }
.chip-btn { background: none; border: 1px solid rgba(255,194,77,0.5); color: #FFC24D; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; cursor: pointer; }

/* ── Stats en onglets (phase 5 étape 4) ── */
.stats-selector { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.stats-selector label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: #E3BBA0; }
.stats-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 8px; }
.stats-tab { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #E3BBA0; border-radius: 20px; padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.stats-tab.active { background: linear-gradient(90deg, #FF7A1A, #FFC24D); color: #2A1509; border-color: transparent; }
.stats-pane { display: none; }
.stats-pane.active { display: block; }
.stats-pane .section { margin-bottom: 14px; }
@media (max-width: 640px) { .stats-tab { flex: 1 1 45%; text-align: center; padding: 8px 6px; font-size: 0.76rem; } }
