/* TEXT PARTY — le style de Shops (Corporus) : noir et blanc, Inter, gris neutres,
   une seule couleur d'accent, l'encre. Les catégories ont chacune un point de couleur. */
:root {
  --ink: #0a0a0a;
  --text: #262626;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: #e8e8e8;
  --line-strong: #d4d4d4;
  --soft: #f4f4f4;
  --bg: #fafafa;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn-soft: #fff7e0;
  --c-paramedical: #0d9488;
  --c-medecin: #2563eb;
  --c-it: #7c3aed;
  --c-ingenieur: #d97706;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px -12px rgba(10, 10, 10, 0.08);
  --shadow-pop: 0 12px 32px -12px rgba(10, 10, 10, 0.22), 0 1px 3px rgba(10, 10, 10, 0.06);
  --entete: 56px;
  --onglets: 64px;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: -0.5px; margin: 0; font-weight: 700; }
h2 { font-size: 16px; letter-spacing: -0.2px; margin: 0; font-weight: 600; }
h3 { font-size: 14px; margin: 0; font-weight: 600; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sub { color: var(--muted); }
.sub.num { white-space: normal; }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[v-cloak] { display: none; }

/* ─── La coque : en-tête, barre latérale, onglets du bas sur mobile ─── */
.coque { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: var(--entete) 1fr; }
.entete {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--entete); padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.marque img { width: 28px; height: 28px; display: block; }
.marque b { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.marque span { color: var(--faint); font-weight: 400; margin-left: 2px; white-space: nowrap; }
.cote {
  position: sticky; top: var(--entete); height: calc(100vh - var(--entete));
  display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); padding: 8px;
}
.cote nav { flex: 1; overflow-y: auto; }
.cote .section { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); padding: 14px 12px 4px; }
.cote a {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 6px;
  text-decoration: none; color: var(--text); font-weight: 500;
}
.cote a:hover { background: var(--soft); }
.cote a.actif { background: var(--ink); color: #fff; }
.cote a .compte { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cote a.actif .compte { color: rgba(255, 255, 255, 0.7); }
.cote svg { width: 17px; height: 17px; flex-shrink: 0; }
.propulse { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; text-decoration: none; color: var(--muted); font-size: 12px; }
.propulse img { height: 16px; width: auto; opacity: 0.8; transition: opacity 0.15s; }
.propulse:hover img { opacity: 1; }
.propulse.centre { flex-direction: column; gap: 8px; margin: 40px auto 8px; width: fit-content; color: var(--faint); }
.propulse.centre img { height: 24px; }
.contenu { min-width: 0; padding: 28px 32px 48px; }
.contenu.plein { padding: 0; display: flex; flex-direction: column; height: calc(100vh - var(--entete)); }
.onglets { display: none; }

@media (max-width: 899px) {
  .coque { grid-template-columns: minmax(0, 1fr); }
  .cote { display: none; }
  .contenu { padding: 20px 16px calc(var(--onglets) + 32px + env(safe-area-inset-bottom)); }
  .contenu.plein { height: calc(100vh - var(--entete) - var(--onglets) - env(safe-area-inset-bottom)); }
  .onglets {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex;
    height: calc(var(--onglets) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .onglets a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--faint); font-size: 11px; font-weight: 500;
  }
  .onglets a svg { width: 22px; height: 22px; }
  .onglets a.actif { color: var(--ink); }
  .marque span { display: none; }
}

/* Le menu du compte */
.compte-menu { position: relative; }
.moi-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; }
.moi-btn:hover, .moi-btn[aria-expanded='true'] { background: var(--soft); border-color: var(--line-strong); }
.initiale { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.menu {
  position: absolute; right: 0; top: 44px; min-width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; display: grid;
}
.menu .tete { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .tete b { display: block; }
.menu .tete span { color: var(--muted); font-size: 12px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 8px; border: 0; background: none; text-decoration: none; cursor: pointer; text-align: left; color: var(--ink); }
.menu button:hover, .menu a:hover { background: var(--soft); }
.menu svg { width: 16px; height: 16px; }
.menu .propulse { padding: 10px 12px 6px; border-top: 1px solid var(--line); margin-top: 6px; }

/* ─── Boutons, champs ─── */
.btn {
  height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.06s ease, opacity 0.15s, background 0.15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--line-strong); background: var(--soft); opacity: 1; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f3c7c1; }
.btn.danger:hover { background: var(--danger-soft); opacity: 1; }
.btn.grand { height: 54px; font-size: 16px; border-radius: 13px; padding: 0 20px; }
.btn.petit { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.bloc { width: 100%; }
.lien { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lien.muted { color: var(--muted); }
.icone-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.icone-btn:hover { border-color: var(--line-strong); background: var(--soft); }
.icone-btn svg { width: 16px; height: 16px; }
.icone-btn.nu { border-color: transparent; }

.champ { display: block; }
.champ > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.champ small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.input, .select, .zone {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.zone { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { padding-right: 30px; appearance: none; background: #fff 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='%23737373' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:focus, .select:focus, .zone:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.07); }
.recherche { position: relative; }
.recherche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.recherche .input { padding-left: 34px; }
@media (max-width: 899px) { .input, .select, .zone { font-size: 16px; } }

.erreur { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }
.avis { background: var(--soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--text); }
.avis.jaune { background: var(--warn-soft); }

/* Le contrôle segmenté et l'interrupteur, comme dans l'espace client de Shops */
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1); }
.seg button .n { color: var(--faint); font-variant-numeric: tabular-nums; }
.seg button.on .n { color: var(--muted); }
.interrupteur { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text); user-select: none; white-space: nowrap; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.interrupteur i { width: 34px; height: 20px; border-radius: 999px; background: #d9d9d9; position: relative; transition: background 0.2s; flex-shrink: 0; }
.interrupteur i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.interrupteur input:checked + i { background: var(--ink); }
.interrupteur input:checked + i::after { transform: translateX(14px); }
.interrupteur input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Les catégories et les statuts */
.point { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--faint); }
.point.paramedical { background: var(--c-paramedical); }
.point.medecin { background: var(--c-medecin); }
.point.it { background: var(--c-it); }
.point.ingenieur { background: var(--c-ingenieur); }
.cat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--text); white-space: nowrap; }
.badge.a_envoyer { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.badge.envoye { background: var(--ink); color: #fff; }
.badge.interesse { background: var(--ok-soft); color: var(--ok); }
.badge.pas_interesse { background: var(--soft); color: var(--muted); }
.badge.a_supprimer, .badge.supprime { background: var(--danger-soft); color: var(--danger); }

/* ─── Cartes et pages ─── */
.carte { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.carte.pad { padding: 20px; }
.tete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.tete-page .sub { margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vide { padding: 48px 20px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.vide h2 { color: var(--ink); }
.vide .btn { margin-top: 4px; }
.chargement { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: tourne 0.8s linear infinite; margin: 60px auto; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ─── Connexion ─── */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.connexion .boite { width: 100%; max-width: 400px; }
.connexion .logo { display: block; height: 30px; width: auto; margin: 0 auto 28px; }
.connexion .carte { padding: 32px; box-shadow: var(--shadow); }
.connexion h1 { font-size: 24px; margin-bottom: 6px; }
.connexion .sub { margin-bottom: 22px; }
.connexion form { display: grid; gap: 16px; }
.connexion .bas { display: flex; justify-content: space-between; font-size: 13px; }
.connexion .pied { text-align: center; color: var(--faint); font-size: 12px; margin-top: 20px; }
.otp { text-align: center; font-family: var(--mono); font-size: 26px !important; font-weight: 700; letter-spacing: 12px; padding-left: 24px !important; height: 60px !important; }
@media (max-width: 480px) { .connexion .carte { padding: 24px 20px; } }

/* ─── La text party ─── */
.party { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.party-tete { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.compteur { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.compteur .gros { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.compteur .gros small { font-size: 14px; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-left: 6px; }
.barre { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.barre span { display: block; height: 100%; background: var(--ink); border-radius: 999px; transition: width 0.4s ease; }
.party-filtres { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-width: 0; }
.party-filtres .seg { min-width: 0; }

/* La fiche du lead : la carte noire de l'espace client Shops */
.fiche-lead {
  background: var(--ink); color: #fff; border-radius: 20px; padding: 20px 22px 18px; position: relative; overflow: hidden;
  box-shadow: 0 18px 40px -22px rgba(10, 10, 10, 0.55);
}
.fiche-lead::after { content: ''; position: absolute; right: -80px; top: -100px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.07); pointer-events: none; }
.fiche-lead .haut { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.fiche-lead .haut .cat { gap: 8px; }
.fiche-lead .haut .point { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
.fiche-lead .qui { margin: 18px 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.9px; line-height: 1.1; overflow-wrap: anywhere; }
.fiche-lead .qui span { display: block; color: rgba(255, 255, 255, 0.55); font-weight: 600; }
.fiche-lead .quoi { color: rgba(255, 255, 255, 0.82); font-size: 15px; }
.fiche-lead .affiche { color: rgba(255, 255, 255, 0.5); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche-lead .pied { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.fiche-lead .tel { font-family: var(--mono); font-size: 16px; font-weight: 600; letter-spacing: 0.5px; color: #fff; text-decoration: none; }
.fiche-lead .appel { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.6); font-size: 13px; text-decoration: none; }
.fiche-lead .appel:hover { color: #fff; }
.fiche-lead .appel svg { width: 15px; height: 15px; }

.message { padding: 16px; display: grid; gap: 12px; }
.message .tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bulle { background: var(--soft); border-radius: 4px 14px 14px 14px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.bulle.replie { max-height: 9.5em; overflow: hidden; position: relative; }
.bulle.replie::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5em; background: linear-gradient(transparent, var(--soft)); }
.bulle mark { background: #fff3a3; color: inherit; border-radius: 3px; padding: 0 2px; }
.bulle mark.manquant { background: var(--danger-soft); color: var(--danger); }

.party-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
@media (max-width: 899px) {
  .party { padding-bottom: 76px; }
  .party-actions {
    position: fixed; left: 0; right: 0; bottom: calc(var(--onglets) + env(safe-area-inset-bottom)); z-index: 15;
    padding: 10px 16px; background: linear-gradient(rgba(250, 250, 250, 0), var(--bg) 30%);
  }
  .fiche-lead .qui { font-size: 27px; }
}
@media (max-width: 440px) {
  .plus-tard { width: 54px; padding: 0; }
  .plus-tard span { display: none; }
}

.entree-enter-active { transition: opacity 0.22s ease, transform 0.22s ease; }
.entree-enter-from { opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) {
  .entree-enter-active { transition: none; }
  .barre span { transition: none; }
}

/* ─── Fenêtres : panneau au centre sur ordinateur, tiroir du bas sur mobile ─── */
.voile { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 10, 0.4); display: grid; place-items: center; padding: 24px; animation: apparait 0.15s ease; }
.fenetre { width: 100%; max-width: 520px; max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-pop); }
.fenetre.large { max-width: 720px; }
.fenetre .tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 0; }
.fenetre .tete p { margin-top: 4px; }
.fenetre .corps { padding: 18px 20px 20px; display: grid; gap: 16px; }
.fenetre .bas { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; flex-wrap: wrap; }
@keyframes apparait { from { opacity: 0; } }
@keyframes monte { from { transform: translateY(24px); opacity: 0.6; } }
@media (max-width: 640px) {
  .voile { place-items: end stretch; padding: 0; }
  .fenetre { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: monte 0.2s ease; }
}

.confirmation .corps { gap: 10px; }
.confirmation h2 { font-size: 20px; letter-spacing: -0.4px; }
.confirmation .liens { display: flex; justify-content: center; gap: 20px; padding-top: 6px; font-size: 13px; }

/* La fiche complète d'un lead */
.statuts { display: flex; flex-wrap: wrap; gap: 6px; }
.statuts button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.statuts button:hover { border-color: var(--line-strong); }
.statuts button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.grille-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grille-champs { grid-template-columns: 1fr; } }
.infos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.infos dt { color: var(--muted); }
.infos dd { margin: 0; overflow-wrap: anywhere; }

/* ─── Ma liste ─── */
.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filtres .recherche { flex: 1; min-width: 200px; }
.filtres .select { width: auto; min-width: 150px; }
.lignes { padding: 0; }
.ligne { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 16px; background: none; border: 0; text-align: left; cursor: pointer; transition: background 0.12s; }
.ligne:hover { background: var(--bg); }
.ligne + .ligne { border-top: 1px solid var(--line); }
.ligne:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.ligne:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--text); font-weight: 600; font-size: 13px; flex-shrink: 0; position: relative; }
.avatar .point { position: absolute; right: -2px; bottom: -2px; box-shadow: 0 0 0 2px #fff; }
.ligne .milieu { flex: 1; min-width: 0; display: grid; }
.ligne .titre { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .cote-droit { display: grid; justify-items: end; gap: 2px; flex-shrink: 0; }
.ligne .cote-droit small { color: var(--faint); font-size: 12px; }
.plus { display: flex; justify-content: center; padding: 12px; }

/* ─── La base : une grille façon tableur ─── */
.base { display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; }
.base-tete { padding: 20px 24px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; background: var(--bg); }
.base-outils { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-width: 0; }
.base-outils .seg { min-width: 0; }
.base-outils .recherche { width: 280px; }
.selection { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 48px 8px 14px; }
.selection b { margin-right: 6px; }
.selection .select { width: auto; height: 32px; background-color: #fff; color: var(--ink); font-size: 13px; }
.selection .btn.ghost { height: 32px; }
.selection .fermer { position: absolute; top: 7px; right: 8px; color: #fff; background: none; border: 0; }
.selection .fermer:hover { background: rgba(255, 255, 255, 0.1); }
.feuille { flex: 1; min-height: 0; overflow: auto; background: #fff; border-top: 1px solid var(--line); position: relative; }
.feuille table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.feuille th, .feuille td { height: 34px; padding: 0 10px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; background: #fff; }
.feuille th { position: sticky; top: 0; z-index: 3; height: 36px; background: #fafafa; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); padding: 0 4px 0 10px; }
.feuille th .th { display: flex; align-items: center; gap: 2px; }
.feuille th .tri { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.feuille th .tri svg { width: 12px; height: 12px; color: var(--muted); flex-shrink: 0; }
.feuille th .filtre-btn { width: 24px; height: 24px; border-radius: 5px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--faint); flex-shrink: 0; }
.feuille th .filtre-btn:hover { background: var(--line); color: var(--ink); }
.feuille th .filtre-btn.actif { background: var(--ink); color: #fff; }
.feuille th .filtre-btn svg { width: 12px; height: 12px; }
.feuille .fixe { position: sticky; z-index: 2; }
.feuille th.fixe { z-index: 4; }
.feuille .fixe.dernier { box-shadow: 1px 0 0 var(--line); }
.feuille .case { width: 40px; text-align: center; padding: 0; }
.feuille .case input { width: 15px; height: 15px; accent-color: var(--ink); cursor: pointer; vertical-align: middle; }
.feuille tbody tr:hover td { background: #fafafa; }
.feuille tbody tr.choisie td { background: #f1f1f1; }
.feuille td.editable { cursor: cell; }
.feuille td.edition { padding: 0; overflow: visible; }
.feuille td.edition .input, .feuille td.edition .select { height: 33px; border-radius: 0; border: 2px solid var(--ink); box-shadow: none; font-size: 13px; padding: 0 8px; }
.feuille td.mono { font-family: var(--mono); font-size: 12px; }
.feuille .vide-cell { color: var(--faint); }
.feuille-pied .propulse { display: none; }
.feuille-pied { display: flex; justify-content: space-between; gap: 12px; padding: 8px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
@media (max-width: 899px) {
  .base-tete { padding: 16px 16px 10px; }
  .base-outils .recherche { width: 100%; }
  .feuille-pied { padding: 8px 16px; }
  .feuille-pied > span { display: none; }
  .feuille-pied .propulse { display: flex; margin-left: auto; }
  .feuille .fixe:not(.case):not(.premier) { position: static; box-shadow: none; }
  .feuille .fixe.premier { box-shadow: 1px 0 0 var(--line); }
}

/* Le filtre d'une colonne, comme celui d'Excel */
.pop { position: fixed; z-index: 40; width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 10px; display: grid; gap: 8px; }
.pop .valeurs { max-height: 260px; overflow-y: auto; overflow-x: hidden; display: grid; margin: 0 -4px; }
.pop label.val { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.pop label.val:hover { background: var(--soft); }
.pop label.val input { accent-color: var(--ink); }
.pop label.val span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop label.val em { font-style: normal; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.pop .bas { display: flex; justify-content: space-between; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }

/* ─── L'équipe ─── */
.equipe { display: grid; gap: 24px; }
.cartes-membres { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.membre { padding: 18px; display: grid; gap: 14px; }
.membre .qui { display: flex; align-items: center; gap: 12px; }
.membre .qui .initiale { width: 38px; height: 38px; font-size: 14px; }
.membre .qui div { min-width: 0; }
.membre .qui span { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chiffres div { display: grid; }
.chiffres b { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.chiffres span { font-size: 12px; color: var(--muted); }
.repart { display: grid; gap: 6px; font-size: 13px; }
.repart div { display: flex; align-items: center; gap: 8px; }
.repart div span:nth-child(2) { flex: 1; color: var(--text); }
.repart div b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px; }
.pot .gros { font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.journal { padding: 4px 0; }
.journal li { display: flex; gap: 12px; padding: 9px 18px; font-size: 13px; border-bottom: 1px solid var(--line); align-items: baseline; }
.journal li:last-child { border-bottom: 0; }
.journal time { color: var(--faint); font-variant-numeric: tabular-nums; width: 90px; flex-shrink: 0; }
.journal ul { list-style: none; margin: 0; padding: 0; }
.tableau-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.tableau-mini th, .tableau-mini td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.tableau-mini th:first-child, .tableau-mini td:first-child { text-align: left; }
.tableau-mini th { font-weight: 600; color: var(--muted); font-size: 12px; }
.tableau-mini tfoot td { font-weight: 600; border-bottom: 0; }
.coche { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.coche input { accent-color: var(--ink); width: 16px; height: 16px; }
.coche span { flex: 1; font-weight: 500; }
.coche em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ─── Messages ─── */
.messages { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.messages .carte { padding: 18px; display: grid; gap: 14px; }
.editeur { min-height: 280px; font-size: 14px; line-height: 1.6; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-family: var(--mono); cursor: pointer; white-space: nowrap; }
.puce:hover { border-color: var(--ink); }
.puce.cond { background: var(--soft); }
.apercu-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.aide-syntaxe { font-size: 13px; color: var(--text); }
.aide-syntaxe summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.aide-syntaxe summary:hover { color: var(--ink); }
.aide-syntaxe ul { margin: 10px 0 0; padding: 12px 14px 12px 28px; background: var(--soft); border-radius: 10px; display: grid; gap: 6px; }
.aide-syntaxe code { font-family: var(--mono); font-size: 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
.reglages-evt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.barre-enregistrer { position: sticky; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 10px 10px 16px; box-shadow: var(--shadow-pop); margin-top: 20px; }
.barre-enregistrer .btn { background: #fff; color: var(--ink); border-color: #fff; }
@media (max-width: 899px) {
  .messages { grid-template-columns: 1fr; }
  .reglages-evt { grid-template-columns: 1fr; }
  .barre-enregistrer { bottom: calc(var(--onglets) + 12px + env(safe-area-inset-bottom)); }
}

/* Le dépôt de fichier */
.depot { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; display: grid; gap: 6px; justify-items: center; transition: background 0.15s, border-color 0.15s; }
.depot:hover, .depot.survol { background: var(--soft); border-color: var(--ink); }
.depot svg { width: 22px; height: 22px; color: var(--muted); }
.format { width: 100%; border-collapse: collapse; font-size: 13px; }
.format td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.format td:first-child { font-family: var(--mono); font-size: 12px; white-space: nowrap; padding-right: 14px; }
.format td:last-child { color: var(--muted); }

/* Le message éphémère, avec Annuler */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; padding: 10px 12px 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); animation: apparait 0.15s ease;
}
.toast button { background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 8px; height: 30px; padding: 0 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.toast button:hover { background: rgba(255, 255, 255, 0.2); }
@media (max-width: 899px) { .toast { bottom: calc(var(--onglets) + 84px + env(safe-area-inset-bottom)); } }
