/* Thème Lembas : la SEULE source des couleurs, de la police, des arrondis, des ombres et du verre.
   Direction (16/10) : verre dépoli façon Apple, dans la version « encre » d'Antoine (même allure
   que son tableau de bord marketing). Règles : DESIGN.md.
   Chargé AVANT le <style> de chaque page. Les règles préfixées par :root ci-dessous l'emportent
   sur celles des pages (elles sont plus précises) : c'est voulu, c'est ici qu'on règle le design. */

/* Style « verre encre » d'Antoine (tonio-dashboard, 16/10) : plus aucune couleur dans le décor,
   l'action est en ENCRE (noir), la bulle de la boulangerie est un verre sombre. Le bordeaux
   Lembas ne reste que dans le logo (--brand). Variantes essayées : graphite, nacre. */
:root {
  color-scheme: light;
  /* Couleurs : copie des jetons de commun/design/tokens.css du 27/10 (système de Tonio), sous les noms
     qu'emploient les pages de Lembas. Un monochrome neutre, l'action à l'encre, les états en lavis.
     Contrastes calculés au seuil de 4,5 sur chaque fond (27/10) : ne pas éclaircir --ink-faint. */
  --bg:#F2F2F3; --surface:#FFFFFF; --surface-2:#FAFAFB; --surface-3:#ECECEE;
  --line:#E5E5E7; --line-soft:#EEEEF0; --line-strong:#D1D1D4;
  --ink:#0B0B0C; --ink-soft:#5E6066; --ink-faint:#64666C;
  /* L'action est VERTE depuis le 09/11 (maquettes des boutons flottants, retenues par Antoine) : tout ce qui
     est plein à l'accent (Valider, Itinéraire, Envoyer, Imprimer…) passe au vert ; le texte reste à l'encre. */
  --accent:#3F9A66; --accent-text:#0B0B0C; --accent-soft:#ECECEE; --on-accent:#FFFFFF;
  --brand:#8E2C3F;
  --ok:#2F6B46; --ok-soft:#E9F0EB;
  --warn:#8A5A1E; --warn-soft:#F3EEE5;
  --danger:#9B2C22; --danger-soft:#F6E7E4;
  --wait:#2E5571; --wait-soft:#E9EEF3;
  --sunken:#E8E8EA; --creux:inset 0 0 0 1px #DEDEE1;
  /* Anciens noms encore utilisés par les pages. « info » n'a pas de couleur propre : gris neutre. */
  --good:var(--ok); --good-soft:var(--ok-soft);
  --info:var(--ink-soft); --info-soft:var(--surface-2);
  /* Arrondis : 12 petits blocs, 18 éléments de liste et champs, 26 cartes et panneaux ; boutons en pilule. */
  --radius:12px; --radius-sm:12px; --radius-m:18px; --radius-card:26px; --radius-l:26px; --pill:999px;
  --shadow:none;
  /* Les cartes sont posées en relief doux sur le fond gris, sans filet (Tonio, 27/10). */
  --ombre-carte:0 4px 24px rgba(11,11,12,.07),0 1px 2px rgba(11,11,12,.04);
  --ombre-legere:0 2px 10px rgba(11,11,12,.05);
  --shadow-float:0 10px 34px rgba(11,11,12,.13);
  /* Verre dépoli. */
  --glass-bg:rgba(242,242,243,.72);
  --glass-strong:rgba(250,250,251,.92);
  --glass-tab:rgba(255,255,255,.62);
  --glass-line:rgba(11,11,12,.08);
  --glass-blur:blur(24px) saturate(1.4);
  --glass-dim:rgba(11,11,12,.30);
  --fond-halo:none;
  /* Bulles de chat : l'agent en carte blanche, la boulangerie en gris doux. */
  --bulle-lui:#FFFFFF; --bulle-lui-ink:var(--ink); --bulle-lui-line:transparent;
  --bulle-moi:#ECECEE; --bulle-moi-ink:var(--ink);
  --onglet-actif:#ECECEE;
  --toast-bg:#0B0B0C; --toast-ink:#FFFFFF;
  --font:"Instrument Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --font-display:var(--font);
  /* Fond rouge plein (pastilles de compteur, bouton Supprimer) : blanc dessus à 7,56. */
  --danger-plein:#9B2C22; --sur-danger:#FFFFFF;
  /* Tailles de texte : SEPT pas, aucune taille hors de ceux-là. Minimum 12 px à l'écran.
     Seuls les documents imprimés (facture, bons de livraison, ticket, relevé, fiche de production) gardent les leurs. */
  --t-xs:12px;   /* étiquettes, compteurs, fil d'Ariane */
  --t-s:13px;    /* légendes, boutons secondaires, texte d'appoint */
  --t-m:15px;    /* texte courant */
  --t-l:17px;    /* texte d'un message, champs de saisie, petit titre */
  --t-xl:21px;   /* titre d'un bloc */
  --t-2xl:27px;  /* titre de page, grand chiffre */
  --t-3xl:33px;  /* le chiffre du jour */
  /* Espacements : base 4, huit pas. */
  --e-0:2px; --e-1:4px; --e-2:8px; --e-3:12px; --e-4:16px; --e-5:20px; --e-6:24px; --e-7:32px;
  --tap:44px;    /* la plus petite cible tactile */
  /* Dégagement du bas du téléphone : UNE mesure, encoche de l'iPhone comprise. Capsule d'onglets
     (8 px du bas + 65 px) ; sur ordinateur, pas de capsule, seule l'encoche compte. */
  --barre-bas:env(safe-area-inset-bottom, 0px);
  --toast-bas:calc(var(--barre-bas) + var(--e-6));
  --page-bas:calc(var(--barre-bas) + var(--e-6));
  /* Hauteur de la saisie de l'assistant posée au-dessus de la capsule (téléphone). */
  --saisie-h:0px;
}
@media (max-width:780px) {
  :root { --barre-bas:calc(73px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:#121214; --surface:#232327; --surface-2:#1C1C1F; --surface-3:#2A2A2E;
    --line:#2A2A2E; --line-soft:#232327; --line-strong:#3C3C42;
    --ink:#F4F4F6; --ink-soft:#A0A2A8; --ink-faint:#93959B;
    --accent:#7CC79A; --accent-text:#F4F4F6; --accent-soft:#2A2A2E; --on-accent:#0B1A11;
    --ok:#8FC2A4; --ok-soft:#16211A;
    --warn:#D7B07A; --warn-soft:#241D12;
    --danger:#D98E83; --danger-soft:#271716;
    --wait:#9BB4CB; --wait-soft:#17212A;
    --sunken:#0D0D0F; --creux:inset 0 0 0 1px #2F2F34;
    --ombre-carte:0 4px 24px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.3);
    --ombre-legere:0 2px 12px rgba(0,0,0,.45);
    --shadow-float:0 10px 34px rgba(0,0,0,.5);
    --glass-bg:rgba(18,18,20,.68); --glass-strong:rgba(28,28,31,.94); --glass-tab:rgba(36,36,40,.62);
    --glass-line:rgba(244,244,246,.10); --glass-dim:rgba(0,0,0,.5);
    --bulle-lui:#232327; --bulle-lui-line:transparent;
    --bulle-moi:#2A2A2E; --bulle-moi-ink:#F4F4F6;
    --onglet-actif:#2A2A2E;
    --toast-bg:#F4F4F6; --toast-ink:#121214;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#121214; --surface:#232327; --surface-2:#1C1C1F; --surface-3:#2A2A2E;
  --line:#2A2A2E; --line-soft:#232327; --line-strong:#3C3C42;
  --ink:#F4F4F6; --ink-soft:#A0A2A8; --ink-faint:#93959B;
  --accent:#7CC79A; --accent-text:#F4F4F6; --accent-soft:#2A2A2E; --on-accent:#0B1A11;
  --ok:#8FC2A4; --ok-soft:#16211A;
  --warn:#D7B07A; --warn-soft:#241D12;
  --danger:#D98E83; --danger-soft:#271716;
  --wait:#9BB4CB; --wait-soft:#17212A;
  --sunken:#0D0D0F; --creux:inset 0 0 0 1px #2F2F34;
  --ombre-carte:0 4px 24px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.3);
  --ombre-legere:0 2px 12px rgba(0,0,0,.45);
  --shadow-float:0 10px 34px rgba(0,0,0,.5);
  --glass-bg:rgba(18,18,20,.68); --glass-strong:rgba(28,28,31,.94); --glass-tab:rgba(36,36,40,.62);
  --glass-line:rgba(244,244,246,.10); --glass-dim:rgba(0,0,0,.5);
  --bulle-lui:#232327; --bulle-lui-line:transparent;
  --bulle-moi:#2A2A2E; --bulle-moi-ink:#F4F4F6;
  --onglet-actif:#2A2A2E;
  --toast-bg:#F4F4F6; --toast-ink:#121214;
}

/* Une seule famille de police, y compris dans les boutons et les champs. */
body, button, input, select, textarea { font-family:var(--font); }
:root h1, :root h2, :root h3 { font-family:var(--font-display); letter-spacing:-.02em; }
:root h1 { font-weight:650; }

/* Fond : léger halo en haut à gauche, comme chez Antoine. */
:root body { background:var(--fond-halo), var(--bg); background-attachment:fixed; }

/* Chiffres alignés pour les montants et les quantités. */
.mono, td.num, .num { font-variant-numeric:tabular-nums; }

/* Le logo, le petit boulanger qui fait « miam » : en noir et blanc depuis le 28/10 (dessin logo-trait.svg
   à l'encre sur un carré gris, la couleur suit le thème), comme l'étoile de Tonio.
   Toutes les pages ont un emplacement .logo ; son contenu d'origine (lettre, emoji) est masqué. */
:root .logo, :root .brand .logo, :root .top .logo { position:relative; background:transparent; color:transparent; font-size:0; border-radius:28%; flex:none; box-shadow:none; }
:root .logo::after { content:""; position:absolute; inset:0; background:url(logo.svg?v=4) center/100% no-repeat; }
:root .logo > * { display:none; }
:root .brand .tld { color:var(--brand); }

