/* =============================================================================
   Veeple — CRM de prospection
   CSS écrit à la main. Aucune dépendance, aucune police externe.
   ============================================================================= */

:root {
  --violet: #6c47ff;
  --violet-fonce: #4f2fd6;
  --violet-pale: #f2eeff;
  --violet-voile: #faf8ff;
  --fond: #f6f6fa;
  --surface: #ffffff;
  --texte: #1d1a2c;
  --texte-doux: #5f5c72;
  --texte-pale: #8e8ba0;
  --bord: #e7e5ef;
  --bord-fort: #d6d3e3;

  --vert: #17875a;   --vert-fond: #e6f6ee;
  --orange: #b86a00; --orange-fond: #fff3df;
  --rouge: #c8323a;  --rouge-fond: #fdeced;
  --gris: #77748a;   --gris-fond: #f0eff5;
  --bleu: #3559d6;   --bleu-fond: #eaefff;

  --rayon: 14px;
  --rayon-petit: 9px;
  --ombre: 0 1px 2px rgba(29, 26, 44, .04), 0 2px 10px rgba(29, 26, 44, .04);
  --ombre-forte: 0 10px 40px rgba(60, 40, 140, .12);
  --h-barre: 60px;
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--h-barre) + 16px); }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--violet-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }

/* ----------------------------------------------------------------- connexion */
.connexion {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, #ebe4ff 0%, transparent 60%),
    var(--fond);
}
.connexion__carte {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 20px;
  box-shadow: var(--ombre-forte);
  padding: 40px 32px 32px;
  text-align: center;
}
.connexion__carte h1 { font-size: 20px; margin: 18px 0 4px; letter-spacing: -.01em; }
.connexion__carte p { margin: 0 0 28px; color: var(--texte-doux); font-size: 14px; }
.connexion form { display: grid; gap: 12px; text-align: left; }
.connexion label { font-size: 13px; font-weight: 600; color: var(--texte-doux); }
.connexion input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon-petit);
  background: #fff;
  font-size: 16px;
}
.connexion input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-pale); }
.connexion__erreur { color: var(--rouge); font-size: 13px; min-height: 18px; margin: 0; }

.logo {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7d5cff, var(--violet-fonce));
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.04em;
}
.logo--petit { width: 32px; height: 32px; border-radius: 9px; font-size: 17px; }

