/* =========================================================
   CRM Webtrust — charte inspirée de webtrust-agency.fr
   Encre bleu nuit, violet électrique, Inter Tight, coins nets
   ========================================================= */

/* Police Inter Tight (hébergée avec le CRM, aucun appel externe) */
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/polices/inter-tight-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/polices/inter-tight-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Couleurs de la marque */
  --ink: #0a0b26;
  --ink-soft: #2b2f52;
  --body: #454a6e;
  --slate: #62688b;
  --smoke: #8d93c5;
  --accent: #4d3df7;
  --accent-hover: #6150ff;
  --accent-soft: #7389ff;
  --brand: #3533cc;
  --brand-mid: #1a1966;
  --mist: #f7f8fd;
  --frost: #e6e8f3;
  --frost-2: #f0f1f8;
  --lavender: #b9b9f9;
  --lilac: #d6d9fc;
  --wash: #efeeff;
  --night: #06061a;
  --danger: #c3264f;
  --ok: #0e9f6e;
  --logo-grad: linear-gradient(90deg, #000 0%, #1a1966 50%, #3533cc 100%);
  /* Formes */
  --r-s: 6px;
  --r: 10px;
  --r-l: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ombre: 0 1px 2px rgba(10, 11, 38, .04), 0 1px 3px rgba(10, 11, 38, .04);
  --ombre-haute: 0 30px 60px -20px rgba(10, 11, 38, .32), 0 18px 36px -22px rgba(0, 0, 0, .32);
  --police: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--lilac); color: var(--ink); }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 30px; font-weight: 400; letter-spacing: -0.035em; line-height: 1.15; margin: 0 0 18px; }
h2 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.cache { display: none !important; }
.doux { color: var(--slate); }
.petit { font-size: 13px; }

/* Icônes */
.ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
button .ic, .btn .ic { width: 16px; height: 16px; vertical-align: -3px; }
h2 .ic { color: var(--accent); }

/* ---------- Mise en page ---------- */
.layout { display: flex; min-height: 100vh; }
.contenu { flex: 1; min-width: 0; max-width: 1480px; padding: 34px 40px 64px; }

