/* =====================================================================================================
 * Atelier — charte graphique de l'application unique (chargée en dernier, par-dessus le CRM et la partie SMS)
 * Parti pris : sobriété façon Apple. Gris neutres, une seule couleur d'accent utilisée avec parcimonie,
 * panneaux en verre translucide (barre latérale, barre du bas, fenêtres), listes à filets fins,
 * boutons en capsule, typographie système (SF Pro sur Mac et iPhone). Aucun dégradé ni halo décoratif.
 * Rayons : capsule pour les boutons, 10 px pour les champs, 14-16 px pour les cartes, 22-26 px pour les panneaux.
 * Les couleurs passent toutes par les jetons ci-dessous : six styles au choix (attribut data-theme sur <html>,
 * choisi dans « Apparence », mémorisé par appareil). La mise en page est la même dans tous les styles.
 * ===================================================================================================== */
/* Noir (par défaut) ; ses jetons servent aussi de base aux autres styles sombres */
:root, [data-theme="noir"], [data-theme="nuit"], [data-theme="graphite"], [data-theme="foret"] {
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --sidebar-w: 236px;
  --flou: blur(30px) saturate(180%);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Fond, voiles (blancs sur thème sombre, noirs sur thème clair), surfaces, verres */
  --bg: #050506;
  --fond: radial-gradient(1200px 700px at 6% -12%, rgba(255, 138, 61, 0.075), transparent 62%),
    radial-gradient(1000px 700px at 104% -4%, rgba(94, 92, 230, 0.09), transparent 62%),
    radial-gradient(900px 600px at 50% 118%, rgba(10, 132, 255, 0.055), transparent 62%), var(--bg);
  --voile-rgb: 255, 255, 255;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.085);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-2-hover: rgba(255, 255, 255, 0.095);
  --colonne: rgba(255, 255, 255, 0.03);
  --segment: rgba(255, 255, 255, 0.16);
  --verre: rgba(255, 255, 255, 0.05);
  --verre-bord: rgba(255, 255, 255, 0.1);
  --verre-fort: rgba(32, 32, 35, 0.82);
  --verre-barre: rgba(18, 18, 20, 0.62);
  --verre-dock: rgba(30, 30, 33, 0.66);
  --voile-fond: rgba(0, 0, 0, 0.45);
  --fantome: #2c2c2e;
  --trait: rgba(255, 255, 255, 0.08);
  --interrupteur: rgba(120, 120, 128, 0.36);
  --reflet: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --ombre: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  --ombre-carte: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.25);
  --ombre-fenetre: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  --ombre-fine: 0 1px 2px rgba(0, 0, 0, 0.3);

  /* Noms hérités du CRM et de la partie SMS */
  --bg-panel: #1c1c1e;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.09);
  --bg-input: rgba(118, 118, 128, 0.2);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.07);

  /* Texte */
  --text: #f5f5f7;
  --text-dim: rgba(235, 235, 245, 0.64);
  --text-faint: rgba(235, 235, 245, 0.4);
  --text-fort: #fff;
  --text-nav: rgba(245, 245, 247, 0.84);

  /* Accent */
  --accent: #ff8a3d;
  --accent-rgb: 255, 138, 61;
  --accent-fort: #f2762a;
  --sur-accent: #fff;
  --accent-soft: rgba(var(--accent-rgb), 0.15);

  /* États (texte) et leurs teintes de fond */
  --vert: #5fe07f; --vert-rgb: 48, 209, 88;
  --orange: #ffb340; --orange-rgb: 255, 159, 10;
  --rouge: #ff7a72; --rouge-rgb: 255, 69, 58;
  --bleu: #6cb6ff; --bleu-rgb: 10, 132, 255;
  --violet: #d696f8; --violet-rgb: 191, 90, 242;
  --jaune: #ffd60a; --jaune-rgb: 255, 214, 10;
  --danger: #ff453a; --ok: #30d158; --warn: #ffd60a; --info: #5eb0ff;

  /* Graphiques et carte */
  --c1: #ff8a3d; --c2: #5e9eff; --c3: #30d158;
  --carte-bas: #3a2a1f; --carte-haut: #ffb16a; --carte-trait: rgba(0, 0, 0, 0.6);
}

/* Bleu nuit : la palette d'origine du CRM (bleu marine et orange) */
[data-theme="nuit"] {
  color-scheme: dark;
  --bg: #0c111c;
  --fond: radial-gradient(1200px 700px at 6% -12%, rgba(232, 114, 42, 0.07), transparent 62%),
    radial-gradient(1000px 700px at 104% -4%, rgba(77, 163, 255, 0.08), transparent 62%), var(--bg);
  --voile-rgb: 150, 175, 220;
  --surface: #10192a; --surface-hover: #142036; --surface-2: #161f31; --surface-2-hover: #1b2539;
  --colonne: rgba(16, 25, 42, 0.6); --segment: rgba(150, 175, 220, 0.22);
  --verre: rgba(16, 25, 42, 0.72); --verre-bord: #223049; --verre-fort: rgba(16, 25, 42, 0.9);
  --verre-barre: rgba(12, 17, 28, 0.72); --verre-dock: rgba(20, 30, 49, 0.8); --voile-fond: rgba(4, 8, 16, 0.6);
  --fantome: #1b2539; --trait: #1b2740; --interrupteur: rgba(150, 175, 220, 0.24);
  --reflet: inset 0 1px 0 rgba(150, 175, 220, 0.07);
  --ombre-carte: inset 0 1px 0 rgba(150, 175, 220, 0.06), 0 1px 2px rgba(0, 0, 0, 0.25);
  --ombre-fenetre: inset 0 1px 0 rgba(150, 175, 220, 0.1), 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  --bg-panel: #10192a; --bg-card: #161f31; --bg-card-hover: #1b2539; --bg-input: #1a2438; --border: #223049; --border-soft: #1b2740;
  --text: #e8edf5; --text-dim: #8b97ab; --text-faint: #5d6a80; --text-fort: #fff; --text-nav: #c9d2df;
  --accent: #f08440; --accent-rgb: 232, 114, 42; --accent-fort: #e8722a; --sur-accent: #fff;
  --vert: #6fce74; --vert-rgb: 76, 175, 80; --orange: #f0924d; --orange-rgb: 232, 114, 42; --rouge: #ee7a7a; --rouge-rgb: 224, 82, 82;
  --bleu: #7db8f5; --bleu-rgb: 77, 163, 255; --violet: #c09cf9; --violet-rgb: 176, 124, 247; --jaune: #f5c542; --jaune-rgb: 245, 197, 66;
  --danger: #e05252; --ok: #4caf50; --warn: #f5c542; --info: #4da3ff;
  --c1: #e06a21; --c2: #6c8cf5; --c3: #22a884;
  --carte-bas: #3a2a1f; --carte-haut: #ffb16a; --carte-trait: #0c111c;
}