/* ----------------------------------------------------------------- boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--rayon-petit);
  border: 1px solid transparent;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.bouton--principal { background: var(--violet); color: #fff; }
.bouton--principal:hover { background: var(--violet-fonce); }
.bouton--principal:disabled { opacity: .6; cursor: wait; }
.bouton--discret { background: transparent; border-color: var(--bord-fort); color: var(--texte-doux); padding: 7px 12px; font-size: 13px; }
.bouton--discret:hover { background: var(--violet-voile); border-color: var(--violet); color: var(--violet-fonce); }
.bouton--plein { width: 100%; padding: 12px; font-size: 15px; }

/* ----------------------------------------------------------------- barre du haut */
.barre {
  position: sticky; top: 0; z-index: 30;
  height: var(--h-barre);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bord);
}
.barre__dedans {
  max-width: 1320px; height: 100%;
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}
.barre__marque { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.barre__marque small { font-weight: 500; color: var(--texte-pale); }
.barre__nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.barre__nav::-webkit-scrollbar { display: none; }
.barre__nav a {
  padding: 7px 12px; border-radius: 8px;
  color: var(--texte-doux); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.barre__nav a:hover { background: var(--violet-voile); color: var(--violet-fonce); text-decoration: none; }
/* page courante */
.barre__nav a[aria-current="page"] { background: var(--violet-pale); color: var(--violet-fonce); font-weight: 650; }
.barre__nav a { display: inline-flex; align-items: center; gap: 6px; }
.barre__compteur {
  background: var(--violet); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center;
}
a.barre__marque { color: var(--texte); }
a.barre__marque:hover { text-decoration: none; }
.barre__actions { display: flex; align-items: center; gap: 10px; }
.barre__maj { font-size: 12px; color: var(--texte-pale); white-space: nowrap; }

/* ----------------------------------------------------------------- page */
.page { max-width: 1320px; margin: 0 auto; padding: 24px 24px 80px; }
.section { margin-top: 40px; }
.section:first-of-type { margin-top: 8px; }
.page__tete { margin: 4px 0 28px; }
.page__titre { margin: 0; font-size: 26px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.page__tete + .section { margin-top: 0; }
.section__tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section__titre { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.section__sous-titre { margin: 4px 0 0; color: var(--texte-doux); font-size: 14px; max-width: 72ch; }
.note { color: var(--texte-pale); font-size: 13px; margin: 12px 0 0; }
.note strong { color: var(--texte-doux); font-weight: 600; }

.bandeau {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--rayon);
  font-size: 14px; margin-bottom: 16px;
}
.bandeau--demo {
  background: repeating-linear-gradient(-45deg, #fff6e2, #fff6e2 14px, #fff1d4 14px, #fff1d4 28px);
  border: 1px solid #f1d397; color: #6b4500;
}
.bandeau--demo strong { letter-spacing: .06em; }
.bandeau--alerte { background: var(--rouge-fond); border: 1px solid #f3c4c7; color: #7d1d22; }

/* ----------------------------------------------------------------- cartes chiffres */
.grille-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 16px 18px 14px;
  box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 2px;
  min-height: 118px;
}
.kpi__libelle { font-size: 13px; color: var(--texte-doux); font-weight: 500; }
.kpi__valeur { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 4px 0 2px; }
.kpi__valeur--vide { color: var(--texte-pale); }
.kpi__formule { font-size: 12px; color: var(--texte-pale); margin-top: auto; }
.kpi .kpi__valeur.kpi__valeur--vide { color: #c4c1d1; font-weight: 500; }
.kpi__absent { font-size: 12px; color: var(--texte-pale); font-style: italic; margin-bottom: 4px; }
.grille-kpi--principale { grid-template-columns: repeat(4, 1fr); }
.grille-kpi--secondaire { grid-template-columns: repeat(5, 1fr); margin-top: 14px; }
.grille-kpi--secondaire .kpi { min-height: 0; padding: 14px 16px 12px; }
.grille-kpi--secondaire .kpi__valeur { font-size: 22px; }
#grille-campagne { display: block; }
.kpi--cle { border-color: #d8ccff; background: linear-gradient(180deg, var(--violet-voile), #fff 70%); }
.kpi--cle .kpi__valeur { color: var(--violet-fonce); }
.kpi--alerte .kpi__valeur { color: var(--rouge); }

/* ----------------------------------------------------------------- santé */
.grille-sante { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.sante__seuil { font-size: 11.5px; color: var(--texte-pale); border-top: 1px dashed var(--bord); padding-top: 8px; margin-top: 10px; }
.sante .kpi__formule { margin-top: 0; }
.sante { position: relative; padding-left: 20px; }
.sante::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--gris);
}
.sante--vert::before { background: var(--vert); }
.sante--orange::before { background: #e69500; }
.sante--rouge::before { background: var(--rouge); }
.pastille {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: var(--gris-fond); color: var(--gris);
  align-self: flex-start; white-space: nowrap;
}
.pastille::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pastille--vert { background: var(--vert-fond); color: var(--vert); }
.pastille--orange { background: var(--orange-fond); color: var(--orange); }
.pastille--rouge { background: var(--rouge-fond); color: var(--rouge); }
.sante .kpi__valeur { font-size: 24px; }
.sante__ligne { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ----------------------------------------------------------------- tièdes */
.tiedes {
  background: linear-gradient(135deg, #f4f0ff 0%, #ffffff 60%);
  border: 1px solid #d8ccff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--ombre);
}
.tiedes .section__tete { margin-bottom: 18px; }
.tiedes__titre { display: flex; align-items: center; gap: 10px; }
.tiedes__compte {
  background: var(--violet); color: #fff; font-size: 13px; font-weight: 700;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; display: inline-grid; place-items: center;
}
.liste-tiedes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tiede {
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 14px 16px; display: grid; gap: 6px;
}
.tiede__nom { font-weight: 650; }
.tiede__meta { font-size: 13px; color: var(--texte-doux); }
.tiede__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.tiede__site { font-size: 13px; margin-left: 4px; }

.etat-vide {
  text-align: center; padding: 32px 16px; color: var(--texte-doux);
  border: 1px dashed var(--bord-fort); border-radius: var(--rayon); background: rgba(255,255,255,.6);
}
.etat-vide strong { display: block; color: var(--texte); margin-bottom: 4px; font-size: 15px; }

/* ----------------------------------------------------------------- pipeline */
.pipeline {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 18px; box-shadow: var(--ombre); margin-bottom: 16px;
}
.pipeline__barre { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--gris-fond); margin-bottom: 16px; }
.pipeline__barre span { display: block; height: 100%; min-width: 0; }
.pipeline__etapes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.etape {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--bord); background: #fff;
  border-radius: 99px; padding: 6px 8px 6px 12px;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--texte);
}
.etape:hover { border-color: var(--violet); }
.etape[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-pale); color: var(--violet-fonce); }
.etape__point { width: 9px; height: 9px; border-radius: 50%; }
.etape__nb { background: var(--gris-fond); border-radius: 99px; padding: 0 8px; font-weight: 700; font-size: 12px; line-height: 20px; }
.etape[aria-pressed="true"] .etape__nb { background: #fff; }
.pipeline__fleche { color: var(--texte-pale); font-size: 12px; }
.pipeline__separateur { width: 1px; height: 22px; background: var(--bord); margin: 0 4px; }

/* couleurs des stades (badge + barre) */
.s-nouveau { --c: #8e8ba0; --f: #f0eff5; }
.s-contacte { --c: #3559d6; --f: #eaefff; }
.s-relance { --c: #6c47ff; --f: #f2eeff; }
.s-a_repondu { --c: #17875a; --f: #e6f6ee; }
.s-rdv { --c: #0e7c86; --f: #e2f5f6; }
.s-client { --c: #0b6b43; --f: #d5f0e2; }
.s-refuse { --c: #c8323a; --f: #fdeced; }
.s-desinscrit { --c: #4b4860; --f: #e8e7ee; }
.s-non_classe { --c: #b86a00; --f: #fff3df; }
.etape__point, .pipeline__barre span { background: var(--c); }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--f, var(--gris-fond)); color: var(--c, var(--gris));
}
.badge--test { background: #ececf2; color: #5f5c72; margin-left: 4px; }
.badge--type { background: var(--violet-pale); color: var(--violet-fonce); font-weight: 600; font-size: 11px; padding: 1px 8px; }

/* ----------------------------------------------------------------- répartition par type */
.repartition {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 6px 18px; max-width: 760px;
}
.repartition__ligne {
  display: grid; grid-template-columns: minmax(140px, 1.4fr) repeat(3, minmax(90px, 1fr));
  gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0eff5;
}
.repartition__ligne:last-of-type { border-bottom: none; }
.repartition__entete { font-size: 12px; font-weight: 600; color: var(--texte-doux); padding: 10px 0; border-bottom: 1px solid var(--bord); }
.repartition__type .badge { font-size: 13px; padding: 3px 11px; }
.repartition__nb { text-align: right; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.repartition__entete .repartition__nb { font-size: 12px; font-weight: 600; letter-spacing: 0; }
.repartition__nb a { color: var(--violet-fonce); }
.repartition__total { color: var(--texte-doux); }
.repartition__somme { font-weight: 600; color: var(--texte-doux); border-top: 1px solid var(--bord); }
.repartition__somme .repartition__nb { font-size: 16px; }
.repartition__jauge { display: block; height: 4px; border-radius: 99px; background: var(--gris-fond); margin-top: 6px; overflow: hidden; }
.repartition__jauge span { display: block; height: 100%; background: var(--violet); border-radius: 99px; margin-left: auto; }
.repartition__note { margin: 4px 0 12px; }

/* ----------------------------------------------------------------- pourquoi (page tièdes) */
.pourquoi {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 20px 24px; margin-bottom: 24px;
}
.pourquoi .section__titre { font-size: 17px; }
.pourquoi__liste { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--texte-doux); max-width: 85ch; }
.pourquoi__liste strong { color: var(--texte); }
.case-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-doux); }
.case-select select {
  padding: 7px 30px 7px 11px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e8ba0' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center;
  appearance: none; font-size: 14px;
}
.badge--alerte { background: var(--rouge-fond); color: var(--rouge); margin-left: 4px; }

/* ----------------------------------------------------------------- tableaux */
.bloc-tableau {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre);
  /* pas d'overflow ici : il casserait le « sticky » des filtres et des en-têtes */
}
.outils {
  position: sticky; top: var(--h-barre); z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bord);
  border-radius: var(--rayon) var(--rayon) 0 0;
  padding: 14px 16px;
}
.outils__ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.recherche { position: relative; flex: 1 1 260px; min-width: 200px; }
.recherche input {
  width: 100%; padding: 9px 12px 9px 36px;
  border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit);
  background: #fff;
}
.recherche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--texte-pale); }
.recherche input:focus, .filtres select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-pale); }
.filtres { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filtres select {
  padding: 8px 30px 8px 11px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e8ba0' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center;
  appearance: none; font-size: 14px; max-width: 220px;
}
.case { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--texte-doux); cursor: pointer; white-space: nowrap; }
.case input { accent-color: var(--violet); width: 16px; height: 16px; }
.outils__compte { font-size: 13px; color: var(--texte-pale); margin-left: auto; white-space: nowrap; }
.bouton-filtres { display: none; }
.tri-mobile { display: none; }

table.tableau { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tableau th {
  position: sticky; top: calc(var(--h-barre) + var(--h-outils, 64px)); z-index: 10;
  background: #fbfbfd; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--texte-doux);
  padding: 10px 12px; border-bottom: 1px solid var(--bord);
  white-space: nowrap; user-select: none;
}
.tableau th[data-tri] { cursor: pointer; }
.tableau th[data-tri]:hover { color: var(--violet-fonce); }
.tableau th .fleche { display: inline-block; width: 10px; margin-left: 3px; opacity: .35; }
.tableau th[aria-sort] { color: var(--violet-fonce); }
.tableau th[aria-sort] .fleche { opacity: 1; }
.tableau td { padding: 11px 12px; border-bottom: 1px solid #f0eff5; vertical-align: middle; }
.tableau tbody tr:hover td { background: var(--violet-voile); }
.tableau tbody tr:last-child td { border-bottom: none; }
.tableau .num { text-align: right; }
.tableau th.num { text-align: right; }
.tableau .vide, .vide { color: #a9a6b8; font-weight: 400; }
.cellule-nom { font-weight: 600; }
.cellule-nom small { display: block; font-weight: 400; color: var(--texte-pale); font-size: 12px; }
.cellule-nom a.site { font-weight: 400; font-size: 12px; }
.score { font-weight: 700; color: var(--violet-fonce); }
.tel { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.tableau tr.appele td { background: #fafafa; }
.tableau tr.appele .cellule-nom { color: var(--texte-pale); text-decoration: line-through; text-decoration-color: var(--bord-fort); }
.tableau-vide td { text-align: center; padding: 40px 16px; color: var(--texte-doux); }

.formule {
  display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  background: var(--violet-voile); border: 1px solid #e3dbff; border-radius: var(--rayon-petit);
  padding: 8px 12px; font-size: 13px; color: var(--texte-doux);
}
.formule code { font-family: var(--mono); font-size: 12.5px; color: var(--violet-fonce); }

.encart-local {
  display: block;
  font-size: 13px; color: var(--texte-doux);
  padding: 9px 14px; background: var(--gris-fond); border-radius: var(--rayon-petit); margin: 0 0 12px;
}

.chargement { display: grid; place-items: center; min-height: 60vh; color: var(--texte-pale); }
.toupie { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--violet-pale); border-top-color: var(--violet); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.pied { text-align: center; color: var(--texte-pale); font-size: 12px; margin-top: 48px; }

/* ----------------------------------------------------------------- tablette / mobile */
@media (max-width: 1180px) {
  .barre__maj { display: none; }
  .grille-sante { grid-template-columns: repeat(3, 1fr); }
  .grille-kpi--secondaire { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --h-barre: 56px; }
  .barre__dedans { padding: 0 14px; gap: 12px; }
  .barre__marque small { display: none; }
  .page { padding: 16px 14px 64px; }
  .section { margin-top: 32px; }
  .kpi { min-height: 0; padding: 14px; }
  .kpi__valeur { font-size: 24px; }
  .grille-kpi, .grille-kpi--principale, .grille-kpi--secondaire { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grille-kpi--secondaire { margin-top: 10px; }
  .grille-sante { grid-template-columns: 1fr; gap: 10px; }
  .tiedes { padding: 16px; }
  .page__titre { font-size: 22px; }
  .page__tete { margin-bottom: 20px; }
  .pourquoi { padding: 16px; }
  .repartition { padding: 4px 14px; }
  .repartition__ligne { grid-template-columns: 1.3fr repeat(3, 1fr); gap: 8px; }
  .repartition__nb { font-size: 17px; }
  .formule { display: block; line-height: 1.6; }

  /* Filtres repliés derrière un bouton ; la recherche reste visible */
  .bouton-filtres { display: inline-flex; }
  .filtres { display: none; width: 100%; padding-top: 10px; flex-direction: column; align-items: stretch; }
  .outils.ouvert .filtres { display: flex; }
  .filtres select { max-width: none; width: 100%; }
  .tri-mobile { display: block; }
  .outils__compte { margin-left: 0; }
  .recherche { flex-basis: 100%; order: -1; }

  /* Tableaux -> cartes empilées, lisibles sans défilement horizontal */
  .tableau thead { display: none; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau tr { padding: 12px 14px; border-bottom: 1px solid var(--bord); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .tableau tbody tr:hover td { background: none; }
  .tableau td { border: none; padding: 2px 0; text-align: left !important; font-size: 13px; }
  .tableau td[data-libelle]::before {
    content: attr(data-libelle); display: block; font-size: 11px; color: var(--texte-pale); font-weight: 500;
  }
  .tableau td.pleine { grid-column: 1 / -1; }
  .tableau td.pleine::before { display: none !important; }
  .tableau td.cellule-nom { font-size: 15px; }
  .tableau tr.appele td { background: none; }
  .tableau-vide td { grid-column: 1 / -1; }
}

/* Barre du haut sur mobile : rangée 1 = logo + actions (toujours visibles),
   rangée 2 = onglets qui défilent horizontalement, jamais tronqués */
@media (max-width: 900px) {
  :root { --h-barre: 100px; }
  .barre { height: auto; }
  .barre__dedans {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 54px 46px;
    gap: 0 10px;
    padding: 0;
  }
  .barre__marque { padding-left: 14px; min-width: 0; }
  .barre__actions { padding-right: 14px; gap: 8px; }
  .barre__nav {
    grid-column: 1 / -1; grid-row: 2;
    align-items: center;
    padding: 0 14px;
    border-top: 1px solid var(--bord);
    overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    /* fondu à droite : indique qu'on peut faire défiler */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  }
  .barre__nav a { flex-shrink: 0; white-space: nowrap; scroll-snap-align: start; padding: 7px 11px; }
  .barre__nav a:last-child { margin-right: 20px; }
}
@media (max-width: 420px) {
  .barre__actions .bouton--discret span { display: none; }
  .barre__actions .bouton--discret { width: 38px; height: 38px; padding: 0; font-size: 16px; }
}
