/* Finances du Foyer : feuille de style unique, pensée d'abord pour le téléphone. */

:root {
  color-scheme: light;
  --fond: #f3f4ef;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --encre: #1d2421;
  --encre-douce: #5f6b66;
  --encre-pale: #8a948f;
  --bordure: #e2e6e0;
  --marque: #0d5c4a;
  --marque-fonce: #0a4a3b;
  --marque-clair: #e2f0ea;
  --accent: #f2a600;
  --positif: #0b7a3e;
  --negatif: #c2362f;
  --info: #1f6fc9;
  --attention-fond: #fff4d6;
  --attention-texte: #8a5a00;
  --critique-fond: #fde8e6;
  --bon-fond: #e3f5e8;
  --rayon: 14px;
  --rayon-petit: 10px;
  --ombre: 0 1px 2px rgba(20, 30, 25, 0.06), 0 2px 10px rgba(20, 30, 25, 0.04);
  --haut-barre: 56px;
  --haut-nav: 64px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --lien: #0d5c4a;
  --grille: #e8ebe7;
  --seg: #e8ebe5;
  --piste: #e9ece7;
  --bordure-champ: #d3d9d3;
  --barre-fond: rgba(243, 244, 239, 0.86);
  --puce-actif-texte: #0a4a3b;
  --surface-3: #eef1ec;
  --largeur-nav: 256px;
}

/* Thème sombre : choisi dans Paramètres (automatique, clair ou sombre). */
:root[data-mode="sombre"] {
    color-scheme: dark;
    --fond: #0e1412;
    --surface: #161e1b;
    --surface-2: #1d2723;
    --encre: #e7eeea;
    --encre-douce: #a2b0a9;
    --encre-pale: #74817b;
    --bordure: #26322d;
    --marque: #138a6e;
    --marque-fonce: #0f735c;
    --marque-clair: #17342c;
    --positif: #4fcf86;
    --negatif: #ff7d74;
    --info: #5aa2f0;
    --attention-fond: #3a2e10;
    --attention-texte: #f3c46a;
    --critique-fond: #3c1c1a;
    --bon-fond: #15321f;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.4);
    --lien: #5ad3b0;
    --grille: #26322d;
    --seg: #1f2a26;
    --piste: #26322d;
    --bordure-champ: #2f3c36;
    --barre-fond: rgba(14, 20, 18, 0.86);
    --puce-actif-texte: #8fe6cb;
    --surface-3: #22302b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.45;
  color: var(--encre);
  background: var(--fond);
  -webkit-tap-highlight-color: transparent;
}
body.feuille-ouverte { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 10px; }
a { color: var(--lien); }
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
small { font-size: 12.5px; color: var(--encre-douce); }
[hidden] { display: none !important; }
.montant, .montant-grand, b, .nombre { font-variant-numeric: tabular-nums; }
.positif { color: var(--positif); }
.negatif { color: var(--negatif); }
.neutre { color: var(--encre-douce); }

/* ------------------------------------------------------------------ */
/* Chargement                                                          */
/* ------------------------------------------------------------------ */
.ecran-chargement { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--encre-douce); }
.noscript { padding: 20px; text-align: center; }

/* ------------------------------------------------------------------ */
/* Coquille                                                            */
/* ------------------------------------------------------------------ */
.barre-haut {
  position: sticky; top: 0; z-index: 20;
  height: calc(var(--haut-barre) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--barre-fond);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.marque { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: 16px; }
.marque img { border-radius: 7px; }
.marque span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-etats { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pastille-taux, .pastille-sync {
  border: 1px solid var(--bordure); background: var(--surface); border-radius: 999px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.pastille-sync .point, .etat-sync-grand .point { width: 8px; height: 8px; border-radius: 50%; background: var(--encre-pale); flex-shrink: 0; }
.pastille-sync.ok .point, .etat-sync-grand.ok .point { background: #0aac23; }
.pastille-sync.sync .point, .etat-sync-grand.sync .point { background: var(--info); animation: pulsation 1s infinite alternate; }
.pastille-sync.hors-ligne .point, .etat-sync-grand.hors-ligne .point, .pastille-sync.attente .point, .etat-sync-grand.attente .point { background: var(--accent); }
.pastille-sync.erreur .point, .etat-sync-grand.erreur .point { background: var(--negatif); }
.pastille-sync.erreur { border-color: #f1b9b4; color: var(--negatif); }
@keyframes pulsation { from { opacity: 1; } to { opacity: 0.3; } }

/* Navigation : tous les modules restent visibles.
   Téléphone : barre du bas (7 modules) et icônes Alertes et Paramètres en haut.
   Tablette : rail d'icônes à gauche. Ordinateur : barre latérale complète. */
.navigation { display: none; }
.barre-bas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  height: calc(var(--haut-nav) + env(safe-area-inset-bottom));
  padding: 0 2px env(safe-area-inset-bottom);
  display: flex; align-items: stretch;
  background: var(--barre-fond); border-top: 1px solid var(--bordure);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  overflow-x: auto; scrollbar-width: none;
}
.barre-bas::-webkit-scrollbar { display: none; }
.bas-lien {
  flex: 1 1 0; min-width: 46px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--encre-pale); text-decoration: none; font-weight: 650;
  font-size: clamp(9.6px, 2.65vw, 11.5px); letter-spacing: -0.01em;
}
.bas-lien span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 1px; }
.bas-lien svg { width: 23px; height: 23px; transition: transform 0.18s; }
.bas-lien.actif { color: var(--marque); }
[data-mode="sombre"] .bas-lien.actif { color: var(--lien); }
.bas-lien.actif svg { stroke-width: 2.3; transform: translateY(-1px); }
.bas-lien.actif::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: currentColor; }
@media (max-width: 349px) {
  .bas-lien span { display: none; }
}

.bouton-barre {
  position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--bordure); background: var(--surface);
  display: inline-grid; place-items: center; color: var(--encre); cursor: pointer; text-decoration: none; flex-shrink: 0;
}
.bouton-barre svg { width: 20px; height: 20px; }
.bouton-barre.actif { color: var(--marque); border-color: var(--marque); }
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #e5484d; color: #fff; font-size: 11px; font-style: normal; font-weight: 750; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--fond);
}
.seulement-telephone { display: inline-grid; }

