/* WAIWAI — charte WAKEA, piste 3 : obsidian et stone, le cuivre en accent.
   Le noir pour le réel, le cuivre pour ce qui vient d'une projection. */
:root {
  --obsidian: #0B0D10;
  --stone: #F2EFEA;
  --corps: #31343A;
  --gris: #55595F;
  --basalt: #6B6F75;
  --copper: #A4633A;
  --copper-fonce: #8A4F2B;
  --copper-clair: #D9A47E;
  --argile: #EBD9C7;
  --glacier: #E6F1FB;
  --mineral: #B7C9C1;
  --sable: #E3DED6;
  --blanc: #FFFFFF;
  --filet: rgba(11, 13, 16, 0.12);
  --filet-clair: rgba(242, 239, 234, 0.14);
  --clair-72: rgba(242, 239, 234, 0.72);
  --rayon: 2px;
  --nav: 76px;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--obsidian);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
a { color: var(--obsidian); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
h1, h2, p { margin: 0; }
.nombre { font-variant-numeric: tabular-nums; white-space: nowrap; }
.projete { color: var(--copper-fonce); }
.note { font-size: 12px; color: var(--corps); }
.note.clair { color: var(--clair-72); }
.note.fort { font-weight: 600; }
.vide-texte { color: var(--corps); font-size: 14px; padding: 16px 0; }
.chargement { padding: 40vh 20px 0; text-align: center; color: var(--gris); }
.etiquette, .surtitre { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--corps); }
.surtitre.clair { color: var(--clair-72); letter-spacing: 0.18em; }

