/* ============================================================
   style.css : charte Rebxrn (esprit Apple, un seul accent bleu)
   Tous les réglages de couleur / forme sont dans :root ci-dessous.
   ============================================================ */
:root {
  --ink: #0B0C10;
  --bleu-logo: #5170FF;
  --bleu: #3F5BF2;
  --bleu-texte: #2F49D6;
  --bleu-fond: #E8ECFF;
  --fond: #F2F2F7;
  --surface: #FFFFFF;
  --trait: #E5E5EA;
  --texte2: #636366;
  --faible: #AEAEB2;
  --champ: #EBEBF0;
  --pos: #0B7A4B;       --pos-fond: #E3F5EC;
  --neg: #C0352B;       --neg-fond: #FCE9E7;
  --alerte: #8A5300;    --alerte-fond: #FFF1D6;

  --r-carte: 22px;
  --r-bouton: 16px;
  --r-champ: 14px;

  --ombre-carte: 0 1px 2px rgba(11,12,16,.04), 0 10px 28px -18px rgba(11,12,16,.18);
  --police: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --haut-secu: env(safe-area-inset-top, 0px);
  --bas-secu: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--ink);
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- icônes (prennent la couleur du texte) ---------- */
.ic {
  display: inline-block; flex: none;
  width: 22px; height: 22px;
  background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat;
          mask: var(--ic) center / contain no-repeat;
}

/* ---------- coque de l'appli ---------- */
.contenu { min-height: 100vh; min-height: 100dvh; }
.page {
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: calc(var(--haut-secu) + 22px) 16px calc(var(--bas-secu) + 128px);
  display: flex; flex-direction: column; gap: 16px;
}

/* ---------- barre d'onglets flottante (mobile) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: calc(var(--bas-secu) + 14px);
  display: flex; justify-content: center; padding: 0 16px; pointer-events: none; z-index: 20;
}
.dock-in { width: 100%; max-width: 520px; display: flex; gap: 10px; pointer-events: auto; }
.onglets {
  flex: 1; height: 64px; border-radius: 32px; padding: 6px; gap: 2px;
  display: flex; align-items: center;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 12px 32px -12px rgba(11,12,16,.30), 0 0 0 .5px rgba(60,60,67,.18);
}
.onglet {
  flex: 1; height: 52px; border: 0; border-radius: 26px; background: transparent; color: var(--texte2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0;
  font-size: 11px; font-weight: 700; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.onglet .ic { width: 22px; height: 22px; }
.onglet[aria-current="page"] { background: var(--bleu-fond); color: var(--bleu-texte); }
.bouton-ajout {
  width: 64px; height: 64px; border-radius: 50%; border: 0; flex: none; padding: 0;
  background: var(--bleu); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -10px rgba(63,91,242,.7);
}
.bouton-ajout .ic { width: 26px; height: 26px; }
.bouton-ajout:active { transform: scale(.96); }

/* ---------- barre latérale (Mac / Windows) ---------- */
.lateral { display: none; }

@media (min-width: 1000px) {
  .dock { display: none; }
  .lateral {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 10;
    padding: 24px 16px 20px; background: var(--surface); border-right: 1px solid var(--trait);
  }
  .lateral-logo { padding: 4px 12px 26px; }
  .lateral-logo img { display: block; height: 30px; width: auto; }
  .lateral-lien {
    height: 44px; border: 0; border-radius: 14px; background: transparent; color: var(--ink);
    display: flex; align-items: center; gap: 14px; padding: 0 14px; text-align: left;
    font-size: 15px; font-weight: 600; text-decoration: none; width: 100%;
  }
  .lateral-lien:hover { background: var(--fond); }
  .lateral-lien[aria-current="page"] { background: var(--bleu-fond); color: var(--bleu-texte); font-weight: 700; }
  .lateral-bas { margin-top: auto; }
  .contenu { margin-left: 248px; }
  .page { max-width: 980px; padding: 36px 32px 56px; }
}

/* ---------- en-tête de page ---------- */
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 4px; }
.entete-sur { font-size: 13.5px; font-weight: 600; color: var(--texte2); margin-bottom: 4px; }
.entete h1 { font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.pastille {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none; padding: 0;
  background: var(--surface); color: var(--ink); border: 1px solid var(--trait);
  display: inline-flex; align-items: center; justify-content: center;
}
.pastille .ic { width: 22px; height: 22px; }
.pastille .point {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--bleu); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--fond); box-sizing: content-box;
}

