/* ═══════════════════════════════════════════════════════════════════════════
   Momentum — feuille de style unique.

   Deux contraintes qui gouvernent tout le fichier :
   1. L'app s'ouvre surtout sur un telephone, le soir. Le mobile n'est pas
      une adaptation, c'est le cas principal.
   2. Elle doit rester agreable sur un grand ecran : sidebar a gauche,
      contenu en colonnes.
   Le meme HTML sert les deux : barre du bas sous 1000 px, sidebar au-dessus.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────── jetons : theme clair ── */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-doux: #eef2ff;
  --primary-clair: #818cf8;

  --vert: #10b981;
  --vert-doux: #ecfdf5;
  --bleu: #3b82f6;
  --bleu-doux: #eff6ff;
  --orange: #f59e0b;
  --orange-doux: #fffbeb;
  --rouge: #ef4444;
  --rouge-doux: #fef2f2;
  --violet: #8b5cf6;
  --or: #f59e0b;

  --fond: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --bord: #e2e8f0;
  --bord-fort: #cbd5e1;

  --texte: #0f172a;
  --texte-doux: #475569;
  --texte-faible: #94a3b8;

  --barre-fond: #0c1222;
  --barre-survol: #161f36;
  --barre-texte: #8896b3;
  --barre-actif: #818cf8;

  --rayon: 12px;
  --rayon-s: 9px;
  --rayon-l: 16px;
  --ombre-s: 0 1px 2px rgba(15, 23, 42, .05);
  --ombre: 0 1px 3px rgba(15, 23, 42, .08);
  --ombre-m: 0 4px 12px -2px rgba(15, 23, 42, .1);
  --ombre-l: 0 12px 32px -8px rgba(15, 23, 42, .18);
  --transition: all .2s cubic-bezier(.4, 0, .2, 1);

  --largeur-barre: 252px;
  --largeur-contenu: 1440px;
}

/* ─────────────────────────────────────────────── jetons : theme sombre ── */

[data-theme="dark"] {
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-doux: #1e2747;
  --primary-clair: #a5b4fc;

  --vert-doux: #11291f;
  --bleu-doux: #15233f;
  --orange-doux: #2a2410;
  --rouge-doux: #2a1622;

  --fond: #0b0f19;
  --surface: #141b2d;
  --surface-2: #1a2338;
  --surface-3: #222d47;
  --bord: #2b3853;
  --bord-fort: #3b4a6b;

  --texte: #f1f5f9;
  --texte-doux: #a9b6cf;
  --texte-faible: #6b7a99;

  --barre-fond: #0a0e18;
  --barre-survol: #18213a;

  --ombre-s: 0 1px 2px rgba(0, 0, 0, .45);
  --ombre: 0 1px 3px rgba(0, 0, 0, .5);
  --ombre-m: 0 4px 12px -2px rgba(0, 0, 0, .55);
  --ombre-l: 0 12px 32px -8px rgba(0, 0, 0, .65);

  color-scheme: dark;
}

/* ──────────────────────────────────────────────────────────────── base ── */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.015em; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bord-fort); border-radius: 5px; }

/* ──────────────────────────────────────────────────────── barre laterale ── */

.barre {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--largeur-barre);
  background: var(--barre-fond);
  color: var(--barre-texte);
  display: none;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, .05);
}

.barre-entete { padding: 1.15rem 1.3rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.logo i {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #818cf8, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.barre-nav { list-style: none; padding: .7rem 0; margin: 0; flex: 1; }

.barre-section {
  padding: 1rem 1.3rem .45rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #64748b;
}

.barre-nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .58rem 1.3rem;
  color: var(--barre-texte);
  font-size: .875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.barre-nav a:hover { background: var(--barre-survol); color: #dbe3f4; }
.barre-nav a.actif {
  background: var(--barre-survol);
  color: var(--barre-actif);
  border-left-color: var(--barre-actif);
  font-weight: 600;
}
.barre-nav a i { font-size: 1.02rem; width: 19px; text-align: center; flex-shrink: 0; }

.barre-pastille {
  margin-left: auto;
  background: var(--rouge);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9px;
  line-height: 1.5;
}

.barre-pied {
  padding: .85rem 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
}
.barre-pied .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-pied button {
  background: none;
  border: none;
  color: var(--barre-texte);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: var(--transition);
}
.barre-pied button:hover { color: var(--rouge); }

/* ────────────────────────────────────────────────────────── zone contenu ── */

.zone { min-height: 100vh; display: flex; flex-direction: column; }

.haut {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--bord);
  padding-top: env(safe-area-inset-top);
}

.haut-contenu {
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.haut h1 { font-size: 1.16rem; line-height: 1.25; }
.haut .sous-titre { margin: 1px 0 0; font-size: .78rem; color: var(--texte-faible); font-weight: 500; }
.haut-titre { min-width: 0; flex: 1; }

.icone-bouton {
  width: 34px;
  height: 34px;
  border-radius: var(--rayon-s);
  border: 1px solid var(--bord);
  background: var(--surface);
  color: var(--texte-doux);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: .98rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.icone-bouton:hover { background: var(--surface-3); color: var(--texte); }

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

/* Recherche : champ complet sur grand ecran, bouton loupe sur telephone.
   Les deux ne doivent jamais etre visibles en meme temps. */
.recherche { position: relative; flex: 1; max-width: 380px; display: none; }
.recherche-mobile { display: inline-grid; }
.recherche i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texte-faible);
  font-size: .88rem;
  pointer-events: none;
}
.recherche input {
  width: 100%;
  padding: .5rem .8rem .5rem 2.1rem;
  font-size: .85rem;
  font-family: inherit;
  color: var(--texte);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 20px;
  outline: none;
  transition: var(--transition);
}
.recherche input:focus { border-color: var(--primary); background: var(--surface); }

.enveloppe {
  flex: 1;
  width: 100%;
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

/* ────────────────────────────────────────────────────────────── cartes ── */

.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 1.1rem;
  margin-bottom: .9rem;
  box-shadow: var(--ombre-s);
}

.carte-titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin: 0 0 .85rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texte-faible);
}
.carte-titre a { font-size: .78rem; text-transform: none; letter-spacing: 0; flex-shrink: 0; font-weight: 600; }

.carte-titre.libre {
  align-items: flex-start;
  text-transform: none;
  letter-spacing: -.01em;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--texte);
}
.carte-titre.libre a { padding-top: 3px; font-size: .78rem; }

.accent-vert { border-top: 3px solid var(--vert); }
.accent-bleu { border-top: 3px solid var(--bleu); }
.accent-orange { border-top: 3px solid var(--orange); }
.accent-primaire { border-top: 3px solid var(--primary); }

/* Une carte peut etre large ; une ligne de texte, non. Au-dela d'environ
   75 caracteres, l'oeil perd le debut de la ligne suivante. On plafonne donc
   la prose sans brider les grilles, les tableaux ni les graphiques. */
.carte > p,
.carte .sourdine,
.vide p { max-width: 72ch; }
.centre > p, .vide p { margin-left: auto; margin-right: auto; }

/* grille de cartes sur grand ecran */
.colonnes { display: grid; gap: .9rem; grid-template-columns: 1fr; }

/* ──────────────────────────────────────────────────────────── messages ── */

.pile-toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: calc(100% - 2rem);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem .9rem;
  border-radius: var(--rayon-s);
  background: var(--surface);
  border: 1px solid var(--bord);
  box-shadow: var(--ombre-l);
  font-size: .87rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toast-entree .28s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.sortie { animation: toast-sortie .25s ease forwards; }
.toast i { font-size: 1.05rem; flex-shrink: 0; }
.toast.success { border-left: 3px solid var(--vert); }
.toast.success i { color: var(--vert); }
.toast.error { border-left: 3px solid var(--rouge); }
.toast.error i { color: var(--rouge); }
.toast.info { border-left: 3px solid var(--bleu); }
.toast.info i { color: var(--bleu); }
.toast.warning { border-left: 3px solid var(--orange); }
.toast.warning i { color: var(--orange); }

@keyframes toast-entree { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toast-sortie { to { opacity: 0; transform: translateY(8px); } }

.rappel {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  border-radius: var(--rayon);
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  margin-bottom: .9rem;
  box-shadow: var(--ombre-m);
  transition: var(--transition);
}
.rappel:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--ombre-l); }
.rappel .rappel-icone { font-size: 1.5rem; opacity: .9; flex-shrink: 0; }
.rappel strong { display: block; font-size: .93rem; }
.rappel span { font-size: .8rem; opacity: .82; }
.rappel .fleche { margin-left: auto; font-size: 1.1rem; opacity: .8; flex-shrink: 0; }

/* ────────────────────────────────────────────────────────── progression ── */

.anneau { display: flex; align-items: center; gap: 1rem; }
.anneau svg { flex-shrink: 0; transform: rotate(-90deg); }
.anneau-fond { stroke: var(--surface-3); }
.anneau-trait { stroke: var(--vert); stroke-linecap: round; transition: stroke-dashoffset .5s cubic-bezier(.4, 0, .2, 1); }
.anneau-valeur { font-size: 1.7rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.anneau-legende { font-size: .82rem; color: var(--texte-doux); margin-top: 3px; }

.barre-progres { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.barre-progres span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-clair));
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

/* ───────────────────────────────────────────────────────────── listes ── */

.ligne {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .72rem 0;
  border-bottom: 1px solid var(--bord);
}
.ligne:last-child { border-bottom: none; }
.ligne-corps { flex: 1; min-width: 0; }
.ligne-titre { font-size: .93rem; line-height: 1.35; font-weight: 500; }
.ligne-detail { font-size: .76rem; color: var(--texte-faible); margin-top: 2px; }

.coche {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  border: 2px solid var(--bord-fort);
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: var(--transition);
}
.coche::after {
  content: "";
  width: 10px;
  height: 5.5px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity .15s;
}
.coche:hover { border-color: var(--vert); }
.coche:active { transform: scale(.88); }
.coche[aria-pressed="true"] { background: var(--vert); border-color: var(--vert); }
.coche[aria-pressed="true"]::after { opacity: 1; }

.ligne.faite .ligne-titre { color: var(--texte-faible); text-decoration: line-through; }

.pastille {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--surface-3);
  color: var(--texte-doux);
  white-space: nowrap;
  flex-shrink: 0;
}
/* une date visee et depassee : le dire, sans en faire un drame */
.pastille-retard { background: var(--rouge-doux); color: var(--rouge); }
.serie-or { background: var(--orange-doux); color: var(--or); }
.serie-chaude { background: var(--vert-doux); color: var(--vert); }
.serie-tiede { background: var(--bleu-doux); color: var(--bleu); }
.serie-froide { background: var(--surface-3); color: var(--texte-faible); }
.pastille-primaire { background: var(--primary-doux); color: var(--primary); }

/* ──────────────────────────────────────────────────── grille 28 jours ── */

.grille { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: .7rem; }
.case { aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); transition: var(--transition); }
.case.non-prevue { background: transparent; border: 1px solid var(--surface-3); }
.case.futur { opacity: .35; }

/* ───────────────────────────────────────────────── les sept jours ── */

.jour-semaine { align-items: flex-start; gap: .7rem; }
.jour-actuel .jour-puce { background: var(--primary); border-color: var(--primary); color: #fff; }

.jour-puce {
  width: 42px;
  flex-shrink: 0;
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  background: var(--surface-2);
  padding: 4px 0;
  text-align: center;
  line-height: 1.15;
}
.jour-nom { display: block; font-size: .6rem; font-weight: 700; text-transform: uppercase; opacity: .7; }
.jour-numero { display: block; font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.jour-priorite {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  font-size: .85rem;
  line-height: 1.4;
  padding: 1px 0;
}
.jour-priorite i { font-size: .72rem; color: var(--texte-faible); flex-shrink: 0; }
.jour-priorite.faite { color: var(--texte-faible); text-decoration: line-through; }
.jour-priorite.faite i { color: var(--vert); }

.jour-vide { font-size: .82rem; display: inline-flex; align-items: center; gap: .35rem; }

/* ─────────────────────────────────────────────────────────── calendrier ── */


.legende { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .9rem; font-size: .75rem; color: var(--texte-doux); }
.legende span { display: flex; align-items: center; gap: .35rem; }
.legende .puce { width: 8px; height: 8px; border-radius: 50%; }

/* ───────────────────────────────────────────────────────── formulaires ── */

.groupe { margin-bottom: 1rem; }
.groupe label { display: block; font-size: .82rem; font-weight: 600; color: var(--texte-doux); margin-bottom: .35rem; }
.groupe .aide { font-size: .76rem; color: var(--texte-faible); margin-top: .35rem; line-height: 1.45; }
.groupe .erreur { font-size: .78rem; color: var(--rouge); margin-top: .35rem; font-weight: 500; }

.champ {
  width: 100%;
  padding: .68rem .8rem;
  font-size: 16px; /* 16 px : evite le zoom automatique sur iPhone */
  font-family: inherit;
  color: var(--texte);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  outline: none;
  transition: var(--transition);
}
.champ:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-doux); }
.champ::placeholder { color: var(--texte-faible); }
textarea.champ { resize: vertical; line-height: 1.55; }
.champ-couleur { padding: 4px; height: 44px; cursor: pointer; }

/* L'attribut « hidden » doit l'emporter sur le display des composants. */
[hidden] { display: none !important; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .75rem 1.1rem;
  font-size: .93rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--texte);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  cursor: pointer;
  transition: var(--transition);
}
.bouton:hover { background: var(--surface-3); color: var(--texte); }
.bouton:active { transform: scale(.985); }
.bouton-principal {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--ombre-s);
}
.bouton-principal:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.bouton-danger { color: var(--rouge); border-color: var(--rouge); background: transparent; }
.bouton-danger:hover { background: var(--rouge-doux); color: var(--rouge); }
.bouton-discret { background: transparent; }
.bouton-petit { width: auto; padding: .42rem .8rem; font-size: .8rem; }

.actions { display: flex; gap: .6rem; margin-top: 1.1rem; }

/* Notes de 1 a 5.
   Cinq boutons etires sur toute la largeur d'un ecran de 1400 px, ce n'est
   plus un curseur, c'est une banderole. Ils restent compacts et alignes a
   gauche : la cible reste grande au doigt sans devorer l'ecran. */
.note-groupe { margin-bottom: 1.1rem; }
.note-groupe:last-child { margin-bottom: 0; }

.note-entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}
.note-entete label { margin: 0; font-size: .88rem; font-weight: 600; color: var(--texte); }
.note-bornes { font-size: .74rem; color: var(--texte-faible); }

.notes { display: flex; gap: .4rem; }
.notes label {
  flex: 1;
  max-width: 72px;
  height: 52px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  background: var(--surface-2);
  font-size: .95rem;
  font-weight: 600;
  color: var(--texte-doux);
  cursor: pointer;
  transition: var(--transition);
  font-variant-numeric: tabular-nums;
}
.notes label:hover { border-color: var(--primary); }
.notes label:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--ombre-s);
}
.notes input { position: absolute; opacity: 0; pointer-events: none; }

.jours-semaine { display: flex; gap: .35rem; }
.jours-semaine label {
  flex: 1;
  margin: 0;
  text-align: center;
  padding: .55rem 0;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--texte-doux);
  cursor: pointer;
  transition: var(--transition);
}
.jours-semaine label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.jours-semaine input { position: absolute; opacity: 0; pointer-events: none; }

/* ───────────────────────────────────────────────────────────── chiffres ── */

