/* Portail du projet — design system « compte sobre » (structure relevée sur un espace client de référence,
   rendue avec notre charte : nuit bleue, bleu de confiance). Fond sombre, barre du haut, barre latérale fixe
   identique sur toutes les pages, colonne centrale étroite, cartes à plat, filets fins, boutons à filet. */
:root {
  /* Charte */
  --nuit: #050B16; --panneau: #0D1626; --panneau-2: #132036; --panneau-3: #1A2A44;
  --remplissage: rgba(214, 228, 255, .07); --actif: rgba(214, 228, 255, .14);
  --ligne: rgba(214, 228, 255, .12); --ligne-forte: rgba(214, 228, 255, .42);
  --texte: #F3F6FB; --texte-2: rgba(243, 246, 251, .72); --texte-3: #8E9BB2;
  --accent: #4F8BFF; --accent-fort: #2F6BEA; --accent-doux: rgba(79, 139, 255, .16); --accent-texte: #A9C5FF;
  --vert: #7FD3A3; --vert-ligne: rgba(127, 211, 163, .6); --vert-fond: rgba(127, 211, 163, .1);
  --orange: #F2B766; --orange-ligne: rgba(242, 183, 102, .6); --orange-fond: rgba(242, 183, 102, .1);
  --rouge: #F48C82; --rouge-ligne: rgba(244, 140, 130, .6); --rouge-fond: rgba(244, 140, 130, .1);
  /* Mesures */
  --r: 6px; --r-petit: 4px; --haut: 64px; --nav: 224px;
  --police: Barlow, "DIN Alternate", "Helvetica Neue", Arial, system-ui, sans-serif;
  /* Compatibilité avec les anciens noms */
  --fond: var(--nuit); --plateau: var(--panneau); --survol: var(--remplissage); --bord: var(--ligne); --bord-doux: var(--ligne);
  --bord-champ: var(--ligne-forte); --pointilles: var(--ligne); --bleu: var(--accent); --bleu-fonce: var(--accent-fort);
  --bleu-doux: var(--accent-doux); --bleu-texte: var(--accent-texte); --trait: var(--accent); --marine: var(--panneau-3);
  --gris-fond: var(--remplissage); --ombre: none; --ombre-carte: none;
  --anneaux: rgba(169, 197, 255, .07); --principal-survol: #fff; --bulle-moi: #1E3E7A; --fond-piece: rgba(0, 0, 0, .22);
  color-scheme: dark;
}
/* Mode clair (Paramètres d’affichage, menu du compte) : même structure, mêmes couleurs de marque, fond blanc */
:root[data-theme="light"] {
  --nuit: #FFFFFF; --panneau: #F2F5F9; --panneau-2: #E9EEF4; --panneau-3: #DCE4EE;
  --remplissage: rgba(11, 31, 58, .05); --actif: rgba(11, 31, 58, .08);
  --ligne: rgba(11, 31, 58, .13); --ligne-forte: rgba(11, 31, 58, .4);
  --texte: #0B1626; --texte-2: rgba(11, 22, 38, .74); --texte-3: #5A6678;
  --accent: #1D4ED8; --accent-fort: #1E3A8A; --accent-doux: rgba(29, 78, 216, .1); --accent-texte: #1D4ED8;
  --vert: #067647; --vert-ligne: rgba(6, 118, 71, .55); --vert-fond: rgba(6, 118, 71, .08);
  --orange: #B54708; --orange-ligne: rgba(181, 71, 8, .55); --orange-fond: rgba(181, 71, 8, .07);
  --rouge: #B42318; --rouge-ligne: rgba(180, 35, 24, .55); --rouge-fond: rgba(180, 35, 24, .07);
  --anneaux: rgba(29, 78, 216, .08); --principal-survol: #1E2A3D; --bulle-moi: #DCE7FE; --fond-piece: rgba(11, 31, 58, .06);
  color-scheme: light;
}
:root[data-theme="light"] .av.c0 { background: #DCE7FE; } :root[data-theme="light"] .av.c1 { background: #EDE3FB; } :root[data-theme="light"] .av.c2 { background: #D9F2E3; }
:root[data-theme="light"] .av.c3 { background: #E4E7FB; } :root[data-theme="light"] .av.c4 { background: #FCE1E4; } :root[data-theme="light"] .av.c5 { background: #E3E8EF; }
:root[data-theme="light"] .btn.principal:hover, :root[data-theme="light"] .btn-google:hover { color: #fff; }
:root[data-theme="light"] dialog::backdrop, :root[data-theme="light"] body.nav-ouverte .nav-voile { background: rgba(11, 22, 38, .45); }
:root[data-theme="light"] dialog, :root[data-theme="light"] .compte-menu, :root[data-theme="light"] .liste-deroulante, :root[data-theme="light"] .wa-menu-liste { background: #fff; box-shadow: 0 0 0 1px var(--ligne), 0 18px 40px rgba(11, 22, 38, .16); }
:root[data-theme="light"] .scene.appareil iframe { box-shadow: 0 0 0 8px #0B1626, 0 0 0 9px var(--ligne-forte); }
/* Choix du thème dans le menu du compte */
.reglage { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.reglage > span { font-size: 13px; color: var(--texte-3); }
.reglage .segment { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--nuit); color: var(--texte); font: 400 16px/1.5 var(--police); letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-texte); }
a:hover { color: var(--texte); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-petit); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { display: inline-flex; flex-shrink: 0; }
kbd { font: 600 11px/1 var(--police); padding: 3px 5px; border: 1px solid var(--ligne); border-radius: 4px; color: var(--texte-3); }
::selection { background: var(--accent-doux); }
select option, select optgroup { background: var(--panneau); color: var(--texte); }

/* ============ Cadre : barre du haut, barre latérale fixe, colonne centrale ============ */
.cadre { min-height: 100vh; display: flex; flex-direction: column; position: relative; isolation: isolate; }
.cadre::after { content: ""; position: fixed; z-index: -1; pointer-events: none; width: 560px; height: 560px; right: 6vw; bottom: -120px; border-radius: 50%;
  background: repeating-radial-gradient(circle at 46% 38%, var(--anneaux) 0 1px, transparent 1px 6px);
  -webkit-mask: radial-gradient(circle, #000 0 60%, transparent 71%); mask: radial-gradient(circle, #000 0 60%, transparent 71%); }
.haut { position: sticky; top: 0; z-index: 40; height: var(--haut); display: flex; align-items: center; gap: 32px; padding: 0 24px 0 36px; background: var(--nuit); }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none; font: 700 19px/1 var(--police); letter-spacing: .32em; text-transform: uppercase; white-space: nowrap; }
.marque:hover { color: var(--texte); }
.marque i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-doux); }
.haut-nav { display: flex; gap: 22px; }
.haut-nav a { color: var(--texte); font-size: 15px; font-weight: 700; text-decoration: none; }
.haut-nav a:hover, .haut-nav a[aria-current="page"] { color: var(--accent-texte); }
.haut-fin { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.burger { display: none; width: 40px; height: 40px; border: 0; border-radius: var(--r); background: none; color: var(--texte); place-items: center; cursor: pointer; }
.burger:hover { background: var(--remplissage); }
.corps-cadre { flex: 1 1 auto; display: grid; grid-template-columns: calc(var(--nav) + 64px) minmax(0, 1fr); }
.nav { position: sticky; top: var(--haut); align-self: start; height: calc(100vh - var(--haut)); padding: 6px 31px 24px 32px; border-right: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.nav-corps { display: flex; flex-direction: column; gap: 0; }
.nav-titre { margin: 18px 16px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); }
.nav-lien { display: flex; align-items: center; gap: 18px; min-height: 48px; padding: 8px 12px 8px 16px; border-radius: var(--r); color: var(--texte-2); font-size: 16px; text-decoration: none; }
.nav-lien .ico { color: var(--texte-2); }
.nav-lien:hover { background: var(--remplissage); color: var(--texte); }
.nav-lien[aria-current="page"] { background: var(--actif); color: var(--texte); }
.nav-lien[aria-current="page"] .ico { color: var(--texte); }
.nav-lien .nom { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-lien .compte-nb { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font: 700 12px/22px var(--police); text-align: center; }
.nav-pied { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.nav-aide { padding: 14px 16px; border: 1px solid var(--ligne); border-radius: var(--r); font-size: 13px; color: var(--texte-2); display: flex; flex-direction: column; gap: 4px; }
.nav-aide strong { color: var(--texte); font-size: 14px; }
.nav-aide a { font-weight: 600; text-decoration: none; }
.nav-projet { font-size: 12px; color: var(--texte-3); padding: 0 16px; }
.nav-voile { display: none; }
.zone { min-width: 0; display: flex; flex-direction: column; }
.page-col { width: 100%; max-width: 1200px; margin: 0 auto; padding: 16px 40px 72px; display: flex; flex-direction: column; }
.page-col.etroit { max-width: 930px; }
.page-col.plein { max-width: none; padding: 12px 24px 24px; }
.bandeau-apercu { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 40px 0; padding: 12px 16px; background: var(--accent-doux); border-radius: var(--r); color: var(--accent-texte); font-size: 14px; }
.bandeau-apercu a { margin-left: auto; color: var(--texte); font-weight: 700; text-decoration: none; }
.tete-page { padding: 20px 0 24px; display: flex; flex-direction: column; gap: 16px; }
.ligne-titre-page { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.ligne-titre-page h1 { font-size: 32px; line-height: 1.16; font-weight: 700; letter-spacing: 0; }
.sous-titre { margin: 8px 0 0; font-size: 16px; color: var(--texte-2); }
.groupe-droite { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.barre-outils { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.barre-outils .groupe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.corps-page { display: flex; flex-direction: column; gap: 32px; }
.pied-cadre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 20px 24px; border-top: 1px solid var(--ligne); font-size: 12px; color: var(--texte-3); }
.pied-cadre span:first-child { margin-right: auto; }
.pied-cadre a { color: var(--texte-2); text-decoration: none; }
.pied-cadre a:hover { color: var(--texte); }

/* Compte (avatar en haut à droite) */
.compte { position: relative; }
.compte > summary { list-style: none; cursor: pointer; border-radius: 50%; }
.compte > summary::-webkit-details-marker { display: none; }
.compte-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--police); background: var(--panneau-3); color: var(--texte); }
.compte > summary:hover .compte-av, .compte[open] .compte-av { box-shadow: 0 0 0 2px var(--ligne-forte); }
.compte-menu { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: 280px; background: var(--panneau); border: 1px solid var(--ligne); border-radius: var(--r); padding: 6px; display: flex; flex-direction: column; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.compte-id { padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.compte-id strong { font-size: 15px; }
.compte-id small, .compte-role { font-size: 13px; color: var(--texte-3); overflow-wrap: anywhere; }
.compte-role { padding: 0 10px 8px; }
.compte-menu a, .compte-menu button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-petit); font-size: 15px; color: var(--texte); text-decoration: none; cursor: pointer; text-align: left; }
.compte-menu a:hover, .compte-menu button:hover { background: var(--remplissage); }
.compte-menu .danger { color: var(--rouge); }
.compte-menu hr { border: 0; border-top: 1px solid var(--ligne); margin: 6px 0; width: 100%; }

/* ============ Boutons (filet fin, texte gras) ============ */
.btn { min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-petit); border: 1px solid var(--ligne-forte); background: transparent; color: var(--texte); font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .12s ease-in-out; }
.btn:hover { background: var(--remplissage); color: var(--texte); }
.btn .ico { color: inherit; }
.btn[aria-pressed="true"] { background: var(--actif); }
.btn.principal { background: var(--texte); border-color: var(--texte); color: var(--nuit); }
.btn.principal:hover { background: var(--principal-survol); color: var(--nuit); }
.btn.accent, .btn.fonce { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover, .btn.fonce:hover { background: var(--accent-fort); color: #fff; }
.btn.petit { min-height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn.grand { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.carre { width: 32px; padding: 0; }
.btn.discret { border-color: transparent; color: var(--texte-2); }
.btn.discret:hover { color: var(--texte); }
.btn.danger { color: var(--rouge); }
.btn:disabled, .btn[aria-disabled="true"] { border-color: var(--ligne); color: var(--texte-3); background: transparent; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
details.deroulant { position: relative; }
details.deroulant > summary { list-style: none; }
details.deroulant > summary::-webkit-details-marker { display: none; }
.liste-deroulante { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--panneau); border: 1px solid var(--ligne); border-radius: var(--r); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.liste-deroulante.droite { left: auto; right: 0; }
.liste-deroulante button, .liste-deroulante a { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-petit); font-size: 14px; color: var(--texte); text-align: left; cursor: pointer; text-decoration: none; }
.liste-deroulante button:hover, .liste-deroulante a:hover { background: var(--remplissage); }
.liste-deroulante [aria-checked="true"] { font-weight: 700; color: var(--accent-texte); }
.icone-btn { width: 32px; height: 32px; border: 0; background: none; border-radius: var(--r-petit); display: grid; place-items: center; color: var(--texte-2); cursor: pointer; }
.icone-btn:hover { background: var(--remplissage); color: var(--texte); }

/* ============ Cartes à plat, tuiles, solde ============ */
.carte { background: var(--panneau); border-radius: var(--r-petit); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.carte.accent { box-shadow: inset 0 0 0 1px var(--accent-doux); }
.carte.plate, .carte.filet { background: transparent; box-shadow: inset 0 0 0 1px var(--ligne); }
.solde { display: flex; flex-direction: column; gap: 8px; }
.solde .lab, .lab { font-size: 14px; color: var(--texte-2); }
.montant { font: 300 36px/1.2 var(--police); letter-spacing: 0; display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.montant .ok { color: var(--vert); }
.trois { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tuile { display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 16px; border-radius: var(--r-petit); box-shadow: inset 0 0 0 1px var(--ligne); color: var(--texte); text-decoration: none; transition: background-color .12s ease-in-out; }
.tuile:hover { background: var(--remplissage); color: var(--texte); }
.tuile .ico { color: var(--texte-2); }
.tuile b { display: block; font-size: 16px; font-weight: 700; }
.tuile small { display: block; font-size: 14px; color: var(--texte-3); }
.tuile .nb { margin-left: auto; }
.banniere { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--r-petit); background: var(--panneau); box-shadow: inset 3px 0 0 var(--accent); font-size: 14px; color: var(--accent-texte); }
.banniere b { display: block; color: var(--texte); font-size: 14px; }
.banniere .btn { margin-left: auto; }
.section { display: flex; flex-direction: column; gap: 14px; }
.section-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-tete h2, .titre-trait h2, .h2 { font-size: 18px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.titre-trait { display: flex; align-items: center; gap: 10px; }
.ligne-titre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.meta { font-size: 14px; color: var(--texte-3); }
.vide { color: var(--texte-3); font-size: 14px; padding: 8px 0; margin: 0; }
.alerte { padding: 12px 14px; border-radius: var(--r-petit); font-size: 14px; background: var(--accent-doux); color: var(--accent-texte); }
.deux { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.deux > .principal { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.deux > .cote { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ============ Pastilles (filet coloré) ============ */
.pastille { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 13px; font-weight: 500; min-height: 28px; padding: 0 11px; border-radius: 16px; border: 1px solid var(--ligne-forte); color: var(--texte-2); background: transparent; }
.pastille.vert { border-color: var(--vert-ligne); color: var(--vert); }
.pastille.orange { border-color: var(--orange-ligne); color: var(--orange); }
.pastille.rouge { border-color: var(--rouge-ligne); color: var(--rouge); }
.pastille.bleu { border-color: rgba(79, 139, 255, .6); color: var(--accent-texte); }
.puce { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--remplissage); color: var(--texte-2); }
.puce.bleu { background: var(--accent-doux); color: var(--accent-texte); }
.puce.rouge { background: var(--rouge-fond); color: var(--rouge); }
.puce.vert { background: var(--vert-fond); color: var(--vert); }
.point-etat { width: 7px; height: 7px; border-radius: 999px; background: var(--vert); flex-shrink: 0; }
.point-etat.bleu { background: var(--accent); }
.point-etat.orange { background: var(--orange); }

/* ============ Tableaux (en-tête sur panneau, lignes à filet) ============ */
.tableau { border-radius: var(--r-petit); box-shadow: inset 0 0 0 1px var(--ligne); overflow: hidden; }
.defile { overflow-x: auto; }
table.liste { width: 100%; border-collapse: collapse; font-size: 14px; }
table.liste th { text-align: left; font-size: 14px; font-weight: 400; color: var(--texte); background: var(--panneau); height: 40px; padding: 0 12px; white-space: nowrap; }
table.liste td { padding: 12px; border-top: 1px solid var(--ligne); vertical-align: middle; color: var(--texte); }
table.liste td.num, table.liste th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.liste td.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--texte-2); }
table.liste tr.cliquable { cursor: pointer; }
table.liste tr.cliquable:hover td, table.liste tbody tr:hover td { background: var(--remplissage); }
.recherche-barre { display: flex; gap: 8px; align-items: center; }
.recherche, .champ-recherche { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; background: var(--panneau); border-radius: var(--r-petit); color: var(--texte-3); min-width: 220px; }
.recherche input, .champ-recherche input { border: 0; background: transparent; font-size: 15px; flex-grow: 1; min-width: 0; outline: none; color: var(--texte); }
.recherche input::placeholder, .champ-recherche input::placeholder { color: var(--texte-3); }
.recherche:focus-within, .champ-recherche:focus-within { box-shadow: inset 0 0 0 1px var(--ligne-forte); }
.recherche kbd { margin-left: 4px; }

/* ============ Tâches (pipeline) et questions : cartes à plat avec étiquette ============ */
.colonnes { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 16px; min-width: 1060px; align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 12px; }
.colonne-tete { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.colonne-tete .ligne { display: flex; align-items: center; gap: 10px; }
.colonne-tete h2 { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; flex-grow: 1; }
.colonne-tete .icones { display: flex; gap: 2px; }
.colonne-tete .meta { font-size: 13px; }
.plateau { background: transparent; box-shadow: inset 0 0 0 1px var(--ligne); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.plateau.survol { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-doux); }
.ajouter { min-height: 40px; border: 0; background: none; border-radius: var(--r-petit); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--texte-2); cursor: pointer; }
.ajouter:hover { background: var(--remplissage); color: var(--texte); }
.carte-t, .carte-q { --c: var(--texte-3); position: relative; background: var(--panneau); border: 0; border-radius: var(--r-petit); overflow: visible; text-align: left; width: 100%; padding: 0; font: inherit; color: inherit; }
.carte-t { cursor: pointer; }
.carte-t:hover { background: var(--panneau-2); }
.carte-t.rouge, .carte-q.rouge { --c: var(--rouge); } .carte-t.orange, .carte-q.orange { --c: var(--orange); }
.carte-t.vert, .carte-q.vert { --c: var(--vert); } .carte-t.bleu, .carte-q.bleu { --c: var(--accent-texte); }
.carte-t .bande, .carte-q .bande { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.carte-t .bande::before, .carte-q .bande::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.carte-t .boite, .carte-q .boite { margin: 0; background: transparent; border: 0; border-radius: 0; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.carte-t h3 { font-size: 15px; font-weight: 700; line-height: 1.35; }
.carte-t p { margin: 0; font-size: 14px; color: var(--texte-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carte-t .ligne-av { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.carte-t .pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--ligne); font-size: 13px; color: var(--texte-2); }
.carte-t .pied .compteurs { display: flex; gap: 14px; }
.carte-t .pied .compteurs span { display: inline-flex; align-items: center; gap: 4px; }
.carte-t .pied .retard, .retard { color: var(--rouge); font-weight: 700; }
.carte-t.glisse { opacity: .5; }
/* Menu « ⋯ » d'une tâche (rappeler, partager) : discret, en haut à droite, visible au survol ou au clavier */
.carte-t-cadre { position: relative; }
.carte-t-cadre .carte-t-menu { position: absolute; top: 6px; right: 6px; }
.carte-t-cadre .carte-t-menu > summary { width: 30px; height: 30px; list-style: none; opacity: .45; transition: opacity .15s; }
.carte-t-cadre .carte-t-menu > summary::-webkit-details-marker { display: none; }
.carte-t-cadre:hover .carte-t-menu > summary, .carte-t-menu[open] > summary, .carte-t-menu > summary:focus-visible { opacity: 1; }
@media (pointer: coarse) { .carte-t-cadre .carte-t-menu > summary { opacity: .8; width: 36px; height: 36px; } }
.carte-t-menu .liste-deroulante button[disabled] { opacity: .45; cursor: not-allowed; }
.carte-t .pied .pied-droite { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.carte-t .suivi { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--texte-3); }
.carte-t .suivi.vu { color: var(--vert); }
.lien-discret { background: none; border: 0; padding: 0; color: var(--accent-texte); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.carte-q button.tete { width: 100%; text-align: left; background: none; border: 0; padding: 10px 56px 12px 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; color: inherit; }
.carte-q button.tete strong { font-size: 16px; font-weight: 700; line-height: 1.35; }
.carte-q .ouvert { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.info-q { position: absolute; top: 10px; right: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ligne); background: transparent; color: var(--accent-texte); display: grid; place-items: center; cursor: pointer; }
.info-q:hover, .info-q[aria-expanded="true"] { background: var(--accent-doux); }
.consignes { background: var(--accent-doux); color: var(--accent-texte); border-radius: var(--r-petit); padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.reponse-envoyee { background: var(--vert-fond); border-radius: var(--r-petit); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.pied-q { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pied-q .liste-deroulante { top: auto; bottom: calc(100% + 6px); }
.echanges-q { flex: 1 1 100%; display: flex; flex-direction: column; gap: 10px; }
.echanges-q > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; font-weight: 700; color: var(--texte-2); }
.echanges-q > summary::-webkit-details-marker { display: none; }
.modifier-reponse { align-self: flex-start; }

/* ============ Champs ============ */
label.champ { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texte-2); }
.champ input:not([type=checkbox]):not([type=radio]), .champ select, .champ textarea, input.champ-seul {
  min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--r-petit); background: var(--panneau-2); box-shadow: inset 0 0 0 1px var(--ligne); font-size: 15px; font-weight: 400; width: 100%; color: var(--texte); }
.champ input:focus, .champ select:focus, .champ textarea:focus, input.champ-seul:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.champ textarea { resize: vertical; min-height: 90px; }
@media (max-width: 640px) { .champ input, .champ select, .champ textarea, input.champ-seul { font-size: 16px; } }
.grille2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.coche { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.coche input, .choix input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.choix { display: flex; flex-direction: column; gap: 8px; }
.choix label { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--ligne); border-radius: var(--r-petit); font-size: 15px; cursor: pointer; }
.choix label:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-doux); }
.segment { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; background: var(--panneau); border-radius: var(--r); }
.segment label, .segment button { min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: var(--r-petit); background: none; font-size: 13px; font-weight: 600; color: var(--texte-2); cursor: pointer; white-space: nowrap; }
.segment label:has(input:checked), .segment button[aria-pressed="true"] { background: var(--actif); color: var(--texte); }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.depot { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--ligne-forte); border-radius: var(--r-petit); font-size: 14px; font-weight: 700; color: var(--accent-texte); cursor: pointer; padding: 8px; text-align: center; }
.depot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.depot-inactif { cursor: not-allowed; color: var(--texte-3); }
.apercu-client { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px dashed var(--ligne); border-radius: var(--r-petit); opacity: .8; }
.apercu-titre { font-size: 12px; font-weight: 600; color: var(--texte-3); text-transform: uppercase; letter-spacing: .06em; }
.puces-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.puce-choix { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--ligne-forte); background: transparent; font-size: 15px; cursor: pointer; text-align: left; color: var(--texte); }
.puce-choix[aria-checked="true"] { background: var(--texte); border-color: var(--texte); color: var(--nuit); font-weight: 700; }
.pieces { display: flex; flex-wrap: wrap; gap: 6px; }
.pieces:empty { display: none; }
.piece { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 16px; background: var(--remplissage); font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
.piece button { border: 0; background: none; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--texte-2); }
.barre-reponse { display: flex; align-items: flex-end; gap: 6px; padding: 5px; border-radius: 24px; background: var(--panneau-2); box-shadow: inset 0 0 0 1px var(--ligne); }
.barre-reponse:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
.barre-reponse textarea { flex: 1 1 auto; min-width: 0; border: 0; outline: none; resize: none; font-size: 16px; line-height: 1.4; padding: 9px 6px; max-height: 180px; background: transparent; color: var(--texte); }
.trombone { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--texte-2); cursor: pointer; flex-shrink: 0; border: 0; background: none; }
.trombone:hover { background: var(--remplissage); color: var(--texte); }
.trombone:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.trombone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.envoyer { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.envoyer:hover { background: var(--accent-fort); }
.envoyer:disabled { opacity: .5; cursor: wait; }
.envoi { display: flex; gap: 8px; }
.envoi input { flex-grow: 1; min-width: 0; }

/* ============ Jalons, chiffres, fils, fichiers ============ */
.jalons { list-style: none; margin: 0; padding: 4px 0 0; display: flex; min-width: 560px; }
.jalons li { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.jalons .rail { display: flex; align-items: center; width: 100%; }
.jalons .rail i { flex: 1 1 0; height: 2px; background: var(--ligne); }
.jalons .rail i.plein { background: var(--accent); }
.jalons .rail i.rien { background: transparent; }
.jalons .point { width: 10px; height: 10px; border-radius: 50%; background: var(--nuit); border: 2px solid var(--texte-3); flex-shrink: 0; }
.jalons .done .point { width: 12px; height: 12px; background: var(--accent); border: 0; }
.jalons .current .point { background: var(--accent); border: 4px solid var(--accent-doux); width: 16px; height: 16px; }
.jalons .nom { font-size: 13px; font-weight: 500; color: var(--texte-2); }
.jalons .done .nom, .jalons .current .nom { color: var(--texte); }
.jalons .current .nom { font-weight: 700; }
.jalons .date { font-size: 13px; color: var(--texte-3); }
.infos-ligne { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 12px; border-top: 1px solid var(--ligne); font-size: 14px; color: var(--texte-2); }
.infos-ligne span { display: inline-flex; align-items: center; gap: 6px; }
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chiffres div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.chiffres div:nth-child(odd) { border-right: 1px solid var(--ligne); padding-left: 2px; }
.chiffres div:nth-child(-n+2) { border-bottom: 1px solid var(--ligne); }
.chiffres span { font-size: 13px; color: var(--texte-3); }
.chiffres strong { font-size: 22px; font-weight: 300; font-variant-numeric: tabular-nums; }
.progression { height: 4px; border-radius: 2px; background: var(--remplissage); overflow: hidden; }
.progression i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.progression.vert i { background: var(--vert); }
.fil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fil li { display: flex; gap: 10px; align-items: flex-start; }
.fil .bulle { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; background: var(--panneau-2); border-radius: 4px 12px 12px 12px; min-width: 0; }
.fil .bulle span { font-size: 12px; color: var(--texte-3); }
.fil .bulle p { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fichier { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panneau); border-radius: var(--r-petit); font-size: 14px; }
.fichier > .ico { color: var(--texte-2); }
.fichier a { flex-grow: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.fichier-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fichier-txt small, .fichier small { color: var(--texte-3); white-space: normal; }
.fichier .fichier-nom { min-width: 0; border: 0; background: none; padding: 2px 0; text-align: left; font-weight: 600; color: var(--texte); cursor: pointer; overflow-wrap: anywhere; }
.fichier .fichier-nom:hover { color: var(--accent-texte); }
.fichier a.btn { flex-grow: 0; }
.avatar, .av { width: 32px; height: 32px; border-radius: 50%; background: var(--panneau-3); color: var(--texte); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; flex-shrink: 0; }
.av.petit { width: 26px; height: 26px; font-size: 10px; }
.av.c0 { background: #1B3566; } .av.c1 { background: #3A2A4F; } .av.c2 { background: #183F3A; } .av.c3 { background: #33305A; } .av.c4 { background: #46283A; } .av.c5 { background: #253247; }
.pile { display: inline-flex; }
.pile .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--nuit); }
.pile .av:first-child { margin-left: 0; }
.autres { font-size: 13px; color: var(--texte-3); margin-right: 2px; }
.mini { width: 24px; height: 24px; border: 1px solid var(--ligne); border-radius: var(--r-petit); background: transparent; display: inline-grid; place-items: center; color: var(--texte-2); cursor: pointer; padding: 0; }
.mini:hover { background: var(--remplissage); }

/* ============ Fenêtres, aperçus, documents ============ */
dialog { position: fixed; border: 0; border-radius: var(--r); padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--panneau); color: var(--texte); box-shadow: 0 0 0 1px var(--ligne), 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(2, 6, 14, .7); cursor: pointer; }
dialog > form > h2:first-child, dialog > .corps > :first-child { padding-right: 44px; }
dialog form, dialog .corps { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { font-size: 20px; }
dialog .pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 6px; }
.fermer-fenetre { position: absolute; top: 14px; right: 14px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: var(--r-petit); background: transparent; color: var(--texte-2); display: grid; place-items: center; cursor: pointer; }
.fermer-fenetre:hover { background: var(--remplissage); color: var(--texte); }
dialog.fenetre-apercu { width: min(1100px, calc(100vw - 24px)); height: calc(100vh - 48px); }
dialog.fenetre-apercu .corps { height: 100%; }
.apercu-zone { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-radius: var(--r-petit); overflow: auto; background: var(--nuit); box-shadow: inset 0 0 0 1px var(--ligne); }
.apercu-pdf { flex: 1 1 auto; width: 100%; min-height: 60vh; border: 0; background: #fff; }
.apercu-image { max-width: 100%; margin: auto; display: block; }
.apercu-texte { margin: 0; padding: 16px 20px; white-space: pre-wrap; font-size: 14px; }
.apercu-indispo { margin: auto; padding: 40px 20px; text-align: center; color: var(--texte-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.doc-texte { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; color: var(--texte-2); }
.doc-texte h1 { font-size: 22px; margin: 16px 0 6px; color: var(--texte); }
.doc-texte h2 { font-size: 18px; margin: 16px 0 6px; color: var(--texte); }
.doc-texte h3 { font-size: 16px; margin: 12px 0 4px; color: var(--texte); }
.doc-texte p { margin: 0 0 10px; }
.doc-texte ul, .doc-texte ol { margin: 0 0 10px; padding-left: 22px; }
.doc-texte code { background: var(--remplissage); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.doc-texte table { border-collapse: collapse; margin: 0 0 10px; font-size: 14px; }
.doc-texte td, .doc-texte th { border: 1px solid var(--ligne); padding: 4px 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--texte); color: var(--nuit); padding: 12px 18px; border-radius: var(--r-petit); font-size: 14px; font-weight: 700; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); z-index: 90; max-width: calc(100vw - 32px); }
.toast.erreur { background: var(--rouge); color: var(--nuit); }
.chargement { padding: 80px 24px; text-align: center; color: var(--texte-3); }
.masque-mobile { }
@media (max-width: 900px) { .masque-mobile { display: none !important; } }

/* ============ Messagerie (fil unique) ============ */
.wa { display: flex; flex-direction: column; height: calc(100vh - var(--haut) - 210px); min-height: 460px; background: var(--panneau); border-radius: var(--r-petit); overflow: hidden; }
.wa.compact { height: auto; max-height: 520px; min-height: 0; box-shadow: inset 0 0 0 1px var(--ligne); background: transparent; }
.wa-tete { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
.wa-tete > div { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.wa-tete strong { font-size: 16px; font-weight: 700; }
.wa-tete small { font-size: 13px; color: var(--texte-3); }
.wa-tete input[type=search] { flex: 0 1 280px; min-width: 0; min-height: 36px; border: 0; border-radius: var(--r-petit); padding: 0 12px; font-size: 14px; background: var(--panneau-2); color: var(--texte); }
.wa-zone { flex: 1 1 auto; overflow-y: auto; padding: 12px 4% 8px; min-height: 120px; }
.wa.compact .wa-zone { padding: 8px 10px; }
.wa-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.wa-jour { align-self: center; margin: 12px 0 8px; }
.wa-jour span { background: var(--panneau-2); color: var(--texte-3); font-size: 12px; padding: 4px 12px; border-radius: 12px; }
.wa-msg { display: flex; }
.wa-msg.moi { justify-content: flex-end; }
.wa-msg + .wa-msg.moi, .wa-msg + .wa-msg.autre { margin-top: 2px; }
.wa-bulle { position: relative; max-width: min(78%, 560px); background: var(--panneau-3); border-radius: 12px; padding: 7px 28px 6px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.wa-msg.moi .wa-bulle { background: var(--bulle-moi); }
.wa-msg.autre .wa-bulle { border-top-left-radius: 3px; }
.wa-msg.moi .wa-bulle { border-top-right-radius: 3px; }
.wa-auteur { font-size: 13px; font-weight: 700; color: var(--vert); }
.wa-bulle.equipe .wa-auteur { color: var(--accent-texte); }
.wa-auteur small { font-weight: 400; color: var(--texte-3); }
.wa-texte { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
/* Alerte d'un message non lu (équipe seulement) : petite ligne sous la bulle */
.wa-colonne { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: min(78%, 560px); }
.wa-msg.moi .wa-colonne { align-items: flex-end; }
.wa-colonne > .wa-bulle { max-width: 100%; }
.wa-alerte { position: relative; font-size: 12px; color: var(--texte-3); }
.wa-alerte > summary { list-style: none; cursor: pointer; padding: 2px 6px; border-radius: 6px; color: var(--orange); }
.wa-alerte > summary::-webkit-details-marker { display: none; }
.wa-alerte > summary:hover, .wa-alerte[open] > summary { background: var(--remplissage); }
.wa-alerte.fait { padding: 2px 6px; }
.wa-alerte .liste-deroulante.droite { left: auto; right: 0; }
.wa-alerte-note { padding: 6px 10px 4px; font-size: 12px; color: var(--texte-3); line-height: 1.4; max-width: 240px; }
.wa-heure { align-self: flex-end; display: inline-flex; gap: 4px; align-items: center; font-size: 11px; color: var(--texte-3); margin-top: -2px; white-space: nowrap; }
.wa-coches { font-size: 12px; letter-spacing: -3px; color: var(--texte-3); padding-right: 3px; }
.wa-coches.lu { color: var(--accent-texte); }
.wa-bulle.supprime .wa-texte { font-style: italic; color: var(--texte-3); }
.wa-tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--accent-texte); background: var(--accent-doux); border-radius: 4px; padding: 1px 7px; text-decoration: none; }
.wa-citation { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; border-left: 3px solid var(--accent); background: rgba(0, 0, 0, .2); border-radius: 4px; padding: 5px 8px; font-size: 13px; cursor: pointer; color: var(--texte-2); }
.wa-citation strong { color: var(--accent-texte); font-size: 12.5px; }
.wa-image { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; display: block; }
.wa-image img { display: block; max-width: 100%; width: 280px; max-height: 280px; object-fit: cover; }
.wa-vocal { display: flex; align-items: center; gap: 6px; color: var(--texte-2); }
.wa-vocal audio { height: 36px; max-width: 260px; }
.wa-bulle .fichier { background: var(--fond-piece); border-radius: 8px; padding: 6px 8px; }
.wa-indispo { margin: 0; font-size: 13px; font-style: italic; color: var(--texte-3); }
.wa-publi { align-self: center; max-width: min(88%, 620px); margin: 10px 0; background: transparent; box-shadow: inset 0 0 0 1px var(--orange-ligne); border-radius: var(--r-petit); padding: 8px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.wa-publi p { margin: 0; white-space: pre-wrap; }
.wa-publi-tete { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--orange); }
.wa-menu { position: absolute; top: 2px; right: 2px; }
.wa-menu > summary { list-style: none; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--texte-2); opacity: 0; transition: opacity .12s; }
.wa-menu > summary::-webkit-details-marker { display: none; }
.wa-bulle:hover .wa-menu > summary, .wa-menu[open] > summary, .wa-menu > summary:focus-visible { opacity: 1; }
@media (hover: none) { .wa-menu > summary { opacity: .7; } }
.wa-menu-liste { position: absolute; z-index: 30; top: 28px; right: 0; min-width: 190px; background: var(--panneau); border: 1px solid var(--ligne); border-radius: var(--r); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); padding: 4px; display: flex; flex-direction: column; }
.wa-menu.haut .wa-menu-liste { top: auto; bottom: 28px; }
.wa-msg.autre .wa-menu-liste { right: auto; left: 0; }
.wa-menu-liste button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-petit); font-size: 14px; cursor: pointer; text-align: left; color: var(--texte); white-space: nowrap; }
.wa-menu-liste button:hover { background: var(--remplissage); }
.wa-menu-liste button.danger { color: var(--rouge); }
.wa-msg.flash .wa-bulle { animation: wa-flash 1.4s ease; }
@keyframes wa-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }
.wa-saisie { padding: 10px 12px 12px; border-top: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 6px; }
.wa-bandeau { display: flex; align-items: center; gap: 8px; background: var(--panneau-2); border-left: 3px solid var(--accent); border-radius: var(--r-petit); padding: 6px 6px 6px 10px; }
.wa-bandeau[hidden] { display: none; }
.wa-bandeau > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--texte-2); }
.wa-bandeau strong { color: var(--accent-texte); font-size: 12.5px; }
.wa-bandeau span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-bandeau button { border: 0; background: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--texte-2); }
.wa-enregistre { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 6px; font-size: 14px; color: var(--texte-2); }
.wa-chrono { font-variant-numeric: tabular-nums; color: var(--texte); font-weight: 700; }
.wa-point { width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); animation: wa-pulse 1s infinite; }
@keyframes wa-pulse { 50% { opacity: .3; } }
.echanges-q .wa { margin-top: 4px; }
@media (max-width: 640px) { .wa { height: 74vh; } .wa-bulle { max-width: 88%; } .wa-zone { padding: 10px 8px; } }
@media (prefers-reduced-motion: reduce) { .wa-point, .wa-msg.flash .wa-bulle { animation: none; } }

/* ============ Facturation ============ */
.echeancier { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--r-petit); box-shadow: inset 0 0 0 1px var(--ligne); overflow: hidden; }
.versement { padding: 16px; display: flex; flex-direction: column; gap: 8px; border-left: 1px solid var(--ligne); }
.versement:first-child { border-left: 0; }
.versement.du { background: var(--orange-fond); }
.versement small { font-size: 13px; color: var(--texte-3); }
.versement b { font: 300 26px/1.2 var(--police); font-variant-numeric: tabular-nums; }
.versement .progression { margin-top: auto; }
.mode-paiement { font-size: 14px; color: var(--texte-2); display: flex; flex-direction: column; gap: 2px; }
.mode-paiement strong { color: var(--texte); font-weight: 500; font-size: 15px; }

/* ============ Aperçu du site (visionneuse dans le portail) ============ */
.visionneuse { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - var(--haut) - 36px); min-height: 520px; background: var(--nuit); }
.visionneuse-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.visionneuse-barre .btn, .visionneuse-barre .segment { height: 36px; }
.visionneuse-barre .segment button { min-height: 32px; }
.visionneuse-barre .page-choix { min-width: 170px; flex: 1 1 200px; max-width: 340px; height: 36px; border: 0; border-radius: var(--r-petit); background: var(--panneau); color: var(--texte); padding: 0 10px; font-size: 14px; box-shadow: inset 0 0 0 1px var(--ligne); }
.visionneuse-barre .espace { flex: 1 1 auto; }
.visionneuse-barre .titre-page { font-size: 14px; color: var(--texte-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.compteur { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }
.scene { position: relative; flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; border-radius: var(--r); background: var(--panneau); box-shadow: inset 0 0 0 1px var(--ligne); overflow: hidden; }
.scene iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; transition: width .2s ease; }
.scene.appareil { padding: 16px 0; }
.scene.appareil iframe { border-radius: 18px; box-shadow: 0 0 0 8px #000, 0 0 0 9px var(--ligne-forte); }
.tiroir { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 92%); background: var(--panneau); border-left: 1px solid var(--ligne); display: flex; flex-direction: column; z-index: 5; box-shadow: -18px 0 40px rgba(0, 0, 0, .4); }
.tiroir-tete { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--ligne); }
.tiroir-tete strong { flex: 1 1 auto; font-size: 15px; }
.tiroir-corps { flex: 1 1 auto; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.fil-com { display: flex; gap: 10px; padding: 10px; border-radius: var(--r-petit); border: 0; background: none; text-align: left; color: var(--texte); cursor: pointer; width: 100%; }
.fil-com:hover { background: var(--remplissage); }
.fil-com .num { width: 24px; height: 24px; border-radius: 50% 50% 50% 2px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.fil-com.corrige .num { background: var(--vert); color: var(--nuit); }
.fil-com p { margin: 2px 0 0; font-size: 14px; color: var(--texte-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fil-com small { font-size: 12px; color: var(--texte-3); }
.visionneuse:fullscreen { height: 100vh; padding: 10px 12px 12px; }
.visionneuse:fullscreen .scene { border-radius: var(--r-petit); }
.indication { font-size: 13px; color: var(--texte-3); }

/* ============ Accès (page de connexion) ============ */
.accueil { position: relative; min-height: 100vh; background: var(--nuit); display: flex; flex-direction: column; align-items: center; padding: 22px 16px 24px; overflow: hidden; isolation: isolate; }
.accueil::after { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; left: 50%; bottom: -380px; margin-left: -360px; border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 30%, var(--anneaux) 0 1px, transparent 1px 6px); -webkit-mask: radial-gradient(circle, #000 0 60%, transparent 71%); mask: radial-gradient(circle, #000 0 60%, transparent 71%); }
.accueil-marque { align-self: flex-start; padding-left: 20px; }
.acces-logo { display: none; }
.acces-carte { width: 100%; max-width: 420px; margin: auto 0; padding: 32px; background: var(--panneau); border-radius: var(--r); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.acces-carte h1 { font-size: 28px; font-weight: 700; }
.acces-carte p { margin: 0; color: var(--texte-2); font-size: 15px; line-height: 1.5; }
.btn-google { margin-top: 4px; width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--r-petit); background: var(--texte); color: var(--nuit); font-weight: 700; font-size: 16px; text-decoration: none; }
.btn-google:hover { background: var(--principal-survol); color: var(--nuit); }
.acces-erreur { color: var(--rouge) !important; background: var(--rouge-fond); border-radius: var(--r-petit); padding: 10px 12px; font-size: 14px !important; }
.acces-note { font-size: 13px !important; color: var(--texte-3) !important; }
.accueil-pied { font-size: 13px; color: var(--texte-3); }
.accueil-pied a { color: var(--texte-2); font-weight: 600; }
.accueil-lueur { display: none; }
@media (max-width: 480px) { .acces-carte { padding: 24px 18px; } .acces-carte h1 { font-size: 24px; } }
.page-legale { max-width: 720px; margin: 0 auto; padding: 40px 20px 64px; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.6; }
.page-legale h1 { font-size: 30px; }
.page-legale h2 { font-size: 18px; margin: 18px 0 0; }
.page-legale p, .page-legale ul { margin: 0; color: var(--texte-2); }
.page-legale ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.page-legale .btn { align-self: flex-start; margin-top: 16px; }

/* ============ Tablette et téléphone ============ */
@media (max-width: 1100px) { .trois { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .haut { padding: 0 12px; gap: 12px; }
  .burger { display: grid; }
  .haut-nav { display: none; }
  .marque { font-size: 16px; letter-spacing: .26em; }
  .corps-cadre { display: block; }
  .nav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; height: 100vh; width: min(300px, 86vw); padding: 16px; background: var(--nuit); transform: translateX(-100%); transition: transform .2s; border-right: 1px solid var(--ligne); }
  body.nav-ouverte .nav { transform: none; }
  body.nav-ouverte .nav-voile { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(2, 6, 14, .7); }
  .nav-mobile-nav { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--ligne); }
  .page-col, .page-col.etroit { padding: 8px 16px 48px; }
  .page-col.plein { padding: 8px 8px 16px; }
  .bandeau-apercu { margin: 12px 16px 0; }
  .ligne-titre-page h1 { font-size: 26px; }
  .tuiles, .echeancier { grid-template-columns: 1fr; }
  .versement { border-left: 0; border-top: 1px solid var(--ligne); }
  .versement:first-child { border-top: 0; }
  .recherche { min-width: 0; flex: 1 1 100%; }
  .visionneuse { height: calc(100vh - var(--haut) - 16px); }
  .visionneuse-barre .page-choix { flex: 1 1 100%; }
  .masque-tel { display: none !important; }
}
@media (min-width: 901px) { .nav-mobile-nav { display: none; } }
@media (prefers-reduced-motion: reduce) { .nav, .scene iframe { transition: none; } }
/* Rien ne doit élargir la page : les tableaux et jalons défilent dans leur cadre */
.zone, .page-col, .corps-page > *, .deux > *, .tableau, .defile { min-width: 0; max-width: 100%; }
.tableau, .defile { position: relative; }
.carte-q.cible { box-shadow: 0 0 0 2px var(--accent); transition: box-shadow .3s; }

/* Ombre légère sous la barre du haut */
:root { --ombre-haut: 0 1px 0 var(--ligne), 0 10px 28px rgba(0, 0, 0, .38); }
:root[data-theme="light"] { --ombre-haut: 0 1px 0 var(--ligne), 0 8px 22px rgba(11, 22, 38, .07); }
.haut { box-shadow: var(--ombre-haut); }

/* Progression : piste en segments, un par étape */
.etapes { display: flex; flex-direction: column; gap: 14px; }
.etapes-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--texte-2); }
.etapes-tete b { color: var(--texte); font-weight: 700; }
.etapes-pct { font: 300 22px/1 var(--police); color: var(--texte); font-variant-numeric: tabular-nums; }
.etapes-piste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.etapes-piste li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.etapes-piste .seg { display: block; height: 6px; border-radius: 3px; background: var(--remplissage); box-shadow: inset 0 0 0 1px var(--ligne); margin-bottom: 8px; overflow: hidden; position: relative; }
.etapes-piste .done .seg { background: var(--accent); box-shadow: none; }
.etapes-piste .current .seg { background: linear-gradient(90deg, var(--accent) 0 50%, var(--accent-doux) 50%); box-shadow: none; }
.etapes-piste .current .seg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: etape-lueur 2.4s ease-in-out infinite; }
@keyframes etape-lueur { to { transform: translateX(100%); } }
.etapes-piste b { font-size: 14px; font-weight: 500; color: var(--texte-2); line-height: 1.3; overflow-wrap: anywhere; }
.etapes-piste .done b { color: var(--texte); }
.etapes-piste .current b { color: var(--texte); font-weight: 700; }
.etapes-piste small { font-size: 13px; color: var(--texte-3); }
.etapes-encours { color: var(--accent-texte); font-weight: 600; }
@media (max-width: 700px) {
  .etapes-piste { grid-template-columns: 1fr; gap: 0; }
  .etapes-piste li { display: grid; grid-template-columns: 6px 1fr; column-gap: 14px; padding-bottom: 12px; }
  .etapes-piste .seg { grid-row: 1 / span 2; width: 6px; height: auto; min-height: 38px; margin: 0; }
  .etapes-piste .current .seg { background: linear-gradient(180deg, var(--accent) 0 50%, var(--accent-doux) 50%); }
}
@media (prefers-reduced-motion: reduce) { .etapes-piste .current .seg::after { animation: none; display: none; } }

/* Tâches (vue colonnes) : titre, outils et en-têtes de colonnes fixes ; seules les cartes défilent, colonne par colonne */
@media (min-width: 901px) {
  .page-col.fixe { height: calc(100vh - var(--haut)); padding-bottom: 16px; overflow: hidden; }
  .page-col.fixe .tete-page { flex-shrink: 0; }
  .page-col.fixe .corps-page { flex: 1 1 auto; min-height: 0; }
  .page-col.fixe .tableau-taches { height: 100%; overflow-x: auto; overflow-y: hidden; }
  .page-col.fixe .colonnes { height: 100%; align-items: stretch; }
  .page-col.fixe .colonne { min-height: 0; }
  .page-col.fixe .colonne-tete { flex-shrink: 0; }
  .page-col.fixe .plateau { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ligne-forte) transparent; }
  .page-col.fixe .plateau .ajouter { flex-shrink: 0; }
  .page-col.fixe .carte-t { flex-shrink: 0; }
}

/* Barre latérale réellement fixe (ordinateur) : elle ne bouge jamais, même en bas de page ou au-dessus du pied de page */
@media (min-width: 901px) {
  .nav { position: fixed; top: var(--haut); left: 0; bottom: 0; height: auto; align-self: stretch; width: calc(var(--nav) + 64px); z-index: 30; background: var(--nuit); }
  .zone { grid-column: 2; }
  .pied-cadre { margin-left: calc(var(--nav) + 64px); }
}