/* Blanc : clair, net, cartes blanches sur gris très pâle */
[data-theme="blanc"], [data-theme="sable"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --fond: var(--bg);
  --voile-rgb: 0, 0, 0;
  --surface: #ffffff; --surface-hover: #fbfbfd; --surface-2: #ffffff; --surface-2-hover: #fbfbfd;
  --colonne: rgba(0, 0, 0, 0.035); --segment: #ffffff;
  --verre: rgba(255, 255, 255, 0.74); --verre-bord: rgba(0, 0, 0, 0.09); --verre-fort: rgba(255, 255, 255, 0.9);
  --verre-barre: rgba(245, 245, 247, 0.78); --verre-dock: rgba(255, 255, 255, 0.8); --voile-fond: rgba(0, 0, 0, 0.26);
  --fantome: #ffffff; --trait: rgba(0, 0, 0, 0.08); --interrupteur: rgba(120, 120, 128, 0.22);
  --reflet: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ombre: 0 18px 50px -20px rgba(0, 0, 0, 0.2);
  --ombre-carte: 0 1px 2px rgba(0, 0, 0, 0.06);
  --ombre-fenetre: 0 40px 100px -30px rgba(0, 0, 0, 0.35);
  --ombre-fine: 0 1px 2px rgba(0, 0, 0, 0.14);
  --bg-panel: #ffffff; --bg-card: rgba(0, 0, 0, 0.04); --bg-card-hover: rgba(0, 0, 0, 0.07); --bg-input: rgba(118, 118, 128, 0.12);
  --border: rgba(0, 0, 0, 0.12); --border-soft: rgba(0, 0, 0, 0.08);
  --text: #1d1d1f; --text-dim: rgba(60, 60, 67, 0.74); --text-faint: rgba(60, 60, 67, 0.46); --text-fort: #000; --text-nav: rgba(29, 29, 31, 0.86);
  --accent: #e8590c; --accent-rgb: 232, 89, 12; --accent-fort: #f26a1b; --sur-accent: #fff;
  --vert: #1a8a3c; --vert-rgb: 52, 199, 89; --orange: #b25e00; --orange-rgb: 255, 149, 0; --rouge: #d0342c; --rouge-rgb: 255, 59, 48;
  --bleu: #0a66d8; --bleu-rgb: 0, 122, 255; --violet: #8a3fc4; --violet-rgb: 175, 82, 222; --jaune: #8a6a00; --jaune-rgb: 255, 204, 0;
  --danger: #ff3b30; --ok: #28a745; --warn: #b58900; --info: #007aff;
  --c1: #f26a1b; --c2: #3b82f6; --c3: #1fa15a;
  --carte-bas: #fde7d6; --carte-haut: #e8590c; --carte-trait: #ffffff;
}

/* Graphite : gris anthracite, accent bleu */
[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #1c1c1e;
  --fond: radial-gradient(1200px 700px at 6% -12%, rgba(10, 132, 255, 0.08), transparent 62%),
    radial-gradient(1000px 700px at 104% -4%, rgba(120, 120, 140, 0.1), transparent 62%), var(--bg);
  --voile-rgb: 255, 255, 255;
  --surface: rgba(255, 255, 255, 0.055); --surface-hover: rgba(255, 255, 255, 0.09); --surface-2: rgba(255, 255, 255, 0.075); --surface-2-hover: rgba(255, 255, 255, 0.11);
  --colonne: rgba(255, 255, 255, 0.035); --segment: rgba(255, 255, 255, 0.18);
  --verre: rgba(255, 255, 255, 0.06); --verre-bord: rgba(255, 255, 255, 0.11); --verre-fort: rgba(44, 44, 46, 0.86);
  --verre-barre: rgba(28, 28, 30, 0.7); --verre-dock: rgba(48, 48, 51, 0.74); --voile-fond: rgba(0, 0, 0, 0.4);
  --fantome: #3a3a3c; --trait: rgba(255, 255, 255, 0.09);
  --bg-panel: #2c2c2e;
  --accent: #4da2ff; --accent-rgb: 77, 162, 255; --accent-fort: #0a84ff; --sur-accent: #fff;
  --c1: #4da2ff; --c2: #ff9f0a; --c3: #30d158;
  --carte-bas: #24303e; --carte-haut: #7cc0ff; --carte-trait: rgba(0, 0, 0, 0.5);
}

/* Sable : clair et chaud, papier crème, accent terre cuite */
[data-theme="sable"] {
  color-scheme: light;
  --bg: #f3eee5;
  --fond: radial-gradient(1200px 700px at 6% -12%, rgba(194, 80, 15, 0.06), transparent 62%), var(--bg);
  --voile-rgb: 70, 45, 20;
  --surface: #fbf8f2; --surface-hover: #fffdf9; --surface-2: #fffdf9; --surface-2-hover: #ffffff;
  --colonne: rgba(90, 60, 30, 0.055); --segment: #fffdf9;
  --verre: rgba(251, 248, 242, 0.76); --verre-bord: rgba(90, 60, 30, 0.13); --verre-fort: rgba(251, 248, 242, 0.92);
  --verre-barre: rgba(243, 238, 229, 0.8); --verre-dock: rgba(251, 248, 242, 0.84); --voile-fond: rgba(40, 25, 10, 0.28);
  --fantome: #fffdf9; --trait: rgba(90, 60, 30, 0.12); --interrupteur: rgba(120, 100, 80, 0.26);
  --reflet: 0 1px 2px rgba(60, 40, 20, 0.05);
  --ombre: 0 18px 50px -20px rgba(60, 40, 20, 0.25);
  --ombre-carte: 0 1px 2px rgba(60, 40, 20, 0.07);
  --ombre-fenetre: 0 40px 100px -30px rgba(60, 40, 20, 0.4);
  --ombre-fine: 0 1px 2px rgba(60, 40, 20, 0.16);
  --bg-panel: #fbf8f2; --bg-card: rgba(90, 60, 30, 0.05); --bg-card-hover: rgba(90, 60, 30, 0.09); --bg-input: rgba(120, 100, 80, 0.13);
  --border: rgba(90, 60, 30, 0.16); --border-soft: rgba(90, 60, 30, 0.1);
  --text: #2b2118; --text-dim: rgba(70, 50, 30, 0.76); --text-faint: rgba(70, 50, 30, 0.48); --text-fort: #1a120a; --text-nav: rgba(43, 33, 24, 0.88);
  --accent: #b8470f; --accent-rgb: 184, 71, 15; --accent-fort: #c2500f; --sur-accent: #fff;
  --vert: #2f7a41; --vert-rgb: 70, 160, 90; --orange: #a35a05; --orange-rgb: 220, 140, 20; --rouge: #c0392b; --rouge-rgb: 215, 70, 55;
  --bleu: #2f62b0; --bleu-rgb: 60, 110, 190; --violet: #7d45b0; --violet-rgb: 150, 90, 200; --jaune: #84680a; --jaune-rgb: 220, 180, 40;
  --danger: #c0392b; --ok: #3a8a55; --warn: #a37b00; --info: #2f62b0;
  --c1: #c2500f; --c2: #3f6fb5; --c3: #3a8a55;
  --carte-bas: #ecdcc6; --carte-haut: #b8470f; --carte-trait: #fbf8f2;
}