.chiffres { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.chiffres.trois { grid-template-columns: repeat(3, 1fr); }
.chiffres.quatre { grid-template-columns: repeat(2, 1fr); }

.chiffre {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  padding: .85rem;
  transition: var(--transition);
}
.chiffre:hover { border-color: var(--bord-fort); }
.chiffre .valeur { font-size: 1.45rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.chiffre .etiquette { font-size: .74rem; color: var(--texte-doux); margin-top: 2px; line-height: 1.35; }
.chiffre .icone { font-size: .95rem; margin-bottom: .3rem; display: block; }
.chiffre.positif .valeur { color: var(--vert); }
.chiffre.positif .icone { color: var(--vert); }
.chiffre.negatif .valeur { color: var(--rouge); }
.chiffre.primaire .valeur { color: var(--primary); }
.chiffre.primaire .icone { color: var(--primary); }
.chiffre.orange .valeur { color: var(--orange); }
.chiffre.orange .icone { color: var(--orange); }

.graphique { width: 100%; height: auto; display: block; margin-top: .5rem; overflow: visible; }
.graphique polyline { fill: none; stroke: var(--vert); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.graphique polygon { fill: url(#degrade-vert); opacity: .16; }
.graphique.bleu polyline { stroke: var(--bleu); }
.graphique.bleu polygon { fill: var(--bleu); opacity: .12; }

/* ─────────────────────────────────────────────────────── barre du bas ── */

.nav-bas {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--surface);
  border-top: 1px solid var(--bord);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -1px 12px rgba(15, 23, 42, .06);
}
/* Six onglets : chacun garde sa colonne, les mots retrecissent plutot que
   de passer a la ligne. */
.nav-bas-contenu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 600px; margin: 0 auto; }
.nav-bas a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: .5rem .1rem .45rem;
  color: var(--texte-faible);
  font-size: .6rem;
  text-align: center;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  position: relative;
  transition: var(--transition);
}
.nav-bas a.actif { color: var(--primary); }
.nav-bas a i { font-size: 1.16rem; }
.nav-bas .point {
  position: absolute;
  top: 6px;
  right: calc(50% - 15px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rouge);
  border: 1.5px solid var(--surface);
}

/* Une phrase d'introduction dans une carte : explique sans crier. */
.intro-carte {
  margin: -.3rem 0 .8rem;
  font-size: .82rem;
  line-height: 1.5;
  padding-bottom: .7rem;
  border-bottom: 1px dashed var(--bord);
}

.compteur-groupe {
  margin-left: auto;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: .72rem;
  color: var(--texte-faible);
}


/* Actions au pied d'une carte d'habitude : retirer doit prendre un clic. */
.actions-habitude {
  display: flex;
  gap: .5rem;
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: 1px solid var(--bord);
}
.actions-habitude .bouton { flex: 1; min-width: 0; }


/* Champs qu'on ajoute a volonte (habitudes et projets au demarrage). */
.champ-repetable { margin-bottom: .45rem; }
.champ-repetable .champ { max-width: none; }
.ajouter-champ { margin-top: .2rem; }


/* ──────────────────────────────────────────── choix des habitudes ── */

/* Au demarrage, chaque proposition dit pourquoi elle existe : on choisit
   mal une habitude dont on ne comprend pas l'interet. */
.choix-habitudes { display: grid; gap: .4rem; }

.choix-habitude {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .6rem .7rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  background: var(--surface-2);
  cursor: pointer;
  transition: var(--transition);
  margin: 0;
}
.choix-habitude:hover { border-color: var(--vert); }
.choix-habitude:has(input:checked) {
  border-color: var(--vert);
  background: var(--vert-doux);
}
.choix-habitude input {
  width: 19px;
  height: 19px;
  accent-color: var(--vert);
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
}
.choix-nom { display: block; font-size: .89rem; font-weight: 600; line-height: 1.35; }
.choix-pourquoi { display: block; font-size: .76rem; color: var(--texte-faible); margin-top: 1px; }


/* Carte « ajouter » : presente sans se faire passer pour un projet reel. */
.carte-ajout {
  border: 1px dashed var(--bord-fort);
  background: transparent;
  box-shadow: none;
}
.carte-ajout .carte-titre { color: var(--texte-doux); }
.carte-ajout .champ { max-width: none; }


/* Rappel de la journee dans le bilan : lisible, non cliquable. */
.rappel-ligne {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  font-size: .86rem;
  line-height: 1.45;
  padding: .18rem 0;
}
.rappel-ligne i { font-size: .72rem; color: var(--texte-faible); flex-shrink: 0; }
.rappel-ligne.faite { color: var(--texte-faible); text-decoration: line-through; }
.rappel-ligne.faite i { color: var(--vert); }


/* ────────────────────────────────────── reponse au bilan du soir ── */

/* L'app repond a la journee au lieu de rediriger en silence. Le ton suit la
   note, mais sans exces : une mauvaise journee ne merite ni drame ni lecon. */
.carte-reponse { border-top: 3px solid var(--bord-fort); }
.carte-reponse.r-bravo { border-top-color: var(--vert); }
.carte-reponse.r-info { border-top-color: var(--bleu); }
.carte-reponse.r-attention { border-top-color: var(--orange); }

.reponse-tete { display: flex; align-items: center; gap: 1rem; }
.reponse-note {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.reponse-note span { font-size: 1rem; font-weight: 500; color: var(--texte-faible); }
.r-bravo .reponse-note { color: var(--vert); }
.r-info .reponse-note { color: var(--bleu); }
.r-attention .reponse-note { color: var(--orange); }

.reponse-titre { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.reponse-constat { font-size: .85rem; color: var(--texte-doux); margin-top: 2px; }
.reponse-citation {
  margin: 1rem 0 0;
  padding-top: .9rem;
  border-top: 1px dashed var(--bord);
  font-style: italic;
  font-size: .93rem;
  color: var(--texte-doux);
}

.piste {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  padding: .55rem 0;
  border-bottom: 1px solid var(--bord);
  font-size: .88rem;
  line-height: 1.5;
}
.piste:last-child { border-bottom: none; }
.piste i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }

.lien-analyse { padding: .6rem 0; border-bottom: 1px solid var(--bord); }
.lien-analyse:last-of-type { border-bottom: none; }
.lien-texte { font-size: .88rem; line-height: 1.4; margin-bottom: .25rem; }
.lien-mesure { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lien-detail { font-size: .74rem; color: var(--texte-faible); }


/* ─────────────────────────────── accueil : la priorite du jour ── */

/* Une seule chose en grand : ce qui compte aujourd'hui. Si la personne ne
   fait qu'une chose de sa journee, c'est celle-la. */
.heros { padding: 1.4rem 1.5rem; border-top: 3px solid var(--primary); }
.heros-discret { border-top-color: var(--bord-fort); }
.heros-soir {
  border-top-color: var(--violet);
  background: linear-gradient(135deg, var(--primary-doux), var(--surface) 70%);
}
.heros-etiquette {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .6rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
}
.heros-discret .heros-etiquette { color: var(--texte-faible); }
.heros-titre { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.heros-discret .heros-titre { font-size: 1.1rem; }
.heros-texte { color: var(--texte-doux); margin: .4rem 0 1rem; font-size: .93rem; max-width: 60ch; }
.heros-priorite { border-bottom: none; padding: .1rem 0; align-items: flex-start; gap: 1rem; }
.heros-priorite.faite .heros-titre { color: var(--texte-faible); text-decoration: line-through; }
.heros-projet { display: flex; align-items: center; gap: .35rem; margin-top: .35rem; }

.coche-grande { width: 34px; height: 34px; border-radius: 10px; margin-top: 3px; }
.coche-grande::after { width: 14px; height: 8px; }

.priorite-rapide { display: flex; gap: .5rem; flex-wrap: wrap; }
.priorite-rapide .champ { flex: 1; min-width: 220px; max-width: none; }

.heros-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bord);
}
.serie-principale { display: flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--texte-doux); flex-wrap: wrap; }
.serie-principale i.bi-fire { color: var(--orange); font-size: 1.15rem; }
.serie-principale strong { font-size: 1.35rem; color: var(--texte); font-variant-numeric: tabular-nums; }
.avancement-jour { font-size: .8rem; color: var(--texte-faible); font-variant-numeric: tabular-nums; }

.ligne-compacte { padding: .5rem 0; }
.ligne-compacte .ligne-titre { font-size: .88rem; }

/* Habitudes repliees par defaut au-dela de cinq. */
details.replie > summary { list-style: none; cursor: pointer; user-select: none; }
details.replie > summary::-webkit-details-marker { display: none; }
details.replie:not([open]) > summary { margin-bottom: 0; }
.replie-droite { display: flex; align-items: center; gap: .5rem; }
.replie-chevron { font-size: .85rem; transition: transform .2s; color: var(--texte-faible); }
details[open] .replie-chevron { transform: rotate(180deg); }

.liens-discrets { text-align: center; font-size: .82rem; color: var(--texte-faible); margin: .6rem 0 0; }
.liens-discrets a { color: var(--texte-doux); }
.liens-discrets a:hover { color: var(--primary); }

.choix-habitude.choix-bloque { opacity: .45; cursor: not-allowed; }


/* ─────────────────────────────────────────────────── encarts d'aide ── */

/* Une app qu'on partage doit s'expliquer sans documentation. Ces encarts
   disparaissent des que la personne les a lus. */
.aide-encart {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .75rem .9rem;
  margin-bottom: .8rem;
  border-radius: var(--rayon-s);
  background: var(--primary-doux);
  border: 1px solid var(--primary);
  border-left-width: 3px;
  font-size: .85rem;
  line-height: 1.5;
}
.aide-encart > i { color: var(--primary); font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.aide-encart strong { display: block; color: var(--texte); margin-bottom: 1px; }
.aide-encart span { color: var(--texte-doux); }
.aide-encart > div { flex: 1; min-width: 0; }
.aide-fermer {
  background: none;
  border: none;
  color: var(--texte-faible);
  cursor: pointer;
  padding: 2px 4px;
  font-size: .95rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.aide-fermer:hover { color: var(--texte); }

/* La serie doit se lire sans mode d'emploi : un mot vaut mieux qu'un tiret. */
.serie-froide { background: var(--surface-3); color: var(--texte-faible); font-weight: 600; }


/* ───────────────────────────────────────────────────────────── projets ── */

/* Les blocs de projets se placent en grille : sur un grand ecran, planifier
   quatre projets ne doit pas demander quatre ecrans de defilement. */
.grille-projets {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-bottom: .9rem;
}

.carte-projet { border-top: 3px solid var(--teinte, var(--primary)); }
.carte-projet.en-pause { opacity: .6; }

.projet-titre {
  text-transform: none;
  letter-spacing: -.005em;
  font-size: 1rem;
  font-weight: 700;
  color: var(--texte);
  align-items: center;
}
.projet-titre > span:first-child { display: flex; align-items: center; gap: .45rem; }

/* les heures travaillees ce jour-la, a cote du nom du projet */
.pj-heures {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--texte-doux);
  font-size: .72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.puce-projet {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teinte, var(--primary));
  flex-shrink: 0;
}

.champ-priorite {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .5rem;
}
.champ-priorite .champ { max-width: none; flex: 1; }
.champ-priorite .rang {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--texte-faible);
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.champ-priorite:first-of-type .rang {
  background: var(--teinte, var(--primary));
  color: #fff;
}

.aide-projet { margin: .3rem 0 0; font-size: .76rem; }

.etiquette-projet {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--texte-doux);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: .9rem 0 .3rem;
}
.etiquette-projet:first-child { margin-top: 0; }


/* ──────────────────────────────────────────────────────── suggestions ── */

.suggestions .suggestion:last-child { border-bottom: none; }

.suggestion {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--bord);
  color: var(--texte);
  transition: var(--transition);
}
.suggestion[href]:hover { color: var(--texte); padding-left: .25rem; }
.suggestion > i { font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.suggestion-corps { flex: 1; min-width: 0; }
.suggestion-titre { font-size: .93rem; font-weight: 600; line-height: 1.35; }
.suggestion-detail { font-size: .8rem; color: var(--texte-doux); margin-top: 2px; line-height: 1.45; }

.s-urgent > i { color: var(--rouge); }
.s-attention > i { color: var(--orange); }
.s-info > i { color: var(--bleu); }
.s-bravo > i { color: var(--vert); }

/* ────────────────────────────────────────────────────────────── nutrition ── */

.macro-tete { margin-bottom: 1rem; }
.macros > * + * { margin-top: .7rem; }
.macro-entete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .82rem;
  margin-bottom: .3rem;
}
.macro-entete > span:first-child { font-weight: 600; color: var(--texte-doux); }
.macro-valeur { font-variant-numeric: tabular-nums; color: var(--texte-faible); font-size: .78rem; }

.barre-progres span.m-prot { background: linear-gradient(90deg, #ef4444, #f87171); }
.barre-progres span.m-gluc { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.barre-progres span.m-lip { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.barre-progres span.m-eau { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.repas-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: .7rem;
  padding-top: .6rem;
  border-top: 1px dashed var(--bord);
  font-size: .82rem;
  color: var(--texte-doux);
}
.repas-total strong { color: var(--texte); font-size: .95rem; }

.puces { display: flex; flex-wrap: wrap; gap: .45rem; }
.puce-aliment {
  border: 1px solid var(--bord);
  background: var(--surface-2);
  color: var(--texte);
  border-radius: 20px;
  padding: .4rem .8rem;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.puce-aliment:hover { border-color: var(--vert); background: var(--vert-doux); }
.puce-aliment span { color: var(--texte-faible); font-size: .74rem; margin-left: .3rem; }

.repli { margin: .3rem 0 1rem; }
.repli summary {
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  padding: .4rem 0;
}
.repli[open] summary { margin-bottom: .3rem; }

/* ──────────────────────────────────────────────────────── entrainement ── */

.series-entete {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 32px;
  gap: .5rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--texte-faible);
  padding-bottom: .35rem;
}
.serie-ligne {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 32px;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}
.serie-ligne .champ { max-width: none; }
.serie-numero {
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--texte-faible);
  font-variant-numeric: tabular-nums;
}
.serie-retrait { display: grid; place-items: center; margin: 0; cursor: pointer; }

/* ────────────────────────────────────────────────────── saisie rapide ── */

.ligne.proposition { cursor: pointer; gap: .65rem; }
.ligne.proposition input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--vert);
  flex-shrink: 0;
  cursor: pointer;
}
.ligne.proposition:has(input:not(:checked)) { opacity: .45; }

.exemple {
  margin: 0 0 .45rem;
  padding: .5rem .7rem;
  background: var(--surface-2);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--rayon-s) var(--rayon-s) 0;
  font-size: .85rem;
  color: var(--texte-doux);
}

code {
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .85em;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* ───────────────────────────────────────────────────────────── divers ── */

.vide { text-align: center; padding: 1.8rem 1rem; color: var(--texte-faible); }
.vide i { font-size: 2rem; display: block; margin-bottom: .6rem; opacity: .45; }
.vide p { margin: 0 0 .9rem; font-size: .88rem; line-height: 1.5; }

.sourdine { color: var(--texte-doux); font-size: .85rem; }
.centre { text-align: center; }
.pile > * + * { margin-top: .55rem; }

.entete-nav { display: flex; gap: .5rem; align-items: center; margin-bottom: .9rem; font-size: .84rem; font-weight: 500; }
.entete-nav a { color: var(--texte-doux); }
.entete-nav a:hover { color: var(--primary); }

/* resultats de recherche */
.resultat {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--bord);
  color: var(--texte);
}
.resultat:last-child { border-bottom: none; }
.resultat:hover { color: var(--primary); }
.resultat i { font-size: 1.05rem; color: var(--texte-faible); width: 22px; text-align: center; flex-shrink: 0; }

mark { background: var(--orange-doux); color: var(--texte); padding: 0 2px; border-radius: 3px; }

/* page de connexion */
.auth { max-width: 400px; margin: 0 auto; padding: 3rem 1.2rem 2.5rem; }
.auth .logo-auth {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.auth .logo-auth i {
  background: linear-gradient(135deg, var(--primary), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth .promesse { color: var(--texte-doux); margin-bottom: 1.8rem; font-size: .95rem; line-height: 1.55; }
.auth .bascule { text-align: center; margin-top: 1.2rem; font-size: .87rem; color: var(--texte-doux); }

/* ═══════════════════════════════ grand ecran ═══════════════════════════ */

/* ── 700 px : on quitte la mise en page telephone ──────────────────────── */
@media (min-width: 700px) {
  .chiffres.quatre { grid-template-columns: repeat(4, 1fr); }
  .recherche { display: block; }
  .recherche-mobile { display: none; }
  .enveloppe { padding: 1.4rem; }
  .haut-contenu { padding: .8rem 1.4rem; }
  .champ { font-size: .93rem; }

  /* Un bouton qui traverse 800 px n'est plus un bouton, c'est une banderole.
     Sur telephone il reste pleine largeur, la cible doit etre grande. */
  .bouton { width: auto; min-width: 150px; }
  .notes label { flex: 0 0 52px; height: 48px; }
  .bouton-plein { width: 100%; }
  .actions { justify-content: flex-end; }
  .actions .bouton { min-width: 130px; }

  /* Une ligne de saisie trop longue est illisible et decourage l'ecriture. */
  .champ { max-width: 540px; }
  textarea.champ { max-width: 640px; }
  .champ-couleur, .chiffres .champ, .groupe--large .champ { max-width: none; }
}

/* ── 860 px : la sidebar remplace la barre du bas ──────────────────────────
   Volontairement bas : avec la mise a l'echelle Windows (125 %, 150 %), une
   fenetre de 1400 px physiques ne fait que ~930 px CSS. A 1000 px, un ecran
   de portable affichait encore la version telephone etiree. */
@media (min-width: 860px) {
  .barre { display: flex; }
  .zone { margin-left: var(--largeur-barre); }
  .nav-bas { display: none; }
  .enveloppe { padding-bottom: 2.5rem; }
  .pile-toasts { left: auto; right: 1.5rem; transform: none; bottom: 1.5rem; }
  .carte { padding: 1.25rem; }
}

/* ── 1150 px : assez de place pour deux colonnes reelles ────────────────── */
@media (min-width: 1150px) {
  .colonnes.deux { grid-template-columns: 1fr 1fr; align-items: start; }
  .grille-projets { grid-template-columns: 1fr 1fr; align-items: start; }
  .colonnes.large-etroit { grid-template-columns: 1.5fr 1fr; align-items: start; }
}

/* ── 1400 px : on remplit la largeur avec plus de contenu, pas plus de vide ── */
@media (min-width: 1400px) {
  .colonnes { gap: 1.1rem; }
  .enveloppe { padding: 1.6rem 2rem; }
  /* Les tuiles de chiffres passent sur une seule rangee au lieu de deux. */
  .chiffres { grid-template-columns: repeat(4, 1fr); }
  .chiffres.trois { grid-template-columns: repeat(3, 1fr); }
  /* Les suggestions se lisent sur deux colonnes : la carte fait toute la largeur. */
  .suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6rem; }
  .suggestions .carte-titre { grid-column: 1 / -1; }
  .suggestions .suggestion:nth-last-child(2):nth-child(odd),
  .suggestions .suggestion:last-child { border-bottom: none; }
  .grille-projets { grid-template-columns: repeat(3, 1fr); }
}

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


/* ─────────────────────── planification : étoile et choses pas faites ── */

.legende-etoile {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .84rem;
  color: var(--texte-doux);
  margin: 0 0 .9rem;
}
.legende-etoile i { color: var(--primary); }

.etoile {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--rayon-s);
  border: 1px solid var(--bord);
  color: var(--texte-faible);
  cursor: pointer;
  transition: var(--transition);
}
.etoile:hover { border-color: var(--bord-fort); color: var(--texte-doux); }
.etoile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.etoile .etoile-pleine { display: none; }
.etoile input:checked ~ .etoile-pleine { display: inline; }
.etoile input:checked ~ .etoile-vide { display: none; }
.etoile:has(input:checked) {
  background: var(--primary-doux);
  border-color: var(--primary);
  color: var(--primary);
}
.etoile:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

.a-reprendre {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  background: var(--orange-doux);
  border-radius: var(--rayon-s);
  padding: .55rem .7rem;
  margin-bottom: .7rem;
  font-size: .86rem;
}
.a-reprendre > i { color: var(--orange); }
/* Le texte prend toute la ligne : les deux boutons passent ensemble dessous. */
.a-reprendre-texte { flex: 1 1 calc(100% - 2rem); font-weight: 600; color: var(--texte); }
.a-reprendre-texte .quand {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: var(--texte-doux);
}
.a-reprendre-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 0 auto; }

.a-reprendre-global {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem;
  background: var(--orange-doux);
  border-radius: var(--rayon);
  padding: .7rem 1rem;
  margin-bottom: 1rem;
  font-size: .88rem;
}

.soumission-defaut {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  padding: 0;
}

.priorite-rapide select.champ { flex: 0 1 13rem; }

/* ───────────────────────────────────────────────── page d'un projet ── */

.lien-projet {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.lien-projet:hover { color: var(--primary); }
.ouvrir-projet { margin: .2rem 0 .8rem; }

.liste-projet { list-style: none; margin: 0; padding: 0; }
.liste-projet li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--bord);
  font-size: .9rem;
}
.liste-projet li:last-child { border-bottom: none; }
.liste-projet .date {
  margin-left: auto;
  font-size: .76rem;
  color: var(--texte-faible);
  white-space: nowrap;
}


