/* Prospection mobile — même marque que Comptoir Entreprise (« Le Guichet » :
   pile système, accent bleu #3355d8, thèmes clair/sombre via light-dark()),
   avec plus de couleur pour le terrain : bandeau d'accent, un statut = une
   teinte (toujours écrit en toutes lettres), relances en ambre, actions
   rapides à 48 px pour le pouce. */
:root {
  color-scheme: light dark;

  --accent: #3355d8;
  --sur-accent: #ffffff;
  --accent-fond: light-dark(color-mix(in oklab, var(--accent) 11%, white), color-mix(in oklab, var(--accent) 26%, #17181d));
  --accent-texte: light-dark(color-mix(in oklab, var(--accent) 82%, black), color-mix(in oklab, var(--accent) 45%, white));
  --sur-accent-doux: color-mix(in srgb, var(--sur-accent) 82%, var(--accent));

  --fond: light-dark(#f1f3fa, #111218);
  --surface: light-dark(#ffffff, #1b1c22);
  --surface-champ: light-dark(#e8ebf4, #2a2c34);
  --ligne: light-dark(#d9dde9, #34363f);
  --texte: light-dark(#15171d, #ececf1);
  --texte-2: light-dark(#454956, #b7bac6);
  --texte-3: light-dark(#5f6372, #9497a5);
  --danger: light-dark(#b42318, #ff8a80);

  --neutre-fond: light-dark(oklch(0.93 0.012 260), oklch(0.31 0.015 260));
  --neutre-texte: light-dark(oklch(0.4 0.03 260), oklch(0.84 0.02 260));
  --relance-fond: light-dark(oklch(0.93 0.04 305), oklch(0.33 0.08 305));
  --relance-texte: light-dark(oklch(0.4 0.15 305), oklch(0.87 0.09 305));
  --perdu-fond: light-dark(oklch(0.94 0.03 25), oklch(0.31 0.07 25));
  --perdu-texte: light-dark(oklch(0.43 0.16 25), oklch(0.85 0.09 25));
  --retard-fond: light-dark(oklch(0.93 0.1 88), oklch(0.34 0.08 75));
  --retard-texte: light-dark(oklch(0.38 0.09 65), oklch(0.89 0.12 88));
  --succes-fond: light-dark(oklch(0.93 0.08 150), oklch(0.32 0.09 150));
  --succes-texte: light-dark(oklch(0.4 0.12 150), oklch(0.85 0.12 150));

  --rayon: 12px;
  --rayon-grand: 16px;
  --cible: 48px;
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  accent-color: var(--accent);
  caret-color: var(--accent);
  scrollbar-color: var(--ligne) transparent;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--accent-fond); color: var(--accent-texte); }

.ecran { min-height: 100dvh; padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
.ecran[hidden] { display: none; }

/* Écrans à bandeau de marque + formulaire court (connexion, accès refusé,
   double authentification). Le bandeau garde sa taille naturelle (logo +
   titre, jamais étiré pour remplir l'écran : deux essais en ce sens, bandeau
   centré puis bandeau agrandi, ont été jugés pires par Thomas), et le
   formulaire occupe TOUTE la largeur disponible.

   Piège corrigé (signalé par Thomas avec captures d'iPhone) : en passant
   l'écran en flex colonne, `.contenu { margin-inline: auto }` faisait
   rétrécir le formulaire à la largeur de son contenu (une marge auto sur
   un élément flex absorbe l'espace au lieu de laisser l'élément
   s'étirer) — champs à ~57 % de la largeur de l'écran. D'où `width: 100%`
   ci-dessous : max-width: 560px de .contenu continue de borner la largeur
   sur tablette ou grand écran. */
.ecran--centre { display: flex; flex-direction: column; }
.ecran--centre > .contenu, .ecran--centre .bandeau--marque > .contenu { width: 100%; }
.ecran--centre > .contenu { padding-top: 1.75rem; }

.contenu { max-width: 560px; margin-inline: auto; padding-inline: 1rem; }

h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem; }
p { margin: 0; }

.icone { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }

/* --- Bandeau d'accent ---------------------------------------------------- */

.bandeau {
  background: var(--accent);
  color: var(--sur-accent);
  padding-top: calc(env(safe-area-inset-top) + 1rem);
  padding-bottom: 1.25rem;
  border-radius: 0 0 20px 20px;
}
.bandeau-ligne { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.bandeau-ligne--debut { justify-content: flex-start; }
.bandeau-ligne h1 { overflow-wrap: anywhere; }
.bandeau-sous-titre { color: var(--sur-accent-doux); font-size: 0.95rem; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.bandeau-sous-titre--fiche { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.6rem; }

/* Bandeau de marque compact : logo à gauche, titre (et sous-titre) à droite
   sur une seule ligne, au lieu de les empiler. Empilés, le bandeau faisait
   ~270 px sur l'iPhone de Thomas (la marge de sécurité du haut d'écran,
   absente de mes mesures sur ordinateur, s'ajoute à ses propres marges) et
   il l'a jugé trop grand à deux reprises. */
.bandeau--marque { padding-top: calc(env(safe-area-inset-top) + 1rem); padding-bottom: 1.25rem; }
.bandeau--marque > .contenu {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.9rem;
  align-items: center;
}
.bandeau--marque .marque-logo { grid-row: 1 / span 2; }
.bandeau--marque h1 { font-size: 1.4rem; margin: 0; }
.bandeau--marque .bandeau-sous-titre { margin-top: 0.15rem; }
.marque-logo { display: block; width: 48px; height: 48px; border-radius: var(--rayon); background: var(--sur-accent); }

.bouton-icone {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--cible); height: var(--cible); flex-shrink: 0;
  border: 0; border-radius: var(--rayon);
  background: var(--surface); color: var(--texte); cursor: pointer;
}
.bouton-icone--bandeau { background: color-mix(in srgb, var(--sur-accent) 18%, transparent); color: var(--sur-accent); }
.bouton-icone .icone { width: 1.5rem; height: 1.5rem; }

/* --- Formulaires --------------------------------------------------------- */

.formulaire-connexion { display: flex; flex-direction: column; gap: 1.1rem; padding-top: 1.75rem; }

.champ { display: flex; flex-direction: column; gap: 0.35rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.champ label, .champ legend { font-size: 0.9rem; font-weight: 600; color: var(--texte-2); padding: 0; }
.champ input, .champ select, .champ textarea {
  width: 100%;
  min-height: var(--cible);
  background: var(--surface-champ);
  color: var(--texte);
  border: 2px solid transparent;
  border-radius: var(--rayon);
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
}
.champ textarea { resize: vertical; }
/* Le contrôle natif de date varie fortement d'un navigateur Android à
   l'autre. Constaté en usage réel (Léa, Samsung Internet) : la boîte
   restait plus étroite que le panneau et le texte se retrouvait centré
   au lieu d'aligné à gauche, malgré width: 100% — un premier correctif
   (marge réduite) n'a pas suffi. `appearance: none` retire le chrome
   natif du champ lui-même (le sélecteur de calendrier qui s'ouvre au tap
   reste natif, seule l'apparence du champ fermé change) : c'est ce
   chrome-là que Samsung Internet dimensionnait et centrait à sa façon. */
.champ input[type="date"] {
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  text-align: left;
}

/* Même risque que le champ date, relevé lors de l'audit UX avant qu'il ne
   se manifeste réellement : sans appearance: none, la flèche du menu
   déroulant natif varie d'un navigateur Android à l'autre (taille, place,
   parfois absente du thème). Chevron en masque CSS (pas une image colorée
   figée) pour suivre --texte-3 et donc rester lisible en thème sombre,
   cohérent avec les icônes du reste de l'app (icones.js : trait de 1.8). */
.champ select { -webkit-appearance: none; appearance: none; padding-right: 2.5rem; }
.champ:has(select) { position: relative; }
.champ:has(select)::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  bottom: 0.95rem;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--texte-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
button:focus-visible, a:focus-visible, .choix input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.bandeau button:focus-visible { outline-color: var(--sur-accent); }

.bouton-principal, .bouton-secondaire {
  min-height: 52px; border-radius: var(--rayon); font: inherit; font-weight: 600; cursor: pointer;
  transition: transform 120ms var(--sortie), background-color 120ms;
}
.bouton-principal { background: var(--accent); color: var(--sur-accent); border: 0; }
a.bouton-principal { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.bouton-secondaire { background: var(--accent-fond); color: var(--accent-texte); border: 0; }
.bouton-principal:disabled, .bouton-secondaire:disabled, .champ select:disabled { opacity: 0.55; cursor: progress; }

.bandeau-message {
  border: 1px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--danger);
  border-radius: var(--rayon);
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
}
.bandeau-message--attention {
  border-color: var(--retard-texte);
  background: var(--retard-fond);
  color: var(--retard-texte);
}
#messageProspection { margin-top: 0.75rem; }

/* --- Recherche et filtres (collés en haut pendant le défilement) --------- */

.outils {
  position: sticky; top: 0; z-index: 5;
  padding-block: max(0.75rem, env(safe-area-inset-top)) 0.5rem;
  background: var(--fond);
}
.recherche { position: relative; }
.recherche-icone { position: absolute; left: 0.9rem; top: 50%; translate: 0 -50%; color: var(--texte-3); display: flex; pointer-events: none; }
.recherche input {
  width: 100%; min-height: var(--cible);
  background: var(--surface); color: var(--texte);
  border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 0.7rem 0.85rem 0.7rem 2.75rem;
  font: inherit; font-size: 1rem;
}
.recherche input:focus-visible { outline: none; border-color: var(--accent); }

/* Le défilement horizontal n'avait aucun indice visuel (scrollbar masquée à
   dessein) : un filtre au-delà du bord droit pouvait passer inaperçu, comme
   relevé lors de l'audit UX du 2026-09-30. Un dégradé en sortie de piste
   suggère qu'il y a plus à voir, sans dépendre d'une scrollbar visible. */
.filtres {
  display: flex; gap: 0.5rem; overflow-x: auto; margin-top: 0.6rem;
  padding-bottom: 0.25rem; scrollbar-width: none;
  mask-image: linear-gradient(to right, black calc(100% - 1.75rem), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 1.75rem), transparent 100%);
}
.filtres::-webkit-scrollbar { display: none; }
.filtre {
  flex-shrink: 0; min-height: 44px; padding-inline: 1rem;
  border: 1px solid var(--ligne); border-radius: 999px;
  background: var(--surface); color: var(--texte-2);
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: transform 120ms var(--sortie), background-color 120ms;
}
.filtre[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }

/* --- Cartes de la liste -------------------------------------------------- */

.liste-prospects { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 0.5rem; }

.carte-prospect {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-grand);
  padding: 0.25rem 0.25rem 0.75rem;
}
.carte-prospect--urgent {
  background: color-mix(in oklab, var(--retard-fond) 38%, var(--surface));
  border-color: color-mix(in oklab, var(--retard-texte) 38%, transparent);
}
.carte-prospect--perdu { opacity: 0.66; }

.carte-principale {
  display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start;
  width: 100%; min-height: var(--cible);
  padding: 0.7rem 0.75rem 0.5rem;
  background: none; border: 0; border-radius: var(--rayon);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.carte-titre { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; width: 100%; }
.carte-nom { font-size: 1.05rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.carte-contact { color: var(--texte-2); font-size: 0.95rem; }

.relance {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--texte-3); font-size: 0.9rem; font-variant-numeric: tabular-nums;
}
.relance .icone { width: 1rem; height: 1rem; }
.relance--retard {
  background: var(--retard-fond); color: var(--retard-texte);
  border-radius: 999px; padding: 0.2rem 0.65rem; font-weight: 700;
}

.pastille {
  display: inline-block; flex-shrink: 0;
  border-radius: 999px; padding: 0.15rem 0.65rem;
  background: var(--neutre-fond); color: var(--neutre-texte);
  font-size: 0.85rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.pastille--info { background: var(--accent-fond); color: var(--accent-texte); }
.pastille--relance { background: var(--relance-fond); color: var(--relance-texte); }
.pastille--danger { background: var(--perdu-fond); color: var(--perdu-texte); }
.pastille--attention { background: var(--retard-fond); color: var(--retard-texte); }
.pastille--succes { background: var(--succes-fond); color: var(--succes-texte); }
.bandeau .pastille { box-shadow: 0 0 0 2px var(--sur-accent); }

/* --- Actions rapides ----------------------------------------------------- */

.carte-actions { display: flex; gap: 0.5rem; padding-inline: 0.5rem; }

.action {
  flex: 1 1 0; min-height: var(--cible);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding-inline: 0.75rem;
  border: 0; border-radius: var(--rayon);
  background: var(--accent-fond); color: var(--accent-texte);
  font: inherit; font-size: 0.95rem; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 120ms var(--sortie), background-color 120ms;
}
.action--appel { background: var(--accent); color: var(--sur-accent); }

.carte-principale:active, .action:active, .filtre:active, .bouton-principal:active, .bouton-secondaire:active, .bouton-icone:active {
  transform: scale(0.97);
}

/* Bouton d'ajout, toujours à portée du pouce (au-dessus de la barre d'accueil iOS). */
.bouton-flottant {
  position: fixed; z-index: 6;
  right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 56px; padding-inline: 1.25rem;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--sur-accent);
  font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform 120ms var(--sortie);
}
.bouton-flottant:active { transform: scale(0.97); }
#ecranProspection { padding-bottom: 6rem; }

/* Deux significations différentes rendues identiquement avant l'audit UX
   du 2026-09-30 : "rien ne correspond à cette recherche" (neutre) et "rien
   à signaler, tout va bien" (rassurant) partageaient le même gris plat.
   Une icône et, pour la variante positive, une teinte différente séparent
   les deux d'un coup d'œil, sans dépendre de la seule couleur (le texte
   reste toujours explicite). */
.etat-vide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--texte-3);
  padding: 2.5rem 1rem;
  text-align: center;
}
.etat-vide .icone { width: 1.75rem; height: 1.75rem; opacity: 0.7; }
.etat-vide--positif { color: var(--succes-texte); }
.etat-vide--positif .icone { opacity: 1; }

/* Entrée de la liste : un seul moment animé, au chargement (jamais à la frappe). */
@keyframes entree-carte { from { opacity: 0; translate: 0 10px; } }
.liste-prospects[data-entree] .carte-prospect { animation: entree-carte 420ms var(--sortie) backwards; }
.liste-prospects[data-entree] .carte-prospect:nth-child(2) { animation-delay: 45ms; }
.liste-prospects[data-entree] .carte-prospect:nth-child(3) { animation-delay: 90ms; }
.liste-prospects[data-entree] .carte-prospect:nth-child(4) { animation-delay: 135ms; }
.liste-prospects[data-entree] .carte-prospect:nth-child(5) { animation-delay: 180ms; }
.liste-prospects[data-entree] .carte-prospect:nth-child(n + 6) { animation-delay: 225ms; }

/* --- Fiche ---------------------------------------------------------------- */

.fiche { display: flex; flex-direction: column; gap: 1.25rem; padding-top: 1.25rem; }
.fiche-liens { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.5rem; }
.fiche-liens:empty { display: none; }
.fiche-liens .action:last-child:nth-child(odd) { grid-column: 1 / -1; }

.panneau {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-grand);
  padding: 1rem;
}
.formulaire-contact { display: flex; flex-direction: column; gap: 1rem; }
.formulaire-contact h2 { margin-bottom: 0; display: flex; align-items: baseline; gap: 0.5rem; }

/* Hiérarchie entre le seul champ obligatoire et le reste, facultatif —
   avant, les huit champs de "Nouveau prospect" avaient tous le même poids
   visuel, l'obligation n'étant qu'un mot dans le label (audit UX du
   2026-09-30). Une pastille de couleur en dit plus qu'un mot de texte. */
.champ--requis label::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  vertical-align: middle;
}
.etiquette-optionnel {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--texte-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.choix-liste { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choix { position: relative; }
.choix input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; }
.choix span {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 1rem;
  border: 1px solid var(--ligne); border-radius: 999px;
  background: var(--surface); color: var(--texte-2); font-weight: 600; font-size: 0.95rem;
}
.choix input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }

.journal-contacts { display: flex; flex-direction: column; }
.ligne-journal { padding-block: 0.75rem; border-top: 1px solid var(--ligne); }
.ligne-journal:first-child { border-top: 0; padding-top: 0; }
.ligne-journal-entete { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 700; }
.ligne-journal-entete span:last-child { color: var(--texte-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.ligne-journal-note { color: var(--texte-2); margin-top: 0.25rem; overflow-wrap: anywhere; white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) {
  .liste-prospects[data-entree] .carte-prospect { animation: none; }
  .carte-principale:active, .action:active, .filtre:active, .bouton-principal:active, .bouton-secondaire:active, .bouton-icone:active { transform: none; }
}

/* Double authentification */
.texte-mfa { color: var(--texte-2); line-height: 1.5; }
.qr-mfa { align-self: center; width: 200px; height: 200px; padding: 12px; background: #ffffff; border-radius: var(--rayon); }
.secret-mfa {
  display: block; padding: 0.75rem 1rem; border-radius: var(--rayon);
  background: var(--surface-champ); color: var(--texte);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95rem;
  letter-spacing: 0.05em; overflow-wrap: anywhere; user-select: all;
}
a.bouton-secondaire { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* --- Navigation par onglets (tableau de bord, prospection...) ------------- */

:root { --hauteur-onglets: 64px; }

.barre-onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex;
  height: calc(var(--hauteur-onglets) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--ligne);
}
.onglet {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem;
  border: 0; border-radius: 0;
  background: none; color: var(--texte-3);
  font: inherit; font-size: 0.72rem; font-weight: 600;
  cursor: pointer;
}
.onglet[aria-current="true"] { color: var(--accent-texte); }
.onglet .icone { width: 22px; height: 22px; }

/* Sélecteur d'enfant direct (>) et non descendant : `.contenu` existe aussi
   dans l'en-tête (bandeau-ligne du titre), qui n'a pas besoin de cette
   marge — un sélecteur trop large lui ajoutait ~160px de vide sous le
   titre (confirmé lors de l'audit UX du 2026-09-30, mesuré en inspectant
   les hauteurs calculées : bandeau-ligne à 208px pour ~48px de contenu réel). */
#ecranTableauBord > .contenu, #ecranProspection { padding-bottom: calc(var(--hauteur-onglets) + 6rem); }
.bouton-flottant { bottom: calc(var(--hauteur-onglets) + max(1rem, env(safe-area-inset-bottom))); }

/* --- Tableau de bord ------------------------------------------------------ */

.grille-chiffres {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.carte-chiffre {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1rem; border-radius: var(--rayon-grand);
  background: var(--surface-champ);
}
.carte-chiffre-libelle { font-size: 0.82rem; color: var(--texte-2); font-weight: 600; }
.carte-chiffre-montant { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.carte-chiffre--attention { background: var(--retard-fond); }
.carte-chiffre--attention .carte-chiffre-libelle { color: var(--retard-texte); }
.carte-chiffre--danger { background: var(--perdu-fond); }
.carte-chiffre--danger .carte-chiffre-libelle, .carte-chiffre--danger .carte-chiffre-montant { color: var(--perdu-texte); }

.titre-section { font-size: 1rem; margin-bottom: 0.75rem; }

.liste-rappels { display: flex; flex-direction: column; gap: 0.6rem; }
.rappel {
  display: block; width: 100%; text-align: left;
  padding: 0.85rem 1rem; border-radius: var(--rayon);
  border: 1px solid var(--ligne); background: var(--surface);
  font: inherit; font-size: 0.9rem; color: var(--texte); cursor: pointer;
}
.rappel--urgent { border-color: var(--retard-texte); background: var(--retard-fond); color: var(--retard-texte); }
.rappel--info { border-color: var(--ligne); background: var(--surface-champ); color: var(--texte-2); }

/* --- Documents (devis/factures) -------------------------------------------- */

#ecranDocuments { padding-bottom: calc(var(--hauteur-onglets) + 2rem); }

/* Oubliée à la création de l'écran Clients : sans cette marge, les
   dernières cartes de la liste passent sous la barre d'onglets fixe. */
#ecranClients { padding-bottom: calc(var(--hauteur-onglets) + 2rem); }

.ligne-document { padding-block: 0.6rem; border-top: 1px solid var(--ligne); }
.ligne-document:first-child { border-top: 0; padding-top: 0; }
.ligne-document-entete { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 600; }
.ligne-document-detail { display: flex; justify-content: space-between; gap: 0.75rem; color: var(--texte-3); font-size: 0.85rem; margin-top: 0.15rem; }
.ligne-total {
  display: flex; justify-content: space-between;
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--ligne-forte, var(--ligne));
  font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums;
}