/* ---------- recherche et puces ---------- */
.recherche {
  height: 48px; border-radius: var(--r-bouton); background: var(--surface); border: 1px solid var(--trait);
  display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--texte2);
}
.recherche .ic { width: 20px; height: 20px; }
.recherche input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.recherche input::placeholder { color: var(--faible); }
.recherche:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(63,91,242,.14); }
.recherche .effacer { border: 0; background: transparent; padding: 0; width: 28px; height: 28px; color: var(--faible);
  display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.recherche .effacer .ic { width: 16px; height: 16px; }

.puces { display: flex; gap: 8px; padding: 0 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 18px; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  height: 36px; padding: 0 14px; border-radius: 999px; flex: none; white-space: nowrap;
  background: var(--surface); color: var(--ink); border: 1px solid var(--trait);
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
}
.puce[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.puce .n { font-weight: 600; opacity: .62; font-variant-numeric: tabular-nums; }
.puce[aria-pressed="true"] .n { opacity: .72; }

/* ---------- sections et cartes ---------- */
.section-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; margin-top: 4px; }
.section-titre h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.section-titre .legende { font-size: 12px; line-height: 1.25; font-weight: 600; color: var(--texte2); text-align: right; }
.carte {
  background: var(--surface); border: 1px solid rgba(11,12,16,.06); border-radius: var(--r-carte);
  box-shadow: var(--ombre-carte);
}
.carte-liste { padding: 6px 16px; }

/* ---------- ligne de produit ---------- */
.ligne {
  width: 100%; border: 0; background: transparent; text-align: left; padding: 12px 0;
  display: flex; align-items: center; gap: 12px; position: relative;
}
.ligne + .ligne::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--trait); }
.ligne:active { opacity: .6; }
.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex: none; background: var(--champ); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.ligne-corps { flex: 1; min-width: 0; }
.ligne-titre { font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-sous { font-size: 12.5px; font-weight: 600; color: var(--texte2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ligne-tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ligne-droite { text-align: right; flex: none; max-width: 44%; }
.ligne-montant { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.ligne-note { font-size: 12px; font-weight: 700; color: var(--texte2); margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.pastille-statut {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
}
.s-noir { background: var(--ink); color: #fff; }
.s-pos { background: var(--pos-fond); color: var(--pos); }
.s-bleu { background: var(--bleu-fond); color: var(--bleu-texte); }
.s-gris { background: var(--champ); color: var(--ink); }
.s-alerte { background: var(--alerte-fond); color: var(--alerte); }
.s-contour { background: transparent; color: var(--texte2); box-shadow: inset 0 0 0 1px var(--trait); }
.tag-remise { font-size: 12px; font-weight: 700; color: var(--pos); display: inline-flex; align-items: center; height: 24px; }

.plus-lien {
  width: 100%; height: 48px; border: 0; background: transparent; color: var(--bleu-texte);
  font-size: 15px; font-weight: 700; border-top: 1px solid var(--trait);
}

/* ---------- messages d'état ---------- */
.bandeau {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: var(--alerte-fond); color: var(--alerte); font-size: 13.5px; font-weight: 600;
}
.bandeau .ic { width: 20px; height: 20px; }
.bandeau button { margin-left: auto; border: 0; background: transparent; color: inherit; font-weight: 700; padding: 6px 0 6px 8px; }
.etat-vide { padding: 36px 20px; text-align: center; color: var(--texte2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.etat-vide .ic { width: 32px; height: 32px; color: var(--faible); }
.etat-vide strong { color: var(--ink); font-size: 17px; letter-spacing: -.01em; }
.etat-vide p { max-width: 420px; font-size: 14px; font-weight: 500; }
.squelette { padding: 6px 16px; }
.squelette-ligne { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.squelette-ligne + .squelette-ligne { border-top: 1px solid var(--trait); }
.sq { background: linear-gradient(90deg, var(--champ) 25%, #F4F4F8 50%, var(--champ) 75%); background-size: 200% 100%; animation: brille 1.3s linear infinite; border-radius: 8px; }
@keyframes brille { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sq { animation: none; } }

/* ---------- boutons ---------- */
.btn {
  height: 54px; border-radius: var(--r-bouton); border: 0; padding: 0 22px; font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primaire { background: var(--bleu); color: #fff; box-shadow: 0 10px 24px -12px rgba(63,91,242,.7); }
.btn-primaire:active { transform: scale(.985); }
.btn-primaire[disabled] { opacity: .6; }
.btn-secondaire { background: var(--surface); color: var(--ink); border: 1px solid var(--trait); }
.btn-danger { background: var(--neg-fond); color: var(--neg); }
.btn-plein { width: 100%; }

/* ---------- connexion ---------- */
.connexion {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--haut-secu) + 24px) 20px calc(var(--bas-secu) + 24px);
}
.connexion-in { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.connexion-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 6px; }
.connexion-logo img { height: 44px; width: auto; display: block; }
.connexion-logo p { color: var(--texte2); font-size: 14px; font-weight: 600; }
.formulaire { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.formulaire h1 { font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-size: 13px; font-weight: 700; color: var(--texte2); padding-left: 2px; }
.champ-boite {
  height: 52px; border-radius: var(--r-champ); background: var(--champ); border: 1px solid transparent;
  display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--texte2);
}
.champ-boite:focus-within { background: var(--surface); border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(63,91,242,.14); color: var(--bleu-texte); }
.champ-boite .ic { width: 20px; height: 20px; }
.champ-boite input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 600; color: var(--ink); }
.champ-boite .oeil { border: 0; background: transparent; padding: 0; width: 36px; height: 36px; margin-right: -8px; color: var(--texte2); display: flex; align-items: center; justify-content: center; }
.message-erreur {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  background: var(--neg-fond); color: var(--neg); font-size: 14px; font-weight: 600;
}
.message-erreur .ic { width: 20px; height: 20px; margin-top: 1px; }
.pied-connexion { text-align: center; color: var(--faible); font-size: 12.5px; font-weight: 600; }

/* ---------- feuille du bas (filtres) ---------- */
.voile { position: fixed; inset: 0; background: rgba(11,12,16,.36); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fondu .18s ease; }
.feuille {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow: auto;
  background: var(--fond); border-radius: 28px 28px 0 0; padding: 10px 16px calc(var(--bas-secu) + 18px);
  animation: monte .24s cubic-bezier(.2,.8,.2,1);
}
.feuille-poignee { width: 40px; height: 5px; border-radius: 3px; background: var(--faible); opacity: .6; margin: 0 auto 10px; }
.feuille-tete { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 14px; }
.feuille-tete h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.feuille-tete .pastille { width: 36px; height: 36px; }
.feuille-tete .pastille .ic { width: 16px; height: 16px; }
.feuille-groupe { padding: 14px 16px 16px; margin-bottom: 12px; }
.feuille-groupe h3 { font-size: 13px; font-weight: 700; color: var(--texte2); margin-bottom: 10px; }
.feuille-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.feuille-pied { display: flex; gap: 10px; padding-top: 6px; position: sticky; bottom: 0; }
.feuille-pied .btn { flex: 1; height: 52px; padding: 0 14px; font-size: 15px; white-space: nowrap; }
.feuille-pied .btn-secondaire { flex: .6; }
@media (min-width: 700px) {
  .voile { align-items: center; }
  .feuille { border-radius: 28px; padding-bottom: 18px; }
}
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }
@keyframes fondu { from { opacity: 0; } }

/* ---------- notification ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bas-secu) + 96px); transform: translateX(-50%); z-index: 60;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(11,12,16,.5); animation: fondu .2s ease;
}
@media (min-width: 1000px) { .toast { bottom: 32px; } }

/* ---------- paramètres ---------- */
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.reglage + .reglage { border-top: 1px solid var(--trait); }
.reglage small { display: block; color: var(--texte2); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.reglage strong { font-weight: 700; }
.reglage .btn { height: 44px; padding: 0 16px; font-size: 15px; }

/* ---------- écrans pas encore construits ---------- */
.bientot { padding: 28px 20px; display: flex; flex-direction: column; gap: 8px; }
.bientot .ic { width: 28px; height: 28px; color: var(--bleu); margin-bottom: 4px; }
.bientot strong { font-size: 17px; letter-spacing: -.01em; }
.bientot p { color: var(--texte2); font-size: 14px; font-weight: 500; }

:focus-visible { outline: 3px solid rgba(63,91,242,.45); outline-offset: 2px; }

@media (max-width: 520px) { .ligne-note .paye { display: none; } }

/* =====================================================================
   Fiche produit et feuille "Affecter"
   ===================================================================== */
body.detail .dock { display: none; }
.page-fiche { padding-bottom: calc(var(--bas-secu) + 28px); }
.barre-haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.barre-haut-ref { font-size: 15px; font-weight: 700; color: var(--texte2); }
.fiche-titre { padding: 0 4px; }
.fiche-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.fiche-meta-txt { font-size: 13px; font-weight: 600; color: var(--texte2); }
.fiche-titre h1 { font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }

.carte-fiche { padding: 18px 18px 14px; }
.gros-lib { font-size: 13.5px; font-weight: 600; color: var(--texte2); }
.gros-nb { font-size: 42px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin: 2px 0 10px; }
.separe { height: 1px; background: var(--trait); margin: 8px 0; }
.rang { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 7px 0; }
.rang-lib { color: var(--texte2); font-size: 15px; font-weight: 600; }
.rang-val { font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rang-fort .rang-lib, .rang-fort-txt { color: var(--ink); font-weight: 700; }
.bleu-txt { color: var(--bleu-texte); }
.faible-txt { color: var(--texte2); font-weight: 600; font-size: 13px; }
.chip-completer, .chip-alerte {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  background: var(--alerte-fond); color: var(--alerte); font-size: 12px; font-weight: 700;
}
.jauge { height: 10px; border-radius: 5px; background: var(--champ); overflow: hidden; margin: 12px 0 8px; }
.jauge-plein { height: 100%; background: var(--ink); border-radius: 5px; }
.jauge-legende { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--texte2); }
.titre-carte { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.sous-titre-carte { font-size: 13px; font-weight: 700; color: var(--texte2); padding: 6px 0 2px; }
.note-fiche { color: var(--texte2); font-size: 14px; font-weight: 500; margin: 8px 0; }
.notes-fiche p { margin: 4px 0 0; white-space: pre-wrap; font-weight: 500; }

.affecte { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.avatar-petit { width: 40px; height: 40px; border-radius: 12px; font-size: 11px; letter-spacing: 0; }
.affecte-corps { flex: 1; min-width: 0; }
.affecte-nom { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.affecte-sous { font-size: 12.5px; font-weight: 600; color: var(--texte2); margin-top: 2px; }
.affecte-droite { text-align: right; flex: none; }
.affecte-montant { font-size: 15px; font-weight: 700; }
.lien-action { border: 0; background: transparent; color: var(--bleu-texte); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; padding: 8px 0 0; min-height: 32px; }
.lien-action .ic { width: 14px; height: 14px; }
.boutons-duo { display: flex; gap: 10px; margin-top: 14px; }
.boutons-duo .btn { flex: 1; height: 50px; padding: 0 10px; font-size: 15px; white-space: nowrap; }
.boutons-duo .btn-primaire { flex: 1.6; }

.barre-action {
  position: sticky; bottom: 0; display: flex; gap: 10px; margin-top: 6px;
  padding: 14px 0 calc(var(--bas-secu) + 10px); background: linear-gradient(to bottom, rgba(242,242,247,0), var(--fond) 38%);
}
.barre-action .btn { height: 54px; }
.barre-action .btn-primaire { flex: 1; }
.barre-action .btn-secondaire { padding: 0 24px; }

/* feuille Affecter / Détacher */
.feuille-sous { font-size: 13.5px; font-weight: 600; color: var(--texte2); margin-top: 2px; }
.segment { display: flex; background: var(--champ); border-radius: 14px; padding: 3px; gap: 2px; margin-bottom: 12px; }
.segment button { flex: 1; height: 38px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 14px; color: var(--texte2); }
.segment button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segment .n { opacity: .6; font-weight: 600; }
.recherche-feuille { height: 44px; margin-bottom: 10px; }
.choix-liste { display: flex; flex-direction: column; gap: 8px; max-height: 34vh; overflow: auto; padding: 3px; margin: -3px; }
.choix {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 16px;
  background: var(--surface); border: 2px solid transparent; box-shadow: var(--ombre-carte);
}
.choix-sel { border-color: var(--bleu); background: var(--bleu-fond); }
.choix[disabled] { opacity: .6; }
.choix-corps { flex: 1; min-width: 0; }
.choix-nom { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.choix-sous { font-size: 12.5px; font-weight: 600; color: var(--texte2); margin-top: 1px; }
.choix-montant { font-weight: 700; font-size: 15px; }
.coche { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--faible); display: flex; align-items: center; justify-content: center; flex: none; }
.coche-on { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.quantite { display: flex; justify-content: space-between; align-items: center; margin: 14px 2px 8px; }
.quantite-lib { font-size: 15px; font-weight: 700; }
.quantite-sous { font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--champ); border-radius: 16px; padding: 4px; }
.stepper button { width: 48px; height: 44px; border: 0; border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.stepper button[disabled] { opacity: .4; }
.stepper-valeur { min-width: 44px; text-align: center; font-weight: 700; font-size: 20px; }
.resume-aff { background: var(--bleu-fond); color: var(--bleu-texte); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; margin: 10px 0; }
.resume-titre { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.info-ligne { display: flex; gap: 10px; color: var(--texte2); font-size: 13px; font-weight: 500; margin: 12px 2px 14px; align-items: flex-start; }
.info-ligne .ic { margin-top: 1px; }
@media (min-width: 1000px) { .barre-action { position: static; background: none; padding-bottom: 0; } }
.stepper button .ic { flex: none; min-width: 0; width: 18px; height: 18px; }

/* ---- écran Stock ---- */
.ligne-stock { cursor: pointer; }
.ligne-stock .ligne-droite { display: flex; flex-direction: column; align-items: flex-end; }
.btn-petit { height: 44px; min-width: 44px; padding: 0 16px; margin-top: 8px; border: 0; border-radius: 14px; background: var(--bleu-fond); color: var(--bleu-texte); font: inherit; font-size: 14px; font-weight: 700; }
.btn-petit[disabled] { opacity: .4; }
.ligne-stock .chip-completer { border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.resume-stock { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; }
.resume-lib { font-size: 13px; font-weight: 600; color: var(--texte2); }
.resume-val { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.resume-note { font-size: 12.5px; font-weight: 600; color: var(--alerte); text-align: right; max-width: 45%; }
.note-bas { padding: 0 8px; }
.champ-lib { display: block; font-size: 13px; font-weight: 600; color: var(--texte2); margin-bottom: 8px; }
.champ-euro { display: flex; align-items: center; gap: 8px; background: var(--champ); border-radius: 14px; padding: 0 16px; height: 52px; }
.champ-euro input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 700; outline: none; }
.champ-euro span { font-size: 18px; font-weight: 700; color: var(--texte2); }

.formulaire:not(form) .champ-lib { margin-top: 14px; }
.formulaire:not(form) .champ-lib:first-child { margin-top: 0; }
input.champ, select.champ { width: 100%; height: 48px; border: 0; border-radius: 14px; background: var(--champ); padding: 0 14px; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); appearance: none; -webkit-appearance: none; outline: none; min-width: 0; }
select.champ { background-image: none; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case-ligne { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 14px; font-weight: 600; line-height: 1.35; cursor: pointer; }
.case-ligne input { width: 24px; height: 24px; flex: none; accent-color: var(--bleu); margin-top: 0; }
.formulaire:not(form) { display: block !important; }
.formulaire:not(form) .champ-lib { margin: 14px 0 6px; }
.formulaire .champ-lib:first-child { margin-top: 0; }
.formulaire .feuille-puces { margin-bottom: 4px; }
.formulaire .deux-col .champ-lib { margin-top: 14px; }
select.champ { line-height: 48px; padding-top: 0; padding-bottom: 0; }
input[type="date"].champ { font-size: 15px; padding: 0 10px; display: block; text-align: left; }
.case-ligne { display: flex !important; }

.btn-suppr { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 16px; background: var(--neg-fond, #FCE9E7); color: var(--neg, #C0352B); font: inherit; font-size: 15px; font-weight: 700; }
.btn-danger-plein { flex: 1; height: 50px; border: 0; border-radius: 16px; background: var(--neg, #C0352B); color: #fff; font: inherit; font-size: 16px; font-weight: 700; }
.btn-danger-plein[disabled] { opacity: .6; }

.btn-secondaire-large { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 16px; background: var(--bleu-fond); color: var(--bleu-texte); font: inherit; font-size: 15px; font-weight: 700; }

.regl + .separe, .regl-seg { margin-top: 12px; }
.regl-seg { margin-bottom: 8px; }
.regl-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.regl-suppr { width: 44px; height: 44px; border: 0; background: transparent; color: var(--texte2); display: flex; align-items: center; justify-content: center; }
.neg { color: var(--neg); }

.regl-ligne + .regl-ligne { border-top: 1px solid var(--trait); margin-top: 12px; padding-top: 12px; }
.regl-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; }
.regl-mode { font-size: 15px; }
.regl-mt { font-size: 15px; }
.regl-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.regl-date { flex: 1; min-width: 0; height: 44px; }
.lien-petit { border: 0; background: transparent; color: var(--bleu-texte); font: inherit; font-size: 13px; font-weight: 700; min-height: 44px; padding: 0 4px; }
.regl-bas .btn-petit { margin-top: 0; flex: none; }
/* ---- écran Bilans ---- */
.mois-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mois-lib { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pastille[disabled] { opacity: .35; }
.graphique { width: 100%; height: auto; display: block; margin-top: 10px; }
.g-ax { font-size: 10.5px; fill: var(--texte2); font-weight: 600; font-family: inherit; }
.g-sel { fill: var(--ink); font-weight: 700; }
.g-val { font-size: 11px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.g-zone { cursor: pointer; }
.g-leg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.g-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.g-tab { margin-top: 8px; font-size: 13px; }
.g-tab summary { color: var(--bleu-texte); font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.g-tab table { width: 100%; border-collapse: collapse; }
.g-tab th, .g-tab td { text-align: right; padding: 6px 4px; border-top: 1px solid var(--trait); }
.g-tab th:first-child, .g-tab td:first-child { text-align: left; }
.aide-bilan { display: block; font-size: 12px; font-weight: 600; color: var(--texte2); margin-top: 2px; }
/* ---- Accueil ---- */
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tuile { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); min-width: 0; }
.tuile-lib { font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.tuile-val { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tuile-sous { font-size: 11.5px; font-weight: 600; color: var(--texte2); margin-top: 2px; }
.alerte-txt { color: var(--alerte); }
@media (max-width: 520px) { .tuiles { grid-template-columns: repeat(2, 1fr); } }
.rappel { padding: 12px 16px; color: var(--alerte); font-weight: 600; font-size: 14px; }
.rappel-txt { display: flex; align-items: center; gap: 10px; }
.rappel-txt .ic { flex: none; }
.rappel .lien-petit { padding: 0; margin-left: 28px; }
a.ligne { text-decoration: none; color: inherit; }
.menu-actions { padding: 6px 0 !important; }
.menu-actions button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 18px; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); text-align: left; }
.menu-actions button + button { border-top: 1px solid var(--trait); }
.menu-actions button .ic { color: var(--bleu); flex: none; }
.menu-actions small { display: block; font-size: 12.5px; font-weight: 600; color: var(--texte2); margin-top: 2px; }
.dem-piece .deux-col .deux-col { gap: 8px; }
/* ---- Exports ---- */
.registre-carte { padding: 0; overflow: hidden; }
.registre-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.registre { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.registre th { text-align: left; font-weight: 700; color: var(--texte2); padding: 12px 10px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.registre td { padding: 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.registre .num { text-align: right; white-space: nowrap; }
.registre tr:last-child td { border-bottom: 0; }
@media print {
  .lateral, .dock, .sans-impression, .bandeau, .toast { display: none !important; }
  body { background: #fff !important; }
  .contenu { margin: 0 !important; padding: 0 !important; }
  .carte { box-shadow: none !important; border: 1px solid #ddd; }
  .registre { min-width: 0; font-size: 10.5px; }
}
.graphique { max-width: 620px; margin-left: auto; margin-right: auto; }

/* =====================================================================
   v1.1 : alignement sur les maquettes
   ===================================================================== */
.bureau-seul { display: none !important; }
@media (min-width: 1000px) { .bureau-seul { display: flex !important; } .mobile-seul { display: none !important; } }
.lien-voir { font-size: 14px; font-weight: 700; color: var(--bleu); text-decoration: none; white-space: nowrap; }
.carte-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.carte-tete h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.carte-tete-note { font-size: 12.5px; font-weight: 600; color: var(--texte2); }

/* barre latérale : profil en bas */
.lateral-profil { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--fond); text-decoration: none; color: var(--ink); }
.lateral-profil strong { display: block; font-size: 14px; font-weight: 700; }
.lateral-profil small { display: block; font-size: 12px; font-weight: 600; color: var(--texte2); }
.profil-rond { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }

/* en-têtes de l'accueil */
.entete-accueil { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
.ea-gauche { display: flex; align-items: center; gap: 12px; }
.ea-logo { height: 34px; width: auto; display: block; border-radius: 9px; }
.ea-date { font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.ea-bonjour { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.entete-bureau { align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 4px; }
.entete-bureau h1 { font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.eb-actions { display: flex; gap: 12px; align-items: center; }
.eb-actions .btn { height: 48px; padding: 0 18px; gap: 8px; white-space: nowrap; }
.eb-recherche { width: 300px; }
.page-large { max-width: 1180px !important; }
.accueil-pile { display: flex; flex-direction: column; gap: 16px; }

/* carte sombre (héros) */
.heros { position: relative; overflow: hidden; background: #0B0C10; color: #fff; border-radius: 28px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.heros > * { position: relative; }
.heros .heros-lueur { position: absolute; right: -70px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(81,112,255,.55), rgba(81,112,255,0) 68%); pointer-events: none; }
.heros-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.heros-mois { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; color: #fff; font-size: 15px; font-weight: 700; padding: 0; min-height: 44px; }
.seg-sombre { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.10); }
.seg-sombre button { height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 700; }
.seg-sombre button[aria-selected="true"] { background: #fff; color: var(--ink); }
.heros-ligne { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap; }
.heros-lib { font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.72); }
.heros-lib.petit { font-size: 12.5px; margin-top: 7px; }
.heros-nb { font-size: 44px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin-top: 2px; white-space: nowrap; }
.chip-delta { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(80,210,140,.18); color: #8BE8B6; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; white-space: nowrap; }
.chip-delta.baisse { background: rgba(255,110,100,.18); color: #FFA79F; }
.barre-obj { height: 8px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.barre-obj > div { height: 8px; border-radius: 4px; background: #5170FF; }
.heros-kpis { display: flex; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.heros-kpis > div { flex: 1; min-width: 0; }
.heros-kpis .heros-lib.petit { margin-top: 0; font-size: 12px; color: rgba(255,255,255,.68); }
.heros-kpi { font-size: 15px; font-weight: 700; margin-top: 3px; white-space: nowrap; }

/* tuiles 2 × 2 */
.tuiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tuile2, .carte-stat { background: var(--surface); border: 1px solid rgba(11,12,16,.06); border-radius: 22px; padding: 16px; box-shadow: var(--ombre-carte); min-width: 0; }
.tuile2-lib { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--texte2); }
.tuile2-val { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tuile2-sous { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--texte2); margin-top: 3px; }
.tuile2-sous.pos { color: var(--pos); } .tuile2-sous.neg { color: var(--neg); } .tuile2-sous.alerte-txt { color: var(--alerte); }

/* carte graphique */
.carte-graph { padding: 18px; }
.carte-graph .g-leg { margin-bottom: 12px; }
.g-leg span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--texte2); }
.g-leg i { width: 10px; height: 10px; border-radius: 3px; margin: 0; }
.g-place { width: 100%; min-height: 188px; }

/* bandeau ambre */
.bandeau-ambre { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 22px; background: var(--alerte-fond); color: var(--alerte); text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.3; }
.bandeau-ambre .ba-txt { flex: 1; min-width: 0; }
.bandeau-ambre b { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

/* bureau : grille de l'accueil (maquette Mac) */
.grille-accueil { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.ga-heros { grid-column: span 6; } .ga-stats { grid-column: span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ga-graph { grid-column: span 8; } .ga-envente { grid-column: span 4; }
.ga-ventes { grid-column: span 8; } .ga-afaire { grid-column: span 4; }
.ga-heros .heros { height: 100%; padding: 24px; }
.carte-stat { display: flex; flex-direction: column; justify-content: center; padding: 22px; border-radius: 22px; }
.stat-nb { font-size: 34px; font-weight: 700; letter-spacing: -.035em; margin-top: 10px; white-space: nowrap; }
.ga-graph .carte-graph, .ga-envente .carte, .ga-ventes .carte, .ga-afaire .carte { height: 100%; }
.carte-envente { padding: 20px; }
.carte-envente .ligne { padding: 12px 0; }
.carte-table { padding: 22px 24px; overflow-x: auto; }
.table-ventes { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table-ventes th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--texte2); padding: 8px 8px 10px 0; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.table-ventes td { padding: 11px 8px 11px 0; border-bottom: 1px solid var(--trait); font-weight: 600; white-space: nowrap; }
.table-ventes tr:last-child td { border-bottom: 0; }
.table-ventes .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-ventes td.pos, .table-ventes td.neg { font-weight: 700; }
.table-ventes tbody tr { cursor: pointer; } .table-ventes tbody tr:hover td { background: var(--fond); }
.carte-acompleter { padding: 22px 20px; }
.afaire { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; text-decoration: none; color: var(--ink); }
.afaire + .afaire { border-top: 1px solid var(--trait); }
.afaire > .ic:first-child { color: var(--alerte); margin-top: 1px; }
.afaire > .ic:last-child { color: var(--texte2); margin-top: 2px; }
.afaire div { flex: 1; min-width: 0; }
.afaire strong { display: block; font-size: 14.5px; font-weight: 700; }
.afaire span { display: block; font-size: 13px; font-weight: 600; color: var(--texte2); margin-top: 2px; line-height: 1.35; }
.afaire-ok { display: flex; gap: 8px; align-items: center; color: var(--pos); font-weight: 700; }
@media (min-width: 1000px) and (max-width: 1250px) {
  .ga-heros, .ga-stats { grid-column: span 12; }
  .eb-recherche { width: 200px; }
}

#nav-lateral { display: flex; flex-direction: column; gap: 4px; flex: 1; }
/* segment (maquettes) */
.segment { padding: 2px; border-radius: 11px; background: var(--champ); gap: 2px; }
.segment button { height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink); }
.segment button[aria-selected="true"] { font-weight: 700; box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 3px 8px rgba(0,0,0,.10); }
/* bilans */
.mois-pilule { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: 6px; }
.mois-pilule .mois-lib { font-size: 16px; font-weight: 700; }
.rond-gris { width: 40px; height: 40px; border-radius: 50%; background: var(--champ); color: var(--ink); border: 1px solid var(--trait); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.rond-gris[disabled] { opacity: .35; }
.hb-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hb-lib { font-size: 13.5px; font-weight: 700; color: var(--texte2); }
.hb-nb { font-size: 44px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin-top: 6px; white-space: nowrap; }
.hb-sous { font-size: 13px; font-weight: 600; color: var(--texte2); margin-top: 4px; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-pos { background: var(--pos-fond); color: var(--pos); } .badge-neg { background: var(--neg-fond); color: var(--neg); } .badge-neutre { background: var(--champ); color: var(--ink); }
.g-leg i.tiret { width: 14px; height: 3px; border-radius: 2px; background: var(--ink); }
.carte-calc { padding: 18px; }
.carte-calc h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 2px; }
.calc-ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: 15px; font-weight: 600; }
.calc-lib { color: var(--texte2); } .calc-aide { font-size: 12.5px; font-weight: 600; color: var(--texte2); margin-top: 1px; }
.calc-val { white-space: nowrap; }
.calc-ligne.fort { font-weight: 700; } .calc-ligne.fort .calc-lib { color: var(--ink); }
.calc-sep { height: 1px; background: var(--trait); }
.carte-info { background: var(--bleu-fond); border-radius: 20px; padding: 16px; display: flex; gap: 12px; }
.carte-info > .ic { color: var(--bleu); margin-top: 1px; }
.ci-titre { font-size: 15px; font-weight: 700; }
.carte-info p { font-size: 13.5px; font-weight: 600; margin-top: 4px; line-height: 1.45; }
.ci-lien { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 700; color: var(--bleu-texte); text-decoration: none; min-height: 32px; }
.temps { display: flex; justify-content: space-between; gap: 12px; }
.temps-nb { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }

#b-contenu, #l-liste, #c-liste, #s-liste, #x-contenu { display: flex; flex-direction: column; gap: 16px; }
/* stock (maquette) */
.entete-boutons { display: flex; gap: 8px; }
.resume3 { display: flex; gap: 12px; padding: 18px; }
.resume3 > div { flex: 1; min-width: 0; }
.resume3 small { display: block; font-size: 12.5px; font-weight: 700; color: var(--texte2); }
.resume3 b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; white-space: nowrap; }
.piece { padding: 16px; cursor: pointer; }
.piece-haut { display: flex; align-items: center; gap: 12px; }
.piece-corps { flex: 1; min-width: 0; }
.piece-nom { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.piece-qte { text-align: right; flex: none; }
.piece-qte b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.piece-qte span { font-size: 14px; font-weight: 700; color: var(--texte2); }
.piece-qte small { display: block; font-size: 12.5px; font-weight: 700; color: var(--texte2); margin-top: 4px; }
.tag-origine { font-size: 12px; font-weight: 700; color: var(--texte2); align-self: center; }
.piece-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--trait); }
.piece-chiffres { display: flex; gap: 18px; }
.piece-chiffres small { display: block; font-size: 12px; font-weight: 600; color: var(--texte2); }
.piece-chiffres .num { font-size: 15px; font-weight: 700; margin-top: 2px; }
.btn-gris { height: 44px; border-radius: 16px; background: var(--champ); color: var(--ink); border: 0; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; white-space: nowrap; }
.info-bas { display: flex; gap: 8px; align-items: flex-start; }
.info-bas .ic { margin-top: 1px; flex: none; }
/* formulaires « pleine page » (Nouvelle vente) */
.page-form { gap: 16px; padding-bottom: calc(var(--bas-secu) + 120px); }
.pile-16 { display: flex; flex-direction: column; gap: 16px; }
.titre-centre { font-size: 17px; font-weight: 700; }
.fv { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fv-lib { font-size: 12.5px; font-weight: 700; color: var(--texte2); padding: 0 2px; }
.fv-sous { font-size: 12.5px; font-weight: 600; color: var(--texte2); padding: 0 4px; }
.fv-champ { width: 100%; min-height: 52px; border-radius: 14px; background: var(--surface); border: 1px solid var(--trait); padding: 0 14px; font-size: 16px; font-weight: 600; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; min-width: 0; }
.fv-champ:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(63,91,242,.14); }
.fv-champ::placeholder { color: var(--faible); font-weight: 600; }
.fv-gros { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.fv-euro { position: relative; }
.fv-euro .fv-champ { padding-right: 36px; }
.fv-euro span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--texte2); pointer-events: none; }
.fv-select { position: relative; }
.fv-select select { padding-right: 40px; }
.fv-select .ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--texte2); pointer-events: none; }
.fv-bouton { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.fv-bouton span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-bouton .ic { color: var(--texte2); }
.fv-vide span { color: var(--faible); }
.fv-vide small { font-size: 12px; font-weight: 600; color: var(--texte2); }
.fv-ligne { display: flex; gap: 8px; align-items: center; }
.info-bleue { display: flex; gap: 10px; background: var(--bleu-fond); color: var(--bleu-texte); border-radius: 16px; padding: 14px; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.info-bleue .ic { margin-top: 1px; flex: none; }
.marge-sombre { position: relative; overflow: hidden; background: #0B0C10; color: #fff; border-radius: 24px; padding: 18px 20px; }
.marge-sombre > * { position: relative; }
.marge-sombre .heros-lueur { position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(81,112,255,.5), rgba(81,112,255,0) 68%); }
.ms-lib { font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.72); }
.ms-nb { font-size: 38px; font-weight: 700; letter-spacing: -.04em; margin-top: 2px; }
.ms-taux { font-size: 13.5px; font-weight: 700; color: #8BE8B6; margin-top: 2px; }
.ms-taux.neg { color: #FFA79F; } .ms-taux.blanc { color: rgba(255,255,255,.85); }
.ms-pied { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.72); flex-wrap: wrap; }
.barre-bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 14px 16px calc(var(--bas-secu) + 16px); background: rgba(243,244,248,.94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid var(--trait); display: flex; justify-content: center; }
.barre-bas .btn { flex: 1; max-width: 688px; height: 54px; gap: 8px; font-size: 16px; }
@media (min-width: 1000px) { .barre-bas { left: 248px; } }
/* exports (maquette) */
.x-intro { font-size: 15px; font-weight: 600; color: var(--texte2); padding: 0 4px; line-height: 1.4; }
.choix-registres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix-registre { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--trait); color: var(--ink); min-height: 104px; }
.choix-registre .ic { margin-bottom: 10px; }
.choix-registre strong { font-size: 15px; font-weight: 700; }
.choix-registre small { font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.choix-registre[aria-pressed="true"] { border: 2px solid var(--bleu); background: var(--bleu-fond); padding: 15px; }
.choix-registre[aria-pressed="true"] .ic { color: var(--bleu-texte); }
.carte-apercu { padding: 18px; }
.registre.apercu { min-width: 0; font-size: 13px; }
.registre.apercu th { padding: 8px 6px 8px 0; font-size: 12px; }
.registre.apercu td { padding: 10px 6px 10px 0; font-weight: 600; }
.impression { display: none; }
@media print {
  body * { visibility: hidden; }
  .impression, .impression * { visibility: visible; }
  .impression { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 0 8mm; }
  .impression h1 { font-size: 20px; margin: 0 0 4px; } .impression p { font-size: 12px; margin: 0 0 12px; }
  .impression .registre { min-width: 0; font-size: 10.5px; } .impression .registre td, .impression .registre th { padding: 5px 6px; }
}
/* ---- barre d'onglets iPhone v1.3 : icônes seules + bouton central surélevé ---- */
.dock { bottom: calc(var(--bas-secu) + 12px); padding: 0 20px; }
.onglets {
  position: relative; width: 100%; max-width: 420px; height: 66px; margin: 0 auto; padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 0;
  border-radius: 33px; background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 18px 40px -16px rgba(11,12,16,.35), 0 0 0 .5px rgba(60,60,67,.14);
  pointer-events: auto;
}
.onglet {
  position: relative; flex: 1; height: 54px; border: 0; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center; color: #8E8E93; border-radius: 27px;
}
.onglet .ic { width: 26px; height: 26px; transition: transform .15s ease; }
.onglet[aria-current="page"] { background: transparent; color: var(--bleu); }
.onglet[aria-current="page"]::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--bleu); }
.onglet:active .ic { transform: scale(.9); }
.onglet-plus {
  flex: none; width: 62px; height: 62px; margin: -34px 6px 0; border-radius: 50%; padding: 0;
  border: 5px solid #fff; background: linear-gradient(160deg, #5170FF, #3F5BF2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 24px -8px rgba(63,91,242,.75), 0 2px 6px rgba(11,12,16,.12);
}
.onglet-plus .ic { width: 26px; height: 26px; }
.onglet-plus:active { transform: scale(.95); }
.onglet[aria-current="page"] .ic { transform: translateY(-3px); } .onglet[aria-current="page"]::after { bottom: 4px; }
/* ---- v1.4 harmonie : un seul rythme vertical partout ----
   blocs séparés de 16 px ; un titre de section est à 24 px du bloc précédent et à 10 px de sa carte */
#p-liste, .bloc-envente { display: flex; flex-direction: column; gap: 16px; }
.section-titre { margin: 8px 0 -6px; padding: 0 4px; min-height: 24px; align-items: baseline; }
.page > .section-titre:first-child, #p-liste > .section-titre:first-child, #l-liste > .section-titre:first-child, #c-liste > .section-titre:first-child, .bloc-envente > .section-titre:first-child { margin-top: 0; }
.section-titre h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.section-titre .lien-voir, .section-titre .legende { line-height: 1.2; }
.carte-tete { align-items: baseline; margin-bottom: 12px; }
.carte-tete h2, .carte-calc h2 { font-size: 17px; line-height: 1.2; }
.g-tab { margin-top: 4px; }
.g-tab summary { min-height: 36px; }
.page { padding-bottom: calc(var(--bas-secu) + 150px); }
.page-form { padding-bottom: calc(var(--bas-secu) + 120px); }
@media (min-width: 1000px) { .page { padding-bottom: 56px; } }
.page > div:empty, .page > section:empty { display: none; }

.chip-bouton { border: 0; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lien-inline { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--bleu-texte); cursor: pointer; }
.lien-sombre { border: 0; background: none; padding: 0; text-align: left; color: #fff !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.fv-temps { display: flex; align-items: center; gap: 6px; }
.fv-temps input { flex: 1; min-width: 0; text-align: center; padding: 0 6px; }
.fv-temps span { font-size: 13px; font-weight: 700; color: var(--texte2); }
/* petits iPhone (375 px) : le haut de la carte noire tient sur une ligne */
.heros-haut { flex-wrap: nowrap; min-width: 0; }
.heros-kpis .heros-lib.petit { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) {
  .heros { padding: 18px 16px; }
  .heros-mois { font-size: 14px; gap: 4px; }
  .seg-sombre button { padding: 0 9px; font-size: 12.5px; }
  .heros-nb { font-size: 40px; }
  .heros-kpis { gap: 8px; }
  .heros-kpi { font-size: 14px; }
}

/* ---------- v1.6 ---------- */
[hidden] { display: none !important; }

/* pastille catégorie + numéro de référence (Produits, Accueil, Ventes) */
.avatar-ref { flex-direction: column; gap: 1px; line-height: 1.05; letter-spacing: 0; }
.avatar-ref span { font-size: 10px; font-weight: 700; color: var(--texte2); letter-spacing: .04em; }
.avatar-ref b { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ligne-produit { padding: 11px 0; }
.ligne-produit .ligne-titre { font-size: 16px; }
.ligne-produit .ligne-sous { font-size: 13px; }
.ligne-produit .ligne-montant { font-size: 16px; }
.ligne-produit .ligne-note { font-weight: 600; color: #8E8E93; }

/* champs de date (iPhone) : même hauteur que les autres champs, texte calé à gauche et centré verticalement */
input[type="date"].champ, input[type="date"].fv-champ {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%;
  box-sizing: border-box; text-align: left; padding: 0 14px; font-size: 16px;
}
input[type="date"].champ { height: 48px; line-height: 48px; }
input[type="date"].fv-champ { height: 52px; line-height: 50px; }
input[type="date"].regl-date { height: 44px; line-height: 44px; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 0; }
input[type="date"]::-webkit-datetime-edit { padding: 0; line-height: inherit; }
input[type="date"]::-webkit-calendar-picker-indicator { margin: 0; }
.deux-col > * { min-width: 0; }

/* segment dans les formulaires (main propre / envoi) */
.segment-form { margin-bottom: 0; }
.segment-form button { height: 40px; }

/* ---------- v1.7 : lignes cliquables des bilans ---------- */
.calc-bouton { display: block; width: 100%; padding: 0; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.calc-bouton:active { opacity: .6; }

/* ---------- v1.7 : espacements réguliers dans les formulaires ----------
   Chaque bloc « titre + champ » est séparé du précédent par 14 px,
   le titre est à 6 px de son champ, qu'il soit seul ou sur deux colonnes. */
.formulaire .deux-col { margin-top: 14px; }
.formulaire .deux-col .deux-col { margin-top: 0; }
.formulaire:not(form) .deux-col .champ-lib { margin: 0 0 6px !important; }
.formulaire > .deux-col:first-child, .formulaire h3 + .deux-col { margin-top: 0; }
.formulaire:not(form) h3 + .champ-lib { margin-top: 0; }
.feuille-groupe .segment:last-child { margin-bottom: 0; }
.feuille-groupe .segment + .segment { margin-top: 10px; }
.feuille-groupe > .segment, .feuille-groupe > .note-fiche:last-child { margin-bottom: 0; }

/* ---------- v1.8 : fiche produit (maquette « Fiche produit ») ---------- */
.fp { gap: 14px; }
.fp-tete { display: flex; align-items: center; gap: 14px; padding: 2px 4px 2px; }
.fp-avatar { width: 58px; height: 58px; border-radius: 17px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.05); flex: none; }
.fp-avatar span { font-size: 11px; }
.fp-avatar b { font-size: 18px; }
.fp-tete-txt { min-width: 0; flex: 1; }
.fp-tete-txt h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; overflow-wrap: anywhere; }
.fp-tete-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--texte2); flex-wrap: wrap; }
.fp-actions { gap: 10px; flex: none; }
.fp-actions .fp-btn { width: 170px; height: 46px; }

.fp-colonnes, .fp-col { display: flex; flex-direction: column; gap: 14px; }
.fp-heros { padding: 18px; }
.fp-heros-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fp-heros-lib { font-size: 13px; font-weight: 700; color: var(--texte2); }
.fp-heros-nb { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.fp-roi { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--pos-fond); color: var(--pos); font-size: 13px; font-weight: 700; white-space: nowrap; }
.fp-roi-neg { background: var(--neg-fond); color: var(--neg); }
.fp-tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.fp-tuile { background: var(--fond); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.fp-tuile-lib { font-size: 12px; font-weight: 700; color: var(--texte2); }
.fp-tuile-val { font-size: 16px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-tuile-val .chip-completer { font-size: 11px; padding: 0 7px; height: 22px; }
.fp-note { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--texte2); line-height: 1.4; }

.fp-carte { padding: 18px; }
.fp-carte h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; }
.fp-carte-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fp-carte-tete span { font-size: 13px; font-weight: 600; color: var(--texte2); }
.fp-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; column-gap: 12px; }
.fp-fait { min-width: 0; }
.fp-fait-lib { font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.fp-fait-val { font-size: 15px; font-weight: 700; margin-top: 3px; overflow-wrap: anywhere; }
.fp-fait-val .chip-completer { margin-top: 1px; }
.fp-notes { margin-top: 16px; }
.fp-notes p { margin: 3px 0 0; font-size: 14px; font-weight: 500; line-height: 1.4; }
.fp-pied { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--trait); font-size: 12.5px; font-weight: 600; color: var(--faible); }
.fp-liste { margin-top: -4px; }

.fp-replie { padding: 0 18px; }
.fp-replie summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; }
.fp-replie summary::-webkit-details-marker { display: none; }
.fp-replie summary .ic { color: var(--faible); flex: none; transition: transform .15s ease; }
.fp-replie[open] summary .ic { transform: rotate(90deg); }
.fp-replie[open] { padding-bottom: 18px; }
.fp-replie-titre { display: block; font-size: 17px; font-weight: 700; }
.fp-replie-sous { display: block; font-size: 13px; font-weight: 600; color: var(--texte2); margin-top: 2px; }

/* boutons : toujours la même taille, deux par deux */
.fp-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.fp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 12px; border-radius: 16px; border: 0; font: inherit; font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer; min-width: 0; }
.fp-btn:active { opacity: .7; }
.fp-btn .ic { width: 20px; height: 20px; flex: none; }
.fp-btn-doux { background: var(--bleu-fond); color: var(--bleu-texte); height: 48px; font-size: 15px; border-radius: 14px; }
.fp-btn-blanc { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--trait); }
.fp-btn-bleu { background: var(--bleu); color: #fff; }
.fp-btn-danger { background: var(--neg-fond); color: var(--neg); }
.fp-barre {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 -16px calc(-1 * (var(--bas-secu) + 28px));
  padding: 12px 16px calc(var(--bas-secu) + 14px); background: rgba(242,242,247,.92); border-top: 1px solid var(--trait);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.fp-barre .fp-btn { height: 52px; }
.fp-barre .fp-btn-seul, .fp-actions .fp-btn-seul { grid-column: 1 / -1; }

@media (min-width: 1000px) {
  .fp-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .fp-col { gap: 20px; }
  .fp-tete { padding-top: 6px; }
  .fp-tete-txt h1 { font-size: 32px; }
  .fp-avatar { width: 64px; height: 64px; }
  .fp-heros { padding: 22px; }
  .fp-heros-nb { font-size: 40px; }
  .fp-carte { padding: 22px; }
  .fp-replie { padding: 0 22px; }
  .fp-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; column-gap: 14px; }
}

/* ---------- v1.8.1 : Produits sur deux colonnes (ordinateur) ---------- */
.p-colonnes, .p-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1000px) {
  .p-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
}

/* ---------- v1.9 : listes Ventes et Stock allégées, Nouvelle vente regroupée ---------- */
.puces:empty { display: none; }
.ligne-afaire { font-size: 12.5px; font-weight: 700; color: var(--alerte); margin-top: 3px; }
.l-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.l-case { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 20px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.l-case[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.l-case-lib { font-size: 12.5px; font-weight: 700; color: var(--texte2); }
.l-case-lib.alerte-txt { color: var(--alerte); }
.l-case-val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.l-case-sous { font-size: 12.5px; font-weight: 600; color: var(--texte2); }
.puce .ic { width: 14px; height: 14px; vertical-align: -2px; }

.avatar-cat { font-size: 11px; letter-spacing: .02em; }
.s-valeur { padding: 16px 18px; }
.s-valeur-lib { font-size: 13px; font-weight: 700; color: var(--texte2); }
.s-valeur-nb { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.s-valeur-sous { font-size: 13px; font-weight: 600; margin-top: 4px; }

.nv { gap: 14px; }
.nv-produit { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 22px; background: var(--ink); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.nv-produit .avatar-ref { background: rgba(255,255,255,.12); }
.nv-produit .avatar-ref span { color: #AEAEB2; }
.nv-produit .avatar-ref b { color: #fff; }
.nv-produit-txt { flex: 1; min-width: 0; }
.nv-produit-txt b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-produit-txt small { display: block; font-size: 12.5px; font-weight: 600; color: #AEAEB2; margin-top: 2px; }
.nv-apercu { text-align: right; flex: none; }
.nv-apercu small { display: block; font-size: 12px; font-weight: 700; color: #AEAEB2; }
.nv-apercu b { display: block; font-size: 20px; font-weight: 700; }
.nv-apercu b.pos { color: #5FD39B; }
.nv-apercu b.neg { color: #FF8A80; }
.nv-carte { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.nv-carte h2 { font-size: 17px; font-weight: 700; margin: 0; }
.nv-carte .fv-champ { background: var(--champ); border-color: transparent; }
.nv-carte .fv-champ:focus { background: var(--surface); border-color: var(--bleu); }
.nv-carte .segment { margin-bottom: 0; }
.nv-recu { justify-content: space-between; }
.nv-recu small { font-size: 12px; font-weight: 600; color: var(--texte2); }
.nv-recu-oui { background: var(--pos-fond) !important; color: var(--pos); }
.nv-recu-oui small { color: var(--pos); opacity: .8; }
.nv-details { padding: 0 18px; gap: 0; }
.nv-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; }
.nv-details summary::-webkit-details-marker { display: none; }
.nv-details summary b { display: block; font-size: 17px; font-weight: 700; }
.nv-details summary small { display: block; font-size: 13px; font-weight: 600; color: var(--texte2); margin-top: 2px; }
.nv-details summary .ic { color: var(--faible); flex: none; transition: transform .15s ease; }
.nv-details[open] summary .ic { transform: rotate(90deg); }
.nv-details-corps { padding-bottom: 18px; }
.ligne-produit .ligne-note.pos { color: var(--pos); }
.ligne-produit .ligne-note.neg { color: var(--neg); }
#v-reste:empty { display: none; }

/* ---------- v1.9.2 : menu « ··· » des feuilles ---------- */
.feuille { position: relative; }
.feuille-tete-boutons { display: flex; gap: 8px; flex: none; }
.pastille-menu[aria-expanded="true"] { background: var(--ink); color: #fff; }
.menu-pop { position: absolute; right: 60px; top: 62px; z-index: 5; width: 250px; background: rgba(255,255,255,.98); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.22); overflow: hidden; animation: fondu .12s ease; }
.menu-pop button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 48px; padding: 0 16px; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer; }
.menu-pop button + button { border-top: 1px solid var(--trait); }
.menu-pop button.danger { color: var(--neg); border-top: 6px solid var(--fond); }
.menu-pop button .ic { color: var(--texte2); }
.menu-pop button.danger .ic { color: var(--neg); }
.menu-pop button:active { background: var(--fond); }

/* ---------- v1.9.3 : moins de phrases d'aide ; poignée des feuilles ---------- */
.info-ligne, .info-bas { display: none !important; }
.feuille-poignee { cursor: grab; touch-action: none; padding: 6px 0; background-clip: content-box; height: 17px; box-sizing: border-box; margin-top: -6px; margin-bottom: 4px; }
.feuille { overscroll-behavior: contain; }
a.carte-info { text-decoration: none; color: inherit; align-items: center; }
a.carte-info .ic:last-child { margin-left: auto; color: var(--faible); }

/* ---------- v1.10 : Paramètres et photo de profil ---------- */
.profil-rond { overflow: hidden; }
.profil-rond img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ea-profil { display: flex; text-decoration: none; }
.ea-profil .profil-rond { width: 44px; height: 44px; font-size: 15px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--bleu-logo, #5170FF); }
.pr { gap: 22px; }
.pr-tete { display: flex; align-items: center; gap: 12px; }
.pr-tete h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.pr-profil { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pr-photo { position: relative; padding: 3px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #5170FF, #0B0C10); cursor: pointer; }
.pr-grand { width: 98px; height: 98px; font-size: 32px; border: 3px solid var(--fond); box-sizing: border-box; }
.pr-photo-badge { position: absolute; right: 0; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--bleu); color: #fff; border: 3px solid var(--fond); display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.pr-nom { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pr-groupe { font-size: 13px; font-weight: 700; color: var(--texte2); text-transform: uppercase; letter-spacing: .04em; padding: 0 6px; margin-bottom: 8px; }
.pr-carte { padding: 0 16px; border-radius: 18px; }
.pr-rang { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pr-rang + .pr-rang { border-top: 1px solid var(--trait); }
.pr-rang[disabled] { cursor: default; opacity: 1; }
.pr-lib { flex: 1; font-size: 16px; font-weight: 600; }
.pr-val { font-size: 15px; font-weight: 500; color: var(--texte2); max-width: 58%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-rang .ic { color: var(--faible); flex: none; }
.pr-rouge .pr-lib { color: var(--neg); }
.pr-deconnexion { height: 52px; border: 0; border-radius: 18px; background: var(--surface); color: var(--neg); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.pr-version { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--faible); margin-top: -12px; }
.ph-cadre { position: relative; width: 100%; aspect-ratio: 1; max-width: 360px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: #2C2C2E; touch-action: none; }
.ph-cadre canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.ph-rond { position: absolute; inset: 6%; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 0 600px rgba(0,0,0,.5); pointer-events: none; }
.ph-vide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; pointer-events: none; }
.ph-zoom { width: 100%; margin-top: 14px; accent-color: var(--bleu); }

/* ---------- v1.11 : Statistiques ---------- */
.st { gap: 16px; }
.st-entete-page { display: flex; flex-direction: column; gap: 14px; padding: 0 4px; }
.st-entete-page h1 { font-size: 32px; font-weight: 700; letter-spacing: -.03em; }
.st-periode { margin: 0 -4px; }
.st-grille, .st-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-kpi { padding: 12px; border-radius: 16px; }
.st-kpi-lib { font-size: 12px; font-weight: 700; color: var(--texte2); }
.st-kpi-val { font-size: 19px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.st-carte { padding: 18px; }
.st-carte h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.st-rep { display: flex; align-items: center; gap: 18px; }
.st-donut { width: 130px; height: 130px; flex: none; }
.st-legs { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-leg { display: flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; width: 100%; }
div.st-leg { cursor: default; }
.st-leg-lib { flex: 1; }
.st-leg .ic { color: var(--faible); transition: transform .15s ease; }
.st-leg[aria-expanded="true"] .ic { transform: rotate(180deg); }
.st-pastille { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.st-detail { margin: -2px 0 0 18px; padding: 8px 12px; border-radius: 12px; background: var(--fond); display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texte2); }
.st-detail div { display: flex; justify-content: space-between; }
.st-tete { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.st-tete h2 { margin: 0; }
.st-seg { margin-bottom: 0; }
.st-seg .bureau-txt { display: none; }
.st-ligne { display: grid; grid-template-columns: 1.5fr .6fr .9fr .9fr .9fr; gap: 6px; align-items: center; padding: 10px 0; border-top: 1px solid var(--trait); font-size: 14px; font-weight: 600; }
.st-ligne span:not(:first-child) { text-align: right; }
.st-entete { border-top: 0; font-size: 11.5px; font-weight: 700; color: var(--texte2); padding: 12px 0 4px; }
.st-mac { display: none; }
.st-nom, .st-fort { font-weight: 700; }
.st-gris { color: var(--texte2); }
.st-pied { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--texte2); }
.st-tf .segment { margin-bottom: 14px; }
.st-sous { font-size: 13px; font-weight: 700; color: var(--texte2); margin-bottom: 2px; }
.st-sep { height: 1px; background: var(--trait); margin: 12px 0; }
.st-top { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.st-rang { width: 18px; font-size: 14px; font-weight: 700; color: var(--faible); flex: none; }
.st-top-txt { flex: 1; min-width: 0; }
.st-top-txt b { display: block; font-size: 15px; font-weight: 700; }
.st-top-txt small { display: block; font-size: 12.5px; font-weight: 600; color: #8E8E93; margin-top: 1px; }
.st-top-val { font-size: 17px; font-weight: 700; white-space: nowrap; }
@media (min-width: 1000px) {
  .st-entete-page { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .st-entete-page h1 { font-size: 34px; letter-spacing: -.035em; }
  .st-periode { width: 300px; margin: 0; }
  .st-grille { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
  .st-col { gap: 20px; }
  .st-kpi-val { font-size: 20px; }
  .st-carte { padding: 20px; }
  .st-rep { flex-direction: column; align-items: stretch; }
  .st-donut { width: 170px; height: 170px; align-self: center; }
  .st-tete { flex-direction: row; align-items: center; justify-content: space-between; }
  .st-seg { width: auto; }
  .st-seg button { padding: 0 14px; }
  .st-seg .mobile-txt { display: none; }
  .st-seg .bureau-txt { display: inline; }
  .st-ligne { grid-template-columns: 2fr repeat(6, minmax(0, 1fr)); gap: 10px; padding: 11px 0; }
  .st-entete { font-size: 12px; padding: 16px 0 4px; }
  .st-mac { display: block; }
  .st-tf-grille { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .st-tf-carte { padding: 16px 20px 8px; }
  .st-tf-titre { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
  .st-point { width: 8px; height: 8px; border-radius: 4px; flex: none; }
  .st-tf-sous { font-size: 12.5px; font-weight: 600; color: #8E8E93; margin: 2px 0 4px 16px; }
  .st-tf-carte .st-top + .st-top { border-top: 1px solid var(--trait); }
  .st-tf-carte .st-rang { width: 26px; height: 26px; border-radius: 13px; background: var(--fond); color: var(--texte2); font-size: 13px; display: flex; align-items: center; justify-content: center; }
}
.st-seg button, .st-entete span { white-space: nowrap; }
@media (min-width: 1000px) { .st-ligne { grid-template-columns: 1.6fr repeat(6, minmax(0, 1fr)); } }
.st-chev-vide { width: 14px; flex: none; }
.st-leg .ic { width: 14px; height: 14px; flex: none; }

/* v1.11.2 — colonnes du tableau centrées sous leur titre */
.st-ligne span:not(:first-child) { text-align: center; }
.st-ligne { grid-template-columns: minmax(0, 1.6fr) .5fr 1fr 1fr 1fr; }

@media (min-width: 1000px) { .st-ligne { grid-template-columns: 1.6fr repeat(6, minmax(0, 1fr)); } }

/* v1.12 — graphique en courbes de l'Accueil */
.gc-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.gc-titre { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; min-width: 0; }
.gc-titre h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.gc-bascule { flex: none; width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--champ, #EBEBF0); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.gc-vals { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; font-size: 15px; font-weight: 700; }
.gc-mois { font-size: 13px; color: var(--texte2); }
.carte-graph .gc-leg { margin: 12px 0 0; }
.gc-titre .gc-leg { margin: 0; }
.g-leg i.trait { width: 14px; height: 3px; border-radius: 2px; }
.g-leg i.tiret-gris { width: 14px; height: 0; border-radius: 0; background: none !important; border-top: 2px dashed #AEAEB2; }
@media (min-width: 1000px) { .gc-titre h2 { font-size: 19px; } }
.st-tf-h { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.legende-bascule { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 6px 0 6px 8px; margin: -6px 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--bleu-texte); cursor: pointer; }

/* ============================================================
   v1.13 : activité Formation (modes, barre latérale à deux sections)
   ============================================================ */
@media (min-width: 1000px) {
  .lateral { overflow-y: auto; gap: 2px; }
  .lateral-logo { padding-bottom: 14px; }
  .lateral-lien { height: 40px; }
  .lateral-titre { font-size: 12px; font-weight: 700; color: var(--texte2); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px 4px; }
  .lateral-titre-fo { border-top: 1px solid var(--trait); margin-top: 8px; padding-top: 14px; }
  .lateral-commun { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--trait); display: flex; flex-direction: column; gap: 2px; }
  .lateral-profil { margin-top: 8px; }
}
.entete-mode { font-size: 12.5px; font-weight: 700; color: var(--bleu-logo); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.bascule-mode {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; margin-top: 14px; padding: 0 18px;
  border: 0; border-radius: var(--r-carte); background: var(--ink); color: #fff; font: inherit; text-align: left; cursor: pointer;
}
.bascule-mode > .ic { color: var(--faible); flex: none; }
.bascule-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--bleu-logo); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.bascule-txt { flex: 1; min-width: 0; }
.bascule-txt strong { display: block; font-size: 17px; font-weight: 700; }
.bascule-txt small { display: block; font-size: 13px; font-weight: 600; color: var(--faible); margin-top: 2px; }
.avatar-rond { border-radius: 50%; background: var(--bleu-fond); color: var(--bleu-texte); font-size: 15px; font-weight: 700; }
.fo-mrr { padding: 18px; }
.fo-mrr-val { font-size: 36px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fo-badge { font-size: 14px; font-weight: 700; border-radius: 8px; padding: 2px 8px; letter-spacing: 0; }
.fo-badge.pos { color: var(--pos); background: var(--pos-fond); } .fo-badge.neg { color: var(--neg); background: var(--neg-fond); }
.fo-mrr-sous { font-size: 13px; font-weight: 600; color: var(--texte2); margin-top: 4px; }
.fo-mois { padding: 6px 18px; }
.fo-mois-l { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--texte2); }
.fo-mois-l + .fo-mois-l { border-top: 1px solid var(--trait); }
.fo-mois-l span:last-child { font-variant-numeric: tabular-nums; }
.fo-mois-l.total { color: var(--ink); font-size: 17px; font-weight: 700; }
.fo-vide { text-align: center; }
.txt-pos { color: var(--pos) !important; } .txt-neg { color: var(--neg) !important; } .txt-alerte { color: var(--alerte) !important; }
@media (min-width: 1000px) {
  .fo-grille { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .tuiles4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* v1.13.1 : barre latérale compacte, tout tient sans défiler */
@media (min-width: 1000px) {
  .lateral { padding: 14px 12px 12px; gap: 1px; }
  .lateral-logo { padding: 2px 10px 8px; }
  .lateral-logo img { height: 24px; }
  .lateral-lien { height: 34px; gap: 10px; padding: 0 10px; border-radius: 10px; font-size: 14px; }
  .lateral-lien .ic { width: 18px; height: 18px; }
  .lateral-titre { font-size: 11px; padding: 8px 10px 3px; }
  .lateral-titre-fo { margin-top: 6px; padding-top: 10px; }
  .lateral-commun { padding-top: 6px; gap: 1px; }
  .lateral-profil { margin-top: 6px; padding: 7px 8px; border-radius: 12px; }
  .lateral-profil .profil-rond { width: 30px !important; height: 30px !important; }
  .lateral-profil strong { font-size: 13px; } .lateral-profil small { font-size: 11px; }
}
/* v1.13.3 */
.fo-grille { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1000px) { .fo-grille { display: grid; } }
.fo-mois-titre { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin: 12px 0 2px; }
.fo-graph-vide { margin: 14px 0 4px; font-size: 14px; font-weight: 600; color: var(--texte2); }
/* v1.13.4 : symboles larges (person.2, banknote…) à la même taille optique que les autres */
.ic { scale: var(--k, 1); }   /* propriété "scale" séparée : ne gêne pas les "transform" (onglet actif, etc.) */
/* v1.14 : charges récurrentes */
.segmente { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--champ); }
.segmente button { flex: 1; height: 34px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.segmente button[aria-pressed="true"] { background: var(--surface); font-weight: 700; box-shadow: 0 1px 3px rgba(11,12,16,.12); }
.encart-recur { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-champ); background: var(--bleu-fond); color: var(--bleu-texte); font-size: 14px; font-weight: 600; line-height: 1.35; }
.encart-recur .ic { flex: none; }
.avatar-bleu { background: var(--bleu-fond) !important; color: var(--bleu-texte) !important; }
.pastille-recur { display: inline-flex; align-items: center; gap: 4px; }
.btn-danger-doux { background: var(--neg-fond); color: var(--neg); border: 0; }
.fo-ech { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }
.fo-mois .fo-ech + .fo-ech { border-top: 1px solid var(--trait); }
/* v1.15 : Accueil en tête de la barre latérale, tout tient encore sans défiler */
@media (min-width: 1000px) {
  .lateral-lien { height: 32px; }
  .lateral-logo { padding-bottom: 6px; }
}
@media (min-width: 1000px) { .lateral { padding-top: 12px; padding-bottom: 10px; } }
.bascule-txt strong { font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.bascule-mode { gap: 12px; padding: 0 16px; }
/* v1.15.2 : trois blocs bien séparés (Accueil seul, Achat-revente, Formation) */
@media (min-width: 1000px) {
  .lateral-logo { padding-bottom: 18px; }
  .lateral-lien { height: 31px; }
  .lateral-lien-maison { margin-bottom: 10px; }
  .lateral-titre { margin-top: 0; padding: 12px 10px 4px; border-top: 1px solid var(--trait); }
  .lateral-titre-fo { margin-top: 10px; padding-top: 12px; }
}
@media (min-width: 1000px) and (max-height: 760px) {
  .lateral-lien { height: 29px; }
  .lateral-logo { padding-bottom: 14px; }
}