/* ─────────────────────────────── accueil : deux colonnes, frise, tuiles ── */

.accueil {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1.1rem;
  align-items: start;
}
@media (min-width: 1150px) {
  .accueil { grid-template-columns: minmax(0, 1fr) 320px; }
}

.heros-autres,
.ajout-jour {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--bord);
}
.ajout-titre,
.taches-titre {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-bottom: .35rem;
}
.ajout-jour .priorite-rapide { margin-top: .7rem; }

.frise {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
  padding: .8rem;
}
.frise-etape {
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  padding: .55rem .75rem;
  font-size: .8rem;
  color: var(--texte-doux);
}
.frise-etape b { display: block; font-size: .86rem; color: var(--texte); font-weight: 700; }
.frise-etape.maintenant {
  border-color: var(--primary);
  background: var(--primary-doux);
  color: var(--primary);
}
.frise-etape.maintenant b { color: var(--primary); }

.groupe-moment + .groupe-moment { margin-top: .9rem; }
.moment-titre { font-size: .78rem; font-weight: 600; color: var(--texte-doux); margin-bottom: .45rem; }
.groupe-moment.a-venir .tuile { opacity: .6; }
.tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .5rem;
}
.ligne.tuile {
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  padding: .55rem .65rem;
  margin: 0;
}
.tuile .ligne-titre { font-size: .86rem; }
.tuile.faite { background: var(--vert-doux); border-color: transparent; }
/* la semaine est faite : visible, mais l'ecran ne la reclame plus */
.tuile.tenue { opacity: .62; }
.coche-tenue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--vert-doux);
  color: var(--vert);
  font-size: .8rem;
}

.semaine-ronds {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .25rem;
  text-align: center;
  margin-bottom: .9rem;
}
.rond-jour span { display: block; font-size: .7rem; font-weight: 600; color: var(--texte-faible); }
.rond-jour i {
  display: block;
  width: 24px;
  height: 24px;
  margin: .25rem auto 0;
  border-radius: 50%;
  border: 1.5px solid var(--bord);
}
.rond-jour.actif i { background: var(--primary); border-color: var(--primary); }
.rond-jour.aujourdhui span { color: var(--primary); }
.rond-jour.aujourdhui i { border-color: var(--primary); }
.rond-jour.futur i { border-style: dashed; }
.semaine-texte { font-size: .84rem; color: var(--texte-doux); margin: .5rem 0 0; }
.accueil-cote .avancement-jour { margin-top: .6rem; }

/* ─────────────────────── menu d'actions d'une priorité ou d'une tâche ── */

.carte:has(.menu-actions[open]) { overflow: visible; position: relative; z-index: 5; }
.menu-actions { position: relative; flex-shrink: 0; }
.menu-actions > summary {
  list-style: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--rayon-s);
  color: var(--texte-faible);
}
.menu-actions > summary::-webkit-details-marker { display: none; }
.menu-actions > summary:hover,
.menu-actions[open] > summary { background: var(--fond); color: var(--texte); }
.menu-panneau {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  width: min(340px, 86vw);
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-m);
  padding: .8rem;
}
.menu-modifier { display: grid; gap: .45rem; }
.menu-modifier .champ { max-width: none; }
.menu-boutons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.menu-boutons form { margin: 0; }
.menu-aide { font-size: .74rem; color: var(--texte-faible); margin: .55rem 0 0; }
.etoile-marque { color: var(--primary); font-size: .8rem; margin-right: .2rem; }

.ligne-boutons { display: flex; gap: .35rem; flex-shrink: 0; }
.ligne-boutons form { margin: 0; }
.ligne-tache .ligne-detail { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.etat-pas-fait { color: var(--orange); font-weight: 600; }
@media (max-width: 560px) {
  .ligne-tache { flex-wrap: wrap; }
  .ligne-tache .ligne-corps { flex-basis: calc(100% - 40px); }
}

.ajout-tache { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.ajout-tache .champ { flex: 1 1 14rem; max-width: none; }

.taches-bloc { margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--bord); }
.a-reprendre.tache-simple { background: var(--fond); }
.a-reprendre.tache-simple > i { color: var(--texte-faible); }

.lien-plus { display: inline-block; font-size: .8rem; margin-top: .4rem; }


/* ─────────────────────────────── accueil : une carte par projet ── */

.heros {
  border-radius: var(--rayon-l);
  box-shadow: var(--ombre);
  padding: 1.5rem 1.6rem;
}
.heros-vide-titre { font-size: 1.3rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.heros-vide-texte { color: var(--texte-doux); margin: .35rem 0 0; font-size: .92rem; max-width: 62ch; }

.projets-jour {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.carte-jour {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.05rem 1.15rem 1rem;
  border-top: 3px solid var(--teinte, var(--primary));
  border-radius: var(--rayon-l);
  box-shadow: var(--ombre);
  transition: box-shadow .2s ease;
}
.carte-jour:hover { box-shadow: var(--ombre-m); }
.cj-tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .35rem;
}
.cj-nom {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--texte);
  text-decoration: none;
}
a.cj-nom:hover { color: var(--teinte, var(--primary)); }
.cj-type { display: block; margin-top: .1rem; font-size: .74rem; color: var(--texte-faible); }
.cj-compte {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  color: var(--teinte, var(--primary));
  background: color-mix(in srgb, var(--teinte, var(--primary)) 12%, transparent);
}
.cj-compte.plein { color: var(--vert); background: var(--vert-doux); }
.cj-section {
  margin: .75rem 0 .1rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--texte-faible);
}
.carte-jour .ligne { padding: .5rem 0; gap: .6rem; }
.carte-jour .ligne-titre { font-size: .9rem; }
.cj-vide { font-size: .85rem; color: var(--texte-faible); margin: .5rem 0 .2rem; }
.cj-ajout {
  display: flex;
  gap: .4rem;
  margin-top: auto;
  padding-top: .85rem;
}
.cj-ajout .champ { flex: 1; min-width: 0; max-width: none; padding: .5rem .75rem; font-size: .87rem; }
.carte-nouveau {
  border-top: 3px dashed var(--bord-fort);
  background: var(--surface-2);
  box-shadow: none;
}
.carte-nouveau form { display: flex; flex-direction: column; gap: .55rem; height: 100%; }
.carte-nouveau .champ { max-width: none; }

.form-etoile { margin: 0; flex-shrink: 0; }
.bouton-etoile {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--rayon-s);
  background: none;
  color: var(--texte-faible);
  font-size: .95rem;
  cursor: pointer;
}
.bouton-etoile:hover { color: var(--primary); background: var(--primary-doux); }
.bouton-etoile.active { color: var(--primary); }

/* La frise se fait discrete : un repere, pas un bloc. */
.frise { padding: .35rem; gap: .35rem; border-radius: var(--rayon-l); }
.frise-etape { border: none; background: transparent; padding: .5rem .85rem; }
.frise-etape.maintenant { background: var(--primary-doux); }
/* Les boutons du champ d'ajout gardent leur taille : le champ prend le reste. */
.cj-ajout .bouton { width: auto; flex: 0 0 auto; }
.cj-ajout .champ { flex: 1 1 7rem; }
/* Sur grand ecran, les boutons ont une largeur minimale de 150 px : un petit
   bouton, lui, prend la taille de son texte. */
.bouton-petit { min-width: 0; }

/* Les cartes gardent la hauteur de leur contenu : pas de grand vide
   au-dessus du champ d'ajout quand une carte voisine est plus haute. */
.projets-jour { align-items: start; }
.cj-ajout { margin-top: 0; }


/* ─────────────────────────────── frise : trois étapes reliées ── */

.frise {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0 0 .9rem;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-l);
  box-shadow: var(--ombre-s);
}
.frise-etape,
.frise-etape.maintenant {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--texte-faible);
  font-size: .8rem;
}
.frise-etape:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: .8rem;
  height: 2px;
  margin: 0 .7rem;
  border-radius: 2px;
  background: var(--bord);
}
.frise-point {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--texte-faible);
  font-size: .95rem;
}
.frise-texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.frise-texte b { font-size: .86rem; font-weight: 700; color: var(--texte-doux); }
.frise-etape.passee .frise-point { background: var(--vert-doux); color: var(--vert); }
.frise-etape.passee:not(:last-child)::after { background: var(--vert); opacity: .45; }
.frise-etape.maintenant .frise-point {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-doux);
}
.frise-etape.maintenant b { color: var(--primary); }
.frise-etape.maintenant .frise-texte { color: var(--texte-doux); }
@media (max-width: 640px) {
  .frise { padding: .75rem; }
  .frise-desc { display: none; }
  .frise-etape:not(:last-child)::after { margin: 0 .4rem; }
}

/* ─────────────────────────────── habitudes : couleur, barre, tuiles ── */

.carte-habitudes { padding: 1.2rem 1.25rem 1.3rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.habitudes-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.habitudes-titre { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.habitudes-sous { margin-top: .1rem; font-size: .82rem; color: var(--texte-doux); }
.habitudes-tete a { font-size: .8rem; font-weight: 600; }
.barre-habitudes {
  height: 6px;
  margin: .8rem 0 1.15rem;
  border-radius: 6px;
  background: var(--surface-3);
  overflow: hidden;
}
.barre-habitudes span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), var(--vert));
  transition: width .35s ease;
}

.groupe-moment + .groupe-moment { margin-top: 1.15rem; }
.moment-entete { display: flex; align-items: center; gap: .45rem; margin-bottom: .55rem; color: var(--texte-doux); }
.moment-entete i { font-size: .95rem; }
.moment-entete .moment-titre {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texte-doux);
}
.groupe-moment.a-venir .tuile { opacity: 1; }
.groupe-moment.a-venir .moment-entete,
.groupe-moment.a-venir .moment-titre { color: var(--texte-faible); }

.tuiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.ligne.tuile {
  padding: .75rem .85rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.ligne.tuile:hover {
  border-color: color-mix(in srgb, var(--teinte, var(--primary)) 45%, var(--bord));
  transform: translateY(-1px);
}
.groupe-moment.a-venir .ligne.tuile:not(.faite) { border-style: dashed; }
.tuile .coche {
  border-radius: 50%;
  border-color: color-mix(in srgb, var(--teinte, var(--primary)) 60%, var(--bord));
}
.tuile .coche[aria-pressed="true"] {
  background: var(--teinte, var(--vert));
  border-color: var(--teinte, var(--vert));
}
.ligne.tuile.faite {
  background: color-mix(in srgb, var(--teinte, var(--vert)) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--teinte, var(--vert)) 35%, transparent);
}
.ligne.tuile.faite .ligne-titre { text-decoration: none; color: var(--texte-doux); }
/* Pas de pastille tant qu'aucune serie n'a commence. */
.tuile .serie-froide { display: none; }


/* ─────────────────────────────── tableau de bord : la semaine ── */

.tb-phrase { font-size: 1.3rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.35; max-width: 60ch; }
.tb-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .7rem;
  margin-top: 1.1rem;
}
.tb-kpi {
  padding: .8rem .95rem;
  border-radius: var(--rayon);
  background: var(--surface-2);
  border: 1px solid var(--bord);
}
.tb-kpi b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--primary); }
.tb-kpi span { font-size: .78rem; color: var(--texte-doux); }

.tb-carte { padding: 1.15rem 1.25rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.tb-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.tb-titre { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }
.tb-tete a, .tb-sous { font-size: .8rem; font-weight: 600; }
.tb-sous { color: var(--texte-doux); font-weight: 500; }

.tb-barre { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: .45rem; }
.tb-barre span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--teinte, var(--primary));
}