/* ---------- Menu latéral ---------- */
.menu {
  width: 256px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 14px 16px;
  color: #c9cce6;
  background:
    radial-gradient(120% 45% at 0% 0%, rgba(77, 61, 247, .26) 0%, transparent 60%),
    radial-gradient(90% 35% at 100% 100%, rgba(53, 51, 204, .18) 0%, transparent 60%),
    var(--ink);
}
.marque { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.marque:hover { text-decoration: none; color: #fff; }
.monogramme {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: var(--logo-grad);
  color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: -0.07em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 18px -8px rgba(77, 61, 247, .75);
  flex-shrink: 0;
}
.marque-nom { font-size: 17px; font-weight: 600; letter-spacing: -0.025em; color: #fff; white-space: nowrap; }
.marque-nom span { font-weight: 300; color: var(--smoke); }
.menu-section { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: #5d628a; padding: 16px 10px 6px; }
.menu a:not(.marque) {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px;
  border-radius: 7px;
  color: #aeb2d6;
  font-size: 14px; font-weight: 450;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.menu a:not(.marque) .ic { color: #6f74a3; transition: color .2s; }
.menu a:not(.marque):hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.menu a:not(.marque):hover .ic { color: #c9cce6; }
.menu a.actif { background: linear-gradient(90deg, rgba(77, 61, 247, .30), rgba(77, 61, 247, .06)); color: #fff; }
.menu a.actif .ic { color: var(--lavender); }
.menu a.actif::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-soft); }
.menu a.appel-serie {
  margin: 4px 0 6px;
  padding: 11px 12px;
  background: linear-gradient(135deg, #4d3df7 0%, #3533cc 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(77, 61, 247, .85), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.menu a.appel-serie .ic { color: #fff; }
.menu a.appel-serie:hover { background: linear-gradient(135deg, #6150ff 0%, #3d3be0 100%); }
.menu a.appel-serie.actif::before { display: none; }
.compteur { margin-left: auto; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: rgba(195, 38, 79, .2); color: #ff9bb4; }
.menu-bas { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; flex-direction: column; gap: 2px; }

/* Ligne Ringover dans le menu */
#ligne-menu { margin: 0 0 8px; padding: 10px; border-radius: 9px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
#ligne-menu:empty { display: none; }
#ligne-menu label { color: #7b80ad; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: 6px; }
#ligne-menu select { height: 34px; font-size: 13.5px; background-color: #14163d; color: #fff; border-color: rgba(255, 255, 255, .1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d93c5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
#ligne-menu select:focus { border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(115, 137, 255, .2); }

.menu::-webkit-scrollbar { width: 8px; }
.menu::-webkit-scrollbar-thumb { background: #23264d; border-radius: 99px; }

/* ---------- En-têtes de page ---------- */
.entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.entete h1 { margin: 0; }
.sous-titre { color: var(--slate); font-size: 15px; font-weight: 400; margin: 6px 0 0; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--frost);
  border-radius: 99px;
  background: #fff;
  color: var(--body);
  font-size: 12.5px; font-weight: 500;

}
.pastille::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(77, 61, 247, .15); }

/* ---------- Cartes & grilles ---------- */
.carte { background: #fff; border: 1px solid var(--frost); border-radius: var(--r); padding: 22px; margin-bottom: 20px; box-shadow: var(--ombre); }
.carte > h2:first-child { margin-bottom: 16px; }
.grille { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.teinte-rappel { background: #fffaf0; border-color: #f8e4bd; }
.teinte-succes { background: #f2fbf6; border-color: #c9ecd9; }
.teinte-alerte { background: #fffaf0; border-color: #f8e0b4; }

/* ---------- Boutons ---------- */
button, .btn {
  font: inherit;
  font-size: 14px; font-weight: 500;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-s);
  border: 1px solid var(--frost);
  background: #fff;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(10, 11, 38, .05);
  transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease), color .18s;
}
button:hover, .btn:hover { background: var(--mist); border-color: #d4d7ea; color: var(--ink); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
button.prim, .btn.prim {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(10, 11, 38, .18), 0 8px 18px -8px rgba(77, 61, 247, .65), inset 0 1px 0 rgba(255, 255, 255, .16);
}
button.prim:hover, .btn.prim:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
button.vert, .btn.vert {
  background: var(--ok); border-color: var(--ok); color: #fff;
  box-shadow: 0 1px 2px rgba(10, 11, 38, .18), 0 8px 18px -8px rgba(14, 159, 110, .6), inset 0 1px 0 rgba(255, 255, 255, .16);
}
button.vert:hover, .btn.vert:hover { background: #0b8c61; border-color: #0b8c61; color: #fff; }
button.danger { color: var(--danger); border-color: #f2d2dc; }
button.danger:hover { background: #fdf2f5; border-color: #eab3c3; color: var(--danger); }
button.grand, .btn.grand { height: 46px; padding: 0 22px; font-size: 15px; }
button.petit, .btn.petit { height: 30px; padding: 0 10px; font-size: 13px; gap: 5px; }

/* ---------- Formulaires ---------- */
input, select, textarea {
  font: inherit;
  font-size: 14px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--frost);
  border-radius: var(--r-s);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 86px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a6abc9; }
input:hover, select:hover, textarea:hover { border-color: #d4d7ea; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77, 61, 247, .14); }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2362688b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
input[type=file] { height: auto; padding: 10px; border-style: dashed; background: var(--mist); cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 500; margin-right: 12px; padding: 7px 14px; border: 0; border-radius: var(--r-s); background: var(--accent); color: #fff; cursor: pointer; }
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--body); margin-bottom: 6px; }
.champ { margin-bottom: 14px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.case { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; line-height: 1.45; }
.case input { margin-top: 2px; }

/* ---------- Tableaux ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--frost); border-radius: 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--slate); padding: 11px 14px; background: var(--mist); border-bottom: 1px solid var(--frost); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--frost-2); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tr.clic { cursor: pointer; }
tr.clic td { transition: background .15s; }
tr.clic:hover td { background: #fafaff; }

/* ---------- Statuts (pastilles) ---------- */
.s-a_appeler { --c: #454a6e; --bg: #f0f1f8; }
.s-pas_repondu { --c: #b54708; --bg: #fff5ec; }
.s-a_rappeler { --c: #a15c07; --bg: #fef7e4; }
.s-rdv, .s-rdv_devis, .s-lead_qualifie { --c: #3533cc; --bg: #efeeff; }
.s-devis { --c: #0e6f8f; --bg: #eaf8fd; }
.s-signe { --c: #067647; --bg: #ebfbf2; }
.s-perdu { --c: #c3264f; --bg: #fdf0f3; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 99px;
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
  color: var(--c, var(--body));
  background: var(--bg, var(--frost-2));
  border: 1px solid color-mix(in srgb, var(--c, #454a6e) 16%, transparent);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ---------- Indicateurs ---------- */
.tuile { background: #fff; border: 1px solid var(--frost); border-radius: var(--r); padding: 18px; box-shadow: var(--ombre); }
.tuile-ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--wash); color: var(--accent); margin-bottom: 14px; }
.tuile .libelle { font-size: 13px; font-weight: 500; color: var(--slate); }
.tuile .valeur { font-size: 30px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tuile .petit { margin-top: 6px; }
.tuile.vedette { background: var(--logo-grad); border-color: transparent; color: #fff; box-shadow: 0 18px 36px -20px rgba(53, 51, 204, .8); }
.tuile.vedette .libelle, .tuile.vedette .petit { color: #c7c9f3; }
.tuile.vedette .tuile-ic { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Listes & messages ---------- */
.vide { text-align: center; color: var(--slate); padding: 30px 10px; font-size: 14px; }
.vide .ic { color: var(--ok); }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { padding: 12px 0; border-bottom: 1px solid var(--frost-2); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.liste-simple li:last-child { border-bottom: 0; }
.liste-simple li:first-child { padding-top: 2px; }
.alerte { background: #fffaf0; border: 1px solid #f8e0b4; color: #6e4706; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }
.alerte .ic { color: #d98a0b; margin-right: 6px; }
.alerte a { font-weight: 600; }
.alerte.succes { background: #f0fbf5; border-color: #c4ecd6; color: #05603a; }
.alerte.succes .ic { color: var(--ok); }
.erreur { background: #fdf2f5; border: 1px solid #f4cdd8; color: #a01c40; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }

/* ---------- Vue en colonnes ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.colonne { width: 276px; flex-shrink: 0; min-height: 140px; padding: 10px; border-radius: 12px; background: var(--frost-2); border: 1px solid var(--frost); transition: background .2s, border-color .2s; }
.colonne.survol { background: var(--wash); border-color: var(--lavender); }
.colonne h3 { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 12px; margin: 0; font-weight: 500; }
.kcarte {
  background: #fff;
  border: 1px solid var(--frost);
  border-left: 3px solid var(--c, var(--frost));
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(10, 11, 38, .04);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.kcarte:hover { box-shadow: 0 10px 24px -12px rgba(10, 11, 38, .28); transform: translateY(-1px); }
.kcarte .titre a { color: var(--ink); font-weight: 600; }
.kcarte select { margin-top: 10px; height: 30px; font-size: 12.5px; padding-left: 8px; }

/* ---------- Calendrier ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--frost); border: 1px solid var(--frost); border-radius: 10px; overflow: hidden; }
.cal .jsem { background: var(--mist); padding: 10px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--slate); }
.cal .jour { background: #fff; min-height: 112px; padding: 8px; font-size: 12px; min-width: 0; }
.cal .jour.autre { background: #fbfbfe; }
.cal .jour.autre .num { color: #b9bdd8; }
.cal .num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 99px; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.cal .jour.auj .num { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -6px rgba(77, 61, 247, .8); }
.ev { display: block; border-radius: 5px; padding: 3px 7px; margin-bottom: 3px; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev:hover { text-decoration: none; filter: brightness(.97); }
.ev.rappel { background: #fef7e4; color: #8a5a00; box-shadow: inset 2px 0 0 #f0a91c; }
.ev.fin { background: #fdf0f3; color: #a01c40; box-shadow: inset 2px 0 0 var(--danger); }
.ligne > .ev { display: inline-block; margin: 0; }

/* ---------- Graphiques ---------- */
.barre-ligne { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.barre-ligne .nom { width: 170px; flex-shrink: 0; }
.barre-ligne b { width: 34px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.barre-fond { flex: 1; height: 8px; border-radius: 99px; background: var(--frost-2); overflow: hidden; }
.barre { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transition: width .6s var(--ease); }
.histo { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; border-bottom: 1px solid var(--frost); }
.histo div { flex: 1; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent-soft), var(--accent)); opacity: .9; transition: opacity .15s; }
.histo div:hover { opacity: 1; }

/* ---------- Fenêtres & notifications ---------- */
#modal-fond {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px;
  overflow-y: auto;
  background: rgba(6, 6, 26, .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fondu .25s var(--ease);
}
#modal { width: 100%; max-width: 660px; padding: 26px; border-radius: var(--r-l); background: #fff; border: 1px solid var(--frost); box-shadow: var(--ombre-haute); animation: apparition .4s var(--ease); }
#modal h2 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
#modal ul { padding-left: 20px; color: var(--body); }
#modal li { margin-bottom: 4px; }
.boutons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--ombre-haute);
  animation: toast .45s var(--ease);
}
#toast .ic { color: var(--accent-soft); }
#toast.alerte-toast .ic { color: #ffb86b; }
@keyframes fondu { from { opacity: 0; } }
@keyframes apparition { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 14px); } }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(14, 159, 110, .55); } 70% { box-shadow: 0 0 0 9px rgba(14, 159, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0); } }
.page-entree { animation: entree .5s var(--ease); }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Connexion ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-visuel {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 56px;
  color: #fff;
  background:
    radial-gradient(70% 55% at 15% 5%, rgba(77, 61, 247, .55) 0%, transparent 62%),
    radial-gradient(55% 45% at 95% 95%, rgba(115, 137, 255, .28) 0%, transparent 60%),
    var(--night);
}
.auth-visuel::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 120px 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.auth-visuel > * { position: relative; z-index: 1; }
.auth-visuel .marque { padding: 0; }
.auth-visuel .pastille { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #c9cce6; text-transform: none; margin-bottom: 22px; }
.auth-visuel .pastille::before { background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(115, 137, 255, .2); }
.auth-titre { font-size: clamp(34px, 4vw, 54px); font-weight: 300; letter-spacing: -0.045em; line-height: 1.04; margin: 0 0 28px; color: #fff; }
.auth-titre em { font-style: normal; background: linear-gradient(90deg, #b9b9f9 0%, #7389ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #c9cce6; font-size: 15px; }
.auth-points li { display: flex; align-items: center; gap: 10px; }
.auth-points .ic { color: var(--accent-soft); }
.auth-pied { color: #5d628a; font-size: 13px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-carte { width: 100%; max-width: 380px; animation: entree .6s var(--ease); }
.auth-carte h1 { font-size: 32px; font-weight: 400; margin-bottom: 8px; }
.auth-carte .doux { margin-bottom: 26px; }
.auth-carte button { width: 100%; margin-top: 6px; }

/* ---------- Appels en série ---------- */
.serie-haut { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.serie-haut h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.serie-haut select { width: auto; min-width: 210px; }
.progression { height: 6px; border-radius: 99px; background: var(--frost); overflow: hidden; margin-bottom: 22px; }
.progression div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transition: width .6s var(--ease); }
.serie-nom { font-size: 30px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.15; margin: 0; }
.dirigeant { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 16px; color: var(--ink-soft); }
.dirigeant .ic { color: var(--accent); }
.serie-tel { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin: 12px 0 14px; font-variant-numeric: tabular-nums; }
.etat-appel { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 500; }
.etat-appel.attente { background: var(--mist); border-color: var(--frost); }
.etat-appel.encours { background: #f0fbf5; border-color: #c4ecd6; color: #05603a; }
.etat-appel.encours > span:first-child::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--ok); animation: pouls 1.6s infinite; vertical-align: 1px; }
.etat-appel.echec { background: #fdf2f5; border-color: #f4cdd8; color: #a01c40; }
.compte { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; color: var(--accent); margin: 0 4px; font-variant-numeric: tabular-nums; }
.statuts-btn { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.statuts-btn button { height: 54px; font-weight: 600; color: var(--c); background: var(--bg); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); box-shadow: none; }
.statuts-btn button:hover { color: var(--c); background: var(--bg); border-color: var(--c); transform: translateY(-1px); box-shadow: 0 8px 18px -12px var(--c); }
.statuts-btn button.choisi { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 24%, transparent); }

/* Fiche : informations */
.infos dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; margin: 0; font-size: 14px; }
.infos dt { color: var(--slate); }
.infos dd { margin: 0; word-break: break-word; }

/* Historique */
.histo-appels { max-height: 340px; overflow-y: auto; font-size: 14px; }
.histo-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--frost-2); }
.histo-item:last-child { border-bottom: 0; }
.histo-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--wash); color: var(--accent); }
.histo-ic.note { background: #fef7e4; color: #a15c07; }
.histo-ic .ic { width: 16px; height: 16px; }
.histo-date { font-size: 12px; color: var(--slate); margin-bottom: 2px; }

/* Filtres en pastilles */
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces label { margin: 0; }
.puce { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--frost); border-radius: 99px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 450; cursor: pointer; transition: border-color .15s, background .15s; }
.puce:hover { border-color: var(--lavender); }
.puce:has(input:checked) { background: var(--wash); border-color: var(--accent); color: var(--brand); }
.puce .doux { font-size: 12px; }

/* Bloc téléphones de la fiche */
.tel-ligne { flex-wrap: wrap; }
.tel-ligne > div:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tel-ligne .ligne { flex-wrap: nowrap; gap: 6px; }
.tel-ajout input { flex: 1; min-width: 130px; }

/* Barres de défilement */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d7ea; border-radius: 99px; border: 3px solid var(--mist); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Écrans étroits (téléphone, tablette) ---------- */
@media (max-width: 640px) {
  .layout { flex-direction: column; }
  .menu { width: 100%; height: auto; position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px; gap: 4px; }
  .menu-section, .menu .marque-nom, #ligne-menu label { display: none; }
  .marque { padding: 0 6px 0 0; }
  .menu a:not(.marque) { white-space: nowrap; padding: 8px 10px; }
  .menu a.actif::before { display: none; }
  .menu a.appel-serie { margin: 0; }
  .menu-bas { margin: 0; padding: 0; border: 0; flex-direction: row; }
  #ligne-menu { margin: 0; padding: 0; background: none; border: 0; min-width: 180px; }
  .contenu { padding: 22px 16px 48px; }
  h1 { font-size: 25px; }
  .auth { grid-template-columns: 1fr; }
  .auth-visuel { padding: 28px 24px; gap: 24px; }
  .auth-titre { font-size: 32px; margin-bottom: 18px; }
  .infos dl { grid-template-columns: 1fr; gap: 2px 0; }
  .infos dd { margin-bottom: 8px; }
}

/* Grille d'indicateurs : 4 colonnes, la carte vedette en double largeur */
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.g-kpi .vedette { grid-column: span 2; }
@media (max-width: 1100px) { .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g-kpi { grid-template-columns: 1fr; } .g-kpi .vedette { grid-column: auto; } }

/* Écrans moyens : menu latéral compact (icônes seules, nom au survol) */
@media (max-width: 1100px) and (min-width: 641px) {
  .menu { width: 72px; padding: 16px 10px; align-items: center; }
  .marque { padding: 2px 0 16px; }
  .menu .marque-nom, #ligne-menu, .menu a:not(.marque) > span:not(.compteur) { display: none; }
  .menu-section { font-size: 0; width: 28px; padding: 0; margin: 12px 0 8px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .menu a:not(.marque) { justify-content: center; width: 46px; height: 42px; padding: 0; }
  .menu a.actif::before { left: -10px; }
  .menu a.appel-serie { width: 46px; padding: 0; margin: 2px 0 4px; }
  .compteur { position: absolute; top: 3px; right: 1px; margin: 0; padding: 0 5px; font-size: 10px; }
  .menu-bas { width: 100%; align-items: center; }
  .contenu { padding: 28px 28px 56px; }
}