/* Forêt : vert profond, accent menthe */
[data-theme="foret"] {
  color-scheme: dark;
  --bg: #07110d;
  --fond: radial-gradient(1200px 700px at 6% -12%, rgba(74, 222, 153, 0.08), transparent 62%),
    radial-gradient(1000px 700px at 104% -4%, rgba(20, 130, 110, 0.12), transparent 62%), var(--bg);
  --voile-rgb: 200, 255, 230;
  --surface: rgba(200, 255, 230, 0.05); --surface-hover: rgba(200, 255, 230, 0.085); --surface-2: rgba(200, 255, 230, 0.07); --surface-2-hover: rgba(200, 255, 230, 0.1);
  --colonne: rgba(200, 255, 230, 0.03); --segment: rgba(200, 255, 230, 0.18);
  --verre: rgba(200, 255, 230, 0.05); --verre-bord: rgba(200, 255, 230, 0.11); --verre-fort: rgba(16, 30, 24, 0.88);
  --verre-barre: rgba(8, 18, 14, 0.66); --verre-dock: rgba(18, 34, 27, 0.76); --voile-fond: rgba(0, 6, 3, 0.5);
  --fantome: #1a2c24; --trait: rgba(200, 255, 230, 0.09); --interrupteur: rgba(160, 200, 180, 0.28);
  --reflet: inset 0 1px 0 rgba(200, 255, 230, 0.09);
  --ombre-carte: inset 0 1px 0 rgba(200, 255, 230, 0.06), 0 1px 2px rgba(0, 0, 0, 0.25);
  --ombre-fenetre: inset 0 1px 0 rgba(200, 255, 230, 0.12), 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  --bg-panel: #0f1d17; --bg-card: rgba(200, 255, 230, 0.06); --bg-card-hover: rgba(200, 255, 230, 0.09); --bg-input: rgba(160, 200, 180, 0.14);
  --border: rgba(200, 255, 230, 0.11); --border-soft: rgba(200, 255, 230, 0.08);
  --text: #eef7f2; --text-dim: rgba(215, 240, 228, 0.66); --text-faint: rgba(215, 240, 228, 0.4); --text-fort: #fff; --text-nav: rgba(238, 247, 242, 0.86);
  --accent: #4ade99; --accent-rgb: 74, 222, 153; --accent-fort: #15a06b; --sur-accent: #fff;
  --c1: #4ade99; --c2: #7cc4ff; --c3: #f5c542;
  --carte-bas: #12261d; --carte-haut: #6ff0b2; --carte-trait: rgba(0, 0, 0, 0.55);
}

/* ---------- Base ---------- */
html { background: var(--fond); background-attachment: fixed; }
body {
  background: transparent; color: var(--text);
  font-family: var(--font); font-size: 14px; letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: var(--font); letter-spacing: inherit; }
::selection { background: rgba(var(--accent-rgb), 0.35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(var(--voile-rgb), 0.14) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(var(--voile-rgb), 0.12); border-radius: 9px; border: 2.5px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--voile-rgb), 0.22); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.6); outline-offset: 2px; }
a, .sms a { color: var(--accent); }
.num, .stat-value, .ring-num, .column-count, .count-pill, .nav-badge, .lead-tel, .c-tel { font-variant-numeric: tabular-nums; }
.ico { stroke-width: 1.7; }

