/* Relances commerciales — maquette de référence (capture "Bonjour David") */
:root {
    --bg: #F5F6FA; --card: #fff; --text: #1A2133; --muted: #6D7689; --line: #E4E7F0;
    --primary: #1769E8; --primary-dark: #1354BE; --ok: #08A66A; --err: #EF4665;
    /* Palette de référence (CLAUDE.md section 8) */
    --violet-ia: #7549EB; --orange: #FF8A22; --rouge-urgent: #EF4665; --gris-journalier: #6D7689;
    /* Catégories de priorité (taches.php + dashboard.php, même composant .badge-cat-*) : urgent/
       journalier repris tels quels de la maquette. "Important" est passé au orange de la palette
       (référence CLAUDE.md section 8) le 27/09/2026 vague 2 point 2 : le bleu de marque par défaut
       était confondu visuellement avec les liens/boutons cliquables, qui utilisent la même couleur
       (--primary). */
    --cat-urgent: #EF4665; --cat-urgent-bg: #FDE7EC;
    --cat-important: #FF8A22; --cat-important-bg: #FFF1E0;
    /* Journalier en BLEU depuis la nouvelle direction visuelle (27/09/2026, design_ref/) — remplace le
       gris #6D7689 de la palette initiale (CLAUDE.md section 8 mis à jour). */
    --cat-journalier: #1769E8; --cat-journalier-bg: #E3ECFC;
    --cat-mission: #7549EB; --cat-mission-bg: #F1EBFE;
    /* Campagnes Nouveautés (étape 3b) : teinte turquoise, distincte de l'orange d'Important (décision C9). */
    --cat-nouveaute: #0B8577; --cat-nouveaute-bg: #DDF4F0;
    --cat-commission: #08A66A; --cat-commission-bg: #E3F7EC;
    /* Encadré "message prêt à envoyer" (_message.php) : couleur propre, indépendante de la priorité
       (l'encadré apparaît sur TOUTES les cartes, quelle que soit leur catégorie) — avant le 27/09/2026
       elle réutilisait --cat-important par coïncidence (même bleu), ce qui l'aurait fait virer orange
       en même temps que la catégorie Important ci-dessus si on ne l'avait pas séparée. */
    --msgbox: #1769E8; --msgbox-bg: #E3ECFC;
    /* Pastilles par TYPE (dimension différente de la priorité U/I/J) : --type-baisse(-bg) utilisé par
       .badge-baisse_ca, --type-mission-bg par .msg-ia-preview. */
    --type-baisse: #FF8A22; --type-baisse-bg: #FFF1E0;
    --type-mission: #7549EB; --type-mission-bg: #F1EBFE;
    /* Alias historiques (badges par type sur taches.php) */
    --relance: #6D7689; --relance-bg: #EAEBF0; --produit: #1769E8; --produit-bg: #E3ECFC;
    --sidebar-bg: #1A2133; --sidebar-text: #A9AFC3; --sidebar-active-bg: rgba(255,255,255,.08);
    --radius: 16px; --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(26,33,51,.04), 0 8px 24px rgba(26,33,51,.06);
    --shadow-sm: 0 1px 3px rgba(26,33,51,.05);
    --sidebar-w: 224px;
    /* Refonte lot 1 (08/10/2026) — design system minimal. Échelle d'espacements (multiples de 4 px), échelle de tailles de
       texte, couleurs d'état, anneau de focus et taille minimale des cibles cliquables : 36 px à la souris, 44 px au doigt
       (règle @media juste après ce bloc). Les nouvelles règles utilisent ces variables ; les anciennes valeurs en dur
       restent valables tant qu'elles ne sont pas retouchées. */
    --esp-1: 4px; --esp-2: 8px; --esp-3: 12px; --esp-4: 16px; --esp-5: 24px; --esp-6: 32px;
    --txt-xs: 12px; --txt-sm: 13px; --txt-base: 15px; --txt-md: 16px; --txt-lg: 18px; --txt-xl: 21px; --txt-2xl: 26px;
    --surface-alt: #FAFBFE; --line-strong: #CDD3E2; --fond-piste: #E9ECF4;
    --desactive-fond: #EEF0F5; --desactive-texte: #9AA1B2;
    --anneau-focus: 0 0 0 3px rgba(23,105,232,.35);
    /* Badges de boutique (0037) : couleurs inchangées, désormais nommées. */
    --boutique-eclope: #0B6E5B; --boutique-eclope-bg: #E2F4EE;
    --boutique-grossiste: #2E3D5C; --boutique-grossiste-bg: #E6EAF3;
    --boutique-multivap: #8A2F6B; --boutique-multivap-bg: #F6E6F0;
    --cible-min: 36px;
}
/* Écran tactile ou étroit (tablette, téléphone) : toutes les cibles passent à 44 px (refonte lot 1). */
@media (max-width: 1023px), (pointer: coarse) { :root { --cible-min: 44px; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
       background: var(--bg); color: var(--text); }
h1, h2 { margin: 0; line-height: 1.25; font-weight: 700; }
.muted, .meta { color: var(--muted); font-size: 13px; }
svg { display: block; }

/* Boutons / champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: #fff;
       color: var(--text); padding: 10px 16px; border-radius: 999px; font: inherit; font-weight: 600; min-height: var(--cible-min);
       font-size: 14px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: #F5F6FA; border-color: #c3cadb; }
.btn:active { transform: scale(.98); }
/* Refonte lot 1 : UN bouton principal (plein, bleu) par écran ; tous les autres sont secondaires (blancs, bordés). */
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:not(.btn-primary):disabled:hover { background: #fff; }
.btn-primary:disabled:hover { background: var(--primary); border-color: var(--primary); }
/* Secondaire « positif » (ex. Valider une suggestion) : vert, sans voler la place du bouton principal de la page. */
.btn-positif { color: #067A4E; border-color: #9FD9BF; }
.btn-positif:hover { background: var(--cat-commission-bg); border-color: var(--ok); }
.btn-block { width: 100%; margin-top: 14px; padding: 13px; justify-content: center; }
.btn-small { padding: 7px 13px; font-size: 13px; min-height: var(--cible-min); }
input[type=email], input[type=password], input[type=search], textarea {
    width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; background: #fff; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
/* Refonte lot 1 : focus toujours visible au clavier (jamais à la souris), spécificité nulle pour laisser gagner les règles
   propres à un composant. */
:where(a, button, summary, select, [tabindex], label:has(> input)):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
:where(button, select):disabled { cursor: not-allowed; }
select { min-height: var(--cible-min); }
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 14px; }
.alert-error { background: #fdecea; color: var(--err); border: 1px solid #f5c2c0; }
.alert-info { background: #eaf1fd; color: #0d4ea6; border: 1px solid #c7dbf7; }
.empty { text-align: center; color: var(--muted); padding: 32px 10px; }

/* Connexion (pas de sidebar) */
.page-login { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
.login-box { width: 100%; max-width: 380px; background: var(--card); padding: 32px 26px;
             border-radius: var(--radius); box-shadow: var(--shadow); }
.login-box h1 { font-size: 22px; }

/* ==================== Coquille app : sidebar + contenu ==================== */
.app { display: flex; min-height: 100vh; }
/* position: fixed, pas sticky (correctif 27/09/2026) : "html, body { overflow-x: hidden }" plus bas
 * dans ce fichier fait de body un conteneur de scroll, ce qui casse position:sticky sur TOUS ses
 * descendants dans la plupart des navigateurs — la sidebar défilait avec le contenu au lieu de rester
 * fixée à l'écran. position:fixed n'est pas affecté par overflow sur les ancêtres (seuls transform/
 * filter/will-change le seraient, absents ici) : elle reste bien épinglée à la fenêtre. */
.sidebar { width: var(--sidebar-w); flex: none; background: var(--sidebar-bg); color: #fff;
           display: flex; flex-direction: column; padding: 20px 14px; position: fixed; top: 0; left: 0;
           height: 100vh; overflow-y: auto; z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 22px; color: #fff; text-decoration: none; }
.sidebar-logo { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--orange); color: #fff;
                display: flex; align-items: center; justify-content: center; }
.sidebar-brand-texte { min-width: 0; }
.sidebar-brand strong { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.sidebar-brand-texte span { display: block; font-size: 11.5px; color: var(--sidebar-text); margin-top: 2px; }
.sidebar-nav { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a, .sidebar-nav .navitem {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    color: var(--sidebar-text); text-decoration: none; font-size: 14px; font-weight: 600; }
.sidebar-nav a:hover { background: var(--sidebar-active-bg); color: #fff; }
.sidebar-nav a.actif { background: rgba(23,105,232,.28); color: #fff; }
.sidebar-nav .navitem.desactive { opacity: .55; cursor: default; }
.sidebar-nav svg { flex: none; width: 18px; height: 18px; }
.sidebar-badge { margin-left: auto; background: var(--cat-urgent); color: #fff; font-size: 11px;
                 font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar-badge[data-vide="1"] { display: none; }
.boutique-fixe { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sidebar-soon { margin-left: auto; font-size: 10px; color: var(--sidebar-text); border: 1px solid rgba(255,255,255,.18);
                border-radius: 999px; padding: 1px 6px; }
.sidebar-boutique { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-boutique label { color: var(--sidebar-text); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
                          margin: 0 0 6px; font-weight: 700; }
.sidebar-boutique select, .sidebar-boutique .boutique-fixe {
    width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff;
    border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; font-size: 13px; font-weight: 600; }
.sidebar-toggle { display: none; }

/* margin-left (pas flex) : la sidebar est en position:fixed, donc hors du flux — sans cette marge le
 * contenu principal passerait sous elle. */
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }
.container { max-width: 1180px; margin: 0 auto; padding: 24px 28px 60px; }
.container-large { max-width: 1440px; }

/* En-tête de page */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -.01em;
    /* Même raisonnement que .sous-titre juste en dessous : à une largeur intermédiaire (≈ 768 px), un titre plus
       long (« Activité des commerciaux ») passe sur 2 lignes alors qu'un titre court (« Pas d'appel ») reste sur
       une seule — hauteur réservée à deux lignes partout, coupure propre si besoin. */
    min-height: 66px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.page-head .sous-titre { color: var(--muted); margin-top: 4px; font-size: 14px; overflow-wrap: anywhere;
    /* Même emplacement partout (pages admin) : hauteur réservée à deux lignes, toujours la même, qu'il y ait une
       ligne de texte (espace vide en dessous) ou plus (coupure propre, sans pousser ce qui suit). */
    min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Correctif (toutes les pages admin, à la source) : sans flex-basis explicite, un sous-titre long fait passer
   .head-right à la ligne du dessous (la taille de référence pour la décision de passage à la ligne utilise la
   largeur du texte sur une seule ligne, pas la largeur réellement disponible) — titre masqué par l'infobulle de la
   cloche, bloc date/cloche/compte aligné à gauche sous le titre. .page-head-info prend tout l'espace restant et
   enveloppe normalement son texte ; .head-right garde sa taille propre et ne descend plus à la ligne. */
.page-head-info { flex: 1 1 0%; min-width: 0; }
.head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: none; }
/* Correctif du 07/10/2026 (en-tête qui débordait à droite depuis la cloche) : `flex: none` empêchait .head-right de
   rétrécir — à 390 px, ~500 px de date + cloche + compte dans ~320 px, nom et menu du compte coupés sans défilement.
   Il peut maintenant rétrécir (jamais au-delà de la largeur de l'en-tête) : quand il ne tient pas à côté du titre, il
   passe sous le titre comme avant et ses éléments vont à la ligne. Tant qu'il tient (1280 px), rendu inchangé.
   Sous 1200 px, la date du jour (déjà dans l'horloge du poste) est masquée : à ~1054 px elle prenait la place du
   titre et du sous-titre. Nom du compte coupé avec « … » seulement s'il est plus large que l'écran. Le titre garde au
   moins 180 px : sinon, à 390 px, le bloc rétréci tenait à côté de lui et l'écrasait (plus étroit que partout à 1280 px,
   187 px sur Mon profil, donc sans effet à cette largeur). */
.page-head-info { min-width: 180px; }
.head-right { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.head-right > div { min-width: 0; max-width: 100%; }
.head-avatar { max-width: 100%; }
.head-avatar span:not(.initiales) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-date { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
             border-radius: 12px; padding: 9px 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.head-date svg { color: var(--primary); }
@media (max-width: 1199px) { .head-date { display: none; } }   /* correctif du 07/10/2026, voir .head-right */
.head-bell { position: relative; width: 40px; height: 40px; border-radius: 12px; cursor: default; background: var(--card);
             border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
             box-shadow: var(--shadow-sm); color: var(--text); }
.head-bell .pastille { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
                       border-radius: 999px; background: var(--err); border: 2px solid #fff; color: #fff;
                       font-size: 10.5px; font-weight: 800; line-height: 14px; text-align: center; }
.head-avatar { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
               border-radius: 12px; padding: 5px 12px 5px 5px; box-shadow: var(--shadow-sm); cursor: pointer;
               font: inherit; color: var(--text); min-height: max(40px, var(--cible-min)); }
.head-avatar:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.head-avatar .initiales { width: 30px; height: 30px; border-radius: 10px; background: var(--primary); color: #fff;
                          display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.head-avatar span { font-size: 13px; font-weight: 600; }

/* Filtres / onglets (chips) — repris tels quels sur taches.php */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.chip { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--cible-min);
        border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 8px 14px; color: var(--text);
        font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none;
        transition: background .15s, border-color .15s; }
.chip:hover { background: var(--bg); }
.chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.quota-resume { margin: 0 0 12px; }
.quota-resume .cat { font-weight: 700; }

/* En-têtes de section Urgent/Important/Journalier (taches.php) */
.section-cat-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; flex-wrap: wrap; }
.section-cat-head:first-of-type { margin-top: 4px; }
.section-cat-titre { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pastille-cat { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pastille-urgent { background: var(--cat-urgent); }
.pastille-important { background: var(--cat-important); }
.pastille-journalier { background: var(--cat-journalier); }
.section-cat-count { color: var(--muted); font-size: 13px; font-weight: 600; }
.section-cat-head .cat-actions { margin-left: auto; display: flex; gap: 8px; }

/* Grille du dashboard */
/* minmax(0, ...) plutôt que 1fr/340px nu : une piste 1fr a un min-width:auto implicite, donc un
   contenu insécable (nom de client long, motif) forçait la colonne à dépasser l'espace disponible
   au lieu de se réduire -> débordement horizontal de toute la page (corrigé 27/09/2026). */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 18px; align-items: start; }
.dash-col-gauche > .panel + .panel, .dash-col-droite > .panel + .panel { margin-top: 18px; }
.dash-grid-bas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
/* < 1200 px : colonne droite (Prochain client) sous la colonne gauche. */
@media (max-width: 1200px) {
    .dash-grid, .dash-grid-bas { grid-template-columns: minmax(0, 1fr); }
}
html, body { overflow-x: hidden; }   /* filet de sécurité : ne masque pas un futur oubli, l'empêche de casser la page */

/* Cartes génériques */
.panel { min-width: 0; background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
         border: 1px solid var(--line); }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; }
.panel-head .lien { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; }
.panel-head .lien:hover { text-decoration: underline; }

/* KPI (4 chiffres clés) */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
       box-shadow: var(--shadow-sm); display: flex; gap: 12px; align-items: flex-start; }
.kpi-icone { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center;
             justify-content: center; color: #fff; }
.kpi-icone svg { width: 20px; height: 20px; }
.kpi-icone.violet { background: var(--violet-ia); }
.kpi-icone.vert { background: var(--ok); }
.kpi-icone.orange { background: var(--orange); }
.kpi-icone.bleu { background: var(--primary); }
.kpi-corps { min-width: 0; }
.kpi-label { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi-value { display: block; font-size: 21px; font-weight: 800; margin-top: 2px; letter-spacing: -.01em; }
.kpi-variation { font-size: 12px; font-weight: 700; color: var(--ok); margin-top: 3px; display: flex; align-items: center; gap: 3px; }
.kpi-progress { height: 6px; background: #E9ECF5; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.kpi-progress-bar { height: 100%; background: var(--primary); border-radius: 4px; }
@media (max-width: 980px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* Liste compacte de tâches (aperçu dashboard) */
.taches-compactes { display: flex; flex-direction: column; }
.tache-ligne { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.tache-ligne:first-child { border-top: 0; }
.tache-check { flex: none; margin-top: 3px; }
.tache-check input { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
/* Ligne à plusieurs opportunités (correctif 27/09/2026) : lien vers la fiche complète plutôt qu'une
 * case à cocher qui ne traiterait que la tâche principale sans le dire clairement. */
a.tache-check-lien { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
                      border-radius: 999px; color: var(--muted); background: var(--bg); }
a.tache-check-lien:hover { color: var(--primary); background: var(--cat-important-bg); }
.tache-corps { flex: 1; min-width: 0; }
.tache-haut { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tache-client { font-weight: 700; font-size: 14.5px; }
.tache-boutique { color: var(--muted); font-size: 12.5px; }
/* Pastille de catégorie sur l'aperçu compact du dashboard : réutilise .badge/.badge-cat-<cat>, le
 * MÊME composant que taches.php (pas de classe séparée .pill-<cat>) — correctif 27/09/2026 vague 2 :
 * un seul nom de classe partagé entre les deux pages pour ne pas risquer une divergence future si
 * l'une est modifiée sans l'autre. Voir .badge / .badge-cat-* plus bas dans ce fichier. */
.tache-motif { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tache-produit { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.produit-vignette { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--bg);
                    border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
                    font-size: 11px; font-weight: 800; color: var(--muted); overflow: hidden; }
.produit-vignette img { width: 100%; height: 100%; object-fit: cover; }
.tache-produit-texte { font-size: 12.5px; color: var(--muted); }
.tache-produit-texte strong { color: var(--text); font-weight: 600; }
.msg-ia-preview { margin-top: 9px; background: var(--type-mission-bg); border-radius: var(--radius-sm);
                  padding: 8px 12px; cursor: pointer; }
.msg-ia-preview .msg-ia-label { font-size: 11.5px; font-weight: 700; color: var(--violet-ia); display: flex;
                                align-items: center; gap: 5px; }
.msg-ia-preview .msg-ia-texte { font-size: 13px; margin-top: 3px; color: var(--text); overflow: hidden;
                                 text-overflow: ellipsis; white-space: nowrap; }
.msg-ia-preview.ouvert .msg-ia-texte { white-space: normal; }
.msg-ia-preview .chevron { transition: transform .15s; float: right; color: var(--muted); }
.msg-ia-preview.ouvert .chevron { transform: rotate(180deg); }
.msg-ia-actions { display: none; gap: 8px; margin-top: 8px; }
.msg-ia-preview.ouvert .msg-ia-actions { display: flex; }
.tache-droite { flex: none; display: flex; align-items: center; gap: 8px; }
.btn-appel { width: 36px; height: 36px; border-radius: 50%; background: var(--ok); color: #fff; border: 0;
             display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.btn-appel svg { width: 16px; height: 16px; }
.btn-appel.desactive { background: var(--line); color: var(--muted); pointer-events: none; }
.btn-kebab { width: 30px; height: 30px; border-radius: 8px; background: none; border: 0; color: var(--muted);
             cursor: pointer; font-size: 18px; line-height: 1; position: relative; }
.btn-kebab:hover { background: var(--bg); }
.kebab-menu { display: none; position: absolute; right: 0; top: 34px; background: #fff; border: 1px solid var(--line);
              border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 180px; z-index: 5; text-align: left; }
.kebab-menu.ouvert { display: block; }
.kebab-menu button, .kebab-menu a { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0;
    background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-decoration: none; }
.kebab-menu button:hover, .kebab-menu a:hover { background: var(--bg); }

/* Cartes colonne droite */
.card-alerte { background: var(--cat-urgent-bg); border-color: #f7c7d2; }
.card-alerte-tete { display: flex; align-items: center; gap: 8px; color: var(--cat-urgent); font-weight: 800; font-size: 15px; }
.card-alerte-sous { color: #a8324b; font-size: 13px; margin-top: 4px; }
.card-verte { background: var(--cat-commission-bg); border-color: #bfe9d3; }
.card-verte-tete { display: flex; align-items: center; gap: 8px; color: var(--cat-commission); font-weight: 800; font-size: 15px; }
.card-verte-sous { color: #0d6b46; font-size: 13px; margin-top: 4px; }
.top3-liste { list-style: none; margin: 10px 0 0; padding: 0; }
.top3-liste li { padding: 9px 0; border-top: 1px solid var(--line); }
.top3-liste li:first-child { border-top: 0; }
.top3-ligne { display: flex; align-items: center; gap: 8px; }
.top3-rang { width: 20px; font-weight: 800; color: var(--muted); font-size: 13px; }
.top3-nom { flex: 1; font-size: 13.5px; font-weight: 600; }
.top3-nom .vous { color: var(--primary); }
.top3-barre { height: 6px; background: #E9ECF5; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.top3-barre-remplie { height: 100%; background: var(--violet-ia); border-radius: 4px; }

/* Bas de page : produits + stats */
.souscarte-tabs { display: flex; gap: 6px; margin: 10px 0 12px; flex-wrap: wrap; }
.souscarte-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px;
    font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.souscarte-tabs button.active { background: var(--text); color: #fff; border-color: var(--text); }
.produits-carousel { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.produit-card { flex: none; width: 148px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.produit-card .vignette { width: 100%; height: 90px; border-radius: 8px; background: var(--bg); display: flex;
    align-items: center; justify-content: center; font-weight: 800; color: var(--muted); font-size: 20px; overflow: hidden; position: relative; }
.produit-card .vignette img { width: 100%; height: 100%; object-fit: cover; }
.produit-badge-neuf { position: absolute; top: 6px; left: 6px; background: var(--violet-ia); color: #fff;
    font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.produit-card .nom { font-size: 12.5px; font-weight: 600; margin-top: 8px; line-height: 1.3; }
.produit-card .commission { font-size: 12px; font-weight: 700; color: var(--ok); margin-top: 3px; }
.produit-card .lien { font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 600; margin-top: 6px; display: block; }
.stats-chart { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.stats-mois { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.stats-barres { display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.stats-barres .barre { width: 12px; border-radius: 4px 4px 0 0; }
.stats-barres .barre.valide { background: var(--violet-ia); }
.stats-barres .barre.paye { background: var(--ok); }
.stats-mois .lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.stats-legende { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.stats-legende span { display: flex; align-items: center; gap: 5px; }
.stats-legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Cartes tâches (taches.php — conservées, recolorées) */
/* Bordure renforcée (retour utilisateur 27/09/2026 vague 3) : la bande de catégorie à gauche (plus bas
   dans ce fichier) distingue le TYPE de carte, mais pas la limite haut/bas entre deux cartes qui se
   suivent en scrollant — c'est ce contour général, trop discret à 1px/#CDD3E6, qui doit être renforcé. */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
        box-shadow: 0 1px 3px rgba(26,33,51,.08), 0 8px 22px rgba(26,33,51,.10); border: 1.5px solid #A7B1CE;
        transition: opacity .2s, transform .3s ease, max-height .26s ease, margin-bottom .26s ease,
                    padding-top .26s ease, padding-bottom .26s ease, border-width .26s ease; }
.card.done { opacity: .55; }
/* Disparition différée après "Traité" (fondu + glissement, puis réduction de hauteur en JS) */
.card.tache.disparition { opacity: 0; transform: translateX(16px); }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.badge { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.badge-cat-urgent, .cat-urgent { color: var(--cat-urgent); }
.badge-cat-important, .cat-important { color: var(--cat-important); }
.badge-cat-journalier, .cat-journalier { color: var(--cat-journalier); }
.badge-cat-urgent { background: var(--cat-urgent-bg); }
.badge-cat-important { background: var(--cat-important-bg); }
.badge-cat-journalier { background: var(--cat-journalier-bg); }

/* Carte groupée par client (_carte_groupe_taches.php, correctif 27/09/2026 vague 2 point 3) : un
 * client = une seule carte visible même avec plusieurs tâches dans la même catégorie. Chaque tâche
 * garde .card.tache (mêmes classes, même JS traité/note/disparition que la carte simple) mais sans
 * sa propre boîte — juste un séparateur entre deux tâches d'un même client. */
.carte-groupe { scroll-margin-top: 16px; } /* air au-dessus quand on arrive via #client-<id> */
.carte-groupe .card.tache { box-shadow: none; border: 0; border-radius: 0; margin: 12px 0 0; padding: 0;
                             background: transparent; }
.carte-groupe .card.tache + .card.tache { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.motif { margin: 10px 0 6px; }

/* Format "3 niveaux" baisse_ca / relance_pure (27/09/2026, motif_niveaux() dans lib.php) : titre en
   langage courant, enjeu chiffré en gras avec indicateur, détail statistique replié. */
.motif-titre { font-size: 14px; margin: 10px 0 2px; }
.motif-enjeu { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 2px 0 6px; }
.motif-enjeu-urgent { color: var(--cat-urgent); }
.motif-enjeu-important { color: var(--cat-important); }
.motif-detail { margin: 2px 0 8px; }
.motif-detail summary { color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 0; }
.motif-detail[open] summary { color: var(--text); margin-bottom: 2px; }
.motif-detail-texte { color: var(--muted); font-size: 13px; margin: 0; }
.suggestion { background: #f0f7ff; border-radius: var(--radius-sm); padding: 8px 10px; font-size: 14px; }

/* Distinction plus marquée entre cartes en scrollant (retour utilisateur 27/09/2026) : bande de couleur
 * à gauche reprenant la catégorie déjà calculée par le moteur (jamais recalculée ici, section 4
 * CLAUDE.md), pour repérer une carte au premier coup d'œil sans devoir relire le badge texte. */
article.card.tache { border-left: 4px solid var(--line); }
article.card.tache[data-categorie="urgent"] { border-left-color: var(--cat-urgent); }
article.card.tache[data-categorie="important"] { border-left-color: var(--cat-important); }
article.card.tache[data-categorie="journalier"] { border-left-color: var(--cat-journalier); }
/* Carte Mission autonome (onglet Missions, _carte_tache.php) : encart violet immédiatement reconnaissable,
 * en plus de la bande de catégorie ci-dessus. */
article.card.tache[data-type="mission"] { border-color: var(--cat-mission);
    background: linear-gradient(180deg, var(--cat-mission-bg) 0%, var(--card) 110px); }
/* Sous-tâche Mission à l'intérieur d'une carte groupée (client ayant aussi une autre tâche visible) :
 * encart tinté ET bordé (renforcé le 27/09/2026 vague 3, retour "particulièrement les cartes Mission") —
 * un encadré violet complet plutôt qu'un simple fond, pour rester repérable même sur un petit écran. */
.carte-groupe .card.tache[data-type="mission"] { background: var(--cat-mission-bg); border-radius: var(--radius-sm);
    padding: 12px 14px !important; margin-top: 12px !important; border: 1.5px solid var(--cat-mission) !important; }

.produits { border-top: 1px solid var(--line); margin-top: 8px; }
.produit { padding: 8px 0; border-bottom: 1px solid var(--line); }
.produit-nom { font-weight: 700; font-size: 14px; }
.produit-info { color: var(--muted); font-size: 13px; }

/* Motif silence_produit refait le 27/09/2026 vague 3 (correctif "mur de texte illisible") : titre court
   en une ligne + liste verticale un produit par ligne, plutôt qu'une seule phrase à rallonge avec "; ". */
.motif-resume { font-weight: 700; font-size: 14px; margin: 10px 0 6px; }
.produits-silence { display: flex; flex-direction: column; }
.produit-silence-ligne { padding: 6px 0; border-bottom: 1px solid var(--line); }
.produit-silence-nom { font-weight: 600; font-size: 13.5px; }
.produit-silence-detail { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.produits-silence-plus summary { font-size: 12.5px; padding: 6px 0; }
.produits-silence-plus[open] summary { margin-bottom: 0; }
details summary { cursor: pointer; color: var(--text); font-weight: 600; padding: 8px 0; font-size: 14px; }
.json { white-space: pre-wrap; font-size: 12px; background: #f7f7f5; padding: 8px; border-radius: var(--radius-sm); overflow-x: auto; }
/* Détail replié par défaut (liste de produits, infos techniques) : carte lisible en un coup d'œil,
 * fiche complète accessible d'un clic (règle transversale section 4 CLAUDE.md). */
.produits-detail summary { color: var(--muted); font-size: 13px; }
.produits-detail[open] summary { color: var(--text); margin-bottom: 2px; }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.done-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700;
               padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: #fff; }
.done-toggle input { width: 20px; height: 20px; accent-color: var(--text); }
.status { font-size: 13px; color: var(--muted); font-weight: 600; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
/* Audit UX externe (27/09/2026), §C.9/§F.20 : "Note" n'était qu'un placeholder (disparaissait dès la
   première frappe) — libellé visible et stable au-dessus du champ. Réutilisée par la note unique du
   formulaire de résultat depuis la Passe 2 (.resultat-note-globale, plus haut) — .note/.note-champ
   (ancienne case indépendante par sous-tâche) retirées avec elle. */
.note-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

.progress { height: 12px; background: #E9ECF5; border-radius: 6px; overflow: hidden; margin: 16px 0 6px; }
.progress-bar { height: 100%; background: var(--cat-commission); border-radius: 6px; }

/* Bannière de célébration */
.celebration { display: flex; align-items: center; gap: 10px; background: var(--cat-commission-bg);
    border: 1px solid #bfe9d3; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.celebration-emoji { font-size: 20px; }
.celebration-texte { flex: 1; color: var(--cat-commission); font-weight: 600; }
.celebration.parti { display: none; }

/* Éditeur de message (vague 3) : styles .editeur-* en fin de fichier. */

/* Bouton violet « généré par l'IA » (fiche produit, retirée en vague 4) */
.btn-ia { border-color: var(--violet-ia); color: var(--violet-ia); }
.btn-ia:hover { background: var(--type-mission-bg); }

/* Profil relationnel */
.profil { margin-top: 14px; padding: 12px; border: 1px dashed #cfd3e2; border-radius: var(--radius-sm); background: #FAFBFE; }
.profil-titre { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.seg { display: inline-flex; margin: 0 6px 8px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 12px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--text); color: #fff; }
.profil-bas { display: flex; gap: 8px; flex-wrap: wrap; }
/* §J point 13 : un <input> a une largeur minimale intrinsèque (UA stylesheet) que flex-shrink ne
   réduit pas sans min-width:0 — sur mobile, ça poussait le bouton "Enregistrer" hors de la carte. */
.profil-bas input { flex: 1 1 160px; min-width: 0; padding: 9px 11px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; font-size: 14px; }
.profil-bas .js-profil-save { flex: 0 0 auto; }
.profil-resume { margin-top: 10px; }
[hidden] { display: none !important; }

/* Carte tâche unique (taches.php) */
.card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.card-dates { margin-left: auto; }
.pastille-relation { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px;
                     background: var(--bg); font-size: 12px; font-weight: 700; }

/* Carte compacte (Passe 2, point 17, 27/09/2026) — habillage seulement, logique/RPC inchangées.
   Reprend le vocabulaire de la maquette v2 (~/Desktop/relance-audit/maquette_carte_compacte_*.html,
   hors dépôt car elle contenait des données réelles), classes préfixées c- pour ne jamais entrer en
   collision avec les classes existantes (.card-top, .contact...) réutilisées ailleurs (Missions). */
.c-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-nom { font-size: 16px; font-weight: 800; margin: 0 0 0 2px; }
.c-nom a { color: inherit; text-decoration: none; }
.c-nom a:hover { text-decoration: underline; }
.c-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.c-appeler { display: inline-flex; align-items: center; gap: 6px; background: var(--ok); color: #fff;
             border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px;
             font-weight: 700; text-decoration: none; }
.c-motif { font-size: 14px; font-weight: 600; margin: 8px 0 2px; line-height: 1.35; }
.c-stats { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.c-commission { color: var(--ok); font-weight: 700; }
.c-ligne-secondaire { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted);
                      padding: 5px 0; border-top: 1px dashed var(--line); }
.c-ligne-secondaire .lbl { flex: none; font-weight: 700; color: var(--text); min-width: 92px; }
.c-ligne-secondaire a { color: var(--primary); }
.c-email-ligne { word-break: break-word; }
.c-plus { margin-top: 8px; }
.c-plus summary { list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--primary);
                  display: flex; align-items: center; gap: 5px; padding: 6px 0; }
.c-plus summary::-webkit-details-marker { display: none; }
.c-plus summary::before { content: '▸'; font-size: 10px; transition: transform .15s; }
.c-plus[open] summary::before { transform: rotate(90deg); }
.c-plus-corps { padding: 8px 2px 2px; }
.c-sous-tache { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.c-sous-tache:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.resultat-note-globale { margin: 10px 0; }
.resultat-note-globale textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
                                  padding: 8px 10px; font: inherit; font-size: 13px; resize: vertical; min-height: 46px; }

/* Fiche client minimale, lecture seule (Passe 2, point 18) */
.produits-fiche, .interactions-fiche { list-style: none; margin: 0; padding: 0; }
.produit-fiche-ligne, .interaction-fiche-ligne { padding: 10px 0; border-top: 1px solid var(--line); }
.produits-fiche li:first-child, .interactions-fiche li:first-child { border-top: 0; padding-top: 0; }
.produit-fiche-nom { font-weight: 700; display: block; margin-bottom: 2px; }

/* Tableau de bord : indicateurs compactés sur une ligne (Passe 2, point 17) */
.kpis-ligne { display: flex; flex-wrap: wrap; gap: 14px 24px; background: var(--card); border: 1px solid var(--line);
             border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow-sm); font-size: 13px; }
.kpi-mini { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.kpi-mini b { color: var(--text); font-size: 14px; margin-left: 2px; }
.kpi-mini svg { width: 14px; height: 14px; }

/* Clients */
.search { margin-bottom: 6px; }
.client-list { list-style: none; margin: 0; padding: 0; background: var(--card);
               border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.client-row { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.client-row:last-child { border-bottom: 0; }
.client-main { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* Ancien système d'onglets internes (encore utilisé le temps de la migration de taches.php) */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.topbar-inner strong { font-weight: 800; letter-spacing: -.01em; }
.topbar-inner .user { margin-left: auto; color: var(--muted); font-size: 13px; overflow: hidden;
                      text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; }
.tabs { max-width: 1180px; margin: 0 auto; display: flex; padding: 0 16px; }
.tab { flex: none; border: 0; background: none; padding: 12px 14px; font: inherit; font-weight: 700;
       color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
.count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px;
         background: var(--bg); font-size: 12px; font-weight: 700; color: var(--text); }
.section { display: none; }
.section.active { display: block; }
.section-title { font-size: 20px; margin: 8px 0 14px; }

/* ==================== Catalogue produits (section 10.7, correctif 27/09/2026) ====================
 * Structure reprise du canvas de référence (grille de cartes, "Ce qu'il faut retenir", infos
 * techniques) — habillée avec la palette et les composants déjà en place (badges, .card, .chip),
 * pas la police/couleurs du canvas (choix validé le 27/09/2026, cohérence avec dashboard.php/taches.php). */
.rupture-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
                   font-weight: 600; margin: -4px 0 14px; cursor: pointer; user-select: none; }
.rupture-toggle input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.produits-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.produit-carte { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
                  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
                  text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.produit-carte:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.produit-image { height: 140px; flex: none; background: #F0EBFA; display: flex; align-items: center;
                  justify-content: center; color: #B7A6DE; }
.produit-image img { width: 100%; height: 100%; object-fit: contain; }
.produit-corps { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.produit-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-nouveaute { color: var(--produit); background: var(--produit-bg); }
.badge-commissionne { color: var(--orange); background: var(--type-baisse-bg); }
.badge-rupture { color: var(--cat-urgent); background: var(--cat-urgent-bg); }
.produit-nom-carte { font-size: 14px; font-weight: 700; line-height: 1.3; }
.produit-meta-carte { font-size: 12px; color: var(--muted); }
.produit-carte .btn { margin-top: auto; }

/* Fiche produit (produit.php) */
.fiche-produit-image { height: 220px; background: #F0EBFA; border-radius: var(--radius); display: flex;
                        align-items: center; justify-content: center; color: #B7A6DE; margin-bottom: 16px; }
.fiche-produit-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fiche-produit-prix { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 16px; }
.fiche-produit-prix .montant { font-size: 22px; font-weight: 800; }
.retenir { background: #FFF7EC; border: 1px solid #FBE6C6; border-radius: var(--radius-sm);
           padding: 15px 17px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.retenir-titre { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
                 color: #92650B; text-transform: uppercase; letter-spacing: .03em; }
.retenir ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px;
              font-size: 13px; color: var(--text); line-height: 1.5; }
/* Message de proposition (point 4, 27/09/2026) : même gabarit que .retenir, teinte violet IA plutôt
   qu'orange pour rester cohérent avec les autres blocs générés par Claude (.msg-ia-preview, .btn-ia). */
.proposition { background: var(--type-mission-bg); border: 1px solid #E0D2FB; border-radius: var(--radius-sm);
               padding: 15px 17px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.proposition-titre { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
                      color: var(--violet-ia); text-transform: uppercase; letter-spacing: .03em; }
.proposition-texte { margin: 0; font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.fiche-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.fiche-info-bloc { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.fiche-info-bloc .label { font-size: 10.5px; color: var(--muted); }
.fiche-info-bloc .valeur { font-size: 12.5px; font-weight: 600; margin-top: 2px; }

.nav-mobile { display: none; }
.sidebar-deconnexion { display: none; }
@media (max-width: 880px) {
    /* Vague 1B (spec §4) : la navigation est dans la barre BASSE fixe (Accueil, Tâches, Catalogue, Clients) ;
       le tiroir ne garde que « Ma boutique » et « Déconnexion ». */
    .sidebar { left: -100%; z-index: 30; transition: left .2s; box-shadow: var(--shadow); }
    .sidebar.ouverte { left: 0; }
    .sidebar-nav { display: none; }
    .sidebar-boutique { margin-top: 12px; }
    .sidebar-deconnexion { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--sidebar-text); text-decoration: none;
        font-size: 14px; font-weight: 600; padding: 8px 4px; }
    body { padding-bottom: 68px; }
    .nav-mobile { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
        background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .nav-mobile a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px;
        color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 10px; }
    .nav-mobile a.actif { color: var(--primary); background: var(--produit-bg); }
    .nav-mobile a .sidebar-badge { position: absolute; top: 0; right: 14%; margin: 0; }
    .tbl-row.ouvert > .tbl-detail { bottom: 0; }
    body.panneau-ouvert .nav-mobile { display: none; }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
        border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
    /* Sidebar hors écran par défaut (left:-100%) : le contenu principal reprend toute la largeur,
     * pas de marge réservée à une sidebar invisible. */
    .main { margin-left: 0; }
    .container { padding: 16px; }
    /* `min-height: 0` + `height` (pas seulement `font-size`) : en dessous de 880 px, .page-head-info est souvent
       comprimé par .head-right (date, cloche, compte) au point que le titre a besoin de 3 lignes ou plus. La
       réserve de 66px vient du gabarit bureau (font-size 26px, 2 lignes) ; à 21px elle laisse ~15px de vide sous
       les 2 lignes réellement affichées, où le début d'une 3e ligne apparaît avant d'être coupé seulement au bord
       de la boîte par `overflow: hidden` — texte qui semble déborder sur les onglets en dessous. calc(1.25em * 2)
       (1.25 = line-height de h1/h2 ci-dessus) cale la réserve exactement sur 2 lignes à CETTE taille de police,
       sans vide ni 3e ligne qui dépasse. */
    .page-head h1 { font-size: 21px; min-height: 0; height: calc(1.25em * 2); }
    .produits-grille { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .fiche-infos { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Résultat d'interaction (remplace la case "Traité"), CLAUDE.md section "Cycle de vie d'une tâche
   par résultat d'interaction" — _formulaire_resultat.php, câblé dans taches.php.
   --------------------------------------------------------------------------- */
.lien-discret { font-size: 13px; color: var(--muted); text-decoration: underline; }
.lien-discret:hover { color: var(--text); }

.resultat-bloc { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.resultat-sous-taches { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
    font-size: 13px; color: var(--muted); }
.resultat-sous-taches-titre { font-weight: 700; color: var(--text); }
.resultat-sous-tache { display: flex; align-items: center; gap: 6px; }
.resultat-fait { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.resultat-formulaire { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.resultat-etape-titre { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    color: var(--muted); margin-bottom: 6px; }
.resultat-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.js-rf-resultat.selectionne { background: var(--primary); border-color: var(--primary); color: #fff; }
.resultat-sous-choix select, .resultat-champ input:not([type=checkbox]), .resultat-champ select, .resultat-champ textarea {
    width: 100%; max-width: 320px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px;
    font: inherit; background: #fff; color: var(--text); }
.resultat-champ { margin-top: 8px; }
.resultat-champ label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
/* §J point 12 : un espace visible entre le texte du libellé ("Note", "Type"…) et son champ — sans ça,
   un textarea (plus haut/prégnant qu'un select) semblait accolé à son étiquette plutôt que dessous. */
.resultat-champ label > input, .resultat-champ label > select, .resultat-champ label > textarea { margin-top: 4px; }
/* Case à cocher (ex. "Urgent", formulaire Problème, §C.2h) : la règle générique ci-dessus stylait le
   checkbox comme un champ texte pleine largeur (320px, fond blanc, bordure) — corrigé en l'excluant
   ci-dessus et en alignant sa propre étiquette en ligne plutôt qu'en bloc. */
.resultat-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.resultat-check input[type=checkbox] { width: auto; margin: 0; }
.resultat-raccourcis { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.resultat-confirmation-double { color: var(--err); font-weight: 700; }
.resultat-confirmation-double input { max-width: 200px; margin-top: 6px; }
.resultat-conseq { padding: 10px 12px; border-radius: 8px; background: var(--cat-commission-bg);
    color: var(--ok); font-size: 13px; font-weight: 600; }
/* 3e test navigateur réel (27/09/2026) : avant qu'une simulation confirmée n'existe (formulaire pas
   assez rempli, ou calcul en cours), l'encadré doit rester neutre (gris) — le vert de succès est
   réservé à un aperçu réellement confirmé par la RPC. */
.resultat-conseq.neutre { background: var(--bg); color: var(--muted); font-weight: 400; }
/* §C.2g : un message d'erreur/vérification dans cet encadré ne doit jamais garder le style vert de
   succès de la simulation — rouge/orange dédiés, jamais de texte technique brut (voir action.php). */
.resultat-conseq.err { background: #fdecea; color: var(--err); }
.resultat-actions { display: flex; gap: 8px; align-items: center; }
.resultat-actions .js-rf-valider:disabled { opacity: .5; cursor: not-allowed; }
.status.err { color: var(--err); }
.status.warn { color: var(--warn, #b45f06); }

/* Bandeau global persistant (§J point 2, remplace le bandeau/lien "Corriger" qui vivaient dans la
   carte — voir _formulaire_resultat.php et taches.php). Toujours en haut de la liste, indépendant du
   cycle de vie d'une carte précise. */
.bandeau-global { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; background: var(--cat-commission-bg);
    color: var(--ok); font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.bandeau-global.err { background: #fdecea; color: var(--err); }
.bandeau-global.warn { background: #fff4e5; color: var(--warn, #b45f06); }
.bandeau-global-texte { flex: 1 1 240px; }
.bandeau-global-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bandeau-global-fermer { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer;
    color: inherit; opacity: .6; padding: 2px 4px; }
.bandeau-global-fermer:hover { opacity: 1; }

.resultats-recents { margin-bottom: 12px; font-size: 13px; }
.resultats-recents summary { cursor: pointer; font-weight: 700; color: var(--text); }
.resultats-recents-liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.resultat-recent { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 10px;
    background: var(--bg); border-radius: 8px; }
.resultat-recent-client { font-weight: 600; }
.resultat-recent-libelle { color: var(--muted); }

/* =====================================================================================
   Nouvelle direction visuelle — Passe D1 (27/09/2026, design_ref/cible_*.png) : tableau de bord
   (Programme du jour, tableau « Mes tâches du jour », Prochain client) et page « Mes tâches »
   (tableau pleine largeur, lignes = cartes client, détail replié). Habillage uniquement.
   ===================================================================================== */

/* Panneaux avec icône de titre */
.panel-tete-icone { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-tete-icone h2 { font-size: 17px; }
.panel-tete-icone .sous-titre { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.panel-tete-icone .lien { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; }
.tete-icone { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tete-icone.bleu { background: var(--produit-bg); color: var(--primary); }
.tete-icone.bleu-clair { background: var(--produit-bg); color: var(--primary); }
.tete-icone.vert { background: var(--cat-commission-bg); color: var(--ok); }
.taches-tete-nb { color: var(--muted); font-weight: 600; font-size: 15px; }

/* Programme du jour : 3 tuiles + progression */
.programme-corps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(200px, 1.1fr); gap: 12px; align-items: stretch; }
.tuile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; text-decoration: none; color: var(--text);
         border: 1px solid transparent; transition: transform .1s, box-shadow .15s; }
.tuile:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tuile > svg:last-child { margin-left: auto; color: var(--muted); flex: none; }
.tuile-icone { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tuile-corps { display: flex; flex-direction: column; min-width: 0; }
.tuile-label { font-size: 13px; font-weight: 700; }
.tuile-nombre { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.tuile-sous { font-size: 12px; color: var(--muted); }
.tuile-urgent { background: var(--cat-urgent-bg); } .tuile-urgent .tuile-icone { background: var(--cat-urgent); } .tuile-urgent .tuile-label { color: var(--cat-urgent); }
.tuile-important { background: var(--cat-important-bg); } .tuile-important .tuile-icone { background: var(--cat-important); } .tuile-important .tuile-label { color: var(--cat-important); }
.tuile-journalier { background: var(--cat-journalier-bg); } .tuile-journalier .tuile-icone { background: var(--cat-journalier); } .tuile-journalier .tuile-label { color: var(--cat-journalier); }
.progression { padding: 10px 4px 6px 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.progression-titre { font-size: 14px; font-weight: 700; }
.progression-nb { font-size: 13px; color: var(--muted); }
.progression-nb strong { color: var(--text); font-size: 18px; font-weight: 800; }
.progression-barre { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.progression-barre .progress { flex: 1; margin: 0; height: 8px; }
.progress-bleue .progress-bar { background: var(--primary); }
/* Point 18 (audit D2) : « Ma progression » reste À CÔTÉ des tuiles tant que la colonne droite existe
   (≥ 1200 px) ; les tuiles se compactent au lieu de repousser la progression dessous. */
@media (max-width: 1400px) {
    .programme-corps { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(150px, .9fr); gap: 8px; }
    .tuile { padding: 10px; gap: 8px; }
    .tuile-icone { width: 32px; height: 32px; }
    .tuile-nombre { font-size: 24px; }
    .tuile-sous { display: none; }
    .tuile > svg:last-child { display: none; }
    .progression { padding-left: 10px; }
}
@media (max-width: 1199px) { .programme-corps { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(180px, 1fr); }
    .tuile-sous, .tuile > svg:last-child { display: initial; } }
@media (max-width: 700px) { .programme-corps { grid-template-columns: 1fr; } }

/* Onglets-pastilles (dashboard + Mes tâches) */
.tbl-onglets { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-pill { border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px 12px; font: inherit;
            font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
            min-height: var(--cible-min); text-decoration: none; }
.tab-pill:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tab-pill:hover { background: var(--bg); }
.tab-pill.active { background: var(--produit-bg); color: var(--primary); border-color: #c7d8f8; }
.tab-pill .count { background: rgba(26,33,51,.06); color: inherit; }
.tab-pill.active .count { background: #fff; }

.tbl-barre { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; flex-wrap: wrap; }
/* Point 16 (audit D2) : la rangée de pastilles ne rétrécit jamais sous son contenu (le champ de recherche
   passe à la ligne à la place) ; si la fenêtre est plus étroite que les pastilles elles-mêmes, elle défile. */
.tbl-barre .tbl-onglets { flex: 1 0 auto; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; }
.tbl-barre .tbl-onglets::-webkit-scrollbar { display: none; }
.tbl-barre .tab-pill { white-space: nowrap; flex: none; }
.tbl-onglets-sep { flex: 1 0 12px; height: 22px; border-right: 1px solid var(--line); margin-right: 6px; }
.tbl-recherche { display: flex; align-items: center; gap: 8px; margin: 0; flex: 0 1 260px; background: var(--bg);
                 border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--muted); font-weight: 400; }
.tbl-recherche input { border: 0; background: transparent; padding: 9px 0; font: inherit; font-size: 13px; width: 100%; min-width: 0; }
.tbl-recherche input:focus { outline: none; }
.tbl-recherche:focus-within { outline: 2px solid var(--primary); outline-offset: -1px; }

/* Tableau (grille CSS, pas <table> : chaque ligne reste un <article class="carte-groupe"> pour le JS) */
.tbl { margin-top: 10px; border-top: 1px solid var(--line); }
.tbl-head, .tbl-ligne { display: grid; align-items: center; gap: 12px; padding: 12px 2px; }
.tbl-dashboard .tbl-head, .tbl-dashboard .tbl-ligne { gap: 10px;
    grid-template-columns: 82px minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.2fr) 118px; }
.tbl-taches .tbl-head, .tbl-taches .tbl-ligne { gap: 8px;
    grid-template-columns: 82px minmax(160px, 1.1fr) minmax(200px, 1.5fr) minmax(160px, 1.2fr) 124px; }
.tbl-head .td-actions { overflow: visible; }
.tbl-taches .btn-appeler { padding: 8px 10px; }
/* Vague 1B : cinq colonnes seulement (spec §11) — Client ≥ 160 px, Raison ≥ 200 px, Action ≥ 160 px ; sous 1024 px
   les lignes deviennent des cartes (voir plus bas). */
.tbl-taches { overflow-x: auto; }
@media (max-width: 1100px) {
    .tbl-barre .tab-pill { padding: 7px 9px; font-size: 12.5px; }
    .tbl-barre .tab-pill .count { min-width: 18px; padding: 0 5px; font-size: 11px; }
}
.tbl-head { font-size: 12px; font-weight: 600; color: var(--muted); background: #FAFBFE; border-bottom: 1px solid var(--line); }
.tbl-head .td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-ligne { border-bottom: 1px solid var(--line); font-size: 13px; transition: background .12s; }
.tbl-ligne:hover { background: #FAFBFE; }
.tbl-ligne-lien { cursor: pointer; }
.tbl-row.selectionne > .tbl-ligne { background: var(--produit-bg); box-shadow: inset 0 0 0 1.5px var(--primary); border-radius: 10px; }

.td { min-width: 0; }
.td-client .client { font-weight: 700; font-size: 13.5px; line-height: 1.3; overflow: hidden; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }   /* point 9 du retest : 2 lignes max */
.td-client .meta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raison-titre { font-weight: 500; line-height: 1.3; }
.raison-precision { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.3; }
.td-action { color: var(--text); font-size: 13px; line-height: 1.3; }
.jamais { color: var(--cat-urgent); font-weight: 600; }
.produit-mini { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.td-produit { min-width: 0; overflow: hidden; }
.produit-mini .produit-vignette { width: 34px; height: 34px; border-radius: 8px; flex: none; color: var(--muted); }
.produit-mini .produit-vignette img { object-fit: contain; }
.produit-mini-nom { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.btn-icone { width: max(32px, var(--cible-min)); height: max(32px, var(--cible-min)); border-radius: 9px; background: var(--produit-bg); color: var(--primary); display: inline-flex;
             align-items: center; justify-content: center; text-decoration: none; flex: none; border: 0; cursor: pointer; }
.btn-icone:hover { background: #d3e2fb; }
.btn-appeler { display: inline-flex; align-items: center; gap: 6px; background: var(--ok); color: #fff; border: 0; border-radius: 9px;
               padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; flex: none;
               min-height: var(--cible-min); }
.btn-appeler:hover { background: #078f5b; }
.btn-appeler.desactive { background: var(--line); color: var(--muted); pointer-events: none; }
.btn-appeler-large { padding: 11px 22px; font-size: 14px; border-radius: 12px; }
.btn-chevron { width: max(30px, var(--cible-min)); height: max(30px, var(--cible-min)); border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
               display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; }
.btn-chevron:hover { background: var(--bg); color: var(--primary); }
.btn-chevron svg { transition: transform .15s; }
.tbl-vide { padding: 22px 10px; }
.filtre-masque, .recherche-masque { display: none !important; }

/* Ligne = carte client : plus de boîte blanche à ombre autour (la ligne vit dans le tableau) */
.tbl-row { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 0; }
.tbl-row.card { border: 0; }
.tbl-row.done > .tbl-ligne { opacity: .5; }
.card.carte-groupe.disparition { opacity: 0; transform: translateX(16px); }

.c-detail-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.c-detail-tete .meta { display: inline-flex; align-items: center; gap: 5px; }
.c-detail-tete .lien { font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; }
.tbl-detail .c-ligne-secondaire { border-top: 0; padding: 3px 0; }
.tbl-detail .resultat-bloc { margin-top: 14px; }

/* Groupe de catégorie à l'intérieur du tableau (porte les compteurs restantes/faites/réserve lus par le JS) */
.tbl .section-cat-head { margin: 0; padding: 8px 8px 6px; border-bottom: 1px solid var(--line); background: #fff; }
.tbl .section-cat-titre { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; color: var(--muted); }
.tbl .section-cat-count { font-size: 12px; font-weight: 500; }
.tbl .section-cat-head.recherche-vide { display: none; }   /* point 14 : un groupe sans résultat est masqué */

/* En-tête « Mes tâches » : icône, titre + compteur, menu Ajouter des missions */
.panel-taches { padding-top: 16px; }
.taches-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.taches-tete-icone { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--produit-bg); color: var(--primary);
                     display: flex; align-items: center; justify-content: center; }
.taches-tete-texte h2 { font-size: 20px; }
.taches-tete-texte .sous-titre { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.menu-missions-conteneur { margin-left: auto; position: relative; }
.menu-missions-conteneur .btn-primary { border-radius: 12px; padding: 11px 16px; }
.menu-missions { display: none; position: absolute; right: 0; top: 46px; z-index: 6; background: #fff; border: 1px solid var(--line);
                 border-radius: 12px; box-shadow: var(--shadow); padding: 12px; min-width: 260px; }
.menu-missions.ouvert { display: block; }
.menu-missions-groupe { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.menu-missions-groupe + .menu-missions-groupe { border-top: 1px solid var(--line); }
.menu-missions-titre { width: 100%; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.menu-missions-titre .meta { margin-left: auto; font-weight: 500; }

/* Prochain client à appeler */
.prochain { border-radius: 12px; padding: 14px; background: var(--bg); }
.prochain-urgent { background: var(--cat-urgent-bg); }
.prochain-important { background: var(--cat-important-bg); }
.prochain-journalier { background: var(--cat-journalier-bg); }
.prochain-nom { font-size: 18px; font-weight: 800; margin-top: 8px; letter-spacing: -.01em; }
.prochain-raison { margin-top: 8px; font-size: 13.5px; }
.prochain-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.prochain-actions .btn-icone { width: 38px; height: 38px; background: #fff; }
.objectif-ligne { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 2px 0 8px; }
.objectif-ligne strong { font-size: 24px; font-weight: 800; }
.objectif-pct { font-size: 20px; font-weight: 800; text-align: right; line-height: 1.1; }
.objectif-pct small { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Indicateurs du mois (bas de page) */
.kpis-bas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.kpi-variation.baisse { color: var(--cat-urgent); }

/* Responsive : < 1100 px — tableau du dashboard sans Nb cmd/Dernier contact ; < 700 px — lignes en cartes compactes */
/* < 1400 px : la colonne droite du tableau de bord passe sous la colonne gauche (le tableau garde ses
   9 colonnes sur toute la largeur) ; < 1100 px : Cmd. et Dern. contact disparaissent du tableau. */
/* Point 6 (audit D1) : colonne droite du tableau de bord conservée jusqu'à ≈ 1200 px ; tant qu'elle est
   là et que l'écran fait moins de 1700 px, les colonnes secondaires (Cmd., Dern. contact) sont masquées
   plutôt que de tronquer les noms ; sous 1200 px (pile) elles reviennent, puis disparaissent sous 1100 px. */
/* Lignes en cartes empilées (même DOM, CSS seul) : Mes tâches sous 1024 px (point 2 audit D2), tableau
   du tableau de bord sous 700 px. */
@media (max-width: 1023px) {
.tbl-taches .tbl-head { display: none; }
.tbl-taches .tbl-ligne { display: block; padding: 12px 10px; }
.tbl-taches .tbl-ligne .td { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.tbl-taches .tbl-ligne .td[data-label]::before { content: attr(data-label); flex: none; width: 140px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tbl-taches .tbl-ligne .td-priorite { display: flex; }
.tbl-taches .tbl-ligne .td-client { display: block; margin: 4px 0 6px; }
.tbl-taches .tbl-ligne .td-client::before { display: none; }
.tbl-taches .tbl-ligne .td-client .client { font-size: 16px; white-space: normal; }
.tbl-taches .tbl-ligne .td-actions { justify-content: flex-start; margin-top: 8px; }
.tbl-taches .tbl-ligne .td-raison { flex-wrap: wrap; }
.tbl-taches .tbl-ligne .td-raison .raison-titre { flex: 1 1 calc(100% - 150px); overflow-wrap: anywhere; }
.tbl-taches .tbl-ligne .td-raison .raison-precision { flex: 0 0 100%; padding-left: 150px; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
.tbl-dashboard .tbl-head { display: none; }
.tbl-dashboard .tbl-ligne { display: block; padding: 12px 10px; }
.tbl-dashboard .tbl-ligne .td { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.tbl-dashboard .tbl-ligne .td[data-label]::before { content: attr(data-label); flex: none; width: 140px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tbl-dashboard .tbl-ligne .td-priorite { display: flex; }
.tbl-dashboard .tbl-ligne .td-client { display: block; margin: 4px 0 6px; }
.tbl-dashboard .tbl-ligne .td-client::before { display: none; }
.tbl-dashboard .tbl-ligne .td-client .client { font-size: 16px; white-space: normal; }
.tbl-dashboard .tbl-ligne .td-actions { justify-content: flex-start; margin-top: 8px; }
.tbl-dashboard .tbl-ligne .td-raison { flex-wrap: wrap; }
.tbl-dashboard .tbl-ligne .td-raison .raison-titre { flex: 1 1 calc(100% - 150px); overflow-wrap: anywhere; }
.tbl-dashboard .tbl-ligne .td-raison .raison-precision { flex: 0 0 100%; padding-left: 150px; overflow-wrap: anywhere; }
    .tbl-detail { padding: 12px; }
    .taches-tete-texte h2 { font-size: 18px; }
    .menu-missions-conteneur { margin-left: 0; width: 100%; }
    .menu-missions { left: 0; right: auto; }
}

/* =====================================================================================
   Passe D2 (27/09/2026, design_ref/cible_taches_panneau.png + cible_formulaire.png) : panneau de détail
   glissant par-dessus la liste, formulaire de résultat en 3 étapes, onglets Résumé/Historique/Produits,
   fiche client. Habillage uniquement.
   ===================================================================================== */
.voile { position: fixed; inset: 0; background: rgba(26,33,51,.42); z-index: 40; opacity: 0; pointer-events: none; }
body.panneau-ouvert .voile { opacity: 1; pointer-events: auto; }
body.panneau-ouvert { overflow: hidden; }
.tbl-row > .tbl-detail { display: none; }
.tbl-row.ouvert > .tbl-detail { display: flex; flex-direction: column; position: fixed; top: 12px; right: 12px; bottom: 12px;
    width: min(720px, calc(100vw - 24px)); z-index: 50; background: var(--card); border-radius: 16px; box-shadow: 0 24px 64px rgba(26,33,51,.28);
    overflow: hidden; animation: panneau-entree .22s ease-out; }
@keyframes panneau-entree { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.panneau-barre { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.btn-nav { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font: inherit;
           font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.btn-nav:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.btn-nav:disabled { opacity: .35; cursor: default; }
.btn-nav.js-panneau-suiv { margin-left: auto; color: var(--primary); }
.btn-fermer { margin-left: 4px; width: 34px; height: 34px; justify-content: center; padding: 0; }
.panneau-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 20px; }
/* Point 7 du retest : [priorité + nom + n°·boutique] | [téléphone / email] | [Appeler / Copier l'email],
   comme sur la cible. */
.panneau-tete { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: start; }
.panneau-tete-gauche { grid-column: 1; min-width: 0; }
.panneau-tete-contacts { grid-column: 2; display: flex; flex-direction: column; gap: 6px; padding-top: 30px; min-width: 0; max-width: 240px; }
.panneau-tete-actions { grid-column: 3; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding-top: 26px; }
.panneau-tete-actions .btn { border-radius: 12px; justify-content: center; }
.btn-copier-email { min-width: 156px; white-space: nowrap; }
.panneau-nom { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 2px; overflow-wrap: anywhere; }
.pill-contact { display: inline-flex; align-items: center; gap: 6px; background: var(--produit-bg); color: var(--primary); border-radius: 10px;
                padding: 7px 11px; font-size: 13px; font-weight: 600; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.pill-contact.desactive { background: var(--line); color: var(--muted); pointer-events: none; }   /* compte non suivi (0037) */
.panneau-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }   /* fiche_client.php */
.panneau-reperes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tuile-stat { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.tuile-stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tuile-stat small { font-size: 11px; color: var(--muted); font-weight: 600; line-height: 1.25; }   /* point 7 : texte sur 2 lignes si besoin */
.tuile-stat strong { font-size: 14px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.tuile-stat strong.muted { color: var(--muted); font-weight: 600; }
.tuile-stat-icone { flex: none; width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.tuile-stat-icone.bleu { background: var(--produit-bg); color: var(--primary); }
.tuile-stat-icone.violet { background: var(--type-mission-bg); color: var(--violet-ia); }
.tuile-stat-icone.vert { background: var(--cat-commission-bg); color: var(--ok); }
.tuile-stat-icone.gris { background: var(--bg); color: var(--muted); }
.fiche-bloc { margin-top: 14px; }
.fiche-onglets { display: flex; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; }
.fiche-onglet { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13px; font-weight: 600; min-height: var(--cible-min);
                color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fiche-onglet.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.fiche-onglet:disabled { cursor: default; }
.fiche-onglet-corps { padding: 12px 2px 2px; }
.fiche-resume { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fiche-col { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fiche-col-titre { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.fiche-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fiche-inter, .fiche-prod { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; min-width: 0; }
.fiche-inter-icone { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--produit-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.fiche-inter-corps, .fiche-prod-corps { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fiche-inter-corps .meta, .fiche-prod-corps .meta { font-size: 12px; }
.fiche-inter-note { font-size: 12.5px; color: var(--text); margin-top: 2px; }
/* Vague 3 : texte d'un message envoyé, distingué d'une note d'appel (citation, filet violet-gris de l'état « En attente ») */
.fiche-inter-message { display: block; margin-top: 4px; padding: 6px 10px; border-left: 3px solid #C9BFEA; background: #FBFAFE; border-radius: 4px; white-space: normal; }
.fiche-inter-date { flex: none; }
.fiche-prod .produit-vignette { width: 30px; height: 30px; }
.fiche-note-limite { margin-top: 10px; }
.fiche-chargement { padding: 18px 4px; }
.panneau-details { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.panneau-details summary { display: flex; align-items: center; gap: 8px; list-style: none; padding: 11px 0; font-size: 14px; }
.panneau-details summary::-webkit-details-marker { display: none; }
.panneau-details summary::after { content: '⌄'; margin-left: auto; color: var(--muted); }
.panneau-details[open] summary::after { content: '⌃'; }
.panneau-details-corps { padding: 0 0 12px; }
.tbl-detail.mode-formulaire .js-panneau-vue-detail { display: none; }

/* Formulaire de résultat en 3 étapes */
.resultat-bloc { border-top: 0; margin-top: 12px; padding-top: 0; }
.resultat-fait { padding: 14px 0 0; margin-top: 10px; }
/* Vague 1B : le bouton « Enregistrer le résultat » vit dans l'accordéon « Après l'appel » (plus de barre absolue) ;
   seule la barre Annuler / Valider du formulaire ouvert reste fixée en bas du panneau. */
.tbl-row.ouvert .resultat-actions { position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
    padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); z-index: 2; }
.tbl-detail.mode-formulaire .panneau-corps { padding-bottom: 96px; }
.tbl-detail.mode-formulaire .resultat-fait { display: none; }
.btn-vert-large { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--ok); color: #fff; border: 0;
                  border-radius: 12px; padding: 14px 18px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.btn-vert-large:hover { background: #078f5b; }
.btn-vert-large:disabled { opacity: .45; cursor: not-allowed; }
.resultat-formulaire { margin-top: 12px; padding: 0; border: 0; background: transparent; gap: 0; }
.resultat-sous-taches { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.resultat-sous-taches-titre { margin-bottom: 4px; }
.resultat-sous-tache span { color: var(--text); }
.etapes { display: flex; flex-direction: column; }
.etape { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 20px; }
.etape::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; border-left: 2px solid #D6E2F8; }
.etape:last-child::before { display: none; }
.etape-num { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 14px;
             display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.etape-corps { min-width: 0; }
/* UI2 : formulaire de résultat — numéros consécutifs des blocs visibles (un bloc masqué ne laisse aucun trou). */
.resultat-formulaire .etapes { counter-reset: rf-etape; }
.resultat-formulaire .etape:not([hidden]) { counter-increment: rf-etape; }
.resultat-formulaire .etape-num::before { content: counter(rf-etape); }
.etape-titre { font-size: 15px; font-weight: 800; }
.etape-sous { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.resultat-choix { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.resultat-grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.btn-choix { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); background: #fff;
             border-radius: 12px; padding: 12px 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; text-align: center; min-height: 74px; }
.btn-choix:hover { border-color: #c7d8f8; background: #FAFBFE; }
.btn-choix.selectionne { border-color: var(--primary); background: var(--produit-bg); color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.btn-choix-icone { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.btn-choix-icone.bleu { background: var(--produit-bg); color: var(--primary); }
.btn-choix-icone.gris { background: var(--bg); color: var(--muted); }
.btn-choix-icone.orange { background: var(--cat-important-bg); color: var(--cat-important); }
.btn-choix-icone.rouge { background: var(--cat-urgent-bg); color: var(--cat-urgent); }
.btn-choix-icone.violet { background: var(--type-mission-bg); color: var(--violet-ia); }
.resultat-grille .btn-choix { flex-direction: row; justify-content: flex-start; min-height: 0; padding: 10px 12px; text-align: left; }
.resultat-grille .btn-choix-icone { width: 26px; height: 26px; flex: none; }
.champs-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.champs-2col > div { min-width: 0; }
.resultat-champ label { font-size: 12.5px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.resultat-champ input:not([type=checkbox]), .resultat-champ select, .resultat-champ textarea { max-width: none; padding: 9px 11px; border-radius: 10px; }
.rf-produit-affiche { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.rf-produit-affiche .produit-vignette { width: 28px; height: 28px; }
.resultat-raccourcis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.btn-raccourci { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
                 padding: 8px 6px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text); cursor: pointer; }
.btn-raccourci small { font-size: 11px; font-weight: 500; color: var(--muted); }
.btn-raccourci.selectionne { border-color: var(--primary); background: var(--produit-bg); color: var(--primary); }
.resultat-note-globale { margin: 14px 0 0; }
.resultat-note-globale textarea { border-radius: 10px; min-height: 64px; }
.note-compteur { text-align: right; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.resultat-conseq { display: flex; gap: 10px; align-items: flex-start; background: var(--produit-bg); color: #0d4ea6; border: 1px solid #c7d8f8;
                   border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.resultat-conseq::before { content: 'Après validation :'; flex: none; font-weight: 800; }
.resultat-conseq.neutre::before, .resultat-conseq.err::before { content: none; }
.resultat-conseq.neutre { background: var(--bg); color: var(--muted); border-color: var(--line); font-weight: 500; }
.resultat-conseq.err { background: #fdecea; color: var(--err); border-color: #f5c2c0; }
.resultat-pas-commande { font-size: 12.5px; color: #0d4ea6; margin: -4px 0 0 14px; font-weight: 500; }
.resultat-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; align-items: stretch; background: #fff;
                    padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--line); }
.btn-annuler { justify-content: center; border-radius: 12px; font-size: 14px; }
.resultat-actions .js-rf-valider:disabled { opacity: .45; cursor: not-allowed; }
.status.js-rf-status { display: block; margin-top: 6px; }

/* Bandeau de confirmation par-dessus le panneau (même élément #bandeau-global) */
/* Point 8 (audit D2) : en BAS du panneau, juste au-dessus du bouton vert — jamais sur la barre
   Précédent / Suivant / fermer. */
body.panneau-ouvert #bandeau-global { position: fixed; top: auto; bottom: 92px; right: 24px; width: min(680px, calc(100vw - 48px)); z-index: 60;
    box-shadow: var(--shadow); border: 1px solid #bfe9d3; }
.lien-retour { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; }

/* Responsive du panneau : < 1100 px plein écran ; < 700 px grilles empilées */
@media (max-width: 1100px) {
    .tbl-row.ouvert > .tbl-detail { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
    body.panneau-ouvert #bandeau-global { bottom: 84px; right: 8px; width: calc(100vw - 16px); }
}
@media (max-width: 700px) {
    .panneau-corps { padding: 12px; }
    .panneau-tete { grid-template-columns: 1fr; }
    .panneau-tete-contacts { grid-column: 1; padding-top: 0; max-width: none; flex-direction: row; flex-wrap: wrap; }
    .panneau-tete-actions { grid-column: 1; grid-row: auto; flex-direction: row; padding-top: 0; }
    .panneau-tete-actions .btn-appeler-large { flex: 1; justify-content: center; }
    .panneau-tuiles, .panneau-reperes, .fiche-resume, .champs-2col { grid-template-columns: 1fr 1fr; }
    .resultat-choix { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .resultat-grille, .resultat-raccourcis { grid-template-columns: 1fr 1fr; }
    .panneau-nom { font-size: 19px; }
}
@media (max-width: 420px) {
    .panneau-tuiles, .panneau-reperes, .fiche-resume, .champs-2col { grid-template-columns: 1fr; }
}

/* Audit D2 : encadré « Après validation » — texte + phrase « pas comptée comme une commande » DANS l'encadré */
.resultat-conseq-corps { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.resultat-conseq .resultat-pas-commande { margin: 0; font-weight: 500; color: inherit; opacity: .85; }
/* Point 6 du retest : bandeau d'information unique, une ligne fine (≤ 32 px) */
.bandeau-fin { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; margin-bottom: 14px; border-radius: 8px;
    background: #eaf1fd; color: #0d4ea6; border: 1px solid #c7dbf7; font-size: 12.5px; font-weight: 500; overflow: hidden; }
.bandeau-fin span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bandeau-fin svg { flex: none; }
/* Point 12 : identité client alignée dans Mes clients ; point 4 : champ trouvé surligné */
.client-main { align-items: center; }
.client-ident { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.client-ident strong { line-height: 1.3; }
.client-trouve { margin-top: 4px; }
mark { background: #FFF1B8; color: inherit; border-radius: 3px; padding: 0 2px; }
/* Point 10 : produit pré-rempli, identifiant jamais affiché */
.rf-produit-zone .lien-discret { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 12px; margin: -2px 0 6px; }
.rf-produit-zone input[type=text] { margin-top: 4px; }
/* Point 8 : la colonne Dern. contact passe à la ligne plutôt que de déborder sur « Appeler » */

/* ==================== Catalogue / tarification centralisée (28/09/2026) ==================== */
.catalogue-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.catalogue-form { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 0; }
.catalogue-form .tbl-recherche { flex: 1; min-width: 0; }
.catalogue-form .count { background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
.catalogue-tarifs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
                    border-radius: 999px; padding: 6px 8px 6px 14px; box-shadow: var(--shadow-sm); }
.catalogue-tarifs-libelle { font-size: 13px; font-weight: 700; color: var(--muted); }
.chip-client { display: inline-flex; align-items: center; gap: 6px; background: var(--produit-bg); color: var(--primary); border-radius: 999px;
               padding: 5px 8px 5px 12px; font-size: 13px; font-weight: 700; }
.chip-client-general { background: var(--bg); color: var(--text); padding-right: 12px; }
.chip-client-x { border: 0; background: rgba(23,105,232,.15); color: var(--primary); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; }
.catalogue-tarifs-champ input[type=search] { width: 200px; padding: 7px 11px; border-radius: 999px; font-size: 13px; }
.catalogue-filtres { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 12px; }
.catalogue-filtres-form { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.catalogue-filtre { margin: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.catalogue-filtre select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 13px; background: #fff; }
.catalogue-filtre-case { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.catalogue-filtres-actions { display: flex; gap: 8px; align-items: center; }
.catalogue-compte { margin-left: auto; }
.tbl-catalogue .tbl-head, .tbl-catalogue .tbl-ligne { grid-template-columns: 64px minmax(200px, 2fr) minmax(170px, 1.2fr) 90px 100px 110px; gap: 12px; }
.tbl-catalogue .tbl-ligne { text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.tbl-catalogue .tbl-ligne:hover { background: #FAFBFE; }
.tbl-catalogue .produit-nom { font-weight: 700; font-size: 14px; line-height: 1.3; }
.produit-badges-mini { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.produit-badges-mini .badge { font-size: 10.5px; padding: 2px 8px; }
.produit-vignette-grande { width: 48px; height: 48px; border-radius: 10px; }
.badge-stock { color: var(--ok); background: var(--cat-commission-bg); }
.badge-inactif { color: var(--muted); background: var(--bg); }
.prix-bloc { display: inline-flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.prix-montant { font-weight: 800; font-size: 15px; }
.prix-bloque .prix-montant { color: var(--cat-urgent); font-size: 13px; }
.prix-indispo .prix-montant { color: var(--muted); font-weight: 600; font-size: 13px; }
.prix-libelle { font-size: 11px; color: var(--muted); }
.prix-general-barre { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.prix-ecart { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.prix-ecart-moins { color: var(--ok); background: var(--cat-commission-bg); }
.prix-ecart-plus { color: var(--cat-urgent); background: var(--cat-urgent-bg); }
.prix-compact .prix-general-barre, .prix-compact .prix-ecart { display: inline-block; margin-top: 2px; margin-right: 4px; }
.prix-grand .prix-montant { font-size: 24px; }
.prix-grand .prix-libelle { font-size: 12.5px; }
.prix-grand .prix-general-barre { font-size: 14px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0; }
.pagination-mini { justify-content: flex-start; margin: 10px 0 0; }
.catalogue-note { margin-top: 12px; }

/* Fiche produit (4 onglets) */
.fiche-produit-tete { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.fiche-produit-image { height: 180px; }
.fiche-produit-ident h1 { font-size: 21px; margin: 6px 0 4px; }
.fiche-produit-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.fiche-produit-prix-bloc { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; margin: 12px 0 4px; }
.fiche-produit-onglets { margin-top: 18px; }
.tuiles-produit { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tuile-mini { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.tuile-mini small { display: block; font-size: 11px; color: var(--muted); }
.tuile-mini strong { font-size: 16px; display: block; }
.tuile-mini .meta { display: block; margin-top: 2px; }
.tbl-commandes, .tbl-acheteurs { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl-commandes th, .tbl-acheteurs th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl-commandes td, .tbl-acheteurs td { padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ligne-exclue td { color: var(--muted); }
.acheteur-detail { background: #FAFBFE; }
.acheteur-detail td { padding: 10px 14px 14px; }

@media (max-width: 1100px) {
    .tbl-catalogue .tbl-head, .tbl-catalogue .tbl-ligne { grid-template-columns: 56px minmax(160px, 2fr) minmax(150px, 1.2fr) 80px 100px; }
    .tbl-catalogue .td-statut { display: none; }
}
@media (max-width: 760px) {
    .tbl-catalogue .tbl-head { display: none; }
    /* Une ligne = vignette à gauche, puis nom / prix / infos empilés (même DOM, CSS seul) — 390 px vérifié. */
    .tbl-catalogue .tbl-ligne { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px; padding: 12px 4px; }
    .tbl-catalogue .td-image { flex: 0 0 56px; }
    .tbl-catalogue .td-produit { flex: 1 1 calc(100% - 70px); min-width: 0; display: block; }
    .tbl-catalogue .td-produit .produit-badges-mini { justify-content: flex-start; }
    .tbl-catalogue .td-prix { flex: 0 0 100%; padding-left: 66px; display: block; }
    .tbl-catalogue .td-stock { padding-left: 66px; }
    .tbl-catalogue .td-stock, .tbl-catalogue .td-commission, .tbl-catalogue .td-statut { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
    .tbl-catalogue .td-stock::before { content: "Stock"; }
    .tbl-catalogue .td-commission::before { content: "· Commission"; }
    .tbl-catalogue .td-statut { flex: 0 0 100%; padding-left: 66px; }
    .fiche-produit-onglets { flex-wrap: wrap; }
    .fiche-produit-onglets .fiche-onglet { flex: 1 1 45%; }
    .catalogue-tarifs { width: 100%; border-radius: var(--radius-sm); }
    .catalogue-tarifs-champ { width: 100%; }
    .catalogue-tarifs-champ input[type=search] { width: 100%; }
    .fiche-produit-tete { grid-template-columns: 1fr; }
    .fiche-produit-image { height: 140px; }
    .tbl-commandes, .tbl-acheteurs { display: block; overflow-x: auto; white-space: nowrap; }
    .fiche-produit-prix-bloc { gap: 14px; }
}
.fiche-prod-prix { display: block; margin-top: 3px; }
.fiche-prod-prix .prix-montant { font-size: 13px; }
.produit-prix { margin: 2px 0 3px; }
.produit-prix .prix-montant { font-size: 13.5px; }

/* =====================================================================================
   Vague 1B — panneau de mission avant l'appel (spec §11-12), données observées, catégories vides.
   ===================================================================================== */
.pill-contact-groupe { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.pill-contact-groupe .pill-contact { min-width: 0; }
.btn-copier-mini { flex: none; width: max(28px, var(--cible-min)); height: max(28px, var(--cible-min)); border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted);
                   display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 10px; }
.btn-copier-mini:hover { color: var(--primary); border-color: #c7d8f8; }
.panneau-tete-actions .js-preparer-message { border-radius: 12px; justify-content: center; white-space: nowrap; }
.mission-bloc { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.mission-bloc-titre { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mission-pourquoi { background: var(--cat-important-bg); border-color: #FFD9B3; }
.mission-pourquoi .mission-bloc-titre { color: var(--cat-important); }
.mission-raison { margin: 8px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.mission-phrase { margin: 4px 0 0; font-size: 14px; color: var(--text); }
.mission-action { margin: 10px 0 0; font-size: 14.5px; }
.mission-action span, .mission-objectif span { color: var(--muted); font-weight: 600; }
.mission-objectif { margin: 4px 0 0; font-size: 14px; }
.mission-autres { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.mission-message { background: var(--msgbox-bg); border-color: #c7d8f8; }
.mission-message .msg-box { margin-top: 8px; border: 0; padding: 0; background: transparent; }
.msg-note { margin: 8px 0 0; }
.mission-produits .fiche-bloc { margin-top: 8px; }
.mission-mention { margin: 8px 0 0; font-style: italic; }
.mission-questions-liste { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.mission-questions-liste li + li { margin-top: 4px; }
.mission-questions .meta { margin-top: 6px; }
.panneau-details-observe .meta { margin: 0 0 8px; }
.observe-tache + .observe-tache { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.observe-titre { font-size: 13.5px; font-weight: 700; }
.observe-texte { margin: 4px 0 0; font-size: 13px; color: var(--text); }
.observe-produits, .observe-signaux { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.observe-produits li + li, .observe-signaux li + li { margin-top: 3px; }
.panneau-apres-appel { margin-top: 14px; border-color: #bfe9d3; }
.panneau-apres-appel > summary { font-weight: 700; color: var(--ok); }
.section-cat-nb { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--text); text-align: center; font-weight: 800; }
.tbl-cat-vide { padding: 14px 10px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.prochain-action { margin-top: 6px; font-size: 13.5px; }

/* ---------- Vague 2B : après l'appel (3 résultats, note, faits à cocher), notes confirmées ---------- */
.resultat-choix-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resultat-champ textarea.js-rf-note { width: 100%; min-height: 140px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.resultat-champ textarea.js-rf-note[readonly] { background: var(--bg); color: var(--text); }
.note-compteur { text-align: right; font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.rf-limite-gamme { margin: 0 0 10px; font-size: 12px; }
.resultat-analyse-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.rf-extraction-etat { font-size: 13px; color: var(--muted); margin: 4px 0 8px; min-height: 1.2em; }
.rf-extraction-etat.en-cours::before { content: '⟳ '; }
.rf-extraction-etat.ok { color: var(--ok); }
.rf-extraction-etat.err { color: var(--err); }
.rf-faits { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rf-fait { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.rf-fait-tete { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.rf-fait-tete input[type=checkbox] { width: auto; margin: 3px 0 0; flex: none; }
.rf-fait-type, .js-rf-fait-type { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--primary); background: var(--produit-bg); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.js-rf-fait-type { border: 1px solid var(--line); text-transform: none; letter-spacing: 0; padding: 4px 8px; }
.rf-fait-texte { flex: 1; font-size: 14px; color: var(--text); }
input.rf-fait-texte { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; font: inherit; }
.rf-fait-ne_plus_contacter { border-color: #f5b5c2; background: #fff7f8; }
.rf-fait-ne_plus_contacter .rf-fait-type { color: var(--err); background: #fdecea; }
.rf-fait-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; margin: 8px 0 0 28px; }
.rf-fait-champs label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.rf-fait-champs input, .rf-fait-champs select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; font: inherit; font-size: 13.5px; }
/* Demande de prix (25/11/2026) : choix du produit dans le catalogue (demande_prix_choix.js) */
.dp-choix-liste { list-style: none; margin: 4px 0 0; padding: 4px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; max-height: 260px; overflow-y: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.dp-choix-liste li { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; cursor: pointer; color: var(--text, #1f2937); }
.dp-choix-liste li:hover, .dp-choix-liste li:focus { background: #f1f5f9; outline: none; }
.dp-choix-nom { font-size: 13.5px; }
.dp-choix-detail { font-size: 12px; color: var(--muted); }
.dp-choix-vide { cursor: default; color: var(--muted); font-size: 12.5px; }
.dp-choix-info { grid-column: 1 / -1; margin: 0; }
.dp-choix-info.dp-choix-ok { color: #166534; }
.dp-choix-info.dp-choix-erreur { color: #b91c1c; }
.dp-mode { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.dp-mode-remise { background: #ede9fe; color: #5b21b6; }
.dp-mode-specifique { background: #e0f2fe; color: #075985; }
.dp-mode-main { background: #f3f4f6; color: #4b5563; }
.dp-app { margin-top: 6px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 12.5px; }
.dp-app-cree { background: #f0fdf4; color: #166534; }
.dp-app-attente { background: #f8fafc; color: #475569; }
.dp-app-erreur { background: #fef2f2; color: #991b1b; }
.dp-app-relancer { margin-top: 6px; }
.rf-fait-champs .resultat-confirmation-double { grid-column: 1 / -1; }
.rf-fait-champs .meta { grid-column: 1 / -1; }
.rf-fait-citation { margin: 8px 0 0 28px; padding-left: 10px; border-left: 3px solid var(--line); font-style: italic; }
.rf-fait:has(.js-rf-fait-coche:not(:checked)) { opacity: .55; }
.rf-extraction-outils { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rf-mention { margin-top: 10px; }
.resultat-conseq.avec-titre::before { content: none; }
.resultat-conseq.avec-titre { flex-direction: column; align-items: stretch; gap: 2px; }
.resultat-conseq-titre { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; opacity: .8; }
.mission-notes-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.fiche-notes .fiche-note { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.fiche-notes .fiche-note:last-child { border-bottom: 0; }
@media (max-width: 700px) {
    .resultat-choix-3 { grid-template-columns: 1fr; }
    .rf-fait-champs { grid-template-columns: 1fr; margin-left: 0; }
    .rf-fait-tete { flex-wrap: wrap; }
    .rf-fait-texte { flex-basis: 100%; }
    .rf-fait-citation { margin-left: 0; }
}

/* ------------------------------------------------------------------ */
/* Vague 3 : éditeur de message, état « En attente de réponse », boîte de confirmation */
/* ------------------------------------------------------------------ */
.editeur-msg { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.editeur-reglage { display: flex; flex-direction: column; gap: 3px; }
.editeur-reglage-titre { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.seg.seg-petit { margin: 0; }
.seg.seg-petit button { padding: 6px 10px; font-size: 12.5px; }
.profil-case { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.profil-case { margin: 2px 0 8px; }
.editeur-texte { width: 100%; min-height: 130px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; font-size: 14px; line-height: 1.5; background: #fff; color: var(--text); box-sizing: border-box; }
.editeur-texte:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.editeur-ia, .editeur-envoi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.editeur-ia .btn, .editeur-envoi .btn { background: #fff; }
/* Partie 2 du retest (12/10/2026) : bouton « English » de l'éditeur — bascule, état visible (aria-pressed), cible de
   design.css (--cible-min = --ds-bouton-h = 44 px partout depuis la refonte), jamais une valeur en dur. */
.editeur-ia .btn-langue { min-height: var(--cible-min); min-width: var(--cible-min); border-color: var(--violet-ia); color: var(--violet-ia); }
.editeur-ia .btn-langue[aria-pressed="true"] { background: var(--violet-ia); border-color: var(--violet-ia); color: #fff; }
.editeur-ia .btn-langue:focus-visible { outline: 2px solid var(--violet-ia); outline-offset: 2px; }
.editeur-envoi .btn-primary { background: var(--primary); }
.editeur-msg.occupe { opacity: .75; }
.btn-lien { border: 0; background: none !important; color: var(--primary); padding-left: 4px; padding-right: 4px; }
.btn-lien:hover { text-decoration: underline; }
.editeur-note { margin: 0; }
/* UI2 : signature du commercial (Mon profil), affichée sous le récap — ajoutée à sa fin, jamais dans la zone de texte. */
.editeur-signature { margin: -4px 0 0; overflow-wrap: anywhere; }
.editeur-signature-texte { color: var(--text); white-space: pre-line; }
/* Format par canal (12/10/2026) : objet d'un e-mail, copiable à part, au-dessus du corps. */
.editeur-objet { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.editeur-objet[hidden] { display: none; }
.editeur-objet-label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.editeur-objet-champ { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; font-size: 14px; color: var(--text); background: #fff; }
.editeur-objet-champ:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (max-width: 560px) { .editeur-objet { flex-direction: column; align-items: stretch; } }
.profil input[type="text"] { display: block; width: 100%; box-sizing: border-box; margin-bottom: 8px; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 13px; }
.profil-bas input[type="text"] { display: inline-block; margin-bottom: 0; }
/* État « En attente de réponse » : gris-violet neutre, jamais une couleur de priorité (spec §5 : état ≠ priorité). */
.badge-attente { color: #5B4B8A; background: #EEEAF7; }
.badge-attente.depassee { color: #6D7689; background: #EEF0F5; }
/* Appels visibles (08/10/2026) : « Appel non enregistré » — ambre, jamais une couleur de priorité (rouge, orange, bleu). */
.badge-non-enregistre { color: #7A4E00; background: #FFF1CC; }
.td-priorite .badge-non-enregistre { margin-top: 4px; display: inline-block; font-size: 11px; padding: 3px 8px;
    white-space: normal; max-width: 100%; line-height: 1.25; border-radius: 8px; }   /* colonne étroite : sur deux lignes */
@media (max-width: 1023px) { .tbl-ligne .td-priorite .badge-non-enregistre { margin-top: 0; } }
.bandeau-appels { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 14px;
    border: 1px solid #F2D48A; border-radius: var(--radius-sm); background: #FFF8E5; color: #5C3B00; }
.bandeau-appels-icone { flex: none; color: #B07400; line-height: 0; margin-top: 1px; }
.bandeau-appels-texte { min-width: 0; }
.bandeau-appels-texte .meta { display: block; color: #6B5320; }
.bandeau-appels-liens { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.bandeau-appels-liens a { color: #7A4E00; font-weight: 600; text-decoration: underline; overflow-wrap: anywhere; }
.appel-autre-ouvert { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); background: #FFF8E5;
    border: 1px solid #F2D48A; color: #5C3B00; font-size: 13px; }
.ap-final-manque { margin: 0; font-size: 12.5px; color: #7A4E00; font-weight: 600; }
.tbl-detail.mode-formulaire.manque-visible .panneau-corps { padding-bottom: 132px; }
/* Boutique d'un client ou d'une tâche (0037, 07/10/2026) : badge lisible, jamais une couleur de priorité */
.badge-boutique { color: var(--text); background: #EEF0F5; vertical-align: middle; }
.badge-boutique-eclope { color: var(--boutique-eclope); background: var(--boutique-eclope-bg); }
.badge-boutique-grossiste { color: var(--boutique-grossiste); background: var(--boutique-grossiste-bg); }
.badge-boutique-multivap { color: var(--boutique-multivap); background: var(--boutique-multivap-bg); }
.meta .badge-boutique { font-size: 11px; padding: 2px 8px; margin-left: 4px; }
.comptes-boutiques { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.comptes-boutiques strong { color: var(--text); }
/* Ligne du tableau : libellé court « En attente », empilé sous la priorité (colonne étroite) ; sur mobile, à côté
   avec retour à la ligne possible — jamais de débordement sur la colonne Client. */
.td-priorite .badge-attente { margin-top: 4px; display: inline-block; font-size: 11px; padding: 3px 8px; }
.tbl-ligne .td-priorite { flex-wrap: wrap; align-content: flex-start; gap: 4px; }
@media (min-width: 1024px) { .tbl-taches .tbl-ligne .td-priorite { flex-direction: column; align-items: flex-start; } }
@media (max-width: 1023px) { .tbl-ligne .td-priorite .badge-attente { margin-top: 0; } }
.section-attente-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 8px; padding: 0 4px; font-weight: 700; }
.section-attente-head .meta { font-weight: 400; flex-basis: 100%; }
.section-attente-head.filtre-masque, .section-attente-cartes.filtre-masque { display: none; }
.carte-attente .tbl-ligne { background: #FBFAFE; }
.dialogue { border: 0; border-radius: 14px; padding: 20px 22px; max-width: min(440px, calc(100vw - 32px));
    box-shadow: 0 18px 48px rgba(26, 33, 51, .25); color: var(--text); }
.dialogue::backdrop { background: rgba(26, 33, 51, .45); }
.dialogue-titre { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.dialogue-texte { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.dialogue-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 700px) {
    .editeur-ia .btn, .editeur-envoi .btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
    .editeur-envoi .status { flex-basis: 100%; }
}

/* ------------------------------------------------------------------ */
/* Administration — Campagnes Nouveautés (étape 2, 01/10/2026)          */
/* ------------------------------------------------------------------ */
.adm-refus { max-width: 520px; margin: 80px auto; padding: 0 16px; text-align: center; font-family: 'Inter', sans-serif; }
.adm-alert-ok { background: var(--cat-commission-bg); color: #066b45; border: 1px solid #bfe8d3; }
.adm-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.adm-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.adm-filtres .chip { text-decoration: none; color: inherit; font-size: 13px; padding: 6px 12px; }
.adm-filtres .chip.active { color: #fff; }
.adm-form .btn { justify-self: start; }
.adm-titre { font-size: 17px; margin-bottom: 10px; }
.adm-sous-titre { font-size: 14px; margin: 18px 0 8px; }
.adm-table-defile { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-actions { white-space: nowrap; }
.adm-actions .btn, .adm-actions form { margin: 2px 4px 2px 0; }
.adm-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.adm-inline input[type=text], .adm-inline select, .adm-form input[type=text], .adm-form select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }
.adm-form { display: grid; gap: 6px; max-width: 560px; }
.adm-form label, .adm label[for=objectif], .adm label[for=ajout-produit], .adm label[for=ajout-client], .adm label[for=recherche-produit] { font-weight: 600; font-size: 13px; }
.adm-form .meta { margin: 0 0 8px; }
.adm-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.adm-bas { justify-content: flex-end; margin: 4px 0 18px; }
.adm-recherche { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.adm-recherche .tbl-recherche { flex: 1; min-width: 220px; }
.adm-etapes { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; }
.adm-etape { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); min-height: var(--cible-min);
             color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.adm-etape-num { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); font-weight: 700; font-size: 12px; }
.adm-etape.passee { color: var(--text); }
.adm-etape.actif { background: var(--primary); border-color: var(--primary); color: #fff; }
.adm-etape.actif .adm-etape-num { background: rgba(255,255,255,.2); }
.adm-rappel { margin: 0 0 14px; }
.adm-produit { display: flex; gap: 12px; align-items: flex-start; }
.adm-produit-img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; flex: none; }
.adm-produit-img-vide { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.adm-produit-corps { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.adm-grille-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.adm-etat { font-size: 12px; font-weight: 600; }
.adm-etat-actif { color: var(--ok); }
.adm-etat-inactif, .adm-etat-absent { color: var(--err); }
.adm-chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--relance-bg); color: var(--text); }
.adm-chip-ia { background: var(--type-mission-bg); color: var(--violet-ia); }
.adm-alerte { color: var(--err); font-size: 13px; font-weight: 600; }
.adm-periode { font-weight: 600; margin: 4px 0; }
.adm-statut { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.adm-statut-brouillon { background: var(--relance-bg); color: var(--text); }
.adm-statut-publiee { background: var(--cat-journalier-bg); color: var(--primary); }
.adm-statut-terminee { background: var(--cat-commission-bg); color: #066b45; }
.adm-statut-annulee { background: var(--cat-urgent-bg); color: var(--err); }
.adm-objectif { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.adm-apercu { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: #FAFBFD; }
.adm-apercu ul { margin: 6px 0 0; padding-left: 18px; }
.adm-apercu-tete { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.adm-recap { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 8px 16px; margin: 0; }
.adm-recap dt { color: var(--muted); font-size: 13px; }
.adm-recap dd { margin: 0; }
.adm-liste { margin: 6px 0 0; padding-left: 18px; }
.adm-entete-campagne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.adm-kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; }
.adm-kpi-val { font-size: 22px; font-weight: 700; }
.adm-btn-danger { border-color: var(--err); color: var(--err); }
.adm-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adm-pagination button.chip { font: inherit; font-size: 13px; padding: 6px 12px; cursor: pointer; color: inherit; }
.adm-pagination button.chip.active { color: #fff; }
/* Lot de corrections du 01/10/2026 : un formulaire par page, Entrée = action sûre, page 2 en listes, période, messages */
.adm-entree { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.adm-label { font-weight: 600; font-size: 13px; margin-top: 6px; }
.adm-grille-item { cursor: pointer; }
.adm-grille-item.adm-choisi { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.adm-choix { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.adm-liste-produits { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.adm-liste-produits li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.adm-liste-produits li > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.adm-periode-choix { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.adm-periode-choix input[type=date] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
/* Page 5 : un message pour tous les clients en Message + aperçu (cinquième lot) ; page 3 : liste vide expliquée */
.adm-modele-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-modele-champs { display: grid; gap: 8px; }
.adm-modele-champs label { display: grid; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-modele-champs textarea { padding: 7px 10px; border: 1px solid var(--line);
    border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); width: 100%; box-sizing: border-box; resize: vertical; }
.adm-modele-champs code { font-size: 12px; background: #F1F3F8; border-radius: 4px; padding: 0 4px; }
.adm-modele-refuse textarea { border-color: var(--err); }
.adm-modele-apercu { display: grid; gap: 8px; align-content: start; justify-items: start; }
.adm-modele-apercu .adm-apercu-message { justify-self: stretch; }
.adm-apercu-message { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: #FAFBFD; font-size: 14px;
    overflow-wrap: anywhere; }
.adm-apercu-message p { margin: 0 0 6px; }
.adm-apercu-message p:last-child { margin-bottom: 0; }
.adm-fleches { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-liste-vide { display: grid; gap: 4px; margin: 8px 0 12px; }
.adm-liste-vide .adm-liste { margin: 0; }
.adm-hors-portefeuille { background: #FFF1E3; color: #B35A00; margin-top: 4px; border-radius: 8px; }
@media (max-width: 760px) {
    .adm-modele-grille { grid-template-columns: 1fr; }
}
.adm-brief { margin: 0 0 10px; }
.adm-reserve { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.adm-entete-campagne .adm-lien-annuler { margin-left: auto; font-size: 13px; color: var(--err); }
.adm-confirmation { border: 1px solid var(--err); }
.adm-case { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.adm .btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) {
    .adm-recap { grid-template-columns: 1fr; }
    .adm-recap dt { margin-top: 6px; }
    .adm-actions { white-space: normal; }
}
.adm label[for=ajout-produit], .adm label[for=ajout-client], .adm label[for=recherche-produit] { display: block; margin: 14px 0 6px; }
.adm-titre:has(svg) { display: flex; align-items: center; gap: 6px; }
.adm-actions input[type=text] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; width: 150px; }
button.adm-etape { font: inherit; font-size: 13px; cursor: pointer; }
.adm-marque-remis { color: var(--err); font-weight: 600; }

/* ---------- Campagnes Nouveautés — pages commerciales (étape 3b) ---------- */
.badge-cat-nouveaute, .cat-nouveaute { color: var(--cat-nouveaute); background: var(--cat-nouveaute-bg); }
.badge-canal-nv { color: var(--muted); background: #EEF0F5; }
.tab-pill-nouveautes .count { background: var(--cat-nouveaute-bg); color: var(--cat-nouveaute); }
.tab-pill-nouveautes.active { border-color: var(--cat-nouveaute); }
.nv-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.nv-tete .meta { margin: 0; flex: 1 1 320px; }
.nv-sous-onglets { display: flex; gap: 8px; flex-wrap: wrap; }
.nv-bandeau { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--cat-nouveaute-bg); color: var(--text); font-weight: 600; }
.nv-bandeau-promesse { background: #FFF4E5; }
.nv-bandeau-attente { background: #EEF0F5; }
.nv-bandeau-court { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--cat-nouveaute); }
.nv-bandeau-court.nv-bandeau-promesse { color: #9A5B00; }
.nv-bandeau-court.nv-bandeau-attente { color: var(--muted); }
.nv-produit-ligne { display: flex; align-items: center; gap: 12px; }
.nv-produit-image { width: 64px; height: 64px; flex: none; border-radius: var(--radius-sm); object-fit: cover; background: #F0F2F7; }
.nv-produit-image-vide { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.nv-produit-nom { overflow-wrap: anywhere; }
.nv-preuve p { margin: 4px 0; }
.nv-reserve { border: 1px dashed var(--line); background: transparent; }
.nv-reserve .meta { margin: 0; }
.nv-remplace { margin-top: 6px; }
.btn-message-nv { background: var(--cat-nouveaute); border: 0; cursor: pointer; font: inherit; }
.nv-ligne-dash { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; font-size: 14px; background: #F7F8FB; }
.nv-ligne-dash:hover { background: var(--cat-nouveaute-bg); }
.nv-ligne-dash svg { margin-left: auto; }
.fiche-nv-commandes { margin: 12px 0; padding: 12px; border-radius: var(--radius-sm); background: #F7F8FB; }
.fiche-nv-commandes ul { margin: 8px 0; padding-left: 18px; }
.fiche-nv-commandes li.retiree { color: var(--muted); }
.resultat-choix-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panneau-nouveaute .mission-pourquoi { background: var(--cat-nouveaute-bg); border-color: #B9E6DF; }
.panneau-nouveaute .mission-pourquoi .mission-bloc-titre { color: var(--cat-nouveaute); }
@media (max-width: 640px) {
    .resultat-choix-2 { grid-template-columns: 1fr; }
    .nv-tete { flex-direction: column; align-items: stretch; }
    .nv-tete .meta { flex: none; }
    /* Étape 3b : à 390 px, toutes les pastilles visibles (Nouveautés et Mes clients compris) sur deux lignes, au lieu d'une
       rangée qui défile sans barre visible et cachait l'onglet Nouveautés. */
    .tbl-barre .tbl-onglets { flex-wrap: wrap; overflow-x: visible; row-gap: 6px; }
    .tbl-barre .tbl-onglets-sep { display: none; }
}

/* ---------- Page tâche en 3 étapes (lot 1, migration 0031) ----------
   Barre « 1 Étude avant appel · 2 Appel en cours · 3 Après l'appel » ; étape courante pleine, étapes passées cliquables
   (lecture seule), étapes à venir grisées. 390 px : trois pastilles égales, titres sur deux lignes, aucun débordement. */
.panneau-tete-appel { grid-template-columns: minmax(0, 1fr); }
.etapes-appel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 4px; }
.etape-appel { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line);
    border-radius: 12px; background: #fff; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.etape-appel:disabled { cursor: default; opacity: .55; }
.etape-appel-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
    border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; }
.etape-appel-titre { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.etape-appel.passee { color: var(--text); }
.etape-appel.passee .etape-appel-num { background: var(--cat-commission-bg); color: var(--ok); }
.etape-appel.active { border-color: var(--ok); color: var(--text); box-shadow: 0 0 0 2px rgba(8, 166, 106, .12); }
.etape-appel.active .etape-appel-num { background: var(--ok); color: #fff; }
.page-appel > .mission-bloc:first-child { margin-top: 10px; }
.appel-contact .btn-vert-large { margin-top: 12px; }
.appel-telephone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.appel-numero { font-size: 20px; font-weight: 800; letter-spacing: .02em; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.appel-sans-numero { margin: 8px 0 0; color: var(--err); font-weight: 600; }
.appel-commence { margin: 10px 0 0; }
.btn-danger-discret { color: var(--err); border-color: #f6c3cd; margin-top: 8px; }
.btn-danger-discret:disabled { opacity: .5; cursor: not-allowed; }
.appel-signaler-zone { margin-top: 10px; }
.appel-signaler-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.appel-signaler-actions .btn-vert-large { width: auto; flex: 1; }
.appel-chrono { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 12px 0; padding: 12px 14px;
    border: 1px solid #bfe9d3; border-radius: 12px; background: var(--cat-commission-bg); color: var(--ok); }
.appel-chrono-valeur { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.appel-note { width: 100%; min-height: 260px; resize: vertical; font: inherit; font-size: 15px; line-height: 1.5; padding: 12px;
    border: 1px solid var(--line); border-radius: 12px; box-sizing: border-box; }
.appel-note[readonly] { background: var(--bg); color: var(--muted); }
.appel-note-bas { display: flex; justify-content: flex-end; margin: 4px 0 10px; min-height: 18px; }
.page-appel .btn-vert-large + .meta { margin-top: 8px; }
.resultat-appel .resultat-formulaire { margin-top: 10px; }
.appel-message { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.appel-message .etape-sous { margin-bottom: 8px; }
.appel-message-contacts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-width: 0; }
.appel-message-contacts .pill-contact-groupe, .appel-message-contacts .pill-contact { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.appel-sans-message { margin-top: 12px; }
.appel-final-mention { margin-top: 6px; }
@media (max-width: 420px) {
    .etape-appel { flex-direction: column; align-items: flex-start; gap: 4px; padding: 7px 8px; font-size: 12px; }
    .appel-numero { font-size: 18px; }
    .appel-chrono-valeur { font-size: 22px; }
}
/* Étape 3 : « Joint » en premier (Joint / Pas de réponse / Rappeler) ; bouton final seul, sur toute la largeur de la barre. */
.resultat-appel .btn-choix[data-resultat="conversation"] { order: -1; }
.resultat-appel .resultat-actions { grid-template-columns: 1fr; }
/* Nouveauté Téléphone, étape 1 : « Quoi lui dire » (objectif et message de la campagne, affichage seul). */
.nv-quoi-dire-titre { margin: 8px 0 4px; }
.nv-quoi-dire-message { margin: 0; padding: 10px 12px; border-left: 3px solid var(--cat-nouveaute); background: var(--cat-nouveaute-bg);
    border-radius: 0 10px 10px 0; white-space: normal; overflow-wrap: anywhere; }
/* Corrections du lot 1 : « Prochain contact » après « Joint » ; canal du récap en tête de l'éditeur. */
.resultat-champ label.ap-suivi-aucun { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 600; color: var(--text); }
.ap-suivi-propose { margin: 0 0 6px; }
.editeur-recap { margin-bottom: 10px; }
.editeur-recap .seg { flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* UI2 : page « Mon profil » et bandeau du tableau de bord              */
/* ------------------------------------------------------------------ */
.bandeau-profil { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin: 0 0 16px; padding: 12px 14px;
    border-radius: var(--radius-sm); background: #EEF4FE; border: 1px solid #CFDDF7; font-size: 14px; }
.bandeau-profil-icone { flex: none; display: flex; color: var(--primary); }
.bandeau-profil-texte { flex: 1 1 220px; min-width: 0; }
.mon-profil { max-width: 760px; }
.mon-profil-form { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.mon-profil-champ { display: flex; flex-direction: column; gap: 4px; }
.mon-profil-titre { font-size: 15px; font-weight: 800; }
.mon-profil-champ .meta, .mon-profil-champ textarea { font-weight: 400; }
.mon-profil-champ textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.mon-profil-champ textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.mon-profil-bas { display: flex; justify-content: flex-end; }
/* Résumé du matin (0090, provisoire) : case « Recevoir le résumé du matin par e-mail » */
.mon-profil-case { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.mon-profil-case > span { display: flex; flex-direction: column; gap: 4px; }
.mon-profil-case .meta { font-weight: 400; }
.mon-profil-case input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
@media (max-width: 700px) { .mon-profil-form { padding: 16px; } .mon-profil-bas .btn { width: 100%; justify-content: center; } }
.sidebar-profil.actif { color: #fff; }

/* Lot 2 (0033) — « Le client ne veut pas être appelé » et pilotage des commerciaux. */
.pas-appel { margin-top: 10px; }
.btn-pas-appel { color: var(--muted); }
.btn-pas-appel:disabled { opacity: .5; cursor: not-allowed; }
.pas-appel-avert { margin-top: 10px; padding: 12px 14px; border: 1px solid #f6c3cd; border-left: 4px solid var(--err);
    border-radius: 10px; background: var(--cat-urgent-bg); }
.pas-appel-avert p { margin: 0 0 8px; }
.pas-appel-avert-titre { color: var(--err); font-size: 15px; }
.pas-appel-note { margin-top: 10px; }
.pas-appel-note textarea { width: 100%; margin-top: 6px; }
.pas-appel-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.pas-appel-actif { margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; }
.pas-appel-bandeau { margin: 0 0 8px; padding: 8px 10px; border-radius: 9px; background: var(--bg); }
.pas-appel-attente { margin: 8px 0; }
.btn-message-seul { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg);
    color: var(--muted); border-radius: 9px; padding: 8px 10px; font-size: 13px; font-weight: 600; cursor: default; }
.pilotage-onglets { margin-bottom: 12px; }
.pilotage-titre { font-size: 16px; margin: 0 0 10px; }
.pilotage-note { max-width: 360px; white-space: normal; overflow-wrap: anywhere; }
.pilotage-activite th { white-space: normal; min-width: 72px; }
.pilotage-activite td { vertical-align: top; }
.pilotage-activite td:first-child { min-width: 130px; }
.pilotage-definitions { margin-top: 12px; }
.pilotage-definitions p { margin: 0 0 6px; }
/* Même emplacement partout (pages de pilotage) : la rangée de périodes (admin_activite.php) et la zone vide des deux
   autres pages (_pilotage_barre.php) réservent la MÊME hauteur, pour que la première carte commence toujours au même
   endroit en changeant d'onglet. 54px = hauteur naturelle actuelle de la rangée de périodes (nav .adm-filtres, avec
   ses marges) : aucun changement visuel sur admin_activite.php, les deux autres pages gagnent cette même réserve. */
.pilotage-barre-reservee { min-height: 54px; }
/* Onglets et boutons de période (pages de pilotage uniquement : .filters de taches.php n'est pas concerné) : relief
   léger, survol, clic, focus clavier ; l'onglet actif reste le remplissage plein déjà en place, renforcé d'une ombre. */
.pilotage-onglets .chip, .adm-barre .adm-filtres .chip {
    box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; }
.pilotage-onglets .chip:hover, .adm-barre .adm-filtres .chip:hover { border-color: #c7d0e4; box-shadow: var(--shadow); transform: translateY(-1px); }
.pilotage-onglets .chip:active, .adm-barre .adm-filtres .chip:active { transform: translateY(0) scale(.97); }
.pilotage-onglets .chip.active, .adm-barre .adm-filtres .chip.active { box-shadow: var(--shadow); }
.pilotage-onglets .chip:focus-visible, .adm-barre .adm-filtres .chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Encadrés d'explication des pages de pilotage (même style que « Préférences du client ») : une couleur par page. */
.admin-note { margin-top: 18px; }
.admin-note .pilotage-definitions { margin-top: 0; }

/* ------------------------------------------------------------------ */
/* Transition douce entre les trois pages de pilotage (déclaratif seulement, aucun JavaScript, aucune logique).      */
/* L'en-tête et la rangée d'onglets restent en place visuellement ; seul le contenu en dessous change. Dégradation : */
/* un navigateur sans la navigation par vues fait simplement une navigation normale (rien de cassé) ; le léger fondu */
/* de .main ci-dessous s'applique dans tous les cas, pour « à défaut » un résultat déjà doux sans cette API.         */
/* ------------------------------------------------------------------ */
@view-transition { navigation: auto; }
.page-head:has(~ .pilotage-onglets) { view-transition-name: pilotage-entete; }
.pilotage-onglets { view-transition-name: pilotage-onglets; }
@media (prefers-reduced-motion: reduce) {
    /* La navigation par vues continue de fonctionner (rien ne casse), mais sans animation visible. */
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media not (prefers-reduced-motion: reduce) {
    /* « À défaut » : un léger fondu à l'arrivée, qui s'ajoute sans gêner dans les navigateurs qui ont la
       navigation par vues (même sens, très bref) et qui, seul, adoucit déjà l'arrivée dans les autres. */
    @keyframes pilotage-fondu { from { opacity: 0; } to { opacity: 1; } }
    main:has(> .pilotage-onglets) { animation: pilotage-fondu .18s ease-out; }
}

/* Fusion finale (06/10/2026) — « Préférences du client » (page du panneau), « Client non viable », fiche du mode Message. */
.pref-acces { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.pref-acces-etat { font-size: 13px; }
.page-preferences { display: flex; flex-direction: column; gap: 12px; }
.page-preferences[hidden] { display: none; }
.pref-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.pref-titre { margin: 0; font-size: 17px; }
.nv-categories { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }
.nv-categorie { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pref-non-viable .btn-danger-discret { margin-top: 0; }
.mode-message .pas-appel-bandeau { margin: 0 0 4px; }
.mm-note textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; font-size: 14px; resize: vertical; }
.mm-note-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ------------------------------------------------------------------ */
/* Passe visuelle, fusion finale (06/10/2026) : page « Préférences du client », « Récap envoyé par » (étape 3).      */
/* Affichage seulement — aucun texte changé, aucune classe ni structure retirée aux endroits vérifiés par les tests. */
/* ------------------------------------------------------------------ */
.kpi-icone.rouge { background: var(--err); }

/* En-tête : bouton « Retour à la mission » en vrai bouton, titre fort + nom du client en sous-titre. */
.pref-entete { display: flex; align-items: flex-start; gap: 8px 14px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 2px;
    border-bottom: 1px solid var(--line); }
.btn-retour { background: var(--bg); border-color: var(--line); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.btn-retour:hover { background: #ECEEF5; border-color: #d8dcea; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-retour:active { transform: translateY(0) scale(.97); }
.btn-retour:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pref-identite { min-width: 0; flex: 1 1 200px; }
.pref-titre { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.pref-sous-titre { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }

/* Bouton « Préférences du client » (étape 1 et en-tête de la fiche Message) : visible sans dominer « Je commence mon appel ». */
.btn-pref { background: #EEF4FE; border-color: #CFDDF7; color: var(--primary); font-weight: 700; box-shadow: var(--shadow-sm); }
.btn-pref:hover { background: #E3ECFC; border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-pref:active { transform: translateY(0) scale(.97); }
.btn-pref:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Trois cartes : bordure gauche épaisse + pastille d'icône, chacune de sa couleur ; fond léger assorti. */
.pref-carte { border: 1px solid var(--line); border-radius: 12px; border-left-width: 5px; }
.pref-carte-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pref-carte-icone { flex: none; width: 32px; height: 32px; border-radius: 9px; }
.pref-carte-icone svg { width: 16px; height: 16px; }
.pref-carte-titre { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.005em; }
.pref-carte-style { border-left-color: var(--primary); background: #EEF4FE; }
.pref-carte-message { border-left-color: var(--orange); background: var(--cat-important-bg); }
.pref-carte-nonviable { border-left-color: var(--err); background: var(--cat-urgent-bg); }

/* Compteur « Message seulement » : une seule pastille (« 1 / 4 ») + une petite barre ; la phrase de détail
   (portefeuille, plafond 10 %) ne s'affiche plus qu'une fois, juste en dessous — fini le doublon des deux lignes. */
.pa-compteur { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.pa-compteur-pastille { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 4px 12px;
    border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 15px;
    font-weight: 800; color: var(--text); white-space: nowrap; }
.pa-compteur-barre { flex: 1 1 auto; max-width: 160px; }
.pa-compteur-barre .kpi-progress-bar { background: var(--orange); }
.meta.err { color: var(--err); font-weight: 700; }

/* Catégories de « Client non viable » : boutons à choisir (pas des cases nues), sélection pleine couleur + coche. */
.nv-categorie { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 9px 16px;
    border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-weight: 700; font-size: 13.5px;
    cursor: pointer; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.nv-categorie:hover { border-color: #f5b5c2; background: #fff7f8; }
.nv-categorie:active { transform: scale(.97); }
.nv-categorie input.js-nv-categorie { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.nv-categorie:has(.js-nv-categorie:checked) { background: var(--err); border-color: var(--err); color: #fff; box-shadow: var(--shadow); }
.nv-categorie:has(.js-nv-categorie:checked)::before { content: "✓"; font-weight: 900; }
.nv-categorie:has(.js-nv-categorie:disabled) { opacity: .5; cursor: not-allowed; }
.nv-categorie:has(.js-nv-categorie:focus-visible) { box-shadow: 0 0 0 3px rgba(23, 105, 232, .35); }

/* Boutons de choix (Tu/Vous, ton, longueur ; « Récap envoyé par » à l'étape 3, même composant) : relief, survol,
   sélection pleine couleur + coche, zone de clic confortable, focus clavier. */
.seg { box-shadow: var(--shadow-sm); }
.seg button { min-height: max(40px, var(--cible-min)); transition: background .15s, color .15s; }
.seg.seg-petit button { min-height: max(34px, var(--cible-min)); }
.seg button:hover { background: var(--bg); }
.seg button:active { transform: scale(.96); }
.seg button.on { background: var(--primary); color: #fff; }
.seg button.on::before { content: "✓"; margin-right: 5px; font-weight: 900; }
.seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; position: relative; z-index: 1; }

/* « Passer en Message seulement » et les boutons « Enregistrer » / « Confirmer » des trois cartes : relief, survol, focus. */
.btn-pas-appel { color: var(--orange); border-color: #ffd9b3; background: #fff; box-shadow: var(--shadow-sm); font-weight: 700; }
.btn-pas-appel:hover:not(:disabled) { background: var(--cat-important-bg); border-color: var(--cat-important);
    box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-pas-appel:active:not(:disabled) { transform: translateY(0) scale(.97); }
.js-profil-save:focus-visible, .js-pas-appel-enregistrer:focus-visible, .js-pas-appel-confirmer:focus-visible,
.js-nv-confirmer:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 420px) {
    .pref-entete { flex-direction: column; align-items: stretch; }
    .nv-categorie, .seg button { min-height: max(42px, var(--cible-min)); }   /* intégration vague 3 : ≥ 44 px (préférences visibles sur la fiche, 0071) */
}

/* ==========================================================================================================
   DÉBUT — Mode série (Nouveautés / Message), bloc délimité, isolé des règles ci-dessus : traiter les messages
   de campagne un par un, en plein écran. Ne modifie aucune règle existante ; ne touche ni .tbl-row.ouvert (qui
   ne s'applique jamais à une carte en mode série : elle n'a jamais la classe .ouvert) ni .panneau-nouveaute
   habituel (le contexte supplémentaire ci-dessous reste "hidden" hors de ce mode). Mobile d'abord (390 px).
   ========================================================================================================== */
.serie-entree { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 2px 16px; }
.serie-entree .btn { min-height: 44px; }
.serie-entree .meta { margin: 0; flex: 1 1 220px; }
.serie-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; }
body.serie-ouverte { overflow: hidden; }
.serie-barre { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--card);
    border-bottom: 1px solid var(--line); flex: none; }
.serie-barre .btn-nav { min-height: 44px; min-width: 44px; justify-content: center; }
.serie-progression { margin: 0 auto; font-weight: 800; font-size: 14px; color: var(--cat-nouveaute); white-space: nowrap; }
.serie-corps { flex: 1; overflow-y: auto; padding: 16px 10px 110px; }
.serie-corps .carte-nouveaute.serie-en-cours { display: block; max-width: 640px; margin: 0 auto; }
/* La ligne de tableau (.tbl-ligne) ne sert à rien en plein écran ; le panneau (.tbl-detail), normalement masqué
   ou glissant à droite (voir plus haut .tbl-row > .tbl-detail / .tbl-row.ouvert > .tbl-detail), devient la carte
   elle-même — jamais besoin de la classe .ouvert, qui resterait sans effet ici. */
.serie-corps .carte-nouveaute .tbl-ligne { display: none; }
.serie-corps .carte-nouveaute .tbl-detail { display: block; width: 100%; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.serie-corps .panneau-barre { display: none; }
/* Contexte minimal (objectif de la campagne, dernier produit acheté, WhatsApp/e-mail) : présent dans le gabarit
   serveur mais masqué par défaut (voir _panneau_nouveaute.php) — révélé seulement pendant le traitement en série. */
.serie-contexte { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px;
    background: #FAFBFE; display: flex; flex-direction: column; gap: 8px; }
.serie-contexte .mission-objectif, .serie-contexte .meta { margin: 0; }
.serie-contexte .btn { align-self: flex-start; min-height: 40px; }
/* « Corriger les fautes » mis en avant : un message de campagne, collé partout, contient plus souvent une faute. */
.serie-corps .js-ed-transformer[data-mode="corriger"] { border-color: var(--violet-ia); color: var(--violet-ia); font-weight: 700; }
.serie-pied { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--line);
    background: var(--card); flex: none; }
.serie-pied .btn { min-height: 44px; min-width: 160px; justify-content: center; }
.serie-termine { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; text-align: center; padding: 24px 16px; }
.serie-termine h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ok); font-size: 19px; }
.serie-termine .btn { min-height: 44px; min-width: 180px; justify-content: center; }
@media (min-width: 701px) {
    .serie-barre { padding: 10px 16px; }
    .serie-corps { padding: 22px 16px 110px; }
}
/* ==========================================================================================================
   FIN — Mode série (Nouveautés / Message)
   ========================================================================================================== */

/* ==========================================================================================================
   DÉBUT — Refonte visuelle, lots 1 et 2 (08/10/2026). Habillage seulement : aucune classe retirée. Placé AVANT le
   bloc de la cloche, qui doit rester en fin de fichier (tests/php/test_cloche.php).
   Lot 1 : cibles ≥ 44 px au doigt (variable --cible-min, en tête de fichier), tableaux qui défilent DANS leur cadre,
   Pilotage (onglets en piste, périodes, tableau, encadré « À savoir »), liste des campagnes, Valider / Retirer.
   Lot 2 : en-tête mobile compact (menu à gauche, cloche et compte à droite), tiroir fermable, barre basse à 4-5 entrées.
   ========================================================================================================== */

/* Cloche : 40 px à la souris, 44 px au doigt (la règle d'origine .head-bell reste telle quelle). */
.head-bell { width: max(40px, var(--cible-min)); height: max(40px, var(--cible-min)); }

/* ---------- Cibles tactiles : liens d'action, retours, sommaires repliables, cases à cocher ---------- */
.lien-retour, .panel-head .lien, .panel-tete-icone .lien { display: inline-flex; align-items: center; gap: 6px; min-height: var(--cible-min); }
.lien-retour { margin-bottom: var(--esp-2); }
details > summary { min-height: var(--cible-min); box-sizing: border-box; }
.resultats-recents summary { padding: 12.5px 0; }
.rupture-toggle, .adm-case, .adm-choix, .resultat-check, .profil-case, .catalogue-filtre-case, .ap-suivi-aucun,
label.ap-suivi-aucun, .done-toggle { min-height: var(--cible-min); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
/* Barre latérale entre 881 et 1023 px (tablette) : 44 px ; au-delà, hauteur naturelle (41 px) inchangée. */
.sidebar-nav a { min-height: var(--cible-min); }
/* Panneau de mission : barre Précédent / Suivant / fermer, étapes de l'appel, lien « fiche client → ». */
.btn-nav { min-height: var(--cible-min); }
.btn-nav:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn-fermer { width: max(34px, var(--cible-min)); height: max(34px, var(--cible-min)); }
.etape-appel { min-height: var(--cible-min); }
.panneau-tete-gauche a.lien { display: inline-flex; align-items: center; min-height: var(--cible-min); color: var(--primary); font-weight: 600; text-decoration: none; }
.panneau-tete-gauche a.lien:hover { text-decoration: underline; }

/* ---------- Tableaux : défilement horizontal DANS leur cadre, jamais sur la page ---------- */
/* Ombres de bord (technique « local / scroll ») : une ombre à droite tant qu'il reste des colonnes à voir. */
.adm-table-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; max-width: 100%;
    background:
        linear-gradient(to right, var(--card) 30%, rgba(255,255,255,0)) left center / 28px 100% no-repeat local,
        linear-gradient(to left, var(--card) 30%, rgba(255,255,255,0)) right center / 28px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(26,33,51,.18), rgba(26,33,51,0)) left center / 12px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(26,33,51,.18), rgba(26,33,51,0)) right center / 12px 100% no-repeat scroll; }
.adm-table { border-collapse: separate; border-spacing: 0; font-size: var(--txt-sm); }
.adm-table th { background: var(--surface-alt); padding: 10px 12px; font-size: var(--txt-xs); letter-spacing: .01em; }
.adm-table th:first-child { border-top-left-radius: var(--radius-sm); }
.adm-table th:last-child { border-top-right-radius: var(--radius-sm); }
.adm-table td { padding: 12px; vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover td { background: rgba(250, 251, 254, .85); }
.adm-table .adm-actions { text-align: right; }
.adm-table .adm-actions > .btn, .adm-table .adm-actions > form { margin: 2px 0 2px 6px; vertical-align: middle; }
.adm-table .adm-actions form { display: inline-block; }
/* Sous 760 px : les cellules ne se coupent plus (nom de produit sur une ligne) ; le tableau prend sa largeur naturelle et
   défile dans son cadre plutôt que d'écraser ses colonnes. Seule la note d'un signalement garde plusieurs lignes. */
@media (max-width: 760px) {
    .adm-table td { white-space: nowrap; }
    .adm-table td.pilotage-note { white-space: normal; min-width: 14rem; }
}

/* ---------- Pilotage : onglets en piste, périodes distinctes, tableau aligné, encadré « À savoir » ---------- */
.adm-filtres.pilotage-onglets { display: inline-flex; flex-wrap: nowrap; gap: var(--esp-1); max-width: 100%; margin: 0 0 var(--esp-3);
    padding: var(--esp-1); background: var(--fond-piste); border-radius: 14px; }
.pilotage-onglets .chip, .pilotage-onglets .chip:hover { border: 0; background: transparent; box-shadow: none; transform: none;
    color: var(--muted); border-radius: 10px; padding: 8px 16px; }
.pilotage-onglets .chip:hover { color: var(--text); background: rgba(255,255,255,.55); }
.pilotage-onglets .chip.active, .pilotage-onglets .chip.active:hover { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.pilotage-barre-reservee { margin: 0 0 var(--esp-3); }
.pilotage-barre-reservee .adm-filtres { margin: 0; gap: var(--esp-2); }
.pilotage-barre-reservee .adm-filtres .chip { font-size: var(--txt-sm); padding: 6px 14px; box-shadow: none; }
.pilotage-barre-reservee .adm-filtres .chip.active { background: var(--produit-bg); color: var(--primary); border-color: #b9cff5; box-shadow: none; }
.pilotage-barre-reservee .adm-filtres .chip:hover { transform: none; box-shadow: none; }
.pilotage-titre { font-size: var(--txt-md); font-weight: 800; }
.pilotage-activite th:not(:first-child), .pilotage-activite td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.pilotage-activite td:not(:first-child) { font-size: var(--txt-base); font-weight: 700; }
.pilotage-activite td:first-child { font-weight: 600; }
.pilotage-activite td:first-child .meta { display: block; font-weight: 400; }
/* Encadré « À savoir » : une vraie carte (fond blanc, ombre, filet de couleur à gauche), plus un aplat. */
.admin-note.pref-carte { background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: var(--esp-4) 18px;
    border-left-width: 5px; }
.admin-note .pref-carte-tete { margin-bottom: var(--esp-2); }
.admin-note p.meta { color: var(--text); font-size: 14px; line-height: 1.55; }
@media (max-width: 600px) {
    /* Trois onglets égaux sur toute la largeur, titre sur deux lignes si besoin ; périodes en grille 2 × 2. */
    .adm-filtres.pilotage-onglets { display: flex; width: 100%; }
    .pilotage-onglets .chip { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; line-height: 1.2; padding: 6px 8px; }
    .pilotage-barre-reservee { min-height: 0; }
    .pilotage-barre-reservee .adm-filtres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .pilotage-barre-reservee .adm-filtres .chip { white-space: normal; text-align: center; line-height: 1.2; }
    /* Activité : quatre colonnes tiennent à 390 px (nom sur deux lignes, cellules resserrées). */
    .pilotage-activite th, .pilotage-activite td { padding: 10px 6px; }
    .pilotage-activite th { min-width: 0; }
    .pilotage-activite td:first-child { white-space: normal; min-width: 0; padding-left: 8px; }
}

/* ---------- Liste des campagnes et barres d'administration : bouton détaché, filtres lisibles ---------- */
.adm-barre { gap: var(--esp-3) var(--esp-4); margin-bottom: var(--esp-4); align-items: center; }
.adm-barre .adm-filtres { margin: 0; }
.adm-barre > form { margin: 0; flex: none; }
@media (max-width: 600px) {
    .adm-barre > form, .adm-barre > form .btn { width: 100%; }
    .adm-barre > form { margin-top: var(--esp-1); }
}

/* ---------- Produits précédents (page 2) : Valider / Retirer jamais écrasés ---------- */
.adm-liste-produits li { gap: var(--esp-2) var(--esp-3); padding: 10px 12px; }
.adm-liste-produits li > span:first-child { flex: 1 1 16rem; }
.adm-liste-produits li > .adm-actions, .adm-liste-produits li > .btn { flex: none; display: inline-flex; align-items: center; gap: var(--esp-2);
    white-space: nowrap; }
.adm-liste-produits li > .adm-actions .btn { margin: 0; min-width: 6.5rem; }
@media (max-width: 600px) {
    .adm-liste-produits li > .adm-actions { width: 100%; }
    .adm-liste-produits li > .adm-actions .btn { flex: 1 1 0; }
    .adm-liste-produits li > .btn { width: 100%; }
}

/* ---------- Lot 2 : navigation et en-tête mobile (< 880 px) ---------- */
@media (max-width: 880px) {
    /* En-tête compact : une barre de 44 px en haut (menu à gauche, cloche et compte à droite), puis le titre sur toute la
       largeur. Le compte n'affiche que son initiale (nom complet dans l'infobulle et le libellé d'accessibilité). */
    .main { position: relative; }
    .container { padding-top: calc(var(--esp-4) + 44px + var(--esp-3)); }
    .sidebar-toggle { position: absolute; top: var(--esp-4); left: var(--esp-4); z-index: 22; width: 44px; height: 44px; box-shadow: var(--shadow-sm); cursor: pointer; }
    .page-head { margin-bottom: var(--esp-4); }
    .head-right { position: absolute; top: var(--esp-4); right: var(--esp-4); z-index: 21; gap: var(--esp-2); flex-wrap: nowrap; max-width: calc(100% - 92px); }
    .head-avatar { padding: 5px; width: 44px; height: 44px; justify-content: center; }
    .head-avatar .initiales { width: 34px; height: 34px; font-size: 13px; }
    .head-avatar .head-avatar-nom, .head-avatar > svg { display: none; }
    .head-right .kebab-menu { top: 50px; }
    .page-head h1 { height: auto; min-height: 0; max-height: calc(1.25em * 2); }
    .page-head .sous-titre { min-height: 0; }   /* plus de réserve de deux lignes sur téléphone : le contenu remonte */
    /* Tiroir : « Ma boutique », « Catalogue » et « Déconnexion » ; le bouton menu reste visible à côté pour le refermer. */
    .sidebar.ouverte { box-shadow: 0 0 0 100vmax rgba(26, 33, 51, .38); }
    .app:has(.sidebar.ouverte) .sidebar-toggle { position: fixed; left: calc(var(--sidebar-w) + var(--esp-3)); z-index: 31; }
    .sidebar-deconnexion { min-height: 44px; }
    .sidebar-catalogue { margin-top: var(--esp-3); }
    .sidebar-catalogue + .sidebar-deconnexion { margin-top: var(--esp-1); }
    .sidebar-catalogue.actif { color: #fff; }
    .sidebar-boutique select, .sidebar-boutique .boutique-fixe { min-height: 44px; }
    /* Barre basse : Tâches, Clients, Tableau de bord, Profil (+ Admin) — colonnes égales, libellés sur deux lignes si besoin. */
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .nav-mobile { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px;
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(26,33,51,.06); }
    .nav-mobile a { min-height: 54px; justify-content: center; padding: 4px 2px; line-height: 1.15; text-align: center; font-size: 11px; }
    .nav-mobile a > span:not(.sidebar-badge) { overflow-wrap: anywhere; }
    .nav-mobile a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
    .nav-mobile a .sidebar-badge { top: 2px; right: calc(50% - 24px); }
}
/* FIN — Refonte visuelle, lots 1 et 2
   ========================================================================================================== */


/* « Client bien suivi / a déjà commandé » (0046) : bouton secondaire sous « Je commence mon appel », bloc de choix de la
   durée (même composant que les catégories de « Client non viable », en vert), conséquence = simulation de la RPC.
   ========================================================================================================== */
.client-suivi { display: flex; flex-direction: column; gap: 8px; }
.btn-suivi { align-self: flex-start; background: var(--cat-commission-bg); border-color: #BFE6D2; color: #067A4E; font-weight: 700;
    box-shadow: var(--shadow-sm); min-height: max(40px, var(--cible-min)); }
.btn-suivi:hover { border-color: var(--ok); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-suivi:active { transform: translateY(0) scale(.97); }
.btn-suivi:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.cs-choix { border: 1.5px solid #BFE6D2; border-left: 4px solid var(--ok); border-radius: 12px; padding: 12px 14px; background: #fff;
    display: flex; flex-direction: column; gap: 8px; }
.cs-titre { font-weight: 800; }
.cs-durees { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-duree { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px;
    padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); cursor: pointer;
    box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s; }
.cs-duree span { font-weight: 700; font-size: 13.5px; }
.cs-duree small { color: var(--muted); font-size: 12px; }
.cs-duree:hover { border-color: #8fd3b4; background: #f4fbf7; }
.cs-duree input.js-cs-duree { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cs-duree:has(.js-cs-duree:checked) { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: var(--shadow); }
.cs-duree:has(.js-cs-duree:checked) small { color: rgba(255, 255, 255, .9); }
.cs-duree:has(.js-cs-duree:focus-visible) { box-shadow: 0 0 0 3px rgba(8, 166, 106, .35); }
.cs-conseq { margin: 0; font-size: 13.5px; }
.cs-conseq.err { color: var(--err); font-weight: 700; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 480px) {
    .cs-durees { display: grid; grid-template-columns: 1fr; }
    .btn-suivi { align-self: stretch; justify-content: center; }
}
/* FIN — Client bien suivi
   ========================================================================================================== */

/* ==========================================================================================================
   Appel entrant (0040) — carte « Appel entrant » en tête de Mes tâches, boutons de la fiche et de la carte en attente,
   missions traitées / conservées. Couleurs et rayons existants seulement.
   ========================================================================================================== */
.entrants { margin: 0 0 18px; }
.entrants-titre { display: flex; align-items: center; gap: 8px; font-size: var(--txt-md); margin: 0 0 8px; color: var(--primary); }
.badge-entrant { background: var(--cat-journalier-bg); color: var(--primary); }
.carte-entrant { border-left: 3px solid var(--primary); }
.appel-entrant { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.appel-entrant-canaux { display: inline-flex; align-items: center; gap: 6px; }
/* 20261026090000 : « Appeler (hors mission) », même traitement que .appel-entrant */
.appel-sortant-ht { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.client-actions { margin-top: 6px; }
.client-actions .appel-sortant-ht { margin-top: 0; }
.entrant-taches-liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.entrant-taches-liste label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.entrant-tache-texte { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.entrant-taches-liste input { min-width: 18px; min-height: 18px; }
.entrant-en-cours { margin: 0 0 10px; }
.pilotage-activite .pilotage-detail { display: block; white-space: nowrap; }
/* FIN — Appel entrant
   ========================================================================================================== */

/* « Son site » — Quoi proposer, phase 1 (09/10/2026) : colonne de la fiche et bloc du panneau */
.site-adresse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 4px; }
.site-adresse a { font-weight: 700; word-break: break-all; }
.site-badge-ok { color: #067A4E; background: var(--cat-commission-bg, #E6F6EE); }
.site-avertissement { color: var(--cat-important, #FF8A22); }
.site-message { margin: 0 0 6px; }
.site-phrases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-phrase { font-size: 13.5px; padding: 6px 8px 6px 10px; border-left: 3px solid var(--line-strong); border-radius: 6px; background: var(--bg, #F5F6FA); }
.site-phrase.site-niveau-alerte_forte { border-left-color: var(--cat-important, #FF8A22); }
.site-phrase.site-niveau-opportunite { border-left-color: var(--primary, #1769E8); }
.site-niveau { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.site-candidats { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.site-candidats li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.site-saisie { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.site-saisie input { flex: 1 1 180px; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; font: inherit; }
.site-retour { margin: 6px 0 0; }
.site-retour-erreur { color: var(--cat-urgent, #EF4665); }
.site-note { margin: 8px 0 0; font-style: italic; }
/* Site à la tâche (0143, 14/10/2026) : bloc du site dans les étapes de la tâche (même composant que la fiche) */
.site-avertissement-tache, .site-rappel-appel { margin: 0 0 8px; font-size: 13.5px; }
.site-bandeau-tache { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; }
.site-bandeau-tache span { flex: 1 1 200px; }
.site-avert-a_confirmer, .site-rappel-appel { background: #FFF4E8; color: #8A4B00; border: 1px solid #FFD3A6; }
.site-avert-introuvable { background: #eaf1fd; color: #0d4ea6; border: 1px solid #c7dbf7; }
.site-rappel-apres { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.site-bloc-tache .site-note { display: none; }
/* 0052 — « Annuler cet appel » : action secondaire, jamais au même rang que le bouton final (étapes 2 et 3), « Annuler » du
   bandeau des appels non enregistrés et de la ligne « Échange en cours », bouton rouge de la boîte de confirmation. */
.btn-annuler-appel { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid #f6c3cd; color: var(--err);
    border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-annuler-appel:hover { background: #FDE7EC; }
.btn-annuler-appel[hidden] { display: none; }
.page-appel > .btn-annuler-appel { margin-top: 10px; }
.resultat-actions .btn-annuler-appel { justify-self: start; align-self: center; width: auto; }   /* grille d'une colonne (.resultat-appel) : compact, à gauche */
.btn-annuler-ligne { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid #f6c3cd; color: var(--err);
    border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-annuler-ligne:hover { background: #FDE7EC; }
.bandeau-appel-ligne { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { background: #d93a57; }
.btn-danger:disabled { opacity: .6; cursor: not-allowed; }

/* 0053 — « Skip cette tâche » : bouton secondaire de la ligne (à côté de « Appeler ») et de l'étape 1, état « En attente de
   skip » (badge et ligne en lecture seule sous chaque catégorie), boîte de demande (raisons, précisions). */
.btn-skip-ligne { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); color: var(--muted);
    border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-skip-ligne:hover { color: var(--text); border-color: #c9cedb; }
.btn-skip-ligne[hidden] { display: none; }
.btn-skip { display: inline-flex; align-items: center; gap: 6px; }
.skip-bloc .meta { margin: 6px 0 0; }
.badge-skip { color: #7A4E00; background: #FFF4DD; }
.section-skip-lignes.filtre-masque { display: none; }
.ligne-skip { opacity: .85; }
.ligne-skip .td-actions { justify-content: flex-start; }
.skip-texte { overflow-wrap: anywhere; }
.dialogue-skip { width: min(520px, calc(100vw - 32px)); max-width: min(520px, calc(100vw - 32px)); }
.skip-raisons { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.skip-raisons legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.skip-raison { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.35; cursor: pointer; }
.skip-raison input { margin-top: 3px; }
.skip-texte-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.dialogue-skip textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dialogue-skip .meta { margin: 4px 0 0; }
.dialogue-skip .meta.err { color: var(--err); }
.dialogue-skip .skip-aide { margin: 10px 0 8px; }
@media (max-width: 1023px) { .btn-skip-ligne, .btn-annuler-ligne { min-height: 44px; padding: 6px 10px; } }   /* cibles tactiles ≥ 44 px */
/* 0190 — « Reporter » : bouton de l'étape 1, sur la même rangée que la demande d'annulation (skip) et AVANT elle ; mention
   « Reportée du … au … » (panneau et ligne) ; boîte « Reporter jusqu'à quand ? » (choix, date libre, « Pourquoi ? »). */
.btn-report { display: inline-flex; align-items: center; gap: 6px; }
.report-skip-rangee { display: flex; flex-wrap: wrap; gap: 0 12px; }
.report-skip-rangee > .mission-bloc { flex: 1 1 240px; min-width: 0; }
.report-skip-rangee > .mission-bloc[hidden] { display: none; }
.report-bloc .meta { margin: 6px 0 0; }
.mission-report { margin: 6px 0 0; overflow-wrap: anywhere; }
.mission-report svg { display: inline-block; vertical-align: -2px; }
.raison-report { color: var(--muted); }
/* 20261026090002 (20/10/2026) : tâche allégée après une grosse commande d'autres produits — ligne et panneau */
.raison-apres-commande { color: var(--muted); }
.mission-apres-commande { margin: 6px 0 0; overflow-wrap: anywhere; }
.mission-apres-commande svg { display: inline-block; vertical-align: -2px; }
.mission-apres-commande-aide { margin: 2px 0 0; overflow-wrap: anywhere; }
.prochain-apres-commande { margin-top: 2px; overflow-wrap: anywhere; }
.dialogue-report { width: min(520px, calc(100vw - 32px)); max-width: min(520px, calc(100vw - 32px)); }
.report-choix { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; min-width: 0; }
.report-option { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-height: 44px; font-size: 14px; line-height: 1.35; cursor: pointer; }
.report-option input { margin: 0; }
.report-date { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-width: 100%; box-sizing: border-box; }
.report-rappel { display: block; margin: 8px 0 12px; padding: 8px 10px; border-radius: 10px; background: #FFF4DD; color: #7A4E00; font-size: 14px; font-weight: 600; }
.report-rappel[hidden] { display: none; }
.report-texte-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.dialogue-report textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dialogue-report .meta { margin: 4px 0 0; }
.dialogue-report .meta.err { color: var(--err); }
.pilotage-reports-urgents { margin-top: 16px; }
.pilotage-report-raison { white-space: normal; overflow-wrap: anywhere; min-width: 160px; }
.adm-statut-renvoyee { background: #FFF4DD; color: #7A4E00; }
.adm-skip-mission + .adm-skip-mission { margin-top: 4px; }
.adm-skip-avert { display: flex; gap: 4px; align-items: flex-start; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: #7A4E00; }
.adm-table .adm-actions form.adm-skip-decision { display: flex; flex-direction: column; gap: 6px; align-items: stretch; margin: 0; }
.adm-table.adm-skips td.adm-actions { white-space: normal; min-width: 210px; text-align: left; }   /* 14/10/2026 : les deux classes sont sur la même table (avant : « .adm-table .adm-skips », ne visait rien) */
.adm-skip-decision .btn { justify-content: flex-start; white-space: normal; text-align: left; margin: 0; }

/* ==========================================================================================================
   Tunnel de non-réponse (0070) et préférences du client modifiables partout (0071) — 10/10/2026
   ========================================================================================================== */
.ap-msg-choix { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0 0 4px; }
.ap-msg-choix input { width: 18px; height: 18px; margin: 0; flex: none; }
.ap-msg-choix .etape-titre { margin: 0; }
.ap-msg-conseil { margin: 0 0 8px; }
.ap-msg-corps[hidden] { display: none; }
.pref-fiche { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.pref-carte-contact { border-left-color: var(--ok); background: #EAF8F1; }
.pref-ligne { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; }
.pref-libelle { font-size: 13px; font-weight: 600; min-width: 150px; }
.pref-ligne select { min-width: 0; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.pref-journal summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.pref-journal-liste { margin: 6px 0 0; padding-left: 18px; }
.pref-journal-liste li { margin: 2px 0; overflow-wrap: anywhere; }
.jour-appel-pref { display: flex; align-items: center; gap: 4px; }
.jour-appel-pref[hidden] { display: none; }
.injoignable { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.badge-injoignable { background: var(--cat-urgent-bg); color: var(--err); font-weight: 700; }
.injoignable.remis .badge-injoignable { background: #EAF8F1; color: var(--ok); }
/* Petit écran : en-tête des préférences en colonne — l'identité ne garde pas sa base de 200 px en HAUTEUR (grand blanc
   sous le titre, visible dans la fiche client et dans la page du panneau). */
@media (max-width: 420px) { .pref-identite { flex: none; } }
/* FIN — Tunnel de non-réponse et préférences du client
   ========================================================================================================== */

/* Réseaux de clients (0080, numéro provisoire — feature/reseaux-notes) : bloc du panneau et de la fiche, page Pilotage → Réseaux */
.reseau-bloc .meta { margin: 6px 0 0; }
.reseau-comptes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.reseau-comptes li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
.reseau-comptes li.reseau-pivot { border-color: var(--primary); }
.reseau-badge-pivot { background: var(--bg); color: var(--text); font-size: 11px; }
.reseau-admin { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.reseau-admin:last-child { border-bottom: 0; }
.reseau-resultats { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.reseau-note { margin-top: 6px; font-size: 13px; overflow-wrap: anywhere; }
/* Note sur le client (0081, numéro provisoire) : encadré en haut de la fiche et du panneau de mission */
.note-client .note-client-texte { margin: 8px 0 2px; font-size: 14px; overflow-wrap: anywhere; }
.note-client .js-nc-maj { margin: 2px 0 8px; }
.note-client textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.note-client-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.note-client-historique { margin-top: 8px; font-size: 13px; }
.adm-form textarea.note-admin { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.note-client-historique ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; overflow-wrap: anywhere; }
/* FIN — Réseaux de clients et note sur le client */

/* ---------- 0100 — Réponse aux demandes de prix (page « Demandes », fiche, panneau de la tâche) ---------- */
.adm-table .adm-actions .adm-reponses { display: flex; flex-direction: column; gap: 6px; align-items: stretch; margin-bottom: 6px; white-space: normal; }
.adm-table .adm-actions .adm-reponses form { margin: 0; }
.adm-table td.adm-actions:has(.adm-reponses) { white-space: normal; min-width: 210px; }
.adm-reponses .btn, .adm-table td.adm-actions:has(.adm-reponses) > form .btn { width: 100%; box-sizing: border-box; justify-content: center; white-space: normal; margin: 0; }
.adm-reponse-details > summary { list-style: none; cursor: pointer; }
.adm-reponse-details > summary::-webkit-details-marker { display: none; }
.adm-reponse-details[open] > summary { background: var(--relance-bg); }
.adm-reponse-details form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.adm-reponse-details label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.adm-reponse-details textarea { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; width: 100%; box-sizing: border-box; }
.adm-actions .adm-reponse-details input[type=text] { width: 120px; }
.adm-statut-repondue { background: var(--cat-commission-bg); color: #066b45; white-space: normal; }
.demande-reponse { font-weight: 600; color: #066b45; }
.fiche-inter-demande { display: block; margin-top: 4px; padding: 6px 10px; border-left: 3px solid #BFE3D2; background: #F6FCF9; border-radius: 4px; white-space: normal; }
/* ---------- Activité de mon portefeuille (0110, numéro provisoire, 12/10/2026) ----------
   Page « Activité clients », résumé du tableau de bord, pop-up « panier abandonné ». Signal OBSERVÉ : couleurs d'information
   (bleu = visite, vert = sur le site en ce moment, orange = panier en cours, gris = détail), jamais la couleur Urgent. Cibles de 44 px au moins partout. */
.tete-icone.orange { background: var(--cat-important-bg); color: var(--cat-important); }
.activite-carte { padding: var(--esp-4); }
.activite-onglets, .activite-filtres { display: flex; flex-wrap: wrap; gap: var(--esp-2); margin-bottom: var(--esp-3); }
.activite-onglets .tab-pill { min-height: 44px; }
.activite-compte { background: rgba(26,33,51,.06); border-radius: 999px; padding: 1px 8px; font-size: var(--txt-xs); }
.activite-filtre { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: var(--txt-sm); font-weight: 600;
    text-decoration: none; }
.activite-filtre.actif { background: var(--produit-bg); color: var(--primary); border-color: #c7d8f8; }
.activite-filtre:focus-visible, .activite-ligne:focus-visible { outline: none; box-shadow: var(--anneau-focus); }
.activite-liste, .activite-resume { display: flex; flex-direction: column; gap: var(--esp-2); }
.activite-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--esp-2) var(--esp-3);
    min-height: 44px; padding: var(--esp-3) var(--esp-4); border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--card); color: var(--text); text-decoration: none; }
.activite-ligne .activite-client { grid-column: 1; grid-row: 1; }
.activite-ligne .activite-fleche { grid-column: 2; grid-row: 1; }
.activite-ligne .activite-pastilles { grid-column: 1 / -1; grid-row: 2; }
@media (min-width: 720px) {
    .activite-ligne { grid-template-columns: minmax(180px, auto) minmax(0, 1fr) auto; }
    .activite-ligne .activite-pastilles { grid-column: 2; grid-row: 1; }
    .activite-ligne .activite-fleche { grid-column: 3; }
}
/* Résumé du tableau de bord (colonne étroite) : toujours empilé, quelle que soit la largeur de la fenêtre */
.activite-resume .activite-ligne { grid-template-columns: minmax(0, 1fr) auto; }
.activite-resume .activite-ligne .activite-pastilles { grid-column: 1 / -1; grid-row: 2; }
.activite-resume .activite-ligne .activite-fleche { grid-column: 2; }
.activite-ligne:hover { border-color: var(--line-strong); background: var(--surface-alt); }
.activite-client { display: inline-flex; align-items: center; gap: var(--esp-2); flex-wrap: wrap; min-width: 0; }
.activite-client strong { overflow-wrap: anywhere; }
.activite-pastilles { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.activite-fleche { justify-self: end; color: var(--muted); font-size: 20px; line-height: 1; }
.pastille-activite { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: var(--txt-sm);
    font-weight: 600; }
.pastille-activite.pa-visite { background: var(--produit-bg); color: var(--primary); }
.pastille-activite.pa-en-ligne { background: var(--cat-commission-bg); color: #05794D; }
.pastille-activite.pa-panier { background: var(--cat-important-bg); color: #A4520A; }
.pastille-activite.pa-discret { background: var(--relance-bg); color: var(--muted); font-weight: 500; }
.activite-vide { margin: 0; padding: var(--esp-3) 0; color: var(--muted); }
.activite-pied { margin: var(--esp-2) 0 0; }
.activite-tout-voir { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
.activite-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; gap: var(--esp-2);
    width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.activite-toast { pointer-events: auto; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--cat-important);
    border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: var(--esp-3) var(--esp-4); }
.activite-toast-urgent { border-left-color: var(--cat-urgent, #c0392b); }   /* alertes_inscrits : nouvel inscrit à appeler */
.activite-toast-texte { margin: 0 0 var(--esp-3); font-size: var(--txt-sm); color: var(--text); }
.activite-toast-actions { display: flex; gap: var(--esp-2); flex-wrap: wrap; }
.activite-toast-actions .btn-appeler, .activite-toast-actions .btn { min-height: 44px; display: inline-flex; align-items: center;
    padding: 0 16px; }
@media (max-width: 879px) { .activite-toasts { bottom: 84px; } }   /* au-dessus de la barre basse mobile */

/* ==========================================================================================================
   DÉBUT — Cloche de l'en-tête v1 (06/10/2026, web/_cloche.php) : bouton cliquable, panneau déroulant des éléments
   non vus, « Tout marquer comme vu ». Bloc autonome : aucune règle existante modifiée (.head-bell et .pastille gardés,
   seuls le curseur et le focus sont complétés ici pour .cloche-bouton). À 390 px, panneau fixe sur toute la largeur.
   ========================================================================================================== */
.cloche { position: relative; }
.head-bell.cloche-bouton { cursor: pointer; font: inherit; padding: 0; }
.head-bell.cloche-bouton:hover { border-color: #cdd3e0; box-shadow: var(--shadow); }
.head-bell.cloche-bouton:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.head-bell.cloche-bouton[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.cloche-panneau { position: absolute; right: 0; top: calc(100% + 8px); z-index: 35; width: 360px; max-width: calc(100vw - 32px);
                  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
                  box-shadow: 0 16px 40px rgba(26,33,51,.16); text-align: left; overflow: hidden; }
.cloche-panneau[hidden] { display: none; }
.cloche-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 14px;
               border-bottom: 1px solid var(--line); font-size: 14px; }
.cloche-compte { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cloche-liste { list-style: none; margin: 0; padding: 4px 0; max-height: min(420px, 60vh); overflow-y: auto; }
.cloche-liste:empty { display: none; }
.cloche-element a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; color: var(--text); text-decoration: none; }
.cloche-element a:hover { background: var(--bg); }
.cloche-element a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--bg); }
.cloche-icone { flex: none; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.cloche-urgent .cloche-icone { background: var(--cat-urgent-bg); color: var(--cat-urgent); }
.cloche-rappel .cloche-icone { background: var(--cat-journalier-bg); color: var(--primary); }
.cloche-commande .cloche-icone { background: var(--cat-commission-bg); color: var(--cat-commission); }
.cloche-demande .cloche-icone { background: var(--cat-important-bg); color: var(--cat-important); }   /* 0039 : demandes au bureau */
.cloche-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cloche-titre { font-size: 13.5px; font-weight: 700; }
.cloche-detail { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.cloche-vide, .cloche-reste, .cloche-erreur { margin: 0; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.cloche-vide { padding: 18px 14px; text-align: center; }
.cloche-erreur { color: var(--err); }
.cloche-reste a { color: var(--primary); font-weight: 600; }
.cloche-pied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); margin: 0; }
.cloche-pied .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cloche-message { font-size: 12.5px; color: var(--err); }
@media (max-width: 600px) {
    .cloche { position: static; }
    .cloche-panneau { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-width: none; z-index: 45; }
    .cloche-liste { max-height: calc(100vh - 250px); }
    .cloche-element a, .cloche-pied .btn { min-height: 44px; }
}
/* FIN — Cloche de l'en-tête v1
   ========================================================================================================== */



/* 20261102160000 : ligne de « Activité clients » repliable (parcours sur la boutique), bouton « Fiche client » séparé */
.activite-ligne-detail > summary { list-style: none; cursor: pointer; }
.activite-ligne-detail > summary::-webkit-details-marker { display: none; }
.activite-actions { display: inline-flex; align-items: center; gap: var(--esp-2); justify-self: end; }
.activite-ligne .activite-actions { grid-column: 2; grid-row: 1; }
@media (min-width: 720px) { .activite-ligne .activite-actions { grid-column: 3; } }
.activite-actions .activite-fleche { transition: transform .15s ease; }
.activite-ligne-detail[open] > summary .activite-fleche { transform: rotate(90deg); }
.activite-ligne-detail[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: var(--surface-alt); }
.activite-ligne-parcours { padding: var(--esp-3) var(--esp-4); border: 1px solid var(--line); border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--card); }
.activite-ligne-parcours .activite-boutique { margin: 0; }
.activite-parcours-liste { margin: 6px 0 0; padding-left: 22px; }
.activite-parcours-liste li { margin: 2px 0; overflow-wrap: anywhere; }
.activite-parcours > summary { cursor: pointer; font-weight: 600; margin-top: 6px; }

/* Retour en stock par WhatsApp (20261119135947) : même composant que « Client bien suivi », texte exact du message. */
.rsw-texte { margin: 0; padding: 10px 12px; border-left: 3px solid var(--ok); background: var(--cat-commission-bg); border-radius: 8px;
    white-space: pre-line; overflow-wrap: anywhere; }

/* 20261119143439 : tâches Important 🔥🔥 Bouillant / 🔥 Chaud (visites du site), maquette validée le 19/11/2026 */
.badge-chaleur { font-weight: 700; margin-left: 4px; }
.badge-bouillant { color: #b3261e; background: #fde8e3; }
.badge-chaud { color: #a45300; background: #fff3e6; }
.raison-chaleur { color: var(--text); }
.mission-chaleur { margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; border-left: 4px solid #a45300; background: #fff8f0; }
.mission-chaleur-bouillant { border-left-color: #b3261e; background: #fff3f0; }
.mission-chaleur .badge-chaleur { margin-left: 0; }
.mission-chaleur-produits { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.chaleur-produit { background: #e8edff; color: #3556d6; border-radius: 8px; padding: 2px 8px; }

/* « Mes demandes » (20261124111854) : onglets, tri par type, cartes de demande */
.md-onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.md-onglet { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 99px; padding: 7px 14px;
    font-weight: 700; text-decoration: none; min-height: var(--cible-min); display: inline-flex; align-items: center; gap: 6px; }
.md-onglet.actif { background: var(--primary); border-color: var(--primary); color: #fff; }
.md-n { opacity: .85; }
.md-filtres { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.md-chip { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 5px 11px;
    font: inherit; font-size: 13px; cursor: pointer; min-height: 32px; }
.md-chip.actif { background: var(--text); border-color: var(--text); color: #fff; }
.md-filtres-sep { margin-left: 12px; }   /* 20261125140000 : filtre « Réponse » de Mes demandes */
.md-liste { display: flex; flex-direction: column; gap: 10px; }
.md-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid;
    grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: start; }
.md-item[hidden] { display: none; }
.md-tete { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.md-pill { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.md-p-prix { background: var(--cat-mission-bg); color: var(--cat-mission); }
.md-p-stock { background: var(--cat-journalier-bg); color: var(--cat-journalier); }
.md-p-ok { background: var(--cat-commission-bg); color: var(--cat-commission); }
.md-p-ko { background: var(--cat-urgent-bg); color: var(--cat-urgent); }
.md-p-cp { background: var(--cat-important-bg); color: var(--cat-important); }
.md-p-wait { background: var(--line); color: var(--muted); }
.md-client { font-weight: 700; }
.md-detail, .md-meta { color: var(--muted); font-size: 13px; line-height: 1.5; }
.md-meta { font-size: 12px; margin-top: 6px; }
.md-reponse { margin-top: 8px; border-left: 3px solid var(--line); padding: 4px 10px; font-size: 13px; }
.md-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 640px) { .md-item { grid-template-columns: minmax(0, 1fr); } .md-actions { flex-direction: row; flex-wrap: wrap; } }
.adm-reponse-texte { width: 100%; max-width: 320px; margin-bottom: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }

/* Verdict d'un nouvel inscrit (25/11/2026) : boutons Viable / Non viable, raisons, case INNOKIN */
.rf-verdict-inscrit .rf-choix { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.rf-verdict-inscrit .rf-choix-non.selectionne { border-color: #c0392b; background: #fdecea; color: #c0392b; box-shadow: 0 0 0 1px #c0392b inset; }
.rf-verdict-inscrit .rf-case { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 4px 0; }
.rf-verdict-inscrit .rf-verdict-info { font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: var(--produit-bg); margin: 8px 0 0; }
.rf-verdict-inscrit .rf-verdict-info-ok { background: #e8f6ee; }