.vue {
  padding: 14px 14px calc(var(--haut-nav) + 92px + env(safe-area-inset-bottom));
  max-width: 1240px; margin: 0 auto; outline: none; container-type: inline-size; container-name: vue; min-width: 0;
  view-transition-name: vue;
}
.bouton-ajouter {
  position: fixed; z-index: 26; right: 16px;
  bottom: calc(var(--haut-nav) + 14px + env(safe-area-inset-bottom));
  height: 56px; padding: 0 20px 0 16px; border-radius: 28px; border: 0;
  background: linear-gradient(135deg, #12775f, #0b4c3e); color: #fff; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(13, 92, 74, 0.55), 0 2px 6px rgba(13, 92, 74, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bouton-ajouter svg { width: 24px; height: 24px; stroke-width: 2.5; }
.bouton-ajouter:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -6px rgba(13, 92, 74, 0.6); }
.bouton-ajouter:active { transform: scale(0.97); }

/* Tablette : rail d'icônes avec libellés courts. */
@media (min-width: 640px) {
  .coquille { display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  .barre-haut { grid-column: 2; grid-row: 1; }
  .vue { grid-column: 2; grid-row: 2; width: 100%; padding: 20px 22px 110px; }
  .barre-bas, .seulement-telephone { display: none !important; }
  .navigation {
    display: flex; flex-direction: column; gap: 2px; grid-column: 1; grid-row: 1 / span 2;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
    padding: 12px 8px; background: var(--surface); border-right: 1px solid var(--bordure);
  }
  .nav-marque { display: flex; justify-content: center; padding: 4px 0 10px; text-decoration: none; color: inherit; }
  .nav-marque img { border-radius: 10px; box-shadow: 0 4px 12px rgba(13, 92, 74, 0.25); }
  .nav-marque > span { display: none; }
  .nav-recherche { display: grid; place-items: center; height: 42px; margin: 0 6px 6px; border-radius: 12px; border: 1px solid var(--bordure); background: var(--surface-2); color: var(--encre-douce); cursor: pointer; }
  .nav-recherche span, .nav-recherche kbd { display: none; }
  .nav-groupe { height: 1px; margin: 6px 14px; background: var(--bordure); font-size: 0; overflow: hidden; }
  .nav-lien {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 12px;
    color: var(--encre-douce); text-decoration: none; font-size: 11px; font-weight: 650; border: 0; background: none; cursor: pointer; text-align: center;
  }
  .nav-lien svg { width: 22px; height: 22px; }
  .nav-lien:hover { background: var(--surface-2); color: var(--encre); }
  .nav-lien.actif { background: var(--marque-clair); color: var(--puce-actif-texte); }
  .nav-lien.actif svg { stroke-width: 2.2; }
  .nav-lien .badge { top: 2px; right: 14px; }
  .nav-pied { margin-top: auto; padding-top: 8px; }
  .annonces { bottom: 28px !important; }
  .bouton-ajouter { bottom: 24px; right: 24px; }
}

/* Ordinateur : barre latérale complète, groupée. */
@media (min-width: 1024px) {
  .coquille { grid-template-columns: var(--largeur-nav) minmax(0, 1fr); }
  .vue { padding: 26px 34px 120px; }
  .navigation { padding: 18px 14px; gap: 1px; }
  .nav-marque { justify-content: flex-start; align-items: center; gap: 11px; padding: 2px 8px 16px; }
  .nav-marque > span { display: flex; flex-direction: column; min-width: 0; }
  .nav-marque b { font-size: 15px; line-height: 1.2; }
  .nav-marque small { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-recherche { display: flex; align-items: center; gap: 9px; justify-content: flex-start; padding: 0 10px; margin: 0 0 10px; font-size: 14px; }
  .nav-recherche svg { width: 18px; height: 18px; }
  .nav-recherche span { display: inline; flex: 1; text-align: left; }
  .nav-recherche kbd { display: inline-block; }
  .nav-groupe { height: auto; background: none; margin: 14px 10px 6px; font-size: 11.5px; font-weight: 700; color: var(--encre-pale); letter-spacing: 0.02em; }
  .nav-lien { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 9px 12px; font-size: 14.5px; font-weight: 600; text-align: left; }
  .nav-lien .badge { position: static; margin-left: auto; box-shadow: none; }
  .marque img { display: none; }
}
@media (min-width: 1600px) { .vue { max-width: 1360px; } }

kbd { font: 600 11px/1 var(--police); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--bordure); background: var(--surface); color: var(--encre-douce); box-shadow: 0 1px 0 var(--bordure); }

/* ------------------------------------------------------------------ */
/* En-têtes d'écran                                                    */
/* ------------------------------------------------------------------ */
.tete-ecran { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.tete-ecran .aide { margin: 4px 0 0; }
.tete-actions { display: flex; gap: 8px; flex-shrink: 0; }
.tete-retour { align-items: center; display: grid; grid-template-columns: auto 1fr auto; }
.tete-retour h1 { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aide { color: var(--encre-douce); font-size: 14px; }
.lien-guide { font-weight: 600; white-space: nowrap; }
.sous-titre { color: var(--encre-douce); font-size: 13px; }

/* ------------------------------------------------------------------ */
/* Cartes                                                              */
/* ------------------------------------------------------------------ */
.carte {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--ombre);
}
a.carte { display: block; color: inherit; text-decoration: none; }
a.carte:active, button.carte-choix:active { transform: scale(0.99); }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.carte-tete .lien { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--lien); }
.libelle { display: block; color: var(--encre-douce); font-size: 13px; margin-bottom: 2px; }

.carte-tresorerie { background: linear-gradient(160deg, #0d5c4a 0%, #0b4c3e 100%); color: #fff; border: 0; }
.carte-tresorerie .libelle, .carte-tresorerie small, .carte-tresorerie summary { color: rgba(255, 255, 255, 0.78); }
.carte-tresorerie .seg { background: rgba(255, 255, 255, 0.14); }
.carte-tresorerie .seg button { color: rgba(255, 255, 255, 0.85); }
.carte-tresorerie .seg button.actif { background: #fff; color: var(--marque); }
.carte-tresorerie .negatif { color: #ffc9c4; }
.soldes-devises { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.montant-grand { display: block; font-size: 24px; font-weight: 750; letter-spacing: -0.01em; }
.total-consolide { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.total-consolide b { font-size: 18px; }
.carte:not(.carte-tresorerie) .total-consolide { border-top: 0; margin-top: 0; padding-top: 0; margin-bottom: 10px; }
.detail-comptes { margin-top: 10px; }
.detail-comptes summary { cursor: pointer; font-size: 14px; padding: 4px 0; }
.detail-comptes .liste-simple li { border-color: rgba(255, 255, 255, 0.14); }
.detail-comptes .liste-simple b { color: #fff; }

.grille-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.grille-kpi.deux { grid-template-columns: 1fr 1fr; }
.grille-kpi .carte { margin: 0; padding: 12px; }
.kpi b { display: block; font-size: 16px; font-weight: 700; margin: 2px 0; word-break: break-word; }
.kpi small { display: block; font-size: 11.5px; }
@media (max-width: 520px) {
  .grille-kpi { grid-template-columns: 1fr 1fr; }
  .grille-kpi > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
}

.grille-mois { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.grille-mois b { display: block; font-size: 17px; font-weight: 700; }
@media (max-width: 560px) { .grille-mois { grid-template-columns: 1fr 1fr; } }

.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.grille-cartes .carte { margin: 0; }



/* ------------------------------------------------------------------ */
/* Graphiques                                                          */
/* ------------------------------------------------------------------ */
.graphique { position: relative; height: 220px; }
.graphique.haut { height: 280px; }
.graphique.petit { height: 170px; }
.graphique-anneau { height: 200px; width: 200px; max-width: 100%; margin: 0 auto; }
.repartition { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
@media (max-width: 600px) { .repartition { grid-template-columns: 1fr; } }
.legende-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.legende-parts li { display: grid; grid-template-columns: 12px 1fr auto 42px; gap: 8px; align-items: center; font-size: 14px; }
.legende-parts .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legende-parts .valeur { font-weight: 600; font-variant-numeric: tabular-nums; }
.legende-parts .part { color: var(--encre-douce); text-align: right; font-size: 13px; }
.pastille { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.legende-parts .pastille { margin: 0; }
.legende-series { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--encre-douce); margin-bottom: 8px; }

/* ------------------------------------------------------------------ */
/* Listes                                                              */
/* ------------------------------------------------------------------ */
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.liste-simple li:last-child { border-bottom: 0; }
.liste-simple li > span:first-child { min-width: 0; }
.liste-simple.cliquable li { padding: 0; }
.liste-simple.cliquable button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.liste-simple .bloc { display: block; }
.liste-simple li.en-retard a { color: var(--negatif); }
.texte-coupe { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 13px; }

.liste-operations { list-style: none; margin: 0; padding: 0; }
.liste-operations.carte { padding: 4px 14px; }
.liste-operations li + li { border-top: 1px solid var(--bordure); }
.ligne-operation {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; text-decoration: none;
}
.icone-rond { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--bordure); display: grid; place-items: center; font-size: 19px; }
.icone-rond.grand { width: 46px; height: 46px; font-size: 22px; }
.ligne-texte { min-width: 0; display: flex; flex-direction: column; }
.ligne-texte b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.montant { font-weight: 650; white-space: nowrap; text-align: right; }
.montant.double { display: flex; flex-direction: column; align-items: flex-end; }
.montant.double small { color: var(--positif); font-weight: 600; font-size: 12.5px; }
.groupe-jour h3 { font-size: 13px; color: var(--encre-douce); font-weight: 600; margin: 14px 4px 6px; text-transform: none; }
.groupe-jour h3::first-letter { text-transform: uppercase; }

.liste-recurrences { list-style: none; margin: 0; padding: 0; }
.liste-recurrences li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.liste-recurrences li:last-child { border-bottom: 0; }
.liste-recurrences .groupe-boutons { grid-column: 1 / -1; }

.liste-cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ligne-dette { margin: 0; }
.ligne-dette-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.ligne-dette.soldee { opacity: 0.7; }

.menu-plus { list-style: none; margin: 0; padding: 0; }
.ligne-menu { display: grid !important; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-bottom: 10px; }
.ligne-menu b { display: block; }
.ligne-menu svg { color: var(--encre-pale); }

/* ------------------------------------------------------------------ */
/* Barres de progression, états                                        */
/* ------------------------------------------------------------------ */
.barre { height: 8px; background: var(--piste); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.barre span { display: block; height: 100%; background: var(--marque); border-radius: 99px; transition: width 0.4s; }
.barre.attention span { background: #fbb315; }
.barre.depasse span { background: #dc3c3d; }
.barre.atteint span { background: #0aac23; }
.etat { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.etat.attention { background: var(--attention-fond); color: var(--attention-texte); }
.etat.critique { background: var(--critique-fond); color: var(--negatif); }
.etat.bon { background: var(--bon-fond); color: var(--positif); }

.ligne-budget { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--bordure); }
.ligne-budget:last-child { border-bottom: 0; }
.ligne-budget-tete, .ligne-budget-pied, .mini-libelle { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.ligne-budget-tete { font-weight: 600; }
.ligne-budget-pied, .mini-libelle { font-size: 13px; color: var(--encre-douce); }
.mini-libelle { margin-top: 10px; }

/* ------------------------------------------------------------------ */
/* Épargne et projets                                                  */
/* ------------------------------------------------------------------ */
.objectif-tete, .projet-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.projet-tete { justify-content: space-between; }
.objectif-tete b, .projet-tete b { display: block; font-size: 15.5px; }
.objectif-montant { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.objectif-montant b { font-size: 20px; font-weight: 750; }
.objectif-montant span { color: var(--encre-douce); font-size: 14px; }
.objectif-montant.grand b { font-size: 28px; }
.objectif-pied { margin: 6px 0 0; font-size: 14px; color: var(--encre-douce); }
.objectif-pied b { color: var(--encre); }
.objectif-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.objectif-chiffres.trois { grid-template-columns: repeat(3, 1fr); }
.objectif-chiffres span { display: block; font-size: 12.5px; color: var(--encre-douce); }
.objectif-chiffres b { font-size: 15px; }
.note { background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px 12px; color: var(--encre-douce); font-size: 14px; margin-top: 10px; }

.statut { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--bordure); }
.statut-preparation { background: #eef3fb; border-color: #cfe0f6; color: #1d5fae; }
.statut-en_cours { background: #fff5e0; border-color: #f6dfa8; color: #8a5a00; }
.statut-rentable { background: var(--bon-fond); border-color: #bfe5c9; color: var(--positif); }
.statut-termine { background: #efefef; color: #555; }

.resultat-projet { text-align: center; padding: 14px; border-radius: var(--rayon-petit); margin: 6px 0 14px; background: var(--bon-fond); }
.resultat-projet.negatif { background: var(--critique-fond); }
.resultat-projet b { display: block; font-size: 28px; font-weight: 750; }
.resultat-projet .libelle { color: inherit; font-weight: 600; }
.grille-indicateurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grille-indicateurs > div { background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px; }
.grille-indicateurs span { display: block; font-size: 12.5px; color: var(--encre-douce); }
.grille-indicateurs b { font-size: 15px; display: block; }
@media (max-width: 700px) { .grille-indicateurs { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ */
/* Contrôles                                                           */
/* ------------------------------------------------------------------ */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--marque);
  background: var(--marque); color: #fff; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.bouton:hover { background: var(--marque-fonce); }
.bouton:disabled { opacity: 0.5; cursor: not-allowed; }
.bouton.secondaire { background: var(--surface); color: var(--lien); border-color: var(--bordure); }
.bouton.secondaire:hover { background: var(--surface-2); }
.bouton.danger { background: var(--negatif); border-color: var(--negatif); }
.bouton.danger.secondaire { background: var(--surface); color: var(--negatif); border-color: #f1c4bf; }
.bouton.petit { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.bouton.petit svg { width: 18px; height: 18px; }
.bouton.large { width: 100%; margin-top: 8px; }
.bouton-icone { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--bordure); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--encre); text-decoration: none; }
.lien { background: none; border: 0; color: var(--lien); font-weight: 600; cursor: pointer; padding: 6px 0; }
.groupe-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.groupe-boutons.large > * { flex: 1; }
.groupe-boutons.quatre { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.groupe-boutons.quatre .bouton { padding: 0 8px; }
@media (max-width: 480px) { .groupe-boutons.quatre { grid-template-columns: 1fr 1fr; } }

.seg { display: inline-flex; background: var(--seg); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--encre-douce); cursor: pointer; white-space: nowrap; }
.seg button.actif { background: var(--surface); color: var(--encre); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.seg.seg-plein { display: flex; width: 100%; margin-bottom: 14px; }
.seg.seg-plein button { flex: 1; padding: 9px 6px; }

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { border: 1px solid var(--bordure); background: var(--surface); border-radius: 99px; padding: 7px 12px; font-size: 14px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.puce.actif { background: var(--marque-clair); border-color: var(--marque); color: var(--puce-actif-texte); box-shadow: inset 0 0 0 1px var(--marque); }
.puce-icone { font-size: 16px; line-height: 1; }

.bascule { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.bascule input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bascule .piste { width: 46px; height: 28px; border-radius: 99px; background: var(--bordure-champ); position: relative; flex-shrink: 0; transition: background 0.2s; }
.bascule .piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.bascule input:checked + .piste { background: var(--marque); }
.bascule input:checked + .piste::after { transform: translateX(18px); }
.bascule input:focus-visible + .piste { outline: 3px solid rgba(13, 92, 74, 0.35); outline-offset: 2px; }
.bascule .texte { display: flex; flex-direction: column; font-weight: 550; }
.bascule .texte small { font-weight: 400; }
.groupe-bascules { border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: 6px 14px; margin: 0 0 14px; }
.groupe-bascules legend { font-size: 13px; font-weight: 600; color: var(--encre-douce); padding: 0 6px; }

/* ------------------------------------------------------------------ */
/* Formulaires                                                         */
/* ------------------------------------------------------------------ */
.formulaire .champ { margin-bottom: 14px; }
.formulaire.compact .champ { margin-bottom: 8px; }
.champ > label { display: block; font-size: 13px; font-weight: 600; color: var(--encre-douce); margin-bottom: 6px; }
input:not([type="checkbox"]):not([type="file"]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--bordure-champ); border-radius: 11px;
  background: var(--surface); font: inherit; color: var(--encre);
}
input[type="file"] { font: inherit; }
textarea { min-height: 64px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(13, 92, 74, 0.2); border-color: var(--marque); }
input:disabled { background: var(--surface-2); color: var(--encre-douce); }
.aide-champ { font-size: 12.5px; color: var(--encre-douce); margin: 6px 0 0; }
.erreur-form { background: var(--critique-fond); color: var(--negatif); padding: 10px 12px; border-radius: var(--rayon-petit); font-size: 14px; font-weight: 550; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.colonnes-icone { grid-template-columns: 80px 1fr; }
@media (max-width: 420px) { .deux-colonnes:not(.colonnes-icone) { grid-template-columns: 1fr; } }
.avec-suffixe { display: flex; align-items: center; gap: 8px; }
.avec-suffixe span { font-weight: 600; color: var(--encre-douce); }
.avec-suffixe.grand input { font-size: 24px; font-weight: 700; }
.champ-montant .ligne-montant { display: flex; align-items: center; gap: 10px; }
.champ-montant input { font-size: 28px; font-weight: 750; min-height: 58px; letter-spacing: -0.01em; }
.suffixe-devise { font-size: 20px; font-weight: 700; color: var(--encre-douce); min-width: 40px; }
.actions-form { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.actions-form .bouton { flex: 1; max-width: 220px; }
.avance { border-top: 1px solid var(--bordure); padding-top: 10px; margin-bottom: 8px; }
.avance summary { cursor: pointer; font-weight: 600; color: var(--lien); padding: 4px 0 10px; }
.encadre-change { background: var(--surface-2); border-radius: var(--rayon); padding: 12px; margin-bottom: 14px; }
.saisie-code { font-size: 22px !important; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; text-align: center; }
.saisie-pin { font-size: 26px !important; letter-spacing: 0.4em; text-align: center; }
.saisie-icone { text-align: center; font-size: 22px !important; }
.texte-confirmation { font-size: 15px; }
.texte-bilan { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* ------------------------------------------------------------------ */
/* Navigateur de période, recherche, totaux                            */
/* ------------------------------------------------------------------ */
.navigateur-periode { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 12px; text-align: center; }
.navigateur-periode b { display: block; font-size: 16px; }
.barre-recherche { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.recherche { display: flex; align-items: center; gap: 8px; border: 1px solid var(--bordure-champ); border-radius: 11px; background: var(--surface); padding: 0 12px; }
.recherche svg { color: var(--encre-pale); width: 20px; height: 20px; }
.recherche input { border: 0 !important; outline: none !important; padding: 10px 0 !important; min-height: 44px; }
.bouton-filtre svg { width: 18px; height: 18px; }
.bandeau-totaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 12px; margin-bottom: 4px; }
.bandeau-totaux span { display: block; font-size: 12.5px; color: var(--encre-douce); }
.bandeau-totaux b { font-size: 15px; }

/* ------------------------------------------------------------------ */
/* Tableaux                                                            */
/* ------------------------------------------------------------------ */
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; font-size: 12.5px; color: var(--encre-douce); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--bordure); }
.tableau td { padding: 8px 4px; border-bottom: 1px solid var(--bordure); }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .nombre { text-align: right; white-space: nowrap; }
.evolution { display: inline-block; font-size: 12px; font-weight: 650; color: var(--encre-douce); margin-top: 2px; }
.evolution.defavorable { color: #a35a00; }
.evolution.favorable { color: var(--positif); }

/* ------------------------------------------------------------------ */
/* Bannières, vide, annonces                                           */
/* ------------------------------------------------------------------ */
.banniere { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--bordure); border-left: 4px solid var(--accent); border-radius: var(--rayon-petit); padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.banniere.info { border-left-color: var(--info); }
.banniere.alerte { border-left-color: var(--negatif); }
.vide { text-align: center; color: var(--encre-douce); padding: 26px 12px; }
.vide .bouton { margin-top: 6px; }
.annonces { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--haut-nav) + 84px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.annonce { background: #1d2421; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.annonce.visible { opacity: 1; transform: none; }
.annonce.alerte { background: #8f2620; }
@media (min-width: 900px) { .annonces { bottom: 28px; } }

/* ------------------------------------------------------------------ */
/* Feuille (fenêtre de saisie)                                         */
/* ------------------------------------------------------------------ */
.feuille { position: fixed; inset: 0; z-index: 50; }
.feuille-fond { position: absolute; inset: 0; background: rgba(15, 22, 19, 0.45); opacity: 0; transition: opacity 0.2s; }
.feuille-boite {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 0 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.22s ease-out;
}
.feuille.ouverte .feuille-fond { opacity: 1; }
.feuille.ouverte .feuille-boite { transform: none; }
.feuille-tete { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 10px; border-bottom: 1px solid var(--bordure); margin-bottom: 14px; }
.feuille-tete h2 { font-size: 17px; }
@media (min-width: 700px) {
  .feuille-boite { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 94vw); max-height: 88vh; border-radius: 18px; transform: translate(-50%, -46%); opacity: 0; transition: transform 0.2s, opacity 0.2s; }
  .feuille-boite.large { width: min(760px, 94vw); }
  .feuille.ouverte .feuille-boite { transform: translate(-50%, -50%); opacity: 1; }
}
.etat-sync-grand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }

/* ------------------------------------------------------------------ */
/* Bienvenue et verrou                                                 */
/* ------------------------------------------------------------------ */
.ecran-bienvenue { min-height: 100vh; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; }
.bienvenue-intro { text-align: center; margin-bottom: 22px; }
.bienvenue-intro img { border-radius: 22px; box-shadow: 0 8px 26px rgba(13, 92, 74, 0.25); }
.bienvenue-intro h1 { font-size: 26px; margin: 16px 0 8px; }
.bienvenue-intro p { color: var(--encre-douce); }
.bienvenue-choix { display: grid; gap: 10px; }
.carte-choix { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: var(--rayon); border: 1px solid var(--bordure); background: var(--surface); cursor: pointer; box-shadow: var(--ombre); }
.carte-choix b { display: block; font-size: 16px; }
.carte-choix.discret { background: transparent; box-shadow: none; border-style: dashed; }
.choix-icone { font-size: 26px; width: 48px; height: 48px; border-radius: 14px; background: var(--marque-clair); display: grid; place-items: center; flex-shrink: 0; }
.ecran-bienvenue .carte h2 { margin-bottom: 14px; font-size: 19px; }
.verrou { text-align: center; }
.verrou img { border-radius: 16px; margin-bottom: 10px; }
.verrou h1 { margin-bottom: 18px; }
.verrou .actions-form .bouton { max-width: none; }

/* ------------------------------------------------------------------ */
/* Paramètres, guide                                                   */
/* ------------------------------------------------------------------ */
.sous-titre-section { font-size: 13px; color: var(--encre-douce); margin: 14px 0 4px; }
.ligne-parametre { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--bordure); }
.code-foyer { background: var(--marque-clair); border-radius: var(--rayon-petit); padding: 14px; margin: 12px 0; text-align: center; }
.code-foyer span { display: block; font-size: 13px; color: var(--encre-douce); }
.code-foyer b { display: block; font-size: 26px; letter-spacing: 0.1em; margin: 4px 0; color: var(--puce-actif-texte); }
.code-foyer small { display: block; margin-bottom: 10px; }
.code-foyer .groupe-boutons { justify-content: center; }
.zone-sensible { border-color: #f1c4bf; }
.archives summary { cursor: pointer; font-weight: 600; }
.pied-version { text-align: center; color: var(--encre-pale); font-size: 12px; margin: 10px 0; }
.guide h3 { margin: 16px 0 8px; font-size: 15px; }
.guide ul, .guide ol { padding-left: 20px; margin: 0 0 10px; }
.guide li { margin-bottom: 6px; }
.navigation-guide { display: flex; justify-content: space-between; gap: 10px; }
.navigation-guide .bouton svg { width: 18px; height: 18px; }
.badge-devise { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--bordure); }

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

/* Barre du haut sur petit écran : le nom du foyer garde la place. */
@media (max-width: 520px) {
  .marque img { display: none; }
  .marque { font-size: 15px; }
  .pastille-taux, .pastille-sync { padding: 5px 8px; font-size: 12px; gap: 5px; }
  .barre-haut { padding-left: 12px; padding-right: 10px; }
}
@media (max-width: 520px) {
  .taux-prefixe { display: none; }
}
.lien.centre { display: block; margin: 6px auto 0; }

/* ------------------------------------------------------------------ */
/* Icônes Tabler et pastilles teintées                                 */
/* ------------------------------------------------------------------ */
.ti { width: 22px; height: 22px; flex-shrink: 0; }
.icone-cat {
  --c: var(--marque);
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: inline-grid; place-items: center; color: var(--c);
  background: rgba(127, 127, 127, 0.12);
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.icone-cat.neutre { --c: #6f7c76; }
.icone-cat svg { width: 22px; height: 22px; stroke-width: 1.8; }
.icone-cat.grand { width: 48px; height: 48px; border-radius: 15px; }
.icone-cat.grand svg { width: 25px; height: 25px; }
.icone-cat.mini { width: 28px; height: 28px; border-radius: 9px; }
.icone-cat.mini svg { width: 17px; height: 17px; }
.icone-cat.xs { width: 24px; height: 24px; border-radius: 7px; }
.icone-cat.xs svg { width: 15px; height: 15px; }
[data-mode="sombre"] .icone-cat { background: color-mix(in srgb, var(--c) 24%, transparent); color: color-mix(in srgb, var(--c) 70%, white); }
.avec-icone { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.avec-icone > svg { width: 18px; height: 18px; color: var(--encre-douce); }
.etat svg { width: 14px; height: 14px; stroke-width: 2.3; }
.choix-icone svg { width: 26px; height: 26px; color: var(--lien); }
.couronne svg { width: 16px; height: 16px; color: #d28e05; vertical-align: -3px; margin-right: 4px; }
.ti-texte { font-size: 18px; line-height: 1; }
.grille-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.grille-icones .puce { justify-content: center; padding: 9px 0; border-radius: 12px; }
.grille-icones .puce-icone svg { width: 22px; height: 22px; }
.puce .icone-cat.xs { margin-left: -4px; }
.puce.petite { padding: 5px 11px; font-size: 13px; }

/* ------------------------------------------------------------------ */
/* Accueil : salutation, carte premium, actions rapides, raccourcis    */
/* ------------------------------------------------------------------ */
.salutation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.salutation h1 { font-size: 24px; letter-spacing: -0.01em; }
.date-du-jour { margin: 0 0 2px; color: var(--encre-douce); font-size: 13.5px; }
.date-du-jour::first-letter { text-transform: uppercase; }
.salutation .bouton-icone svg { width: 21px; height: 21px; }

.carte-tresorerie {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 140% at 100% 0%, #18a07f 0%, rgba(24, 160, 127, 0) 55%), linear-gradient(155deg, #0e6b56 0%, #0a4d3e 60%, #073a2f 100%);
  box-shadow: 0 12px 30px -12px rgba(7, 58, 47, 0.55);
}
/* Motif discret inspiré des tissus en raphia Kuba (losanges imbriqués). */
.carte-tresorerie::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.09; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2.4'%3E%3Cpath d='M28 3 53 28 28 53 3 28Z'/%3E%3Cpath d='M28 15 41 28 28 41 15 28Z'/%3E%3Cpath d='M0 0 6 6M56 0 50 6M0 56 6 50M56 56 50 50'/%3E%3C/g%3E%3Crect x='25' y='25' width='6' height='6' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(110deg, transparent 15%, #000 85%);
  mask-image: linear-gradient(110deg, transparent 15%, #000 85%);
}
.carte-tresorerie::after {
  content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; right: -90px; bottom: -130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 166, 0, 0.28), rgba(242, 166, 0, 0));
}
.total-consolide small { display: block; font-size: 12px; }

.actions-rapides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 16px; }
.actions-rapides button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--encre); border-radius: 14px; }
.actions-rapides button:active .icone-cat { transform: scale(0.94); }
.actions-rapides .icone-cat { transition: transform 0.12s; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent); }

.titre-section { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 2px 10px; }
.titre-section svg { width: 18px; height: 18px; color: var(--accent); }
.titre-section small { font-weight: 400; }
.raccourcis { margin-bottom: 14px; }
.defilement { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.defilement::-webkit-scrollbar { display: none; }
.raccourci {
  flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: 10px; max-width: 220px;
  padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--bordure); background: var(--surface);
  box-shadow: var(--ombre); cursor: pointer; text-align: left;
}
.raccourci span { display: flex; flex-direction: column; min-width: 0; }
.raccourci b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raccourci small { font-weight: 650; color: var(--encre); }

.prevision { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px 12px; margin-bottom: 14px; }
.prevision svg { width: 20px; height: 20px; color: var(--lien); margin-top: 1px; }
.prevision p { margin: 0; font-size: 13.5px; color: var(--encre-douce); }
.prevision b { color: var(--encre); }

/* Saisie : équivalent dans l'autre devise et montants rapides */
.equivalent { margin: 7px 2px 0; font-size: 13px; color: var(--encre-douce); min-height: 18px; }
.montants-rapides { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Annonce avec bouton Annuler */
.annonce.avec-action { pointer-events: auto; }
.annonce button { background: none; border: 0; color: #8fe6cb; font-weight: 700; cursor: pointer; padding: 4px 2px; white-space: nowrap; }

/* Mode discret : montants floutés (à toucher l'œil pour les afficher) */
.discret .montant, .discret .montant-grand, .discret .total-consolide b, .discret .kpi b, .discret .kpi small,
.discret .grille-mois b, .discret .bandeau-totaux b, .discret .legende-parts .valeur, .discret .objectif-montant,
.discret .objectif-chiffres b, .discret .grille-indicateurs b, .discret .grille-indicateurs small, .discret .resultat-projet b,
.discret .resultat-projet small, .discret .liste-simple b, .discret .ligne-budget-pied, .discret .tableau td.nombre,
.discret .prevision b, .discret .raccourci small, .discret canvas, .discret .objectif-pied b {
  filter: blur(7px); transition: filter 0.2s;
}

/* Feuille : poignée visuelle sur téléphone */
@media (max-width: 699px) {
  .feuille-boite::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--bordure-champ); margin: 8px auto 0; }
}

/* Sombre : quelques surfaces fixes */
[data-mode="sombre"] .statut { background: var(--surface-2); border-color: var(--bordure); }
[data-mode="sombre"] .statut-preparation { color: #8fc0f5; }
[data-mode="sombre"] .statut-en_cours { color: #f3c46a; }
[data-mode="sombre"] .statut-rentable { color: var(--positif); }
[data-mode="sombre"] .statut-termine { color: var(--encre-douce); }
[data-mode="sombre"] .carte-tresorerie { box-shadow: none; }
[data-mode="sombre"] .feuille-fond { background: rgba(0, 0, 0, 0.6); }

/* ------------------------------------------------------------------ */
/* Transitions entre écrans                                            */
/* ------------------------------------------------------------------ */
::view-transition-old(vue) { animation: vue-sortie 0.16s ease-in both; }
::view-transition-new(vue) { animation: vue-entree 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes vue-sortie { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vue-entree { from { opacity: 0; transform: translateY(8px); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

/* ------------------------------------------------------------------ */
/* Mises en page qui suivent la largeur du contenu                     */
/* ------------------------------------------------------------------ */
.vue > *, .tableau-de-bord > *, .accueil-tete > *, .rangee-actions > * { min-width: 0; }
.tete-ecran { flex-wrap: wrap; }
.tete-ecran > div:first-child { min-width: min(100%, 260px); flex: 1; }
.tete-actions { flex-wrap: wrap; justify-content: flex-end; }
.accueil-tete { display: grid; gap: 0 16px; }
.rangee-actions { display: grid; gap: 0 18px; }
.tableau-de-bord .carte { break-inside: avoid; }
.grille-budgets, .grille-parametres { display: block; }
@container vue (min-width: 760px) {
  .accueil-tete { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; }
  .accueil-tete > .carte { margin-bottom: 16px; }
  .rangee-actions { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: center; margin-bottom: 6px; }
  .rangee-actions .actions-rapides { margin: 0 0 14px; }
  .grille-kpi.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container vue (min-width: 860px) {
  .tableau-de-bord { columns: 2; column-gap: 16px; }
  .tableau-de-bord .carte { display: inline-block; width: 100%; }
  .grille-budgets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0 16px; align-items: start; }
  .grille-parametres { columns: 2; column-gap: 16px; }
  .grille-parametres > .carte { display: inline-block; width: 100%; break-inside: avoid; }
  .grille-sans-budget { columns: 2; column-gap: 28px; }
  .grille-sans-budget li { break-inside: avoid; }
}
.grille-kpi.quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille-kpi.quatre > :first-child:nth-last-child(3) { grid-column: auto; }
.kpi { position: relative; }
.kpi > .icone-cat { position: absolute; top: 11px; right: 11px; }
.kpi .libelle { padding-right: 30px; }
.kpi.accent { background: linear-gradient(160deg, var(--marque-clair), var(--surface)); border-color: color-mix(in srgb, var(--marque) 30%, var(--bordure)); }
.tableau-defilant { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.tableau-defilant .tableau { min-width: 420px; }
.repartition > * { min-width: 0; }
.bouton-adaptable { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.bouton-icone.petit { width: 32px; height: 32px; }
.bouton-icone.petit svg { width: 17px; height: 17px; }
.carte-tete h2 { display: inline-flex; align-items: center; gap: 8px; }
.carte-tete h2 > svg { width: 19px; height: 19px; color: var(--lien); }
.carte-tete h2.avec-icone > svg { color: inherit; }

@media (max-width: 520px) {
  .tete-ecran h1 { font-size: 21px; }
  .grille-kpi.quatre > :first-child:nth-last-child(3) { grid-column: auto; }
}

/* ------------------------------------------------------------------ */
/* Santé financière                                                    */
/* ------------------------------------------------------------------ */
.carte-sante { display: flex; flex-direction: column; position: relative; overflow: hidden; }
.carte-sante::after { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--niveau, #13a17f) 22%, transparent), transparent 70%); pointer-events: none; }
.carte-sante .carte-tete h2 svg { color: var(--niveau, var(--lien)); }
.sante-corps { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; flex: 1; }
.sante-jauge { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sante-niveau { font-weight: 750; font-size: 14px; color: var(--niveau); }
.jauge .jauge-score { font: 800 30px/1 var(--police); fill: var(--encre); letter-spacing: -0.02em; }
.jauge .jauge-sur { font: 600 11px/1 var(--police); fill: var(--encre-pale); }
.jauge-valeur { animation: jauge-remplir 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--niveau, #13a17f) 35%, transparent)); }
@keyframes jauge-remplir { from { stroke-dasharray: 0 400; } }
.sante-volets { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.sante-volets li > div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sante-volets span { font-size: 13px; font-weight: 650; }
.sante-volets small { font-size: 11.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sante-volets .barre { height: 6px; margin: 3px 0 0; }
.sante-trajectoire { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--rayon-petit); background: var(--surface-2); color: var(--encre); text-decoration: none; font-size: 14px; }
.sante-trajectoire > svg:first-child { color: var(--lien); }
.sante-trajectoire span { flex: 1; }
.sante-trajectoire > svg:last-child { width: 18px; height: 18px; color: var(--encre-pale); }
.sante-trajectoire:hover { background: var(--surface-3); }
.sante-detail-tete { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.sante-detail-tete b { font-size: 20px; color: var(--niveau); }
.sante-explications b small { font-weight: 600; margin-left: 6px; }
.conseil { display: flex; gap: 10px; background: var(--attention-fond); color: var(--attention-texte); border-radius: var(--rayon-petit); padding: 12px; margin-top: 12px; }
.conseil p { margin: 0; font-size: 14px; }
.conseil svg { flex-shrink: 0; }
@media (max-width: 400px) {
  .sante-corps { grid-template-columns: 1fr; justify-items: center; }
  .sante-volets { width: 100%; }
}

/* Jauge du mois : dépensé et projection rapportés au revenu */
.jauge-mois { margin: 2px 0 14px; }
.jauge-mois-tete { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--encre-douce); margin-bottom: 6px; }
.jauge-mois-tete b { color: var(--encre); }
.jauge-mois-piste { position: relative; height: 12px; border-radius: 99px; background: var(--piste); overflow: hidden; }
.jauge-mois-piste span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.jauge-mois-piste .projete { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, transparent) 0 5px, transparent 5px 9px); z-index: 1; }
.jauge-mois-piste .reel { background: linear-gradient(90deg, #13a17f, #0d5c4a); z-index: 2; }
.jauge-mois-piste .reel.depasse { background: linear-gradient(90deg, #f47230, #dc3c3d); }
.jauge-mois small { display: block; margin-top: 5px; font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Alertes et rappels                                                  */
/* ------------------------------------------------------------------ */
.liste-alertes { list-style: none; margin: 0; padding: 0; }
.liste-alertes.carte { padding: 2px 14px; }
.liste-alertes .alerte { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--bordure); position: relative; }
.liste-alertes .alerte:last-child { border-bottom: 0; }
.alerte-texte { display: flex; flex-direction: column; min-width: 0; }
.alerte-texte a { color: inherit; text-decoration: none; }
.alerte-texte b { font-weight: 650; line-height: 1.3; }
.alerte-texte small { margin-top: 2px; }
.alerte-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.alerte.niveau-critique .alerte-texte b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--negatif); margin-right: 7px; vertical-align: 2px; }
.liste-alertes.compacte .alerte { grid-template-columns: auto minmax(0, 1fr); padding: 9px 0; }
.liste-alertes.compacte .alerte-actions { grid-column: 2; justify-content: flex-start; }
.liste-alertes.compacte .alerte-actions:empty { display: none; }
@container vue (min-width: 560px) {
  .liste-alertes.compacte .alerte { grid-template-columns: auto minmax(0, 1fr) auto; }
  .liste-alertes.compacte .alerte-actions { grid-column: auto; }
}
@media (max-width: 480px) {
  .liste-alertes .alerte { grid-template-columns: auto minmax(0, 1fr); }
  .liste-alertes .alerte-actions { grid-column: 2; justify-content: flex-start; }
}
.titre-groupe { font-size: 13px; color: var(--encre-douce); margin: 16px 4px 8px; display: flex; align-items: center; gap: 8px; }
.titre-groupe small { background: var(--surface-3); border-radius: 99px; padding: 1px 8px; font-weight: 700; }
.titre-groupe.niveau-critique { color: var(--negatif); }
.titre-groupe.niveau-attention { color: var(--attention-texte); }
.tout-va-bien { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.tout-va-bien b { display: block; }
.etat-vide-illustre { text-align: center; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.etat-vide-illustre h2 { font-size: 18px; }
.etat-vide-illustre .aide { max-width: 440px; }
.banniere-notif { align-items: center; }
.banniere-notif > svg { color: var(--info); }
.banniere-notif span { flex: 1; min-width: 180px; }

.liste-rappels { list-style: none; margin: 0; padding: 2px 14px; }
.ligne-rappel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border-bottom: 1px solid var(--bordure); }
.ligne-rappel:last-child { border-bottom: 0; }
.ligne-rappel-corps { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; width: 100%; }
.ligne-rappel.en-retard small { color: var(--negatif); font-weight: 600; }
.ligne-rappel.fait { opacity: 0.6; }
.coche { color: var(--positif); }
.coche:hover { background: var(--bon-fond); border-color: var(--positif); }

/* ------------------------------------------------------------------ */
/* Budgets en pourcentage                                              */
/* ------------------------------------------------------------------ */
.etiquette-pct { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--marque-clair); color: var(--puce-actif-texte); margin-left: 4px; white-space: nowrap; }
.ligne-budget-tete .avec-icone { flex-wrap: wrap; }
.plan-reference { background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px 12px; margin-bottom: 14px; }
.plan-reference b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -0.01em; }
.plan-reference small { display: block; }
.plan-barres { display: grid; gap: 10px; margin-bottom: 14px; }
.plan-ligne { display: grid; grid-template-columns: 46px minmax(0, 1fr) 48px; gap: 10px; align-items: center; }
.plan-libelle { font-size: 12.5px; font-weight: 650; color: var(--encre-douce); }
.plan-ligne b { text-align: right; font-size: 14px; }
.plan-piste { display: flex; height: 18px; border-radius: 6px; background: var(--piste); overflow: hidden; }
.plan-piste span { display: block; height: 100%; background: var(--c); box-shadow: inset -2px 0 0 var(--surface); flex-shrink: 0; transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.plan-piste .hors-budget { background: repeating-linear-gradient(135deg, #9aa29e 0 4px, #c4cac6 4px 8px); }
.plan-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan-chiffres span { display: block; font-size: 12px; color: var(--encre-douce); }
.plan-chiffres b { font-size: 16px; }
.repartition-proposee { display: grid; gap: 4px; margin: 6px 0 10px; }
.ligne-proposition { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--bordure); cursor: pointer; }
.ligne-proposition .bascule { padding: 0; }
.avec-suffixe.petit input { min-height: 38px; text-align: right; padding: 6px 8px; }

/* ------------------------------------------------------------------ */
/* Paramètres                                                          */
/* ------------------------------------------------------------------ */
.sommaire-parametres { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: none; }
.sommaire-parametres::-webkit-scrollbar { display: none; }
.sommaire-parametres .puce { flex-shrink: 0; text-decoration: none; color: var(--encre); }
.sommaire-parametres .puce svg { width: 16px; height: 16px; color: var(--encre-douce); }
.choix-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.choix-theme { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px; border-radius: var(--rayon); border: 1px solid var(--bordure); background: var(--surface); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.choix-theme:hover { border-color: var(--bordure-champ); }
.choix-theme.actif { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); }
.choix-theme .avec-icone { gap: 6px; }
.choix-theme .avec-icone svg { width: 16px; height: 16px; }
.choix-theme small { font-size: 11.5px; line-height: 1.3; }
.apercu-theme { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 52px; padding: 6px; border-radius: 9px; background: #f3f4ef; border: 1px solid #e2e6e0; }
.apercu-theme i { border-radius: 4px; background: #fff; }
.apercu-theme i:first-child { grid-row: span 2; background: #0d5c4a; }
.theme-sombre .apercu-theme { background: #0e1412; border-color: #26322d; }
.theme-sombre .apercu-theme i { background: #1d2723; }
.theme-sombre .apercu-theme i:first-child { background: #138a6e; }
.theme-auto .apercu-theme { background: linear-gradient(135deg, #f3f4ef 50%, #0e1412 50%); }
.theme-auto .apercu-theme i { background: linear-gradient(135deg, #fff 50%, #1d2723 50%); }
.theme-auto .apercu-theme i:first-child { background: linear-gradient(135deg, #0d5c4a 50%, #138a6e 50%); }
@media (max-width: 380px) {
  .choix-theme small { display: none; }
}
.ligne-parametre span small { font-weight: 400; }
.ligne-parametre.premiere { border-top: 0; padding-top: 0; margin-bottom: 12px; }
.grille-exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.export-pdf { display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 12px; border-radius: var(--rayon-petit); border: 1px solid var(--bordure); background: var(--surface); cursor: pointer; color: inherit; }
.export-pdf:hover { border-color: #f1b9b4; background: var(--surface-2); }
.export-pdf > svg { color: #c2362f; width: 26px; height: 26px; }
.export-pdf b { display: block; font-size: 14px; }
.export-pdf small { display: block; font-size: 12px; }
.guide-raccourci { padding: 4px 16px; }
.guide-raccourci .ligne-menu { margin: 0; padding: 10px 0; color: inherit; text-decoration: none; }

/* ------------------------------------------------------------------ */
/* Recherche universelle                                               */
/* ------------------------------------------------------------------ */
.palette { display: flex; flex-direction: column; gap: 10px; }
.recherche.grande { padding: 0 14px; border-radius: 14px; border-width: 2px; border-color: var(--marque); }
.recherche.grande input { font-size: 17px; min-height: 50px; }
.palette-resultats { max-height: min(56vh, 460px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.palette-groupe { font-size: 11.5px; font-weight: 700; color: var(--encre-pale); margin: 10px 6px 4px; }
.palette-resultat { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; }
.palette-resultat > svg { width: 16px; height: 16px; color: var(--encre-pale); opacity: 0; }
.palette-resultat.actif, .palette-resultat:hover { background: var(--marque-clair); }
.palette-resultat.actif > svg, .palette-resultat:hover > svg { opacity: 1; }
.palette-aide { font-size: 12px; color: var(--encre-pale); margin: 0; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
@media (max-width: 699px) { .palette-aide { display: none; } }

/* Attente (préparation d'un PDF) */
.annonce.attente { gap: 10px; justify-content: flex-start; }
.rouet { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: tourner 0.8s linear infinite; flex-shrink: 0; }
@keyframes tourner { to { transform: rotate(360deg); } }

/* Mode discret : nouveaux montants floutés */
.discret .sante-trajectoire b, .discret .plan-reference b, .discret .jauge-mois small, .discret .alerte-texte small, .discret .kpi.accent small {
  filter: blur(7px); transition: filter 0.2s;
}

/* Barre du haut : réglages par taille d'écran */
.barre-etats { gap: 6px; }
@media (max-width: 639px) {
  .pastille-sync { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .pastille-sync .point { width: 10px; height: 10px; }
  .marque { min-width: 0; flex: 1; }
}
@media (max-width: 360px) {
  .bouton-barre { width: 34px; height: 34px; }
  .pastille-sync { width: 34px; height: 34px; }
  .barre-etats { gap: 4px; }
}

/* ------------------------------------------------------------------ */
/* Connexion et comptes                                                */
/* ------------------------------------------------------------------ */
.tete-formulaire { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.tete-formulaire h2 { margin: 0 0 4px; }
.tete-formulaire .aide { margin: 0; }
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 46px; width: 100%; }
.champ-mdp .bouton-icone { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; }
.groupe-compte { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 12px 14px 4px; margin: 4px 0 12px; background: var(--surface-2); }
.groupe-compte legend { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 0 6px; }
.groupe-compte legend svg { width: 18px; height: 18px; color: var(--lien); }
.carte-choix.principal { border-color: var(--marque); background: linear-gradient(160deg, var(--marque-clair), var(--surface)); }
.carte-choix.principal .choix-icone { background: var(--marque); color: #fff; }
.lien-plateforme { display: inline-flex; align-items: center; gap: 6px; margin: 22px auto 0; color: var(--encre-pale); font-size: 13px; text-decoration: none; }
.lien-plateforme svg { width: 16px; height: 16px; }
.lien-plateforme:hover { color: var(--encre); }
.ecran-bienvenue { display: flex; flex-direction: column; }
.rouet.sombre { border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; display: inline-block; vertical-align: -3px; margin-right: 8px; }
.carte-identite { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.carte-identite b { display: block; font-size: 16px; }
.liste-simple li.retire { opacity: 0.55; }
.groupe-boutons.serre { gap: 6px; flex-wrap: nowrap; }
.pied-version a { color: var(--encre-pale); margin-left: 8px; }

/* Consultation d'un foyer par l'administrateur de la plateforme (lecture seule) */
.banniere-consultation { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--rayon); background: linear-gradient(135deg, #3b2a6e, #6a4ce2); color: #fff; }
.banniere-consultation span { flex: 1; }
.banniere-consultation .bouton { background: #fff; color: #3b2a6e; }
.consultation .bouton-ajouter, .consultation .actions-rapides, .consultation .raccourcis,
.consultation [data-action^="nouve"], .consultation [data-action="modifier-foyer"], .consultation [data-action="proposer-repartition"],
.consultation #param-sync, .consultation #param-securite, .consultation #param-alertes, .consultation .zone-sensible,
.consultation #param-sauvegarde .groupe-boutons, .consultation #param-sauvegarde > .aide, .consultation .banniere-notif,
.consultation .alerte-actions, .consultation .coche, .consultation .pastille-taux { display: none !important; }

/* ------------------------------------------------------------------ */
/* Console de la plateforme                                            */
/* ------------------------------------------------------------------ */
.console { min-height: 100vh; }
.console-tete { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--barre-fond); border-bottom: 1px solid var(--bordure); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.marque-console { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.marque-console img { border-radius: 9px; }
.marque-console span { display: flex; flex-direction: column; min-width: 0; }
.marque-console small { color: var(--encre-douce); font-size: 12.5px; }
.console-corps { padding: 20px 18px 60px; }
.chargement-console { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 60px 0; color: var(--encre-douce); }
.titre-foyers { margin: 8px 2px 12px; flex-wrap: wrap; gap: 10px; }
.recherche.compacte { max-width: 280px; flex: 1; min-width: 180px; }
.recherche.compacte input { min-height: 38px; }
.grille-foyers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.carte-foyer { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.carte-foyer.suspendu { opacity: 0.75; border-style: dashed; }
.carte-foyer-tete { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.carte-foyer-tete b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-foyer-tete small { display: block; font-size: 12px; }
.etat-foyer { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.etat-foyer.actif { background: var(--bon-fond); color: var(--positif); }
.etat-foyer.calme { background: var(--surface-3); color: var(--encre-douce); }
.etat-foyer.suspendu { background: var(--critique-fond); color: var(--negatif); }
.carte-foyer-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px 12px; }
.carte-foyer-chiffres span { display: block; font-size: 12px; color: var(--encre-douce); }
.carte-foyer-chiffres b { font-size: 16px; }
.carte-foyer-pied { margin: 0; font-size: 12.5px; color: var(--encre-douce); }
.centre { text-align: center; }
@media (max-width: 520px) {
  .console-tete .bouton span { display: none; }
  .marque-console small { display: none; }
}
.bouton { max-width: 100%; }
.groupe-boutons .bouton { white-space: normal; text-align: center; line-height: 1.25; }
svg.jauge { width: 112px; height: 112px; stroke: none; overflow: visible; }
.sante-detail-tete svg.jauge { width: 128px; height: 128px; }
svg.jauge text { stroke: none; }
.marque, .marque:hover { text-decoration: none; color: var(--encre); }
.marque span { font-weight: 750; }
.bas-lien { flex: 1 1 auto; padding: 0 3px; }
.raccourcis .defilement { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }

/* Téléphone : volet latéral avec tous les modules, ouvert par « Menu » ou l'icône en haut à gauche. */
.bouton-menu, .fermer-menu { display: none; }
.voile-menu { position: fixed; inset: 0; z-index: 39; background: rgba(8, 18, 14, 0.45); animation: voile-entree 0.2s ease both; }
@keyframes voile-entree { from { opacity: 0; } }
@media (max-width: 639px) {
  .bouton-menu { display: inline-grid; border: 0; background: none; width: 36px; margin-left: -6px; }
  .bas-lien { flex: 1 1 0; }
  .navigation {
    display: flex; flex-direction: column; gap: 1px; position: fixed; z-index: 40; top: 0; bottom: 0; left: 0;
    width: min(84vw, 310px); padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto;
    background: var(--surface); box-shadow: 8px 0 40px rgba(0, 0, 0, 0.22);
    transform: translateX(-104%); visibility: hidden; transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.26s;
  }
  .menu-ouvert .navigation { transform: none; visibility: visible; transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .fermer-menu { display: inline-grid; position: absolute; top: 12px; right: 10px; }
  .nav-marque { display: flex; align-items: center; gap: 11px; padding: 2px 44px 14px 8px; text-decoration: none; color: inherit; }
  .nav-marque img { border-radius: 10px; }
  .nav-marque > span { display: flex; flex-direction: column; min-width: 0; }
  .nav-marque small { color: var(--encre-douce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-recherche { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 12px; margin: 0 0 8px; border-radius: 12px; border: 1px solid var(--bordure); background: var(--surface-2); color: var(--encre-douce); font-size: 15px; }
  .nav-recherche svg { width: 18px; height: 18px; }
  .nav-recherche kbd { display: none; }
  .nav-groupe { margin: 14px 10px 6px; font-size: 12px; font-weight: 700; color: var(--encre-pale); }
  .nav-lien { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 12px; color: var(--encre); text-decoration: none; font-size: 15.5px; font-weight: 600; border: 0; background: none; width: 100%; text-align: left; }
  .nav-lien svg { width: 22px; height: 22px; color: var(--encre-douce); }
  .nav-lien.actif { background: var(--marque-clair); color: var(--puce-actif-texte); }
  .nav-lien.actif svg { color: currentColor; }
  .nav-lien .badge { position: static; margin-left: auto; box-shadow: none; }
  .nav-pied { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--bordure); }
  .bas-lien .badge { top: 6px; right: calc(50% - 20px); }
}

button.bas-lien { border: 0; background: none; cursor: pointer; font-family: inherit; }
.grille-deux { display: grid; gap: 0 16px; }
@container vue (min-width: 760px) {
  .grille-kpi.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grille-deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* ------------------------------------------------------------------ */
/* Conseiller                                                          */
/* ------------------------------------------------------------------ */
.liste-alertes .alerte.multi { grid-template-columns: auto minmax(0, 1fr); }
.liste-alertes .alerte.multi .alerte-actions { grid-column: 2; justify-content: flex-start; }
details.pourquoi { margin-top: 6px; font-size: 13px; }
details.pourquoi summary { cursor: pointer; color: var(--lien); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
details.pourquoi summary::-webkit-details-marker { display: none; }
details.pourquoi summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.15s; }
details.pourquoi[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
details.pourquoi ul { margin: 6px 0 0; padding-left: 18px; color: var(--encre-douce); }
details.pourquoi li { margin: 2px 0; }

.invitation-profil { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; background: linear-gradient(135deg, var(--marque-clair), var(--surface)); }
.invitation-profil h2 { font-size: 16px; margin-bottom: 4px; }
.invitation-profil .aide { margin: 0; }
.invitation-profil .bouton { grid-column: 1 / -1; justify-self: start; }
@container vue (min-width: 640px) {
  .invitation-profil { grid-template-columns: auto minmax(0, 1fr) auto; }
  .invitation-profil .bouton { grid-column: auto; }
}

.grille-conseil { display: grid; gap: 0 16px; }
@container vue (min-width: 760px) { .grille-conseil { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }
.carte-par-jour { background: linear-gradient(160deg, #0d5c4a 0%, #0b4c3e 100%); color: #fff; border: 0; position: relative; overflow: hidden; }
.carte-par-jour::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 26px solid rgba(255, 255, 255, 0.06); pointer-events: none; }
.carte-par-jour .libelle { color: rgba(255, 255, 255, 0.8); }
.carte-par-jour p { color: rgba(255, 255, 255, 0.85); margin: 6px 0 0; font-size: 14px; }
.carte-par-jour.tendu { background: linear-gradient(160deg, #8a3a17 0%, #6e2d12 100%); }
.montant-heros { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.montant-heros small { font-size: 15px; font-weight: 600; opacity: 0.8; letter-spacing: 0; }
.ligne-alerte { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 600; margin-top: 10px !important; }
.ligne-alerte svg { flex: none; width: 18px; height: 18px; }
.carte:not(.carte-par-jour) .ligne-alerte { color: var(--attention-texte); }

.decompte { list-style: none; margin: 0; padding: 0; }
.decompte li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--bordure); }
.decompte li > span { min-width: 0; }
.decompte li small { display: block; color: var(--encre-douce); font-size: 12.5px; margin-top: 1px; }
.decompte li b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.decompte li.total { border-bottom: 0; border-top: 2px solid var(--encre); margin-top: 2px; font-weight: 700; }
.decompte li.total b { font-size: 18px; }
.decompte.compact li { padding: 6px 0; font-size: 14px; }
.decompte.compact li.total b { font-size: 16px; }
.liste-par-jour b small { font-weight: 500; color: var(--encre-douce); font-size: 12px; }

.grille-prevision { display: grid; gap: 0 14px; }
@container vue (min-width: 720px) { .grille-prevision { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.mois-prevision { border-top: 4px solid var(--positif); }
.mois-prevision.negatif { border-top-color: var(--negatif); }
.mp-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.mp-tete b { font-size: 16px; }
.mp-charges { margin-top: 8px; font-size: 13.5px; }
.mp-charges summary { cursor: pointer; color: var(--lien); font-weight: 600; }
.liste-mini { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13.5px; }
.liste-mini li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--bordure); }
.liste-mini li:last-child { border-bottom: 0; }
.liste-mini li > span { min-width: 0; }
.liste-mini li b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste-mini .bloc { display: block; color: var(--encre-douce); font-size: 12px; }
.etiquette { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--encre-douce); font-style: normal; white-space: nowrap; }
.etiquette.hausse { background: var(--critique-fond); color: var(--negatif); }
.etiquette.baisse { background: var(--bon-fond); color: var(--positif); }

.carte-propositions { border-left: 4px solid #6a4ce2; }
.proposition { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.proposition:last-child { border-bottom: 0; }
.proposition p { margin: 4px 0 8px; color: var(--encre-douce); font-size: 14px; }
.banniere.critique { border-left-color: var(--negatif); background: var(--critique-fond); justify-content: flex-start; }
.banniere.attention { border-left-color: var(--accent); background: var(--attention-fond); justify-content: flex-start; flex-wrap: nowrap; align-items: flex-start; }
.banniere.critique svg, .banniere.attention svg { flex: none; width: 20px; height: 20px; }

.calendrier-financier .nav-mois { display: flex; align-items: center; gap: 6px; }
.calendrier-financier .nav-mois b { min-width: 118px; text-align: center; font-size: 14.5px; }
.grille-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.grille-cal .jsem { text-align: center; font-size: 11.5px; color: var(--encre-pale); padding-bottom: 2px; }
.jour-cal { position: relative; aspect-ratio: 1 / 0.86; min-height: 36px; border: 0; border-radius: 9px; background: var(--surface-2); color: var(--encre); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.jour-cal.vide { background: none; cursor: default; }
.jour-cal.passe { color: var(--encre-pale); background: none; }
.jour-cal.niveau-vert { background: color-mix(in srgb, var(--positif) 14%, var(--surface)); }
.jour-cal.niveau-orange { background: color-mix(in srgb, #f2a600 26%, var(--surface)); }
.jour-cal.niveau-rouge { background: color-mix(in srgb, var(--negatif) 22%, var(--surface)); color: var(--negatif); }
.jour-cal.aujourdhui { box-shadow: inset 0 0 0 2px var(--marque); }
.jour-cal.choisi { box-shadow: inset 0 0 0 2px var(--encre); }
.jour-cal .points { display: flex; gap: 2px; height: 5px; }
.jour-cal .points em, .evenements em, .legende-cal em { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.pt-charge { background: #f47230; }
.pt-paie, .pt-rentree { background: #257de0; }
.pt-rappel { background: #6a4ce2; }
.pt-objectif { background: #008a17; }
.legende-cal { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--encre-douce); margin: 10px 0 4px; }
.legende-cal em { width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legende-cal .niveau-vert { background: color-mix(in srgb, var(--positif) 30%, var(--surface)); }
.legende-cal .niveau-orange { background: color-mix(in srgb, #f2a600 45%, var(--surface)); }
.legende-cal .niveau-rouge { background: color-mix(in srgb, var(--negatif) 40%, var(--surface)); }
.titre-evenements { font-size: 14px; margin: 12px 0 0; display: flex; align-items: center; gap: 10px; }
.titre-evenements .lien { border: 0; background: none; color: var(--lien); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.evenements li > span { display: block; }
.evenements em { margin-right: 7px; vertical-align: 2px; width: 7px; height: 7px; }

.barre-repartition { display: flex; gap: 2px; height: 22px; border-radius: 8px; overflow: hidden; margin: 6px 0 12px; }
.barre-repartition span { background: var(--c); min-width: 4px; }
.legende-repartition { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13.5px; }
.legende-repartition li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 8px; align-items: baseline; }
.legende-repartition em { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legende-repartition small { grid-column: 2 / -1; color: var(--encre-douce); font-size: 12px; }
.ligne-epargne { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; background: var(--bon-fond); border-radius: var(--rayon-petit); padding: 10px 12px; }
.ligne-epargne small { display: block; color: var(--encre-douce); font-size: 12.5px; margin-top: 2px; }
.pastille-nature { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 8px; }
.lignes-repartition b { text-align: right; white-space: nowrap; }
.lignes-repartition b .bloc { font-weight: 500; color: var(--encre-douce); font-size: 12px; }

.carte-profil { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.carte-profil h2 { font-size: 17px; margin-bottom: 4px; }
.anneau-profil { width: 84px; height: 84px; }
.anneau-profil circle { fill: none; stroke-width: 8; }
.anneau-profil .piste { stroke: var(--piste); }
.anneau-profil .valeur { stroke: var(--marque); stroke-linecap: round; transition: stroke-dasharray 0.4s; }
.anneau-profil text { font-size: 15px; font-weight: 800; fill: var(--encre); }
svg.anneau-profil { width: 84px; height: 84px; }
.grille-etapes { display: grid; gap: 0 14px; }
@container vue (min-width: 720px) { .grille-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.etape-profil h2 { font-size: 15px; }
.etape-profil .bouton { margin-top: 10px; }

.questionnaire .q-progression { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.q-etapes { display: flex; gap: 5px; flex: 1; }
.q-etapes button { flex: 1; height: 6px; border-radius: 99px; border: 0; padding: 0; background: var(--piste); cursor: pointer; }
.q-etapes button.faite { background: color-mix(in srgb, var(--marque) 55%, var(--piste)); }
.q-etapes button.actuelle { background: var(--marque); }
.revue .q-progression { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.q-tete { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 16px; }
.q-tete h3 { font-size: 18px; margin: 0 0 2px; }
.q-tete .aide { margin: 0; }
.question { border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: 12px; }
.question > label { font-weight: 650; }
.question .ligne-montant { display: flex; align-items: center; gap: 10px; }
.question .ligne-montant input { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; }
.question .bascule { margin-top: 8px; }
.question.inconnue .q-saisie { opacity: 0.4; pointer-events: none; }
.q-jour { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13.5px; color: var(--encre-douce); }
.q-jour input { width: 84px; }
.champ-court { max-width: 160px; }
.trois-colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-champ { display: flex; flex-direction: column; gap: 4px; font-weight: 400; }
.mini-champ small { color: var(--encre-douce); font-size: 12px; }
.q-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: var(--surface); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin-bottom: calc(-18px - env(safe-area-inset-bottom)); }
.groupe-propositions { border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: 6px 12px 10px; margin: 0 0 12px; }
.groupe-propositions legend { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 0 6px; font-size: 14px; }
.groupe-propositions legend svg { width: 17px; height: 17px; color: var(--marque); }
.groupe-propositions .bascule { padding: 8px 0; border-bottom: 1px solid var(--bordure); }
.groupe-propositions .bascule:last-child { border-bottom: 0; }
.revue h3 { font-size: 17px; margin: 0 0 4px; }

.controle-saisie { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; border-radius: var(--rayon-petit); padding: 12px; margin: 4px 0 12px; font-size: 14px; background: var(--attention-fond); color: var(--encre); border-left: 4px solid var(--accent); }
.controle-saisie.niveau-risque { background: var(--critique-fond); border-left-color: var(--negatif); }
.controle-saisie .cs-icone svg { width: 22px; height: 22px; color: var(--attention-texte); }
.controle-saisie.niveau-risque .cs-icone svg { color: var(--negatif); }
.controle-saisie p { margin: 3px 0 0; }
.controle-saisie .cs-change { display: flex; gap: 6px; align-items: flex-start; color: var(--encre-douce); }
.controle-saisie .cs-change svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.controle-saisie.secoue { animation: secoue 0.42s ease; }
@keyframes secoue { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .controle-saisie.secoue { animation: none; } }

.carte-conseil-accueil .montant-heros { font-size: 28px; color: var(--marque); }
.carte-conseil-accueil.tendu .montant-heros { color: var(--negatif); }
.carte-conseil-accueil > small { display: block; color: var(--encre-douce); }
.carte-conseil-accueil .carte-tete h2 svg { color: var(--marque); }
.conseil-vedette { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; padding: 9px 11px; border-radius: var(--rayon-petit); background: var(--surface-2); font-size: 13.5px; font-weight: 600; }
.conseil-vedette svg { flex: none; width: 18px; height: 18px; color: var(--marque); }
.conseil-vedette.niveau-critique { background: var(--critique-fond); }
.conseil-vedette.niveau-critique svg { color: var(--negatif); }
.conseil-vedette.niveau-attention { background: var(--attention-fond); }
.conseil-vedette.niveau-attention svg { color: var(--attention-texte); }

.encadre-option { background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px 12px 2px; margin-bottom: 14px; }
.encadre-verrou { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; background: color-mix(in srgb, #6a4ce2 10%, var(--surface)); border-radius: var(--rayon-petit); padding: 12px; margin: 12px 0; }
.encadre-verrou > svg { width: 22px; height: 22px; color: #6a4ce2; }
.encadre-verrou small { display: block; color: var(--encre-douce); margin: 2px 0 8px; }
.encadre-verrou p { margin: 0 0 8px; font-size: 13.5px; }
.encadre-verrou.libere { background: var(--bon-fond); }
.encadre-verrou.libere > svg { color: var(--positif); }
.cadenas { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: #6a4ce2; }
.cadenas svg { width: 15px; height: 15px; }

/* Aperçu des PDF : rendu papier, toujours clair, comme le document final. */
.apercu-infos { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.apercu-infos svg { width: 26px; height: 26px; color: #c2362f; flex: none; }
.apercu-infos b { display: block; word-break: break-all; font-size: 14px; }
.apercu-infos small { color: var(--encre-douce); }
.apercu-cadre { background: var(--surface-3); border-radius: var(--rayon-petit); padding: 12px; max-height: min(62vh, 760px); overflow: auto; }
.papier { background: #fff; color: #1d2421; max-width: 794px; margin: 0 auto; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.16); border-radius: 3px; overflow: hidden; font-size: 12.5px; }
.papier-tete { position: relative; display: flex; gap: 12px; align-items: center; background: #0d5c4a; color: #fff; padding: 18px 20px; border-bottom: 3px solid #f2a600; overflow: hidden; }
.papier-tete::after { content: ""; position: absolute; right: -10px; top: -10px; bottom: -10px; width: 45%; opacity: 0.1; background-image: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%); background-size: 34px 34px; pointer-events: none; }
.papier-tete img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.papier-tete h3 { margin: 0; font-size: 19px; color: #fff; }
.papier-tete p { margin: 2px 0; font-size: 12.5px; color: #fff; }
.papier-tete small { color: #d6ebe3; font-size: 11px; }
.papier-corps { padding: 16px 20px 6px; }
.papier-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px; }
.papier-kpis > div { background: #f3f4ef; border: 1px solid #e2e6e0; border-radius: 7px; padding: 8px 10px; }
.papier-kpis span { display: block; font-size: 10.5px; color: #5f6b66; }
.papier-kpis b { display: block; font-size: 15px; margin: 2px 0; color: #1d2421; }
.papier-kpis small { display: block; font-size: 10px; color: #5f6b66; }
.papier .ton-positif { color: #0b7a3e; }
.papier .ton-negatif { color: #c2362f; }
.papier .ton-attention { color: #8a5a00; }
.papier .ton-neutre { color: #5f6b66; }
.papier .gras { font-weight: 700; }
.papier h4 { margin: 14px 0 6px; font-size: 13.5px; color: #0a4a3b; padding-left: 8px; border-left: 3px solid #f2a600; }
.papier-graphiques { display: flex; gap: 12px; margin: 6px 0 10px; }
.papier-graphiques figure { margin: 0; min-width: 0; }
.papier-graphiques figcaption { font-size: 12px; font-weight: 700; margin-bottom: 4px; color: #1d2421; }
.papier-graphiques img { width: 100%; height: auto; display: block; }
.papier-tableau { overflow-x: auto; }
.papier table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.papier th { background: #e2f0ea; color: #0a4a3b; font-weight: 700; padding: 6px 7px; white-space: nowrap; }
.papier td { padding: 5px 7px; border-bottom: 1px solid #e2e6e0; color: #1d2421; }
.papier tbody tr:nth-child(even) td { background: #f9faf7; }
.papier tfoot td { background: #f3f4ef; font-weight: 700; border-bottom: 0; }
.papier-suite { font-size: 11px; color: #5f6b66; font-style: italic; margin: 4px 0 0; }
.papier-texte { color: #5f6b66; line-height: 1.5; white-space: pre-line; margin: 0 0 10px; }
.papier-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; background: #e2f0ea; border-radius: 8px; padding: 12px 16px; margin: 8px 0 12px; }
.ps-note b { font-size: 30px; color: #0d5c4a; }
.ps-note span { font-size: 11px; color: #0d5c4a; margin-left: 3px; }
.ps-note small { display: block; color: #0d5c4a; font-size: 12px; }
.papier-score ul { list-style: none; margin: 0; padding: 0; }
.papier-score li { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(120px, 38%); gap: 8px; align-items: center; font-size: 10.5px; color: #5f6b66; padding: 2px 0; }
.papier-score i { display: block; height: 6px; background: #fff; border-radius: 3px; overflow: hidden; }
.papier-score i em { display: block; height: 100%; background: #0d5c4a; border-radius: 3px; }
.papier-score li small { color: #1d2421; }
.papier-pied { border-top: 1px solid #e2e6e0; margin: 6px 20px 0; padding: 8px 0 12px; font-size: 10.5px; color: #5f6b66; }
.apercu-actions { flex-wrap: wrap; }
.seulement-ordinateur { display: none; }
@media (min-width: 1024px) { .seulement-ordinateur { display: inline-flex; } }
@media (max-width: 520px) {
  .papier-graphiques { flex-direction: column; }
  .papier-score { grid-template-columns: 1fr; }
  .papier-score li { grid-template-columns: 76px minmax(0, 1fr) 58px; }
}
.anneau-profil text { stroke: none; }
.jour-cal { aspect-ratio: auto; height: 44px; }
.corps-cal { display: grid; gap: 4px 22px; }
@container vue (min-width: 760px) {
  .corps-cal { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; }
  .corps-cal .titre-evenements { margin-top: 0; }
}
.surplus-fin { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.18); position: relative; z-index: 1; }
.surplus-fin p { margin: 0 0 10px !important; }
.surplus-fin b { color: #fff; }
.carte-par-jour .bouton.clair { background: #fff; color: var(--marque); border-color: #fff; }
.carte-par-jour .bouton.fantome { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.carte-par-jour .montant-heros small { color: rgba(255, 255, 255, 0.75); }
.navigation-guide .bouton { min-width: 0; flex: 0 1 auto; max-width: 48%; }
.navigation-guide .bouton span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.seg[data-seg="onglet_conseiller"] button { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.question > .bascule { display: flex; margin: 8px 0 0; font-size: 14px; font-weight: 550; color: var(--encre); }
.questionnaire .q-jour input { width: 90px; flex: none; }
.q-jour span { white-space: nowrap; }
@media (max-width: 440px) { .seg[data-seg="onglet_conseiller"] button { font-size: 13px; padding: 9px 2px; } }
@media (max-width: 520px) {
  .papier-score li { grid-template-columns: 70px minmax(0, 1fr); row-gap: 1px; }
  .papier-score li small { grid-column: 2; }
}
@media (max-width: 380px) { .seg[data-seg="onglet_conseiller"] button { font-size: 12px; padding: 9px 1px; } }