/* ---------- Barre latérale : panneau de verre flottant ---------- */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  margin: 10px 0 10px 10px; top: 10px; height: calc(100dvh - 20px);
  background: var(--verre); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
  border: 1px solid var(--verre-bord); border-radius: 22px;
  box-shadow: var(--reflet), var(--ombre);
  overflow: hidden;
}
.brand { padding: 16px 16px 8px; border-bottom: none; gap: 11px; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 8px; font-size: 15px; font-weight: 700;
  background: linear-gradient(160deg, #ffa25c, #ef6a1c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-logo.small { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.brand-text span { font-size: 11px; letter-spacing: 0; color: var(--text-faint); text-transform: none; font-weight: 400; }
.sidebar .nav { padding: 4px 8px 10px; gap: 1px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.nav-group {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: transparent; border: none; cursor: pointer; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--text-faint); padding: 14px 10px 5px;
}
.nav-group:hover { color: var(--text-dim); }
.nav-group .chevron { width: 13px; height: 13px; transition: transform 0.2s var(--ease), opacity 0.2s; opacity: 0; }
.sidebar:hover .nav-group .chevron, .nav-group[aria-expanded="false"] .chevron { opacity: 0.8; }
.nav-group[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.nav-items { display: flex; flex-direction: column; gap: 1px; }
.nav-items.plie { display: none; }
.nav-item {
  position: relative; height: 32px; padding: 0 10px; gap: 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--text-nav);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item svg, .nav-item svg.ico-trait { width: 17px; height: 17px; stroke-width: 1.7; color: var(--text-dim); opacity: 1; }
.nav-item:hover { background: rgba(var(--voile-rgb), 0.06); color: var(--text); }
.nav-item.active { background: rgba(var(--voile-rgb), 0.1); color: var(--text-fort); }
.nav-item.active svg { color: var(--accent); }
.nav-item > span:not(.nav-badge) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  font-size: 11px; font-weight: 600; padding: 1px 7px; min-width: 20px; border-radius: 999px;
  background: var(--accent-fort); color: var(--sur-accent);
}
.nav-badge.bleu { background: rgba(var(--voile-rgb), 0.14); color: var(--text); }
.sidebar-footer { padding: 10px 8px 12px; border-top: 1px solid var(--trait); gap: 8px; align-items: stretch; }
.nav-perso {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px;
  background: transparent; border: none; border-radius: 9px;
  color: var(--text-dim); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s var(--ease), color 0.15s;
}
.nav-perso:hover { color: var(--text); background: rgba(var(--voile-rgb), 0.06); }
.nav-perso svg { width: 16px; height: 16px; stroke-width: 1.7; }
.sidebar-footer .badges { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 6px; }
.storage-badge {
  font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none;
  padding: 3px 9px 3px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(var(--voile-rgb), 0.07); color: var(--text-dim); border: none;
}
.storage-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.storage-badge.cloud, .storage-badge.on, .storage-badge.sim, .storage-badge.off { background: rgba(var(--voile-rgb), 0.07); color: var(--text-dim); border: none; }
.storage-badge.cloud::before, .storage-badge.on::before { background: var(--ok); }
.storage-badge.sim::before { background: var(--warn); }
.storage-badge.off::before { background: var(--danger); }

/* ---------- Zone principale, titres ---------- */
.main { padding: 26px 30px 48px; }
.view:not([hidden]) { animation: apparition 0.25s var(--ease); }
@keyframes apparition { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-title, .sms .page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; padding-left: 0; color: var(--text); }
.page-title::before, .sms .page-title::before { display: none; }
.page-title { margin-bottom: 20px; }
.sms .page-sub { padding-left: 0; font-size: 14px; color: var(--text-dim); margin-top: 6px; }
.sms .page-head { margin-bottom: 20px; }
.hint, .muted { color: var(--text-faint); }

/* ---------- Surfaces : verre léger, filet fin ---------- */
.card, .sms .card, .dash-section, .stat-card, .sms .stat-card, .cold-card, .cold-table, .task-add-card, .paste-card, .form-card {
  background: var(--surface); border: 1px solid var(--trait); border-radius: var(--radius); box-shadow: var(--reflet);
}
.sms .card { max-width: none; }
.sms .card-title, .dash-section-title, .history-title {
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--text);
}
.sms .card-title .dim, .sms .card-title .link { font-weight: 400; }
.count-pill { background: transparent; border: none; color: var(--text-faint); font-size: 13px; font-weight: 500; min-width: 0; padding: 0; }
.sms .alerte { border-left: none; border-radius: 12px; background: rgba(var(--jaune-rgb), 0.09); }
.sms .alerte.rouge { background: rgba(var(--rouge-rgb), 0.11); }
.sms .alerte.verte { background: rgba(var(--vert-rgb), 0.11); }
.sms .simbar { background: rgba(var(--jaune-rgb), 0.08); border: none; color: var(--jaune); border-radius: 12px; }

/* ---------- Boutons : capsules ---------- */
.btn-primary, .sms .btn.primary, .task-add-btn, .history-send, .lock-modal .btn-primary {
  background: var(--accent-fort); color: var(--sur-accent); border: none; border-radius: 999px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: filter 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn-primary:hover, .sms .btn.primary:hover, .task-add-btn:hover, .history-send:hover { background: var(--accent-fort); filter: brightness(1.08); }
.btn-primary:active, .sms .btn.primary:active, .task-add-btn:active { transform: scale(0.985); }
.sms .btn, .sync-btn, .agenda-btn, .field-btn, .cold-back, .icon-btn, .row-action, .dash-more {
  background: rgba(var(--voile-rgb), 0.08); border: 1px solid transparent; color: var(--text);
  border-radius: 999px; font-weight: 500; box-shadow: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.sms .btn:hover, .sync-btn:hover, .agenda-btn:hover, .field-btn:hover, .cold-back:hover, .icon-btn:hover, .row-action:hover, .dash-more:hover {
  background: rgba(var(--voile-rgb), 0.14); border-color: transparent; color: var(--text); filter: none;
}
.sms .btn { padding: 8px 15px; }
.sms .btn.sm { padding: 5px 11px; border-radius: 999px; }
.sync-btn svg, .row-action .ico { color: var(--accent); }
.sms .btn.ghost { background: transparent; box-shadow: none; color: var(--text-dim); }
.sms .btn.ghost:hover { background: rgba(var(--voile-rgb), 0.07); color: var(--text); }
.sms .btn.danger, .btn-danger, .cold-del-list {
  color: var(--rouge); background: rgba(var(--rouge-rgb), 0.13); border: 1px solid transparent; border-radius: 999px; font-weight: 500;
}
.sms .btn.ok { color: var(--vert); background: rgba(var(--vert-rgb), 0.14); }
.agenda-today-btn { color: var(--text); }
.field-btn { font-size: 13px; color: var(--text); white-space: nowrap; padding: 0 14px; }
.field-btn.is-off { opacity: 0.4; }
.icon-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--text-dim); }
.row-action { padding: 7px 13px; font-size: 12.5px; }
.dash-more { width: 100%; margin: 6px 0 8px; padding: 9px; font-size: 13px; border-style: solid; cursor: pointer; }

/* ---------- Champs : fond plein, sans bordure ---------- */
input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="password"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="url"], textarea, select,
.sms input[type="text"], .sms input[type="tel"], .sms input[type="search"], .sms input[type="number"], .sms input[type="password"],
.sms input[type="date"], .sms input[type="time"], .sms input[type="datetime-local"], .sms input[type="url"], .sms textarea, .sms select {
  background-color: var(--bg-input); border: 1px solid transparent; color: var(--text); border-radius: 10px; box-shadow: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s;
}
input[type="datetime-local"], input[type="date"], input[type="time"], input[type="number"], input[type="password"], input[type="url"] {
  width: 100%; padding: 9px 11px; font-size: 13.5px; outline: none;
}
.modal .field input[type="datetime-local"] { max-width: 280px; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus, select:focus, .sms input:focus, .sms textarea:focus, .sms select:focus {
  border-color: rgba(var(--accent-rgb), 0.65); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), 0.2); outline: none;
}
.search-box, .sms .search-box, .lead-picker-input {
  background: var(--bg-input); border: 1px solid transparent; border-radius: 10px; box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus-within, .sms .search-box:focus-within, .lead-picker-input:focus-within { border-color: rgba(var(--accent-rgb), 0.65); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), 0.2); }
.search-box input, .sms .search-box input, .lead-picker-input input { background: transparent !important; border: none !important; box-shadow: none !important; }
.field-label, .sms .field-label { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-dim); }
.sms .check input { accent-color: var(--accent-fort); }

/* ---------- Étiquettes ---------- */
.chip, .sms .chip {
  font-size: 11.5px; font-weight: 500; letter-spacing: 0; padding: 2px 8px; border-radius: 7px; border: none;
  background: rgba(var(--voile-rgb), 0.08); color: var(--text-dim);
}
.chip.etat-green, .sms .chip.vert { background: rgba(var(--vert-rgb), 0.16); color: var(--vert); }
.chip.etat-orange, .sms .chip.orange { background: rgba(var(--orange-rgb), 0.16); color: var(--orange); }
.chip.etat-red, .sms .chip.rouge { background: rgba(var(--rouge-rgb), 0.16); color: var(--rouge); }
.chip.etat-blue, .sms .chip.bleu { background: rgba(var(--bleu-rgb), 0.2); color: var(--bleu); }
.chip.etat-purple, .sms .chip.violet { background: rgba(var(--violet-rgb), 0.18); color: var(--violet); }
.sms .chip.jaune { background: rgba(var(--jaune-rgb), 0.14); color: var(--jaune); }
.chip.etat-gray, .sms .chip.gris { background: rgba(var(--voile-rgb), 0.07); color: var(--text-dim); }
.sms .pill { border-radius: 999px; background: rgba(var(--voile-rgb), 0.07); border: 1px solid transparent; font-weight: 500; color: var(--text-dim); }
.sms .pill.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.sms .score { border-radius: 999px; border: none; background: rgba(var(--voile-rgb), 0.08); color: var(--text-dim); font-weight: 600; }
.sms .score.chaud { background: var(--accent-soft); color: var(--accent); }
.sms .score.froid { background: rgba(var(--voile-rgb), 0.06); color: var(--text-faint); }

