/* Prospection CamaireTech — mobile d'abord (360 / 768 / 1280). Jetons en variables, clair + sombre. */
:root {
  color-scheme: light dark;
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8f9fb; --surface-3: #eceff4;
  --bord: #dfe3ea; --bord-fort: #7a8394;
  --ink: #101828; --ink-2: #3b4455; --ink-muted: #5b6577;
  --accent: #1d4f91; --on-accent: #ffffff; --accent-soft: #e6eef9;
  --ok: #1f7a3d; --ok-bg: #e4f4ea;
  --attention: #8a4f1d; --attention-bg: #fdf0df;
  --danger: #b42323; --danger-bg: #fbe7e7;
  --info: #1d4f91; --info-bg: #e6eef9;
  --ombre: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --rayon: 12px; --rayon-s: 8px;
  --police: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 60px;
  --sq-a: #e6eaf1; --sq-b: #f6f8fb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1217; --surface: #151a21; --surface-2: #1a2029; --surface-3: #222a35;
    --bord: #2a323e; --bord-fort: #7f8a9b;
    --ink: #e8ecf2; --ink-2: #c3cad6; --ink-muted: #9aa5b5;
    --accent: #7fb2f0; --on-accent: #0b1626; --accent-soft: #172637;
    --ok: #5ac47e; --ok-bg: #12301d;
    --attention: #f0b36b; --attention-bg: #35260f;
    --danger: #f27b7b; --danger-bg: #3a1717;
    --info: #8cbcf5; --info-bg: #172637;
    --ombre: none;
    --sq-a: #222a35; --sq-b: #2d3745;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--police); }
body.panneau-ouvert { overflow: hidden; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.sr-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cache { display: none !important; }

/* ---------- boutons & champs ---------- */
.btn, .btn-icone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--rayon-s);
  border: 1px solid var(--bord-fort); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; position: relative;
}
.btn:hover { background: var(--surface-3); }
.btn-primaire { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primaire:hover { background: var(--accent); filter: brightness(1.1); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.btn-lien { border-color: transparent; background: transparent; color: var(--accent); padding: 0 8px; }
.btn-icone { flex: none; width: 44px; padding: 0; border-color: transparent; background: transparent; }
.btn:disabled, .btn-icone:disabled { opacity: .55; cursor: not-allowed; }
.btn.occupe > svg { display: none; }
.btn.occupe::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--ink-muted); border-top-color: transparent; animation: tourne .8s linear infinite;
}
.btn-primaire.occupe::before { border-color: var(--on-accent); border-top-color: transparent; }
.btn-plein { width: 100%; min-height: 48px; font-size: 17px; }
.btn-danger-contour { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger-contour:hover { background: var(--danger-bg); }
.btn-retour { padding: 0 14px 0 8px; border-color: transparent; background: transparent; color: var(--accent); flex: none; }
.btn-fermer { display: none; }
@keyframes tourne { to { transform: rotate(360deg); } }

.saisie {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--rayon-s);
  border: 1px solid var(--bord-fort); background: var(--surface); color: var(--ink);
}
textarea.saisie { min-height: 96px; resize: vertical; line-height: 1.45; }
.champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.champ-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.champ-aide { font-size: 13px; color: var(--ink-muted); }
.rangee { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grille-champs { display: grid; gap: 12px; grid-template-columns: 1fr; }
.erreur-ligne { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--rayon-s); background: var(--danger-bg); color: var(--danger); font-size: 14px; margin-top: 8px; }
.erreur-ligne svg { flex: none; margin-top: 2px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge-neutre { background: var(--surface-3); color: var(--ink-2); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-attention { background: var(--attention-bg); color: var(--attention); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ---------- coque ---------- */
.coque { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.lateral { display: contents; }
.barre { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--bord); }
.barre-user { display: flex; align-items: center; gap: 4px; min-width: 0; }
.barre-user .nom { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 14px; color: var(--ink-muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--surface); border-top: 1px solid var(--bord); padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1 1 0; min-width: 0; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-muted); font-size: 12px; font-weight: 600; padding: 4px 2px; }
.nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] svg { stroke-width: 2.6; }
.nav .nav-desktop { display: none; }
.contenu { padding: 16px 12px 24px; width: 100%; min-width: 0; }
.entete-page { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.entete-page h1 { font-size: 22px; line-height: 1.25; }
.sous-titre { color: var(--ink-muted); font-size: 14px; }

/* ---------- cartes & sections ---------- */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); min-width: 0; }
.section { margin-bottom: 24px; min-width: 0; }
.section > h2 { font-size: 17px; margin-bottom: 10px; }
.section-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.section-tete h2 { font-size: 17px; }
.pile { display: flex; flex-direction: column; gap: 10px; }
.grille-cartes { display: grid; gap: 10px; grid-template-columns: 1fr; }
.texte-muted { color: var(--ink-muted); font-size: 14px; }
.cache-zone:empty { display: none; }