.tb-projet {
  display: block;
  padding: .75rem .85rem;
  margin: 0 -.85rem;
  border-radius: var(--rayon);
  color: var(--texte);
  text-decoration: none;
}
.tb-projet:hover { background: var(--surface-2); }
.tb-projet + .tb-projet { border-top: 1px solid var(--bord); border-radius: 0; }
.tb-projet-haut { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.tb-projet-nom { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.tb-projet-chiffres { font-size: .82rem; color: var(--texte-doux); white-space: nowrap; }
.tb-projet-bas { display: flex; gap: .9rem; margin-top: .4rem; font-size: .78rem; color: var(--texte-faible); }

.tb-grille { display: grid; gap: .35rem; overflow-x: auto; }
.tb-ligne {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) repeat(7, 26px);
  align-items: center;
  gap: .35rem;
}
.tb-entete span { font-size: .7rem; font-weight: 700; text-align: center; color: var(--texte-faible); }
.tb-entete span.aujourdhui { color: var(--primary); }
.tb-nom { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-case {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-3);
}
.tb-case.faite { background: var(--teinte, var(--vert)); }
.tb-case.manquee { background: color-mix(in srgb, var(--teinte, var(--vert)) 14%, var(--surface-3)); }
.tb-case.libre { background: transparent; border: 1px dashed var(--bord); }
.tb-case.futur { background: transparent; border: 1px dashed var(--bord); opacity: .6; }
.tb-case.en-cours { background: transparent; border: 2px solid color-mix(in srgb, var(--teinte, var(--primary)) 55%, var(--bord)); }
.tb-legende {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .9rem;
  margin-top: .9rem;
  font-size: .74rem;
  color: var(--texte-faible);
}
.tb-legende span { display: inline-flex; align-items: center; gap: .35rem; }
.tb-legende .tb-case { width: 14px; height: 14px; border-radius: 4px; }

.tb-serie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--bord);
  font-size: .9rem;
}
.tb-serie:last-child { border-bottom: none; }
.tb-serie-nom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.tb-serie-val { font-weight: 700; color: var(--orange); white-space: nowrap; }

.tb-constat {
  padding: .7rem .85rem;
  margin-bottom: .5rem;
  border-radius: var(--rayon);
  background: var(--surface-2);
  font-size: .88rem;
  line-height: 1.45;
}
.tb-constat b { color: var(--primary); }
.tb-info { display: flex; align-items: center; gap: .45rem; margin-top: .7rem; font-size: .84rem; color: var(--texte-doux); }

.tb-sante { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.tb-sante div { padding: .7rem .8rem; border-radius: var(--rayon); background: var(--surface-2); }
.tb-sante b { display: block; font-size: 1.15rem; font-weight: 800; }
.tb-sante span { font-size: .76rem; color: var(--texte-doux); }


/* ───────────────────────── tableau de bord visuel ── */

.tbv-bandeau {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
  padding: .85rem 1.1rem;
  border-radius: var(--rayon-l);
  background: var(--primary-doux);
  color: var(--texte-doux);
  font-size: .9rem;
}
.tbv-bandeau i { color: var(--primary); font-size: 1.1rem; }
.tbv-bandeau strong { color: var(--texte); }

.tbv-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.tbv-kpi {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--rayon-l);
  background: var(--surface);
  border: 1px solid var(--bord);
  box-shadow: var(--ombre);
}
.tbv-kpi-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
}
.tbv-kpi-v { font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tbv-kpi-v small { font-size: .95rem; font-weight: 600; color: var(--texte-faible); }
.tbv-kpi-l { margin-top: .15rem; font-size: .8rem; color: var(--texte-doux); }
.tbv-hausse { display: block; color: var(--vert); font-weight: 600; font-size: .74rem; }

.tbv-rangee { display: grid; gap: 1rem; margin-bottom: 1rem; }
.tbv-large { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.tbv-trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tbv-pile-cartes { display: grid; gap: 1rem; align-content: start; }
.tbv-carte {
  margin: 0;
  padding: 1.2rem 1.3rem;
  border-radius: var(--rayon-l);
  box-shadow: var(--ombre);
}
.tbv-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tbv-titre { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.tbv-tete a { font-size: .8rem; font-weight: 600; }
.tbv-legende { display: flex; gap: .9rem; font-size: .75rem; color: var(--texte-doux); }
.tbv-legende i { display: inline-block; width: 9px; height: 9px; margin-right: .35rem; border-radius: 3px; }
.tbv-petit { font-size: .78rem; color: var(--texte-faible); }
.tbv-grand { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }

.tbv-barres { display: flex; align-items: stretch; gap: .8rem; height: 190px; }
.tbv-colonne { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.tbv-piste {
  flex: 1;
  width: 100%;
  max-width: 44px;
  display: flex;
  align-items: flex-end;
  border-radius: 10px;
  background: var(--surface-3);
}
.tbv-pile {
  width: 100%;
  min-height: 8px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 10px;
  overflow: hidden;
}
.tbv-pile span { display: block; }
.tbv-jour { font-size: .78rem; font-weight: 700; color: var(--texte-faible); }
.tbv-colonne.aujourdhui .tbv-jour { color: var(--primary); }
.tbv-colonne.aujourdhui .tbv-piste { box-shadow: 0 0 0 2px var(--primary-doux); }
.tbv-colonne.futur .tbv-piste { background: transparent; border: 1px dashed var(--bord); }

.tbv-centre { position: relative; display: flex; flex-direction: column; align-items: center; }
.tbv-anneau { width: 170px; height: 170px; margin-top: .4rem; transform: rotate(-90deg); }
.tbv-anneau circle, .tbv-mini-anneau circle { fill: none; }
.tbv-anneau .fond { stroke: var(--surface-3); stroke-width: 12; }
.tbv-anneau .trait { stroke: var(--vert); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.tbv-anneau-centre {
  position: absolute;
  top: calc(50% + .9rem);
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.tbv-anneau-centre b { display: block; font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.tbv-anneau-centre span { font-size: .76rem; color: var(--texte-doux); }

.tbv-projets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.tbv-projet {
  display: flex;
  align-items: center;
  gap: .95rem;
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--rayon-l);
  border-top: 3px solid var(--teinte);
  box-shadow: var(--ombre);
  color: var(--texte);
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.tbv-projet:hover { box-shadow: var(--ombre-m); transform: translateY(-2px); }
.tbv-mini-anneau { width: 60px; height: 60px; flex-shrink: 0; }
.tbv-mini-anneau .fond { stroke: var(--surface-3); stroke-width: 6; }
.tbv-mini-anneau .trait { stroke: var(--teinte); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 28px 28px; }
.tbv-mini-anneau text { font-size: 12px; font-weight: 700; text-anchor: middle; fill: var(--texte); }
.tbv-projet-nom { font-weight: 700; font-size: .98rem; }
.tbv-projet-detail { font-size: .82rem; color: var(--texte-doux); margin-top: .1rem; }

.tbv-hm {
  display: grid;
  grid-template-columns: minmax(0, max-content) repeat(7, 24px);
  gap: .45rem .5rem;
  align-items: center;
  justify-content: start;
  overflow-x: auto;
}
.tbv-hm-jour { font-size: .72rem; font-weight: 700; text-align: center; color: var(--texte-faible); }
.tbv-hm-jour.aujourdhui { color: var(--primary); }
.tbv-hm-nom {
  max-width: 16rem;
  padding-right: .8rem;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tbv-case { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); }
.tbv-case.faite { background: var(--vert); }
.tbv-case.libre, .tbv-case.futur { background: transparent; border: 1px dashed var(--bord); }
.tbv-case.futur { opacity: .6; }
.tbv-case.en-cours { background: transparent; border: 2px solid var(--vert-doux); box-shadow: inset 0 0 0 1px var(--vert); }

.tbv-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--bord);
  font-size: .9rem;
  color: var(--texte);
  text-decoration: none;
}
.tbv-ligne:last-child { border-bottom: none; }
.tbv-ligne-nom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.tbv-flamme { font-weight: 700; color: var(--orange); white-space: nowrap; }
.tbv-suggestion:hover { color: var(--primary); }

.tbv-duo { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tbv-duo div { padding: .8rem .9rem; border-radius: var(--rayon); background: var(--surface-2); }
.tbv-duo b { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.tbv-duo b small { font-size: .85rem; color: var(--texte-faible); font-weight: 600; }
.tbv-duo span { font-size: .76rem; color: var(--texte-doux); }
.tbv-constat {
  padding: .7rem .85rem;
  margin-bottom: .5rem;
  border-radius: var(--rayon);
  background: var(--surface-2);
  font-size: .86rem;
  line-height: 1.45;
}
.tbv-constat b { color: var(--primary); }

@media (max-width: 1100px) {
  .tbv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbv-large, .tbv-trois { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .tbv-kpi { padding: .9rem; gap: .7rem; }
  .tbv-kpi-ic { width: 38px; height: 38px; }
  .tbv-kpi-v { font-size: 1.35rem; }
  .tbv-barres { height: 150px; gap: .45rem; }
}

.tbv-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: .4rem .2rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texte-faible);
}
.tbv-section a { text-transform: none; letter-spacing: 0; font-size: .8rem; }


/* ─────────────────────────────── ma semaine ── */

.sm-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; font-size: .88rem; font-weight: 600; }
.sm-nav a { color: var(--texte-doux); text-decoration: none; }
.sm-nav a:hover { color: var(--primary); }
.sm-courante { padding: .35rem .8rem; border-radius: 20px; background: var(--primary-doux); color: var(--primary) !important; }

.sm-haut { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.sm-cap { margin: 0; padding: 1.4rem 1.5rem; border-radius: var(--rayon-l); border-top: 3px solid var(--primary); box-shadow: var(--ombre); }
.sm-cap-texte { font-size: 1.3rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.35; }
.sm-cap-aide { margin: .45rem 0 .9rem; font-size: .88rem; color: var(--texte-doux); max-width: 62ch; }
.sm-cap-form { display: grid; gap: .6rem; justify-items: start; }
.sm-cap-form textarea { width: 100%; max-width: none; min-height: 90px; }
.sm-modifier summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--primary); list-style: none; }
.sm-modifier summary::-webkit-details-marker { display: none; }
.sm-modifier[open] summary { margin-bottom: .6rem; }
.sm-chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sm-chiffres .tbv-kpi { min-width: 0; padding: .95rem 1rem; gap: .7rem; }
.sm-chiffres .tbv-kpi > div { min-width: 0; }

.sm-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.sm-jour {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: .9rem .9rem .8rem;
  border-radius: var(--rayon-l);
  background: var(--surface);
  border: 1px solid var(--bord);
  box-shadow: var(--ombre-s);
}
.sm-jour.aujourdhui { border: 2px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-doux), var(--ombre); }
.sm-jour.futur { border-style: dashed; box-shadow: none; background: var(--surface-2); }
.sm-jour-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; }
.sm-jour-nom { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-faible); }
.sm-jour.aujourdhui .sm-jour-nom { color: var(--primary); }
.sm-jour-num { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.sm-jour-compte { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--surface-3); color: var(--texte-doux); }
.sm-jour-compte.plein { background: var(--vert-doux); color: var(--vert); }
.sm-jour-barre { height: 4px; margin: .55rem 0 .2rem; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.sm-jour-barre span { display: block; height: 100%; border-radius: 4px; background: var(--vert); }
.sm-jour-liste { list-style: none; margin: .55rem 0 0; padding: 0; display: grid; gap: .4rem; }
.sm-jour-liste li { display: flex; gap: .45rem; font-size: .8rem; line-height: 1.3; }
.sm-puce { width: 8px; height: 8px; margin-top: .3rem; flex-shrink: 0; border-radius: 50%; background: var(--teinte); }
.sm-texte { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sm-texte i { color: var(--primary); font-size: .7rem; }
.sm-jour-liste li.faite .sm-texte { color: var(--texte-faible); text-decoration: line-through; }
.sm-plus { font-size: .74rem; color: var(--texte-faible); padding-left: 1rem; }
.sm-jour-vide { margin: .7rem 0 0; font-size: .8rem; color: var(--texte-faible); }
.sm-bilan { display: flex; gap: .55rem; margin-top: .6rem; font-size: .74rem; font-weight: 600; color: var(--texte-doux); }
.sm-bilan i { color: var(--orange); }
.sm-jour-action {
  margin-top: auto;
  padding-top: .7rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.sm-jour-action:hover { text-decoration: underline; }

.sm-revue { padding: 1.4rem 1.5rem; border-radius: var(--rayon-l); border-top: 3px solid var(--orange); box-shadow: var(--ombre); }
.sm-revue-etiquette { color: var(--orange); }
.sm-resume {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin: .3rem 0 1.1rem;
  padding: .9rem 1rem;
  border-radius: var(--rayon);
  background: var(--surface-2);
}
.sm-resume i { color: var(--primary); font-size: 1.1rem; margin-top: .1rem; }
.sm-resume p { margin: 0; font-size: .92rem; line-height: 1.5; }
.sm-ancienne { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: var(--rayon); background: var(--surface-2); font-size: .88rem; }
.sm-revue-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sm-question { display: grid; gap: .45rem; }
.sm-question span { display: flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 700; }
.sm-question textarea { max-width: none; width: 100%; resize: vertical; }
.sm-revue-pied { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.sm-verrou { display: flex; gap: .8rem; align-items: flex-start; margin-top: .3rem; font-size: .9rem; color: var(--texte-doux); line-height: 1.5; }
.sm-verrou i { font-size: 1.2rem; color: var(--texte-faible); }
.sm-verrou strong { color: var(--texte); }

@media (max-width: 1200px) { .sm-jours { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sm-haut { grid-template-columns: minmax(0, 1fr); }
  .sm-revue-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sm-jours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-jour { min-height: 0; }
}


/* ─────────────────────────────── mes projets ── */

.pj-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.2rem;
}
.pj-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .95rem;
  margin: 0;
  padding: 1.2rem 1.25rem 1.1rem;
  border-radius: var(--rayon-l);
  border-top: 4px solid var(--teinte, var(--primary));
  background: linear-gradient(180deg, color-mix(in srgb, var(--teinte, var(--primary)) 8%, var(--surface)) 0, var(--surface) 110px);
  box-shadow: var(--ombre);
  transition: box-shadow .2s ease, transform .2s ease;
}
.pj-carte:hover { box-shadow: var(--ombre-m); transform: translateY(-2px); }
.pj-tete { display: flex; align-items: center; gap: .85rem; }
.pj-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  background: var(--teinte, var(--primary));
  box-shadow: 0 8px 16px -8px var(--teinte, var(--primary));
}
.pj-titre { flex: 1; min-width: 0; }
.pj-nom {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--texte);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.pj-nom:hover { color: var(--teinte, var(--primary)); }
.pj-type { display: block; font-size: .78rem; color: var(--texte-faible); }

.pj-corps { display: flex; align-items: center; gap: .9rem; }
.pj-semaine { font-size: .98rem; font-weight: 700; }
.pj-sous { font-size: .78rem; color: var(--texte-faible); }

.pj-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pj-stats div { padding: .6rem .5rem; border-radius: var(--rayon); background: var(--surface-2); text-align: center; }
.pj-stats b { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.pj-stats span { font-size: .72rem; color: var(--texte-doux); }

.pj-prochaine {
  padding: .7rem .85rem;
  border: 1px dashed color-mix(in srgb, var(--teinte, var(--primary)) 45%, var(--bord));
  border-radius: var(--rayon);
  font-size: .9rem;
  font-weight: 600;
}
.pj-prochaine span {
  display: block;
  margin-bottom: .15rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texte-faible);
}
.pj-prochaine.vide { font-weight: 500; color: var(--texte-faible); border-color: var(--bord); }
.pj-ouvrir {
  margin-top: auto;
  font-size: .88rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--teinte, var(--primary)) 80%, var(--texte));
  text-decoration: none;
}
.pj-ouvrir:hover { text-decoration: underline; }

.pj-menu { display: grid; gap: .45rem; }
.pj-menu form { margin: 0; }
.pj-menu .bouton { width: 100%; justify-content: flex-start; }

.pj-nouveau {
  border-top: 4px dashed var(--bord-fort);
  background: var(--surface-2);
  box-shadow: none;
}
.pj-nouveau:hover { transform: none; box-shadow: none; }
.pj-nouveau form { display: flex; flex-direction: column; gap: .7rem; height: 100%; }
.pj-nouveau .champ { max-width: none; }
.pj-avatar-plus { background: var(--primary-doux); color: var(--primary); box-shadow: none; }

.pj-carte-pause { background: var(--surface-2); box-shadow: none; }
.pj-carte-pause .pj-avatar { opacity: .55; box-shadow: none; }
.pj-pause-actions { display: flex; gap: .5rem; }
.pj-pause-actions form { margin: 0; }


/* ─────────────────────────────── habitudes ── */

.hb-palier {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--rayon-l);
  box-shadow: var(--ombre-s);
  font-size: .9rem;
  color: var(--texte-doux);
}
.hb-palier strong { color: var(--texte); }
.hb-palier-corps { flex: 1; }
.hb-palier .tb-barre { margin: .6rem 0 .3rem; max-width: 420px; }
.hb-actions { display: flex; justify-content: flex-end; margin-bottom: .2rem; }