/* ---------- Pipeline ---------- */
.pipeline-head { margin-bottom: 18px; }
.pipeline-head .page-title { margin-bottom: 0; }
.board { gap: 12px; padding-bottom: 20px; }
.column {
  min-width: 292px; width: 292px;
  background: var(--colonne); border: 1px solid var(--trait); border-radius: 20px; box-shadow: none;
}
.column.drop-target { border-color: rgba(var(--accent-rgb), 0.55); background: rgba(var(--accent-rgb), 0.06); }
.column-head { padding: 14px 16px 10px; gap: 8px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--text); }
.column-dot { width: 7px; height: 7px; box-shadow: none; }
.column-count { background: transparent; border: none; min-width: 0; height: auto; padding: 0; color: var(--text-faint); font-size: 13px; font-weight: 500; }
.column-body { padding: 0 8px 8px; gap: 8px; }
.lead-card {
  background: var(--surface-2); border: 1px solid var(--trait); border-radius: 14px;
  padding: 13px 14px 11px; box-shadow: var(--ombre-carte);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lead-card:hover { background: var(--surface-2-hover); border-color: var(--verre-bord); transform: none; }
.lead-card .lead-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.012em; color: var(--text); }
.lead-card .lead-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.lead-card .lead-chips { gap: 5px; margin-top: 10px; }
.lead-card .lead-note { font-size: 12.5px; line-height: 1.45; color: var(--text-dim); margin-top: 10px; background: none; border: none; border-radius: 0; padding: 0; }
.lead-actions { border-top: 1px solid var(--trait); margin-top: 12px; padding-top: 10px; }
.lead-tel { font-size: 12.5px; font-weight: 500; color: var(--text-dim); transition: color 0.15s; }
.lead-tel:hover { color: var(--text); }
.lead-tel .ico { color: var(--accent); }
.lead-tool {
  height: 28px; min-width: 28px; padding: 0 8px; border-radius: 999px; border: none;
  background: rgba(var(--voile-rgb), 0.08); color: var(--text-dim); font-size: 12px; font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.lead-tool:hover { background: rgba(var(--voile-rgb), 0.15); color: var(--text); }
.lead-tool-gen { padding: 0 11px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lead-tool-gen:hover { background: rgba(var(--accent-rgb), 0.25); color: var(--accent); }
.gen-wait { color: var(--text-dim); font-size: 12px; font-weight: 500; }
.gen-site-btn {
  background: var(--accent-soft); border: none; color: var(--accent); border-radius: 999px; padding: 10px 14px; font-weight: 600;
  transition: background 0.15s var(--ease);
}
.gen-site-btn:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.25); }
.drag-ghost { background: var(--fantome); border-radius: 14px; box-shadow: var(--ombre), 0 0 0 1px var(--verre-bord); }

/* ---------- Tableau de bord : indicateurs + listes à filets ---------- */
.dash-hero { margin: -8px 0 20px; }
.dash-date { font-size: 15px; font-weight: 600; }
.dash-resume { font-size: 15px; color: var(--text-dim); }
.stat-card, .sms .stat-card { padding: 16px 18px; }
.stat-card .stat-label { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-dim); margin: 0 0 6px; }
.stat-card .stat-value, .sms .stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.stat-card .stat-value small { font-size: 16px; color: var(--text-dim); margin-left: 2px; font-weight: 500; }
.stat-card .stat-foot { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.vert .stat-value { color: var(--ok); }
.sms .stat-label { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-dim); margin-top: 6px; }
.sms .stat-delta { font-size: 12.5px; color: var(--text-faint); }
.dash-section { padding: 16px 18px 8px; margin-bottom: 14px; }
.dash-section-title { gap: 8px; margin-bottom: 8px; }
.dash-ico { stroke: var(--text-dim); stroke-width: 1.7; }
.objectif-card { padding-bottom: 16px; text-align: center; }
.objectif-card .dash-section-title { justify-content: flex-start; }
.dash-row {
  background: transparent; border: none; border-top: 1px solid var(--trait); border-radius: 0;
  margin: 0; padding: 12px 0; gap: 12px;
}
.dash-section-title + .dash-row { border-top: none; }
.dash-row:hover { background: transparent; }
.dash-row:hover .dash-row-name { color: var(--text-fort); }
.dash-row-name { font-size: 14px; font-weight: 600; letter-spacing: -0.008em; }
.dash-row-name .late { color: var(--rouge); font-weight: 500; font-size: 12px; margin-left: 4px; }
.dash-row-meta { font-size: 12.5px; color: var(--text-dim); gap: 4px 10px; margin-top: 5px; }
.dash-row-meta a { color: var(--text-dim); }
.dash-row-meta a:hover { color: var(--accent); }
.dash-row-meta .chip { font-size: 11px; }
.empty-row { color: var(--text-faint); font-size: 13px; padding: 14px 0 18px; background: none; border: none; }
.alert-banner { background: rgba(var(--rouge-rgb), 0.1); border: 1px solid rgba(var(--rouge-rgb), 0.18); border-radius: var(--radius); box-shadow: none; padding: 14px 18px; }
.alert-banner strong { color: var(--rouge); font-weight: 600; }
.alert-sub { color: var(--text-dim); }
.alert-icon .dash-ico { stroke: var(--rouge); }
.ring svg circle:first-child, .sms .ring svg circle:first-child { stroke: rgba(var(--voile-rgb), 0.08); }
.ring-label, .sms .ring-label { color: var(--text-dim); }
.objectif-note { color: var(--text-faint); }
.funnel-label { color: var(--text-dim); }
.funnel-track { background: rgba(var(--voile-rgb), 0.07); border-radius: 6px; }
.funnel-bar { background: var(--accent-fort); border-radius: 6px; box-shadow: none; }
.funnel-note { color: var(--text-dim); background: rgba(var(--voile-rgb), 0.04); border: none; border-radius: 12px; margin-bottom: 8px; }
.funnel-note strong { color: var(--text); }
.sms .funnel-row .bar { border-radius: 6px; background: rgba(var(--voile-rgb), 0.07); }
.sms .funnel-row .bar > i { border-radius: 6px; }

/* ---------- Agenda ---------- */
.agenda-cell { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; transition: background 0.15s, border-color 0.15s; }
.agenda-cell:hover { background: var(--surface-hover); border-color: var(--trait); }
.agenda-cell.selected { border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.07); }
.agenda-cell.today .agenda-daynum { background: var(--accent-fort); color: var(--sur-accent); box-shadow: none; }
.agenda-chip { border-radius: 5px; }
.agenda-grid-head div { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-faint); }
.agenda-btn { min-width: 34px; height: 34px; }

