/* Habillage de la suite. Il s'appuie sur style.css (couleurs, cartes, boutons, champs, tableaux) et n'ajoute que la coque et les composants nouveaux. */
:root{ --nav:232px; --barre-bas:58px; --haut:env(safe-area-inset-top,0px); --bas:env(safe-area-inset-bottom,0px); --rayon:12px; --ombre:0 10px 30px rgba(20,23,26,.14) }
html{height:100%}
body.suite{min-height:100%;font-size:15px;overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}
.evitement{position:absolute;left:-999px;top:0;background:var(--accent);color:var(--accent-ink);padding:8px 12px;border-radius:0 0 8px 0;z-index:100}
.evitement:focus{left:0}

/* ---------- coque ---------- */
.coque{display:grid;grid-template-columns:var(--nav) minmax(0,1fr);min-height:100vh;min-height:100dvh}
.nav{position:sticky;top:0;height:100vh;height:100dvh;display:flex;flex-direction:column;gap:18px;padding:calc(18px + var(--haut)) 12px calc(14px + var(--bas));border-right:1px solid var(--line);background:var(--surface);overflow-y:auto}
.enseigne{display:flex;align-items:center;gap:10px;padding:4px 8px;color:var(--ink);text-decoration:none;min-height:44px}
.enseigne img{max-height:34px;max-width:130px;display:block}
.enseigne span{font-family:'Instrument Serif',Georgia,serif;font-size:26px;line-height:28px;letter-spacing:-.3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.enseigne img:not([hidden]) + span{display:none}
/* En sombre, le logo est posé sur une plaque claire arrondie : un logo transparent à texte foncé resterait illisible sur le fond sombre (connexion comprise). */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .enseigne img,:root:not([data-theme="light"]) .porte-logo{background:#F5F5F2;padding:4px 8px;border-radius:8px}}
:root[data-theme="dark"] .enseigne img,:root[data-theme="dark"] .porte-logo{background:#F5F5F2;padding:4px 8px;border-radius:8px}
#rubriques{display:flex;flex-direction:column;gap:2px;flex:1}
#rubriques .sep{height:1px;background:var(--line);margin:10px 8px}
.rub{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:9px;color:var(--muted);text-decoration:none;font-weight:600;line-height:22px;min-height:44px}
.rub svg{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rub:hover{background:var(--soft);color:var(--ink)}
.rub[aria-current="page"]{background:var(--accent-soft);color:var(--ink)}
.rub[aria-current="page"] svg{stroke:var(--accent)}
.rub .pill{margin-left:auto}
.nav .pied{display:flex;flex-direction:column;gap:8px;padding:10px 8px 0;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.nav .pied #qui{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Au doigt (iPad), « Se déconnecter » a sa cible de 44 px, comme tout bouton. */
@media (pointer:coarse){.nav .pied #sortir{min-height:44px}}
.scene{min-width:0;display:flex;flex-direction:column}
.barre{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:10px;padding:calc(14px + var(--haut)) 28px 12px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid transparent;min-height:calc(64px + var(--haut))}
.barre.colle{border-bottom-color:var(--line)}
.barre h1{margin:0;flex:1;min-width:0;font-family:'Instrument Serif',Georgia,serif;font-weight:400;font-size:34px;line-height:38px;letter-spacing:-.4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.barre .actions{display:flex;gap:8px;align-items:center;flex:none}
.retour{appearance:none;border:1px solid var(--line);background:var(--surface);color:var(--ink);width:40px;height:40px;border-radius:10px;cursor:pointer;flex:none;display:inline-flex;align-items:center;justify-content:center}
.retour svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#contenu{flex:1;min-width:0;outline:0}
.zone{max-width:1180px;margin:0 auto;padding:8px 28px 72px}
#horsLigne,#nouvelleVersion{margin:8px 28px 0}
.onglets{display:none}

@media (max-width:999px){
  .coque{display:block}
  .nav{display:none}
  .barre{padding:calc(10px + var(--haut)) 16px 10px;min-height:calc(56px + var(--haut))}
  .barre h1{font-size:28px;line-height:32px}
  .zone{padding:6px 16px calc(var(--barre-bas) + var(--bas) + 28px)}
  #horsLigne,#nouvelleVersion{margin:6px 16px 0}
  .onglets{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:4px 4px calc(4px + var(--bas));background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--line)}
  .onglets a,.onglets button{appearance:none;border:0;background:none;font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:50px;padding:4px 2px;color:var(--muted);text-decoration:none;font-size:11px;line-height:14px;font-weight:600;position:relative;cursor:pointer;border-radius:10px}
  .onglets svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .onglets [aria-current="page"]{color:var(--accent)}
  .onglets .pill{position:absolute;top:2px;left:calc(50% + 6px);margin:0;min-width:18px;font-size:11px;line-height:18px;padding:0 5px}
  /* Un champ de moins de 16 px fait zoomer l'iPhone à la saisie. */
  input,select,textarea{font-size:16px}
  .btn{min-height:44px}
  .btn.small{min-height:34px}
}

/* ---------- avis (messages brefs) ---------- */
.avis{position:fixed;left:50%;transform:translateX(-50%);bottom:24px;z-index:80;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:min(560px,calc(100vw - 24px))}
.avis div{pointer-events:auto;background:var(--ink);color:var(--bg);padding:10px 14px;border-radius:10px;font-size:14px;line-height:20px;box-shadow:var(--ombre);max-width:100%}
.avis div.err{background:var(--bad);color:#fff}
@media (max-width:999px){.avis{bottom:calc(var(--barre-bas) + var(--bas) + 14px)}}
/* Un avis ne recouvre ni le champ en cours de saisie ni le bouton qu'on vient de toucher : s'il tombait dessus, il se place sous l'en-tête (voir avis() dans commun.js). */
.avis.haut{bottom:auto;top:calc(var(--haut) + 72px)}
@media (max-width:999px){.avis.haut{top:calc(var(--haut) + 62px)}}

/* ---------- fenêtre (dialogue sur grand écran, feuille montante sur téléphone) ---------- */
dialog.fen{border:1px solid var(--line);border-radius:16px;padding:0;background:var(--surface);color:var(--ink);width:min(560px,calc(100vw - 32px));max-height:min(86vh,860px);box-shadow:var(--ombre);overflow:hidden}
dialog.fen.large{width:min(820px,calc(100vw - 32px))}
dialog.fen::backdrop{background:rgba(15,18,17,.45)}
dialog.fen form,dialog.fen .fenc{display:flex;flex-direction:column;max-height:inherit}
.fen header{display:flex;align-items:center;gap:12px;padding:16px 18px 10px}
.fen header h2{margin:0;flex:1;font-size:19px;line-height:26px;font-weight:700}
.fen .corps{padding:6px 18px 16px;overflow-y:auto;flex:1;min-height:0}
.fen footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;padding:12px 18px calc(14px + var(--bas));border-top:1px solid var(--line);background:var(--surface)}
.fen .erreur{color:var(--bad);font-size:14px;line-height:20px;margin:10px 0 0}
.fen .erreur:empty{display:none}
/* Une information dite dans la fenêtre qui n'est pas une erreur (« Le réseau est revenu… ») : pas de rouge. */
.fen .erreur.note-fen{color:var(--ink);background:var(--soft);border-radius:8px;padding:8px 10px}
@media (max-width:640px){
  dialog.fen,dialog.fen.large{width:100vw;max-width:100vw;max-height:92dvh;margin:auto 0 0;border-radius:18px 18px 0 0;border-width:1px 0 0}
  .fen footer .btn{flex:1}
}
/* Une fenêtre n'apparaît pas d'un coup : le dialogue se pose, la feuille monte du bas sur un téléphone, le voile se fond. Bref (moins d'un quart de seconde),
   et rien du tout pour qui a demandé moins d'animations à son appareil. */
@keyframes fen-pose{from{opacity:0;transform:translateY(10px) scale(.985)}}
@keyframes fen-monte{from{transform:translateY(100%)}}
@keyframes fen-voile{from{opacity:0}}
@media (prefers-reduced-motion:no-preference){
  dialog.fen[open]{animation:fen-pose .18s ease-out}
  dialog.fen[open]::backdrop{animation:fen-voile .2s ease-out}
}
@media (prefers-reduced-motion:no-preference) and (max-width:640px){dialog.fen[open]{animation:fen-monte .24s cubic-bezier(.2,.8,.2,1)}}

/* ---------- composants ---------- */
.entete-liste{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.entete-liste .recherche{flex:1;min-width:180px;position:relative}
.entete-liste .recherche input{padding-left:36px}
.entete-liste .recherche svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:17px;height:17px;stroke:var(--muted);fill:none;stroke-width:2;stroke-linecap:round;pointer-events:none}
/* Filtres : une rangée de puces qui se fait glisser sur un téléphone. */
.puces{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none;margin-bottom:14px}
.puces::-webkit-scrollbar{display:none}
.puce{appearance:none;border:1px solid var(--line);background:var(--surface);color:var(--muted);font:inherit;font-size:14px;font-weight:600;padding:6px 12px;border-radius:99px;cursor:pointer;white-space:nowrap;min-height:36px;display:inline-flex;align-items:center;gap:6px}
.puce[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.puce b{font-weight:700;opacity:.7}
/* Sous-rubriques d'un écran (comptabilité, fiche) : mêmes onglets que l'écran des devis. */
.tabs.sous{margin-top:-2px}
/* Liste à lignes cliquables : c'est la forme par défaut d'une liste, sur téléphone comme sur grand écran. */
.lignes{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--rayon);overflow:hidden}
.lg{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);color:inherit;text-decoration:none;min-height:56px;cursor:pointer;background:none;border-left:0;border-right:0;border-top:0;font:inherit;text-align:left;width:100%}
.lg:last-child{border-bottom:0}
.lg:hover{background:var(--soft)}
.lg .pr{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.lg .pr b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lg .pr span{color:var(--muted);font-size:13px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lg .dr{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:3px;text-align:right}
.lg .dr b{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.lg .dr span{color:var(--muted);font-size:13px;line-height:18px;white-space:nowrap}
.lg .pastille-rond{width:36px;height:36px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;font-weight:700;flex:none;font-size:14px}
.lg.fait .pr b{text-decoration:line-through;color:var(--muted);font-weight:400}
.titre-section{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:22px 0 10px}
.titre-section h2{margin:0;font-size:17px;line-height:24px;font-weight:700}
.titre-section a,.lien{color:var(--accent);font-weight:600;font-size:14px;text-decoration:none;cursor:pointer;background:none;border:0;padding:0;font-family:inherit}
.titre-section a:hover,.lien:hover{text-decoration:underline}
.vide{text-align:center;padding:44px 20px;color:var(--muted);background:var(--surface);border:1px dashed var(--line);border-radius:var(--rayon)}
.vide h3{margin:0 0 6px;color:var(--ink);font-family:'Instrument Serif',Georgia,serif;font-weight:400;font-size:26px;line-height:30px}
.vide p{margin:0 auto 16px;max-width:420px;font-size:14px;line-height:21px}
.vide p:last-child{margin-bottom:0}
.vide.petit{padding:22px 16px}
.vide.petit h3{font-family:inherit;font-weight:700;font-size:15px;line-height:22px}
.squelette{border-radius:var(--rayon);background:linear-gradient(90deg,var(--soft) 25%,var(--surface) 50%,var(--soft) 75%);background-size:200% 100%;animation:sq 1.3s linear infinite;min-height:64px;margin-bottom:10px}
@keyframes sq{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.squelette{animation:none}}
.badge.bleu{background:#E3ECF8;color:#1F4B8F}
.badge.fort{background:var(--ink);color:var(--bg)}
:root[data-theme="dark"] .badge.bleu{background:#1C2A40;color:#9DC1F5}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .badge.bleu{background:#1C2A40;color:#9DC1F5}}
/* Chiffres clés */
.cles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:860px){.cles{grid-template-columns:repeat(4,minmax(0,1fr))}}
.cle{background:var(--surface);border:1px solid var(--line);border-radius:var(--rayon);padding:14px 16px;min-width:0;display:flex;flex-direction:column;gap:2px;color:inherit;text-decoration:none}
a.cle:hover{border-color:var(--ink)}
.cle span{font-size:12px;line-height:16px;color:var(--muted);font-weight:600}
.cle b{font-family:'Instrument Serif',Georgia,serif;font-weight:400;font-size:30px;line-height:36px;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.cle small{font-size:12px;line-height:16px;color:var(--muted)}
.cle.alerte b{color:var(--bad)}
.deux{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
@media (min-width:900px){.deux{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.deux.large-etroit{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}}
/* Fiche : colonne principale et colonne de côté */
.fiche{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
@media (min-width:1000px){.fiche{grid-template-columns:minmax(0,1fr) 340px}}
.fiche .col{display:flex;flex-direction:column;gap:16px;min-width:0}
/* Fil d'échanges */
.fil{display:flex;flex-direction:column;gap:0}
.fil .ev{display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;padding-bottom:16px;position:relative}
.fil .ev::before{content:"";position:absolute;left:13px;top:28px;bottom:0;width:2px;background:var(--line)}
.fil .ev:last-child::before{display:none}
.fil .pt{width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center}
.fil .pt svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fil .tt{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.fil .tt b{font-weight:600}
.fil .tt span{color:var(--muted);font-size:13px}
.fil p{margin:4px 0 0;white-space:pre-line;font-size:14px;line-height:21px;overflow-wrap:anywhere}
.fil .k{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.3px;margin-top:8px}
/* Ressenti d'un rendez-vous : cinq niveaux */
.ressenti{display:flex;gap:6px;flex-wrap:wrap}
.ressenti label{flex:1;min-width:92px}
.ressenti input{position:absolute;opacity:0;pointer-events:none}
.ressenti span{display:flex;align-items:center;justify-content:center;text-align:center;border:1px solid var(--line);border-radius:10px;padding:8px 6px;font-size:13px;line-height:17px;font-weight:600;color:var(--muted);cursor:pointer;min-height:44px;background:var(--bg)}
.ressenti input:checked + span{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.ressenti input:focus-visible + span{outline:2px solid var(--accent);outline-offset:1px}
.choix{display:flex;gap:6px;flex-wrap:wrap}
.choix label{position:relative}
.choix input{position:absolute;opacity:0;pointer-events:none}
.choix span{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:99px;padding:6px 12px;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer;min-height:36px;background:var(--bg)}
.choix input:checked + span{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.choix input:focus-visible + span{outline:2px solid var(--accent);outline-offset:1px}
/* Colonnes du suivi commercial */
.pipeline{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(232px,1fr);gap:12px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}
.pipeline .colonne{background:var(--soft);border-radius:var(--rayon);padding:10px;display:flex;flex-direction:column;gap:8px;min-height:120px;scroll-snap-align:start}
.pipeline .colonne h3{margin:2px 4px 4px;font-size:13px;line-height:18px;font-weight:700;display:flex;justify-content:space-between;gap:8px;color:var(--muted)}
.pipeline .carte{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:3px;color:inherit;text-decoration:none;font-size:14px}
.pipeline .carte:hover{border-color:var(--ink)}
.pipeline .carte b{font-weight:600;overflow-wrap:anywhere}
.pipeline .carte span{color:var(--muted);font-size:13px;line-height:18px}
/* Agenda */
.jours{display:flex;flex-direction:column;gap:14px}
.jour h3{margin:0 0 6px;font-size:13px;line-height:18px;font-weight:700;color:var(--muted);text-transform:capitalize}
.jour.auj h3{color:var(--accent)}
.rdv{display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;align-items:baseline}
.rdv time{font-variant-numeric:tabular-nums;font-weight:600;font-size:14px}
.mois{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--rayon);overflow:hidden}
.mois .tete{background:var(--surface);padding:6px 4px;text-align:center;font-size:12px;font-weight:700;color:var(--muted)}
.mois .case{background:var(--surface);min-height:84px;padding:5px;display:flex;flex-direction:column;gap:3px;cursor:pointer;border:0;font:inherit;text-align:left;color:inherit;min-width:0}
.mois .case.hors{background:var(--bg);color:var(--muted)}
.mois .case .n{font-size:13px;font-weight:600;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%}
.mois .case.auj .n{background:var(--accent);color:var(--accent-ink)}
.mois .case .e{font-size:11px;line-height:15px;background:var(--accent-soft);border-radius:4px;padding:1px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:640px){.mois .case{min-height:54px;align-items:center}.mois .case .e{width:6px;height:6px;padding:0;border-radius:50%;background:var(--accent);color:transparent;overflow:hidden;flex:none}.mois .case .ee{display:flex;gap:3px;flex-wrap:wrap;justify-content:center}}
/* Assistant */
.chat{display:flex;flex-direction:column;gap:14px;padding-bottom:12px}
.bulle{max-width:min(720px,92%);padding:10px 14px;border-radius:16px;font-size:15px;line-height:23px;overflow-wrap:anywhere;white-space:pre-wrap}
.bulle.moi{align-self:flex-end;background:var(--accent);color:var(--accent-ink);border-bottom-right-radius:5px}
.bulle.lui{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:5px}
.bulle .etapes{margin:0 0 8px;padding:0;list-style:none;font-size:13px;line-height:19px;color:var(--muted);white-space:normal}
.bulle .sources{margin:10px 0 0;padding:8px 0 0;border-top:1px solid var(--line);font-size:13px;line-height:19px;white-space:normal;display:flex;flex-direction:column;gap:3px}
.bulle .sources a{color:var(--accent);overflow-wrap:anywhere}
.saisie-chat{position:sticky;bottom:calc(var(--bas) + 8px);display:flex;gap:8px;align-items:flex-end;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:8px;box-shadow:var(--ombre)}
.saisie-chat textarea{border:0;background:none;min-height:44px;max-height:180px;resize:none;padding:10px 8px;outline:0}
@media (max-width:999px){.saisie-chat{bottom:calc(var(--barre-bas) + var(--bas) + 10px)}}
/* Graphique à barres simple */
.barres{display:flex;align-items:flex-end;gap:6px;height:150px;padding-top:8px}
.barres .b{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:2px;height:100%;position:relative}
.barres .b i{display:block;border-radius:4px 4px 0 0;background:var(--accent);min-height:2px}
.barres .b i.ch{background:var(--line);border-radius:0 0 4px 4px}
.barres .b small{font-size:10px;line-height:14px;color:var(--muted);text-align:center;white-space:nowrap;overflow:hidden}
.legende{display:flex;gap:14px;font-size:12px;color:var(--muted);margin-top:8px;flex-wrap:wrap}
.legende i{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--accent);margin-right:5px;vertical-align:-1px}
.legende i.ch{background:var(--line)}
/* Tableaux de rapports */
table.t.rapport{min-width:0}
table.t.rapport tr.total td{font-weight:700;border-top:2px solid var(--ink);border-bottom:0}
table.t.rapport tr.groupe td{font-weight:700;padding-top:16px}
table.t.rapport tr.detail td:first-child{padding-left:18px;color:var(--muted)}
table.t td.neg{color:var(--bad)}
.menu-plus{display:flex;flex-direction:column}
.kv.large{grid-template-columns:minmax(110px,max-content) minmax(0,1fr)}
.pile{display:flex;flex-direction:column;gap:12px}
.rang{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pousse{margin-left:auto}
.discret{color:var(--muted);font-size:13px;line-height:18px}
.card.clic{cursor:pointer}
.card > .titre-section:first-child{margin-top:0}
.f.plein{grid-column:1 / -1}
textarea.court{min-height:76px}
input[type=date],input[type=time],input[type=datetime-local]{min-height:38px}
/* Cibles tactiles de 44 px au moins : champs d'une ligne, listes déroulantes, onglets (y compris les dates, ci-dessus, dont le sélecteur l'emporte ici). */
body.suite input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]),body.suite select{min-height:44px}
body.suite .tabs button,body.suite .tabs [role=tab]{min-height:44px}
@media print{.nav,.onglets,.barre .actions,.retour,.puces,.entete-liste{display:none !important}.coque{display:block}.zone{padding:0;max-width:none}.card,.lignes{border-color:#999}}
/* Onglets de l'écran des devis et sous-rubriques : sur un téléphone, une seule rangée qui se fait glisser (au lieu de trois rangées empilées). */
@media (max-width:640px){.suite .tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-left:-16px;margin-right:-16px;padding:0 12px}.suite .tabs::-webkit-scrollbar{display:none}}
@media (max-width:999px){.onglets .rub{background:none}.onglets .rub:hover{background:none;color:var(--muted)}.onglets .rub[aria-current="page"],.onglets .rub[aria-current="page"]:hover{color:var(--accent)}}
/* Retouches après les premiers écrans */
.lg .pastille-rond svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Sur un écran tactile, le « survol » reste collé à l'élément touché : il ne doit rien marquer. La rubrique courante garde son fond dans la colonne de gauche seulement ;
   dans la barre du bas, elle n'est dite que par sa couleur (sinon l'onglet touché gardait une pastille verte que les autres n'ont pas). */
@media (hover:none){.lg:hover{background:none}.rub:hover{background:none;color:var(--muted)}.nav .rub[aria-current="page"]:hover{background:var(--accent-soft);color:var(--ink)}.onglets .rub[aria-current="page"]:hover{background:none;color:var(--accent)}}
@media (max-width:999px){.btn{min-height:44px}.fen .x{width:44px;height:44px}}
/* En sombre, les contrôles du système (calendrier d'un champ de date, barres de défilement) suivent. */
:root[data-theme="dark"]{color-scheme:dark}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark}}
/* Graphique : les charges en gris soutenu (le gris des filets était presque invisible sur une carte). */
.barres .b i.ch,.legende i.ch{background:color-mix(in srgb,var(--muted) 70%,var(--surface))}
@media (max-width:359px){.barre h1{font-size:23px;letter-spacing:-.3px}}

/* Bandeau « Une nouvelle version est prête » : son lien se touche sans viser (zone de 44 px, sans changer l'aspect). */
#nouvelleVersion .lien{padding:12px 6px;margin:-12px 0}
/* Écran qui n'a pas pu se charger : ses deux boutons côte à côte. */
.vide .rang{margin-top:4px}
/* Page de connexion servie avec la suite (application installable) : elle respecte l'encoche et la barre d'accueil du téléphone. Ses champs font 16 px par la règle ci-dessus. */
body.porte .login{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
/* Le texte des onglets de sous-rubrique et les liens gardent la variante lisible de la couleur de l'entreprise (--accent). Le fond des boutons principaux, lui, est la
   teinte choisie telle quelle (--accent-fond), avec son encre ; le bord reste à la variante lisible, pour que le bouton se détache aussi d'un fond sombre.
   Sans teinte choisie, ces deux variables n'existent pas : la feuille de style d'origine s'applique. */
.btn.primary{background:var(--accent-fond,var(--accent));color:var(--accent-fond-ink,var(--accent-ink))}
/* Zones tactiles de 44 px sur un téléphone : la flèche de retour et les puces de filtre. */
@media (max-width:999px){.retour{width:44px;height:44px}.puce{min-height:44px;padding:6px 14px}}
/* Le même anneau de focus partout : dans la colonne de gauche et sur les liens comme sur les boutons et les champs. */
.suite a:focus-visible,.suite summary:focus-visible,.suite [tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.suite #contenu:focus-visible{outline:0}
.rub:focus-visible{outline-offset:-2px}
/* Page de connexion : le logo de l'entreprise, au-dessus de son nom. */
.porte-logo{display:block;max-height:64px;max-width:220px;margin:0 0 14px}