/* ---------- états ---------- */
.etat { padding: 28px 16px; text-align: center; border: 1px dashed var(--bord-fort); border-radius: var(--rayon); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.etat-titre { font-weight: 700; display: flex; align-items: center; gap: 6px; justify-content: center; }
.etat-texte { color: var(--ink-muted); max-width: 52ch; overflow-wrap: anywhere; }
.etat-erreur { border-style: solid; border-color: var(--danger); }
.etat-erreur .etat-titre { color: var(--danger); }
.etat-reussite { border-style: solid; border-color: var(--ok); }
.etat-reussite .etat-titre { color: var(--ok); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 8px; align-items: flex-start; max-width: 480px; width: 100%; padding: 12px 14px; border-radius: var(--rayon-s); background: var(--ink); color: var(--bg); font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); animation: monte .2s ease-out; }
.toast svg { flex: none; margin-top: 2px; }
.toast-erreur { background: var(--danger); color: #fff; }
@keyframes monte { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- connexion ---------- */

/* ---------- garde-fous ---------- */
.bandeau { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 14px; border-radius: var(--rayon); border: 2px solid var(--danger); background: var(--danger-bg); color: var(--ink); margin-bottom: 12px; }
.bandeau > svg { flex: none; color: var(--danger); margin-top: 2px; }
.bandeau-texte { flex: 1 1 220px; min-width: 0; }
.bandeau-titre { font-weight: 800; color: var(--danger); font-size: 17px; }
.bandeau-texte p { overflow-wrap: anywhere; }
.bandeau-attention { border-color: var(--attention); background: var(--attention-bg); }
.bandeau-attention > svg, .bandeau-attention .bandeau-titre { color: var(--attention); }
.jauge { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.jauge > i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 4px; }
.jauge.pleine > i { background: var(--attention); }
.garde-grille { display: grid; gap: 10px; grid-template-columns: 1fr; }
.garde-grille h3 { font-size: 15px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; padding: 3px 0; }
.kv span:first-child { color: var(--ink-muted); }
.kv span:last-child { text-align: right; overflow-wrap: anywhere; }

/* ---------- entonnoir ---------- */
.entonnoir { display: flex; flex-direction: column; gap: 10px; }
.etage { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: baseline; }
.etage .lib { font-size: 15px; }
.etage .val { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.etage .piste { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.etage .piste > i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 5px; min-width: 2px; }
.etage .pct { font-weight: 500; font-size: 13px; color: var(--ink-muted); margin-left: 6px; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- à relancer & activité ---------- */
.rel-carte { display: flex; flex-direction: column; gap: 10px; }
.rel-tete { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.rel-nom { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.rel-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.citation { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--rayon-s) var(--rayon-s) 0; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.citation .etiquette { display: block; font-size: 12px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.activite li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bord); align-items: baseline; flex-wrap: wrap; }
.activite li:last-child { border-bottom: 0; }
.activite .quand { font-size: 13px; color: var(--ink-muted); flex: none; min-width: 90px; }
.activite .quoi { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.activite a { font-weight: 600; }

/* ---------- barre d'outils & listes ---------- */
.outils { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.outils .champ-recherche { grid-column: 1 / -1; position: relative; }
.outils .champ-recherche svg { position: absolute; left: 12px; top: 12px; color: var(--ink-muted); }
.outils .champ-recherche input { padding-left: 38px; }
.rang { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); text-decoration: none; color: var(--ink); min-height: 44px; min-width: 0; }
.rang:hover { background: var(--surface-2); }
.rang .c-nom { flex: 1 1 100%; font-weight: 700; overflow-wrap: anywhere; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.rang .c { font-size: 14px; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.rang .c[data-label]::before { content: attr(data-label) " : "; color: var(--ink-muted); }
.entete-liste { display: none; }
.liste-prospects { display: flex; flex-direction: column; gap: 8px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- panneau ---------- */
.panneau-fond { position: fixed; inset: 0; z-index: 40; background: rgba(8, 12, 18, .5); opacity: 0; transition: opacity .2s; }
.panneau-fond.ouvert { opacity: 1; }
.panneau { position: fixed; z-index: 50; inset: 0; background: var(--bg); display: flex; flex-direction: column; transform: translateY(24px); opacity: 0; transition: transform .2s ease-out, opacity .2s; }
.panneau.ouvert { transform: none; opacity: 1; }
.panneau-tete { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 8px 12px 8px 4px; background: var(--surface); border-bottom: 1px solid var(--bord); }
.panneau-titres { min-width: 0; flex: 1; }
.panneau-titre { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.panneau-sous { color: var(--ink-muted); font-size: 14px; }
.panneau-sous:empty { display: none; }
.panneau-corps { flex: 1; overflow-y: auto; padding: 16px 12px 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; overscroll-behavior: contain; }
.bloc { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; min-width: 0; }
.bloc > h3 { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.coord { display: grid; grid-template-columns: 1fr; gap: 4px; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { padding: 4px 12px; border-radius: 999px; background: var(--surface-3); font-size: 14px; }
.puce-principal { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.lien { display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }

/* chronologie */
.fil { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 15px; }
.msg .qui { display: block; font-size: 12px; font-weight: 700; color: var(--ink-muted); margin-bottom: 2px; white-space: normal; }
.msg-prospect { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; }
.msg-nous { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.msg-patron { align-self: flex-end; background: var(--surface-2); border: 1px dashed var(--accent); border-bottom-right-radius: 4px; }
.evt { align-self: center; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--info-bg); padding: 4px 12px; border-radius: 999px; text-align: center; overflow-wrap: anywhere; }
.evt-danger { background: var(--danger-bg); color: var(--danger); }
.apercu { background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--rayon-s); padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.apercu .sujet { display: block; font-weight: 700; margin-bottom: 6px; white-space: normal; }
.bouton-apercu { display: inline-block; margin: 6px 6px 0 0; padding: 6px 12px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); font-size: 14px; background: var(--surface); }
.analyse-lignes { display: flex; flex-direction: column; gap: 8px; }
.analyse-lignes ul { list-style: disc; padding-left: 20px; }

/* sous-onglets */
.onglets { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.onglet { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bord-fort); background: var(--surface); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.onglet[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.envoi-carte { display: flex; flex-direction: column; gap: 10px; }
.envoi-nom { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }

/* ---------- boîte de dialogue ---------- */
.dlg { border: 0; padding: 0; border-radius: var(--rayon); background: var(--surface); color: var(--ink); width: min(440px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(8, 12, 18, .6); }
.dlg-corps { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dlg-corps h2 { font-size: 18px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* ---------- bibliothèque, file, récolte, équipe ---------- */
.carte-bouton { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; width: 100%; color: var(--ink); font: inherit; }
.carte-bouton:hover { background: var(--surface-2); }
.extrait { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.compteurs { margin: 0 0 12px; }
.filtres-modeles { grid-template-columns: 1fr 1fr; }
.carte-ligne { display: flex; flex-direction: column; gap: 8px; }
.progression { display: flex; flex-direction: column; gap: 8px; }

/* ---------- plus ---------- */
.menu-plus { display: flex; flex-direction: column; gap: 8px; }
.menu-plus a, .menu-plus button { justify-content: flex-start; width: 100%; }

/* ---------- refonte ergonomique ---------- */
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear, input::-ms-clear { display: none; }
.saisie { font-size: 16px; }
.saisie:focus-visible { outline-offset: 0; border-color: var(--accent); }
select.saisie { padding-right: 8px; }

/* logo : PNG net, variante sombre servie par <picture>, jamais d'encadré blanc */
.logo { display: inline-block; line-height: 0; }
.logo img { display: block; height: 28px; width: auto; max-width: 100%; }
.connexion-tete .logo img { height: 36px; }
.demarrage { color: var(--ink-muted); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 64px 16px; }
.demarrage .logo img { height: 36px; }

/* squelettes : forme du contenu final, shimmer doux */
.sq, .sq-carte .sq { background: linear-gradient(90deg, var(--sq-a) 25%, var(--sq-b) 50%, var(--sq-a) 75%); background-size: 200% 100%; animation: brille 1.6s ease-in-out infinite; border-radius: 6px; }
.squelette { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sq-carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sq-ligne { height: 12px; }
.sq-titre { height: 18px; }
.sq-w40 { width: 40%; } .sq-w55 { width: 55%; } .sq-w60 { width: 60%; } .sq-w70 { width: 70%; } .sq-w75 { width: 75%; } .sq-w90 { width: 90%; }
.sq-pastilles { display: flex; gap: 8px; background: none !important; animation: none !important; }
.sq-pastille { width: 90px; height: 24px; border-radius: 999px; }
.sq-court { width: 56px; }
.sq-bloc-texte { height: 64px; border-radius: var(--rayon-s); }
.sq-bouton { width: 160px; max-width: 100%; height: 44px; border-radius: var(--rayon-s); }
.sq-large { width: 140px; }
.sq-barre { height: 10px; border-radius: 5px; }
.sq-msg { height: 46px; width: 70%; border-radius: 14px; }
.sq-droite { margin-left: auto; width: 60%; }
.sq-demarrage { width: 200px; }
@keyframes brille { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.tableau-colonnes > .pile, .tableau-colonnes > div { min-width: 0; }

/* connexion */
.connexion { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(900px 420px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.connexion-carte { width: 100%; max-width: 420px; padding: 24px 20px; border-radius: 16px; box-shadow: 0 8px 28px rgba(16, 24, 40, .10), var(--ombre); }
.connexion-tete { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 20px; }
.connexion-tete h1 { font-size: 24px; line-height: 1.25; margin-top: 8px; }
.connexion-tete .sous-titre { font-size: 15px; }
.connexion-form { display: flex; flex-direction: column; gap: 16px; }
.connexion-form .saisie { min-height: 48px; }
.info-ligne { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--rayon-s); background: var(--info-bg); color: var(--info); font-size: 14px; margin-bottom: 16px; }
.info-ligne svg { flex: none; margin-top: 2px; }

/* champ mot de passe avec œil */
.mdp-champ { position: relative; display: block; min-width: 0; }
.mdp-champ .saisie { min-height: 48px; padding-right: 52px; }
.oeil { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--rayon-s); background: transparent; color: var(--ink-muted); cursor: pointer; padding: 0; }
.oeil:hover { color: var(--ink); background: var(--surface-3); }
.oeil[aria-pressed="true"] { color: var(--accent); }
.mdp-ligne { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mdp-ligne .mdp-champ { flex: 1 1 220px; }

.compte-carte { max-width: 480px; margin-bottom: 12px; }
.compte-form .saisie { min-height: 48px; }

/* aide, fenêtres, actions */
.aide { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 15px; margin: -4px 0 16px; max-width: 70ch; }
.aide svg { flex: none; margin-top: 2px; color: var(--accent); }
.fenetre { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--rayon-s); background: var(--surface-3); color: var(--ink-2); font-size: 14px; }
.fenetre svg { flex: none; margin-top: 3px; }
.fenetre-ok { background: var(--ok-bg); color: var(--ok); }
.ligne-ic { display: flex; gap: 6px; align-items: center; }
.carte-action { border-left: 4px solid var(--accent); margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.carte-action h2 { font-size: 19px; }
.actions-liste { display: flex; flex-direction: column; gap: 10px; }
.actions-liste li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.action-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.action-texte { flex: 1 1 200px; min-width: 0; font-weight: 600; }
.actions-liste .btn { flex: 0 0 auto; }
.note-pct { margin-top: 12px; font-size: 13px; }
.bloc-actions { margin-bottom: 10px; }
.details > summary { list-style: none; cursor: pointer; display: inline-flex; }
.details > summary::-webkit-details-marker { display: none; }
.details[open] > summary { margin-bottom: 8px; }
.case { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.case input { width: 24px; height: 24px; flex: none; accent-color: var(--accent); }
.modele-titre { font-weight: 700; overflow-wrap: anywhere; }
.rel-nom, .envoi-nom { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: none; }
.rel-nom:hover, .envoi-nom:hover { text-decoration: underline; }
p.rel-nom { color: var(--ink); min-height: 0; }
.activite a { display: inline-flex; align-items: center; min-height: 44px; }
.kv .lien { min-height: 44px; }
.etat-reussite .btn { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .sq, .sq-carte .sq { animation: none; background: var(--sq-a); }
  .btn.occupe::before { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}

@media (max-width: 479.98px) { .barre-user .nom { display: none; } }

/* ---------- 768 px ---------- */
@media (min-width: 768px) {
  .contenu { padding: 24px 24px 32px; }
  .grille-champs { grid-template-columns: 1fr 1fr; }
  .grille-champs .large { grid-column: 1 / -1; }
  .grille-cartes { grid-template-columns: 1fr 1fr; }
  .garde-grille { grid-template-columns: 1fr 1fr; }
  .outils { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .outils .champ-recherche { grid-column: 1 / -1; }
  .filtres-modeles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toasts { left: auto; right: 24px; align-items: flex-end; }
  .entete-liste, .rang.tableau { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1.3fr); gap: 12px; align-items: center; }
  .c-ville, .c-contact, .c-derniere-mobile, .c-statut-mobile { display: none !important; }
  .sous-tablette { display: block; }
  .grille-reglages { grid-template-columns: 1fr 1fr; }
  .entete-liste { padding: 0 14px 6px; font-size: 13px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
  .rang .c-nom { flex: initial; display: block; }
  .rang .c[data-label]::before { content: none; }
  .coord { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
  .rang .c-statut-colonne { display: none; }
}

/* ---------- 1024 px : navigation latérale, panneau à droite ---------- */
@media (min-width: 1024px) {
  .coque { display: grid; grid-template-columns: 232px minmax(0, 1fr); padding-bottom: 0; }
  .lateral { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; background: var(--surface); border-right: 1px solid var(--bord); padding: 16px 12px; gap: 16px; }
  .barre { position: static; border: 0; padding: 0; flex-direction: column; align-items: flex-start; background: transparent; }
  .barre-user { width: 100%; justify-content: space-between; }
  .barre-user .nom { max-width: 130px; }
  .nav { position: static; flex-direction: column; border: 0; padding: 0; gap: 4px; background: transparent; flex: 1; }
  .nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--rayon-s); font-size: 15px; }
  .nav a[aria-current="page"] { background: var(--accent-soft); }
  .nav .nav-mobile { display: none; }
  .nav .nav-desktop { display: flex; }
  .toasts { bottom: 24px; }
  .btn-retour { display: none; }
  .btn-fermer { display: inline-flex; }
  .panneau-tete { padding-left: 16px; }
  .contenu { padding: 28px 32px 40px; }
  .rang.tableau, .entete-liste { grid-template-columns: minmax(0, 1.8fr) minmax(0, .9fr) minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.5fr); }
  .c-ville, .c-contact { display: block !important; }
  .sous-tablette { display: none !important; }
  .panneau { inset: 0 0 0 auto; width: min(760px, 100%); box-shadow: -8px 0 32px rgba(0, 0, 0, .25); transform: translateX(32px); }
  .panneau.ouvert { transform: none; }
  .grille-cartes.trois { grid-template-columns: 1fr 1fr 1fr; }
  .filtres-modeles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tableau-colonnes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* ---------- refonte 2 : pleine largeur, liste enrichie, fiche autour d'une action ---------- */
.aide-etapes { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--accent); }
.aide-etapes h2 { font-size: 19px; }
.aide-liste { display: grid; gap: 12px; counter-reset: etape; padding: 0; list-style: none; margin: 0; }
.aide-liste li { display: flex; gap: 12px; align-items: flex-start; counter-increment: etape; }
.aide-num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.aide-num::before { content: counter(etape); }
.aide-t { font-weight: 700; }
@media (min-width: 1024px) { .aide-liste { grid-template-columns: repeat(5, minmax(0, 1fr)); } .aide-liste li { flex-direction: column; } }

/* liste : colonnes Services / À faire */
.nom-ligne { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.nom-txt { font-weight: 700; overflow-wrap: anywhere; }
.nom-note { font-size: 13px; }
.sous-tablette { display: none; font-size: 13px; }
.puces .puce { padding: 2px 10px; font-size: 13px; }
.afaire { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.afaire-oui { background: var(--accent-soft); color: var(--accent); }
.afaire-rien { background: var(--surface-3); color: var(--ink-muted); font-weight: 600; }
.rang .c-services { flex: 1 1 100%; }
.rang .c-derniere-mobile { flex: 1 1 100%; font-size: 13px; }
.rang .c-nom { flex: 1 1 100%; display: block; }
.c-statut-mobile .badge { white-space: nowrap; }

/* fiche */
.fiche-tete { display: flex; flex-direction: column; gap: 12px; }
.carte-etape { border: 2px solid var(--accent); display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; }
.etiquette-etape { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.etape-titre { font-size: 26px; line-height: 1.2; }
.etape-explication { font-size: 16px; color: var(--ink-2); max-width: 70ch; }
.btn-gros { min-height: 52px; padding: 0 24px; font-size: 17px; width: 100%; }
@media (min-width: 768px) { .btn-gros { width: auto; } .etape-titre { font-size: 30px; } }
.onglets-canal { margin-bottom: 0; }
.onglet:disabled { opacity: .5; cursor: not-allowed; border-style: dashed; }
.fenetre-att { background: var(--attention-bg); color: var(--attention); }
.fenetre-dan { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.deja-prevu { padding: 4px 0; }

/* aperçu façon WhatsApp et e-mail */
:root { --wa-fond: #e8e0d5; --wa-bulle: #ffffff; --wa-ink: #111b21; --wa-muted: #5b6770; --wa-bouton: #027eb5; --wa-bord: #d6dbdf; }
@media (prefers-color-scheme: dark) { :root { --wa-fond: #0b141a; --wa-bulle: #202c33; --wa-ink: #e9edef; --wa-muted: #9fb0b9; --wa-bouton: #53bdeb; --wa-bord: #35454e; } }
.wa-fond { background: var(--wa-fond); border-radius: var(--rayon); padding: 16px 12px; border: 1px solid var(--bord); }
.wa-bulle { background: var(--wa-bulle); color: var(--wa-ink); border-radius: 10px 10px 10px 2px; max-width: min(100%, 440px); padding: 8px 10px 6px; box-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
.wa-corps { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.wa-pied { margin-top: 6px; font-size: 12px; color: var(--wa-muted); overflow-wrap: anywhere; }
.wa-boutons { margin: 8px -10px -6px; display: flex; flex-direction: column; border-top: 1px solid var(--wa-bord); }
.wa-bouton { text-align: center; padding: 10px 8px; min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--wa-bouton); font-weight: 600; font-size: 15px; }
.wa-bouton + .wa-bouton { border-top: 1px solid var(--wa-bord); }
.mail-apercu { background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.mail-objet { padding: 10px 14px; font-weight: 700; border-bottom: 1px solid var(--bord); overflow-wrap: anywhere; }
.mail-corps { padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; max-width: 80ch; }
.sq-haut { height: 140px; }

/* liste de messages à choisir */
.liste-messages { display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed var(--bord-fort); padding-top: 12px; }
.choix-modele { min-height: 44px; }
.choix-modele[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.choix-modele:disabled { opacity: .6; cursor: not-allowed; }
@media (min-width: 1024px) { .liste-messages .pile { display: grid; grid-template-columns: 1fr 1fr; } }

/* repliables */
.repliable { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); }
.repliable > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 14px; cursor: pointer; font-weight: 700; font-size: 16px; border-radius: var(--rayon); }
.repliable > summary::-webkit-details-marker { display: none; }
.repliable > summary:hover { background: var(--surface-2); }
.repliable > summary svg { flex: none; transition: transform .15s; color: var(--ink-muted); }
.repliable[open] > summary svg { transform: rotate(180deg); }
.repliable-corps { padding: 4px 14px 16px; }
.sous-bloc { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--bord); }
.sous-bloc:last-child { border-bottom: 0; padding-bottom: 0; }
.sous-bloc h4 { font-size: 15px; margin: 0; }
.fil { max-height: 60vh; overflow-y: auto; }

/* réglages */
.grille-reglages { display: grid; gap: 12px; align-items: start; }
.carte-reglage { display: flex; flex-direction: column; gap: 12px; }
.carte-reglage h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.carte-reglage h2 .badge { margin-left: auto; }
.carte-reglage form .btn { align-self: flex-start; }
@media (min-width: 1024px) { .grille-reglages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .grille-reglages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.choix-modele .badge, .badge-large { white-space: normal; text-align: left; }
.choix-modele .rangee { min-width: 0; }