/* ---------- Cold Call ---------- */
.cold-card { padding: 16px 18px; transition: background 0.15s var(--ease); }
.cold-card:hover { background: var(--surface-hover); border-color: var(--trait); transform: none; }
.cold-card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; }
.cold-card-sub { font-size: 12.5px; color: var(--text-dim); }
.cold-progress { background: rgba(var(--voile-rgb), 0.08); height: 3px; margin-top: 10px; }
.cold-progress i { background: var(--accent-fort); box-shadow: none; }
.cold-head .page-title::first-letter, .cold-crumb-cur::first-letter { text-transform: uppercase; }
.cold-crumb-cur { color: var(--text-dim); }
.cold-stats { font-size: 13px; color: var(--text-dim); }
.cold-stat-rdv { color: var(--ok); }
.cold-header { background: transparent; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-faint); }
.cold-row { border-bottom-color: var(--trait); font-size: 13px; }
.cold-row:not(.cold-header):hover { background: rgba(var(--voile-rgb), 0.035); }
.c-ent { font-weight: 600; letter-spacing: -0.005em; }
.c-prenom { color: var(--text-dim); font-weight: 400; }
.c-tel a { color: var(--text); }
.c-tel a:hover { color: var(--accent); }
.c-link a { color: var(--text-dim); }
.c-site { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.c-site-link { color: var(--text); font-weight: 500; font-size: 12.5px; }
.c-site-link .ico { color: var(--accent); width: 14px; height: 14px; }
.c-site-link:hover { text-decoration: none; color: var(--accent); }
.c-mini {
  height: 26px; min-width: 26px; padding: 0 7px; justify-content: center;
  background: rgba(var(--voile-rgb), 0.08); border: none; border-radius: 999px; color: var(--text-dim);
  font-size: 12px; font-weight: 500; transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.c-mini:hover { color: var(--text); background: rgba(var(--voile-rgb), 0.15); border: none; }
.c-site-add { opacity: 1; }
.c-gen { padding: 0 10px; margin-right: 0; color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.c-gen:hover { color: var(--accent); background: rgba(var(--accent-rgb), 0.25); }
.c-tocrm { padding: 0 10px; color: var(--text); background: rgba(var(--voile-rgb), 0.08); border: none; }
.c-tocrm .ico { color: var(--accent); }
.c-del { background: transparent; color: var(--text-faint); }
.c-del:hover { color: var(--rouge); background: rgba(var(--rouge-rgb), 0.14); }
.c-incrm { color: var(--ok); font-weight: 500; font-size: 12px; }
.c-note input { background-color: transparent; border-color: transparent; }
.c-note input:hover, .c-note input:focus { background-color: var(--bg-input); }
.cold-select { border-radius: 999px; border: none; padding: 5px 10px; font-weight: 500; }
.cold-viewtoggle { background: var(--bg-input); border: none; border-radius: 10px; padding: 2px; }
.cold-viewtoggle button { border-radius: 8px; font-weight: 500; }
.cold-viewtoggle button.on { background: var(--segment); color: var(--text); box-shadow: var(--ombre-fine); }

/* ---------- Tâches, historique ---------- */
.task-row { background: transparent; border: none; border-top: 1px solid var(--trait); border-radius: 0; margin: 0; padding: 12px 0; }
.dash-section-title + .task-row, .task-list .task-row:first-child { border-top: none; }
.task-check { border-radius: 50%; border: 1.5px solid rgba(var(--voile-rgb), 0.3); width: 22px; height: 22px; }
.task-check:hover { border-color: var(--accent); }
.task-row.done .task-check { background: var(--accent-fort); border-color: var(--accent-fort); }
.task-lead-chip { border-radius: 7px; }
.history-icon { background: rgba(var(--voile-rgb), 0.07); border: none; }
.history-send { width: 36px; height: 36px; padding: 0; }
.lead-picker-results { background: var(--verre-fort); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); border: 1px solid var(--verre-bord); border-radius: 14px; box-shadow: var(--ombre); }

/* ---------- Partie SMS : listes, conversation, réglages ---------- */
.sms .table th { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-faint); border-bottom-color: var(--trait); }
.sms .table td { border-bottom-color: var(--trait); }
.sms .table tr.clic:hover td { background: rgba(var(--voile-rgb), 0.035); }
.sms .item { border-radius: 12px; border-bottom-color: var(--trait); }
.sms .item:hover { background: rgba(var(--voile-rgb), 0.05); }
.sms .item.actif { background: rgba(var(--voile-rgb), 0.09); box-shadow: none; }
.sms .item-title { font-size: 14px; letter-spacing: -0.008em; }
.sms .unread { background: var(--accent-fort); }
.sms .bubble { border-radius: 18px; font-size: 14px; }
.sms .bubble.out { background: var(--accent-fort); box-shadow: none; border-bottom-right-radius: 6px; }
.sms .bubble.in { background: rgba(var(--voile-rgb), 0.1); border: none; border-bottom-left-radius: 6px; }
.sms .thread-head, .sms .compose { border-color: var(--trait); }
.sms .suggestion { background: rgba(var(--bleu-rgb), 0.12); border: none; border-radius: 12px; }
.sms .suggestion b { color: var(--bleu); text-transform: none; letter-spacing: 0; font-size: 12px; }
.sms .meta-grid b { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.sms .bar, .sms .progress { background: rgba(var(--voile-rgb), 0.08); }
.sms .progress > i { background: var(--accent-fort); }
.sms .switch { width: 44px; height: 26px; border-radius: 13px; background: var(--interrupteur); border: none; }
.sms .switch::after { top: 2px; left: 2px; width: 22px; height: 22px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.sms .switch.on { background: var(--ok); border: none; box-shadow: none; }
.sms .switch.on::after { transform: translateX(18px); background: #fff; }
.sms .switch.big { width: 58px; height: 34px; border-radius: 17px; }
.sms .switch.big::after { width: 30px; height: 30px; }
.sms .switch.big.on::after { transform: translateX(24px); }
.sms .switch-row { border-bottom-color: var(--trait); }
.sms .switch-row .lbl { font-size: 14px; }
.sms .switch-row .hint { font-size: 12.5px; color: var(--text-faint); }
.sms .tabs { display: inline-flex; max-width: 100%; gap: 2px; padding: 2px; border-bottom: none; border-radius: 11px; background: var(--bg-input); margin-bottom: 16px; }
.sms .tab { border-bottom: none; border-radius: 9px; padding: 6px 14px; font-weight: 500; color: var(--text-dim); }
.sms .tab.on { background: var(--segment); color: var(--text); box-shadow: var(--ombre-fine); }
.sms .palier { background: rgba(var(--voile-rgb), 0.04); border: none; border-radius: 12px; }
.sms .palier.ok { background: var(--accent-soft); border: none; color: var(--text); }
.sms .feed-item { border-bottom-color: var(--trait); }
.sms .feed-ico { background: rgba(var(--voile-rgb), 0.07); border: none; border-radius: 50%; }
.sms .step { border-bottom-color: var(--trait); }
.sms .kbd, .sms .code { background: var(--bg-input); border: none; }
.sms .tooltip { background: var(--verre-fort); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); border: 1px solid var(--verre-bord); border-radius: 12px; box-shadow: var(--ombre); }
.sms .carte-svg path { stroke: var(--carte-trait); }
.sms .carte-svg path.vide { fill: rgba(var(--voile-rgb), 0.07); }
.sms .chart .axis { stroke: var(--border); }
.sms .chart .grid { stroke: var(--trait); }
.sms .chart text { fill: var(--text-faint); }
.sms .empty { color: var(--text-faint); }

/* ---------- Fenêtres et messages : verre épais ---------- */
.modal-backdrop, .sms .modal-backdrop {
  background: var(--voile-fond); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  animation: fondu 0.2s ease;
}
.modal, .sms .modal {
  background: var(--verre-fort); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--verre-bord); border-radius: 26px; padding: 24px;
  box-shadow: var(--ombre-fenetre);
  animation: surgir 0.26s var(--ease);
}
.modal-head h2, .sms .modal-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.sms .close { width: 30px; height: 30px; border-radius: 50%; background: rgba(var(--voile-rgb), 0.08); font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.modal-meta { gap: 6px; }
.history-section { border-top-color: var(--trait); }
@keyframes fondu { from { opacity: 0; } }
@keyframes surgir { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.toast, .sms .toast {
  background: var(--verre-fort); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
  border: 1px solid var(--verre-bord); border-radius: 999px; padding: 11px 20px; font-weight: 500;
  box-shadow: var(--reflet), var(--ombre); animation: surgir 0.22s var(--ease);
}
.lock-modal { padding: 32px 26px 26px; }
.lock-icon { font-size: 28px; }
.lock-modal input { background-color: var(--bg-input); }

/* ---------- Menu « Plus » et personnalisation ---------- */
.plus-groupe { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--text-faint); }
.plus-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plus-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 78px; padding: 10px 6px;
  background: rgba(var(--voile-rgb), 0.07); border: none; border-radius: 16px; box-shadow: var(--reflet);
  color: var(--text); font-size: 12px; font-weight: 500; text-align: center; cursor: pointer; transition: background 0.15s, transform 0.12s var(--ease);
}
.plus-item:hover { background: rgba(var(--voile-rgb), 0.12); }
.plus-item:active { transform: scale(0.97); }
.plus-item svg { width: 22px; height: 22px; color: var(--accent); stroke-width: 1.7; }
.perso-groupe { border: none; border-radius: 16px; padding: 4px 16px 10px; margin-bottom: 10px; background: rgba(var(--voile-rgb), 0.05); }
.perso-groupe .switch-row { border-bottom: none; }
.perso-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; padding-top: 6px; border-top: 1px solid var(--trait); }
.perso-item { gap: 9px; font-size: 13.5px; color: var(--text-dim); }
.perso-item svg { width: 15px; height: 15px; }
.perso-item.fixe { opacity: 0.5; }

/* ---------- Chargement d'une vue ---------- */
.chargement { display: flex; justify-content: center; padding: 18vh 0; animation: fondu 0.4s ease 0.15s both; }
.chargement span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(var(--voile-rgb), 0.1); border-top-color: var(--text-dim); animation: tourner 0.8s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }

/* ---------- Téléphone : barres de verre, barre du bas flottante, feuilles ---------- */
@media (max-width: 760px) {
  .mobile-bar {
    background: var(--verre-barre); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
    border-bottom: 1px solid var(--trait); padding-top: env(safe-area-inset-top); height: calc(52px + env(safe-area-inset-top));
  }
  .mobile-bar strong { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
  .bottom-nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 5px; gap: 2px;
    background: var(--verre-dock); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
    border: 1px solid var(--verre-bord); border-radius: 32px;
    box-shadow: var(--reflet), var(--ombre);
  }
  .bottom-nav .nav-item { height: auto; padding: 7px 2px 6px; border-radius: 27px; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--text-dim); }
  .bottom-nav .nav-item svg, .bottom-nav .nav-item svg.ico-trait { width: 23px; height: 23px; color: currentColor; }
  .bottom-nav .nav-item.active { color: var(--accent); background: rgba(var(--voile-rgb), 0.1); }
  .bottom-nav .nav-item.active svg { color: var(--accent); }
  .main { padding: calc(68px + env(safe-area-inset-top)) 16px calc(104px + env(safe-area-inset-bottom)); }
  .page-title, .sms .page-title { font-size: 26px; }
  .column { min-width: 284px; width: 284px; }
  .modal-backdrop, .sms .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal, .sms .modal { position: relative; border-radius: 28px 28px 0 0; align-self: flex-end; max-height: 90dvh; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); animation: monter 0.3s var(--ease); }
  .modal::before, .sms .modal::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(var(--voile-rgb), 0.25); }
  @keyframes monter { from { transform: translateY(48px); opacity: 0; } }
  .lock-backdrop { align-items: center; padding: 16px; }
  .lock-backdrop .modal { border-radius: 26px; align-self: center; padding: 32px 26px 26px; }
  .lock-backdrop .modal::before { display: none; }
  .toast, .sms .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Hauteurs alignées (recherche, boutons d'en-tête) ---------- */
.search-box, .sms .search-box { height: 36px; padding: 0 12px; }
.search-box input, .sms .search-box input { height: 100%; padding: 0 !important; font-size: 14px; }
.sync-btn, .cold-back, .cold-del-list { height: 36px; padding: 0 15px; font-size: 13.5px; }
.pipeline-tools, .cold-head-actions { align-items: center; }
@media (min-width: 761px) { .column { max-height: calc(100dvh - 150px); } }

/* ---------- Cold Call (ordinateur) : ville et métier sous le nom, colonnes allégées ---------- */
@media (min-width: 761px) {
  .cold-row { grid-template-columns: minmax(200px, 2fr) 140px 28px 124px 150px minmax(120px, 1.2fr) 104px; gap: 12px; padding: 11px 16px; }
  .cold-row .c-ville, .cold-row .c-act, .cold-header > div:nth-child(2), .cold-header > div:nth-child(3) { display: none; }
  .c-lieu { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 400; color: var(--text-dim); }
}
.c-prenom { display: inline-block; margin: 0 0 0 7px; padding: 1px 7px; border-radius: 6px; background: rgba(var(--voile-rgb), 0.08); font-size: 11.5px; font-weight: 500; color: var(--text-dim); vertical-align: 1px; }
.cold-select, .cold-select.etat-green, .cold-select.etat-orange, .cold-select.etat-red, .cold-select.etat-blue, .cold-select.etat-purple { background-color: rgba(var(--voile-rgb), 0.07); }
.cold-select.etat-green { color: var(--vert); }
.cold-select.etat-orange { color: var(--orange); }
.cold-select.etat-red { color: var(--rouge); }
.cold-select.etat-blue { color: var(--bleu); }
.cold-select.etat-purple { color: var(--violet); }
.cold-del-list { background: transparent; }
.cold-del-list:hover { background: rgba(var(--rouge-rgb), 0.13); }

/* ---------- « Générer » : capsule neutre, seule l'icône porte l'accent ---------- */
.c-gen, .lead-tool-gen { background: rgba(var(--voile-rgb), 0.08); color: var(--text); font-weight: 500; }
.c-gen .ico, .lead-tool-gen .ico { color: var(--accent); }
.c-gen:hover, .lead-tool-gen:hover { background: rgba(var(--voile-rgb), 0.15); color: var(--text); }
.dash-row-name .late { color: var(--text-faint); }

/* ---------- Carte du pipeline : la ligne d'actions tient toujours sur une ligne ---------- */
.column { min-width: 300px; width: 300px; }
.lead-actions { flex-wrap: nowrap; }
.lead-tel { min-width: 0; }
.lead-tel span { overflow: hidden; text-overflow: ellipsis; }
.lead-tools { flex-shrink: 0; }
@media (max-width: 760px) {
  .column { min-width: 300px; width: 300px; }
  .pipeline-head { gap: 12px; }
  .pipeline-tools { width: 100%; margin-bottom: 0; }
  .pipeline-tools .search-box { flex: 1; min-width: 0; }
  .mobile-bar strong { font-size: 16px; }
}

/* ---------- Couleurs restées en dur dans le CRM et la partie SMS : elles suivent le style choisi ---------- */
.agenda-chip.rdv { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }
.agenda-chip.relance { background: rgba(var(--rouge-rgb), 0.14); color: var(--rouge); }
.agenda-time.relance, .task-del:hover, .lock-error, .sms .lock .err, .btn-danger { color: var(--rouge); }
.auto-tag { color: var(--vert); }
.lead-avatar { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.task-check { color: var(--sur-accent); }
.sms .suggestion b { color: var(--bleu); }
.sms .carte-legende .ramp { background: linear-gradient(90deg, var(--carte-bas), var(--carte-haut)); }
.sms .carte-svg path:hover, .sms .carte-svg path.sel { stroke: var(--text); }
.sms .bubble.out { color: var(--sur-accent); }
@media (max-width: 760px) {
  .agenda-chip.rdv { background: var(--accent-fort); }
  .agenda-chip.relance { background: var(--rouge); }
}
/* Styles clairs : les couleurs d'étape écrites dans la page (pastilles du tableau de bord) sont assombries pour rester lisibles */
:is([data-theme="blanc"], [data-theme="sable"]) .chip[style*="color"] { filter: brightness(0.6) saturate(1.6); }
:is([data-theme="blanc"], [data-theme="sable"]) .sms .item-sub[style*="color"] { color: var(--rouge) !important; }

/* ---------- Apparence : choix du style de couleurs ---------- */
.theme-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
.theme-tuile { display: flex; flex-direction: column; gap: 8px; background: transparent; border: none; padding: 0; cursor: pointer; color: var(--text-dim); font-size: 13px; font-weight: 500; }
.theme-apercu {
  display: flex; gap: 5px; height: 78px; padding: 7px; border-radius: 14px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--verre-bord); transition: box-shadow 0.15s var(--ease), transform 0.12s var(--ease);
}
.theme-tuile:hover .theme-apercu { transform: translateY(-1px); }
.theme-tuile.on .theme-apercu { box-shadow: 0 0 0 2.5px var(--accent-fort); }
.theme-tuile.on .theme-nom { color: var(--text); font-weight: 600; }
.theme-apercu .t-menu { width: 22%; border-radius: 7px; background: var(--verre); border: 1px solid var(--verre-bord); }
.theme-apercu .t-zone { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.theme-apercu .t-carte { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--trait); }
.theme-apercu .t-carte b { display: block; height: 4px; width: 58%; border-radius: 2px; background: var(--text); }
.theme-apercu .t-carte b + b { width: 36%; background: var(--text-faint); }
.theme-apercu .t-carte em { position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--accent-fort); }
.theme-nom { text-align: center; }
.plus-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }

/* =====================================================================================================
 * Accents de couleur (retour du 4 oct. : la version sobre manquait de couleur ; on se rapproche de
 * l'ancienne version du CRM). La mise en page ne change pas : seuls les liens, actions et repères
 * reprennent la couleur d'accent du style choisi (orange en Noir, Bleu nuit, Blanc, Sable…).
 * ===================================================================================================== */
.nav-item.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35); }
.nav-item.active svg { color: var(--accent); }
.bottom-nav .nav-item.active { background: var(--accent-soft); color: var(--accent); }
.page-title, .sms .page-title { position: relative; padding-left: 15px; }
.page-title::before, .sms .page-title::before {
  display: block; content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 4px; border-radius: 3px; background: var(--accent-fort);
}
.column-count { background: rgba(var(--voile-rgb), 0.08); padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.count-pill { background: rgba(var(--voile-rgb), 0.08); padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* Carte du pipeline : téléphone et outils en couleur, « Générer » plein */
.lead-tel { color: var(--accent); font-weight: 600; }
.lead-tel:hover { color: var(--accent); filter: brightness(1.15); }
.lead-tool { background: var(--accent-soft); color: var(--accent); }
.lead-tool:hover { background: rgba(var(--accent-rgb), 0.26); color: var(--accent); }
.lead-tool-gen, .c-gen { background: var(--accent-fort); color: var(--sur-accent); font-weight: 600; }
.lead-tool-gen .ico, .c-gen .ico { color: var(--sur-accent); }
.lead-tool-gen:hover, .c-gen:hover { background: var(--accent-fort); color: var(--sur-accent); filter: brightness(1.08); }
.gen-wait { color: var(--accent); }

/* Boutons d'action et liens */
.sync-btn, .field-btn { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.35); }
.sync-btn:hover, .field-btn:hover { background: rgba(var(--accent-rgb), 0.24); color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); }
.sync-btn svg { color: var(--accent); }
.row-action { background: var(--accent-fort); color: var(--sur-accent); font-weight: 600; }
.row-action .ico { color: var(--sur-accent); }
.row-action:hover { background: var(--accent-fort); color: var(--sur-accent); filter: brightness(1.08); }
.dash-ico { stroke: var(--accent); }
.dash-row-meta a { color: var(--accent); }
.dash-row-name .late { color: var(--rouge); }

/* Cold Call */
.c-tel a, .c-site-link, .c-link a { color: var(--accent); }
.c-tel a:hover, .c-site-link:hover, .c-link a:hover { color: var(--accent); filter: brightness(1.15); }
.c-tocrm { background: var(--accent-soft); color: var(--accent); }
.c-tocrm .ico { color: var(--accent); }
.c-tocrm:hover { background: rgba(var(--accent-rgb), 0.26); color: var(--accent); }
.cold-card-sub { color: var(--text-dim); }
.lead-head .lead-avatar {
  width: 32px; height: 32px; border-radius: 50%; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(var(--accent-rgb), 0.16); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.28);
}

/* ---------- Logo de l'application dans le menu et la barre du haut ---------- */
.brand-logo.logo-app { background: none; box-shadow: none; padding: 0; overflow: visible; }
.brand-logo.logo-app img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35)); }
.brand-logo.logo-app { width: 34px; height: 34px; }
.brand-logo.small.logo-app { width: 30px; height: 30px; }

/* ---------- Cold Call : bilan de progression ---------- */
.cold-bilan { background: var(--surface); border: 1px solid var(--trait); box-shadow: var(--reflet); }
.cold-barre { height: 10px; background: rgba(var(--voile-rgb), 0.08); }
.cold-barre i { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.7), var(--accent)); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45); }
.cold-bilan.fini .cold-barre i, .cold-card.fini .cold-progress i { background: var(--ok); box-shadow: 0 0 12px rgba(var(--vert-rgb), 0.5); }
.cold-bilan-pct, .cold-bilan-chiffres .taux b, .cold-card-pct { color: var(--accent); }
.cold-bilan-chiffres .rdv b, .cold-card.fini .cold-card-pct { color: var(--vert); }
.cold-bilan-chiffres b { font-weight: 700; letter-spacing: -0.02em; }
.cold-bilan-chiffres span, .cold-bilan-msg { color: var(--text-dim); }
.cold-progress { height: 5px; margin-top: 8px; }
.cold-progress i { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.7), var(--accent)); }
.cold-card .cold-card-sub { margin-top: 2px; }