.hb-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.3rem;
}
.hb-carte {
  display: flex;
  flex-direction: column;
  gap: .95rem;
  margin: 0;
  padding: 1.15rem 1.2rem 1rem;
  border-radius: var(--rayon-l);
  border-top: 4px solid var(--teinte, var(--primary));
  background: linear-gradient(180deg, color-mix(in srgb, var(--teinte, var(--primary)) 8%, var(--surface)) 0, var(--surface) 100px);
  box-shadow: var(--ombre);
  transition: box-shadow .2s ease, transform .2s ease;
}
.hb-carte:hover { box-shadow: var(--ombre-m); transform: translateY(-2px); }
.hb-carte .pj-avatar { width: 42px; height: 42px; font-size: 1.1rem; }

.hb-stats { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: .5rem; }
.hb-stats > div { padding: .6rem .7rem; border-radius: var(--rayon); background: var(--surface-2); }
.hb-stats b { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.hb-stats b small { font-size: .78rem; font-weight: 600; color: var(--texte-faible); }
.hb-stats span { font-size: .72rem; color: var(--texte-doux); }
.hb-serie b { color: var(--orange); }
.hb-serie b.hb-vide { color: var(--texte-faible); }
.hb-mini { text-align: center; }

.hb-cal { display: grid; gap: 4px; }
.hb-cal-ligne { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hb-cal-lettres span { font-size: .64rem; font-weight: 700; text-align: center; color: var(--texte-faible); }
.hb-case { height: 16px; border-radius: 5px; background: color-mix(in srgb, var(--teinte, var(--vert)) 9%, var(--surface-3)); }
.hb-case.faite { background: var(--teinte, var(--vert)); }
.hb-case.manquee { background: color-mix(in srgb, var(--teinte, var(--vert)) 16%, var(--surface-3)); }
.hb-case.libre { background: transparent; border: 1px dashed var(--bord); }
.hb-case.futur { background: transparent; border: 1px dashed var(--bord); opacity: .5; }
.hb-case.en-cours { background: transparent; border: 2px solid var(--teinte, var(--vert)); }

.ligne.hb-jour {
  margin-top: auto;
  padding: .55rem .7rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  gap: .6rem;
}
.hb-jour .coche { border-radius: 50%; border-color: color-mix(in srgb, var(--teinte, var(--primary)) 60%, var(--bord)); }
.hb-jour .coche[aria-pressed="true"] { background: var(--teinte, var(--vert)); border-color: var(--teinte, var(--vert)); }
.ligne.hb-jour.faite { background: color-mix(in srgb, var(--teinte, var(--vert)) 10%, var(--surface)); border-color: transparent; }
.ligne.hb-jour.faite .ligne-titre { text-decoration: none; color: var(--texte-doux); }
.hb-jour .ligne-titre { font-size: .86rem; font-weight: 600; }
.hb-jour-libre {
  margin-top: auto;
  padding: .55rem .7rem;
  border: 1px dashed var(--bord);
  border-radius: var(--rayon);
  font-size: .82rem;
  color: var(--texte-faible);
}

.hb-vide-carte { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem 1.4rem; border-radius: var(--rayon-l); }
.tbv-section i { margin-right: .3rem; }

/* Seul un jour tenu porte la couleur de l'habitude : un jour pas tenu en
   version pale se lisait comme « a moitie fait ». */
.hb-case, .hb-case.manquee { background: var(--surface-3); }
.hb-case.faite { background: var(--teinte, var(--vert)); }
.hb-case.libre, .hb-case.futur, .hb-case.en-cours { background: transparent; }
.hb-legende {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  margin: .2rem 0 .4rem;
  font-size: .78rem;
  color: var(--texte-doux);
}
.hb-legende span { display: inline-flex; align-items: center; gap: .4rem; }
.hb-legende .hb-case { display: inline-block; width: 16px; height: 12px; }


/* ─────────────────────────────── rappels ── */

.rp-haut { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.rp-haut > .carte { margin: 0; padding: 1.3rem 1.4rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.rp-etat {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  margin-top: .4rem;
  padding: .85rem 1rem;
  border-radius: var(--rayon);
  background: var(--surface-2);
  font-size: .88rem;
  color: var(--texte-doux);
}
.rp-etat i { font-size: 1.1rem; color: var(--orange); }
.rp-etat strong { color: var(--texte); }
.rp-texte-etat { margin: .3rem 0 0; font-size: .9rem; color: var(--texte-doux); }
.rp-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 .4rem; }
.rp-actions form { margin: 0; }
.rp-appareils { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .35rem; font-size: .84rem; }
.rp-appareils li { display: flex; gap: .5rem; align-items: center; color: var(--texte-doux); }
.rp-eau-chiffre { margin: .3rem 0 .4rem; font-size: 1rem; color: var(--texte-doux); }
.rp-eau-chiffre b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--texte); }
.rp-eau .tb-barre span { background: var(--bleu); }
.rp-eau .tbv-petit { display: block; margin-top: .6rem; }
.rp-heures-eau { margin: .5rem 0 0; font-size: .78rem; line-height: 1.5; color: var(--texte-faible); }
.rp-sous-titre { margin-top: .9rem; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-faible); }

.rp-programme { padding: 1.2rem 1.3rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.rp-ligne {
  display: grid;
  grid-template-columns: 3.4rem 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--bord);
}
.rp-ligne:last-child { border-bottom: none; }
.rp-heure { font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-point {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teinte, var(--primary));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teinte, var(--primary)) 18%, transparent);
}
.rp-titre { font-size: .92rem; font-weight: 700; }
.rp-texte { font-size: .82rem; color: var(--texte-doux); }
.rp-habitude { font-size: .74rem; color: var(--texte-faible); white-space: nowrap; }
.rp-ligne.passe { opacity: .45; }
@media (max-width: 900px) {
  .rp-haut { grid-template-columns: minmax(0, 1fr); }
  .rp-habitude { display: none; }
  .rp-ligne { grid-template-columns: 3.2rem 12px minmax(0, 1fr); }
}

/* L'ecran ouvert depuis une notification : un seul bouton. */
.rp-action-page { min-height: 100vh; margin: 0; display: grid; place-items: center; background: var(--fond); color: var(--texte); }
.rp-action { width: min(420px, 92vw); padding: 2rem 1.5rem; text-align: center; }
.rp-action h1 { margin: .9rem 0 1.4rem; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.rp-action-etiquette { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-faible); }
.rp-gros-bouton { width: 100%; padding: 1.1rem; font-size: 1.1rem; border-radius: 16px; }
.rp-lien { display: inline-block; margin-top: 1rem; font-size: .88rem; color: var(--texte-doux); }
.rp-coche { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--vert); }
.rp-coche::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 13px;
  width: 14px;
  height: 27px;
  border: solid #fff;
  border-width: 0 5px 5px 0;
  transform: rotate(45deg);
}

.rp-plus-tard { margin-top: .6rem; }
.rp-horloge { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--primary); }
.rp-horloge::before, .rp-horloge::after {
  content: "";
  position: absolute;
  left: 30px;
  width: 4px;
  border-radius: 2px;
  background: #fff;
  transform-origin: 2px 100%;
}
.rp-horloge::before { top: 14px; height: 18px; }
.rp-horloge::after { top: 20px; height: 12px; transform: rotate(90deg); }


/* ─────────────────────────────── horaires de travail ── */
.hr-carte { border-top: 3px solid var(--teinte, var(--primary)); }
.hr-total { font-size: .8rem; font-weight: 700; color: var(--texte-doux); }
.hr-aide { margin: -.2rem 0 1rem; font-size: .85rem; line-height: 1.5; color: var(--texte-doux); }
.hr-semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.hr-jour {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .45rem;
  min-height: 104px;
  padding: .6rem .45rem;
  border-radius: var(--rayon);
  background: var(--surface-2);
  border: 1px dashed var(--bord);
  text-align: center;
}
.hr-jour.travail {
  border: 1px solid color-mix(in srgb, var(--teinte) 30%, transparent);
  background: color-mix(in srgb, var(--teinte) 7%, var(--surface));
}
.hr-jour-nom { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-faible); }
.hr-libre { margin: auto 0; font-size: .78rem; color: var(--texte-faible); }
.hr-quart {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: .45rem .3rem;
  border-radius: var(--rayon-s);
  background: var(--teinte);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--teinte) 30%, transparent);
}
.hr-a { font-size: .66rem; font-weight: 500; opacity: .8; }
.hr-ajout, .hr-trajet, .sm-shift-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; }
.hr-ajout .champ, .hr-trajet .champ, .sm-shift-form .champ { width: auto; max-width: none; min-width: 0; }
.hr-ajout input[type="time"], .sm-shift-form input[type="time"] { width: 7.2rem; }
.hr-a-texte { font-size: .85rem; color: var(--texte-doux); }
.hr-trajet { padding-top: 1rem; border-top: 1px solid var(--bord); }
.hr-trajet label { margin: 0 .3rem 0 0; font-size: .88rem; font-weight: 600; }
.hr-trajet label i { color: var(--teinte, var(--primary)); margin-right: .2rem; }
.hr-trajet input[type="number"] { width: 5.5rem; }

.hr-ponctuels { margin-top: 1.1rem; }
.hr-sous-titre { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-faible); }
.hr-ponctuels ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.hr-ponctuels li { display: flex; align-items: center; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid var(--bord); font-size: .88rem; }
.hr-ponctuels li:last-child { border-bottom: none; }
.hr-ponctuels li span { flex: 1; color: var(--texte-doux); }
.hr-ponctuels li b { font-variant-numeric: tabular-nums; }
.hr-ponctuels form { margin: 0; }
.hr-x, .sm-shift-x { padding: 0; border: 0; background: none; color: var(--texte-faible); line-height: 1; cursor: pointer; }
.hr-x:hover, .sm-shift-x:hover { color: var(--rouge, #dc2626); }

@media (max-width: 640px) {
  .hr-semaine { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .hr-jour { flex-direction: row; align-items: center; min-height: 0; text-align: left; }
  .hr-jour-nom { width: 2.8rem; flex-shrink: 0; }
  .hr-libre { margin: 0; }
  .hr-quart { flex-direction: row; gap: .3rem; padding: .3rem .6rem; }
}

/* les shifts dans « Ma semaine » */
.sm-horaire { padding: 1.2rem 1.4rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.sm-horaire-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sm-horaire-tete form { margin: 0; }
.sm-horaire-tete .sm-cap-aide { margin: .35rem 0 0; }

/* --- cuisiner pour la semaine : un reglage, pas un classement ------------- */
.sm-cuisine { margin-top: 1rem; }
.sm-cuisine h2 { margin: 0; font-size: 1.05rem; }
.sm-cuisine .sm-cap-aide { margin: .35rem 0 0; }
.sm-cuisine-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .8rem 0 .3rem;
}
.sm-cuisine-form label {
  display: flex; align-items: center; gap: .35rem; margin: 0;
  font-size: .9rem; color: var(--texte-doux);
}
.sm-cuisine-form select, .sm-cuisine-form input[type="time"] { min-width: 0; }
.sm-cuisine form + form { margin-top: .6rem; }

.sm-shifts { display: grid; gap: .3rem; margin-top: .6rem; }
.sm-shift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: .3rem;
  align-items: center;
  padding: .3rem .45rem;
  border-radius: var(--rayon-s);
  border-left: 3px solid var(--teinte);
  background: color-mix(in srgb, var(--teinte) 11%, var(--surface));
  font-size: .74rem;
  line-height: 1.3;
}
.sm-shift-nom { grid-column: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-shift-h { grid-column: 1; color: var(--texte-doux); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sm-shift > form, .sm-shift > .sm-shift-menu, .sm-shift-fixe { grid-column: 2; grid-row: 1 / span 2; display: flex; margin: 0; }
.sm-shift-fixe { color: var(--texte-faible); font-size: .8rem; text-decoration: none; }
.sm-shift-fixe:hover { color: var(--primary); }

/* le fil de la journee sur « Rappels » */
.rp-liens { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
/* aujourd'hui ou demain : deux onglets, pas une navigation de calendrier */
.rp-jours {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-3);
}
.rp-jours a {
  padding: .22rem .7rem;
  border-radius: 999px;
  color: var(--texte-doux);
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
}
.rp-jours a.actif { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-s); }
.rp-jours a:hover { color: var(--texte); }
/* sur un telephone, le titre garde sa ligne : le choix du jour passe dessous */
@media (max-width: 640px) {
  .rp-programme .tbv-tete { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .rp-liens { width: 100%; }
  .rp-jours { flex: 1; }
  .rp-jours a { flex: 1; text-align: center; }
}
.rp-gestes { display: flex; align-items: center; gap: .3rem; }
.rp-gestes form { margin: 0; }
.rp-marque {
  margin-left: .45rem;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--primary-doux);
  color: var(--primary);
  font-size: .68rem;
  font-weight: 700;
  vertical-align: 1px;
}
.rp-etiquette-heure { font-size: .8rem; font-weight: 600; color: var(--texte-doux); }
.rp-bloc .rp-barre { justify-self: center; width: 6px; height: 36px; border-radius: 4px; background: var(--teinte); }
.rp-bloc.trajet .rp-barre { background: repeating-linear-gradient(to bottom, var(--teinte) 0 5px, transparent 5px 9px); }
.rp-bloc.travail {
  margin: 0 -.7rem;
  padding-left: .7rem;
  padding-right: .7rem;
  border-radius: var(--rayon);
  background: color-mix(in srgb, var(--teinte) 7%, transparent);
}
.rp-bloc .rp-titre i { margin-right: .15rem; color: var(--teinte); }
.rp-gardees { padding: 1.2rem 1.3rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.rp-gardees .tbv-petit { display: block; margin: .3rem 0 .4rem; }
.rp-gardee { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--bord); font-weight: 600; }
.rp-gardee form { margin: 0; }
@media (max-width: 900px) {
  .rp-gestes { grid-column: 3; }
}

/* un shift fixe se touche pour etre modifie ; le panneau prend la largeur de la carte */
.hr-carte { position: relative; }
.hr-quart-menu { position: static; }
.hr-quart-menu > summary.hr-quart,
.hr-quart-menu > summary.hr-quart:hover,
.hr-quart-menu[open] > summary.hr-quart {
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--teinte);
  color: #fff;
  cursor: pointer;
}
.hr-quart-menu[open] > summary.hr-quart { box-shadow: 0 0 0 3px color-mix(in srgb, var(--teinte) 35%, transparent); }
.hr-marques { display: flex; gap: .3rem; margin-top: .15rem; font-size: .68rem; font-weight: 700; opacity: .92; }
.hr-panneau { left: 1.25rem; right: 1.25rem; top: auto; width: auto; margin-top: .5rem; display: grid; gap: .7rem; text-align: left; }
.hr-panneau-titre { font-size: .9rem; font-weight: 700; }
.hr-panneau form { margin: 0; }
.hr-panneau-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0; }
.hr-panneau-ligne .champ { width: auto; max-width: none; min-width: 0; }
.hr-panneau-ligne input[type="time"] { width: 7.2rem; }
.hr-case { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--texte-doux); cursor: pointer; }
.hr-etiquette { margin: 0; font-size: .85rem; font-weight: 600; color: var(--texte-doux); }
.hr-options { flex-basis: 100%; }
.hr-options > summary { list-style: none; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--primary); }
.hr-options > summary::-webkit-details-marker { display: none; }
.hr-options > summary::before { content: "+ "; }
.hr-options[open] > summary::before { content: "− "; }
.hr-options-corps { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .6rem; }
.hr-options-corps .champ { width: auto; max-width: none; min-width: 0; }
.hr-options .menu-aide { max-width: 60ch; }
.hr-tag { margin-left: .45rem; padding: 1px 7px; border-radius: 20px; background: var(--surface-3); color: var(--texte-doux); font-size: .7rem; font-weight: 700; }
.hr-conge-form { margin-top: .6rem; }
.hr-conge-form input[type="date"], .sm-conge-form input[type="date"] { width: 10rem; }