/* — En-tête et navigation */
.entete { display: flex; align-items: center; gap: 6px; padding: calc(18px + env(safe-area-inset-top)) 16px 12px 20px; }
.entete .icone-btn:first-child { margin-left: -12px; }
.entete-titres { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.entete h1 { font-size: 24px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marque { font-weight: 700; font-size: 16px; letter-spacing: 0.24em; }
.marque.grande { font-size: 28px; }
.sous-titre { font-size: 11px; color: var(--gris); }
.entete-droite { display: flex; align-items: center; gap: 4px; }
.icone-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: var(--rayon); color: var(--obsidian); flex-shrink: 0; }
.icone-btn.argile { background: var(--argile); }
.icone-btn.petit { width: 36px; height: 36px; }
.bascule { display: flex; gap: 2px; padding: 3px; background: var(--sable); border-radius: var(--rayon); flex-shrink: 0; }
.bascule-btn { height: 40px; padding: 0 13px; border: 0; border-radius: var(--rayon); background: transparent; font-size: 13px; font-weight: 600; color: var(--corps); }
.bascule-btn.actif-reel { background: var(--obsidian); color: var(--stone); }
.bascule-btn.actif-projete { background: var(--copper); color: var(--blanc); }

.contenu { padding: 0 20px calc(var(--nav) + 28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px;
  height: calc(var(--nav) + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom);
  background: var(--blanc); border-top: 1px solid var(--filet);
  display: flex; align-items: center; justify-content: space-around; z-index: 10;
}
.nav-lien { min-width: 58px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--gris); font-size: 11px; font-weight: 500; }
.nav-lien.actif { color: var(--obsidian); font-weight: 600; }
.nav-plus { width: 52px; height: 52px; border-radius: var(--rayon); background: var(--copper); color: var(--blanc); display: flex; align-items: center; justify-content: center; }

/* — Anneaux */
.anneau { position: relative; flex-shrink: 0; }
.anneau-cercle {
  position: absolute; inset: 0; border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--epaisseur) - 1px), #000 calc(100% - var(--epaisseur)));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--epaisseur) - 1px), #000 calc(100% - var(--epaisseur)));
}
.anneau-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.anneau-centre > .anneau { position: absolute; top: 23px; left: 23px; }
.anneau-texte { position: relative; z-index: 1; background: transparent; border: 0; color: var(--stone); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; }
.grand-nombre { font-family: var(--serif); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.grand-nombre.projete { color: var(--copper-clair); }
.anneau-pct { font-size: 14px; font-weight: 600; margin-top: 6px; }
.anneau-note { font-size: 11px; color: var(--clair-72); }
.anneau-assoc-pct { font-size: 22px; font-weight: 700; }

/* — Bloc principal de l'accueil */
.hero { background: var(--obsidian); color: var(--stone); border-radius: var(--rayon); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.hero-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero-anneau { display: flex; justify-content: center; }
.hero-palier { text-align: center; font-size: 12px; color: var(--clair-72); margin-top: -4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--filet-clair); padding-top: 12px; }
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat-libelle { font-size: 11px; color: var(--clair-72); display: flex; gap: 5px; align-items: baseline; }
.stat-valeur { font-size: 17px; font-weight: 600; }
.legende { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--corps); }
.legende.clair { color: var(--clair-72); }
.legende > span { display: inline-flex; align-items: center; gap: 5px; }
.pastille { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pastille.stone { background: var(--stone); }
.pastille.copper { background: var(--copper); }
.pastille.mineral { background: var(--mineral); }
.carre { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; margin-right: 6px; }
.legende .carre { margin-right: 0; }
.carre.obsidian { background: var(--obsidian); }
.carre.copper { background: var(--copper); }
.carre.mineral { background: var(--mineral); }
.carre.stone { background: rgba(242, 239, 234, 0.45); }

/* — Cartes à faire glisser, au contenu qui défile verticalement */
.rail-bloc { display: flex; flex-direction: column; gap: 8px; margin: 0 -20px; }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 20px 4px; scroll-padding: 0 20px; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail-fin { flex: 0 0 8px; }
.points { display: flex; justify-content: center; gap: 6px; }
.point { width: 6px; height: 6px; border-radius: 3px; background: rgba(11, 13, 16, 0.22); transition: width 0.2s; }
.point.actif { width: 18px; background: var(--obsidian); }
.carte {
  flex: 0 0 var(--largeur-carte, 300px); scroll-snap-align: start; height: 272px; position: relative; overflow: hidden;
  background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon);
}
.carte-corps { height: 100%; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; padding: 16px 20px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.carte-corps::-webkit-scrollbar { display: none; }
.carte-piste { position: absolute; right: 5px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: rgba(11, 13, 16, 0.07); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.carte-piste.visible { opacity: 1; }
.carte-pouce { position: absolute; left: 0; right: 0; border-radius: 2px; background: rgba(11, 13, 16, 0.38); }
.carte-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; }
.carte-tete .etiquette { white-space: nowrap; }
.carte-valeur { font-size: 20px; font-weight: 600; }
.carte-associe { height: auto; min-height: 300px; }

.barres { position: relative; flex: 0 0 132px; display: flex; align-items: flex-end; gap: 4px; padding-bottom: 18px; }
.barre { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.barre-reel { background: var(--obsidian); border-radius: 1px; }
.barre-reel.vide { background: rgba(11, 13, 16, 0.12); }
.barre-projete { background: var(--copper); border-radius: 1px 1px 0 0; }
.barre-mois { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 9px; color: var(--corps); }
.barre.courante .barre-mois { font-weight: 700; color: var(--obsidian); }
.ligne-objectif { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--corps); z-index: 1; pointer-events: none; }
.ligne-objectif span { position: absolute; right: 0; bottom: 2px; font-size: 10px; color: var(--corps); background: var(--blanc); padding-left: 4px; }
.detail-liste { display: flex; flex-direction: column; border-top: 1px solid var(--filet); }
.rang { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border: 0; border-bottom: 1px solid rgba(11, 13, 16, 0.06); background: transparent; font-size: 13px; text-align: left; }
.rang .nombre { font-weight: 600; }
.rang.projete .nombre { color: var(--copper-fonce); }

.gros-chiffre { display: flex; align-items: baseline; gap: 10px; border: 0; background: transparent; padding: 0; text-align: left; flex-wrap: wrap; }
.chiffre-serif { font-family: var(--serif); font-size: 38px; line-height: 1; }
.chiffre-note { font-size: 14px; font-weight: 600; }
.barre-empilee { display: flex; height: 14px; flex: 0 0 14px; border-radius: var(--rayon); overflow: hidden; background: var(--stone); }
.seg-obsidian { background: var(--obsidian); height: 100%; }
.seg-copper { background: var(--copper); height: 100%; }
.seg-mineral { background: var(--mineral); height: 100%; }
.seg-basalt { background: var(--basalt); height: 100%; }
.seg-stone { background: rgba(242, 239, 234, 0.45); height: 100%; }
.seg-hachure { background: repeating-linear-gradient(135deg, var(--obsidian) 0 2px, var(--stone) 2px 5px); height: 100%; }
.lignes { display: flex; flex-direction: column; gap: 8px; }
.lignes.petites { font-size: 12px; color: var(--corps); border-top: 1px solid var(--filet); padding-top: 10px; gap: 6px; }
.ligne-valeur { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.ligne-valeur > span:first-child { display: inline-flex; align-items: center; min-width: 0; }
.ligne-valeur .nombre { font-weight: 600; }
.ligne-valeur.total { border-top: 1px solid var(--filet); padding-top: 8px; font-weight: 600; }
.ligne-valeur.gris { color: var(--corps); }
.ligne-valeur.gris .nombre { font-weight: 500; }
.ligne-valeur.fort { font-weight: 600; }
.ligne-valeur.filet { border-top: 1px solid var(--filet); padding-top: 8px; }
.ligne-valeur.grand { font-size: 16px; }
.ligne-valeur.petit { font-size: 12px; color: var(--corps); }
.cascade { display: flex; flex-direction: column; gap: 9px; }
.cascade-rang { display: grid; grid-template-columns: 124px minmax(0, 1fr) 66px; align-items: center; gap: 8px; font-size: 12px; }
.cascade-rang > span:first-child { color: var(--corps); }
.cascade-rang .nombre { text-align: right; font-weight: 600; }
.cascade-piste { height: 10px; background: var(--stone); }
.clients { display: flex; flex-direction: column; gap: 10px; }
.client { display: flex; flex-direction: column; gap: 4px; border: 0; background: transparent; padding: 0; text-align: left; }
.client-ligne { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.client-ligne .nombre { font-weight: 600; }
.client-piste { display: block; height: 6px; background: var(--stone); }

/* — Feuille de détail */
.feuille-fond { position: fixed; inset: 0; background: rgba(11, 13, 16, 0.42); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.feuille { width: 100%; max-width: 560px; max-height: 86dvh; background: var(--stone); border-radius: var(--rayon) var(--rayon) 0 0; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.feuille-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 8px 8px 20px; }
.feuille-tete h2 { font-size: 18px; font-weight: 600; }
.feuille-corps { overflow-y: auto; padding: 0 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.detail-entete { font-size: 12px; color: var(--corps); }
.detail-liste-feuille { display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); }
.detail-rang { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid rgba(11, 13, 16, 0.07); text-decoration: none; color: var(--obsidian); }
.detail-rang:last-child { border-bottom: 0; }
.detail-gauche { display: flex; flex-direction: column; min-width: 0; }
.detail-client { font-weight: 600; font-size: 14px; }
.detail-intitule { font-size: 12px; color: var(--corps); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-rang .nombre { font-weight: 600; }
.detail-total { display: flex; justify-content: space-between; font-weight: 600; padding: 0 2px; }
.detail-totaux { display: flex; flex-direction: column; gap: 8px; }

/* — Deals */
.resume { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.resume-boite { border-radius: var(--rayon); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.resume-boite.sombre { background: var(--obsidian); color: var(--stone); }
.resume-boite.projete { background: var(--blanc); border: 1px solid var(--copper); flex-direction: row; justify-content: space-between; align-items: center; color: var(--obsidian); padding-right: 6px; }
.resume-boite.projete > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.resume-libelle { font-size: 11px; color: var(--corps); }
.sombre .resume-libelle, .sombre .resume-note { color: var(--clair-72); }
.resume-valeur { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.resume-note { font-size: 10px; color: var(--corps); }
.segments { display: flex; gap: 2px; padding: 3px; background: var(--sable); border-radius: var(--rayon); }
.segment { flex: 1; min-height: 40px; padding: 0 4px; border: 0; border-radius: var(--rayon); background: transparent; font-size: 13px; font-weight: 600; color: var(--corps); white-space: nowrap; }
.segments.quatre .segment { font-size: 12px; }
.segment.actif { background: var(--obsidian); color: var(--stone); }
.liste-deals { display: flex; flex-direction: column; gap: 8px; }
.deal { display: flex; align-items: stretch; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); }
.deal.active { border-color: var(--copper); }
.deal.eteint .deal-lien { opacity: 0.62; }
.deal.abandonne { opacity: 0.55; }
.deal-lien { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; text-decoration: none; color: var(--obsidian); }
.deal-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.deal-ligne.petite { align-items: center; font-size: 12px; color: var(--corps); }
.deal-client { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-montant { font-size: 15px; font-weight: 600; }
.deal-intitule { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-puces { display: flex; gap: 6px; flex-shrink: 0; }
.deal-avancement { display: flex; align-items: center; gap: 8px; }
.avancement-piste { flex: 1; height: 4px; background: var(--stone); }
.avancement-barre { height: 100%; background: var(--obsidian); }
.deal-interrupteur { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 10px 0 2px; }
.deal-interrupteur .note { font-size: 10px; margin-top: -6px; }

.interrupteur { width: 52px; height: 44px; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.interrupteur-piste { width: 40px; height: 24px; border-radius: 12px; position: relative; background: #C9C4BC; transition: background 0.15s; }
.interrupteur-bouton { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--blanc); transition: left 0.15s; }
.interrupteur.actif .interrupteur-piste { background: var(--copper); }
.interrupteur.actif .interrupteur-bouton { left: 19px; }

.puces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.puce { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--rayon); font-size: 12px; background: var(--stone); border: 0; white-space: nowrap; }
.puce.obsidian { background: var(--obsidian); color: var(--stone); font-weight: 600; }
.puce.blanc { background: var(--blanc); font-weight: 600; letter-spacing: 0.03em; border: 1px solid var(--filet); }
.deal .puce.blanc { background: var(--stone); border: 0; }
.puce.basalt { background: var(--basalt); color: var(--blanc); }
.puce.mineral { background: var(--mineral); }
.puce.glacier { background: var(--glacier); }
.puce.argile { background: var(--argile); }
.puce.sombre { background: rgba(242, 239, 234, 0.12); color: var(--stone); min-height: 32px; }
.puce.copper-contour { background: transparent; border: 1px solid var(--copper); color: var(--copper-fonce); font-size: 11px; }
.puce.alerte { background: var(--copper); color: var(--blanc); font-weight: 600; }

/* — Fiche d'un deal */
.fiche-tete { display: flex; flex-direction: column; gap: 6px; }
.fiche-client { font-size: 24px; font-weight: 600; line-height: 1.15; margin-top: 4px; }
.fiche-intitule { font-size: 14px; color: var(--corps); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.boite { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.boite.sombre { background: var(--obsidian); color: var(--stone); border: 0; }
.boite-libelle { font-size: 11px; color: var(--corps); }
.sombre .boite-libelle, .sombre .boite-note { color: var(--clair-72); }
.boite-valeur { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.boite.sombre .boite-valeur.projete { color: var(--copper-clair); }
.boite-note { font-size: 10px; color: var(--corps); }
.bandeau-projection { display: flex; justify-content: space-between; align-items: center; background: var(--blanc); border: 1px solid var(--copper); border-radius: var(--rayon); padding: 2px 6px 2px 14px; font-weight: 600; font-size: 14px; }
.phases { display: flex; flex-direction: column; gap: 8px; }
.phase { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.phase.ecart { border-color: var(--copper); }
.phase-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; }
.phase-nom { font-size: 14px; font-weight: 600; }
.phase-droite { display: flex; align-items: center; gap: 6px; }
.phase-curseur { display: flex; align-items: center; gap: 12px; }
.curseur { flex: 1; height: 36px; accent-color: var(--obsidian); }
.curseur.projete { accent-color: var(--copper); }
.phase-valeur { width: 56px; display: flex; flex-direction: column; align-items: flex-end; }
.phase-pct { font-size: 18px; font-weight: 600; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--filet); border: 1px solid var(--filet); border-radius: var(--rayon); overflow: hidden; }
.mini { background: var(--blanc); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-valeur { font-size: 16px; font-weight: 600; }
.bloc-sombre { background: var(--obsidian); color: var(--stone); border-radius: var(--rayon); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.barre-jours { display: flex; height: 18px; border-radius: var(--rayon); overflow: hidden; background: var(--filet-clair); }
.jours-rang { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--filet-clair); padding-top: 10px; font-size: 13px; }
.jours-droite { display: flex; align-items: center; gap: 4px; }
.pas { display: flex; align-items: center; gap: 4px; }
.pas-btn { width: 44px; height: 44px; border: 1px solid rgba(11, 13, 16, 0.2); background: transparent; border-radius: var(--rayon); font-size: 20px; }
.bloc-sombre .pas-btn { border-color: rgba(242, 239, 234, 0.3); color: var(--stone); }
.pas-valeur { min-width: 64px; text-align: center; font-family: var(--serif); font-size: 24px; font-variant-numeric: tabular-nums; }
.pas.projete .pas-valeur { color: var(--copper-clair); }
.jours-associes { display: flex; flex-direction: column; gap: 8px; }
.jeton { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); font-size: 14px; }
.jeton b { letter-spacing: 0.04em; }
.cascade-fiche { gap: 8px; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.bouton { min-height: 48px; padding: 0 16px; border-radius: var(--rayon); border: 1px solid transparent; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.bouton.principal { background: var(--copper); color: var(--blanc); }
.bouton.secondaire { background: var(--blanc); border-color: rgba(11, 13, 16, 0.2); color: var(--obsidian); }
.bouton.pointille { background: transparent; border: 1px dashed rgba(11, 13, 16, 0.4); color: var(--corps); font-size: 13px; min-height: 44px; }
.bouton.mini { min-height: 36px; padding: 0 10px; font-size: 12px; background: var(--blanc); border-color: rgba(11, 13, 16, 0.2); }
.bouton.large { width: 100%; }
.bouton.confirmer { background: var(--obsidian); color: var(--stone); border-color: var(--obsidian); }
.bloc-sombre .bouton.principal:disabled { background: rgba(242, 239, 234, 0.12); color: var(--clair-72); opacity: 1; }
.historique { font-size: 13px; color: var(--corps); }
.historique summary { cursor: pointer; padding: 8px 0; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.historique .ligne-valeur { padding: 6px 0; border-bottom: 1px solid rgba(11, 13, 16, 0.06); }

/* — Formulaires */
.formulaire { display: flex; flex-direction: column; gap: 14px; }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.champ > span { display: flex; flex-direction: column; }
.champ small, .champ-inline small { font-weight: 400; color: var(--corps); font-size: 12px; }
.champ.ligne { flex-direction: row; justify-content: space-between; align-items: center; }
.champ-inline { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.champ-inline input { max-width: 140px; }
.champ input, .champ select, .charge input, .jours-champ input, .champ-inline input {
  width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid rgba(11, 13, 16, 0.2); border-radius: var(--rayon);
  background: var(--blanc); font-size: 16px; font-weight: 400;
}
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.phase-saisie { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.phase-saisie:has(> :only-child) { grid-template-columns: 1fr; }
.jours-saisie { display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); }
.jours-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-bottom: 1px solid rgba(11, 13, 16, 0.07); font-size: 14px; }
.jours-ligne:last-child { border-bottom: 0; }
.jours-champ { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--corps); }
.jours-champ input { width: 80px; text-align: right; }
.jours-champ.large input { width: 140px; }
.repli { border-top: 1px solid var(--filet); padding-top: 4px; display: flex; flex-direction: column; gap: 12px; }
.repli summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.repli[open] { gap: 12px; }

/* — Associés */
.associe-tete { display: flex; align-items: center; gap: 16px; }
.associe-nom { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trigramme { font-size: 30px; font-weight: 700; letter-spacing: 0.08em; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--filet); border: 0; border-top: 1px solid var(--filet); padding: 0; text-align: left; width: 100%; }
.case { background: var(--blanc); padding: 12px 6px 6px 0; display: flex; flex-direction: column; gap: 2px; }
.case:nth-child(2n) { padding-left: 12px; }
.case-valeur { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.boite .cases { border-top: 0; }
.comparaison { gap: 12px; }
.comparaison-rang { display: grid; grid-template-columns: 40px minmax(0, 1fr) 66px; align-items: center; gap: 10px; font-size: 13px; }
.comparaison-rang b { letter-spacing: 0.04em; }
.comparaison-rang .nombre { text-align: right; font-weight: 600; }
.comparaison-piste { height: 10px; background: var(--stone); display: flex; }

/* — Console */
.charge { display: grid; grid-template-columns: minmax(0, 1fr) 92px 40px; gap: 6px; align-items: center; padding: 4px 0; }
.charge.nouvelle { grid-template-columns: minmax(0, 1fr) 92px; }
.charge input { padding: 0 10px; font-size: 15px; }
.compte { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(11, 13, 16, 0.07); font-size: 14px; }
.compte small { display: block; color: var(--corps); font-size: 12px; }
.compte.inactif { opacity: 0.6; }
.compte-actions { display: flex; flex-direction: column; gap: 6px; }
.secret { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 18px; letter-spacing: 0.06em; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 12px 14px; word-break: break-all; user-select: all; }

/* — Connexion */
.connexion { padding: calc(14vh + env(safe-area-inset-top)) 24px 40px; display: flex; flex-direction: column; gap: 22px; max-width: 420px; margin: 0 auto; }
.connexion-marque { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--filet); }
.etapes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.lien { color: var(--copper-fonce); font-weight: 600; }
.erreur { color: var(--copper-fonce); font-size: 14px; font-weight: 600; min-height: 1em; }
.erreur:empty { display: none; }

/* — Messages */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 40px); background: var(--obsidian); color: var(--stone); padding: 12px 16px; border-radius: var(--rayon); font-size: 14px; z-index: 60; transition: opacity 0.3s; }
.toast.erreur { background: var(--copper-fonce); color: var(--blanc); }
.toast.sortie { opacity: 0; }

@media (min-width: 900px) {
  #app { max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Présent pour les gestionnaires de mots de passe, invisible à l'écran. */
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* — Carte « Face au business plan » */
.bp { display: flex; flex-direction: column; gap: 12px; }
.bp-rang { display: flex; flex-direction: column; gap: 4px; }
.bp-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.bp-ligne.note { font-size: 11px; }
.bp-libelle { font-weight: 600; }
.bp-piste { height: 8px; background: var(--stone); display: flex; }
.fort { font-weight: 600; }
small.aide { display: block; margin-top: 6px; font-size: 12px; color: var(--corps); }
.badge-partner { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--copper-fonce); }
.equipe-rang { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(11, 13, 16, 0.07); font-size: 14px; }
.equipe-rang small { display: block; color: var(--corps); font-size: 12px; }
.equipe-rang.inactif { opacity: 0.6; }
.apporteur-rang { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid rgba(11, 13, 16, 0.07); font-size: 14px; }
.apporteur-rang:last-child { border-bottom: 0; }
.apporteur-rang .nombre { text-align: right; font-weight: 600; }
.case-coche { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 44px; }
.case-coche input { width: 22px; height: 22px; accent-color: var(--copper); }
