/* Carnet · v0.9 « Bic & surligneur »
   Un carnet d'adresses qu'on écrit au stylo bille bleu et qu'on annote au surligneur fluo.
   Papier blanc, encre marine pour le texte, bleu Bic pour agir, fluo pour ce qui compte maintenant. */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("polices/bricolage.woff2") format("woff2-variations"), url("polices/bricolage.woff2") format("woff2");
}

:root {
  /* Papier et encre */
  --fond: #ffffff;
  --fond-doux: #f4f5fa;
  --fond-survol: rgba(20, 26, 58, 0.05);
  --fond-actif: rgba(20, 26, 58, 0.085);
  --texte: #2b3050;
  --texte-fort: #141a3a;
  --doux: #666b85;
  --pale: #9a9eb4;
  --bord: #e3e5ef;
  --filet: #eceef5;
  /* Bic : tout ce qui agit */
  --accent: #2448f2;
  --accent-fort: #1a36c9;
  --accent-fond: rgba(36, 72, 242, 0.09);
  /* Surligneurs : ce qui compte maintenant */
  --fluo: #ffe14a;
  --fluo-doux: rgba(255, 225, 74, 0.55);
  --fluo-rose: #ff5fa2;
  --surligneur: var(--fluo);
  --sur-accent: #ffffff;
  --rouge: #e5484d;
  --vert: #138a5e;
  --ombre: 0 0 0 1px rgba(20, 26, 58, 0.06), 0 6px 16px rgba(20, 26, 58, 0.08), 0 18px 44px rgba(20, 26, 58, 0.12);
  --ombre-douce: 0 1px 2px rgba(20, 26, 58, 0.06);
  --ombre-flottant: 0 0 0 1px rgba(20, 26, 58, 0.06), 0 10px 30px rgba(20, 26, 58, 0.16);
  --rayon: 10px;
  --rayon-l: 18px;
  --verre: rgba(255, 255, 255, 0.82);
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
  --display: "Bricolage", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --callout-info: #f1f3fa;
  --callout-ok: #e8f6ef;
  --callout-attention: #fff6d1;
  --callout-bloquant: #fdeced;

  /* Étiquettes : fond / texte / point */
  --gris-f: #e9eaf0; --gris-t: #3a3e55; --gris-p: #9a9eb4;
  --brun-f: #f1e4dc; --brun-t: #4a2d20; --brun-p: #a1735c;
  --orange-f: #ffe3cc; --orange-t: #5a2c06; --orange-p: #f07c1d;
  --jaune-f: #fff1bf; --jaune-t: #4d3800; --jaune-p: #e8b100;
  --vert-f: #d8f5e6; --vert-t: #0e4430; --vert-p: #1fae6c;
  --bleu-f: #dbe7ff; --bleu-t: #0f2e6b; --bleu-p: #3a73f0;
  --violet-f: #ebe1ff; --violet-t: #3d1f78; --violet-p: #8b5cf6;
  --rose-f: #ffe0ef; --rose-t: #6b1840; --rose-p: #f0529c;
  --rouge-f: #ffe1e1; --rouge-t: #6e1416; --rouge-p: #e5484d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0d1024;
    --fond-doux: #151933;
    --fond-survol: rgba(233, 235, 250, 0.06);
    --fond-actif: rgba(233, 235, 250, 0.1);
    --texte: #c9cce4;
    --texte-fort: #f1f2fb;
    --doux: #9599b8;
    --pale: #6d7193;
    --bord: #262b4a;
    --filet: #1e2240;
    --accent: #7c93ff;
    --accent-fort: #9aabff;
    --accent-fond: rgba(124, 147, 255, 0.15);
    --fluo-doux: rgba(255, 225, 74, 0.3);
    --surligneur: rgba(255, 225, 74, 0.34);
    --sur-accent: #0d1024;
    --rouge: #ff6b6e;
    --vert: #3ccf8e;
    --ombre: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35), 0 18px 44px rgba(0, 0, 0, 0.45);
    --ombre-flottant: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.55);
    --verre: rgba(21, 25, 51, 0.8);
    --callout-info: #171b37;
    --callout-ok: #10291f;
    --callout-attention: #2e2a12;
    --callout-bloquant: #331a22;
    --gris-f: #232845; --gris-t: #dfe1f2;
    --brun-f: #3a2a24; --brun-t: #f3e2d8;
    --orange-f: #46290f; --orange-t: #ffd9b8;
    --jaune-f: #3f3410; --jaune-t: #ffeaa0;
    --vert-f: #0f3526; --vert-t: #bff2d9;
    --bleu-f: #172a5c; --bleu-t: #cddcff;
    --violet-f: #2b1f55; --violet-t: #e1d4ff;
    --rose-f: #4a1a33; --rose-t: #ffd0e6;
    --rouge-f: #4a1a1d; --rouge-t: #ffd4d4;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 14.5px/1.5 var(--police);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--texte-fort); margin: 0; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--fond-survol); padding: 1px 5px; border-radius: 4px; color: #eb5757; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Coquille ---------- */