/* « Ma semaine » : un jour a part, un shift annule, un conge */
.sm-jour { position: relative; }
.sm-shift-menu { position: static; }
.sm-shift-menu > summary { width: 22px; height: 22px; }
.sm-panneau { left: .45rem; right: .45rem; top: auto; width: auto; margin-top: .3rem; display: grid; gap: .55rem; }
.sm-panneau-titre { font-size: .78rem; font-weight: 700; }
.sm-panneau form { display: grid; gap: .4rem; margin: 0; }
.sm-panneau .champ { width: 100%; max-width: none; min-width: 0; }
.sm-panneau .bouton { width: 100%; justify-content: center; }
.sm-panneau-lien { font-size: .76rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.sm-panneau-lien:hover { text-decoration: underline; }
.sm-shift-h i { font-size: .7rem; }
.sm-tag { padding: 0 5px; border-radius: 10px; background: var(--surface-3); color: var(--texte-doux); font-size: .66rem; font-weight: 700; }
.sm-shift.annule { border-left-style: dashed; background: var(--surface-2); }
.sm-shift.annule .sm-shift-nom, .sm-shift.annule .sm-shift-h { color: var(--texte-faible); }
.sm-retablir { padding: 0; border: 0; background: none; color: var(--primary); font-size: .72rem; font-weight: 700; cursor: pointer; }
.sm-retablir:hover { text-decoration: underline; }
.sm-conge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  padding: .3rem .45rem;
  border-radius: var(--rayon-s);
  background: var(--vert-doux);
  color: var(--vert);
  font-size: .74rem;
  font-weight: 700;
}
.sm-conge span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-conge form { display: flex; margin: 0; }
.sm-conge-form { margin-top: .9rem; }
.sm-conge-form > summary { list-style: none; cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--primary); }
.sm-conge-form > summary::-webkit-details-marker { display: none; }

/* « Rappels » : le repos apres une nuit */
.rp-bloc.pause .rp-barre { background: repeating-linear-gradient(to bottom, var(--texte-faible) 0 3px, transparent 3px 7px); opacity: .7; }
.rp-bloc.pause .rp-titre i { color: var(--texte-doux); }
.rp-bloc.repos .rp-barre { background: repeating-linear-gradient(to bottom, var(--texte-faible) 0 2px, transparent 2px 6px); }
.rp-bloc.repos .rp-titre i { color: var(--texte-doux); }


/* ─────────────────────────────── calendrier : le mois, en simple ── */
.cm-corps { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
.cm-mois, .cm-detail { margin: 0; padding: 1.3rem 1.4rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.cm-tete { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.cm-titre { flex: 1; text-align: center; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.cm-fleche { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; color: var(--texte-doux); text-decoration: none; }
.cm-fleche:hover { background: var(--surface-2); color: var(--texte); }
.cm-auj { order: 5; }
.cm-noms, .cm-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cm-noms { margin-bottom: .3rem; }
.cm-noms span { text-align: center; font-size: .72rem; font-weight: 700; color: var(--texte-faible); }
.cm-grille { row-gap: .2rem; }
.cm-case { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .45rem 0 .5rem; border-radius: var(--rayon); color: var(--texte); text-decoration: none; }
.cm-case:hover { background: var(--surface-2); }
.cm-case.passe .cm-num { color: var(--texte-faible); }
.cm-num { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-size: .98rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-case.aujourdhui .cm-num { color: var(--primary); font-weight: 800; }
.cm-case.choisi .cm-num { background: var(--texte); color: var(--surface); font-weight: 800; }
.cm-case.choisi.aujourdhui .cm-num { background: var(--primary); color: #fff; }
.cm-points { display: flex; justify-content: center; gap: 3px; height: 6px; }
.cm-points i, .cm-exemple { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teinte, var(--primary)); }
.cm-points i.tache, .cm-exemple.tache { background: transparent; box-shadow: inset 0 0 0 1.5px var(--texte-faible); }
.cm-legende { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 1rem 0 0; font-size: .76rem; color: var(--texte-faible); }
.cm-legende .cm-exemple.tache { margin-left: .8rem; }

.cm-detail { min-height: 12rem; }
.cm-jour-titre { margin-bottom: .9rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.cm-jour-titre span { margin-left: .35rem; padding: 2px 8px; border-radius: 20px; background: var(--primary-doux); color: var(--primary); font-size: .7rem; font-weight: 700; vertical-align: 2px; }
.cm-liste, .cm-taches { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.cm-ligne { display: flex; align-items: baseline; gap: .8rem; padding: .55rem .75rem; border-radius: var(--rayon); border-left: 3px solid var(--teinte, var(--primary)); background: var(--surface-2); font-size: .92rem; font-weight: 600; }
.cm-ligne.conge { border-left-color: var(--vert); }
.cm-ligne em { font-style: normal; font-weight: 500; font-size: .8rem; color: var(--texte-faible); }
.cm-h { flex-shrink: 0; min-width: 6.6rem; font-variant-numeric: tabular-nums; color: var(--texte-doux); font-weight: 500; }
.cm-note { margin: .7rem 0 0; font-size: .85rem; color: var(--texte-doux); }
.cm-taches { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--bord); }
.cm-taches li { display: flex; align-items: flex-start; gap: .55rem; font-size: .9rem; }
.cm-taches li i { margin-top: .1rem; font-size: .82rem; color: var(--texte-faible); }
.cm-taches li i.bi-star-fill { color: var(--primary); }
.cm-taches li.faite i { color: var(--vert); }
.cm-taches li.faite span { color: var(--texte-faible); text-decoration: line-through; }
.cm-action { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1.1rem; font-size: .85rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.cm-action:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .cm-corps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cm-mois, .cm-detail { padding: 1rem; }
  .cm-num { width: 1.9rem; height: 1.9rem; font-size: .92rem; }
  .cm-case { padding: .3rem 0 .4rem; }
}


/* ─────────────────────────────── bilan du soir : la consultation ── */
.bs-carte { padding: 1.6rem 1.7rem 1.4rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.bs-journee { display: flex; gap: .6rem; margin: 0 0 1.4rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--bord); font-size: .92rem; line-height: 1.5; color: var(--texte-doux); }
.bs-journee i { margin-top: .15rem; color: var(--primary); }
.bs-progression { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bs-progression span { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width .3s; }
.bs-rang { margin-top: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-faible); }
.bs-question { margin: .3rem 0 1.3rem; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.bs-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 0; }
.bs-bouton {
  padding: 1.05rem 1rem;
  border-radius: var(--rayon);
  border: 1px solid var(--bord);
  background: var(--surface-2);
  color: var(--texte);
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.bs-bouton:hover { border-color: var(--primary); background: var(--primary-doux); color: var(--primary); }
.bs-bouton.choisi { border-color: var(--primary); background: var(--primary); color: #fff; }
.bs-ligne { display: grid; gap: .8rem; margin: 0; }
.bs-ligne textarea { width: 100%; max-width: none; }
.bs-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.bs-actions .bouton { width: auto; }
.bs-heure { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--bord); }
.bs-heure label { font-size: .85rem; font-weight: 600; color: var(--texte-doux); }
.bs-heure .champ { width: auto; max-width: none; }
.bs-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--bord); font-size: .84rem; }
.bs-pied a { font-weight: 600; color: var(--primary); text-decoration: none; }
.bs-pied a:hover { text-decoration: underline; }
.bs-aide { color: var(--texte-faible); }

.bs-reponse { padding: 1.6rem 1.7rem; border-radius: var(--rayon-l); border-top: 3px solid var(--primary); box-shadow: var(--ombre); }
.bs-reponse.bravo { border-top-color: var(--vert); }
.bs-reponse.attention { border-top-color: var(--orange); }
.bs-ton { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.bs-constat { margin: .5rem 0 0; font-size: 1rem; color: var(--texte-doux); }
.bs-resume { margin: .8rem 0 0; font-size: .9rem; color: var(--texte-faible); }
.bs-observation { display: flex; gap: .6rem; margin: 1rem 0 0; padding: .8rem 1rem; border-radius: var(--rayon); background: var(--surface-2); font-size: .9rem; line-height: 1.5; }
.bs-observation i { margin-top: .15rem; color: var(--primary); }
.bs-note { margin: 1rem 0 0; font-size: .95rem; font-style: italic; color: var(--texte-doux); }
.bs-action { padding: 1.4rem 1.6rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.bs-action-titre { margin-top: .3rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.bs-action-detail { margin: .5rem 0 1.1rem; font-size: .92rem; line-height: 1.55; color: var(--texte-doux); }
.bs-gros { width: auto; padding: .9rem 1.4rem; font-size: 1rem; }
.bs-fait { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 600; color: var(--vert); }
.bs-liens { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9rem; line-height: 1.5; }
.bs-suite { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.bs-suite .bouton { width: auto; }

@media (max-width: 560px) {
  .bs-carte, .bs-reponse, .bs-action { padding: 1.1rem 1.1rem 1rem; }
  .bs-question { font-size: 1.25rem; }
  .bs-choix { grid-template-columns: minmax(0, 1fr); }
}


/* le bilan avant son heure, et son reglage sur la page des rappels */
.bs-attente { text-align: center; }
.bs-attente .bs-question { margin-top: .8rem; }
.bs-attente .bs-journee { justify-content: center; margin: 1.2rem 0; padding: .9rem 1rem; border: none; border-radius: var(--rayon); background: var(--surface-2); text-align: left; }
.bs-attente-texte { margin: 0 auto; max-width: 46ch; font-size: .95rem; line-height: 1.6; color: var(--texte-doux); }
.bs-attente .bs-actions { justify-content: center; }
.bs-horloge { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: var(--primary-doux); color: var(--primary); font-size: 1.4rem; }
.rp-cuisine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin: 0 0 .5rem;
  padding: .8rem 1rem;
  border-radius: var(--rayon);
  border-left: 3px solid var(--vert);
  background: color-mix(in srgb, var(--vert) 10%, var(--surface));
  font-size: .88rem;
}
.rp-cuisine .bouton { width: auto; }
.rp-bilan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .4rem; padding: .7rem .9rem; border-radius: var(--rayon); background: var(--surface-2); font-size: .86rem; color: var(--texte-doux); }
.rp-bilan .bouton { width: auto; }


/* ─────────────────────────────── journal : tes soirs ── */
.jr-resume { padding: 1.2rem 1.3rem; border-radius: var(--rayon-l); box-shadow: var(--ombre); }
.jr-moyennes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: .7rem; }
.jr-moyennes b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.jr-moyennes span { display: block; font-size: .76rem; color: var(--texte-doux); }
.jr-barre { height: 4px; margin-top: .4rem; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.jr-barre i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.jr-recherche { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.jr-recherche .champ { flex: 1; min-width: 12rem; max-width: none; }
.jr-recherche .bouton { width: auto; }

.jr-soir { padding: 1.1rem 1.2rem; border-radius: var(--rayon-l); box-shadow: var(--ombre-s); }
.jr-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.jr-tete b { font-size: 1rem; }
.jr-contexte { display: block; margin-top: .2rem; font-size: .8rem; color: var(--texte-faible); }
.jr-notes { display: flex; align-items: flex-end; gap: .5rem; flex-shrink: 0; }
.jr-notes span { display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 1.5rem; height: 3.2rem; justify-content: flex-end; font-size: .7rem; font-weight: 700; color: var(--texte-doux); }
.jr-notes i { display: block; width: 100%; border-radius: 4px; background: color-mix(in srgb, var(--primary) 55%, var(--surface-3)); }
.jr-note { margin: .9rem 0 0; font-size: .95rem; font-style: italic; line-height: 1.5; }
.jr-echange { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: .7rem 0 0; font-size: .88rem; color: var(--texte-doux); }
.jr-etiquette { padding: 2px 8px; border-radius: 20px; background: var(--surface-2); font-size: .72rem; font-weight: 700; color: var(--texte); }
.jr-fait { color: var(--vert); }
.jr-pas-fait { font-size: .78rem; color: var(--texte-faible); }
.jr-pied { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--bord); font-size: .8rem; color: var(--texte-faible); }
.jr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-left: auto; }
.jr-actions a, .jr-actions button { font-size: .8rem; font-weight: 600; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.jr-actions form { margin: 0; }
.jr-actions button { color: var(--texte-faible); }
.jr-actions a:hover, .jr-actions button:hover { text-decoration: underline; }
.jr-manquant { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 1.2rem; border-radius: var(--rayon-l); border: 1px dashed var(--bord); background: var(--surface-2); box-shadow: none; }
.jr-manquant b { font-size: .95rem; color: var(--texte-doux); }
.jr-manquant .bouton { width: auto; }

@media (max-width: 560px) {
  .jr-moyennes { gap: .6rem; }
  .jr-notes { gap: .35rem; }
  .jr-pied { font-size: .76rem; }
}

/* --------------------------------------------------------------------------
   L'onglet epicerie

   Une liste d'epicerie se tient debout dans une allee, une main sur le
   chariot : cibles larges, contraste franc, et une reponse immediate au
   toucher. Tout le reste est du decor qu'on enleve.
   -------------------------------------------------------------------------- */

.ep { display: grid; gap: .9rem; }

/* --- l'en-tete : ou on en est, et quand on y va --------------------------- */
.ep-hero {
  display: flex; align-items: center; gap: 1.1rem;
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--primary) 12%, var(--surface)),
      var(--surface) 60%);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--bord));
}
.ep-anneau { position: relative; width: 76px; height: 76px; flex: 0 0 76px; }
.ep-anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ep-anneau circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ep-anneau-fond { stroke: color-mix(in srgb, var(--primary) 16%, transparent); }
.ep-anneau-trait { stroke: var(--primary); transition: stroke-dashoffset .45s ease; }
.ep-anneau-texte {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1;
}
.ep-anneau-texte b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.ep-anneau-texte span { font-size: .7rem; color: var(--texte-faible); margin-top: .12rem; }
.ep-hero-texte { min-width: 0; }
.ep-hero-texte h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.ep-hero-texte p { margin: 0; font-size: .88rem; color: var(--texte-doux); line-height: 1.45; }

/* --- la barre d'ajout ----------------------------------------------------- */
.ep-ajout {
  display: flex; align-items: center; gap: .5rem; margin: 0;
  background: var(--surface); border: 1px solid var(--bord);
  border-radius: var(--rayon-l); padding: .45rem .45rem .45rem .85rem;
  box-shadow: var(--ombre);
}
.ep-ajout > i { color: var(--texte-faible); font-size: .95rem; }
.ep-ajout input[type="text"] {
  flex: 1; min-width: 0; border: 0; background: none; padding: .45rem 0;
  font-size: .98rem; color: var(--texte);
}
.ep-ajout input[type="text"]:focus { outline: none; }
.ep-ajout .bouton {
  flex: 0 0 auto; width: auto;            /* .bouton est en 100 % par defaut */
  padding: .55rem 1rem; border-radius: 99px;
}

/* --- les puces (suggestions et rayons) ------------------------------------ */
.ep-souvent { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ep-souvent form, .ep-puces form { margin: 0; }
.ep-mot {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--texte-faible); margin-right: .15rem;
}
.ep-puce {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte-doux);
  border-radius: 99px; padding: .4rem .85rem; font-size: .86rem; cursor: pointer;
  transition: transform .12s ease, border-color .15s, color .15s, background .15s;
}
.ep-puce i { font-size: .78rem; opacity: .7; }
.ep-puce:hover { border-color: var(--primary); color: var(--texte); transform: translateY(-1px); }
.ep-puce:active { transform: translateY(0) scale(.97); }
.ep-puce.deja {
  border-color: color-mix(in srgb, var(--vert) 55%, var(--bord));
  color: var(--vert);
  background: color-mix(in srgb, var(--vert) 10%, var(--surface));
}
.ep-puce.deja i { opacity: 1; }
.ep-puce-souvent { border-style: dashed; }

/* --- la liste, rangee par rayon ------------------------------------------- */
.ep-groupe { padding: .9rem 1rem 1rem; }
.ep-groupe-tete { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.ep-groupe-tete h2 {
  margin: 0; font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux);
  display: flex; align-items: center; gap: .45rem;
}
.ep-groupe-tete h2 i { font-size: .95rem; color: var(--primary); opacity: .85; }
.ep-groupe-compte {
  min-width: 1.5rem; text-align: center; border-radius: 99px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary); font-size: .76rem; font-weight: 700; padding: .1rem .5rem;
}
.ep-liste { list-style: none; margin: .55rem 0 0; padding: 0; display: grid; gap: .15rem; }
.ep-ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  border-radius: var(--rayon-s);
  transition: background .15s ease;
}
.ep-ligne form { margin: 0; display: flex; min-width: 0; }
.ep-ligne:hover { background: var(--surface-2); }
.ep-cocher { flex: 1; min-width: 0; }
.ep-case {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  border: 0; background: none; cursor: pointer;
  padding: .62rem .35rem; text-align: left; color: var(--texte);
}
.ep-coche {
  flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  border: 2px solid var(--bord); display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: .78rem;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.ep-nom { font-size: .98rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-ligne.pris .ep-coche {
  background: var(--vert); border-color: var(--vert); color: #fff; transform: scale(1.04);
}
.ep-ligne.pris .ep-nom { text-decoration: line-through; color: var(--texte-faible); }
.ep-retirer {
  border: 0; background: none; padding: .5rem .55rem; cursor: pointer;
  color: transparent; font-size: .78rem; transition: color .15s;
}
.ep-ligne:hover .ep-retirer, .ep-retirer:focus-visible { color: var(--texte-faible); }
.ep-retirer:hover { color: var(--rouge); }

/* --- liste vide, rayons, reglage ------------------------------------------ */
.ep-vide { text-align: center; padding: 2rem 1.2rem; color: var(--texte-faible); }
.ep-vide i { font-size: 1.9rem; opacity: .45; }
.ep-vide p { margin: .6rem 0 0; font-size: .92rem; }
.ep-aide { margin: .4rem 0 .2rem; font-size: .84rem; color: var(--texte-faible); }
.ep-rayon { border-top: 1px solid var(--bord); padding: .55rem 0 .15rem; }
.ep-rayon:first-of-type { border-top: 0; }
.ep-rayon summary {
  cursor: pointer; font-weight: 600; font-size: .92rem;
  display: flex; align-items: center; gap: .5rem; padding: .3rem 0;
}
.ep-rayon summary i { color: var(--primary); opacity: .8; }
.ep-puces { display: flex; flex-wrap: wrap; gap: .4rem; margin: .55rem 0 .5rem; }
.ep-suite { display: contents; }         /* les puces cachees restent dans la meme grille */
.ep-plus {
  border: 0; background: none; cursor: pointer; padding: .4rem .3rem;
  color: var(--primary); font-size: .84rem; font-weight: 600; font-family: inherit;
}
.ep-plus:hover { text-decoration: underline; }
.ep-quand-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .7rem; }
.ep-quand-form label {
  display: flex; align-items: center; gap: .35rem; margin: 0;
  font-size: .9rem; color: var(--texte-doux);
}

@media (max-width: 600px) {
  .ep-hero { gap: .9rem; }
  .ep-anneau { width: 64px; height: 64px; flex-basis: 64px; }
  .ep-anneau-texte b { font-size: 1.15rem; }
  .ep-hero-texte h2 { font-size: 1rem; }
  .ep-ajout .bouton span { display: none; }
  .ep-case { padding: .72rem .35rem; }   /* le pouce, pas la souris */
  .ep-retirer { color: var(--texte-faible); }
}

/* --- la photo d'un recu --------------------------------------------------- */
.fc-photo .bouton { margin-top: .7rem; }
.fc-prendre { display: block; margin-top: .8rem; }
.fc-prendre input[type="file"] { position: absolute; opacity: 0; width: 0; height: 0; }
.fc-prendre span {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 1.4rem 1rem; cursor: pointer;
  border: 2px dashed var(--bord); border-radius: var(--rayon);
  color: var(--texte-doux); font-size: .92rem;
  transition: border-color .15s, color .15s, background .15s;
}
.fc-prendre:hover span { border-color: var(--primary); color: var(--texte); background: var(--surface-2); }
.fc-prendre input:focus-visible + span { border-color: var(--primary); }
.fc-prendre input:valid + span { border-style: solid; border-color: var(--vert); color: var(--vert); }

/* --------------------------------------------------------------------------
   « Plus » : le reste de l'app, sur un telephone

   La barre du bas tient six onglets, l'app en compte seize. Sans cette
   feuille, la moitie n'aurait aucune porte sur un telephone.
   -------------------------------------------------------------------------- */

.nav-plus {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: none; cursor: pointer; font-family: inherit;
  padding: .5rem .1rem .45rem; color: var(--texte-faible);
  font-size: .6rem; font-weight: 600; line-height: 1.15;
}
.nav-plus i { font-size: 1.16rem; }
.nav-plus[aria-expanded="true"] { color: var(--primary); }

.feuille { position: fixed; inset: 0; z-index: 200; }
.feuille-fond { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.feuille-boite {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 82vh; overflow-y: auto;
  background: var(--surface);
  border-radius: var(--rayon-l) var(--rayon-l) 0 0;
  padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(15, 23, 42, .25);
  animation: feuille-monte .22s ease;
}
@keyframes feuille-monte { from { transform: translateY(14px); opacity: .6; } }
.feuille-poignee {
  width: 2.4rem; height: .25rem; border-radius: 99px;
  background: var(--bord); margin: .2rem auto .8rem;
}
.feuille-titre {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--texte-faible); margin-bottom: .6rem;
}
.feuille-x { border: 0; background: none; cursor: pointer; color: var(--texte-faible); padding: .2rem; }
.feuille-liens { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.feuille-liens form { margin: 0; display: contents; }
.feuille-liens a, .feuille-liens button[type="submit"] {
  display: flex; align-items: center; gap: .6rem;
  padding: .85rem .8rem; border-radius: var(--rayon-s);
  background: var(--surface-2); color: var(--texte);
  font-size: .9rem; font-weight: 500; font-family: inherit;
  border: 1px solid var(--bord); cursor: pointer; text-align: left;
}
.feuille-liens i { color: var(--primary); font-size: 1rem; }
.feuille-liens a:active, .feuille-liens button:active { background: var(--surface-3); }
.feuille-liens button[type="submit"] { color: var(--texte-doux); }
.feuille-liens button[type="submit"] i { color: var(--texte-faible); }

@media (min-width: 900px) { .feuille { display: none; } }

/* --------------------------------------------------------------------------
   L'ecran du recu

   Une seule chose compte ici : le montant. Il est en grand, deja rempli, et
   la categorie se choisit d'un tap. Le reste se replie.
   -------------------------------------------------------------------------- */

.rc { display: grid; gap: .8rem; }

.rc-montant { text-align: center; padding: 1.4rem 1.2rem 1.2rem; }
.rc-lu {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: var(--texte-doux);
  background: var(--surface-2); border-radius: 99px; padding: .25rem .8rem;
}
.rc-lu i { color: var(--vert); }
.rc-champ-montant {
  display: flex; align-items: baseline; justify-content: center; gap: .2rem;
  margin: .8rem 0 .3rem;
}
.rc-champ-montant input {
  width: 100%; max-width: 8ch; border: 0; background: none; padding: 0;
  font-size: 2.8rem; font-weight: 700; text-align: right; color: var(--texte);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.rc-champ-montant input:focus { outline: none; }
.rc-champ-montant input::-webkit-outer-spin-button,
.rc-champ-montant input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rc-champ-montant span { font-size: 1.5rem; font-weight: 600; color: var(--texte-doux); }
.rc-source { font-size: .88rem; color: var(--texte-doux); }

.rc-titre {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--texte-faible);
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
}
.rc-devinee { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--vert); }
.rc-puces { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.rc-puce {
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte-doux);
  border-radius: 99px; padding: .45rem .9rem; font-size: .88rem; font-family: inherit;
  cursor: pointer; transition: transform .12s, border-color .15s, background .15s, color .15s;
}
.rc-puce:hover { border-color: var(--primary); color: var(--texte); }
.rc-puce:active { transform: scale(.97); }
.rc-puce.choisie {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.rc-autre { border-style: dashed; }
.rc-libre { margin-top: .6rem; }

.rc-details summary {
  cursor: pointer; font-size: .9rem; color: var(--texte-doux); padding: .2rem 0;
}
.rc-grille { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .8rem; }
.rc-grille label { display: grid; gap: .3rem; font-size: .82rem; color: var(--texte-doux); margin: 0; }
.rc-grille .rc-large { grid-column: 1 / -1; }
.rc-erreur { color: var(--rouge); font-size: .86rem; margin: 0; }

.rc-preuve { padding: .6rem; }
.rc-preuve img {
  width: 100%; max-height: 22rem; object-fit: contain;
  border-radius: var(--rayon-s); background: var(--surface-2);
}
.rc-texte { margin-top: .5rem; }
.rc-texte summary { cursor: pointer; font-size: .82rem; color: var(--texte-faible); padding: .3rem; }
.rc-texte pre {
  margin: .4rem 0 0; padding: .7rem; border-radius: var(--rayon-s);
  background: var(--surface-2); font-size: .78rem; line-height: 1.4;
  white-space: pre-wrap; color: var(--texte-doux); max-height: 14rem; overflow: auto;
}

.rc-gestes { display: flex; gap: .6rem; }
.rc-gestes .bouton { flex: 1; }

/* --- ou part l'argent ce mois-ci ------------------------------------------ */
.ar-categories { display: grid; gap: .55rem; margin-top: .9rem; }
.ar-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; }
.ar-cat-nom { font-size: .92rem; }
.ar-cat-total { font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ar-cat-fois { font-size: .76rem; color: var(--texte-faible); }
.ar-cat-barre {
  grid-column: 1 / -1; height: .4rem; border-radius: 99px;
  background: var(--surface-2); overflow: hidden;
}
.ar-cat-barre > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

@media (max-width: 600px) {
  .rc-grille { grid-template-columns: 1fr; }
  .rc-champ-montant input { font-size: 2.4rem; }
}

/* Le bouton qui travaille : un rond qui tourne, et plus rien a cliquer. */
.bouton.occupe { opacity: .85; cursor: progress; }
.tourne {
  display: inline-block; width: .9rem; height: .9rem; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: tourne 0.7s linear infinite; vertical-align: -.15rem;
}
@keyframes tourne { to { transform: rotate(360deg); } }
.tourne-sombre { border-color: color-mix(in srgb, var(--texte-faible) 40%, transparent); border-top-color: var(--primary); }
.fc-prendre.occupe span { border-style: solid; border-color: var(--primary); color: var(--texte); cursor: progress; }
.fc-prendre.occupe input { pointer-events: none; }

/* --------------------------------------------------------------------------
   Argent : le mois, les budgets, le releve

   Un chiffre faux ne se rattrape pas par du style. La mise en page ne fait
   qu'une chose : rendre lisible d'un coup d'oeil ce qui est entre, ce qui
   est sorti, et ou on en est de ce qu'on s'etait fixe.

   Sur un grand ecran, la page tient en deux colonnes : a gauche ce qu'on
   lit (les chiffres du mois, le detail, les mouvements), a droite ce avec
   quoi on agit (photographier un recu, fixer un budget, decrire une paie).
   En une seule colonne, huit cartes pleine largeur formaient un ruban de
   deux metres ou rien n'etait hierarchise.
   -------------------------------------------------------------------------- */

.ag { display: grid; gap: .9rem; }
.ag-colonnes { display: grid; gap: .9rem; align-items: start; }
.ag-principal, .ag-cote { display: grid; gap: .9rem; align-content: start; }

@media (min-width: 1080px) {
  .ag-colonnes { grid-template-columns: minmax(0, 1.7fr) minmax(19rem, 1fr); }
  /* Un mois vide n'a rien a mettre dans la colonne de gauche : deux colonnes
     laisseraient un trou de la moitie de l'ecran. */
  .ag-colonnes.seule { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
}

/* --- l'en-tete du mois ----------------------------------------------------- */
.ag-hero {
  padding: 0 0 1.2rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface) 55%);
}
.ag-mois {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .7rem 1.2rem;
  border-bottom: 1px solid var(--bord);
  margin-bottom: 1.3rem;
}
.ag-mois a {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--texte-doux); font-size: .88rem; text-transform: capitalize; white-space: nowrap;
}
.ag-mois a:hover { color: var(--primary); }
.ag-mois b { font-size: .98rem; }
.ag-aujourdhui {
  font-size: .76rem; color: var(--texte-faible); white-space: nowrap;
  background: var(--surface-2); border-radius: 99px; padding: .15rem .6rem;
}