/* Cartes : arrondi doux (18 px, comme chez Antoine). */
:root .card, :root .req, :root .vreq, :root .chatcard { border-radius:var(--radius-card); }
/* Boutons et champs de saisie en pilule ; micro et envoi ronds. */
:root .btn { border-radius:var(--pill); }
:root .cin input, :root .cardchat input, :root .minput, :root .edchat input, :root .lcin input, :root .composer input { border-radius:var(--pill); padding-left:var(--e-4); }
:root .cmic, :root .csend, :root .mic, :root .send, :root .cardmic, :root .cardsend, :root .lcmic, :root .lcsend { border-radius:var(--pill); }
:root .cmic, :root .csend, :root .mic, :root .send, :root .lcmic, :root .lcsend { width:44px; height:44px; }

/* ── Bulles de chat (tous les assistants) ─────────────────────────────── */
:root .msg.agent, :root .cm.agent, :root .lcm.agent {
  background:var(--bulle-lui); color:var(--bulle-lui-ink); border:.5px solid var(--bulle-lui-line);
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); box-shadow:0 2px 10px rgba(11,11,12,.05);
  border-radius:20px; border-bottom-left-radius:7px; font-size:var(--t-l); line-height:1.5; padding:var(--e-3) var(--e-4);
}
:root .msg.user, :root .cm.user, :root .lcm.user {
  background:var(--bulle-moi); color:var(--bulle-moi-ink); border:0;
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); box-shadow:0 4px 16px rgba(11,11,12,.18);
  border-radius:20px; border-bottom-right-radius:7px; font-size:var(--t-l); line-height:1.5; padding:var(--e-3) var(--e-4);
}
:root .msg.agent.wide { background:transparent; border:0; box-shadow:none; padding:0; -webkit-backdrop-filter:none; backdrop-filter:none; }
:root .msg.agent b { color:inherit; }

/* ── Boutons d'action des cartes (commandes, devis) ─────────────────────────
   Toujours avec leur texte. Sur téléphone : « Valider » seul sur toute la largeur,
   les autres en dessous ; l'action risquée (Annuler, Supprimer) en rouge. */
:root .btn.danger { background:var(--danger-plein); color:var(--sur-danger); border-color:transparent; }
/* Survol des boutons pleins : la règle d'état REJOUE le fond et le texte. Sans cela, une règle
   « .btn:hover » d'une page (même poids, placée plus bas) peut rendre le bouton encre sur encre
   ou blanc sur blanc au survol (piège mesuré chez Antoine ; invisible au téléphone, pas de survol). */
:root .btn.primary:hover:not(:disabled) { background:var(--accent); color:var(--on-accent); border-color:transparent; opacity:.86; }
:root .btn.danger:hover:not(:disabled) { background:var(--danger-plein); color:var(--sur-danger); border-color:transparent; }
:root .btn.risque { color:var(--danger); }
:root .btn.risque:hover { border-color:var(--danger); color:var(--danger); }
/* Le mini-chat d'une carte n'est pas l'action principale : bouton discret. */
:root .cardchat .cardsend { background:var(--surface); color:var(--ink); border:1px solid var(--line); }
@media (max-width:560px) {
  :root .acts .btn .bt, :root .mfoot .btn .bt { display:inline; }
  :root .acts .btn, :root .vacts .btn { flex:1 1 0; min-height:44px; justify-content:center; white-space:nowrap; }
  :root .acts .btn.primary, :root .vacts .btn.primary { flex:1 1 100%; min-height:48px; font-size:var(--t-l); }
}

/* ── Verre dépoli ─────────────────────────────────────────────────────────
   Seulement là où Apple le met : barres qui restent à l'écran, fenêtres, menus,
   messages. Le contenu (commandes, montants) reste sur fond plein, pour rester lisible. */
:root .side,
:root .facbar, :root .top, :root body > .bar {
  background:var(--glass-bg);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  box-shadow:none;
}
:root .side { border-right:.5px solid var(--glass-line); }
:root .facbar, :root .top, :root body > .bar { border-bottom:.5px solid var(--glass-line); }

/* Fond des fenêtres : la page derrière est assombrie et floutée. */
:root .voverlay, :root .overlay, :root .paym, :root .ovl {
  background:var(--glass-dim);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
}
/* Fenêtres, tiroirs, panneaux flottants : verre plus opaque, liseré fin, ombre douce. */
:root .vmodal, :root .modal, :root .sheet, :root .lcpanel, :root .paym .box {
  background:var(--glass-strong);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  border:.5px solid var(--glass-line); box-shadow:var(--shadow-float); border-radius:var(--radius-l);
}
/* Les fenêtres qui montent du bas de l'écran : arrondies en haut seulement. */
:root .vmodal { border-radius:var(--radius-l) var(--radius-l) 0 0; }
/* Messages éphémères (« Commande validée ») : pastille de verre sombre. */
:root .toast {
  background:var(--toast-bg); color:var(--toast-ink);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  border:0; border-radius:var(--pill);
}
/* Messages brefs : toujours au-dessus de la barre d'onglets du téléphone (jeton --toast-bas). */
:root .toast { bottom:max(var(--toast-bas), calc(var(--ma-haut, 0px) + 20px)); }   /* au-dessus de la barre de l'assistant aussi (29/10) */
/* Devant le fondu du bas d'écran (z 8500) et la barre de l'assistant (8600) : il délavait le bas du message (29/10). */
:root .toast { z-index:8700; }
/* Navigateur sans effet de flou : fonds pleins (jamais de texte illisible). */
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))) {
  :root { --glass-bg:var(--surface); --glass-strong:var(--surface); --glass-tab:var(--surface);
          --bulle-lui:var(--surface); --bulle-moi:var(--ink); --toast-bg:var(--ink); }
}

/* Icônes Lucide (miam-icons.js) : trait 1,5 px, couleur du texte. */
/* Une taille ENTIÈRE (10/11) : max(18px, 1.15em) donnait 18,4 px, et Safari coupait le trait au bord du pixel. */
.lu { width:18px; height:18px; stroke:currentColor; stroke-width:1.6; fill:none; shape-rendering:geometricPrecision;
      stroke-linecap:round; stroke-linejoin:round; vertical-align:-3px; flex:none; overflow:visible; }
.nav .lu, .miam-tab .lu { width:20px; height:20px; }

/* ── Téléphone et tablette : tout ce qui se touche fait au moins 44 px (norme Apple) ──
   Mesuré le 16/10 : suggestions, filtres, petits boutons, cases à cocher et lien « annuler »
   des livraisons étaient trop petits pour un doigt. */
@media (max-width:780px), (pointer:coarse) {
  :root button, :root .btn, :root select,
  :root input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]) { min-height:44px; }
  :root button { min-width:44px; }
  :root .miam-tab, :root .miam-more-x { min-width:0; }
  :root input[type=checkbox], :root input[type=radio] { width:22px; height:22px; }
  /* Un champ écrit sous 16 px fait zoomer l'iPhone quand on le touche : au doigt, champs en 17 px. */
  :root input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), :root select, :root textarea { font-size:var(--t-l); }
  :root summary { min-height:44px; display:flex; align-items:center; }
  :root .unconf { padding:var(--e-3) var(--e-4); font-size:var(--t-m); }
  :root #retardClose { padding:var(--e-3) var(--e-3); }
}

/* Jamais de débordement hors de l'écran (mesuré à 375 px le 21/10 : Créer une commande, Devis et
   Articles dépassaient de 4 à 40 px). Une colonne de grille ou un champ dans une ligne flexible
   prend par défaut la largeur de son contenu le plus long : on l'autorise à rétrécir. */
:root .app > *, :root .grid > *, :root .vcols > * { min-width:0; }
:root .search input, :root .search select { min-width:0; }
:root .search select { max-width:45%; }

/* Toucher : pas de délai de double-tap, pas de flash gris. */
a, button, input, select, textarea, label { touch-action:manipulation; -webkit-tap-highlight-color:transparent; }

/* ── Cartes en relief doux sur le fond gris, sans filet (système de Tonio, 27/10) ──────────────
   Seulement les conteneurs : un champ ou un bouton garde son filet. */
:root .card, :root .chatcard, :root .req, :root .vreq, :root .cmd, :root .devis,
:root .fiche, :root .rcard, :root .paycard, :root .lcpanel {
  background:var(--surface); border-color:transparent; box-shadow:var(--ombre-carte); border-radius:var(--radius-card);
}
/* Onglets d'une page (Commandes) : un segment en creux, l'onglet actif en relief. */
:root .tabs { border-bottom:0; margin:var(--e-3) var(--e-6) 0; padding:var(--e-1); gap:var(--e-1); background:var(--sunken); box-shadow:var(--creux); border-radius:var(--radius-m); width:fit-content; max-width:calc(100% - 2 * var(--e-6)); }
:root .tabs .tab { border:0; border-radius:14px; padding:var(--e-2) var(--e-4); min-height:40px; white-space:nowrap; margin:0; }
:root .tabs .tab.on { background:var(--surface); color:var(--ink); box-shadow:var(--ombre-legere); }
/* Téléphone : l'en-tête commun porte la boulangerie et la date ; le titre de page se resserre. */
@media (max-width:780px) {
  :root .crumb { display:none; }
  :root .top { padding:var(--e-4) var(--e-4) var(--e-2); position:static; }
  :root .top h1 { font-size:var(--t-xl); }
  :root .top .sub { font-size:var(--t-s); }
  :root .tabs { margin:var(--e-2) var(--e-4) 0; max-width:calc(100% - 2 * var(--e-4)); }
}
/* Menu des fichiers (Clients pro, Articles) : import, export, registre, rangés derrière un bouton. */
:root details.md-menu { position:relative; width:fit-content; min-width:0; border-radius:0; z-index:auto; margin:0 0 var(--e-3) auto; padding:0; border:0; background:transparent; box-shadow:none; }
:root .md-menu > summary { list-style:none; display:inline-flex; align-items:center; gap:var(--e-2); min-height:38px; padding:0 var(--e-4); border-radius:var(--pill);
  background:var(--accent-soft); color:var(--ink); font-weight:600; font-size:var(--t-s); cursor:pointer; }