.coquille { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.barre {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--fond-doux); border-right: 1px solid var(--filet);
  padding: 12px 8px; display: flex; flex-direction: column; gap: 2px;
}
.barre-tete { display: flex; align-items: center; gap: 8px; padding: 6px 10px 10px; font-size: 15px; }
.barre-tete strong { color: var(--texte-fort); }
.badge-local { font-size: 11px; color: var(--doux); background: var(--fond-actif); padding: 0 6px; border-radius: 4px; }
.recherche-rapide {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; margin-bottom: 6px;
  border: 0; background: none; border-radius: var(--rayon); color: var(--doux); cursor: pointer; text-align: left;
}
.recherche-rapide:hover { background: var(--fond-survol); }
.recherche-rapide span { flex: 1; }
kbd { font: 11px var(--police); color: var(--pale); border: 1px solid var(--bord); border-radius: 4px; padding: 0 5px; background: var(--fond); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-lien, .nav-cat {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: var(--rayon); color: var(--texte);
  font-weight: 500;
}
.nav-cat { font-weight: 400; color: var(--doux); padding: 3px 10px 3px 14px; }
.nav-lien:hover, .nav-cat:hover { background: var(--fond-survol); }
.nav-lien.actif { background: var(--fond-actif); color: var(--texte-fort); }
.nav-lien .icone { color: var(--doux); }
.nav-compte { margin-left: auto; font-size: 12px; color: var(--pale); font-weight: 400; }
.barre-section { font-size: 12px; color: var(--pale); font-weight: 500; padding: 16px 10px 4px; }
.nav-categories { display: flex; flex-direction: column; }
.barre-pied { margin-top: auto; display: flex; align-items: center; gap: 4px; padding: 10px 4px 0 10px; border-top: 1px solid var(--filet); font-size: 13px; }
.barre-pied .ellipse { flex: 1; }

.principal { min-width: 0; padding: 36px clamp(16px, 5vw, 64px) 120px; max-width: 1180px; width: 100%; margin: 0 auto; outline: none; }
.bas-nav { display: none; }

/* ---------- Titres ---------- */

.page-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-tete h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.surtitre { color: var(--doux); font-size: 13.5px; margin-bottom: 2px; }
.compte-titre { font-size: 15px; color: var(--pale); font-weight: 500; letter-spacing: 0; vertical-align: middle; }
.titre-page { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; border: 0; background: none; padding: 2px 4px; margin-left: -4px; border-radius: 4px; color: var(--texte-fort); width: 100%; }
.titre-page:hover { background: var(--fond-survol); }
.retour { display: inline-flex; align-items: center; gap: 4px; color: var(--doux); font-size: 13.5px; margin-bottom: 10px; padding: 2px 6px 2px 2px; border-radius: 4px; }
.retour:hover { background: var(--fond-survol); }

/* ---------- Icônes, boutons ---------- */

.icone { display: inline-flex; width: 18px; height: 18px; flex: none; }
.icone svg { width: 100%; height: 100%; }
.icone.grande { width: 32px; height: 32px; color: var(--pale); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--rayon);
  border: 1px solid var(--bord); background: var(--fond); color: var(--texte);
  box-shadow: var(--ombre-douce); cursor: pointer; white-space: nowrap; font-weight: 500; font-size: 14px;
  transition: background 0.12s;
}
.btn:hover { background: var(--fond-survol); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icone { width: 16px; height: 16px; }
.btn.primaire { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primaire:hover { filter: brightness(0.94); background: var(--accent); }
.btn.danger { color: var(--rouge); }
.btn.danger-plein { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn.fantome { border-color: transparent; background: none; box-shadow: none; color: var(--doux); }
.btn.fantome:hover { background: var(--fond-survol); color: var(--texte); }
.btn.icone-seule { width: 32px; padding: 0; }
.btn.petit { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.petit.icone-seule { width: 28px; padding: 0; }
.btn.mini { height: 22px; width: 22px; padding: 0; }
.btn.mini .icone { width: 14px; height: 14px; }
.btn.large { width: 100%; height: 38px; }
.btn.grand { height: 40px; padding: 0 18px; font-size: 15px; }
.btn.occupe { position: relative; color: transparent !important; }
.btn.occupe::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--doux) transparent var(--doux) transparent; animation: tourne 0.8s linear infinite;
}
.btn.primaire.occupe::after { border-color: #fff transparent #fff transparent; }
@keyframes tourne { to { transform: rotate(360deg); } }
.lien { color: var(--accent); font-weight: 500; }
.lien:hover { text-decoration: underline; }
.lien-bouton { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }

/* ---------- Champs ---------- */

.champ {
  height: 32px; padding: 0 10px; border-radius: var(--rayon); border: 1px solid var(--bord);
  background: var(--fond); width: 100%; min-width: 0;
}
textarea.champ { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
select.champ { width: auto; padding-right: 26px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 16px; }
.champ:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.champ.nombre { width: 84px; }
.champ.etroit { width: 92px; flex: none; }
.bloc-champ { display: flex; flex-direction: column; gap: 5px; }
.libelle { font-size: 13px; font-weight: 500; color: var(--doux); }
.aide { font-size: 12.5px; color: var(--pale); }
.erreur-form { color: var(--rouge); font-size: 13.5px; min-height: 1px; }
.erreur-form:empty { display: none; }

.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interrupteur .piste { width: 30px; height: 18px; border-radius: 9px; background: var(--fond-actif); position: relative; flex: none; transition: background 0.15s; box-shadow: inset 0 0 0 1px var(--bord); }
.interrupteur .piste::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.interrupteur input:checked + .piste { background: var(--accent); box-shadow: none; }
.interrupteur input:checked + .piste::after { transform: translateX(12px); }
.interrupteur input:focus-visible + .piste { outline: 2px solid var(--accent); outline-offset: 2px; }
.interrupteur input:disabled + .piste { opacity: 0.5; }

/* ---------- Mise en page ---------- */

.rangee { display: flex; align-items: center; gap: 8px; }
.rangee.serree { gap: 4px; }
.rangee.entre { justify-content: space-between; }
.rangee.droite { justify-content: flex-end; }
.rangee.enveloppe { flex-wrap: wrap; }
.pile { display: flex; flex-direction: column; gap: 14px; }
.pile-serree { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pleine { flex: 1; width: 100%; grid-column: 1 / -1; }
.droite { text-align: right; }
.texte-doux { color: var(--doux); }
.petit-texte { font-size: 12.5px; }
.ellipse { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.deux-lignes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grille-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.liste-simple { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Callouts (fond teinté + emoji, sans bordure) ---------- */

.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--rayon); background: var(--callout-info); line-height: 1.5; }
.callout.ok { background: var(--callout-ok); }
.callout.attention { background: var(--callout-attention); }
.callout.bloquant { background: var(--callout-bloquant); }
.callout-icone { font-size: 17px; line-height: 1.35; flex: none; }
.callout-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.callout-texte strong { color: var(--texte-fort); font-weight: 600; }
.callout + .callout, .callout + .tuiles, .callout + .grille-accueil { margin-top: 10px; }
.principal > .callout { margin-bottom: 14px; }

/* ---------- Pastilles, points, avatars ---------- */

.pastille { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 4px; font-size: 12.5px; white-space: nowrap; line-height: 1; }
.point { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; flex: none; letter-spacing: 0.02em; }
.avatar.t-s { width: 26px; height: 26px; font-size: 11px; }
.avatar.t-m { width: 36px; height: 36px; font-size: 13.5px; }
.avatar.t-l { width: 60px; height: 60px; font-size: 22px; }
.c-gris { background: var(--gris-f); color: var(--gris-t); } .point.c-gris { background: var(--gris-p); }
.c-brun { background: var(--brun-f); color: var(--brun-t); } .point.c-brun { background: var(--brun-p); }
.c-orange { background: var(--orange-f); color: var(--orange-t); } .point.c-orange { background: var(--orange-p); }
.c-jaune { background: var(--jaune-f); color: var(--jaune-t); } .point.c-jaune { background: var(--jaune-p); }
.c-vert { background: var(--vert-f); color: var(--vert-t); } .point.c-vert { background: var(--vert-p); }
.c-bleu { background: var(--bleu-f); color: var(--bleu-t); } .point.c-bleu { background: var(--bleu-p); }
.c-violet { background: var(--violet-f); color: var(--violet-t); } .point.c-violet { background: var(--violet-p); }
.c-rose { background: var(--rose-f); color: var(--rose-t); } .point.c-rose { background: var(--rose-p); }
.c-rouge { background: var(--rouge-f); color: var(--rouge-t); } .point.c-rouge { background: var(--rouge-p); }
.barre-plein.c-gris { background: var(--gris-p); } .barre-plein.c-brun { background: var(--brun-p); } .barre-plein.c-orange { background: var(--orange-p); }
.barre-plein.c-jaune { background: var(--jaune-p); } .barre-plein.c-vert { background: var(--vert-p); } .barre-plein.c-bleu { background: var(--bleu-p); }
.barre-plein.c-violet { background: var(--violet-p); } .barre-plein.c-rose { background: var(--rose-p); } .barre-plein.c-rouge { background: var(--rouge-p); }
.mini-badge { margin-left: 4px; font-size: 12px; }
.etiquettes { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.etiquette { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--doux); background: var(--fond-survol); border-radius: 4px; padding: 0 6px; height: 20px; }
.etiquette::before { content: "#"; color: var(--pale); }
.etiquette button { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: var(--pale); font-size: 14px; line-height: 1; }

.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px;
  border: 1px solid var(--bord); background: var(--fond); cursor: pointer; font-size: 13.5px; white-space: nowrap;
}
.puce:hover { background: var(--fond-survol); }
.puce.active { background: var(--accent-fond); border-color: transparent; color: var(--texte-fort); }
.puce.statique { cursor: default; }
.puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puce .icone { width: 15px; height: 15px; }
.puce-compte { color: var(--pale); font-size: 12px; }

/* ---------- Cartes, tuiles ---------- */

.carte { border: 1px solid var(--bord); border-radius: 10px; padding: 16px 18px; background: var(--fond); display: flex; flex-direction: column; gap: 12px; }
.carte + .carte, .callout + .carte, .carte + .callout, .tuiles + .carte, .carte + .rangee { margin-top: 14px; }
.carte-titre { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tuiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.tuiles.compactes { margin: 0; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.tuile { border: 1px solid var(--bord); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--fond); position: relative; }
a.tuile:hover { background: var(--fond-doux); }
.tuile strong { font-size: 24px; font-weight: 700; color: var(--texte-fort); line-height: 1.2; font-variant-numeric: tabular-nums; }
.tuile span { color: var(--doux); font-size: 13px; }
.tuile-emoji { position: absolute; top: 10px; right: 12px; font-size: 16px; }

.grille-accueil { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pile-serree > .btn, .pile > .btn { align-self: flex-start; }
.colonne .carte + .carte { margin-top: 0; }
.lignes { display: flex; flex-direction: column; }
.ligne-simple, .ligne-cat, .ligne-relance, .ligne-gmail, .ligne-projet, .ligne-mini {
  display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: var(--rayon); min-height: 36px;
}
.ligne-simple.haute { align-items: flex-start; }
a.ligne-simple:hover, a.ligne-cat:hover, a.ligne-gmail:hover, a.ligne-mini:hover, .ligne-relance:hover { background: var(--fond-survol); }
.ligne-simple > :nth-child(2) { flex: 1; min-width: 0; }
.ligne-relance .ligne-lien { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.actions-ligne { display: flex; gap: 2px; opacity: 0.35; transition: opacity 0.12s; }
.ligne-relance:hover .actions-ligne, .ligne-relance:focus-within .actions-ligne { opacity: 1; }
.date-relance { font-size: 12.5px; color: var(--doux); white-space: nowrap; }
.date-relance.retard { color: var(--rouge); font-weight: 500; }
.date-relance.jour { color: var(--accent); font-weight: 500; }
.ligne-cat > span:nth-child(2) { width: 120px; flex: none; }
.barre-fond { flex: 1; height: 6px; background: var(--fond-survol); border-radius: 3px; overflow: hidden; }
.barre-plein { display: block; height: 100%; border-radius: 3px; }
.nombre { font-variant-numeric: tabular-nums; color: var(--doux); width: 28px; text-align: right; }
.carte-nl, .carte-edition { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 8px; border: 1px solid var(--bord); }
.carte-nl:hover, .carte-edition:hover { background: var(--fond-doux); }
.cartes-nl { gap: 10px; }
.progression { height: 6px; border-radius: 3px; background: var(--fond-actif); overflow: hidden; }
.progression span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s; }
.progression.grande { height: 10px; border-radius: 5px; }
.progression.pleine span { background: var(--rouge); }
.pile-serree > strong { color: var(--texte-fort); }

/* ---------- Contacts ---------- */

.barre-outils { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.recherche-zone { position: relative; flex: 1; min-width: 220px; max-width: 520px; }
.recherche-zone .icone { position: absolute; left: 9px; top: 7px; color: var(--pale); width: 17px; height: 17px; }
.recherche-zone .champ { padding-left: 32px; background: var(--fond-doux); border-color: transparent; }
.recherche-zone .champ:focus { background: var(--fond); }
.bascule { display: inline-flex; border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.bascule button { border: 0; background: var(--fond); padding: 0 8px; height: 30px; cursor: pointer; color: var(--doux); display: inline-flex; align-items: center; }
.bascule button + button { border-left: 1px solid var(--bord); }
.bascule button.actif { background: var(--fond-actif); color: var(--texte-fort); }
.filtres { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.filtres-ligne { flex-wrap: wrap; }
.filtres-ligne .champ { height: 30px; font-size: 13.5px; }

.tableau-defile { overflow-x: auto; border-top: 1px solid var(--filet); }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; font-weight: 500; font-size: 13px; color: var(--doux); padding: 7px 8px; border-bottom: 1px solid var(--filet); white-space: nowrap; }
.tableau td { padding: 6px 8px; border-bottom: 1px solid var(--filet); vertical-align: middle; }
.tableau tbody tr { cursor: pointer; }
.tableau tbody tr:hover, .tableau tbody tr.ouvert { background: var(--fond-survol); }
.tableau tr.alerte td { color: var(--rouge); }
.tableau.compact td, .tableau.compact th { padding: 5px 8px; font-size: 13px; }
.tableau .ellipse { max-width: 240px; }
.tableau.statique tbody tr { cursor: default; }
.tableau.statique tbody tr:hover { background: none; }
.tableau .compte { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--doux); }
.tableau.statique th { white-space: normal; }
.tableau.apercu-import td { white-space: nowrap; }
.cats-import { flex-wrap: wrap; gap: 6px; }
.import-titre { font-size: 13.5px; font-weight: 600; margin: 6px 0 -4px; }
.col-case { width: 34px; }
.case { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.cellule-nom { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.cellule-nom strong { font-weight: 500; color: var(--texte-fort); }
.etoile { border: 0; background: none; padding: 0; width: 18px; height: 18px; cursor: pointer; color: var(--bord); display: inline-flex; flex: none; }
.etoile .icone { width: 16px; height: 16px; }
.etoile:hover { color: var(--pale); }
.etoile.oui { color: #e9b10c; }
.etoile.oui svg { fill: #f5c518; stroke: #e9b10c; }
.cartes-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.carte-contact { border: 1px solid var(--bord); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--fond); }
.carte-contact:hover, .carte-contact.ouvert { background: var(--fond-doux); }
.carte-contact strong { color: var(--texte-fort); font-weight: 600; }
.carte-pied { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; align-items: center; }

.barre-groupe {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-radius: 10px;
  background: var(--fond); box-shadow: var(--ombre); flex-wrap: wrap; max-width: calc(100vw - 32px);
}
.barre-groupe .champ { height: 28px; font-size: 13px; }
.barre-groupe { width: max-content; }
.menu-item > .point { margin: 0 4px; }

.vide { text-align: center; padding: 56px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--doux); }
.vide strong { color: var(--texte-fort); font-size: 16px; }
.vide-emoji { font-size: 34px; margin-bottom: 4px; }
.vide .rangee { margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.chargement { display: flex; align-items: center; gap: 10px; color: var(--doux); padding: 24px 4px; }
.rond { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bord); border-top-color: var(--doux); animation: tourne 0.8s linear infinite; }

/* ---------- Fiche (panneau latéral) ---------- */

.tiroir {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); z-index: 40;
  background: var(--fond); box-shadow: var(--ombre); display: flex; flex-direction: column;
  animation: entre-droite 0.18s ease-out; outline: none;
}
.tiroir.sortie { animation: sort-droite 0.16s ease-in forwards; }
@keyframes entre-droite { from { transform: translateX(24px); opacity: 0; } }
@keyframes sort-droite { to { transform: translateX(24px); opacity: 0; } }
.tiroir-barre { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--filet); gap: 8px; }
.indicateur { font-size: 12.5px; color: var(--pale); flex: 1; }
.tiroir-corps { overflow-y: auto; padding: 22px 28px 60px; display: flex; flex-direction: column; gap: 22px; flex: 1; }
.fiche-entete { display: flex; flex-direction: column; gap: 14px; }
.fiche-identite { display: flex; gap: 14px; align-items: center; }
.titre-noms { flex-wrap: wrap; }
.titre-prop {
  font-size: 24px; max-width: 100%; font-weight: 700; letter-spacing: -0.015em; color: var(--texte-fort);
  border: 0; background: none; padding: 1px 4px; border-radius: 4px; min-width: 0; max-width: 100%;
}
.titre-prop:hover, .titre-prop:focus { background: var(--fond-survol); outline: none; }
.titre-prop::placeholder { color: var(--pale); font-weight: 600; }
.sous-titre .champ-prop { color: var(--doux); }
.select-pastille {
  appearance: none; border: 0; border-radius: 4px; height: 26px; padding: 0 22px 0 8px; font-size: 13px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 5px center; background-size: 13px;
}
.select-couleur { appearance: none; border: 0; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: transparent; font-size: 0; flex: none; }
.select-couleur option { color: var(--texte); font-size: 14px; background: var(--fond); }
.actions-rapides { display: flex; gap: 6px; flex-wrap: wrap; }
.action-rapide {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--rayon);
  background: var(--fond-doux); border: 0; cursor: pointer; font-size: 13.5px; color: var(--texte);
}
.action-rapide:hover { background: var(--fond-actif); }
.action-rapide .icone { width: 16px; height: 16px; color: var(--doux); }
.fiche-section { display: flex; flex-direction: column; gap: 2px; }
.fiche-section h3 { font-size: 13px; font-weight: 600; color: var(--doux); padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--filet); }
.prop { display: grid; grid-template-columns: 150px 1fr; align-items: start; gap: 8px; min-height: 34px; }
.prop-lib { display: flex; align-items: center; gap: 7px; color: var(--doux); font-size: 13.5px; padding-top: 6px; }
.prop-lib .icone { width: 16px; height: 16px; color: var(--pale); }
.prop-val { min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 32px; }
.champ-prop {
  border: 0; background: none; border-radius: 4px; padding: 5px 6px; width: 100%; min-width: 0; color: var(--texte);
}
.champ-prop:hover { background: var(--fond-survol); }
.champ-prop:focus { background: var(--fond); outline: none; box-shadow: 0 0 0 2px var(--accent-fond), 0 0 0 1px var(--accent) inset; }
.champ-prop::placeholder { color: var(--pale); }
textarea.champ-prop { resize: none; line-height: 1.55; overflow: hidden; }
.champ-prop.discret { max-width: 60%; }
.champ-prop.etroit { width: 90px; flex: none; }
input[type="date"].champ-prop { width: auto; }
.etiquettes-edit { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fiche-section > .champ-prop { min-height: 80px; }
.ligne-projet { padding: 6px 4px; border-bottom: 1px solid var(--filet); border-radius: 0; }
.ligne-projet strong { flex: 1; font-weight: 500; }
.montant { font-variant-numeric: tabular-nums; color: var(--doux); min-width: 70px; text-align: right; }
.form-projet { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.form-projet .champ { flex: 1; min-width: 120px; }
.form-projet .champ.etroit { flex: none; }
.form-echange { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-echange .rangee .champ { width: auto; height: 28px; font-size: 13px; }
.timeline { display: flex; flex-direction: column; }
.evenement { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--filet); }
.evenement-icone { width: 22px; text-align: center; flex: none; }
.evenement-corps { flex: 1; min-width: 0; }
.evenement-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.ligne-gmail .sens { width: 18px; text-align: center; font-weight: 600; }
.ligne-gmail .sens.recu { color: var(--vert); }
.ligne-gmail .sens.envoye { color: var(--accent); }
.ligne-gmail .ellipse { flex: 1; }
.ligne-mini { padding: 3px 4px; min-height: 28px; font-size: 13.5px; }
.ligne-mini > span:first-child { flex: 1; }
.fiche-pied { padding-top: 8px; }

/* ---------- Fenêtres, menus, toasts ---------- */

.modal-fond {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 15, 15, 0.42);
  display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; overflow-y: auto;
  animation: apparait 0.12s ease-out;
}
.modal-fond.sortie { opacity: 0; transition: opacity 0.12s; }
@keyframes apparait { from { opacity: 0; } }
.modal { width: min(520px, 100%); background: var(--fond); border-radius: 10px; box-shadow: var(--ombre); display: flex; flex-direction: column; max-height: 84vh; }
.modal.large { width: min(860px, 100%); }
.modal-tete { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px 20px; }
.modal-tete h2 { font-size: 16px; font-weight: 600; }
.modal-corps { padding: 8px 20px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-pied { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--filet); }
.modal.palette .modal-tete { display: none; }
.modal.palette .modal-corps { padding: 0; }
.palette-champ { border: 0; border-bottom: 1px solid var(--filet); width: 100%; padding: 16px 18px; font-size: 16px; background: none; outline: none; }
.palette-liste { padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-item { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--rayon); cursor: pointer; }
.palette-item.sel { background: var(--fond-actif); }
.palette-item .rangee { width: 100%; }
.palette-item .texte-doux { margin-left: auto; font-size: 13px; }
.palette-vide { padding: 14px; }

.menu { position: fixed; z-index: 70; min-width: 230px; background: var(--fond); border-radius: 8px; box-shadow: var(--ombre); padding: 5px; display: flex; flex-direction: column; }
.menu-item { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 5px; cursor: pointer; font-size: 14px; }
.menu-item:hover, .menu-item:focus { background: var(--fond-survol); outline: none; }
.menu-item.danger { color: var(--rouge); }

#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #191919; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--ombre); animation: apparait 0.15s ease-out; max-width: min(92vw, 520px); }
.toast.erreur { background: #b42318; }
.toast.sortie { opacity: 0; transition: opacity 0.3s; }

.zone-depot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; border: 1.5px dashed var(--bord); border-radius: 10px; cursor: pointer; text-align: center; }
.zone-depot:hover, .zone-depot.survol { background: var(--fond-doux); border-color: var(--accent); }
.zone-depot.compacte { flex-direction: row; justify-content: center; padding: 14px; }
.aide-details summary { cursor: pointer; color: var(--doux); font-size: 13.5px; padding: 4px 0; }
.aide-details[open] summary { margin-bottom: 8px; }

/* ---------- Newsletters ---------- */

.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--filet); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.onglet { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; color: var(--doux); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.onglet:hover { color: var(--texte); }
.onglet.actif { color: var(--texte-fort); border-bottom-color: var(--texte-fort); }
.onglet .icone { width: 16px; height: 16px; }
.onglet-contenu { display: flex; flex-direction: column; }
.ligne-objet { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; }
.ligne-image { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--filet); }
.vignette { width: 56px; height: 40px; border-radius: 4px; background: var(--fond-doux); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; color: var(--pale); }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
textarea.code {
  font: 12.5px/1.55 var(--mono); width: 100%; min-height: 420px; padding: 12px; border-radius: 8px;
  border: 1px solid var(--bord); background: var(--fond-doux); resize: vertical; tab-size: 2; white-space: pre; overflow: auto;
}
textarea.code:focus { outline: none; border-color: var(--accent); background: var(--fond); }
.analyse-gabarit { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.bon { color: var(--vert); }
.moyen { color: #b26b00; }
.mauvais { color: var(--rouge); }
.barre-enregistrer {
  position: sticky; bottom: 16px; margin-top: 14px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--fond); box-shadow: var(--ombre);
}
.grille-medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.media { display: flex; flex-direction: column; gap: 4px; position: relative; }
.media .btn { position: absolute; top: 4px; right: 4px; background: var(--fond); }
.media-choisir { border: 1px solid var(--bord); border-radius: 8px; padding: 0; background: var(--fond-doux); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.media-choisir:hover { border-color: var(--accent); }
.media-choisir img { width: 100%; height: 100%; object-fit: cover; display: block; }

.infos-apercu { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.objet-apercu { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.cadre-zone { border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; background: #fff; }
.cadre-zone.mobile { width: 390px; max-width: 100%; margin: 0 auto; border-radius: 22px; border-width: 8px; border-color: #202020; }
.cadre-apercu { width: 100%; height: 700px; border: 0; display: block; background: #fff; }
.apercu-texte { white-space: pre-wrap; font: 13.5px/1.6 var(--mono); background: var(--fond-doux); padding: 18px; border-radius: 10px; max-width: 72ch; }

.lancement { margin-top: 18px; flex-wrap: wrap; }
.carte-envoi { gap: 10px; }
.gros-nombre { font-size: 40px; font-weight: 700; color: var(--texte-fort); line-height: 1.1; font-variant-numeric: tabular-nums; }
.etat-envoi { font-weight: 500; color: var(--texte-fort); }
.journal-envoi { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; max-height: 360px; overflow-y: auto; }
.journal-envoi li.mauvais { color: var(--rouge); }

/* ---------- Réglages ---------- */

.reglages-contenu { display: flex; flex-direction: column; }
.ligne-reglage { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 12px 0; border-top: 1px solid var(--filet); align-items: center; }
.ligne-reglage:first-of-type { border-top: 0; }
.ligne-reglage-texte { display: flex; flex-direction: column; gap: 2px; max-width: 62ch; }
.ligne-reglage-texte strong { font-weight: 500; color: var(--texte-fort); }
.ligne-reglage-texte .texte-doux { font-size: 13.5px; }
.ligne-reglage-controle { display: flex; justify-content: flex-end; }
.ligne-reglage-alerte { grid-column: 1 / -1; }
.ligne-reglage-alerte:empty { display: none; }
.lignes-etat { display: flex; flex-direction: column; }
.ligne-etat { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--filet); }
.ligne-etat:first-child { border-top: 0; }
.ligne-etat .pile-serree { flex: 1; gap: 1px; }
.ligne-etat-icone { width: 22px; text-align: center; flex: none; }
.ligne-categorie { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--filet); flex-wrap: wrap; }
.ligne-categorie > .champ:not(.nombre) { flex: 1; min-width: 140px; width: auto; }
.ligne-categorie .nb { min-width: 80px; font-size: 13px; }
.code-ligne { font-family: var(--mono); font-size: 12.5px; }
.liste-protection { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.qr-zone { align-items: flex-start; flex-wrap: wrap; gap: 18px; }
.qr { width: 180px; height: 180px; background: #fff; border-radius: 8px; padding: 4px; flex: none; }
.qr svg { width: 100%; height: 100%; }
.cle-2fa { font-size: 15px; letter-spacing: 0.06em; word-break: break-all; color: var(--texte-fort); }
.code-2fa { font-size: 22px; letter-spacing: 0.3em; height: 44px; text-align: center; max-width: 220px; font-variant-numeric: tabular-nums; }
.codes-secours { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.codes-secours code { font-size: 15px; padding: 6px 10px; color: var(--texte-fort); text-align: center; }
.haut-limite { max-height: 420px; overflow-y: auto; }

/* ---------- Connexion ---------- */

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--fond-doux); }
.auth-carte { width: min(400px, 100%); background: var(--fond); border-radius: 12px; box-shadow: var(--ombre); padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-carte h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.auth-logo { width: 44px; height: 44px; }
.demarrage { padding: 40px; color: var(--doux); }

/* ---------- Versions (journal de bord) ---------- */

.nav-secondaire { margin-top: 12px; font-weight: 400; color: var(--doux); }
.nav-secondaire .nav-compte { font-variant-numeric: tabular-nums; }
.bascule-texte button { padding: 0 12px; gap: 6px; font-size: 14px; font-weight: 500; }
.tuiles.trois { grid-template-columns: repeat(3, 1fr); }
button.tuile { text-align: left; font: inherit; cursor: pointer; }
button.tuile:hover { background: var(--fond-doux); }
.tuiles.trois .tuile strong { order: 2; }
.tuiles.trois .tuile span:first-child { order: 1; }
.tuiles.trois .tuile span:last-child { order: 3; }
.journal { display: flex; flex-direction: column; gap: 14px; }
.journal > .carte + .carte { margin-top: 0; }
.versions { display: flex; flex-direction: column; }
.version { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-top: 1px solid var(--filet); scroll-margin-top: 20px; }
.version:first-child { border-top: 0; padding-top: 8px; }
.version-repere { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 3px; }
.version-numero { font-size: 15px; color: var(--texte-fort); font-variant-numeric: tabular-nums; font-family: var(--police); }
.version-corps { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.version-corps h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.version-note { color: var(--doux); font-size: 15px; max-width: 64ch; }
.version-groupe { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.version-liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; max-width: 72ch; }
.version-liste li::marker { color: var(--pale); }
.symbole-etat { width: 18px; text-align: center; font-weight: 600; color: var(--doux); flex: none; }
.symbole-etat.fait { color: var(--vert); }
.symbole-etat.encours { color: var(--accent); }
.ajout-idee { gap: 10px; }
.ajout-idee .rangee > .champ { flex: 1; }
.ajout-idee-details { display: flex; flex-direction: column; gap: 8px; }
.ajout-idee-details .champ:not(textarea) { width: auto; }
.liste-idees { border-top: 1px solid var(--filet); }
.ligne-idee { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--filet); }
.ligne-idee:hover { background: var(--fond-doux); }
.ligne-idee-texte { flex: 1; gap: 4px; }
.ligne-idee-texte strong { font-weight: 500; color: var(--texte-fort); }
.ligne-idee.faite .ligne-idee-texte strong { text-decoration: line-through; text-decoration-color: var(--pale); color: var(--doux); }
.ligne-idee.abandonnee { opacity: 0.6; }
.ligne-idee .actions-ligne { opacity: 0; }
.ligne-idee:hover .actions-ligne, .ligne-idee:focus-within .actions-ligne { opacity: 1; }
.select-etat {
  appearance: none; border: 1px solid var(--bord); background: var(--fond); border-radius: 13px; height: 26px; padding: 0 10px;
  font-size: 12.5px; cursor: pointer; color: var(--doux); flex: none; margin-top: 1px;
}
.select-etat.etat-encours { color: var(--accent); border-color: var(--accent-fond); background: var(--accent-fond); }
.select-etat.etat-fait { color: var(--vert); background: var(--callout-ok); border-color: transparent; }

@media (max-width: 800px) {
  .tuiles.trois { grid-template-columns: 1fr 1fr; }
  .tuiles.trois > :last-child { grid-column: 1 / -1; }
  .ligne-depuis { flex-wrap: wrap; row-gap: 4px; }
  .ligne-depuis > span:nth-child(2) { flex: 1 1 calc(100% - 30px); }
  .ligne-depuis > .pastille:nth-of-type(1) { margin-left: 28px; }
  .version { grid-template-columns: 1fr; gap: 8px; }
  .version-repere { flex-direction: row; align-items: center; gap: 8px; }
  .ligne-idee { flex-wrap: wrap; row-gap: 8px; }
  .ligne-idee .select-etat { order: 1; }
  .ligne-idee .actions-ligne { order: 2; opacity: 1; margin-left: auto; }
  .ligne-idee-texte { order: 3; flex-basis: 100%; }
}

/* ---------- Contacts v0.5 : barre d'outils, menus, liste, groupes, colonnes, cartes ---------- */

.principal.pleine-largeur { max-width: 1640px; }
.texte-pale { color: var(--pale); }
.texte-alerte { color: var(--rouge); }
.avatar.t-xs { width: 22px; height: 22px; font-size: 9.5px; }
.pastille.avec-icone { gap: 4px; padding-left: 5px; }
.pastille .icone { width: 13px; height: 13px; }
.rond.petit { width: 11px; height: 11px; border-width: 1.5px; }

.teinte-gris, .icone.teinte-gris { color: var(--gris-p); }
.teinte-brun, .icone.teinte-brun { color: var(--brun-p); }
.teinte-orange, .icone.teinte-orange { color: var(--orange-p); }
.teinte-jaune, .icone.teinte-jaune { color: var(--jaune-p); }
.teinte-vert, .icone.teinte-vert { color: var(--vert-p); }
.teinte-bleu, .icone.teinte-bleu { color: var(--bleu-p); }
.teinte-violet, .icone.teinte-violet { color: var(--violet-p); }
.teinte-rose, .icone.teinte-rose { color: var(--rose-p); }
.teinte-rouge, .icone.teinte-rouge { color: var(--rouge-p); }
[class*="teinte-"] > .icone { color: inherit; }

/* Menus déroulants */
.menu { max-height: min(72vh, 580px); overflow-y: auto; min-width: 250px; }
.menu-titre { font-size: 11.5px; font-weight: 600; color: var(--pale); padding: 8px 10px 4px; }
.menu-sep { height: 1px; background: var(--filet); margin: 5px 4px; flex: none; }
.menu-item { display: flex; align-items: center; gap: 9px; color: var(--texte); min-height: 32px; padding: 5px 10px; }
.menu-item > .icone { width: 16px; height: 16px; }
.menu-item > .icone:not([class*="teinte-"]) { color: var(--doux); }
.menu-item.actif { color: var(--texte-fort); font-weight: 500; }
.menu-item:disabled { opacity: 0.55; cursor: default; }
.menu-item:disabled:hover { background: none; }
.menu-emoji, .menu-blanc { width: 16px; flex: none; text-align: center; }
.menu-libelle { flex: 1; min-width: 0; }
.menu-compte { font-size: 12px; color: var(--pale); font-variant-numeric: tabular-nums; }
.menu-item > .icone.menu-check { width: 15px; height: 15px; color: var(--accent); }
.menu-case { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--bord); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.menu-case.oui { background: var(--accent); border-color: var(--accent); }
.menu-case .icone { width: 12px; height: 12px; color: #fff; }

/* Barre d'outils */
.barre-outils { margin-bottom: 10px; }
.outils-droite { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.recherche-zone .champ { padding-right: 32px; }
.raccourci-recherche { position: absolute; right: 8px; top: 7px; pointer-events: none; }
.recherche-zone:focus-within .raccourci-recherche { display: none; }
.btn.outil { height: 30px; padding: 0 7px 0 9px; font-size: 13.5px; gap: 5px; box-shadow: none; }
.btn.outil .icone { width: 15px; height: 15px; color: var(--doux); }
.btn.outil .chevron-outil { width: 13px; height: 13px; color: var(--pale); }
.btn.outil .fleche-tri { width: 13px; height: 13px; color: var(--accent); margin-left: -2px; }
.btn.outil.avec-filtre { background: var(--accent-fond); border-color: transparent; color: var(--texte-fort); }
.badge-nombre { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.bascule-vues button { gap: 6px; padding: 0 10px; font-size: 13.5px; }
.bascule-vues .icone { width: 16px; height: 16px; }

/* Filtres actifs et raccourcis */
.filtres { gap: 10px; margin-bottom: 12px; }
.filtres-ligne { gap: 6px; }
.filtre-actif { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 3px 0 9px; border-radius: 14px; background: var(--accent-fond); font-size: 13px; color: var(--texte-fort); white-space: nowrap; }
.filtre-actif .icone { width: 14px; height: 14px; }
.filtre-actif button { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--doux); padding: 0; }
.filtre-actif button:hover { background: var(--fond-actif); color: var(--texte); }
.filtre-actif button .icone { width: 12px; height: 12px; }
.raccourci { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px dashed var(--bord); background: none; color: var(--doux); font-size: 13px; cursor: pointer; white-space: nowrap; }
.raccourci:hover { background: var(--fond-survol); color: var(--texte); border-style: solid; }
.raccourci .icone { width: 14px; height: 14px; }

/* Liste : une ligne par contact */
.zone-tableau { border-top: 0; }
.tableau-contacts { table-layout: fixed; }
.tableau-contacts thead th { padding: 0; border-bottom: 1px solid var(--bord); }
.th-bouton {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 34px; padding: 0 8px; border: 0; background: none;
  color: var(--doux); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-align: left;
}
button.th-bouton { cursor: pointer; }
button.th-bouton:hover { background: var(--fond-survol); color: var(--texte); }
.th-bouton .icone { width: 15px; height: 15px; color: var(--pale); }
.th-bouton > span { overflow: hidden; text-overflow: ellipsis; }
.tableau-contacts .date-relance { font-size: 13.5px; }
.th-bouton.actif { color: var(--texte-fort); }
.th-bouton .icone.fleche-tri { width: 14px; height: 14px; color: var(--accent); }
.tableau-contacts thead .col-case { padding-left: 8px; }
.tableau-contacts td { height: 38px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableau-contacts td.col-case { padding: 0 0 0 8px; }
.tableau-contacts tbody tr.ligne-contact:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.tableau-contacts tbody tr.ouvert { background: var(--accent-fond); }
.tableau-contacts .case { opacity: 0; transition: opacity 0.1s; }
.tableau-contacts tr:hover .case, .tableau-contacts.avec-selection .case, .tableau-contacts .case:checked, .tableau-contacts .case:focus-visible { opacity: 1; }
.cellule-nom { min-width: 0; gap: 9px; }
.nom-texte { font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tableau-contacts .etoile { opacity: 0; }
.tableau-contacts tr:hover .etoile, .tableau-contacts .etoile.oui, .tableau-contacts .etoile:focus-visible { opacity: 1; }
.cellule-texte { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cellule-texte.texte-alerte { display: flex; align-items: center; gap: 5px; }
.cellule-texte.texte-alerte > span { overflow: hidden; text-overflow: ellipsis; }
.cellule-texte .icone { width: 14px; height: 14px; flex: none; }
.cellule-vide { color: var(--pale); font-size: 13px; }
.cellule-date { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.icone.icone-froid { width: 14px; height: 14px; color: var(--bleu-p); }
.date-relance { display: inline-flex; align-items: center; gap: 4px; }
.date-relance .icone { width: 14px; height: 14px; }
.etiquettes.une-ligne { flex-wrap: nowrap; overflow: hidden; }
.tableau-contacts td .pastille { max-width: 100%; overflow: hidden; }

/* Groupes */
.tableau-contacts tbody tr.groupe-tete { cursor: pointer; }
.tableau-contacts tbody tr.groupe-tete:hover { background: none; }
.groupe-tete td { height: auto; padding: 18px 8px 8px; border-bottom: 1px solid var(--bord); }
.tableau-contacts tbody:first-of-type .groupe-tete td { padding-top: 10px; }
.groupe-tete:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.groupe-libelle { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.groupe-chevron { width: 15px; height: 15px; color: var(--pale); transition: transform 0.15s; }
.groupe-chevron.replie { transform: rotate(-90deg); }
.groupe-tete:hover .groupe-chevron, .groupe-tete-mobile:hover .groupe-chevron { color: var(--texte); }
.groupe-libelle .pastille { font-weight: 500; }
.groupe-compte { color: var(--pale); font-size: 13px; font-variant-numeric: tabular-nums; }
.groupe-aide { color: var(--pale); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Liste sur téléphone */
.liste-mobile { display: flex; flex-direction: column; border-top: 1px solid var(--filet); }
.ligne-mobile { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-height: 52px; border-bottom: 1px solid var(--filet); }
.ligne-mobile.ouvert, .ligne-mobile:active { background: var(--fond-survol); }
.lm-noms { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; white-space: nowrap; }
.lm-nom { font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.lm-structure { color: var(--doux); font-size: 13px; overflow: hidden; text-overflow: ellipsis; flex: 0 10 auto; min-width: 0; }
.lm-meta { display: flex; align-items: center; gap: 7px; flex: none; }
.lm-meta .icone { width: 16px; height: 16px; }
.icone.lm-etoile { color: #e9b10c; }
.lm-etoile svg { fill: #f5c518; }
.lm-date { font-size: 12.5px; color: var(--doux); min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.groupe-tete-mobile { display: flex; width: 100%; border: 0; background: none; padding: 18px 4px 8px; cursor: pointer; border-bottom: 1px solid var(--filet); text-align: left; }
.section-mobile:first-child .groupe-tete-mobile { padding-top: 8px; }

/* Colonnes (kanban) */
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 16px; }
.kanban-col {
  flex: 0 0 276px; background: var(--fond-doux); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 8px;
  max-height: calc(100vh - 230px); transition: background 0.12s, box-shadow 0.12s;
}
.kanban-col.survol { background: var(--accent-fond); box-shadow: inset 0 0 0 1.5px var(--accent); }
.kanban-tete { padding: 4px 4px 2px; }
.kanban-cartes { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 56px; padding: 2px; margin: -2px; }
.carte-kanban {
  display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; border-radius: 8px; background: var(--fond);
  box-shadow: 0 0 0 1px var(--bord), var(--ombre-douce); cursor: pointer;
}
.carte-kanban[draggable="true"] { cursor: grab; }
.carte-kanban:hover { box-shadow: 0 0 0 1px var(--pale), var(--ombre-douce); }
.carte-kanban.ouvert { box-shadow: 0 0 0 2px var(--accent); }
.carte-kanban.glisse { opacity: 0.4; }
.ck-tete { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ck-nom { font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.icone.ck-etoile { width: 14px; height: 14px; color: #e9b10c; }
.ck-etoile svg { fill: #f5c518; }
.ck-ligne { display: flex; align-items: center; gap: 6px; color: var(--doux); font-size: 12.5px; min-width: 0; }
.ck-ligne span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-ligne .icone { width: 13px; height: 13px; color: var(--pale); }
.ck-pied { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ck-pied .pastille { min-width: 0; overflow: hidden; }
.ck-infos { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--doux); flex: none; }
.ck-infos .cellule-date { gap: 5px; }
.ck-infos .date-relance { font-size: 12px; }
.kanban-vide { color: var(--pale); font-size: 13px; text-align: center; padding: 18px 8px; border: 1.5px dashed var(--bord); border-radius: 8px; }
.en-glisse .kanban-vide { border-color: var(--accent); color: var(--accent); }

/* Cartes */
.cartes-contacts { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.carte-contact { gap: 10px; }
.cc-tete { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc-noms { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-noms .texte-doux { font-size: 13px; }
.cc-pastilles { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-infos { display: flex; flex-direction: column; gap: 5px; padding-top: 9px; border-top: 1px solid var(--filet); }
.cc-info { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--texte); min-width: 0; }
.cc-info > .icone { width: 15px; height: 15px; color: var(--pale); }
.cc-info.pale { color: var(--pale); }
.carte-contact .etoile { color: var(--pale); }

/* ---------- Fiche v0.5 : en-tête, chiffres, onglets ---------- */

.tiroir { width: min(640px, 100vw); }
.tiroir.large { width: min(960px, 100vw); }
body:has(.tiroir) .barre-groupe { left: calc((100vw - min(640px, 100vw)) / 2 + 120px); }
.tiroir.charge .tiroir-corps { opacity: 0.5; transition: opacity 0.1s; }
.tiroir-barre { padding: 6px 8px; min-height: 46px; }
.nav-fiche { display: flex; align-items: center; gap: 1px; margin-left: 4px; padding-left: 6px; border-left: 1px solid var(--filet); }
.nav-position { font-size: 12.5px; color: var(--pale); margin-left: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.indicateur { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.indicateur .icone { width: 14px; height: 14px; color: var(--vert-p); }
.tiroir-corps { padding: 24px 32px 64px; gap: 18px; }
.fiche-entete { gap: 14px; }
.fiche-identite { gap: 16px; }
.fiche-noms { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.titre-noms { display: flex; flex-wrap: wrap; }
.titre-prop { font-size: 26px; }
.sous-titre { display: flex; align-items: center; gap: 1px; min-width: 0; flex-wrap: wrap; }
.sous-titre > .icone { width: 15px; height: 15px; color: var(--pale); margin: 0 3px 0 5px; }
.sous-titre .sep { color: var(--pale); padding: 0 1px; }
.fiche-pastilles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fiche-pastilles .pastille { height: 28px; padding: 0 9px; font-size: 13px; border-radius: 6px; gap: 5px; }
.fiche-pastilles .pastille .icone { width: 15px; height: 15px; }
.pastille-bouton { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 7px 0 8px; border-radius: 6px; border: 0; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pastille-bouton .icone { width: 15px; height: 15px; }
.pastille-bouton .chevron-pastille { width: 13px; height: 13px; opacity: 0.55; }
.pastille-bouton:hover { filter: brightness(0.96); }
.pastille-bouton.favori { background: none; color: var(--doux); box-shadow: inset 0 0 0 1px var(--bord); }
.pastille-bouton.favori:hover { background: var(--fond-survol); filter: none; }
.pastille-bouton.favori.oui { background: #fdf3d0; color: #7a5800; box-shadow: none; }
.pastille-bouton.favori.oui svg { fill: #f5c518; stroke: #e9b10c; }
.actions-rapides { gap: 6px; }
.action-rapide { height: 32px; padding: 0 11px; border: 1px solid var(--bord); background: var(--fond); box-shadow: var(--ombre-douce); font-weight: 500; }
.action-rapide:hover { background: var(--fond-survol); }

.fiche-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chiffre { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bord); background: var(--fond); cursor: pointer; text-align: left; min-width: 0; font: inherit; color: inherit; }
.chiffre:hover { background: var(--fond-doux); }
.chiffre-lib { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--doux); white-space: nowrap; }
.chiffre-lib .icone { width: 14px; height: 14px; color: var(--pale); }
.chiffre-val { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--texte-fort); white-space: nowrap; overflow: hidden; max-width: 100%; }
.chiffre-val > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.chiffre.pale .chiffre-val { color: var(--pale); font-weight: 500; }
.chiffre.retard .chiffre-val { color: var(--rouge); }
.chiffre.jour .chiffre-val { color: var(--accent); }

.fiche-onglets {
  position: sticky; top: -24px; z-index: 3; background: var(--fond); display: flex; gap: 2px;
  margin: 2px -32px 0; padding: 0 32px; border-bottom: 1px solid var(--filet); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
}
.fiche-onglets::-webkit-scrollbar { display: none; }
.tiroir-corps > * { flex-shrink: 0; }
.fiche-onglet {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px 9px; border: 0; background: none; color: var(--doux);
  font-weight: 500; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.fiche-onglet .icone { width: 16px; height: 16px; }
.fiche-onglet:hover { color: var(--texte); }
.fiche-onglet.actif { color: var(--texte-fort); border-bottom-color: var(--texte-fort); }
.onglet-compte { font-size: 11.5px; color: var(--doux); background: var(--fond-survol); border-radius: 9px; padding: 0 6px; line-height: 18px; }
.fiche-contenu { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.tiroir.large .fiche-contenu.onglet-infos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; row-gap: 22px; }
.tiroir.large .fiche-contenu.onglet-infos > :last-child { grid-column: 1 / -1; }

.fiche-section h3 { display: flex; align-items: center; gap: 7px; }
.fiche-section h3 .icone { width: 15px; height: 15px; color: var(--pale); }
.prop { grid-template-columns: 140px minmax(0, 1fr); min-height: 36px; }
.tiroir.large .prop { grid-template-columns: 128px minmax(0, 1fr); }
.prop-lib { font-size: 13px; }
.prop-val > .rangee.pleine { width: 100%; }
.fiche-pied { display: flex; align-items: center; gap: 6px; color: var(--pale); font-size: 12.5px; padding-top: 4px; }
.fiche-pied .icone { width: 14px; height: 14px; }

.form-echange { padding: 12px; border: 1px solid var(--bord); border-radius: 10px; gap: 10px; margin-bottom: 4px; }
.form-echange:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.form-echange textarea.champ { border: 0; padding: 2px; resize: none; box-shadow: none; background: none; }
.form-echange textarea.champ:focus { box-shadow: none; }
.types-echange { display: flex; flex-wrap: wrap; gap: 4px; }
.type-echange { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 7px; border-radius: 13px; border: 1px solid var(--bord); background: var(--fond); font-size: 12.5px; cursor: pointer; color: var(--doux); }
.type-echange .icone { width: 14px; height: 14px; }
.type-echange:hover { color: var(--texte); background: var(--fond-survol); }
.type-echange.actif { background: var(--accent-fond); border-color: transparent; color: var(--texte-fort); }
.form-echange-pied { display: flex; align-items: center; gap: 10px; }
.form-echange-pied .champ { width: auto; height: 28px; font-size: 13px; }
.form-echange-pied .btn { margin-left: auto; }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 2px; background: var(--bord); }
.evenement { position: relative; gap: 12px; padding: 7px 0; border-top: 0; }
.evenement-icone { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--fond); }
.evenement-icone .icone { width: 15px; height: 15px; }
.evenement-tete { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 13px; flex-wrap: wrap; }
.evenement-tete strong { font-weight: 600; color: var(--texte-fort); }
.evenement-suppr { margin-left: auto; opacity: 0; }
.evenement:hover .evenement-suppr, .evenement-suppr:focus-visible { opacity: 1; }
.source { font-size: 11.5px; color: var(--doux); background: var(--fond-survol); padding: 0 6px; border-radius: 4px; }
.evenement-texte { margin-top: 1px; }
.timeline-vide { display: flex; align-items: center; gap: 10px; color: var(--doux); padding: 14px; border-radius: 8px; background: var(--fond-doux); font-size: 13.5px; }
.timeline-vide .icone { color: var(--pale); }
.ligne-gmail .sens .icone { width: 15px; height: 15px; }
.ligne-gmail .sens { display: inline-flex; }
.ligne-projet { gap: 10px; }
.ligne-projet .evenement-icone { width: 26px; height: 26px; box-shadow: none; }
.ligne-mini .pastille { flex: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pastille-bouton.favori.oui { background: #3d3418; color: #f3d88a; }
  :root:not([data-theme="light"]) .pastille-bouton:hover { filter: brightness(1.15); }
}

@media (max-width: 800px) {
  .bascule-libelle { display: none; }
  .bascule-vues button { padding: 0 9px; }
  .raccourci-recherche { display: none; }
  .barre-outils { gap: 8px; }
  .outils-droite { width: 100%; }
  .filtres-ligne { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .filtres-ligne::-webkit-scrollbar { display: none; }
  .filtres-ligne > * { flex: none; }
  .kanban { scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 16px; }
  .kanban-col { flex-basis: 84vw; scroll-snap-align: start; max-height: none; }
  .cartes-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .carte-contact { padding: 10px; gap: 8px; border-radius: 9px; min-width: 0; }
  .carte-contact .cc-tete { gap: 8px; align-items: flex-start; }
  .carte-contact .cc-tete .avatar { width: 30px; height: 30px; font-size: 12px; flex: none; }
  .carte-contact .cc-noms strong { font-size: 14px; line-height: 1.25; }
  .carte-contact .cc-noms .texte-doux { font-size: 12px; }
  .carte-contact .etoile { width: 22px; height: 22px; margin: -3px -4px 0 0; }
  .carte-contact .cc-pastilles { gap: 4px; }
  .carte-contact .cc-pastilles .pastille { font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .carte-contact .cc-infos { gap: 4px; padding-top: 7px; }
  .carte-contact .cc-info { font-size: 12px; gap: 5px; }
  .carte-contact .cc-info > .icone { width: 13px; height: 13px; flex: none; }
  .carte-contact .cc-info { overflow: hidden; min-width: 0; }
  .carte-contact .etiquettes { gap: 4px; max-height: 44px; overflow: hidden; }
  .carte-contact .etiquette { font-size: 11px; }
  .tiroir-corps { padding: 18px 16px 90px; }
  .fiche-chiffres { grid-template-columns: 1fr 1fr; }
  .fiche-onglets { margin: 0 -16px; padding: 0 16px; top: -18px; }
  .titre-prop { font-size: 22px; }
  .avatar.t-l { width: 52px; height: 52px; font-size: 19px; }
  .nav-position { display: none; }
  .tiroir.large { width: 100vw; }
  .tiroir.large .prop { grid-template-columns: 1fr; }
  .tiroir.large .fiche-contenu.onglet-infos { display: flex; }
}

@media (max-width: 520px) {
  .outil-libelle { display: none; }
  .btn.outil .fleche-tri { margin-left: 0; }
}

/* ---------- Graphe de connaissance v0.6 ---------- */

.graphe {
  position: relative; height: calc(100vh - 232px); min-height: 480px; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden;
  background-color: var(--fond-doux); background-image: radial-gradient(var(--bord) 1px, transparent 1.2px); background-size: 22px 22px; touch-action: none;
}
.graphe-svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.graphe-svg:active { cursor: grabbing; }
.graphe-svg.en-liaison, .graphe-svg.en-liaison .noeud { cursor: crosshair; }
.arete { stroke-linecap: round; transition: opacity 0.15s; fill: none; }
.a-societe { stroke: var(--pale); stroke-opacity: 0.45; stroke-width: 1.3; }
.a-etiquette { stroke: var(--pale); stroke-opacity: 0.5; stroke-width: 1; stroke-dasharray: 2 4; }
.a-lien { stroke-width: 2.6; }
.a-suggestion { stroke: var(--violet-p); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: 0.6; }
.arete-zone { stroke: transparent; stroke-width: 14; cursor: pointer; }
.arete-zone:hover { stroke: var(--accent-fond); }
.fleche-lien { fill: var(--vert-p); }
.sug-plus { cursor: pointer; opacity: 0.85; }
.sug-plus circle { fill: var(--fond); stroke: var(--violet-p); stroke-width: 1.5; }
.sug-plus path { stroke: var(--violet-p); stroke-width: 1.8; stroke-linecap: round; }
.sug-plus:hover { opacity: 1; }
.sug-plus:hover circle { fill: var(--violet-f); }
.noeud { cursor: pointer; transition: opacity 0.15s; }
.disque { stroke-width: 1.5; transition: stroke-width 0.1s; }
.initiales { text-anchor: middle; font-weight: 600; pointer-events: none; letter-spacing: 0.02em; }
.nom-noeud {
  font-size: calc(11px * var(--k, 1)); font-weight: 500; text-anchor: middle; dominant-baseline: hanging; fill: var(--texte); pointer-events: none;
  paint-order: stroke; stroke: var(--fond-doux); stroke-width: 3.5px; stroke-linejoin: round;
}
.nom-societe { font-weight: 600; font-size: calc(11.5px * var(--k, 1)); fill: var(--texte-fort); }
.n-societe .disque { fill: var(--fond); stroke: var(--bleu-p); }
.n-societe .gicone { color: var(--bleu-p); pointer-events: none; }
.n-etiquette .disque { fill: var(--fond); stroke: var(--pale); stroke-dasharray: 3 2; }
.diese { text-anchor: middle; fill: var(--doux); font-weight: 600; pointer-events: none; }
.etoile-noeud { color: #e9b10c; pointer-events: none; }
.etoile-noeud path { fill: #f5c518; }
.graphe-svg.moyen .n-contact.secondaire:not(.proche):not(.ouvert):not(:hover) .nom-noeud,
.graphe-svg.loin .n-contact:not(.favori):not(.proche):not(.ouvert):not(:hover) .nom-noeud { display: none; }
.nom-categorie { font-size: calc(13px * var(--k, 1)); font-weight: 600; text-anchor: middle; fill: var(--pale); opacity: 0.85; pointer-events: none; letter-spacing: 0.01em; }
.nom-categorie.t-gris { fill: var(--gris-p); }
.nom-categorie.t-brun { fill: var(--brun-p); }
.nom-categorie.t-orange { fill: var(--orange-p); }
.nom-categorie.t-jaune { fill: var(--jaune-p); }
.nom-categorie.t-vert { fill: var(--vert-p); }
.nom-categorie.t-bleu { fill: var(--bleu-p); }
.nom-categorie.t-violet { fill: var(--violet-p); }
.nom-categorie.t-rose { fill: var(--rose-p); }
.nom-categorie.t-rouge { fill: var(--rouge-p); }
.graphe-svg.focus .nom-categorie { opacity: 0.25; }
.graphe-svg.focus .noeud:not(.proche) { opacity: 0.22; }
.graphe-svg.focus .arete:not(.proche) { opacity: 0.1; }
.graphe-svg.focus .sug-plus { opacity: 0.15; }
.noeud.proche .disque { stroke-width: 2.6; }
.noeud.ouvert .disque { stroke: var(--accent); stroke-width: 3.2; }
.noeud.cible .disque { stroke: var(--accent); stroke-width: 4; }
.noeud.premier .disque { stroke: var(--accent); stroke-width: 3.5; stroke-dasharray: 4 3; }
.poignee { opacity: 0; transition: opacity 0.12s; cursor: crosshair; }
.poignee circle { fill: var(--accent); stroke: var(--fond); stroke-width: 2; }
.poignee .gicone { color: #fff; pointer-events: none; }
.noeud:hover .poignee { opacity: 1; }
.graphe-svg.en-liaison .poignee, .graphe-svg.en-deplacement .poignee, .graphe-svg.mode-relier .poignee { display: none; }
.graphe-svg.mode-relier .noeud { cursor: copy; }
.trace-lien { stroke: var(--accent); stroke-width: 2.6; stroke-dasharray: 6 5; stroke-linecap: round; pointer-events: none; }
@media (hover: none) { .poignee { display: none; } }

.graphe-outils { position: absolute; top: 10px; left: 10px; right: 150px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.graphe-outils > * { pointer-events: auto; }
.puce-graphe { height: 28px; font-size: 13px; }
.puce-graphe:not(.active) { color: var(--doux); }
.graphe-outils .btn { box-shadow: var(--ombre-douce); }
.bouton-relier.actif { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton-relier.actif .icone { color: #fff; }
.bouton-suggestions .icone { color: var(--violet-p); }
.graphe-sep { width: 1px; height: 18px; background: var(--bord); margin: 0 2px; }
.graphe-zoom { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.graphe-zoom .btn { box-shadow: var(--ombre-douce); }
.graphe-legende {
  position: absolute; left: 10px; bottom: 42px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--doux);
  background: var(--fond); padding: 8px 10px; border-radius: 8px; box-shadow: 0 0 0 1px var(--bord); pointer-events: none;
}
.graphe-legende:empty { display: none; }
.legende-item { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legende-trait { width: 18px; height: 0; border-top: 2.6px solid var(--pale); flex: none; }
.legende-trait.t-societe { border-top: 1.4px solid var(--pale); opacity: 0.7; }
.legende-trait.t-suggestion { border-top: 1.6px dashed var(--violet-p); }
.graphe-aide {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap;
  padding: 10px 14px; font-size: 12.5px; color: var(--doux); pointer-events: none; text-align: center;
  background: linear-gradient(to bottom, transparent, var(--fond-doux) 45%);
}
.graphe-aide .icone { width: 15px; height: 15px; }
.graphe.relier .graphe-aide { color: var(--accent); font-weight: 500; }
.aide-poignee { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; vertical-align: middle; }
.aide-poignee .icone { width: 11px; height: 11px; }

/* Petite fenêtre pour relier */
.flottant { position: fixed; z-index: 75; width: min(410px, calc(100vw - 24px)); background: var(--fond); border-radius: 12px; box-shadow: var(--ombre); padding: 14px; animation: apparait 0.12s ease-out; }
.flottant.feuille { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 82vh; overflow-y: auto; }
.pop-lien, .carte-groupe { display: flex; flex-direction: column; gap: 10px; }
.pop-lien-tete, .carte-groupe-tete { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lien-personne { display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex: 1 1 0; }
.lien-personne-nom { font-weight: 600; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lien-entre { color: var(--accent); flex: none; display: inline-flex; }
.lien-societe { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texte-fort); }
.pop-lien-raison { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--violet-t); background: var(--violet-f); padding: 7px 9px; border-radius: 6px; }
.pop-lien-raison .icone { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.pop-lien-question { font-size: 12.5px; font-weight: 600; color: var(--doux); margin-bottom: -4px; }
.types-lien { display: flex; flex-wrap: wrap; gap: 5px; }
.type-lien { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border-radius: 14px; border: 1px solid var(--bord); background: var(--fond); font-size: 13px; cursor: pointer; color: var(--texte); }
.type-lien .icone { width: 15px; height: 15px; }
.type-lien:hover { background: var(--fond-survol); }
.type-lien.actif { background: var(--accent-fond); border-color: var(--accent); color: var(--texte-fort); font-weight: 500; }
.sens-lien { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pop-lien-pied { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.pop-lien-espace { flex: 1; }
.carte-groupe .lignes { max-height: 260px; overflow-y: auto; margin: 0 -6px; }
.carte-groupe .ligne-mini { gap: 8px; }
.carte-groupe .ligne-mini > :first-child { flex: none; }
.carte-groupe .ligne-mini > :nth-child(2) { flex: 1; }
.pile-mini { display: flex; flex-direction: column; min-width: 0; }

/* Choisir un contact à relier */
.choix-contacts { display: flex; flex-direction: column; gap: 2px; min-height: 140px; }
.choix-contact { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit; }
.choix-contact:hover, .choix-contact.sel { background: var(--fond-actif); }
.choix-noms { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.choix-noms strong { font-weight: 500; color: var(--texte-fort); }
.choix-noms span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Revue des suggestions */
.titre-suggestions { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--doux); margin-top: 4px; }
.titre-suggestions .icone { width: 15px; height: 15px; color: var(--pale); }
.ligne-suggestion { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--filet); }
.ligne-suggestion-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ligne-suggestion-texte strong { font-weight: 500; color: var(--texte-fort); }

/* Fiche : onglet Liens */
.ligne-lien { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--filet); }
.ligne-lien:last-child { border-bottom: 0; }
.ligne-lien-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ligne-lien-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lien-nom { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--texte-fort); }
.lien-nom:hover { text-decoration: underline; }
.actions-lien { opacity: 0.45; transition: opacity 0.1s; }
.ligne-lien:hover .actions-lien, .actions-lien:focus-within { opacity: 1; }
.puce-personne { padding-left: 4px; gap: 6px; }
.fiche-section > .rangee.enveloppe { margin-top: 10px; }

.disque.g-gris { fill: var(--gris-f); stroke: var(--gris-p); } .initiales.g-gris { fill: var(--gris-t); } .a-lien.t-gris { stroke: var(--gris-p); } .legende-trait.t-gris { border-top-color: var(--gris-p); }
.disque.g-brun { fill: var(--brun-f); stroke: var(--brun-p); } .initiales.g-brun { fill: var(--brun-t); } .a-lien.t-brun { stroke: var(--brun-p); } .legende-trait.t-brun { border-top-color: var(--brun-p); }
.disque.g-orange { fill: var(--orange-f); stroke: var(--orange-p); } .initiales.g-orange { fill: var(--orange-t); } .a-lien.t-orange { stroke: var(--orange-p); } .legende-trait.t-orange { border-top-color: var(--orange-p); }
.disque.g-jaune { fill: var(--jaune-f); stroke: var(--jaune-p); } .initiales.g-jaune { fill: var(--jaune-t); } .a-lien.t-jaune { stroke: var(--jaune-p); } .legende-trait.t-jaune { border-top-color: var(--jaune-p); }
.disque.g-vert { fill: var(--vert-f); stroke: var(--vert-p); } .initiales.g-vert { fill: var(--vert-t); } .a-lien.t-vert { stroke: var(--vert-p); } .legende-trait.t-vert { border-top-color: var(--vert-p); }
.disque.g-bleu { fill: var(--bleu-f); stroke: var(--bleu-p); } .initiales.g-bleu { fill: var(--bleu-t); } .a-lien.t-bleu { stroke: var(--bleu-p); } .legende-trait.t-bleu { border-top-color: var(--bleu-p); }
.disque.g-violet { fill: var(--violet-f); stroke: var(--violet-p); } .initiales.g-violet { fill: var(--violet-t); } .a-lien.t-violet { stroke: var(--violet-p); } .legende-trait.t-violet { border-top-color: var(--violet-p); }
.disque.g-rose { fill: var(--rose-f); stroke: var(--rose-p); } .initiales.g-rose { fill: var(--rose-t); } .a-lien.t-rose { stroke: var(--rose-p); } .legende-trait.t-rose { border-top-color: var(--rose-p); }
.disque.g-rouge { fill: var(--rouge-f); stroke: var(--rouge-p); } .initiales.g-rouge { fill: var(--rouge-t); } .a-lien.t-rouge { stroke: var(--rouge-p); } .legende-trait.t-rouge { border-top-color: var(--rouge-p); }

@media (max-width: 800px) {
  .graphe { height: calc(100vh - 330px - env(safe-area-inset-bottom)); min-height: 400px; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .graphe-outils { right: 10px; top: 52px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
  .graphe-outils::-webkit-scrollbar { display: none; }
  .graphe-outils > * { flex: none; }
  .graphe-zoom { left: 10px; right: auto; }
  .graphe-legende { display: none; }
  .ligne-suggestion { flex-wrap: wrap; }
  .ligne-suggestion > .rangee { margin-left: 38px; }
}

/* ---------- Écrans moyens et petits ---------- */

@media (max-width: 1480px) {
  .cache-large { display: none; }
}

@media (max-width: 1100px) {
  .grille-accueil { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .cache-moyen { display: none; }
  .tuiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .coquille { grid-template-columns: 1fr; }
  .barre { display: none; }
  .principal { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .bas-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 35; background: var(--fond);
    border-top: 1px solid var(--filet); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bas-lien { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--pale); padding: 4px 0; }
  .bas-lien .icone { width: 22px; height: 22px; }
  .bas-lien.actif { color: var(--texte-fort); }
  .page-tete h1 { font-size: 26px; }
  .tiroir { width: 100vw; }
  .tiroir-corps { padding: 18px 16px 80px; }
  .prop { grid-template-columns: 1fr; gap: 0; }
  .prop-lib { padding-top: 4px; }
  .grille-form { grid-template-columns: 1fr; }
  .ligne-objet { grid-template-columns: 1fr; gap: 4px; }
  .ligne-reglage { grid-template-columns: 1fr; }
  .ligne-reglage-controle { justify-content: flex-start; }
  .liste-protection { grid-template-columns: 1fr; }
  .cache-mobile { display: none; }
  .barre-groupe { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .barre-enregistrer { bottom: calc(78px + env(safe-area-inset-bottom)); }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .modal-fond { padding-top: 6vh; }
  .ligne-cat > span:nth-child(2) { width: 100px; }
  .recherche-zone { min-width: 100%; }
  .filtres > .puces { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .filtres > .puces::-webkit-scrollbar { display: none; }
  .ligne-relance { flex-wrap: wrap; }
  .ligne-relance .ligne-lien { flex-basis: 100%; }
  .ligne-cat > span:nth-child(2) { width: 96px; }
  body:has(.tiroir) .barre-groupe { display: none; }
}

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

/* ---------- Exports ---------- */
.export-question { font-size: 13px; font-weight: 600; color: var(--texte-fort); }
.choix-carte-ligne { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-carte-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choix-carte-grille.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choix-carte { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--bord); border-radius: 8px; background: var(--fond); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: background 0.1s, border-color 0.1s; }
.choix-carte:hover:not(:disabled) { background: var(--fond-survol); }
.choix-carte.actif { border-color: var(--accent); background: var(--accent-fond); box-shadow: 0 0 0 1px var(--accent) inset; }
.choix-carte:disabled { opacity: 0.45; cursor: not-allowed; }
.choix-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choix-carte.petit-choix { align-items: center; padding: 7px 11px; gap: 7px; }
.choix-carte.petit-choix .icone { width: 16px; height: 16px; color: var(--doux); }
.choix-carte-icone { flex: none; width: 30px; height: 30px; border-radius: 7px; background: var(--fond-doux); display: grid; place-items: center; color: var(--doux); }
.choix-carte.actif .choix-carte-icone { background: var(--fond); color: var(--accent); }
.choix-carte-icone .icone { width: 17px; height: 17px; }
.choix-carte-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.choix-carte-titre { font-weight: 600; color: var(--texte-fort); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.choix-carte-titre .pastille { height: 18px; font-size: 11.5px; font-weight: 500; }
.choix-carte-apps { font-size: 12px; color: var(--pale); }
.lien-guide { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13.5px; align-self: flex-start; }
.lien-guide:hover { text-decoration: underline; }
.lien-guide .icone { width: 16px; height: 16px; }

.guide { display: flex; flex-direction: column; border-top: 1px solid var(--filet); }
.guide-app { border-bottom: 1px solid var(--filet); }
.guide-app summary { display: flex; align-items: center; gap: 10px; padding: 11px 4px; cursor: pointer; list-style: none; border-radius: 6px; }
.guide-app summary::-webkit-details-marker { display: none; }
.guide-app summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid var(--pale); border-bottom: 1.6px solid var(--pale); transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
.guide-app[open] summary::after { transform: rotate(45deg); }
.guide-app summary:hover { background: var(--fond-survol); }
.guide-titre { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.guide-titre strong { color: var(--texte-fort); font-weight: 600; }
.guide-corps { padding: 2px 4px 16px 44px; display: flex; flex-direction: column; gap: 10px; }
.guide-etapes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; line-height: 1.5; }
.guide-etapes li::marker { color: var(--pale); font-weight: 600; }
.guide-code, .tuto code, .copiable code, .cle-debut, .outil-mcp code, .ligne-reglage code { font-family: var(--mono); font-size: 12.5px; background: var(--fond-doux); border: 1px solid var(--filet); border-radius: 4px; padding: 1px 5px; }

/* Version imprimable d'une fiche */
#impression { display: none; }
@media print {
  body.impression > *:not(#impression) { display: none !important; }
  body.impression #impression { display: block; color: #111; font-family: var(--police); font-size: 11pt; line-height: 1.45; }
  body.impression { background: #fff; }
  @page { margin: 16mm 15mm; }
}
.imp-tete { border-bottom: 1px solid #ddd; padding-bottom: 10px; margin-bottom: 12px; }
.imp-tete h1 { font-size: 21pt; margin: 0 0 2px; font-weight: 700; }
.imp-sous { color: #555; margin: 0; }
.imp-pastilles { color: #777; font-size: 9.5pt; margin: 4px 0 0; }
.imp-section { break-inside: avoid; margin: 0 0 12px; }
.imp-section h2 { font-size: 10pt; text-transform: uppercase; letter-spacing: 0.06em; color: #777; margin: 0 0 5px; font-weight: 600; }
.imp-ligne { display: grid; grid-template-columns: 34mm 1fr; gap: 8px; padding: 2px 0; }
.imp-lib { color: #777; }
.imp-note { white-space: pre-wrap; margin: 0; }
.imp-pied { color: #999; font-size: 8.5pt; margin-top: 18px; border-top: 1px solid #eee; padding-top: 6px; }

/* ---------- Connecteur Claude ---------- */
.mcp-tete { gap: 10px; }
.mcp-tete-ligne { display: flex; align-items: flex-start; gap: 14px; }
.mcp-tete-ligne > .pile-serree { flex: 1; min-width: 0; }
.mcp-tete-ligne > .pastille { flex: none; margin-top: 2px; }
.mcp-logo { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--fond-doux); border: 1px solid var(--filet); display: grid; place-items: center; color: var(--texte-fort); }
.mcp-logo .icone { width: 21px; height: 21px; }
.carte-titre.sans-marge { margin: 0; }
.mcp-activite { display: flex; align-items: center; gap: 6px; padding-left: 54px; }
.mcp-activite .icone { width: 14px; height: 14px; }
.copiable { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border: 1px solid var(--bord); border-radius: 7px; background: var(--fond-doux); }
.copiable code { flex: 1; min-width: 0; background: none; border: 0; padding: 0; overflow-wrap: anywhere; word-break: break-all; color: var(--texte-fort); }
.copiable .btn { flex: none; }
.ligne-test { margin: 0; font-size: 13.5px; }
.ligne-test.ko { color: var(--orange-p); }
.tuto { margin: 0; padding: 0; list-style: none; counter-reset: tuto; display: flex; flex-direction: column; gap: 10px; }
.tuto li { counter-increment: tuto; display: block; position: relative; padding-left: 34px; line-height: 1.55; min-height: 22px; }
.tuto li::before { content: counter(tuto); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--fond-doux); border: 1px solid var(--bord); font-size: 12px; font-weight: 600; display: grid; place-items: center; color: var(--texte-fort); }
.tuto li strong { color: var(--texte-fort); font-weight: 600; }
.exemples-mcp { display: flex; flex-direction: column; gap: 4px; }
.exemple-mcp { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; border: 0; background: var(--fond-doux); color: inherit; font: inherit; text-align: left; cursor: copy; }
.exemple-mcp:hover { background: var(--fond-actif); }
.exemple-mcp .pastille { flex: none; }
.grise { opacity: 0.5; }
.outils-mcp { display: flex; flex-direction: column; border-top: 1px solid var(--filet); }
.outil-mcp { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--filet); }
.outil-mcp > .icone { width: 16px; height: 16px; color: var(--doux); flex: none; }
.outil-mcp-titre { flex: 1; min-width: 0; color: var(--texte-fort); }
.outil-mcp code { background: none; border: 0; padding: 0; }

@media (max-width: 800px) {
  .choix-carte-grille, .choix-carte-grille.trois { grid-template-columns: 1fr; }
  .guide-corps { padding-left: 4px; }
  .mcp-tete-ligne { flex-wrap: wrap; gap: 10px 12px; }
  .mcp-tete-ligne > .pile-serree { flex: 1 1 220px; }
  .mcp-tete-ligne > .pastille { margin: 0 0 0 52px; }
  .mcp-activite { padding-left: 0; }
  .outil-mcp code { display: none; }
}

/* ---------- Éditeur visuel de la lettre v0.8 ---------- */

.editeur-entete { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ligne-entete { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; align-items: center; }
.ligne-entete > .petit-texte { grid-column: 2; }
.editeur-barre {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  padding: 6px 8px; margin: 0 0 10px; background: var(--fond); border: 1px solid var(--bord); border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 15, 15, 0.06);
}
.aide-editeur { margin: 0 0 8px; }
.outils-defile { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; min-width: 0; }
.outils-fixes { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; padding-left: 6px; border-left: 1px solid var(--bord); }
.btn.outil-ed { height: 30px; min-width: 30px; padding: 0 6px; border-color: transparent; background: none; box-shadow: none; color: var(--texte); }
.btn.outil-ed:hover:not(:disabled) { background: var(--fond-survol); }
.btn.outil-ed:disabled { opacity: 0.35; }
.btn.outil-ed .icone { width: 17px; height: 17px; }
.btn.outil-ed.avec-texte { gap: 5px; padding: 0 8px; font-weight: 500; }
.btn.outil-ed.avec-texte span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outil-sep { width: 1px; height: 20px; background: var(--bord); margin: 0 4px; flex: none; }
.nom-selection { margin-right: 4px; }
.etat-sauvegarde { font-size: 12.5px; color: var(--doux); white-space: nowrap; }
.etat-sauvegarde.ok { color: var(--vert-p, #448361); }
.etat-sauvegarde.erreur { color: var(--rouge, #d44c47); }
.cadre-editeur { min-height: 420px; transition: none; }
.petit-titre { font-size: 13px; color: var(--texte-fort); }

@media (max-width: 800px) {
  .editeur-barre { margin: 0 -16px 10px; padding: 6px 10px; border-radius: 0; border-left: 0; border-right: 0; }
  .outils-defile { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
  .outils-defile::-webkit-scrollbar { display: none; }
  .outils-defile > * { flex: none; }
  .aide-editeur { margin: 0 0 6px; }
  .ligne-entete { grid-template-columns: 1fr; }
  .ligne-entete > .petit-texte { grid-column: 1; }
}

/* ---------- Statistiques v0.8 ---------- */

.stats-couleurs, .repartition, .graphe-stats, .legende, .lien-stat-barre, .bulle-graphe {
  --serie-1: #2a78d6; --serie-2: #eb6834; --serie-robot: #a5a39e; --serie-vide: #ebeae6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .repartition, :root:not([data-theme="light"]) .graphe-stats, :root:not([data-theme="light"]) .legende,
  :root:not([data-theme="light"]) .lien-stat-barre, :root:not([data-theme="light"]) .bulle-graphe {
    --serie-1: #3987e5; --serie-2: #d95926; --serie-robot: #6b6a66; --serie-vide: #2e2e2c;
  }
}
.serie-1 { background: var(--serie-1); fill: var(--serie-1); }
.serie-2 { background: var(--serie-2); fill: var(--serie-2); }
.serie-robot { background: var(--serie-robot); fill: var(--serie-robot); }
.serie-vide { background: var(--serie-vide); fill: var(--serie-vide); }
.tuile-sous { font-size: 12px !important; color: var(--pale) !important; }
.repartition { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 10px; }
.repartition-barre { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; background: var(--fond); }
.repartition-barre > span { flex-basis: 0; min-width: 3px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--texte); }
.legende-item { display: inline-flex; align-items: center; gap: 6px; }
.legende-item strong { color: var(--texte-fort); font-variant-numeric: tabular-nums; }
.pastille-couleur { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.graphe-stats { position: relative; margin: 10px 0 4px; min-height: 190px; }
.graphe-svg-stats { display: block; overflow: visible; }
.grille-ligne { stroke: var(--filet); stroke-width: 1; }
.axe-texte { fill: var(--pale); font-size: 11px; font-variant-numeric: tabular-nums; }
.cible-survol { fill: transparent; cursor: default; }
.cible-survol.survol { fill: var(--fond-survol); }
.bulle-graphe {
  position: absolute; top: 0; z-index: 2; width: 170px; padding: 8px 10px; border-radius: 8px; background: var(--fond); pointer-events: none;
  box-shadow: 0 0 0 1px var(--bord), 0 6px 18px rgba(15, 15, 15, 0.12); display: flex; flex-direction: column; gap: 3px; font-size: 12.5px;
}
.bulle-graphe strong { color: var(--texte-fort); font-size: 12.5px; }
.bulle-graphe span { display: flex; align-items: center; gap: 6px; }
.bulle-graphe b { margin-left: auto; color: var(--texte-fort); font-variant-numeric: tabular-nums; }
.liste-liens-stats { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.lien-stat { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lien-stat-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; min-width: 0; }
.lien-stat-tete .pile-serree { min-width: 0; }
.lien-stat-chiffres { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lien-stat-chiffres strong { color: var(--texte-fort); }
.lien-stat-barre { height: 8px; background: var(--fond-doux); border-radius: 4px; overflow: hidden; flex: 1; min-width: 40px; }
.lien-stat-barre > span { display: block; height: 100%; background: var(--serie-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.lien-stat-barre > span.serie-2 { background: var(--serie-2); }
.ligne-logiciel { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 32px; gap: 10px; align-items: center; font-size: 13.5px; }
.ligne-logiciel strong { text-align: right; font-variant-numeric: tabular-nums; color: var(--texte-fort); }
.recherche-stats { max-width: 200px; }
.chronologie-envoi { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chronologie-envoi li { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 8px; background: var(--fond-doux); }
.chronologie-envoi li.faux { opacity: 0.78; }
.chronologie-envoi strong { color: var(--texte-fort); }
@media (max-width: 800px) {
  .recherche-stats { max-width: none; width: 100%; }
  .ligne-logiciel { grid-template-columns: 110px 1fr 28px; }
}

/* =====================================================================
   v0.9 · Identité « Bic & surligneur »
   Une seule audace : le surligneur fluo marque ce qui compte maintenant
   (onglet actif, relance du jour, lettre de l'index). Le reste reste calme.
   ===================================================================== */

body { font: 15px/1.5 var(--police); letter-spacing: -0.003em; }
::selection { background: var(--fluo-doux); color: var(--texte-fort); }
mark, .surligne {
  background: linear-gradient(104deg, transparent 0.2em, var(--fluo) 0.2em, var(--fluo) calc(100% - 0.15em), transparent calc(100% - 0.15em));
  background-size: 100% 62%; background-position: 0 78%; background-repeat: no-repeat;
  color: inherit; padding: 0 0.14em; border-radius: 0.2em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) mark, :root:not([data-theme="light"]) .surligne { background-image: linear-gradient(104deg, transparent 0.2em, var(--fluo-doux) 0.2em, var(--fluo-doux) calc(100% - 0.15em), transparent calc(100% - 0.15em)); }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code { color: var(--accent-fort); background: var(--accent-fond); }

/* ----- Titres ----- */
.page-tete { margin-bottom: 20px; align-items: flex-end; }
.page-tete h1, .auth-carte h1, .marque {
  font-family: var(--display); font-variation-settings: "opsz" 96; font-weight: 780; letter-spacing: -0.04em;
}
.page-tete h1 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.02; }
.surtitre { font-size: 14px; color: var(--doux); margin-bottom: 6px; }
.compte-titre {
  font-family: var(--police); font-size: 14px; font-weight: 650; letter-spacing: 0; color: var(--doux);
  background: var(--fond-doux); border-radius: 999px; padding: 3px 10px; vertical-align: 0.5em; margin-left: 6px;
}
.titre-page { font-family: var(--display); font-variation-settings: "opsz" 72; font-weight: 760; letter-spacing: -0.035em; font-size: clamp(28px, 3vw, 38px); }
.retour { font-weight: 600; }
.carte-titre { font-family: var(--display); font-variation-settings: "opsz" 24; font-size: 17.5px; font-weight: 720; letter-spacing: -0.015em; color: var(--texte-fort); }
.carte-titre > span:first-child { font-family: var(--police); font-size: 16px; }

/* ----- Boutons ----- */
.btn {
  height: 36px; padding: 0 14px; border-radius: 12px; font-weight: 600; font-size: 14px; gap: 7px;
  border-color: var(--bord); box-shadow: none; transition: background 0.12s, transform 0.12s, box-shadow 0.12s, color 0.12s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.primaire { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); box-shadow: 0 6px 16px -6px rgba(36, 72, 242, 0.55); }
.btn.primaire:hover { background: var(--accent-fort); border-color: var(--accent-fort); filter: none; }
.btn.danger-plein { box-shadow: 0 6px 16px -6px rgba(229, 72, 77, 0.55); }
.btn.icone-seule { width: 36px; }
.btn.petit { height: 30px; padding: 0 11px; border-radius: 10px; font-size: 13px; }
.btn.petit.icone-seule { width: 30px; padding: 0; }
.btn.large { height: 46px; border-radius: 14px; font-size: 15.5px; }
.btn.grand { height: 46px; border-radius: 14px; padding: 0 22px; font-size: 15.5px; }
.lien { font-weight: 600; }
.lien-bouton { font-weight: 600; text-underline-offset: 2px; }

/* ----- Champs ----- */
.champ { height: 38px; border-radius: 12px; padding: 0 12px; border-color: var(--bord); transition: border-color 0.12s, box-shadow 0.12s; }
textarea.champ { padding: 10px 12px; }
select.champ { padding-right: 30px; background-position: right 9px center; }
.champ:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-fond); }
.libelle { font-weight: 600; color: var(--doux); }
.interrupteur .piste { width: 38px; height: 23px; border-radius: 12px; }
.interrupteur .piste::after { width: 19px; height: 19px; box-shadow: 0 1px 3px rgba(20, 26, 58, 0.3); }
.interrupteur input:checked + .piste { background: var(--accent); }
.interrupteur input:checked + .piste::after { transform: translateX(15px); }
.case { width: 17px; height: 17px; border-radius: 5px; }

/* ----- Callouts, cartes, tuiles ----- */
.callout { border-radius: 14px; padding: 13px 16px; gap: 11px; }
.carte { border-radius: var(--rayon-l); padding: 18px 20px; border-color: var(--bord); }
.tuile { border-radius: 16px; padding: 14px 16px; }
.tuile strong { font-family: var(--display); font-variation-settings: "opsz" 48; font-size: 30px; font-weight: 760; letter-spacing: -0.035em; line-height: 1.1; }
.gros-nombre { font-family: var(--display); font-variation-settings: "opsz" 72; letter-spacing: -0.04em; font-weight: 780; }
.progression { height: 8px; border-radius: 4px; }
.progression span { background: var(--accent); border-radius: 4px; }

/* Bande de chiffres (accueil) : une seule bande, pas quatre cartes */
.bande-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--bord); border-radius: var(--rayon-l); margin: 18px 0; overflow: hidden; }
.bande-chiffre { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-left: 1px solid var(--filet); min-width: 0; }
.bande-chiffre:first-child { border-left: 0; }
a.bande-chiffre:hover { background: var(--fond-doux); }
.bande-chiffre strong { font-family: var(--display); font-variation-settings: "opsz" 48; font-size: 30px; font-weight: 760; letter-spacing: -0.035em; color: var(--texte-fort); line-height: 1.1; font-variant-numeric: tabular-nums; }
.bande-chiffre > span { color: var(--doux); font-size: 13.5px; }
.bande-chiffre.chaud strong .surligne { padding: 0 0.1em; }

/* ----- Pastilles, puces, avatars ----- */
.pastille { height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.pastille.avec-icone { padding-left: 6px; }
.puce { height: 34px; padding: 0 13px; border-radius: 999px; border-color: transparent; background: var(--fond-doux); font-weight: 600; font-size: 13.5px; transition: background 0.12s, transform 0.12s; }
.puce:hover { background: var(--fond-actif); }
.puce:active { transform: scale(0.97); }
.puce.active { background: var(--texte-fort); color: var(--fond); }
.puce.active .puce-compte { color: var(--fond); opacity: 0.7; }
.puce.active .point { box-shadow: 0 0 0 2px var(--fond); }
.puce.statique { background: var(--fond-doux); }
.raccourci { height: 34px; border-radius: 999px; font-weight: 600; }
.filtre-actif { height: 34px; border-radius: 999px; padding: 0 4px 0 12px; font-weight: 600; background: var(--accent-fond); color: var(--accent-fort); }
.badge-nombre { background: var(--fluo-rose); }
.etiquette { border-radius: 7px; height: 22px; font-weight: 500; }

.avatar {
  border-radius: 34%; font-family: var(--display); font-variation-settings: "opsz" 24; font-weight: 720; letter-spacing: -0.02em;
  background: linear-gradient(150deg, var(--av-f, var(--gris-f)) 25%, color-mix(in srgb, var(--av-p, var(--gris-p)) 42%, var(--av-f, var(--gris-f))));
}
.avatar.c-gris { --av-f: var(--gris-f); --av-p: var(--gris-p); }
.avatar.c-brun { --av-f: var(--brun-f); --av-p: var(--brun-p); }
.avatar.c-orange { --av-f: var(--orange-f); --av-p: var(--orange-p); }
.avatar.c-jaune { --av-f: var(--jaune-f); --av-p: var(--jaune-p); }
.avatar.c-vert { --av-f: var(--vert-f); --av-p: var(--vert-p); }
.avatar.c-bleu { --av-f: var(--bleu-f); --av-p: var(--bleu-p); }
.avatar.c-violet { --av-f: var(--violet-f); --av-p: var(--violet-p); }
.avatar.c-rose { --av-f: var(--rose-f); --av-p: var(--rose-p); }
.avatar.c-rouge { --av-f: var(--rouge-f); --av-p: var(--rouge-p); }
.avatar.t-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar.t-s { width: 30px; height: 30px; font-size: 12px; }
.avatar.t-m { width: 40px; height: 40px; font-size: 15px; }
.avatar.t-l { width: 68px; height: 68px; font-size: 25px; }
.avatar.t-xl { width: 92px; height: 92px; font-size: 34px; }
.etoile.oui { color: #f0a400; }
.etoile.oui svg { fill: var(--fluo); stroke: #f0a400; }

/* ----- Coquille (ordinateur) ----- */
@media (min-width: 801px) {
  .coquille { grid-template-columns: 252px 1fr; }
}
.barre { padding: 16px 12px 12px; gap: 2px; }
.barre-tete { padding: 2px 8px 14px; gap: 10px; }
.barre-tete img { border-radius: 9px; }
.marque { font-size: 25px; color: var(--texte-fort); line-height: 1; }
.marque .surligne { padding: 0 0.08em; }
.badge-local { border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.recherche-rapide { height: 38px; border-radius: 12px; background: var(--fond); box-shadow: 0 0 0 1px var(--bord); margin-bottom: 12px; padding: 0 10px; }
.recherche-rapide:hover { background: var(--fond); box-shadow: 0 0 0 1px var(--pale); }
kbd { border-radius: 6px; font-weight: 600; }
.nav { gap: 2px; }
.nav-lien { height: 40px; border-radius: 12px; font-weight: 600; gap: 11px; padding: 0 10px; color: var(--texte); }
.nav-lien:hover { background: var(--fond-actif); }
.nav-lien .icone { width: 19px; height: 19px; }
.nav-lien.actif { background: var(--fond); color: var(--texte-fort); box-shadow: 0 0 0 1px var(--bord), 0 2px 6px rgba(20, 26, 58, 0.05); }
.nav-lien.actif .icone { color: var(--accent); }
.nav-lien.actif > span:nth-child(2) {
  background: linear-gradient(transparent 56%, var(--surligneur) 56%, var(--surligneur) 92%, transparent 92%); padding: 0 2px; margin: 0 -2px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-lien.actif > span:nth-child(2) { background: linear-gradient(transparent 56%, var(--fluo-doux) 56%, var(--fluo-doux) 92%, transparent 92%); }
}
.barre-section { font-weight: 650; color: var(--pale); padding: 18px 10px 6px; }
.nav-cat { height: 32px; border-radius: 10px; padding: 0 10px 0 13px; }
.nav-cat .point { width: 9px; height: 9px; border-radius: 3.5px; }
.nav-secondaire { height: 36px; }
.barre-pied { border-top-color: var(--bord); padding-top: 12px; }
.principal { padding-top: 40px; }

/* ----- Onglets ----- */
.onglets { border-bottom-color: var(--bord); gap: 4px; }
.onglet { font-weight: 600; padding: 10px 10px; border-bottom-width: 2.5px; }
.onglet.actif { border-bottom-color: var(--accent); color: var(--texte-fort); }
.onglet.actif .icone { color: var(--accent); }

/* ----- Fenêtres, menus, toasts ----- */
.modal-fond { background: rgba(13, 16, 36, 0.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { border-radius: 22px; box-shadow: var(--ombre); }
.modal-tete { padding: 18px 16px 6px 22px; }
.modal-tete h2 { font-family: var(--display); font-variation-settings: "opsz" 36; font-size: 20px; font-weight: 740; letter-spacing: -0.025em; }
.modal-corps { padding: 8px 22px 20px; }
.modal-pied { padding: 14px 22px; border-top-color: var(--filet); }
.modal-poignee { display: none; }
.palette-champ { font-size: 17px; padding: 18px 20px; }
.palette-item { border-radius: 12px; padding: 9px 10px; }
.palette-item.sel { background: var(--accent-fond); }
.menu { border-radius: 16px; padding: 6px; box-shadow: var(--ombre); }
.menu-item { border-radius: 10px; min-height: 36px; font-weight: 500; }
.menu-item:hover, .menu-item:focus { background: var(--fond-actif); }
.menu-fond { display: none; }
#toasts { bottom: 26px; }
.toast {
  background: var(--texte-fort); color: var(--fond); border-radius: 999px; padding: 11px 18px; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 10px 28px -8px rgba(13, 16, 36, 0.45); animation: toast-entre 0.28s cubic-bezier(0.2, 0.9, 0.25, 1.25);
}
.toast.erreur { background: var(--rouge); color: #fff; }
@keyframes toast-entre { from { transform: translateY(14px) scale(0.92); opacity: 0; } }

/* ----- Contacts : liste ordinateur ----- */
.recherche-zone .champ { height: 40px; border-radius: 999px; padding-left: 38px; background: var(--fond-doux); }
.recherche-zone .icone { left: 13px; top: 11px; }
.raccourci-recherche { top: 10px; right: 12px; }
.bascule { border-radius: 12px; border-color: var(--bord); padding: 2px; gap: 2px; background: var(--fond-doux); }
.bascule button { border-radius: 9px; height: 32px; background: none; }
.bascule button + button { border-left: 0; }
.bascule button.actif { background: var(--fond); color: var(--texte-fort); box-shadow: 0 1px 3px rgba(20, 26, 58, 0.12); }
.btn.outil { height: 36px; border-radius: 12px; }
.tableau-contacts td { height: 46px; }
.tableau-contacts tbody tr.ouvert { background: var(--accent-fond); }
.nom-texte { font-weight: 600; }
.tableau th { font-weight: 600; }

/* Cartes contacts, colonnes */
.carte-contact { border-radius: 18px; padding: 14px 16px; }
.carte-contact:hover { border-color: var(--pale); background: var(--fond); }
.carte-contact.ouvert { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); background: var(--fond); }
.kanban-col { border-radius: 18px; }
.carte-kanban { border-radius: 14px; padding: 11px 12px; }

/* ----- Fiche ----- */
.tiroir { box-shadow: var(--ombre); }
.fiche-identite { gap: 18px; }
.titre-prop { font-family: var(--display); font-variation-settings: "opsz" 72; font-weight: 760; letter-spacing: -0.035em; font-size: 30px; }
.actions-rondes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.action-ronde {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 62px; border-radius: 16px;
  background: var(--accent-fond); color: var(--accent); font-size: 12px; font-weight: 650; border: 0; cursor: pointer; padding: 0 4px;
  transition: transform 0.12s, background 0.12s; text-align: center;
}
.action-ronde .icone { width: 21px; height: 21px; }
.action-ronde:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.action-ronde:active { transform: scale(0.95); }
.action-ronde.inactif { background: var(--fond-doux); color: var(--pale); pointer-events: none; }
.action-ronde.chaud { background: var(--fluo); color: #141a3a; }
.action-ronde span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pastille-bouton { height: 30px; border-radius: 9px; font-weight: 650; }
.fiche-chiffres { gap: 0; border: 1px solid var(--bord); border-radius: 16px; overflow: hidden; }
.chiffre { border: 0; border-left: 1px solid var(--filet); border-radius: 0; padding: 11px 14px; }
.chiffre:first-child { border-left: 0; }
.chiffre-val { font-size: 15px; font-weight: 700; }
.chiffre.jour .chiffre-val > span:last-child { background: linear-gradient(transparent 55%, var(--surligneur) 55%, var(--surligneur) 92%, transparent 92%); color: var(--texte-fort); }
.fiche-onglets { gap: 4px; }
.fiche-onglet { font-weight: 600; border-bottom-width: 2.5px; }
.fiche-onglet.actif { border-bottom-color: var(--accent); }
.fiche-onglet.actif .icone { color: var(--accent); }
.onglet-compte { font-weight: 650; }
.fiche-section h3 { font-family: var(--display); font-variation-settings: "opsz" 24; font-size: 15px; font-weight: 720; letter-spacing: -0.01em; color: var(--texte-fort); border-bottom-color: var(--bord); }
.champ-prop { border-radius: 8px; }
.evenement-icone { border-radius: 34%; }

/* ----- Accueil ----- */
.accueil-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.accueil-tete h1 { font-family: var(--display); font-variation-settings: "opsz" 96; font-weight: 780; letter-spacing: -0.045em; font-size: clamp(38px, 5vw, 58px); line-height: 0.98; }
.accueil-resume { font-size: 16px; color: var(--doux); margin-top: 10px; }
.accueil-resume strong { color: var(--texte-fort); font-weight: 650; }

/* Bulles (relances du jour, favoris) */
.bulles { display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding: 6px 2px 4px; }
.bulles::-webkit-scrollbar { display: none; }
.bulle { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; flex: none; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--texte); }
.bulle-anneau { padding: 2.5px; border-radius: 37%; background: var(--bord); transition: transform 0.15s; }
.bulle:active .bulle-anneau { transform: scale(0.94); }
.bulle-anneau.chaud { background: conic-gradient(from 210deg, var(--accent), var(--fluo-rose), var(--fluo), var(--accent)); }
.bulle-anneau .avatar { width: 56px; height: 56px; font-size: 20px; border: 3px solid var(--fond); border-radius: 34%; box-sizing: content-box; }
.bulle-nom { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulle-quand { font-size: 11px; font-weight: 600; color: var(--doux); margin-top: -4px; }
.bulle-quand.retard { color: var(--rouge); }
.bulle-quand.jour { color: var(--texte-fort); }

/* ----- Connexion ----- */
.auth { background: var(--fond-doux); }
.auth-carte { border-radius: 26px; padding: 34px 30px; gap: 16px; box-shadow: var(--ombre-flottant); }
.auth-carte h1 { font-size: 34px; }
.auth-logo { width: 52px; height: 52px; border-radius: 14px; }

/* ----- Divers ----- */
.vide { padding: 64px 16px; }
.vide strong { font-family: var(--display); font-variation-settings: "opsz" 36; font-size: 21px; font-weight: 740; letter-spacing: -0.02em; }
.vide-emoji { font-size: 44px; }
.carte-edition, .carte-nl { border-radius: 16px; padding: 14px 16px; }
.carte-edition strong { font-family: var(--display); font-variation-settings: "opsz" 24; font-size: 16.5px; font-weight: 720; letter-spacing: -0.015em; }
.version-corps h2 { font-family: var(--display); font-variation-settings: "opsz" 48; font-weight: 760; letter-spacing: -0.03em; font-size: 24px; }
.version-numero { font-family: var(--display); font-weight: 700; }
.barre-enregistrer, .barre-groupe { border-radius: 18px; box-shadow: var(--ombre-flottant); }
.editeur-barre { border-radius: 16px; }
.cadre-zone { border-radius: 18px; }
.cadre-zone.mobile { border-radius: 30px; border-color: #141a3a; }

/* ----- Confettis ----- */
.confetti { position: fixed; z-index: 120; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; will-change: transform, opacity; }

/* =========================== Téléphone =========================== */

.bas-plus, .haut-mobile, .rail-az, .bulle-az, .tiroir-fond { display: none; }

@media (max-width: 800px) {
  :root { --haut-mobile: calc(env(safe-area-inset-top) + 43px); }
  body { font-size: 15.5px; }
  /* Pas de zoom automatique d'iOS sur les champs */
  .champ, .champ-prop, .palette-champ, textarea, select:not(.select-couleur), input:not([type]), input[type="search"], input[type="text"], input[type="email"], input[type="url"], input[type="date"], input[type="number"], input[type="password"], input[type="tel"] { font-size: 16px !important; }
  .principal { padding: calc(14px + env(safe-area-inset-top)) 16px calc(124px + env(safe-area-inset-bottom)); }
  .page-tete { margin-bottom: 14px; align-items: center; }
  .page-tete h1 { font-size: 36px; }
  .page-tete .btn.primaire:not(.garder-mobile) { display: none; }
  .accueil-tete h1 { font-size: 42px; }
  .accueil-tete .btn.primaire { display: none; }

  /* Barre d'onglets flottante, en verre, avec le bouton + au centre */
  .bas-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 35;
    height: 66px; padding: 0 6px; border: 0; border-radius: 24px;
    background: var(--verre); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
    box-shadow: var(--ombre-flottant);
  }
  .bas-lien { gap: 3px; font-size: 10.5px; font-weight: 650; color: var(--doux); padding: 0; height: 100%; justify-content: center; letter-spacing: 0; }
  .bas-lien .icone { width: 46px; height: 30px; padding: 5px 13px; border-radius: 999px; transition: background 0.2s, transform 0.2s; }
  .bas-lien.actif { color: var(--texte-fort); }
  .bas-lien.actif .icone { background: var(--fluo); color: #141a3a; transform: scale(1.04); }
  .bas-lien:active .icone { transform: scale(0.9); }
  .bas-plus {
    display: flex; align-items: center; justify-content: center; justify-self: center; width: 54px; height: 54px; border-radius: 19px; border: 0;
    background: var(--accent); color: var(--sur-accent); box-shadow: 0 10px 22px -8px rgba(36, 72, 242, 0.7); cursor: pointer; transition: transform 0.15s;
  }
  .bas-plus .icone { width: 26px; height: 26px; }
  .bas-plus .icone svg { stroke-width: 2.4; }
  .bas-plus:active { transform: scale(0.92) rotate(90deg); }

  /* Titre compact qui apparaît en haut quand on descend */
  .haut-mobile {
    display: flex; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; right: 0; z-index: 34;
    padding: calc(env(safe-area-inset-top) + 10px) 60px 10px; font-weight: 700; font-size: 16px; color: var(--texte-fort);
    background: var(--verre); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid var(--filet); transform: translateY(-110%); transition: transform 0.22s ease;
  }
  .haut-mobile.visible { transform: none; }

  /* Fenêtres en feuilles qui montent du bas */
  .modal-fond { align-items: flex-end; padding: 0; }
  .modal, .modal.large {
    width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom);
    animation: feuille-monte 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
  }
  .modal.palette { max-height: 88vh; }
  .modal-poignee { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--bord); margin: 8px auto 0; flex: none; }
  .modal-tete { padding-top: 10px; }
  .modal-pied { flex-wrap: wrap; }
  .modal-pied > .btn { flex: 1; height: 46px; border-radius: 14px; font-size: 15.5px; }
  .modal-fond.sortie .modal { transform: translateY(100%); transition: transform 0.2s ease-in; }
  .menu-fond { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(13, 16, 36, 0.4); animation: apparait 0.15s ease-out; }
  .menu.feuille-menu {
    left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; min-width: 0;
    max-height: 72vh; border-radius: 22px; padding: 8px; animation: feuille-monte 0.26s cubic-bezier(0.2, 0.9, 0.25, 1);
  }
  .menu.feuille-menu .menu-item { min-height: 48px; font-size: 16px; border-radius: 14px; padding: 0 14px; gap: 12px; }
  .menu.feuille-menu .menu-item > .icone { width: 19px; height: 19px; }
  .menu.feuille-menu .menu-titre { font-size: 13px; padding: 8px 14px 4px; }
  #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); width: calc(100vw - 32px); }

  /* Fiche : une feuille plein écran qui monte */
  .tiroir-fond { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(13, 16, 36, 0.4); animation: apparait 0.2s ease-out; }
  .tiroir, .tiroir.large {
    top: calc(env(safe-area-inset-top) + 8px); width: 100vw; border-radius: 24px 24px 0 0; animation: feuille-monte 0.32s cubic-bezier(0.2, 0.9, 0.25, 1);
  }
  .tiroir.sortie { animation: feuille-descend 0.22s ease-in forwards; }
  .tiroir-barre { border-bottom: 0; padding: 4px 10px; position: relative; }
  .tiroir-barre::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--bord); }
  .tiroir-corps { padding: 6px 16px calc(40px + env(safe-area-inset-bottom)); gap: 18px; }
  .fiche-entete { align-items: center; text-align: center; gap: 16px; }
  .fiche-identite { flex-direction: column; gap: 12px; align-items: center; }
  .fiche-identite .avatar { width: 96px; height: 96px; font-size: 36px; }
  .fiche-noms { align-items: center; }
  .titre-noms { justify-content: center; }
  .titre-prop { font-size: 30px; text-align: center; }
  .sous-titre { justify-content: center; }
  .fiche-pastilles { justify-content: center; }
  .actions-rondes { width: 100%; }
  .fiche-chiffres { grid-template-columns: 1fr 1fr; }
  .chiffre:nth-child(3) { border-left: 0; }
  .chiffre:nth-child(n+3) { border-top: 1px solid var(--filet); }
  .fiche-onglets { top: -6px; }

  /* Contacts : une vraie liste de téléphone */
  .bascule-vues { display: none; }
  .vue-mobile-bouton { display: inline-flex; }
  .recherche-zone { max-width: none; min-width: 100%; }
  .recherche-zone .champ { height: 44px; font-size: 16px; }
  .recherche-zone .icone { top: 13px; }
  .liste-mobile { border-top: 0; }
  .ligne-mobile { min-height: 66px; gap: 12px; padding: 0 4px 0 0; border-bottom: 0; position: relative; background: var(--fond); }
  .liste-mobile.avec-index .ligne-mobile { padding-right: 26px; }
  .ligne-mobile::after { content: ""; position: absolute; left: 56px; right: 0; bottom: 0; height: 1px; background: var(--filet); }
  .ligne-mobile .avatar { width: 44px; height: 44px; font-size: 16.5px; }
  .ligne-mobile.ouvert, .ligne-mobile:active { background: var(--fond-doux); }
  .lm-noms { flex-direction: column; align-items: flex-start; gap: 1px; }
  .lm-nom { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; max-width: 100%; }
  .lm-sous { font-size: 13.5px; color: var(--doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .lm-meta { gap: 8px; }
  .lm-meta .date-relance.jour, .lm-meta .date-relance.retard { background: var(--fluo); color: #141a3a; border-radius: 999px; padding: 2px 7px; }
  .lm-meta .date-relance.retard { background: var(--rouge-f); color: var(--rouge-t); }
  .lettre-section {
    position: sticky; top: var(--haut-mobile); z-index: 3; background: var(--fond); padding: 14px 0 4px;
    font-family: var(--display); font-variation-settings: "opsz" 36; font-size: 22px; font-weight: 780; letter-spacing: -0.02em; color: var(--texte-fort);
  }
  .lettre-section span { background: linear-gradient(transparent 52%, var(--surligneur) 52%, var(--surligneur) 90%, transparent 90%); padding: 0 4px; }
  .rail-az {
    display: flex; opacity: 0; pointer-events: none; transition: opacity 0.2s; flex-direction: column; align-items: center; position: fixed; right: 2px; top: 50%; transform: translateY(-50%); z-index: 20;
    padding: 6px 3px; border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none;
  }
  .rail-az.visible { opacity: 1; pointer-events: auto; }
  .rail-az button { border: 0; background: none; padding: 0; width: 22px; height: 15.5px; font: 700 10.5px/1 var(--police); color: var(--accent); cursor: pointer; }
  .rail-az.actif { background: var(--fond-doux); }
  .bulle-az {
    display: grid; place-items: center; position: fixed; left: 50%; top: 42%; z-index: 60; width: 92px; height: 92px; margin-left: -46px; border-radius: 30px;
    background: var(--fluo); color: #141a3a; font-family: var(--display); font-variation-settings: "opsz" 96; font-size: 54px; font-weight: 800; letter-spacing: -0.04em;
    box-shadow: var(--ombre-flottant); pointer-events: none; opacity: 0; transform: scale(0.8); transition: opacity 0.12s, transform 0.12s;
  }
  .bulle-az.visible { opacity: 1; transform: none; }
  /* Glisser une ligne pour révéler les actions */
  .glisse { position: relative; overflow: hidden; }
  .glisse-actions { position: absolute; top: 0; bottom: 0; right: 0; display: flex; }
  .glisse-action {
    width: 72px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-size: 11.5px; font-weight: 700; color: #fff; cursor: pointer; text-decoration: none;
  }
  .glisse-action .icone { width: 21px; height: 21px; }
  .glisse-action.appel { background: #1fae6c; }
  .glisse-action.mail { background: var(--accent); }
  .glisse-action.relance { background: var(--fluo); color: #141a3a; }
  .glisse-action.inactif { background: var(--pale); opacity: 0.6; pointer-events: none; }
  .glisse > .ligne-mobile { transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.25, 1); z-index: 1; touch-action: pan-y; }
  .glisse.en-glisse > .ligne-mobile { transition: none; }
  .bulles-contacts { margin: 0 -16px 8px; padding: 6px 16px 6px; }

  .carte-contact { padding: 11px 12px; border-radius: 16px; }
  .bande-chiffres { grid-template-columns: 1fr 1fr; }
  .bande-chiffre:nth-child(3) { border-left: 0; }
  .bande-chiffre:nth-child(n+3) { border-top: 1px solid var(--filet); }
  .bande-chiffre strong { font-size: 28px; }
  .tuiles { gap: 8px; }
  .carte { padding: 16px; border-radius: 20px; }
  .onglets { margin: 0 -16px 16px; padding: 0 16px; scrollbar-width: none; }
  .onglets::-webkit-scrollbar { display: none; }
  .barre-groupe { bottom: calc(88px + env(safe-area-inset-bottom)); border-radius: 20px; }
  .barre-enregistrer { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .editeur-barre { top: var(--haut-mobile); }
  .editeur-barre:not(.flottante) { box-shadow: 0 -10px 0 var(--fond), 0 4px 14px rgba(15, 15, 15, 0.06); }
  .editeur-barre.flottante { position: fixed; top: 0; left: 0; right: 0; z-index: 40; margin: 0; padding-top: calc(8px + env(safe-area-inset-top)); will-change: transform; }
  .cale-barre { margin: 0 0 10px; }
  .page-tete { margin-bottom: 20px; }
  .btn { height: 40px; }
  .btn.petit { height: 34px; }
  .btn.petit.icone-seule { width: 34px; }
  .btn.icone-seule { width: 40px; }
  .btn.outil-ed { height: 36px; min-width: 36px; }
}

@keyframes feuille-monte { from { transform: translateY(100%); } }
@keyframes feuille-descend { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  .modal, .tiroir, .menu.feuille-menu, .toast { animation: none !important; }
  .confetti { display: none; }
}
@media (max-width: 800px) {
  .alerte-texte { display: none; }
  .bulles-accueil { margin: 4px -16px 6px; padding: 8px 16px 6px; }
  .titre-noms { gap: 0; }
}
.bulles-accueil { margin: 18px 0 2px; }

/* Relances de l'accueil : nom, motif et date à gauche, gestes à droite */
.ligne-relance .pile-serree { gap: 1px; }
.ligne-relance .date-relance { font-size: 12.5px; font-weight: 600; }
.ligne-relance .date-relance.jour { color: var(--texte-fort); background: var(--fluo); border-radius: 999px; padding: 1px 8px; align-self: flex-start; }
.ligne-relance .date-relance.retard { color: var(--rouge-t); background: var(--rouge-f); border-radius: 999px; padding: 1px 8px; align-self: flex-start; }
@media (max-width: 800px) {
  .ligne-relance { flex-wrap: nowrap; padding: 8px 2px; }
  .ligne-relance .ligne-lien { flex-basis: auto; }
  .ligne-relance .actions-ligne { opacity: 1; }
  .barre-outils > .rangee { flex-wrap: wrap; }
}
@media (max-width: 800px) {
  /* Recherche et affichage sur une seule ligne */
  .barre-outils { flex-wrap: nowrap; gap: 6px; }
  .recherche-zone { min-width: 0; flex: 1; }
  .outils-droite { width: auto; flex-wrap: nowrap; gap: 6px; }
  .outils-droite .btn.outil { height: 44px; width: 44px; padding: 0; border-radius: 999px; background: var(--fond-doux); border-color: transparent; }
  .outils-droite .btn.outil .icone { width: 19px; height: 19px; color: var(--texte); }
  .outils-droite .btn.outil .chevron-outil, .outils-droite .btn.outil .fleche-tri { display: none; }
}
.auth-carte .marque-auth { font-size: 46px; line-height: 1; margin-top: 4px; }
.auth-carte .marque-auth .surligne { padding: 0 0.06em; }
/* Cases à cocher en forme de puces : coche bleue plutôt que l'encre pleine des filtres */
label.puce.active { background: var(--accent-fond); color: var(--accent-fort); }
label.puce.active .puce-compte { color: var(--accent-fort); opacity: 0.75; }
label.puce.active .point { box-shadow: none; }

/* ----- Callout pliable (« N points à regarder ») ----- */
.callout.pliable { align-items: flex-start; }
.callout.pliable.replie { align-items: center; }
.callout-bascule {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; margin: -6px 0; padding: 6px 0;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 8px;
}
.callout-bascule strong { flex: none; }
.callout-apercu { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--doux); font-size: 13.5px; }
.callout-chevron { margin-left: auto; width: 18px; height: 18px; color: var(--doux); transition: transform 0.22s; transform: rotate(180deg); }
.callout.replie .callout-chevron { transform: none; }
.callout.pliable:not(.replie) .callout-apercu { display: none; }
.callout-corps { display: grid; grid-template-rows: 1fr; margin-top: 6px; transition: grid-template-rows 0.22s, margin-top 0.22s; }
.callout-corps-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.callout.replie .callout-corps { grid-template-rows: 0fr; margin-top: 0; }
.callout-bascule:hover .callout-chevron { color: var(--texte-fort); }
@media (prefers-reduced-motion: reduce) { .callout-corps, .callout-chevron { transition: none; } }

/* ----- Surligneur la nuit -----
   Un jaune transparent posé sur du bleu nuit vire au kaki.
   La nuit, le fluo devient une étiquette pleine, avec le texte à l'encre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) ::selection { background: rgba(124, 147, 255, 0.42); color: #fff; }
  :root:not([data-theme="light"]) mark,
  :root:not([data-theme="light"]) .surligne,
  :root:not([data-theme="light"]) .lettre-section span,
  :root:not([data-theme="light"]) .chiffre.jour .chiffre-val > span:last-child {
    background: var(--fluo); color: #141a3a; padding: 0 0.16em; border-radius: 0.24em;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
  }
  :root:not([data-theme="light"]) .marque .surligne { padding: 0.02em 0.14em 0.06em; border-radius: 0.2em; }
  :root:not([data-theme="light"]) .auth-carte .marque-auth .surligne { padding: 0.02em 0.12em 0.06em; }
  /* Onglet actif de la barre latérale : la pastille fluo passe sur l'icône, comme la barre du bas sur téléphone */
  :root:not([data-theme="light"]) .nav-lien.actif > span:nth-child(2) { background: none; padding: 0; margin: 0; }
  :root:not([data-theme="light"]) .nav-lien.actif .icone { background: var(--fluo); color: #141a3a; width: 27px; height: 27px; padding: 4px; margin: -4px; border-radius: 8px; }
}

/* =====================================================================
   v1.0 · Tags
   Des pastilles colorées (les mêmes couleurs que les anciennes catégories),
   plusieurs par contact, partout où l'on voyait la catégorie.
   ===================================================================== */
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; vertical-align: middle; }
.tags.une-ligne { flex-wrap: nowrap; overflow: hidden; }
.tag { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1; flex: none; }
.tag.plus { background: var(--fond-survol); color: var(--doux); font-weight: 600; }
.tags-edit { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.tag-retirer { border: 0; background: none; padding: 0; margin: 0 -3px 0 1px; width: 16px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; cursor: pointer; color: inherit; opacity: 0.55; }
.tag-retirer:hover { opacity: 1; background: rgba(20, 26, 58, 0.08); }
.tag-retirer .icone { width: 12px; height: 12px; }
.tag-ajouter { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 6px; border-radius: 7px; border: 1.5px dashed var(--bord); background: none; color: var(--doux); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tag-ajouter:hover { border-color: var(--accent); color: var(--accent); }
.tag-ajouter .icone { width: 14px; height: 14px; }
.tag-ajouter:only-child, .tags-edit > .tag-ajouter:first-child:last-child { padding-right: 10px; }

/* Sélecteur de tags (panneau, ou feuille sur téléphone) */
.choix-tags { width: 290px; padding: 6px; gap: 2px; }
.choix-tags .menu-titre { padding: 6px 8px 6px; }
.choix-tags > .champ { margin: 0 2px 6px; width: calc(100% - 4px); height: 34px; }
.choix-tags-aide { font-size: 12.5px; color: var(--doux); margin: 0 8px 6px; }
.choix-tags-liste { display: flex; flex-direction: column; gap: 1px; max-height: 300px; overflow-y: auto; }
.choix-tags .menu-item > .point { width: 10px; height: 10px; margin: 0 2px; }
.choix-tags .creer-tag { color: var(--accent); font-weight: 600; }
.choix-tags .creer-tag .icone { color: var(--accent); }
.choix-tags-vide { padding: 6px 10px; margin: 0; }

/* Barre latérale : titre « Tags » avec le lien Gérer */
.barre-section.avec-action { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-right: 6px; }
.barre-action { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--pale); }
.barre-action:hover { background: var(--fond-actif); color: var(--texte-fort); }
.barre-action .icone { width: 15px; height: 15px; }

/* Filtres de la liste */
.puce.puce-gerer { padding: 0 9px; color: var(--pale); }
.puce.puce-gerer .icone { width: 15px; height: 15px; }
.puce.puce-logique { border-style: dashed; color: var(--accent-fort); }

/* Fiche : les tags à la place de la catégorie */
.pastille-bouton.tags-bouton { background: none; box-shadow: inset 0 0 0 1px var(--bord); padding: 0 6px 0 4px; gap: 4px; color: var(--doux); max-width: 100%; }
.pastille-bouton.tags-bouton:hover { background: var(--fond-survol); filter: none; }
.pastille-bouton.tags-bouton .tags { flex-wrap: nowrap; overflow: hidden; }
.pastille-bouton.tags-bouton .tag { height: 20px; font-size: 12px; }

/* Réglages > Tags */
.lignes-tags { display: flex; flex-direction: column; }
.ligne-tag { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--filet); }
.ligne-tag:last-child { border-bottom: 0; }
.ligne-tag-ordre { display: inline-flex; flex-direction: column; }
.ligne-tag-ordre .btn.mini { height: 18px; width: 22px; }
.ligne-tag-ordre .icone { width: 14px; height: 14px; }
.pastille-couleur { width: 26px; height: 26px; border-radius: 9px; border: 0; cursor: pointer; flex: none; box-shadow: inset 0 0 0 1px rgba(20, 26, 58, 0.08); }
.pastille-couleur:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.ligne-tag-noms { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ligne-tag-nom { font-weight: 650; color: var(--texte-fort); }
.ligne-tag-desc { font-size: 13px; color: var(--doux); }
.ligne-tag-nb { font-size: 13px; color: var(--doux); white-space: nowrap; text-decoration: none; }
.ligne-tag-nb:hover { color: var(--accent); text-decoration: underline; }
.ligne-tag .interrupteur { font-size: 13px; }
.nouveau-tag { margin-top: 12px; flex-wrap: nowrap; }
.nouveau-tag .champ { flex: 1; min-width: 0; }

/* Édition : pour qui et versions */
.grille-destinataires { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.version-corps { min-width: 0; }
.grille-destinataires > .carte { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.grille-destinataires + .pile { margin-top: 14px; }
.choix-carte-grille.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choix-carte.petit-choix .pile-serree { gap: 1px; min-width: 0; }
.choix-carte.petit-choix strong { font-weight: 650; color: var(--texte-fort); font-size: 14px; }
.choix-carte.petit-choix.actif .icone { color: var(--accent); }
.bascule.bascule-texte button { padding: 0 11px; font-size: 13px; font-weight: 600; }
.lignes-versions { display: flex; flex-direction: column; border: 1px solid var(--filet); border-radius: 14px; overflow: hidden; }
.ligne-version { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 10px 10px 8px; border-bottom: 1px solid var(--filet); }
.ligne-version:last-child { border-bottom: 0; }
.ligne-version.autres { background: var(--fond-doux); }
.version-num { display: inline-grid; place-items: center; width: 22px; color: var(--pale); font-weight: 700; font-size: 13px; }
.version-nom { font-weight: 650; color: var(--texte-fort); width: auto; min-width: 90px; max-width: 220px; }
.version-objet { display: flex; align-items: center; gap: 8px; }
.version-objet .champ { flex: 1; min-width: 0; height: 30px; font-size: 13.5px; }
.version-compte { font-size: 12.5px; color: var(--doux); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Choisir des contacts un par un */
.choix-contacts-liste { display: flex; flex-direction: column; max-height: min(52vh, 460px); overflow-y: auto; border: 1px solid var(--filet); border-radius: 12px; }
.choix-contact { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--filet); cursor: pointer; min-width: 0; }
.choix-contact:last-child { border-bottom: 0; }
.choix-contact:hover { background: var(--fond-survol); }
.choix-contact input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.choix-contact .pile-serree { flex: 1; min-width: 0; }

@media (max-width: 800px) {
  .choix-carte-grille.trois { grid-template-columns: 1fr; }
  .ligne-tag { grid-template-columns: auto auto minmax(0, 1fr) auto; row-gap: 6px; }
  .ligne-tag .interrupteur { grid-column: 3; grid-row: 2; }
  .ligne-tag-nb { grid-column: 4; grid-row: 2; justify-self: end; }
  .ligne-version { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ligne-version .version-compte { grid-column: 2; grid-row: 2; }
  .choix-tags.feuille-menu { width: auto; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); }
  .choix-tags.feuille-menu > .champ { height: 44px; font-size: 16px; }
  .choix-tags.feuille-menu .choix-tags-liste { max-height: 46vh; }
  .choix-tags.feuille-menu .menu-item { min-height: 46px; font-size: 16px; }
  .choix-contact { padding: 11px 12px; }
}

/* ---------- v1.1 : liste des newsletters avec chiffres, archives, historique, tests ---------- */
.texte-rouge { color: var(--rouge); }
.bande-nl { margin: 4px 0 10px; }
.bande-chiffre.alerte strong { color: var(--rouge); }
.nl-infos { gap: 6px; margin-bottom: 14px; }
.nl-infos a { text-decoration: none; }
.carte-edition { gap: 12px; padding: 14px 16px; border-radius: var(--rayon-l, 14px); text-decoration: none; color: inherit; }
.carte-edition.archivee { opacity: 0.72; }
.carte-edition-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.carte-edition-titre { font-size: 16px; line-height: 1.3; color: var(--texte-fort); min-width: 0; overflow-wrap: anywhere; }
.carte-edition-tete > .rangee { flex: none; gap: 4px; }
.nl-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 0; border: 1px solid var(--filet); border-radius: 12px; overflow: hidden; }
.nl-chiffre { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-left: 1px solid var(--filet); min-width: 0; }
.nl-chiffre:first-child { border-left: 0; }
.nl-chiffre strong { font-size: 17px; font-weight: 700; color: var(--texte-fort); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-chiffre span { font-size: 12px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-chiffre.pale strong { color: var(--pale); font-weight: 500; }
.nl-chiffre.alerte strong { color: var(--rouge); }
.historique-nl { gap: 0; }
.ligne-historique { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--filet); }
.ligne-historique:first-child { border-top: 0; }
@media (max-width: 800px) {
  .nl-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nl-chiffre { border-left: 0; border-top: 1px solid var(--filet); }
  .nl-chiffre:nth-child(2n) { border-left: 1px solid var(--filet); }
  .nl-chiffre:nth-child(-n + 2) { border-top: 0; }
  .nl-infos { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
  .nl-infos::-webkit-scrollbar { display: none; }
  .nl-infos > * { flex: none; }
  .ligne-historique { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 800px) { .nl-chiffre:last-child:nth-child(odd) { grid-column: span 2; } }

/* Étapes de la mesure (Réglages > Envoi) */
.etapes { display: flex; flex-direction: column; gap: 12px; margin: 2px 0 4px; }
.etape { display: flex; gap: 12px; align-items: flex-start; }
.etape-num { flex: 0 0 24px; height: 24px; border-radius: 12px; background: var(--fond-doux); border: 1px solid var(--bord); display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: var(--doux); }
.etape.faite .etape-num { background: var(--vert-f); border-color: transparent; color: var(--vert); }
.etape-texte { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.etape.faite .etape-texte > strong { color: var(--doux); }

/* Pastille d'enregistrement dans la barre de l'éditeur */
.editeur-barre .etat-sauvegarde { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; margin-right: 4px; border-radius: 13px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--fond-doux); color: var(--doux); }
.editeur-barre .etat-sauvegarde:empty { display: none; }
.editeur-barre .etat-sauvegarde::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.editeur-barre .etat-sauvegarde.ok { background: var(--vert-f); color: var(--vert-t); }
.editeur-barre .etat-sauvegarde.ok::before { background: var(--vert); }
.editeur-barre .etat-sauvegarde.modifie { background: #fdecc8; color: #7a4a0a; }
.editeur-barre .etat-sauvegarde.modifie::before { background: #e09a2b; }
.editeur-barre .etat-sauvegarde.enregistrement::before, .editeur-barre .etat-sauvegarde.envoi::before { animation: pulse-etat 0.9s ease-in-out infinite alternate; }
.editeur-barre .etat-sauvegarde.erreur { background: #fdebec; color: #9f2f2d; cursor: pointer; }
@keyframes pulse-etat { from { opacity: 0.25; } to { opacity: 1; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .editeur-barre .etat-sauvegarde.modifie { background: #3d2c0f; color: #f3c77a; }
  :root:not([data-theme="light"]) .editeur-barre .etat-sauvegarde.erreur { background: #3b1a1a; color: #f2a5a3; }
}
:root[data-theme="dark"] .editeur-barre .etat-sauvegarde.modifie { background: #3d2c0f; color: #f3c77a; }
:root[data-theme="dark"] .editeur-barre .etat-sauvegarde.erreur { background: #3b1a1a; color: #f2a5a3; }
@media (max-width: 420px) {
  .editeur-barre .etat-sauvegarde { padding: 0 8px; }
}

/* Aperçu sombre de la lettre */
.cadre-zone.sombre { background: #000; }
.note-sombre { display: block; margin-top: 2px; color: var(--texte); }

/* Puces des tests : bien visibles quand elles sont cochées */
.puce.puce-test { gap: 7px; }
.puce-test .puce-coche { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--bord); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.puce-test .puce-coche .icone { width: 11px; height: 11px; stroke-width: 3; }
.puce.puce-test.active { background: var(--texte-fort); border-color: var(--texte-fort); color: var(--fond); font-weight: 600; }
.puce.puce-test.active .puce-coche { background: var(--fond); border-color: var(--fond); color: var(--texte-fort); }
.puce.puce-test:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primaire.envoye, .btn.primaire.envoye:disabled { background: var(--vert); border-color: var(--vert); color: #fff; opacity: 1; }

/* ===== Surveillance de l'envoi en direct ===== */
.texte-vert { color: var(--vert); }
.surv-etat { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 13px; font-size: 13px; font-weight: 600; }
.surv-etat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.surv-etat.c-vert::before { background: var(--vert-p); }
.surv-etat.c-bleu::before { background: var(--bleu-p); }
.surv-etat.c-jaune::before { background: var(--jaune-p); }
.surv-etat.c-rouge::before { background: var(--rouge-p); }
.surv-etat.c-gris::before { background: var(--gris-p); }
.surv-etat.vivant::before { animation: surv-pouls 1.6s ease-out infinite; }
@keyframes surv-pouls { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--vert-p) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.surv-total { display: flex; align-items: baseline; gap: 4px; margin-top: 2px; }
.surv-sur { color: var(--doux); font-size: 15px; }
.surv-barre { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--fond-actif); gap: 2px; }
.surv-barre span { display: block; height: 100%; min-width: 4px; transition: width 0.5s ease; }
.surv-barre .p-vert, .surv-legende .p-vert { background: var(--vert-p); }
.surv-barre .p-rouge, .surv-legende .p-rouge { background: var(--rouge-p); }
.surv-barre .p-gris, .surv-legende .p-gris { background: var(--gris-p); }
.surv-barre .p-vide { background: transparent; }
.surv-legende .p-vide { background: var(--fond-actif); border: 1px solid var(--bord); }
.surv-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--doux); }
.surv-legende span { display: inline-flex; align-items: center; gap: 6px; }
.surv-legende i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.surv-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--filet); padding-top: 12px; margin-top: 2px; }
.surv-chiffres > div { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; min-width: 0; }
.surv-chiffres > div:first-child { padding-left: 0; }
.surv-chiffres > div + div { border-left: 1px solid var(--filet); }
.surv-chiffres span { font-size: 12px; color: var(--doux); }
.surv-chiffres strong { font-size: 14px; color: var(--texte-fort); font-weight: 600; font-variant-numeric: tabular-nums; }

.surv-prochain-grille { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; }
.surv-anneau { position: relative; width: 120px; height: 120px; }
.surv-anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.surv-anneau circle { fill: none; stroke-width: 7; }
.surv-anneau .fond { stroke: var(--fond-actif); }
.surv-anneau .plein { stroke: var(--vert-p); stroke-linecap: round; transition: stroke-dashoffset 0.9s linear, stroke 0.3s; }
.surv-anneau.t-lot .plein { stroke: var(--bleu-p); }
.surv-anneau.t-horaires .plein { stroke: var(--gris-p); }
.surv-anneau.t-quota .plein { stroke: var(--jaune-p); }
.surv-anneau.t-google .plein, .surv-anneau.t-hors_ligne .plein { stroke: var(--rouge-p); }
.surv-anneau.t-envoi .plein { animation: surv-tourne 1s linear infinite; stroke-dasharray: 25 75; }
@keyframes surv-tourne { to { stroke-dashoffset: -100; } }
.surv-anneau-texte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.surv-reste { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--texte-fort); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; }
.surv-reste-sous { font-size: 11.5px; color: var(--doux); margin-top: 2px; }
.surv-prochain-corps { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.surv-qui { display: flex; align-items: center; gap: 10px; min-width: 0; }
.surv-qui-texte { display: flex; flex-direction: column; min-width: 0; }
.surv-qui-texte strong { font-size: 16px; color: var(--texte-fort); }
.surv-qui-texte span, .surv-file-qui span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.surv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.surv-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--gris-f); color: var(--gris-t); white-space: nowrap; }
.surv-chip.tu { background: var(--vert-f); color: var(--vert-t); }
.surv-chip.vous { background: var(--violet-f); color: var(--violet-t); }
.surv-chip.test { background: var(--jaune-f); color: var(--jaune-t); }
.surv-chip.essai { background: var(--orange-f); color: var(--orange-t); }
.surv-objet { display: flex; flex-direction: column; gap: 1px; padding: 9px 11px; border-radius: 8px; background: var(--fond-doux); }
.surv-objet span { font-size: 11.5px; color: var(--doux); text-transform: uppercase; letter-spacing: 0.04em; }
.surv-objet strong { font-size: 14px; font-weight: 500; color: var(--texte-fort); }
.surv-erreur { color: var(--rouge); font-size: 13px; margin: 0; }
.surv-raison { margin: 0; font-size: 13.5px; color: var(--doux); border-top: 1px solid var(--filet); padding-top: 10px; }

.surv-regles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.surv-regle { border: 1px solid var(--bord); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.surv-regle-tete { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.surv-regle-tete strong { color: var(--texte-fort); font-weight: 600; }
.surv-plage { position: relative; height: 16px; display: flex; align-items: center; }
.surv-plage .rail { width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--vert-f), var(--vert-p)); }
.surv-plage .marque { position: absolute; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--fond); border: 3px solid var(--texte-fort); transform: translateX(-50%); transition: left 0.5s; }
.surv-plage-bornes { display: flex; justify-content: space-between; font-size: 12px; color: var(--doux); font-variant-numeric: tabular-nums; }
.surv-plage-bornes strong { color: var(--texte-fort); font-weight: 600; }
.surv-points { display: flex; flex-wrap: wrap; gap: 4px; }
.surv-points i { width: 9px; height: 9px; border-radius: 50%; background: var(--fond-actif); }
.surv-points i.plein { background: var(--bleu-p); }
.surv-jauge { height: 8px; border-radius: 4px; background: var(--fond-actif); overflow: hidden; }
.surv-jauge span { display: block; height: 100%; background: var(--vert-p); border-radius: 4px; transition: width 0.5s; }
.surv-jauge.pleine span { background: var(--jaune-p); }
.surv-jours { display: flex; gap: 4px; }
.surv-jours span { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; background: var(--fond-actif); color: var(--pale); }
.surv-jours span.actif { background: var(--vert-f); color: var(--vert-t); }
.surv-jours span.auj { outline: 2px solid var(--texte-fort); outline-offset: 1px; }

.surv-file { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.surv-file li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--filet); min-width: 0; }
.surv-file li:first-child { border-top: 0; }
.surv-rang { width: 30px; flex: none; font-size: 12px; color: var(--pale); font-variant-numeric: tabular-nums; }
.surv-file-qui { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.surv-file-qui strong { font-size: 14px; font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.surv-file .surv-chips { flex: none; flex-wrap: nowrap; }
.surv-file-pied { display: flex; align-items: center; gap: 10px; }
.surv-file-pied:empty { display: none; }

.surv-direct { width: 9px; height: 9px; border-radius: 50%; background: var(--vert-p); animation: surv-pouls 1.6s ease-out infinite; }
.surv-console { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; font-size: 13px; border-radius: 8px; background: var(--fond-doux); }
.surv-console li { display: flex; gap: 10px; padding: 5px 12px; align-items: baseline; }
.surv-console li + li { border-top: 1px solid var(--filet); }
.surv-console li:first-child { animation: surv-arrivee 0.5s ease; }
@keyframes surv-arrivee { from { background: var(--accent-fond); } to { background: transparent; } }
.surv-heure { flex: none; font-family: var(--mono); font-size: 11.5px; color: var(--pale); }
.surv-msg { flex: 1; min-width: 0; color: var(--texte); }
.surv-console li.bon .surv-msg { color: var(--texte-fort); font-weight: 500; }
.surv-console li.mauvais .surv-msg { color: var(--rouge); }
.surv-console li.doux .surv-msg { color: var(--doux); }
.surv-fois { flex: none; font-size: 11.5px; color: var(--pale); font-variant-numeric: tabular-nums; }

.surv-flux { display: flex; align-items: stretch; gap: 6px; }
.surv-flux > div { flex: 1; border: 1px solid var(--bord); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.surv-flux > div > span { font-size: 20px; }
.surv-flux strong { font-size: 13.5px; color: var(--texte-fort); }
.surv-flux small { font-size: 11.5px; color: var(--doux); line-height: 1.3; }
.surv-flux > i { align-self: center; font-style: normal; color: var(--pale); }
.surv-statuts { display: flex; flex-direction: column; gap: 10px; }
.surv-statut { display: flex; gap: 10px; align-items: flex-start; }
.surv-statut > div { display: flex; flex-direction: column; gap: 1px; }
.surv-statut strong { font-size: 13.5px; color: var(--texte-fort); }
.surv-statut-point { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--gris-p); }
.surv-statut.ok .surv-statut-point { background: var(--vert-p); }
.surv-statut.non .surv-statut-point { background: var(--rouge-p); }

@media (max-width: 800px) {
  .surv-prochain-grille { grid-template-columns: 96px 1fr; gap: 14px; }
  .surv-anneau { width: 96px; height: 96px; }
  .surv-reste { font-size: 18px; }
  .surv-regles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .surv-regle { padding: 10px; }
  .surv-chiffres > div { padding: 0 8px; }
  .surv-chiffres strong { font-size: 13px; }
  .surv-file .surv-chips .surv-chip:not(.tu):not(.vous) { display: none; }
}
@media (max-width: 420px) {
  .surv-regles { grid-template-columns: 1fr; }
  .surv-flux small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .surv-etat.vivant::before, .surv-direct, .surv-anneau.t-envoi .plein { animation: none; }
}

/* Contacts choisis mais écartés (onglet Destinataires) */
.liste-ecartes { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.liste-ecartes li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Fenêtre de lancement : la liste des destinataires */
.lanc { border: 1px solid var(--bord); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lanc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.lanc-tete strong { color: var(--texte-fort); }
.lanc-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.lanc-liste li { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-top: 1px solid var(--filet); min-width: 0; }
.lanc-liste li:first-child { border-top: 0; }
.lanc-liste.ecartes li { opacity: 0.8; }
.lanc-qui { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lanc-qui strong { font-size: 14px; font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanc-qui span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanc .surv-chips { flex: none; flex-wrap: nowrap; }

/* ===== Tour de contrôle compacte (v1.2.0) ===== */
.surv-etat.c-jaune::before { background: var(--jaune-p); }
.surv-maintenant { display: flex; align-items: center; gap: 14px; padding: 4px 0 2px; }
.surv-maintenant-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.surv-phrase { font-family: var(--display); font-size: 20px; line-height: 1.2; color: var(--texte-fort); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.surv-sous-phrase { font-size: 13.5px; color: var(--doux); }
.surv-sous-phrase:empty { display: none; }
.surv-mini { position: relative; width: 52px; height: 52px; flex: none; }
.surv-mini[hidden] { display: none; }
.surv-mini svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.surv-mini circle { fill: none; stroke-width: 9; }
.surv-mini .fond { stroke: var(--fond-actif); }
.surv-mini .plein { stroke: var(--vert-p); stroke-linecap: round; transition: stroke-dashoffset 0.9s linear; }
.surv-mini.t-securite .plein, .surv-mini.t-quota .plein { stroke: var(--jaune-p); }
.surv-mini.t-lot .plein { stroke: var(--bleu-p); }
.surv-mini.t-horaires .plein { stroke: var(--gris-p); }
.surv-mini.t-envoi .plein { stroke-dasharray: 25 75; animation: surv-tourne 1s linear infinite; }
.surv-mini-texte { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--texte-fort); font-variant-numeric: tabular-nums; }
.surv-progres { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--filet); padding-top: 10px; }
.surv-progres-ligne { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.surv-progres-ligne strong { color: var(--texte-fort); font-variant-numeric: tabular-nums; }
.surv-barre { height: 8px; border-radius: 4px; }
.surv-legende:empty { display: none; }

.surv-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.surv-liste li { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--filet); min-width: 0; }
.surv-liste li:first-child { border-top: 0; }
.surv-icone { width: 18px; flex: none; text-align: center; font-size: 13px; font-weight: 700; color: var(--pale); }
.surv-liste li.e-envoye .surv-icone, .surv-liste li.e-test .surv-icone { color: var(--vert); }
.surv-liste li.e-erreur .surv-icone, .surv-liste li.e-rebond .surv-icone { color: var(--rouge); }
.surv-liste li.e-envoye, .surv-liste li.e-test, .surv-liste li.e-ignore { opacity: 0.75; }
.surv-liste li.e-prochain { background: var(--fond-doux); border-radius: 10px; border-top-color: transparent; padding: 9px 8px; margin: 2px -8px; }
.surv-liste li.e-prochain + li { border-top-color: transparent; }
.surv-liste li.e-prochain .surv-icone { color: var(--accent); }
.surv-l-qui { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.surv-l-qui strong { font-size: 14px; font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.surv-l-qui span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.surv-l-droite { flex: none; display: flex; align-items: center; }
.surv-l-droite .surv-chips { flex-wrap: nowrap; }
.surv-liste li.surv-plus { justify-content: center; padding: 4px 0; }

.surv-rythme { display: flex; flex-wrap: wrap; gap: 6px; }
.surv-r { display: inline-flex; align-items: center; gap: 2px; padding: 5px 9px; border-radius: 8px; background: var(--fond-doux); font-size: 12.5px; color: var(--doux); white-space: nowrap; }
.surv-r strong { color: var(--texte-fort); font-weight: 600; margin: 0 2px; font-variant-numeric: tabular-nums; }
.surv-r.alerte { background: var(--jaune-f); color: var(--jaune-t); }
.surv-r.ferme { background: var(--gris-f); }
.surv-carte-rythme { gap: 10px; }

.surv-details > summary { cursor: pointer; list-style: none; }
.surv-details > summary::-webkit-details-marker { display: none; }
.surv-details > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--pale); border-bottom: 1.5px solid var(--pale); transform: rotate(45deg); transition: transform 0.2s; }
.surv-details[open] > summary::after { transform: rotate(-135deg); }
.surv-details .surv-console { max-height: 170px; }
.surv-page-etat { font-weight: 600; }
.surv-carte-liste, .surv-details { gap: 10px; }
@media (max-width: 800px) {
  .surv-phrase { font-size: 18px; }
  .surv-mini { width: 46px; height: 46px; }
  .surv-liste li.e-prochain .surv-l-droite .surv-chip:not(.tu):not(.vous) { display: none; }
}

/* ===== Bibliothèque de blocs (éditeur) ===== */
.modal.modal-bibli { width: min(880px, 100%); }
.bibli-onglets { flex-wrap: wrap; }
.bibli-onglets button { display: inline-flex; align-items: center; gap: 6px; }
.bibli-compte { font-size: 11.5px; color: var(--pale); font-variant-numeric: tabular-nums; }
.bibli-onglets button.actif .bibli-compte { color: inherit; opacity: 0.7; }
.bibli-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; min-height: 120px; }
.bibli-carte { position: relative; min-width: 0; }
.bibli-choisir { all: unset; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--fond); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.bibli-choisir:hover { border-color: var(--accent); box-shadow: var(--ombre-douce); transform: translateY(-1px); }
.bibli-choisir:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bibli-apercu { position: relative; height: 150px; overflow: hidden; background: #fff; border-bottom: 1px solid var(--filet); pointer-events: none; }
.bibli-apercu::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(transparent, #fff); }
.bibli-apercu iframe { position: absolute; top: 0; left: 0; width: 600px; height: 420px; border: 0; transform-origin: 0 0; background: #fff; }
.bibli-pied { display: flex; align-items: center; gap: 9px; padding: 10px 12px; min-width: 0; }
.bibli-icone { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--fond-doux); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.bibli-noms { display: flex; flex-direction: column; min-width: 0; }
.bibli-noms strong { font-size: 13.5px; font-weight: 600; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bibli-noms span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bibli-retirer { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--bord); background: var(--fond); color: var(--doux); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.bibli-retirer .icone { width: 14px; height: 14px; }
.bibli-carte:hover .bibli-retirer, .bibli-retirer:focus-visible { opacity: 1; }
@media (hover: none) { .bibli-retirer { opacity: 1; } }
.bibli-vide { grid-column: 1 / -1; padding: 24px 8px; text-align: center; }
@media (max-width: 800px) {
  .bibli-grille { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bibli-apercu { height: 110px; }
  .bibli-pied { padding: 8px 9px; gap: 7px; }
  .bibli-icone { display: none; }
}
@media (max-width: 380px) { .bibli-grille { grid-template-columns: 1fr; } }

/* ===== Mesure : choix du mode, et demande d'accord par mail ===== */
.choix-carte-grille.mesure-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mesure-modes .choix-carte-icone { font-size: 20px; }
.mesure-modes .choix-carte-titre { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 600px) { .choix-carte-grille.mesure-modes { grid-template-columns: 1fr; } }

.modal.modal-accord { width: min(940px, 100%); }
.accord-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.accord textarea.champ { min-height: 180px; resize: vertical; line-height: 1.5; }
.accord-vue { border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; background: #fff; }
.accord-entete { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--filet); background: var(--fond-doux); }
.accord-objet { font-size: 14px; color: var(--texte-fort); }
.accord-apercu { display: block; width: 100%; height: 380px; border: 0; background: #fff; }
.accord-qui { display: flex; flex-direction: column; gap: 6px; }
.accord-qui:empty { display: none; }
.accord-liste { display: flex; flex-direction: column; max-height: 190px; overflow-y: auto; border: 1px solid var(--bord); border-radius: 10px; }
.accord-personne { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-top: 1px solid var(--filet); cursor: pointer; min-width: 0; }
.accord-personne:first-child { border-top: 0; }
.accord-personne.vu { background: var(--fond-doux); }
.accord-personne-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.accord-personne-nom strong { font-size: 14px; font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accord-personne-nom span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accord-pied { width: 100%; flex-wrap: wrap; gap: 8px; }
.accord-pied .espace { flex: 1; }
.accord-progres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.accord-progres li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.accord-progres li.ok { color: var(--doux); }
.accord-etat { width: 22px; flex: none; text-align: center; }
@media (max-width: 800px) {
  .accord-grille { grid-template-columns: 1fr; }
  .accord-apercu { height: 320px; }
}

/* ===== Passage conditionnel (éditeur) ===== */
.modal.modal-cond { width: min(720px, 100%); }
.cond-bloc { display: flex; flex-direction: column; gap: 8px; }
.cond-bloc h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--texte-fort); }
.cond-regle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14.5px; padding: 10px 12px; border-radius: 10px; background: var(--fond-doux); }
.cond-regle select.champ.petit { width: auto; height: 34px; padding: 0 28px 0 10px; font-size: 14px; }
.cond-ed { min-height: 84px; padding: 11px 12px; border: 1px solid var(--bord); border-radius: 10px; background: var(--fond); font-size: 15px; line-height: 1.8; color: var(--texte-fort); outline: none; white-space: pre-wrap; word-break: break-word; }
.cond-ed:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.cond-puce { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 6px; background: var(--bleu-f); color: var(--bleu-t); font-size: 13.5px; font-weight: 600; line-height: 1.7; cursor: pointer; user-select: none; -webkit-user-select: none; white-space: nowrap; }
.cond-puce.tv { background: var(--vert-f); color: var(--vert-t); }
.cond-puce:hover, .cond-puce:focus-visible { filter: brightness(0.95); outline: 2px solid var(--accent); outline-offset: 1px; }
.cond-compte { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cond-compte strong { color: var(--texte-fort); }
.cond-barre { flex: 0 0 90px; height: 8px; border-radius: 4px; background: var(--fond-actif); overflow: hidden; }
.cond-barre span { display: block; height: 100%; background: var(--violet-p, #8b5cf6); border-radius: 4px; }
.cond-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.cond-liste li { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-top: 1px solid var(--filet); }
.cond-liste li:first-child { border-top: 0; }
.cond-liste li.non { opacity: 0.6; }
.cond-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cond-l strong { font-size: 13.5px; font-weight: 600; color: var(--texte-fort); }
.cond-l span { font-size: 13.5px; line-height: 1.45; }
.cond-liste li { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.cond-ligne { all: unset; box-sizing: border-box; display: flex; align-items: flex-start; gap: 9px; padding: 9px 4px; cursor: pointer; border-radius: 8px; width: 100%; }
.cond-ligne:hover { background: var(--fond-survol); }
.cond-ligne:focus-visible { outline: 2px solid var(--accent); }
.cond-l { flex: 1; }
.cond-nom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cond-raison { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.cond-raison.gris { background: var(--gris-f); color: var(--gris-t); }
.cond-raison.rouge { background: var(--rouge-f); color: var(--rouge-t); }
.cond-raison.vert { background: var(--vert-f); color: var(--vert-t); }
.cond-chevron { flex: none; color: var(--pale); padding-top: 2px; }
.cond-chevron .icone { width: 15px; height: 15px; }
.cond-liste li.non .cond-ligne { opacity: 0.75; }
.cond-liste li.non { opacity: 1; }
.cond-fiche { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px 39px; padding: 10px 12px; border-radius: 10px; background: var(--fond-doux); }
.cond-champ { display: flex; align-items: center; gap: 10px; }
.cond-champ > span { flex: 0 0 82px; font-size: 13px; color: var(--doux); }
.cond-champ .champ { flex: 1; min-width: 0; height: 36px; }
.cond-champ.tu input { width: 18px; height: 18px; }
@media (max-width: 600px) { .cond-fiche { margin-left: 0; } }
.cond-sinon:empty { display: none; }
.cond-sinon { padding: 12px; border-radius: 12px; border: 1px dashed var(--bord); }
.cond-sinon h3 { margin: 0; }
.cond-idees { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cond-idee { border: 1px solid var(--bord); background: var(--fond); color: var(--texte-fort); border-radius: 14px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.cond-idee:hover { border-color: var(--accent); }
.cond-raison.violet { background: var(--violet-f); color: var(--violet-t); }
.cond-barre { display: flex; gap: 2px; }
.cond-barre span.sinon { background: var(--violet-f); border: 1px solid var(--violet-p, #8b5cf6); box-sizing: border-box; }
/* Idées du « sinon » : on voit la phrase avant, et on peut revenir en arrière */
details.cond-idees { display: block; border-top: 1px solid var(--filet); padding-top: 8px; }
details.cond-idees > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--texte-fort); padding: 4px 0; list-style: none; }
details.cond-idees > summary::-webkit-details-marker { display: none; }
details.cond-idees[open] > summary { margin-bottom: 6px; }
details.cond-idees > .cond-idee-carte + .cond-idee-carte, details.cond-idees > p + .cond-idee-carte { margin-top: 8px; }
.cond-idee-carte { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; background: var(--fond); }
.cond-idee-carte strong { font-size: 13.5px; color: var(--texte-fort); }
.cond-idee-texte { margin: 0; font-size: 14px; line-height: 1.5; color: var(--texte); font-style: italic; }
.cond-projets { display: flex; flex-wrap: wrap; gap: 6px; }
.cond-projet { border: 1px solid var(--bord); background: var(--fond); color: var(--doux); border-radius: 14px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.cond-projet.actif { background: var(--texte-fort); border-color: var(--texte-fort); color: var(--fond); }
.cond-annuler { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 7px 10px; border-radius: 9px; background: var(--vert-f); color: var(--vert-t); font-size: 13px; font-weight: 500; }
.cond-annuler:empty { display: none; }

/* ===== Voir la lettre comme… ===== */
.voir-comme { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.voir-comme-ligne { display: flex; align-items: center; gap: 6px; min-width: 0; }
.voir-comme-choix { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; max-width: 420px; padding: 7px 10px; border: 1px solid var(--bord); border-radius: 10px; background: var(--fond); cursor: pointer; }
.voir-comme-choix:hover { border-color: var(--accent); }
.voir-comme-choix:focus-visible { outline: 2px solid var(--accent); }
.voir-comme-choix > .icone { width: 16px; height: 16px; color: var(--pale); flex: none; }
.voir-comme-icone { width: 26px; height: 26px; border-radius: 50%; background: var(--fond-doux); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.voir-comme-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.voir-comme-texte strong { font-size: 14px; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voir-comme-texte span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voir-comme-fleches { display: flex; gap: 2px; flex: none; }
.voir-comme-tout { align-self: flex-start; border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.modal.modal-voir { width: min(560px, 100%); }
.voir-section { display: flex; flex-direction: column; gap: 8px; }
.voir-section h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--texte-fort); }
.voir-exemples { display: flex; flex-wrap: wrap; gap: 6px; }
.voir-exemple { border: 1px solid var(--bord); background: var(--fond); color: var(--texte-fort); border-radius: 16px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; }
.voir-exemple.actif { background: var(--texte-fort); border-color: var(--texte-fort); color: var(--fond); }
.voir-liste { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; border: 1px solid var(--bord); border-radius: 10px; }
.voir-dest { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-top: 1px solid var(--filet); cursor: pointer; }
.voir-dest:first-child { border-top: 0; }
.voir-dest:hover, .voir-dest.actif { background: var(--fond-doux); }
.voir-dest-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.voir-dest-texte strong { font-size: 14px; font-weight: 500; color: var(--texte-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voir-dest-texte span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.outil-ed.actif { background: var(--accent-fond); color: var(--accent); }
.aide-insertion { color: var(--texte-fort); font-weight: 500; }

/* ---------- Voir comme : points de vue ---------- */
.pdv-num { width: 22px; height: 22px; border-radius: 50%; background: var(--fond-doux); color: var(--texte-fort); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.voir-comme-icone.pdv-num { width: 26px; height: 26px; font-size: 13px; }
.pdv-cartes { display: flex; flex-direction: column; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.pdv-carte { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--filet); cursor: pointer; }
.pdv-carte:first-child { border-top: 0; }
.pdv-carte:hover, .pdv-carte.actif { background: var(--fond-doux); }
.pdv-carte.actif .pdv-num { background: var(--texte-fort); color: var(--fond); }
.pdv-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pdv-carte > .icone { width: 16px; height: 16px; color: var(--pale); flex: none; }
.pdv-carte-corps { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pdv-parties { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pdv-p { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12.5px; background: var(--gris-f); color: var(--gris-t); white-space: nowrap; }
.pdv-p.premier { background: none; padding: 0 4px 0 0; font-size: 14px; font-weight: 600; color: var(--texte-fort); }
.pdv-p.groupe:not(.premier) { background: var(--bleu-f); color: var(--bleu-t); }
.pdv-p.tu { background: var(--vert-f); color: var(--vert-t); }
.pdv-p.avec { background: var(--fond-doux); color: var(--texte-fort); }
.pdv-p.sans { background: none; color: var(--doux); text-decoration: line-through; text-decoration-color: var(--pale); }
.pdv-qui { display: flex; align-items: center; gap: 7px; font-size: 12.5px; min-width: 0; }
.pdv-qui > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdv-qui strong { color: var(--texte-fort); font-weight: 500; }
.pdv-avatars { display: inline-flex; flex: none; }
.pdv-avatars > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--fond); }
.pdv-avatars > *:first-child { margin-left: 0; }
.pdv-unique { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--vert-f); color: var(--vert-t); font-size: 14px; }
.pdv-details { border: 1px solid var(--bord); border-radius: 10px; padding: 0 12px; gap: 10px; }
.pdv-details[open] { padding-bottom: 12px; }
.pdv-details > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--texte-fort); }
.pdv-details > summary::-webkit-details-marker { display: none; }
.pdv-details > summary::after { content: '›'; color: var(--pale); font-weight: 400; transition: transform .15s; }
.pdv-details[open] > summary::after { transform: rotate(90deg); }
.pdv-details > summary > span:first-child { flex: 1; }
.pdv-compo { display: flex; flex-direction: column; gap: 12px; }
.pdv-ligne { display: flex; flex-direction: column; gap: 6px; }
.pdv-lib { font-size: 12.5px; font-weight: 500; color: var(--doux); }
.pdv-val { font-size: 16px; }
.pdv-correspond { margin: 0; padding: 9px 11px; border-radius: 8px; background: var(--bleu-f); color: var(--bleu-t); font-size: 13.5px; }
.pdv-correspond.aucun { background: var(--fond-doux); color: var(--doux); }

/* ---------- Statistiques : en bref, ce que Carnet peut savoir ---------- */
.stats-phrases { margin: 0 0 14px; font-size: 15.5px; line-height: 1.6; color: var(--texte-fort); }
.stats-bref .tuiles { margin: 0; }
.tuile.pale strong { color: var(--pale); }
.mesure-barre { display: flex; gap: 3px; height: 10px; border-radius: 6px; overflow: hidden; margin: 2px 0 8px; }
.mesure-barre .oui { background: var(--serie-1); }
.mesure-barre .non { background: var(--serie-robot); }
.mesure-accord { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--filet); }
.mesure-accord p { margin: 0; }