.ag-chiffres {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1rem; padding: 0 1.2rem;
}
.ag-chiffre { display: grid; gap: .15rem; min-width: 0; }
.ag-valeur {
  font-size: 1.75rem; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ag-chiffre.entre .ag-valeur { color: var(--vert); }
.ag-chiffre.garde .ag-valeur { color: var(--bleu); }
.ag-chiffre.negatif .ag-valeur { color: var(--rouge); }
.ag-mot { font-size: .8rem; color: var(--texte-doux); }
.ag-hero.vide .ag-valeur { color: var(--texte-faible); }
.ag-hero.vide { background: var(--surface); }
.ag-fois { font-size: .72rem; color: var(--texte-faible); }

.ag-repartition {
  display: flex; height: .5rem; border-radius: 99px; overflow: hidden;
  background: var(--surface-2); margin: 1.4rem 1.2rem .55rem;
}
.ag-part-depenses { background: var(--orange); }
.ag-part-epargne { background: var(--vert); }
.ag-lecture { margin: 0 1.2rem; font-size: .88rem; color: var(--texte-doux); line-height: 1.5; }

.ag-releve-lien {
  display: flex; align-items: center; gap: .55rem;
  margin: 1.2rem 1.2rem 0; padding: .75rem .9rem;
  border-radius: var(--rayon-s); background: var(--surface-2);
  color: var(--texte); font-size: .9rem; font-weight: 600;
  transition: background .15s;
}
.ag-releve-lien span { margin-left: auto; font-weight: 500; color: var(--texte-faible); font-size: .82rem; }
.ag-releve-lien > i:last-child { color: var(--texte-faible); font-size: .8rem; }
.ag-releve-lien:hover { background: var(--surface-3); }

/* --- un mois vide : par ou commencer --------------------------------------- */
/* Le panneau de depart se centre, ses tuiles restent alignees a gauche :
   c'est un panneau d'accueil, pas un paragraphe. */
.ag-demarrer { padding: 0 1.2rem; text-align: center; }
.ag-demarrer .ag-depart { text-align: left; }
.ag-hero { text-align: left; }
.ag-demarrer h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.ag-demarrer > p { margin: 0 0 1rem; font-size: .9rem; color: var(--texte-doux); }
.ag-departs { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.ag-depart {
  display: grid; gap: .25rem; align-content: start; cursor: pointer;
  padding: 1rem; border: 1px solid var(--bord); border-radius: var(--rayon);
  background: var(--surface-2); color: var(--texte);
  transition: border-color .15s, transform .12s, background .15s;
}
.ag-depart:hover { border-color: var(--primary); transform: translateY(-1px); background: var(--surface-3); }
.ag-depart i { font-size: 1.15rem; color: var(--primary); }
.ag-depart b { font-size: .95rem; }
.ag-depart span { font-size: .82rem; color: var(--texte-faible); line-height: 1.45; }

/* --- les en-tetes de carte -------------------------------------------------- */
.ag-tete { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.ag-tete h2 {
  margin: 0; font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--texte-doux);
  display: flex; align-items: center; gap: .45rem;
}
.ag-tete h2 i { color: var(--primary); font-size: .95rem; }
.ag-tete-chiffre { font-size: .84rem; color: var(--texte-faible); font-variant-numeric: tabular-nums; }
.ag-tete a { font-size: .82rem; }
.ag-aide { margin: .7rem 0 0; font-size: .84rem; color: var(--texte-faible); line-height: 1.5; }

/* --- ou part l'argent ------------------------------------------------------- */
.ag-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .8rem; margin-top: .9rem; }
.ag-cat-nom { font-size: .93rem; }
.ag-cat-total { font-size: .93rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ag-cat-part { font-size: .76rem; color: var(--texte-faible); }
.ag-cat-barre {
  grid-column: 1 / -1; height: .38rem; border-radius: 99px;
  background: var(--surface-2); overflow: hidden; margin-top: .2rem;
}
.ag-cat-barre > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.ag-cat-barre.revenu > span { background: var(--vert); }

/* --- les mouvements --------------------------------------------------------- */
.ag-mvt {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto auto;
  align-items: center; gap: .7rem;
  padding: .6rem 0; border-top: 1px solid var(--bord);
}
.ag-mouvements .ag-mvt:first-of-type { border-top: 0; margin-top: .4rem; }
.ag-mvt form { margin: 0; }
.ag-mvt-jour { font-size: .78rem; color: var(--texte-faible); white-space: nowrap; }
.ag-mvt-corps { display: grid; gap: .1rem; min-width: 0; }
.ag-mvt-corps b { font-size: .93rem; }
.ag-mvt-detail { font-size: .76rem; color: var(--texte-faible); }
.ag-mvt-montant { font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-mvt-montant.entre { color: var(--vert); }

/* --- budgets ---------------------------------------------------------------- */
.ag-budget { margin-top: .9rem; }
.ag-budget-tete { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.ag-budget-nom { font-size: .93rem; font-weight: 600; }
.ag-budget-chiffres { font-size: .85rem; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.ag-budget-barre {
  position: relative; height: .5rem; border-radius: 99px;
  background: var(--surface-2); overflow: hidden; margin: .35rem 0 .3rem;
}
.ag-budget-barre > span { display: block; height: 100%; border-radius: 99px; background: var(--vert); }
/* Le trait, c'est ou en est le mois : depasser la barre avant le trait, c'est
   etre en avance sur son budget - et ca se voit sans calculer. */
.ag-budget-barre > i {
  position: absolute; top: -2px; bottom: -2px; width: 2px;
  background: var(--texte-faible); opacity: .55;
}
.ag-budget.attention .ag-budget-barre > span { background: var(--orange); }
.ag-budget.depasse .ag-budget-barre > span { background: var(--rouge); }
.ag-budget.depasse .ag-budget-nom { color: var(--rouge); }
.ag-budget-pied { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--texte-faible); }
.ag-budget-pied form { margin: 0 0 0 auto; }
.ag-budget-x {
  border: 0; background: none; cursor: pointer; color: var(--texte-faible);
  padding: .1rem .25rem; font-size: .72rem;
}
.ag-budget-x:hover { color: var(--rouge); }

.ag-budget-form { display: flex; gap: .4rem; margin-top: 1.1rem; flex-wrap: wrap; }
.ag-budget-form input[type="text"] { flex: 2 1 8rem; min-width: 0; }
.ag-budget-form input[type="number"] { flex: 1 1 5rem; min-width: 0; }
.ag-budget-form .bouton { width: auto; flex: 0 0 auto; }
.ag-hors { margin-top: 1rem; }
.ag-hors summary { cursor: pointer; font-size: .84rem; color: var(--texte-doux); }
.ag-hors-liste { display: grid; gap: .4rem; margin-top: .6rem; }
.ag-hors-ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 5rem auto;
  align-items: center; gap: .4rem; margin: 0; font-size: .86rem;
}
.ag-hors-ligne input { min-width: 0; }
.ag-hors-ligne .bouton { width: auto; }

/* --- ce qui revient tout seul ----------------------------------------------- */
.ag-recurrent {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: .6rem; margin-top: .8rem;
}
.ag-recurrent form { margin: 0; }
.ag-recurrent-nom { display: block; font-size: .93rem; font-weight: 600; }
.ag-recurrent-detail { font-size: .76rem; color: var(--texte-faible); }
.ag-recurrent b { font-variant-numeric: tabular-nums; }
.ag-recurrent b.entre { color: var(--vert); }
.ag-prevu { margin: 1rem 0 0; font-size: .86rem; color: var(--texte-doux); line-height: 1.5; }
.ag-recurrent-form { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .8rem; }
.ag-recurrent-form label { display: grid; gap: .2rem; font-size: .8rem; color: var(--texte-doux); margin: 0; }
.ag-recurrent-form label:first-child { grid-column: 1 / -1; }
.ag-recurrent-form .bouton { grid-column: 1 / -1; width: 100%; }

/* --- a la main, et la valeur nette ------------------------------------------ */
.ag-main summary {
  cursor: pointer; font-size: .86rem; color: var(--texte-doux);
  display: flex; align-items: center; gap: .45rem;
}
.ag-main summary i { color: var(--primary); }
.ag-main-form { margin-top: .9rem; }
.ag-main-duo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ag-net { display: flex; align-items: baseline; gap: .6rem; margin: .8rem 0 .3rem; }
.ag-net b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.ag-net span { font-size: .8rem; color: var(--texte-faible); }
.ag-courbe { width: 100%; height: 3.2rem; }
.ag-bornes { display: flex; justify-content: space-between; font-size: .74rem; color: var(--texte-faible); }
.ag-valeur-nette .bouton { margin-top: .8rem; width: auto; }

/* --- la photo d'un recu, en colonne de cote --------------------------------- */
.ag-cote .fc-photo .fc-prendre { margin-top: .8rem; }
.ag-cote .fc-photo .fc-prendre span { padding: 1.1rem .8rem; font-size: .88rem; }
.ag-cote .fc-photo .bouton { margin-top: .8rem; width: auto; }

/* --- le releve --------------------------------------------------------------- */
.rv { display: grid; gap: .9rem; }
.rv-navigation .rv-retour { font-weight: 600; color: var(--primary); text-transform: none; }
.rv-sommaire table, .rv-detail table { width: 100%; border-collapse: collapse; }
.rv-sommaire th, .rv-detail th { text-align: left; font-weight: 500; padding: .45rem 0; }
.rv-sommaire td, .rv-detail td {
  text-align: right; padding: .45rem 0; font-variant-numeric: tabular-nums; font-size: .93rem;
}
.rv-sommaire tbody tr + tr th, .rv-sommaire tbody tr + tr td { border-top: 1px solid var(--bord); }
.rv-sommaire tfoot th, .rv-sommaire tfoot td {
  border-top: 2px solid var(--bord); font-weight: 700; font-size: 1.05rem; padding-top: .6rem;
}
.rv-sortie { color: var(--texte-doux); }
.rv-negatif td, .rv-negatif th { color: var(--rouge); }
.rv-fois, .rv-part, .rv-genre { color: var(--texte-faible); font-size: .8rem; white-space: nowrap; }
.rv-phrase { margin: 1rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--texte-doux); }
.rv-csv { margin-top: 1rem; }
.rv-detail h2 {
  margin: 0 0 .3rem; font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--texte-doux);
}
.rv-detail tr + tr th, .rv-detail tr + tr td { border-top: 1px solid var(--bord); }
.rv-mouvements .rv-date { text-align: left; color: var(--texte-faible); font-size: .8rem; white-space: nowrap; }
.rv-mouvements th { font-weight: 600; font-size: .9rem; }
.rv-note { display: block; font-weight: 400; font-size: .78rem; color: var(--texte-faible); }
.rv-recu { width: 1.5rem; }

.rv-controle {
  display: flex; align-items: flex-start; gap: .8rem;
  font-size: .88rem; line-height: 1.5; color: var(--texte-doux);
  border-left: 3px solid var(--vert);
}
.rv-controle i { color: var(--vert); font-size: 1.2rem; }
.rv-controle.faux { border-left-color: var(--rouge); }
.rv-controle.faux i { color: var(--rouge); }

@media (min-width: 760px) {
  .ag-chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  /* Un trait fin entre les colonnes : quatre chiffres alignes se lisent comme
     un tableau, pas comme quatre blocs poses au hasard. */
  .ag-chiffre + .ag-chiffre { border-left: 1px solid var(--bord); padding-left: 1.4rem; }
  .ag-chiffre { padding-right: 1.4rem; }
  .ag-valeur { font-size: 1.9rem; }
}

@media (max-width: 600px) {
  .ag-valeur { font-size: 1.45rem; }
  /* Le nom du mois voisin passe a la ligne sur un telephone : la fleche
     suffit a dire ou elle mene. */
  .ag-mois a span { display: none; }
  .ag-mois { padding: .6rem .9rem; }
  .ag-recurrent-form { grid-template-columns: 1fr; }
  .ag-hors-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .ag-mvt { grid-template-columns: 2.9rem minmax(0, 1fr) auto auto; gap: .5rem; }
  .rv-genre, .rv-sommaire td.rv-fois { display: none; }
}

/* --------------------------------------------------------------------------
   « Plus » : le reste de l'app, sur un telephone

   La barre du bas tient six onglets, l'app en compte seize. Sans cette
   feuille, la moitie n'aurait aucune porte sur un telephone.
   -------------------------------------------------------------------------- */

.nav-plus {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: none; cursor: pointer; font-family: inherit;
  padding: .5rem .1rem .45rem; color: var(--texte-faible);
  font-size: .6rem; font-weight: 600; line-height: 1.15;
}
.nav-plus i { font-size: 1.16rem; }
.nav-plus[aria-expanded="true"] { color: var(--primary); }

.feuille { position: fixed; inset: 0; z-index: 200; }
.feuille-fond { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.feuille-boite {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 82vh; overflow-y: auto;
  background: var(--surface);
  border-radius: var(--rayon-l) var(--rayon-l) 0 0;
  padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(15, 23, 42, .25);
  animation: feuille-monte .22s ease;
}
@keyframes feuille-monte { from { transform: translateY(14px); opacity: .6; } }
.feuille-poignee {
  width: 2.4rem; height: .25rem; border-radius: 99px;
  background: var(--bord); margin: .2rem auto .8rem;
}
.feuille-titre {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--texte-faible); margin-bottom: .6rem;
}
.feuille-x { border: 0; background: none; cursor: pointer; color: var(--texte-faible); padding: .2rem; }
.feuille-liens { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.feuille-liens form { margin: 0; display: contents; }
.feuille-liens a, .feuille-liens button[type="submit"] {
  display: flex; align-items: center; gap: .6rem;
  padding: .85rem .8rem; border-radius: var(--rayon-s);
  background: var(--surface-2); color: var(--texte);
  font-size: .9rem; font-weight: 500; font-family: inherit;
  border: 1px solid var(--bord); cursor: pointer; text-align: left;
}
.feuille-liens i { color: var(--primary); font-size: 1rem; }
.feuille-liens a:active, .feuille-liens button:active { background: var(--surface-3); }
.feuille-liens button[type="submit"] { color: var(--texte-doux); }
.feuille-liens button[type="submit"] i { color: var(--texte-faible); }

@media (min-width: 900px) { .feuille { display: none; } }

/* --------------------------------------------------------------------------
   L'ecran du recu

   Une seule chose compte ici : le montant. Il est en grand, deja rempli, et
   la categorie se choisit d'un tap. Le reste se replie.
   -------------------------------------------------------------------------- */

.rc { display: grid; gap: .8rem; }

.rc-montant { text-align: center; padding: 1.4rem 1.2rem 1.2rem; }
.rc-lu {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: var(--texte-doux);
  background: var(--surface-2); border-radius: 99px; padding: .25rem .8rem;
}
.rc-lu i { color: var(--vert); }
.rc-champ-montant {
  display: flex; align-items: baseline; justify-content: center; gap: .2rem;
  margin: .8rem 0 .3rem;
}
.rc-champ-montant input {
  width: 100%; max-width: 8ch; border: 0; background: none; padding: 0;
  font-size: 2.8rem; font-weight: 700; text-align: right; color: var(--texte);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.rc-champ-montant input:focus { outline: none; }
.rc-champ-montant input::-webkit-outer-spin-button,
.rc-champ-montant input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rc-champ-montant span { font-size: 1.5rem; font-weight: 600; color: var(--texte-doux); }
.rc-source { font-size: .88rem; color: var(--texte-doux); }

.rc-titre {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--texte-faible);
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
}
.rc-devinee { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--vert); }
.rc-puces { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.rc-puce {
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte-doux);
  border-radius: 99px; padding: .45rem .9rem; font-size: .88rem; font-family: inherit;
  cursor: pointer; transition: transform .12s, border-color .15s, background .15s, color .15s;
}
.rc-puce:hover { border-color: var(--primary); color: var(--texte); }
.rc-puce:active { transform: scale(.97); }
.rc-puce.choisie {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.rc-autre { border-style: dashed; }
.rc-libre { margin-top: .6rem; }

.rc-details summary {
  cursor: pointer; font-size: .9rem; color: var(--texte-doux); padding: .2rem 0;
}
.rc-grille { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .8rem; }
.rc-grille label { display: grid; gap: .3rem; font-size: .82rem; color: var(--texte-doux); margin: 0; }
.rc-grille .rc-large { grid-column: 1 / -1; }
.rc-erreur { color: var(--rouge); font-size: .86rem; margin: 0; }

.rc-preuve { padding: .6rem; }
.rc-preuve img {
  width: 100%; max-height: 22rem; object-fit: contain;
  border-radius: var(--rayon-s); background: var(--surface-2);
}
.rc-texte { margin-top: .5rem; }
.rc-texte summary { cursor: pointer; font-size: .82rem; color: var(--texte-faible); padding: .3rem; }
.rc-texte pre {
  margin: .4rem 0 0; padding: .7rem; border-radius: var(--rayon-s);
  background: var(--surface-2); font-size: .78rem; line-height: 1.4;
  white-space: pre-wrap; color: var(--texte-doux); max-height: 14rem; overflow: auto;
}

.rc-gestes { display: flex; gap: .6rem; }
.rc-gestes .bouton { flex: 1; }

/* --- ou part l'argent ce mois-ci ------------------------------------------ */
.ar-categories { display: grid; gap: .55rem; margin-top: .9rem; }
.ar-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; }
.ar-cat-nom { font-size: .92rem; }
.ar-cat-total { font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ar-cat-fois { font-size: .76rem; color: var(--texte-faible); }
.ar-cat-barre {
  grid-column: 1 / -1; height: .4rem; border-radius: 99px;
  background: var(--surface-2); overflow: hidden;
}
.ar-cat-barre > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

@media (max-width: 600px) {
  .rc-grille { grid-template-columns: 1fr; }
  .rc-champ-montant input { font-size: 2.4rem; }
}

/* Le bouton qui travaille : un rond qui tourne, et plus rien a cliquer. */
.bouton.occupe { opacity: .85; cursor: progress; }
.tourne {
  display: inline-block; width: .9rem; height: .9rem; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: tourne 0.7s linear infinite; vertical-align: -.15rem;
}
@keyframes tourne { to { transform: rotate(360deg); } }
.tourne-sombre { border-color: color-mix(in srgb, var(--texte-faible) 40%, transparent); border-top-color: var(--primary); }
.fc-prendre.occupe span { border-style: solid; border-color: var(--primary); color: var(--texte); cursor: progress; }
.fc-prendre.occupe input { pointer-events: none; }

/* --- une page d'erreur : sobre, et qui dit quoi faire ---------------------- */
.err { text-align: center; padding: 2.4rem 1.4rem; }
.err i { font-size: 2.2rem; color: var(--texte-faible); opacity: .6; }
.err p { margin: 1rem auto 1.4rem; max-width: 26rem; color: var(--texte-doux); line-height: 1.6; }
.err-gestes .bouton { width: auto; }

/* --- code de secours et reprise de compte --------------------------------- */
.code-carte { text-align: center; padding: 2rem 1.4rem; }
.code-valeur {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 1.3rem; font-weight: 600; letter-spacing: .02em;
  background: var(--surface-2); border: 1px dashed var(--bord);
  border-radius: var(--rayon-s); padding: 1rem; margin-bottom: .8rem;
  word-break: break-word; user-select: all;
}
.code-carte p { color: var(--texte-doux); line-height: 1.6; margin: 1rem auto; max-width: 30rem; }
.code-carte .bouton { width: auto; }
.oubli-form { display: grid; gap: .9rem; }
.oubli-form label { display: grid; gap: .3rem; font-size: .88rem; color: var(--texte-doux); }

/* --- emporter ses donnees -------------------------------------------------- */
.exp-chiffres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: .8rem; margin: 1rem 0 1.2rem;
}
.exp-chiffres div { display: grid; gap: .1rem; }
.exp-chiffres b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.exp-chiffres span { font-size: .78rem; color: var(--texte-faible); }

/* --- ce qui revient tout seul --------------------------------------------- */
.ag-recurrent {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: .6rem; margin-top: .8rem;
}
.ag-recurrent form { margin: 0; }
.ag-recurrent-nom { display: block; font-size: .95rem; font-weight: 600; }
.ag-recurrent-detail { font-size: .78rem; color: var(--texte-faible); }
.ag-recurrent b { font-variant-numeric: tabular-nums; }
.ag-recurrent b.entre { color: var(--vert); }
.ag-prevu { margin: 1rem 0 0; font-size: .88rem; color: var(--texte-doux); line-height: 1.55; }
.ag-recurrent-form { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .8rem; }
.ag-recurrent-form label { display: grid; gap: .25rem; font-size: .82rem; color: var(--texte-doux); margin: 0; }
.ag-recurrent-form label:first-child { grid-column: 1 / -1; }
.ag-recurrent-form .bouton { grid-column: 1 / -1; width: 100%; }
@media (max-width: 600px) { .ag-recurrent-form { grid-template-columns: 1fr; } }