:root .md-menu > summary::-webkit-details-marker { display:none; }
:root .md-menu:not([open]) > .md-outils { display:none; }   /* fermé, il ne doit pas réserver la largeur du menu */
:root .md-menu > summary .lu { width:16px; height:16px; }
:root .md-menu[open] > .md-outils { position:absolute; right:0; top:calc(100% + var(--e-2)); z-index:60; width:290px; display:flex; flex-direction:column; flex-wrap:nowrap; gap:0;
  margin:0; padding:var(--e-2); background:var(--surface-2); border-radius:var(--radius-m); box-shadow:var(--shadow-float); }
:root .md-menu .md-outils .btn { width:100%; justify-content:flex-start; text-align:left; border:0; background:transparent; border-radius:var(--radius); min-height:44px; font-weight:600; color:var(--ink); }
:root .md-menu .md-outils .btn:hover { background:var(--surface-3); }
:root .md-menu .md-et { font-size:var(--t-xs); font-weight:650; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-faint); padding:var(--e-3) var(--e-3) var(--e-1); }
/* Le rail de l'ordinateur : sa place et sa forme existent dès le premier affichage, et les anciens
   liens de la barre latérale ne s'affichent jamais (ils clignotaient avant l'arrivée du rail). */
@media (min-width:781px) {
  /* 26/11 (Antoine : « Commandes fournisseurs sur une seule ligne ») : 32 px de plus (le texte demande 182 px ; à 262 px la ligne en offrait 158, à 286 encore 180 ; 4 px de marge). */
  :root .app { grid-template-columns:294px minmax(0,1fr) !important; }
  :root .side { background:var(--surface-2) !important; margin:16px 0 16px 16px; height:calc(100vh - 32px) !important; top:16px !important; position:sticky;
    border:0 !important; border-radius:26px; box-shadow:var(--ombre-carte); padding:0 !important; overflow:hidden auto; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; scrollbar-width:none; }
  :root .side::-webkit-scrollbar { display:none; }
  :root .side > :not(.miam-rail) { display:none !important; }
}
/* Page ouverte dans la coquille persistante (app.html) : pas de barre latérale ni de rail à elle. */
html.miam-embed .side { display:none !important; }
html.miam-embed .app { grid-template-columns:minmax(0,1fr) !important; }
@media (max-width:780px) { html.miam-embed body:not(.avec-assistant)::after { content:""; position:fixed; left:0; right:0; bottom:0; height:110px; background:linear-gradient(to bottom, transparent, var(--bg) 45%); pointer-events:none; z-index:50; } }
@media (min-width:1100px) { html.miam-embed .ma { top:16px !important; } }

/* Passage d'une page à l'autre : fondu, la capsule et le rail restent en place (Chrome, Safari 18.2+). */
@view-transition { navigation:auto; }
.miam-tabbar { view-transition-name:miam-capsule; }
.miam-rail { view-transition-name:miam-rail; }
.miam-entete { view-transition-name:miam-entete; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation:none; } }

/* L'explication de la page, repliée derrière le bouton (?) à côté du titre (miam-icons.js). */
:root .top .sub.repliee { display:none; }
/* 26/11 : le paragraphe qui explique un bloc, replié derrière le (?) de son titre (miam-icons.js). */
:root .miam-aide-bloc.repliee { display:none !important; }
:root .miam-aide-bloc.repliee.ouverte { display:block !important; padding:var(--e-3) var(--e-4); border-radius:var(--radius-m); background:var(--surface-2); color:var(--ink-soft); font-size:var(--t-s); line-height:1.5; }
:root .top .sub.repliee.ouverte { display:block; margin-top:var(--e-2); padding:var(--e-3) var(--e-4); border-radius:var(--radius-m); background:var(--surface); box-shadow:var(--ombre-legere); color:var(--ink-soft); font-size:var(--t-s); line-height:1.5; }
:root .miam-aide-page { display:inline-grid; place-items:center; vertical-align:middle; width:30px; height:30px; min-width:30px !important; min-height:30px !important; margin-left:var(--e-2);
  padding:0; border:0; border-radius:999px; background:var(--accent-soft); color:var(--ink-soft); cursor:pointer; }
:root .miam-aide-page .lu { width:18px; height:18px; }
:root .miam-aide-page[aria-expanded="true"] { background:var(--accent); color:var(--on-accent); }
/* Champs date d'iPhone : leur largeur propre débordait des cartes (Créer une commande, 27/10). */
:root input[type=date], :root input[type=month], :root input[type=time] { -webkit-appearance:none; appearance:none; min-width:0; max-width:100%; box-sizing:border-box; }
:root input[type=date]::-webkit-date-and-time-value, :root input[type=month]::-webkit-date-and-time-value { text-align:left; }
/* Ce qui est DANS une carte (jour de livraison, lignes) est un creux, pas une seconde carte. */
:root .card .lines, :root .req .lines, :root .cmd .lines { background:var(--surface-2); box-shadow:var(--creux); border-color:transparent; border-radius:var(--radius-m); }
/* En-têtes de page : plus de filet ni de bande, le titre posé sur le fond. */
:root .top { border-bottom-color:transparent; }
:root .top h1 { font-weight:700; letter-spacing:-.03em; }
/* Ce qui accompagne le titre (« 7 commandes · 575,75 € », Son, actualiser) se centre sur la ligne du titre
   (28/10) : il était calé en haut, plus haut que le titre. */
:root .top { align-items:center; }
:root .top:has(.sub.repliee.ouverte) { align-items:flex-start; }
:root .top .count { align-self:center; margin-top:0; margin-bottom:0; }

/* Listes déroulantes et champs date : une seule forme partout, celle des pastilles (28/10).
   Avant, chaque page avait la sienne (« choisir un client » de Livraisons, mince et blanc). */
:root select { -webkit-appearance:none; appearance:none; min-height:44px; padding:0 40px 0 var(--e-4); border:0 !important; border-radius:var(--radius-m) !important;
  background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  box-shadow:var(--ombre-legere); color:var(--ink); font-weight:500; max-width:100%; }
:root input[type=date], :root input[type=month], :root input[type=time] { min-height:44px; border-radius:var(--radius-m); }
/* Un champ date vide d'iPhone ne montre rien : miam-icons.js pose « jj/mm/aaaa » par-dessus. */
.miam-ph { position:absolute; pointer-events:none; color:var(--ink-faint); display:flex; align-items:center; white-space:nowrap; overflow:hidden; }
.miam-ph[hidden] { display:none; }
/* Téléphone : une seule marge de page, 16 px, pour tous les blocs ; onglets de page sur toute la largeur. */
@media (max-width:780px) {
  :root .main > .wrap, :root .main > .grid { padding-left:var(--e-4) !important; padding-right:var(--e-4) !important; }
  :root .tabs { width:auto; display:flex; }
  :root .tabs .tab { flex:1 1 auto; justify-content:center; padding-left:var(--e-3); padding-right:var(--e-3); min-width:0; }
  /* 26/11 : « Nouvelle commande » faisait déborder la barre de Commandes de 60 px ; au téléphone, « Nouvelle ». */
  :root .tabs .tab-long { display:none; }
}

/* Une fenêtre ouverte (facture, paiement, accès, bons) passe devant tout : l'assistant et son fondu
   s'effacent ici, la capsule de la coquille aussi (miam-icons.js pose les deux classes, 28/10). */
html.miam-fenetre .ma, html.miam-fenetre .ma-voile, html.miam-fenetre body::after { display:none !important; }

/* Ordinateur aussi (28/10) : le fil d'Ariane doublait le menu de gauche, il disparaît comme au téléphone. */
:root .crumb { display:none !important; }

/* Deux teintes de plus (28/10) : violet pour les devis, terre pour le fournil, partagées par toutes les pages. */
:root { --c-violet:#5B4A8B; --c-violet-soft:#EEEAF6; --c-terre:#9A4A2B; --c-terre-soft:#F6ECE6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-violet:#B6A8E3; --c-violet-soft:#211C2E; --c-terre:#E2A385; --c-terre-soft:#2B1D17; } }
:root[data-theme="dark"] { --c-violet:#B6A8E3; --c-violet-soft:#211C2E; --c-terre:#E2A385; --c-terre-soft:#2B1D17; }

/* Style A sur ordinateur (28/10) : deux colonnes = deux cartes, même haut, même bas que l'assistant.
   Ce qui était une carte dans une colonne devient une section de cette colonne (plus de cartes empilées
   de hauteurs différentes). Les pages posent .col-a (à gauche) et .col-b (au centre). */
@media (min-width:1100px) {
  body.style-a .main { display:flex !important; flex-direction:column; height:100vh; padding-bottom:16px !important; }
  body.style-a .main > .top { flex:none; }
  body.style-a .main > .wrap { flex:1; min-height:0 !important; display:grid !important; grid-template-columns:var(--col-a, 290px) minmax(0,1fr) !important;
    gap:var(--e-4) !important; align-items:stretch !important; padding-top:0 !important; padding-bottom:0 !important; max-width:none !important; }
  body.style-a .col-a, body.style-a .col-b { display:flex !important; flex-direction:column; min-height:0; overflow:auto; position:static !important; max-height:none !important;
    background:var(--surface); border-radius:var(--radius-card); box-shadow:var(--ombre-carte); padding:var(--e-4); gap:var(--e-3); scrollbar-width:none; }
  body.style-a .col-a::-webkit-scrollbar, body.style-a .col-b::-webkit-scrollbar { display:none; }
  body.style-a .col-a { grid-column:1; } body.style-a .col-b { grid-column:2; min-width:0; }
  body.style-a .col-a > *, body.style-a .col-b > * { margin:0 !important; flex:none; }
  body.style-a .col-a > * + *:not([hidden]) { border-top:1px solid var(--line); padding-top:var(--e-3); }
  /* Les anciennes cartes deviennent plates à l'intérieur d'une colonne. */
  body.style-a .col-a .sum, body.style-a .col-a .filters, body.style-a .col-a .moisl, body.style-a .col-a .trouve, body.style-a .col-a .cl-liste,
  body.style-a .col-a .cat-tete, body.style-a .col-a .catnav, body.style-a .col-a .controls, body.style-a .col-a #retardBanner,
  body.style-a .col-b #list:has(> .cli), body.style-a .col-b .livliste, body.style-a .col-b .cat:not(:empty), body.style-a .col-b #form, body.style-a .col-b .cl-vide {
    background:transparent !important; box-shadow:none !important; border:0 !important; border-radius:0 !important; padding-left:0 !important; padding-right:0 !important; }
  body.style-a .col-a .sum { background:var(--surface-2) !important; border-radius:18px !important; padding:var(--e-4) !important; }
  body.style-a .col-a .sums { display:flex !important; flex-direction:column; gap:var(--e-2) !important; }
  body.style-a .col-a #retardBanner { background:var(--warn-soft) !important; border-radius:18px !important; padding:var(--e-3) !important; }
  body.style-a .col-b .cl-vide:not([hidden]) { flex:1; min-height:0 !important; }
}

/* Zones de texte (28/10) : comme les champs, au lieu de la bordure noire du navigateur. :where() garde
   une priorité nulle, les pages qui ont leur propre style le gardent. */
:where(textarea) { font:inherit; font-size:var(--t-m); line-height:1.45; padding:var(--e-3) var(--e-4); border:1px solid var(--line); border-radius:var(--radius-m);
  background:var(--surface); color:var(--ink); box-sizing:border-box; max-width:100%; }
:where(textarea):focus { outline:none; border-color:var(--accent); }

/* Boutons, étiquettes et pastilles (28/10) : toujours en pilule. Plusieurs gardaient l'angle de 12 px
   de l'outil d'origine et se lisaient comme des encadrés carrés à côté des autres. Restent à part : les
   onglets d'un segment (arrondis dans leur creux), les lignes de liste et de menu, les carrés d'icône. */
:root :is(button, .btn, a.btn, .chip, .pill, .count, .vcount, .vchan, .blbtn, .fbtn, .lienorg, label.feat, .badge, .st, .datechip, .mini, .cardmic, .cardsend):not(.seg button):not(.tabs .tab):not(.adm-seg button):not(.mf-seg button):not(.blseg button):not(.tiles > *):not(.rows > *):not(.row):not(.md-outils .btn):not(.u-menu .btn):not(.miam-menu button):not(.catnav button):not(.cl-i):not(.mr-lien):not(.ma-poignee):not(.ma-toucher):not(.dve-e) {
  border-radius:999px !important;
}
/* Les segments : un creux de 18 px, l'onglet choisi de 14 px dedans, partout pareil. */
:root .seg, :root .tabs, :root .adm-seg { border-radius:18px !important; }
:root .seg button, :root .tabs .tab, :root .adm-seg button { border-radius:14px !important; }
/* Livraisons, liste des jours dans la colonne de gauche sur ordinateur : lignes de liste. */
@media (min-width:1100px) { :root .liv-a #ctlJour .chip, :root .liv-a #ctlJour .datechip, :root .fa-gauche .filters .fbtn { border-radius:999px !important; } }

/* Fenêtres « Échanges » (28/10) : la note sur sa ligne, puis les deux gestes côte à côte, à parts égales ;
   la réponse dans une saisie en pilule. */
:root .vmodal .mfoot { display:flex !important; flex-wrap:wrap; gap:var(--e-2); padding:var(--e-3) var(--e-4) calc(var(--e-4) + env(safe-area-inset-bottom)); }
:root .vmodal .mfoot > .btn { flex:1 1 0; min-width:0; }
/* L'action principale (« Valider et envoyer ») prend sa ligne, au-dessus des autres. */
:root .vmodal .mfoot > .btn.primary { flex:1 1 100%; order:-1; }
:root .vmodal .mfoot > span:empty { display:none; }
:root .vmodal .mfoot[hidden], :root .vmodal .mrow[hidden] { display:none !important; }
@media (min-width:640px) { :root .vmodal { border-radius:26px !important; overflow:hidden; } }
:root .vmodal .mfoot > span { flex:1 1 100%; order:-2; font-size:var(--t-s); color:var(--ink-soft); margin:0 !important; }
:root .vmodal .mfoot > .btn { justify-content:center; min-height:44px; margin:0; white-space:nowrap; }
:root .vmodal .mfoot > .btn .bt { display:inline !important; }
:root .vmodal .mrow { align-items:center; gap:var(--e-2); padding:var(--e-3) var(--e-4); }
:root .vmodal .mrow .minput { flex:1; min-width:0; min-height:44px; border-radius:999px; border:0; background:var(--surface-2); box-shadow:var(--creux); padding:0 var(--e-4); }
:root .vmodal .mrow .mic, :root .vmodal .mrow > .btn:has(.bi) { flex:none; width:44px; height:44px; min-width:44px; padding:0 !important; display:grid; place-items:center; border-radius:999px; }
:root .vmodal .mrow > .btn:has(.bi) .bt { display:none; }
:root .vmodal .mrow > .btn:not(:has(.bi)) { flex:none; min-height:44px; border-radius:999px; }
:root .vmodal .vthread:has(> :only-child) { min-height:96px; }

/* Harmonisation (28/10, analyse « unslop ») : mesuré sur les 11 pages, 16 tailles de texte, 18 hauteurs de
   bouton, 9 libellés en capitales espacées. On ramène à l'échelle : boutons de 36 px (petits) et 44 px
   (normaux), libellés écrits simplement comme dans le menu. Les documents papier (bons, factures, devis
   imprimés) gardent leur typographie. */
:root :is(.lbl, .catnav-t, .prog-t, .ab-et, .seclbl, .fld label, .payrow label, .etiq, .hd h2, .md-et, .mf-et, .mv-etape, .miam-consigne .lbl, .niv):not(.bl *):not(.fac *):not(.devis *) {
  text-transform:none !important; letter-spacing:0 !important; font-weight:600 !important; }
:root .btn:not(.sm):not(.mini):not(.cardsend):not(.cardmic):not(.blbtn):not(.fbtn):not(.mf-b) { min-height:44px; }
:root :is(.btn.sm, .blbtn, .fbtn, .mf-b, .chip:not(.ma .chip)) { min-height:36px; }

/* Barres de défilement : aucune, nulle part (29/10). */
html, :root * { scrollbar-width:none; }   /* 29/10, Antoine : plus aucune barre de défilement visible ; on défile toujours au doigt, à la molette et au pavé */
::-webkit-scrollbar { display:none; width:0; height:0; }
/* 30/10, Antoine : sur ordinateur, de fines barres discrètes pour voir qu'il reste de quoi défiler (le menu,
   À faire, le programme, les listes). Toujours aucune au téléphone, où l'on défile au doigt.
   03/11 : redessinées. Dans une carte arrondie, la barre collait au bord, mordait sur les coins et se voyait
   trop ; et Chrome, dès qu'on lui donne scrollbar-width, ignore nos styles et dessine sa barre grise. Donc :
   les navigateurs qui savent styler la barre (Safari, Chrome) reçoivent nos styles seuls, les autres une
   barre fine. Un trait de 4 px, clair, qui fonce au survol de la zone, écarté des coins arrondis. */
@media (pointer:fine) {
  html, :root *, body.style-a .col-a, body.style-a .col-b { scrollbar-width:thin !important; scrollbar-color:color-mix(in srgb, var(--ink) 16%, transparent) transparent !important; }
  @supports selector(::-webkit-scrollbar) {
    html, :root *, body.style-a .col-a, body.style-a .col-b { scrollbar-width:auto !important; scrollbar-color:auto !important; }
  }
  ::-webkit-scrollbar, body.style-a .col-a::-webkit-scrollbar, body.style-a .col-b::-webkit-scrollbar { display:block !important; width:8px !important; height:8px !important; background:transparent; }
  ::-webkit-scrollbar-track { background:transparent; margin:var(--e-5) 0; }
  ::-webkit-scrollbar-thumb { background:color-mix(in srgb, var(--ink) 14%, transparent); border-radius:999px; border:2px solid transparent; background-clip:padding-box; }
  :hover::-webkit-scrollbar-thumb { background-color:color-mix(in srgb, var(--ink) 26%, transparent); }
  ::-webkit-scrollbar-thumb:hover { background-color:color-mix(in srgb, var(--ink) 40%, transparent); }
  ::-webkit-scrollbar-corner, ::-webkit-scrollbar-button { display:none; background:transparent; }
  /* Le menu de gauche, lui, est figé : jamais de barre ni de défilement (30/10, Antoine). */
  :root .side, :root .side * { scrollbar-width:none !important; }
  :root .side::-webkit-scrollbar { display:none !important; width:0 !important; }
}
:root .side.miam-rail-on { overflow:hidden !important; }
html { background:var(--bg); }

/* Arrondis (28/10) : une carte = 26 px, un creux dans une carte = 18 px. Ces cinq-là étaient
   restés à 12 px (le panneau « Devis à valider » paraissait carré à côté des autres). */
:root .vpanel { border-radius:var(--radius-card) !important; overflow:hidden; }
:root .vlines, :root .liv, :root .demvide, :root .agent { border-radius:var(--radius-m) !important; }

/* Micro en train d'écouter (28/10) : rouge et une onde, impossible à confondre avec « Envoyer ».
   Avant, il prenait la couleur du bouton d'envoi : on ne voyait pas qu'il enregistrait. */
:root .cmic.rec, :root .mic.rec, :root .lcmic.rec, :root .cardmic.rec { background:var(--danger-plein) !important; color:var(--sur-danger) !important; border-color:transparent !important;
  animation:miamEcoute 1.3s ease-out infinite !important; opacity:1 !important; }
@keyframes miamEcoute { 0% { box-shadow:0 0 0 0 color-mix(in srgb, var(--danger-plein) 55%, transparent); } 100% { box-shadow:0 0 0 12px transparent; } }
:root .ma-saisie.ma-ecoute { box-shadow:0 0 0 2px var(--danger-plein), var(--shadow-float) !important; }
:root .ma-saisie.ma-ecoute input::placeholder { color:var(--danger); opacity:1; }

/* ── Animations (29/10, miam-anim.js) ───────────────────────────────────────────────────────
   Courtes et douces : 380 ms pour monter, 180 ms pour le reste. Rien si l'appareil demande moins
   d'animations (règle juste en dessous). */
@keyframes miamMonte { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes miamFondu { from { opacity:0; } to { opacity:1; } }
@keyframes miamDeplie { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
/* Apparition : cachée tant qu'elle n'est pas à l'écran, puis elle monte (en cascade, 40 ms d'écart). */
.mv-pret .mv-a:not(.mv-on) { opacity:0; }
.mv-pret .mv-a.mv-on { animation:miamMonte .38s cubic-bezier(.2,.7,.2,1) both; animation-delay:calc(var(--mv-i, 0) * 40ms); }
/* Un onglet qu'on ouvre, un détail qu'on déplie : un fondu court. */
.cadres iframe.actif { animation:miamFondu .18s ease-out; }
details[open] > :not(summary) { animation:miamDeplie .2s ease-out; }
/* Ce qui se touche s'enfonce un peu à l'appui. */
:root button, :root .btn, :root .chip, :root a.tile, :root .cl-i, :root .mr-lien, :root .miam-tabbar a, :root #sections > a, :root .liste > a, :root summary {
  transition:transform .12s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease; }
:root button:active:not(:disabled), :root .btn:active, :root .chip:active, :root a.tile:active, :root .cl-i:active,
:root .mr-lien:active, :root .miam-tabbar a:active, :root #sections > a:active, :root .liste > a:active { transform:scale(.97); }
/* Ordinateur : une carte qui s'ouvre se soulève au survol. */
@media (hover:hover) and (pointer:fine) {
  :root a.tile:hover, :root .cl-i:hover, :root #sections > a:hover, :root .liste > a:hover { transform:translateY(-2px); box-shadow:var(--ombre-carte); }
  /* 03/11 : une ligne soulevée devient une petite carte ; ses traits, et celui de la ligne suivante, s'effacent (ils restaient en place sous elle). */
  :root .cl-i:hover, :root #sections > a:hover, :root .liste > a:hover { position:relative; z-index:1; background:var(--surface); border-color:transparent !important; border-radius:12px !important; }
  :root .cl-i:hover + .cl-i { border-top-color:transparent !important; }
}
@media print { .mv-pret .mv-a { opacity:1 !important; animation:none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
@media print {
  /* À l'impression : pas de verre ni de transparence. */
  :root .side, :root .vmodal, :root .toast, :root .msg, :root .cm, :root .lcm { -webkit-backdrop-filter:none; backdrop-filter:none; }
}

/* Dictée (29/10, miam-dictee.js) : le micro clignote pendant que j'écris, et un échec se dit en bas d'écran. */
:root .ecrit { animation:miamEcrit 1s ease-in-out infinite !important; }
@keyframes miamEcrit { 50% { opacity:.35; } }
:root .md-msg { position:fixed; left:50%; bottom:max(var(--toast-bas), calc(var(--ma-haut, 0px) + 20px)); transform:translate(-50%, 12px);
  max-width:min(92vw, 440px); padding:var(--e-3) var(--e-5); background:var(--toast-bg); color:var(--toast-ink); border-radius:var(--radius-l);
  font-size:var(--t-s); line-height:1.4; text-align:center; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:8700; box-shadow:var(--shadow-float); }
:root .md-msg.on { opacity:1; transform:translate(-50%, 0); }

/* ==== 10/11, passe de nettoyage d'après les captures d'Antoine (maquettes des boutons flottants) ====
   Le témoin « À jour » : rond vert et deux lignes. Tout ce qui est encadré est ROND (plus de bord gauche
   carré). Les boutons et les champs d'une ligne sont des pilules sans filet. */
:root .etat-maj { display:inline-grid !important; grid-template-columns:26px auto; column-gap:8px; align-items:center; padding:5px 14px 5px 5px !important;
  background:var(--surface) !important; box-shadow:var(--ombre-carte) !important; border:0 !important; font-size:12px; line-height:1.2; color:var(--ink-faint); }
:root .etat-maj .em-pt { grid-row:1 / 3; width:26px !important; height:26px !important; background:var(--accent) !important; }
:root .etat-maj .em-pt::after { left:10px !important; top:6px !important; width:5px !important; height:10px !important; border-color:var(--on-accent) !important; }
:root .etat-maj.ko .em-pt { background:var(--warn) !important; }
:root .etat-maj b { font-size:12px; }
:root .miam-consigne { border-left:0 !important; border-radius:14px !important; padding:var(--e-3) var(--e-4) !important; }
:root .fhd .fprint, :root .fprint { border-radius:999px !important; padding:0 18px !important; min-height:44px; }
@media (max-width:780px) {
  :root :is(input[type="text"], input[type="search"], input[type="date"], input[type="time"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input:not([type]), select):not(.ma-saisie input):not(.search input):not([type="search"]):not([type="checkbox"]):not([type="radio"]) {
    border-radius:999px !important; border-color:transparent !important; background-color:var(--surface-3) !important; }
  /* Les boutons secondaires sur fond gris, comme la maquette : blancs et sans filet, ils disparaissaient sur une carte. */
  :root :is(.btn.ghost, .rbtn:not(.mail), .lienorg, .blbtn, .mini) { background:var(--surface-3) !important; box-shadow:none !important; border-color:transparent !important; }
  /* Le micro de la barre de l'assistant : une icône, sans cercle (maquette). */
  :root .ma .ma-saisie button:not(.ma-toucher):not(:last-of-type):not(.rec):not(.ecrit) { border:0 !important; background:transparent !important; box-shadow:none !important; }
  :root .blbtn, :root .fbtn, :root .btn.ghost { border-color:transparent !important; }
  /* L'assistant ouvert, comme la maquette : une carte posée au-dessus des onglets, l'avatar et le nom en tête,
     « Fermer » en texte, les suggestions à plat sur gris. */
  :root .ma.ma-ouvert { left:8px !important; right:8px !important; bottom:calc(81px + env(safe-area-inset-bottom)) !important; border-radius:28px !important;
    background:var(--bg) !important; padding:var(--e-3) var(--e-3) var(--e-3) !important; box-shadow:0 -10px 40px rgba(11,11,12,.25) !important; }
  :root .ma.ma-ouvert .ma-poignee { display:none !important; }
  :root .ma.ma-ouvert .ma-tete { display:flex !important; align-items:center; gap:10px; font-weight:700 !important; background:transparent !important; border:0 !important; padding:0 4px var(--e-2) !important; }
  :root .ma .ma-tete .cdot, :root .ma .ma-tete .ma-point, :root .ma .ma-tete .dot { display:none !important; }
  :root select { font-size:14px !important; text-overflow:ellipsis; }
  :root .ma .ma-tete .ma-tete-av { width:30px; height:30px; border-radius:50%; background:var(--ink); color:var(--bg); display:grid; place-items:center; flex:none; font-size:12px; font-weight:700; }
  :root .ma .ma-tete .ma-tete-av .lu { width:16px; height:16px; }
  :root .ma.ma-ouvert .ma-fermer { margin-left:auto; width:auto !important; height:auto !important; background:transparent !important; border:0 !important; color:var(--ink-faint) !important;
    font:500 var(--t-m) var(--font) !important; padding:4px 6px !important; }
  :root .ma .ma-sugg .chip, :root .ma .ma-sugg .chip:hover { background:var(--surface-3) !important; border:0 !important; box-shadow:none !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; color:var(--ink) !important; }
}

/* 10/11 : la modification d'un jour (Commandes, Livraisons), à toutes les tailles : envoi en vert plein,
   micro sans cercle. Sur ordinateur, « Envoyer » était une pilule blanche à filet. */
:root .cardchat .cardsend { background:var(--accent) !important; color:var(--on-accent) !important; border:0 !important; display:inline-flex; align-items:center; justify-content:center; gap:4px; border-radius:999px !important; }
:root .cardchat .cardsend .lu { width:16px; height:16px; }
:root .cardchat .cardmic { border:0 !important; background:transparent !important; box-shadow:none !important; }
/* L'en-tête d'un assistant n'a pas de fond (maquette) : il prenait la couleur d'action, devenue verte. */
:root .ma .ma-tete { background:transparent !important; color:var(--ink) !important; }

/* 10/11, retours d'Antoine (ordinateur) : un seul écart, 16 px, entre le menu, les colonnes et le panneau
   de l'assistant (il y avait 24, 16 et 40). Les segments sur un rail gris, sans filet (« Par jour / Par
   client » avait un double contour). */
@media (min-width:1100px) {
  :root .main > .wrap { padding-left:16px !important; padding-right:16px !important; }
  :root body.avec-assistant .main { padding-right:376px; }
}
:root .controls .seg, :root .seg { background:var(--surface-3) !important; border:0 !important; box-shadow:none !important; border-radius:999px !important; padding:4px !important; }
:root .seg button { border:0 !important; border-radius:999px !important; background:transparent !important; box-shadow:none !important; }
:root .seg button.on { background:var(--surface) !important; box-shadow:var(--ombre-carte) !important; color:var(--ink) !important; }
/* Les icônes ne sont plus coupées : un SVG masque par défaut ce qui dépasse de son cadre, donc le trait
   posé au bord (le haut du calendrier, la tête du micro). */
:root svg.lu, :root .lu svg { overflow:visible; }
/* Le micro de la saisie : une icône, sans cercle, à toutes les tailles. */
:root .ma .ma-saisie button:not(.ma-toucher):not(:last-of-type):not(.rec):not(.ecrit) { border:0 !important; background:transparent !important; box-shadow:none !important; }
/* Le détail par client du Fournil sur le gris des pilules (il était presque blanc sur blanc). */
:root .pc:has(> .pc-n) { background:var(--surface-3) !important; border-radius:10px !important; }
:root .fhd { background:transparent !important; }
/* Facturation : les trois gestes d'un client sur une ligne, à taille égale ; « Générer la facture » en vert,
   « Encaisser » et « Tout soldé » sur le gris des secondaires (deux verts différents côte à côte). */
:root .cliact { display:grid !important; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--e-2); }
:root .cliact .btn.primary { grid-column:1 / -1; }
:root .cliact .btn { justify-content:center; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 10px !important; border-radius:999px !important; }
:root .cliact .btn.good, :root .cliact .btn:not(.primary) { background:var(--surface-3) !important; color:var(--ink) !important; border-color:transparent !important; box-shadow:none !important; }
/* Devis : les gestes secondaires sans icône, pour que « Supprimer » tienne dans sa colonne. */
:root .vacts .btn:not(:first-child) .lu, :root .vacts .btn:not(:first-child) .bi { display:none !important; }
:root .vacts .btn:not(:first-child) { font-size:var(--t-s) !important; padding:0 8px !important; }

/* 10/11, retours d'Antoine : l'envoi d'une modification est une simple flèche ronde, sans « Envoyer » ;
   le micro sans cadre, mais il MONTRE qu'il écoute (le fond transparent forcé avait effacé l'état « rec »,
   et le micro semblait ne plus marcher). */
:root .cardchat .cardsend { width:38px !important; height:38px !important; min-width:38px; min-height:38px !important; padding:0 !important; border-radius:50% !important; flex:none; }
:root .cardchat .cardsend .bt { display:none !important; }
:root .cardchat .cardsend .lu { width:18px; height:18px; }
:root .cardchat .cardmic.rec, :root .ma .ma-saisie button.rec { background:var(--danger-plein) !important; color:var(--sur-danger) !important; border-radius:50% !important; }
/* L'aide « ? » à côté des titres : un anneau fin et un point d'interrogation, comme la maquette. C'était un
   « ? » cerclé posé dans un disque gris, un cercle dans un cercle. */
:root .miam-aide-page { width:24px !important; height:24px !important; min-width:24px !important; min-height:24px !important; background:transparent !important;
  border:1.5px solid var(--line-strong) !important; color:var(--ink-faint) !important; }
:root .miam-aide-page .lu { display:none !important; }
:root .miam-aide-page::before { content:"?"; font:700 13px/1 var(--font); }
:root .miam-aide-page[aria-expanded="true"] { background:var(--ink) !important; border-color:var(--ink) !important; color:var(--surface) !important; }

/* 10/11 : les pastilles de compteur ne recouvrent plus les icônes. Posées à 3 px du bord, elles cachaient
   un coin de la cloche, du carton, de la camionnette et de la grille : c'était « l'icône coupée ».
   Barre d'onglets : juste à droite de l'icône. Cloche : à cheval sur le bord du rond, hors du dessin. */
:root .miam-tab .miam-pastille { left:calc(50% + 10px) !important; right:auto !important; top:0 !important; min-width:16px !important; height:16px !important;
  font-size:10px !important; box-shadow:0 0 0 2px var(--surface) !important; }
:root .miam-ico .miam-pastille, :root .miam-cloche .miam-pastille { top:-5px !important; right:-5px !important; left:auto !important;
  box-shadow:0 0 0 2px var(--bg) !important; }
/* 10/11 : les suggestions d'un assistant, toutes pareilles et assez compactes pour tenir à trois par ligne ;
   le fil s'efface en fondu au-dessus d'elles au lieu d'être tranché net au milieu d'une phrase. */
:root .ma .ma-sugg { gap:5px !important; }
:root .ma .ma-sugg .chip { min-height:30px !important; padding:0 10px !important; font-size:12.5px !important; gap:4px !important; background:var(--surface-3) !important; border:0 !important; box-shadow:none !important; color:var(--ink) !important; }
:root .ma .ma-sugg .chip .lu { width:14px; height:14px; }
:root .ma .ma-fil { -webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image:linear-gradient(to bottom, #000 calc(100% - 32px), transparent); padding-bottom:24px !important; }
/* 10/11 : le menu de gauche et le panneau des assistants en blanc, comme les autres cartes (en gris très
   clair, ils se confondaient avec le fond depuis que l'en-tête de l'assistant n'est plus une bande sombre). */
@media (min-width:1100px) {
  :root .side, :root .ma { background:var(--surface) !important; }
}

/* 10/11, « encadrés carrés » (relevé par programme sur toutes les pages) : les en-têtes de carte et les
   lignes de liste étaient séparés par un filet BORD À BORD, qui découpait chaque carte ronde en bandes
   rectangulaires. Comme sur la maquette : pas de filet sous un en-tête, et les filets entre lignes
   s'arrêtent avant les bords de la carte. */
:root .card > .hd, :root .card > .bar, :root .vpanel > .vhd, :root .fiche > .fhd { border-bottom:0 !important; border-top:0 !important; background:transparent !important; }
:root :is(.livliste > .cmd, .cat > .art, .cli) { border-top:0 !important;
  background-image:linear-gradient(var(--line), var(--line)); background-size:calc(100% - 32px) 1px; background-position:top center; background-repeat:no-repeat; }
:root :is(.livliste > .cmd, .cat > .art, .cli):first-child { background-image:none; }
/* 10/11 : la carte d'un devis à valider n'est plus une carte dans la carte. */
:root .vpanel .vreq { box-shadow:none !important; border:0 !important; }
/* Une recherche posée sur le fond de page est blanche ; grise, elle disparaissait (Articles). */
:root .search input, :root input[type="search"] { background-color:var(--surface) !important; box-shadow:var(--ombre-legere) !important; }
/* Les deux totaux de Facturation, compacts. */
:root .sums .sum { padding:var(--e-3) var(--e-4) !important; min-height:0 !important; }
/* La consigne client : l'intitulé sur sa ligne, en petit, puis la consigne elle-même. */
:root .miam-consigne { display:block !important; font-size:var(--t-m) !important; line-height:1.4 !important; }
:root .miam-consigne .lbl { display:flex !important; align-items:center; gap:6px; margin:0 0 4px !important; font-size:var(--t-xs) !important; font-weight:600 !important;
  text-transform:none !important; letter-spacing:0 !important; opacity:.85; }
:root .miam-consigne .lbl .lu { width:14px; height:14px; }
/* Administration au téléphone (10/11) : Prénom et Nom côte à côte, des intervalles égaux entre les champs,
   l'envoi sur toute la largeur, et les trois onglets sur une ligne. */
@media (max-width:560px) {
  :root #ajout .grid2 { grid-template-columns:1fr 1fr !important; gap:0 var(--e-3) !important; }
  :root #ajout .grid2 > div > label:first-child { margin-top:var(--e-3) !important; }
  :root #ajout #inviteBtn, :root #ajout #createBtn { width:100%; justify-content:center; }
  :root .adm-seg { max-width:none !important; }
  :root .adm-seg button { white-space:nowrap; font-size:13px !important; gap:6px; padding:0 6px !important; }
  :root .adm-seg button .lu { width:16px; height:16px; }
}
/* Accueil (10/11, Antoine : « trop de vert ») : le vert dit « à valider » ou « c'est fait ». Ce qui n'est
   ni l'un ni l'autre passe à l'encre (itinéraire), au bleu (semaine, argent à encaisser) ; les jauges restent vertes ou au bleu (l'argent à encaisser). */
:root .ab-puce.wait { background:var(--wait-soft); color:var(--wait); }
:root .sem i:not(.vide) { background:var(--wait) !important; }
:root .tuile .jg i { background:var(--ok) !important; }
:root .ab-prepa .jg i { background:var(--ok) !important; }
:root .ab-pill.noir { background:var(--ink) !important; color:var(--bg) !important; }
:root #tFact .puce, :root #tFact.alert .puce { background:var(--wait-soft) !important; color:var(--wait) !important; }
:root #tFact .tnum, :root #tFact .num { color:var(--wait) !important; }
/* Commandes (10/11) : les cartes d'une même rangée ont la même hauteur, Total et gestes alignés en bas. */
@media (min-width:781px) {
  :root #queue { align-items:stretch !important; }
  :root #queue > .req { display:flex !important; flex-direction:column; }
  :root #queue > .req > .grandtot { margin-top:auto !important; }
}
/* Plus de traits droits qui traversent une carte arrondie (10/11) : ils se lisent comme des encadrés
   aux angles carrés. L'espace sépare. */
:root .grandtot, :root .bons .bl { border-top:0 !important; }
:root .grandtot { padding-top:var(--e-3) !important; }
:root .vtot, :root .livliste .tot, :root .tot, :root .rs-l, :root .cfac, :root .cing, :root .ab-eh, :root .ltitle { border-top:0 !important; border-bottom:0 !important; }
/* Les lignes d'une liste se séparent par un trait en retrait, jamais d'un bord à l'autre. */
:root :is(a.ab-l, a.ab-p, .liste > a.ligne, .art.mv-a) { border-top:0 !important; border-bottom:0 !important;
  background-image:linear-gradient(var(--line), var(--line)); background-size:calc(100% - 32px) 1px; background-position:bottom center; background-repeat:no-repeat; }
:root :is(a.ab-l, a.ab-p, .liste > a.ligne, .art.mv-a):last-child { background-image:none; }
:root details.couts-det { border-top:0 !important; border-bottom:0 !important; }
/* Livraisons (10/11) : « Par jour / Par client » choisit la page entière ; il prend la taille d'un vrai titre
   de choix, au lieu du petit texte des filtres. */
:root .controls .seg #segJour, :root .controls .seg #segClient { font-size:var(--t-m) !important; font-weight:650 !important; min-height:48px !important; gap:8px !important; }
:root .controls .seg #segJour .lu, :root .controls .seg #segClient .lu { width:18px; height:18px; }
/* Facturation (10/11) : le mois et l'entreprise sur le même rail gris que les autres choix, pleine largeur.
   Le mois au centre, les flèches dans des ronds blancs ; l'entreprise en segments, la choisie en blanc. */
:root .moisl .mois { display:flex !important; flex-direction:column !important; align-items:stretch !important; gap:6px !important; font-size:var(--t-xs) !important; font-weight:600 !important; color:var(--ink-soft) !important; }
:root .moisl { padding:var(--e-2) 0 !important; }
:root .moisl .mois-pas { display:flex !important; align-items:center; justify-content:space-between; width:100%; background:var(--surface-3); border-radius:999px; padding:4px; min-height:44px; box-sizing:border-box; }
:root .moisl .mois-pas button { width:36px !important; height:36px !important; min-width:36px !important; min-height:36px !important; background:var(--surface) !important; box-shadow:var(--ombre-carte) !important; color:var(--ink) !important; }
:root .moisl .mois-pas b { flex:1; text-align:center; font-size:var(--t-m) !important; font-weight:650 !important; text-transform:capitalize; }
:root .moisl .ent-seg { display:flex !important; flex-wrap:nowrap !important; width:100%; background:var(--surface-3) !important; border-radius:999px !important; padding:4px !important; gap:0 !important; box-sizing:border-box; }
:root .moisl .ent-seg button { flex:1 1 0 !important; min-height:36px !important; padding:0 6px !important; font-size:var(--t-s) !important; font-weight:600 !important; color:var(--ink-soft) !important; justify-content:center; }
:root .moisl .ent-seg button.on { background:var(--surface) !important; color:var(--ink) !important; box-shadow:var(--ombre-carte) !important; }
:root .jgrid { border-top:0 !important; }
:root .surv-l { border-top:0 !important; background-image:linear-gradient(var(--line), var(--line)); background-size:calc(100% - 32px) 1px; background-position:top center; background-repeat:no-repeat; }
:root .surv-l:first-of-type { background-image:none; }
:root .voir.itin { background:var(--ink) !important; color:var(--bg) !important; }

/* Consigne (10/11) : le libellé héritait du retrait des étiquettes (16 px en haut, 12 px à gauche), d'où le vide
   et le décalage. Libellé et texte partent du même bord, l'encadré tient à son contenu. */
:root .miam-consigne .lbl { padding:0 !important; margin:0 0 2px !important; color:var(--danger) !important; opacity:.75; min-height:0 !important; }
:root .miam-consigne { padding:10px 14px !important; border-radius:16px !important; }
/* Champs d'une ligne en pilule sur ordinateur aussi (10/11), comme au téléphone : un champ à 12 px à côté
   d'un bouton pilule se lit comme un encadré carré. Les zones de texte gardent leur angle. */
:root :is(input[type="text"], input[type="search"], input[type="date"], input[type="time"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input:not([type]), select):not([type="checkbox"]):not([type="radio"]):not(.ma-saisie input):not(.miam-tabbar *) { border-radius:999px !important; }
/* Une seule forme de sélecteur à onglets (10/11) : rail gris tout rond, sans ombre creusée ni filet,
   4 px de marge, l'onglet choisi en pilule blanche. Valait pour .seg, pas pour .tabs, .adm-seg ni .blseg. */
:root :is(.seg, .tabs, .adm-seg, .mf-seg, .blseg) { background:var(--surface-3) !important; border:0 !important; box-shadow:none !important; border-radius:999px !important; padding:4px !important; }
:root :is(.seg, .tabs, .adm-seg, .mf-seg, .blseg) > :is(button, a, .tab) { border:0 !important; border-radius:999px !important; box-shadow:none !important; background:transparent !important; }
:root :is(.seg, .tabs, .adm-seg, .mf-seg, .blseg) > :is(button, a, .tab):is(.on, .active, [aria-selected="true"]) { background:var(--surface) !important; color:var(--ink) !important; box-shadow:var(--ombre-carte) !important; }
/* Livraisons (10/11) : la ligne des dates est centrée sous « Par jour / Par client », comme le rail au-dessus. */
@media (max-width:1099px) { html body #ctlJour { justify-content:center !important; width:100%; } }
/* Boutons secondaires dans un volet ou une fenêtre (10/11, « Rendre la main » presque invisible) : le fond du
   volet est presque du même gris qu'eux. Ils y passent en blanc, avec l'ombre des cartes. */
:root :is(.vmodal, .modal, .sheet, .overlay, .voverlay, dialog, .mfoot) :is(.btn.ghost, .rbtn:not(.mail), .lienorg, .blbtn, .mini) {
  background:var(--surface) !important; box-shadow:var(--ombre-carte) !important; border:0 !important; color:var(--ink) !important; }
/* Itinéraire de la tournée en noir, comme sur Aujourd'hui (10/11) : le vert reste à valider et au fait. */
:root .itinbtn { background:var(--ink) !important; color:var(--bg) !important; }
/* La transcription se voit (10/11, « on dirait que ça n'a pas marché ») : le champ annonce « J'écris ce que
   vous avez dit… » et l'envoi touché pendant l'écoute pulse jusqu'à ce que le texte parte. */
:root .ma-saisie.ma-transcrit input::placeholder { color:var(--ink); opacity:1; }
:root .md-attente { animation:miamEcrit 1s ease-in-out infinite !important; pointer-events:none; }
/* Assistants sur ordinateur, une seule forme (12/11, Antoine : « ils n'ont pas tous le même design ») :
   chaque page gardait le style de son ancien en-tête (Devis sans point ni filet, Nouvelle commande en 17 px,
   les autres avec un filet). Désormais partout, Emmanuelle comprise : point vert, nom en 15 px gras, ni filet
   ni fond, même hauteur ; la saisie fait 52 px. */
@media (min-width:781px) {
  :root .ma .ma-tete, :root .ab-emma .ab-eh { display:flex !important; align-items:center !important; gap:8px !important;
    min-height:52px !important; height:auto !important; padding:14px 18px !important; margin:0 !important;
    border:0 !important; background:transparent !important; box-shadow:none !important;
    font-size:15px !important; font-weight:700 !important; letter-spacing:-.01em; color:var(--ink) !important; }
  :root .ma .ma-tete :is(h2, h3, b, strong) { font-size:15px !important; font-weight:700 !important; margin:0 !important; display:flex; align-items:center; gap:8px; }
  :root .ma .ma-tete :is(.cdot, .dot, .ma-point), :root .ab-emma .ab-pt { width:8px !important; height:8px !important; border-radius:50% !important;
    background:var(--ok) !important; color:transparent !important; font-size:0 !important; flex:none; display:inline-block !important; }
  :root .ma .ma-tete .ma-tete-av, :root .ma .ma-tete .ma-fermer { display:none !important; }
  :root .ma .ma-saisie, :root .ab-emma .ab-saisie { min-height:52px !important; height:52px !important; box-sizing:border-box; }
}
/* 12/11 (Antoine : « réduis un peu la largeur, la police est un peu grosse ») : les assistants passent de
   400 à 360 px sur ordinateur, et leurs bulles de 17 à 15 px, la taille du texte courant. */
@media (min-width:781px) {
  :root .ma .ma-fil :is(.cm, .lcm, .msg, .bubble, .bulle) { font-size:15px !important; line-height:1.45 !important; }
  :root .ma .ma-saisie input, :root .ab-emma .ab-saisie input { font-size:15px !important; }
}
/* Animations, reprise du 12/11 (Antoine : « oui, fais-les ») : moins à l'ouverture, plus sur les gestes.
   - L'ouverture : les cartes montent de 6 px au lieu de 10.
   - Ce qui vient d'être fait rebondit (coche posée, rond « Commande validée »).
   - Au téléphone, le volet de l'assistant monte au lieu d'apparaître ; chaque nouveau message arrive en fondu.
   - Une seule pulsation pour tout micro qui écoute, quelle que soit la page. */
@keyframes miamMonte { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
@keyframes miamFait { 0% { transform:scale(.6); } 60% { transform:scale(1.12); } 100% { transform:scale(1); } }
@keyframes miamVolet { from { transform:translateY(28px); opacity:.4; } to { transform:none; opacity:1; } }
@keyframes miamBulle { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.mv-fait { animation:miamFait .42s cubic-bezier(.2,.8,.3,1.2) both; }
:root .ma .ma-fil > * { animation:miamBulle .24s ease-out both; }
@media (max-width:780px) { :root .ma.ma-ouvert { animation:miamVolet .28s cubic-bezier(.2,.7,.2,1); } }
:root :is(.ab-mic, .ma .ma-saisie button, #emmaMic).rec { background:var(--danger-plein) !important; color:var(--sur-danger) !important;
  animation:miamEcoute 1.3s ease-out infinite !important; opacity:1 !important; }
@media (prefers-reduced-motion: reduce) {
  .mv-fait, :root .ma .ma-fil > *, :root .ma.ma-ouvert { animation:none !important; }
}
/* Commandes (12/11) : dans une carte courte (une demande de modification), les gestes se posent en bas,
   alignés sur ceux de la carte voisine, au lieu de laisser un vide sous eux. */
@media (min-width:781px) {
  :root #queue > .req:not(:has(> .grandtot)) > .acts:last-child { margin-top:auto !important; }
}
/* Assistant replié sur ordinateur (12/11) : une barre de saisie en bas à droite, la page reprend toute la
   largeur. « Replier » est dans l'en-tête de l'assistant déplié. Au téléphone, rien ne change. */
.ma-replier { display:none; }
@media (min-width:1100px) {
  :root .ma .ma-tete .ma-replier { display:inline-flex !important; margin-left:auto; align-items:center; min-height:30px; padding:0 12px;
    border:0 !important; border-radius:999px !important; background:var(--surface-3) !important; color:var(--ink) !important;
    font:inherit; font-size:13px !important; font-weight:600 !important; cursor:pointer; }
  :root body.avec-assistant.ma-replie .main { padding-right:16px !important; }
  :root body.ma-replie .ma { display:none !important; }
  :root body.ma-replie .ma-rappel { display:inline-flex !important; }
  :root body.ma-replie .main > .top.ma-haut { position:relative; padding-right:460px !important; max-width:none !important; justify-content:flex-start !important;
    min-height:96px; box-sizing:border-box; }   /* 13/11 : 24 px au-dessus de la barre, 54 de barre, 18 dessous, sur toutes les pages */
  :root body.ma-replie .main > .top.ma-haut > .count { margin-left:var(--e-4) !important; }
}
/* L'assistant replié (12/11) : en haut à droite de l'en-tête, une barre qui ressemble à un champ de saisie,
   pour qu'on voie qu'on peut lui écrire ou lui parler. */
.ma-rappel { display:none; position:absolute; top:auto; bottom:18px; right:16px; z-index:5;   /* 13/11 : à 18 px du bas de l'en-tête, quelle que soit sa hauteur */
 
  width:420px; align-items:center; gap:10px; min-height:54px; padding:0 7px 0 18px; border:1px solid var(--line) !important; border-radius:999px;
  background:var(--surface); color:var(--ink-soft); box-shadow:0 2px 10px rgba(11,11,12,.08);
  font:inherit; font-size:16px; font-weight:400; text-align:left; cursor:text; white-space:nowrap; }
.ma-rappel:hover { box-shadow:0 4px 14px rgba(11,11,12,.12); }
.ma-rappel-t { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.ma-rappel-mic { width:40px; height:40px; border-radius:50%; background:var(--surface-3); color:var(--ink); display:grid; place-items:center; flex:none; }
.ma-rappel-mic svg, .ma-rappel-mic .lu { width:20px; height:20px; }
/* 12/11 : certaines pages bornent leur en-tête (Livraisons à 802 px) ; replié, il prend toute la largeur. */
.ma-rappel-fixe { position:fixed; top:16px; transform:none; }
/* Commandes et Nouvelle commande (12/11) : leurs onglets, à gauche sous le titre, repoussent le contenu ; la
   barre descend sur leur ligne pour rester aussi près des cartes qu'ailleurs. */
:root .main:has(> .tabs) > .top > .ma-rappel { top:104px; bottom:auto; right:24px; }   /* sa grille a 24 px de marge à droite, pas 16 */
.ma-rappel-pt { width:8px; height:8px; border-radius:50%; background:var(--ok); flex:none; }
/* 12/11 (captures d'Antoine) :
   - Safari dessine un relief sombre en bas à droite des boutons tant que leur apparence n'est pas remise à
     zéro (« Replier », onglet choisi d'un segment) ; on la retire partout.
   - Assistant replié : la page n'est plus bornée (Production s'arrêtait à 820 px et laissait un vide).
   - L'onglet choisi d'un segment n'a qu'une ombre douce, pas deux. */
:root button { -webkit-appearance:none; appearance:none; }
@media (min-width:1100px) { :root body.ma-replie .main > .wrap { max-width:none !important; } }
:root :is(.seg, .tabs, .adm-seg, .mf-seg, .blseg) > :is(button, a, .tab):is(.on, .active, [aria-selected="true"]) { box-shadow:0 1px 4px rgba(11,11,12,.10) !important; }
/* 12/11 (Antoine : « ça lag un peu ») : plus aucun flou de fond, il se recalcule à chaque image (en-têtes,
   menu, capsule, barres). Les mêmes couleurs, opaques. Et des apparitions plus courtes : la cascade
   s'arrête à 150 ms, quel que soit le nombre de cartes. */
:root:root:root { --glass-bg:var(--bg); --glass-strong:var(--surface); --glass-tab:var(--surface); }   /* plus fort que le thème sombre */
:root *, :root *::before, :root *::after { -webkit-backdrop-filter:none !important; backdrop-filter:none !important; }
.mv-pret .mv-a.mv-on { animation-duration:.26s !important; animation-delay:min(calc(var(--mv-i, 0) * 25ms), 150ms) !important; }
/* Écrans vides (12/11, maquette ecrans-vides) : ce qui est vrai, ce qui vient ensuite, un geste. */
:root .vide-etat { display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; }
:root .vide-etat > b { font-size:17px; font-weight:700; letter-spacing:-.01em; color:var(--ink); }
:root .vide-etat > p { margin:0; color:var(--ink-soft); max-width:44ch; line-height:1.45; }
:root .ve-ico { width:52px; height:52px; border-radius:16px; display:grid; place-items:center; margin-bottom:4px; flex:none; }
:root .ve-ico .lu { width:26px; height:26px; }
:root .ve-ico.ok { background:var(--good-soft, var(--ok-soft)); color:var(--good, var(--ok)); }
:root .ve-ico.wait { background:var(--wait-soft); color:var(--wait); }
:root .ve-ico.warn { background:var(--warn-soft); color:var(--warn); }
:root .ve-prochain { margin-top:6px; display:flex; align-items:center; gap:12px; background:var(--surface-2); border-radius:16px; padding:12px 14px; text-align:left; width:100%; max-width:380px; }
:root .ve-prochain .ve-ico { width:40px; height:40px; border-radius:12px; margin:0; }
:root .ve-prochain .ve-ico .lu { width:20px; height:20px; }
:root .ve-prochain b { display:block; font-size:15px; color:var(--ink); }
:root .ve-prochain small { display:block; color:var(--ink-soft); font-size:12.5px; }
:root .ve-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:8px; }
:root .empty:has(> .vide-etat) { padding:var(--e-6) var(--e-5) !important; border:0 !important; background:var(--surface) !important; border-radius:var(--radius-card) !important; box-shadow:var(--ombre-carte) !important; }
/* Messages noirs sur ordinateur (12/11) : centrés sur la zone de travail (--toast-x, posé par miam-icons.js),
   à 24 px du bas. Au téléphone, rien ne change : au-dessus de la barre d'onglets. */
@media (min-width:781px) { :root .toast, :root .mdf { left:var(--toast-x, 50%) !important; bottom:24px !important; } }

/* La flèche « Actualiser » d'Aujourd'hui tourne pendant le chargement (13/11). */
:root #refresh.tourne svg, :root #refresh.tourne .lu { animation:miamTourne .7s linear infinite; transform-origin:50% 50%; }
@keyframes miamTourne { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { :root #refresh.tourne svg, :root #refresh.tourne .lu { animation:none; } :root #refresh.tourne { opacity:.5; } }
/* Écrans vides posés dans un bloc qui avait son propre texte (13/11) : de l'air, centré, couleur normale. */
:root .ve-bloc { padding:var(--e-5) var(--e-3) !important; margin:0 !important; color:var(--ink) !important; text-align:center; }
:root .ve-petit .ve-ico { width:44px; height:44px; border-radius:14px; }
:root .ve-petit .ve-ico .lu { width:22px; height:22px; }
:root .ve-petit .vide-etat > b { font-size:15.5px; }
/* 13/11 : un lien d'écran vide a l'allure d'un bouton secondaire (il sortait souligné, bordé de vert). */
:root .ve-actions :is(a, button).btn { text-decoration:none !important; box-shadow:none !important; font:inherit; font-size:15px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 20px;
  border:1px solid var(--line) !important; background:var(--surface) !important; color:var(--ink) !important; border-radius:999px !important; font-weight:600; }
:root .ve-actions :is(a, button).btn.primary { background:var(--accent) !important; color:var(--on-accent) !important; border-color:transparent !important; }
/* 13/11 : le Fournil a sa propre marge au-dessus de la fiche ; replié, l'en-tête la donne déjà (18 px partout). */
@media (min-width:1100px) { :root body.ma-replie .main:has(#ficheBox) > .wrap { padding-top:0 !important; } }

/* 13/11 : le texte d'un message noir est centré (sur deux lignes, il partait à gauche), et le message tient
   dans l'écran du téléphone. */
:root .toast, :root .md-msg { text-align:center !important; box-sizing:border-box; width:max-content; max-width:min(calc(100vw - 32px), 440px); }
/* 13/11 : l'espace du client, dans la fiche (Clients pro) : un bloc à part, boutons en pilule comme partout. */
:root .esp { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:4px; }
:root .esp b { font-size:15px; color:var(--ink); }
:root .esp span { color:var(--ink-soft); font-size:14px; }
:root .esp-acts { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
:root .esp-acts .btn { min-height:44px; padding:0 18px; border-radius:999px !important; font-size:15px; font-weight:600; box-shadow:none !important; display:inline-flex; align-items:center; }
:root .esp-acts .btn:not(.primary) { background:var(--surface) !important; border:1px solid var(--line) !important; color:var(--ink) !important; }
:root .esp-acts .btn.primary { background:var(--accent) !important; color:var(--on-accent) !important; border-color:transparent !important; }

/* 26/11 (maquette 3) : les lignes qui luisent pendant un chargement (miam-icons.js). */
.miam-sq { display:flex; flex-direction:column; gap:10px; padding:var(--e-2) 0; width:100%; }
.miam-sq i { display:block; height:12px; width:100%; border-radius:6px; background:linear-gradient(90deg, var(--surface-3) 0, var(--surface-2) 50%, var(--surface-3) 100%);
  background-size:400px 100%; animation:miamLuire 1.2s linear infinite; }
@keyframes miamLuire { from { background-position:-400px 0; } to { background-position:400px 0; } }
@media (prefers-reduced-motion: reduce) { .miam-sq i { animation:none; } }
