/* =====================================================================================================================
   Couche « Apple » de Barian Studio (Florian, 23/10/2026)
   ---------------------------------------------------------------------------------------------------------------------
   Inspirée des Human Interface Guidelines d'Apple (skill apple-design : typography, color, materials, layout, buttons,
   text-fields, sheets, accessibility). Chargée APRÈS styles.css sur toutes les pages : elle ne change aucune mise en
   page (les maquettes de Florian restent), elle remplace la matière :
   - police du système Apple (San Francisco sur iPhone, iPad et Mac ; Inter ailleurs) ;
   - couleurs système d'Apple (fonds groupés #F2F2F7 / noir, séparateurs, libellés secondaires), accent bleu Barian
     approfondi en #2F78A4 pour atteindre 4,8:1 sur blanc (l'ancien #4A91BA faisait 3,5:1, sous le minimum de 4,5:1) ;
   - verre (matériau translucide flouté) sur les barres seulement : barre du bas, menu latéral, en-tête de l'assistant ;
     le contenu reste opaque pour la lisibilité. La barre du bas flotte au-dessus du contenu, qui défile dessous ;
   - boutons, champs, fenêtres (feuilles), notifications et contrôles segmentés à la manière d'iOS ;
   - accessibilité : cibles de 44 px au doigt, anneau de focus visible au clavier, réglages « réduire les animations »
     et « réduire la transparence » respectés.
   Les couleurs propres à chaque page (ia-*, mp-*) sont réalignées sur la même palette pour que tout l'appli parle la
   même langue. Pour revenir à l'ancien rendu : retirer la ligne apple.css des pages HTML.
   ===================================================================================================================== */

:root{
  /* Palette système (clair) */
  --bleu-barian:#2F78A4; --bleu-barian-presse:#26648A; --bleu-barian-teinte:#E7F0F6;
  --encre:#1D1D1F; --gris:#6E6E73; --faible:#AEAEB2;
  --papier:#FFFFFF; --toile:#F2F2F7; --toile-survol:#E9E9EE;
  --trait:#D1D1D6; --trait-doux:#E5E5EA;
  --vert:#1F7A36; --vert-teinte:#E5F5EA;
  --ambre:#C93400; --ambre-teinte:#FFF1E6;
  --rouge:#D70015; --rouge-teinte:#FDE8EA;
  --violet:#8944AB; --violet-teinte:#F4ECF8;
  --bulle-voyageur:#E9E9EB; --bulle-nous:#2F78A4; --bulle-nous-texte:#FFFFFF;
  --ombre:0 0.5px 0 rgba(0,0,0,.04), 0 2px 10px rgba(0,0,0,.05);
  --ombre-vive:0 10px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  --mx-nuit:#1D1D1F; --mx-bulle:#E9E9EB; --mx-nous:#E1EDF6; --mx-envoi:#2F78A4;
  --jour-alt:#F2F2F7; --auj-fond:#E7F0F6;
  /* Propres à cette couche */
  --rempli:rgba(118,118,128,.12);          /* fond des champs et contrôles segmentés (tertiarySystemFill) */
  --rempli-fort:rgba(118,118,128,.2);
  --verre:rgba(249,249,251,.78);           /* barres translucides */
  --verre-bas:rgba(249,249,251,.5);        /* barre du bas, plus transparente (Florian, 24/10/2026) */
  --verre-trait:rgba(0,0,0,.12);
  --rayon:12px;
  --police:-apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, sans-serif;
  --nb-h:58px;
  /* Pages qui ont leur propre jeu de couleurs : même palette */
  --ia-nuit:#1D1D1F; --ia-gris:#6E6E73; --ia-bleu:#2F78A4; --ia-bleu-fonce:#26648A; --ia-bulle:#E1EDF6; --ia-pastel:#EDF4F9;
  --ia-pastel-bord:#CFE0EC; --ia-trait:#E5E5EA; --ia-fond:#FFFFFF; --ia-ico-fond:#EDF4F9;
  --mp-bleu:#2F78A4; --mp-bleu-f:#26648A; --mp-bleu-t:#E7F0F6; --mp-nuit:#1D1D1F; --mp-gris:#6E6E73; --mp-trait:#E5E5EA;
  --mp-carte:#FFFFFF; --mp-fond:#F2F2F7; --mp-doux:#F2F2F7; --mp-c-bleu:#2F78A4; --mp-t-bleu:#E7F0F6;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bleu-barian:#64A8D2; --bleu-barian-presse:#8CC3E0; --bleu-barian-teinte:#13293A;
  --encre:#F5F5F7; --gris:#98989D; --faible:#636366;
  --papier:#1C1C1E; --toile:#000000; --toile-survol:#2C2C2E;
  --trait:#38383A; --trait-doux:#2C2C2E;
  --vert:#30D158; --vert-teinte:#0E2A17; --ambre:#FF9F0A; --ambre-teinte:#2E2008; --rouge:#FF453A; --rouge-teinte:#3A1412;
  --violet:#BF5AF2; --violet-teinte:#2A1736;
  --bulle-voyageur:#2C2C2E; --bulle-nous:#3A7FAA; --bulle-nous-texte:#FFFFFF;
  --ombre:0 0 0 0.5px rgba(255,255,255,.06); --ombre-vive:0 10px 40px rgba(0,0,0,.6);
  --mx-nuit:#F5F5F7; --mx-bulle:#2C2C2E; --mx-nous:#13293A; --mx-envoi:#64A8D2;
  --jour-alt:#1C1C1E; --auj-fond:#13293A;
  --rempli:rgba(118,118,128,.24); --rempli-fort:rgba(118,118,128,.36);
  --verre:rgba(28,28,30,.72); --verre-bas:rgba(28,28,30,.48); --verre-trait:rgba(255,255,255,.12);
  --ia-nuit:#F5F5F7; --ia-gris:#98989D; --ia-bleu:#64A8D2; --ia-bleu-fonce:#8CC3E0; --ia-bulle:#13293A; --ia-pastel:#13293A;
  --ia-pastel-bord:#24495C; --ia-trait:#2C2C2E; --ia-fond:#1C1C1E; --ia-ico-fond:#13293A;
  --mp-bleu:#64A8D2; --mp-bleu-f:#8CC3E0; --mp-bleu-t:#13293A; --mp-nuit:#F5F5F7; --mp-gris:#98989D; --mp-trait:#2C2C2E;
  --mp-carte:#1C1C1E; --mp-fond:#000000; --mp-doux:#2C2C2E; --mp-c-bleu:#64A8D2; --mp-t-bleu:#13293A;
}}
:root[data-theme="dark"]{
  --bleu-barian:#64A8D2; --bleu-barian-presse:#8CC3E0; --bleu-barian-teinte:#13293A;
  --encre:#F5F5F7; --gris:#98989D; --faible:#636366;
  --papier:#1C1C1E; --toile:#000000; --toile-survol:#2C2C2E;
  --trait:#38383A; --trait-doux:#2C2C2E;
  --vert:#30D158; --vert-teinte:#0E2A17; --ambre:#FF9F0A; --ambre-teinte:#2E2008; --rouge:#FF453A; --rouge-teinte:#3A1412;
  --violet:#BF5AF2; --violet-teinte:#2A1736;
  --bulle-voyageur:#2C2C2E; --bulle-nous:#3A7FAA; --bulle-nous-texte:#FFFFFF;
  --ombre:0 0 0 0.5px rgba(255,255,255,.06); --ombre-vive:0 10px 40px rgba(0,0,0,.6);
  --mx-nuit:#F5F5F7; --mx-bulle:#2C2C2E; --mx-nous:#13293A; --mx-envoi:#64A8D2;
  --jour-alt:#1C1C1E; --auj-fond:#13293A;
  --rempli:rgba(118,118,128,.24); --rempli-fort:rgba(118,118,128,.36);
  --verre:rgba(28,28,30,.72); --verre-bas:rgba(28,28,30,.48); --verre-trait:rgba(255,255,255,.12);
  --ia-nuit:#F5F5F7; --ia-gris:#98989D; --ia-bleu:#64A8D2; --ia-bleu-fonce:#8CC3E0; --ia-bulle:#13293A; --ia-pastel:#13293A;
  --ia-pastel-bord:#24495C; --ia-trait:#2C2C2E; --ia-fond:#1C1C1E; --ia-ico-fond:#13293A;
  --mp-bleu:#64A8D2; --mp-bleu-f:#8CC3E0; --mp-bleu-t:#13293A; --mp-nuit:#F5F5F7; --mp-gris:#98989D; --mp-trait:#2C2C2E;
  --mp-carte:#1C1C1E; --mp-fond:#000000; --mp-doux:#2C2C2E; --mp-c-bleu:#64A8D2; --mp-t-bleu:#13293A;
}

/* --- Typographie (typography.md) : la police du système, titres resserrés comme San Francisco Display --------------- */
body{font-family:var(--police); -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering:optimizeLegibility;
  -webkit-tap-highlight-color:transparent}
button,input,textarea,select{font-family:inherit}
h1{letter-spacing:-.022em; font-weight:700}
h2{letter-spacing:-.018em; font-weight:700}
h3{letter-spacing:-.012em; font-weight:600}
::selection{background:color-mix(in srgb, var(--bleu-barian) 26%, transparent)}

/* --- Focus clavier visible (accessibility.md › Keyboard navigation) -------------------------------------------------- */
:focus-visible{outline:3px solid color-mix(in srgb, var(--bleu-barian) 55%, transparent); outline-offset:2px}
:focus:not(:focus-visible){outline:none}

/* --- Boutons (buttons.md) : rempli pour l'action principale, teinté pour le reste ; retour visuel à l'appui ----------- */
.principal{background:var(--bleu-barian); border-color:var(--bleu-barian); color:#fff; font-weight:600; letter-spacing:-.01em}
.principal:hover:not(:disabled){background:var(--bleu-barian-presse); border-color:var(--bleu-barian-presse)}
.second{background:var(--rempli); border-color:transparent; color:var(--bleu-barian); font-weight:600}
.second:hover{background:var(--rempli-fort); border-color:transparent}
button:not(:disabled):active,a.principal:active,a.second:active,.onglet:active,.nb-item:active{opacity:.6; transition:opacity 0s}
button,a{transition:opacity .2s ease}
@media (hover:none) and (pointer:coarse){
  .principal,.second{min-height:44px}
}

/* --- Champs (text-fields.md, entering-data.md) : fond rempli, sans trait, anneau d'accent au focus -------------------- */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea){
  border-radius:10px}
textarea:focus-visible,.champ input:focus-visible{outline:3px solid color-mix(in srgb, var(--bleu-barian) 45%, transparent); outline-offset:0;
  border-color:var(--bleu-barian)}
input[type=checkbox],input[type=radio]{accent-color:var(--bleu-barian)}
input[type=range]{accent-color:var(--bleu-barian)}

/* --- Contrôle segmenté (segmented-controls.md) ----------------------------------------------------------------------- */

/* Les sélecteurs de vue des pages (Mails / Suivi / Contacts, Saisir / Semaine / Mois, Détails / Estimation / Suivi…)
   prennent le même aspect : piste grise opaque (elle reste lisible quand elle colle en haut), choix actif sur une pastille
   claire ombrée, texte en couleur de libellé (pas en bleu) comme sur iOS. */
:root{--seg-piste:#E3E3E8; --seg-pastille:#FFFFFF}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--seg-piste:#2C2C2E; --seg-pastille:#636366}}
:root[data-theme="dark"]{--seg-piste:#2C2C2E; --seg-pastille:#636366}
.vue-toggle,.hs-segment,.hs-onglets,.ml-sous-onglets,.ml-segment,.pf-onglets,.pf-sous-onglets,.pv-col-onglets,.mp-bascule,.rdv-vue-toggle,
.cu-onglets,.cu-types,.cu-vue-bascule,.cu-col-onglets,.eq-vues,.ent-seg{
  background:var(--seg-piste) !important; border:0 !important; border-radius:9px !important; padding:2px !important; gap:2px !important}
.vue-toggle button,.hs-segment button,.hs-onglets button,.ml-sous-onglets button,.ml-segment button,.pf-onglets button,.pf-sous-onglets button,
.pv-col-onglets button,.mp-bascule button,.rdv-vue-toggle button,.cu-onglets button,.cu-types button,.cu-vue-bascule button,.cu-col-onglets button,.eq-vues button,.ent-seg button{
  background:transparent !important; border:0 !important; border-radius:7px !important; color:var(--encre) !important; font-weight:500 !important;
  box-shadow:none; transition:background .2s ease, box-shadow .2s ease}
.vue-toggle button.actif,.hs-segment button.actif,.hs-onglets button.actif,.ml-sous-onglets button.actif,.ml-segment button.actif,
.pf-onglets button.actif,.pf-sous-onglets button.actif,.pv-col-onglets button.actif,.mp-bascule button.actif,.rdv-vue-toggle button.actif,
.cu-onglets button.actif,.cu-types button.actif,.cu-vue-bascule button.actif,.cu-col-onglets button.actif,.eq-vues button.actif,.ent-seg button.actif{
  background:var(--seg-pastille) !important; color:var(--encre) !important; font-weight:600 !important;
  box-shadow:0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04)}
.pf-onglets{margin:6px 0 !important}
@media (max-width:880px){ .hs-onglets{margin:0 0 14px !important} }

/* --- Fenêtres (modality.md, sheets.md) : fond assombri, feuille arrondie, en-tête translucide ------------------------ */
.modal-fond{background:rgba(0,0,0,.32)}
.modal-carte{border-radius:14px; box-shadow:var(--ombre-vive)}
.modal-entete{border-bottom:0.5px solid var(--trait)}
.modal-entete h3{font-size:17px; font-weight:600}
.modal-fermer{background:var(--rempli); color:var(--gris); width:30px; height:30px; font-size:15px; font-weight:700}
.modal-fermer:hover{background:var(--rempli-fort)}
@media (hover:none) and (pointer:coarse){ .modal-fermer{width:36px; height:36px} }
@media (max-width:880px){
  .modal-carte{border-radius:14px}
}

/* --- Notification passagère (feedback.md) : capsule « HUD » translucide ---------------------------------------------- */
/* 94 % (et plus 86 %) : posée en haut de l'écran, la capsule passait sur les onglets « Heures | Congés » et les titres, qu'on
   lisait à travers son texte (revue du 12/11/2026). */
.toast{background:color-mix(in srgb, var(--encre) 94%, transparent); -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px); border-radius:999px; padding:11px 20px; font-weight:600;
  box-shadow:0 8px 30px rgba(0,0,0,.18)}

/* --- Matériau « verre » sur les barres (materials.md, liquid-glass.md) ------------------------------------------------ */
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .ia-tete{background:var(--verre) !important; -webkit-backdrop-filter:saturate(180%) blur(22px);
    backdrop-filter:saturate(180%) blur(22px)}
  .nav-bas .nb-fond{background:var(--verre-bas) !important; -webkit-backdrop-filter:saturate(200%) blur(16px);
    backdrop-filter:saturate(200%) blur(16px)}
  @media (min-width:881px){
    .barre-laterale{background:var(--verre); -webkit-backdrop-filter:saturate(180%) blur(30px); backdrop-filter:saturate(180%) blur(30px);
      border-right:0.5px solid var(--verre-trait)}
  }
}
/* Barre du bas d'une seule pièce : la barre elle-même est transparente ; son fond (.nb-fond) est découpé à la forme
   barre + bosse du bouton Barian IA et son contour (.nb-contour) suit le même tracé (nav.js::formeBarreBas). */
.nav-bas{background:transparent !important; border-top:0 !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important}
.nav-bas .nb-fond{position:absolute; left:0; right:0; top:-31px; bottom:0; z-index:-1; pointer-events:none; background:var(--papier)}
.nav-bas .nb-contour{position:absolute; left:0; top:-31px; z-index:0; pointer-events:none; overflow:visible}
.nav-bas .nb-contour path{fill:none; stroke:var(--verre-trait); stroke-width:1; vector-effect:non-scaling-stroke}
@media (min-resolution:2dppx){ .nav-bas .nb-contour path{stroke-width:0.5} }
.nav-bas .nb-item{position:relative; z-index:1}
.topbar{border-bottom:0.5px solid var(--verre-trait)}

/* Barre du bas qui flotte au-dessus du contenu (téléphone) : le contenu défile dessous, la barre le laisse deviner.
   Chaque zone qui défile garde une marge basse de la hauteur de la barre pour que rien ne reste caché dessous. */
@media (max-width:880px){
  .nav-bas{position:fixed; left:0; right:0; bottom:0}
  #module-root main,#module-root .mp-corps,#module-root .liste,#module-root .planning-bande,#module-root .pl-colonnes{
    scroll-padding-bottom:calc(var(--nb-h) + env(safe-area-inset-bottom))}
  #module-root main{padding-bottom:calc(var(--nb-h) + 24px + env(safe-area-inset-bottom)) !important}
  /* Planning : la bande des jours n'est pas une zone qui défile, ses colonnes s'arrêtent au-dessus de la barre */
  #module-root:has(> .bande-scroll){padding-bottom:calc(var(--nb-h) + env(safe-area-inset-bottom))}
  /* Pages ou états où la barre est masquée : rien à réserver */
  body:has(#module-root.conv-ouverte) #module-root main,body:has(#module-root.fact-ouvert) #module-root main,
  html.av-panneau-ouvert #module-root main{padding-bottom:24px !important}
}

/* --- Menu latéral (sidebars.md) : sélection en capsule teintée, sans liseré ------------------------------------------ */
@media (min-width:881px){
  .barre-laterale .onglet{border-radius:10px; font-weight:500}
  .barre-laterale .onglet:hover{background:var(--rempli)}
  .barre-laterale .onglet.actif{background:var(--bleu-barian-teinte); color:var(--bleu-barian); font-weight:600}
  .barre-laterale .onglet.actif::before{display:none}
  .bl-section{border-bottom:0.5px solid var(--verre-trait)}
  .bl-titre{font-size:12px; text-transform:uppercase; letter-spacing:.04em; font-weight:600}
  .bl-replier{border:0; background:var(--rempli); box-shadow:none}
  .bl-pied{border-top:0.5px solid var(--verre-trait)}
}

/* --- Barre du bas (tab-bars.md) : libellés 10 px, onglet actif teinté -------------------------------------------------- */
.nb-item{font-weight:500; letter-spacing:.01em}
.nb-item.actif{color:var(--bleu-barian); font-weight:600}

/* --- Séparateurs fins (layout.md) : un trait de 0,5 px sur écran Retina -------------------------------------------------- */
@media (min-resolution:2dppx){
  .modal-entete,.topbar{border-width:0.5px}
}

/* --- Réglages d'accessibilité du téléphone (accessibility.md, motion.md) ---------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important;
    scroll-behavior:auto !important}
}
@media (prefers-reduced-transparency:reduce){
  .nav-bas .nb-fond,.topbar,.ia-tete,.barre-laterale,.toast{background:var(--papier) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important}
  .toast{background:var(--encre) !important}
}
@media (prefers-contrast:more){
  :root{--gris:#48484A; --trait:#8E8E93; --trait-doux:#AEAEB2}
}

/* --- Aujourd'hui, nouvelle présentation à essayer (24/10/2026) ------------------------------------------------------
   Même contenu, mise en page façon iOS : date en petites capitales au-dessus du grand titre, résumé avec anneau
   d'avancement, en-têtes de section discrets hors des cartes, contrôle segmenté, listes groupées à filets fins.
   Activée par le bouton « Essayer la nouvelle présentation » (localStorage barian-auj-v2). */
.acc2-essayer,.acc2-bascule{margin-left:auto; align-self:center; font:inherit; font-size:13px; font-weight:600; border:0;
  border-radius:999px; padding:7px 14px; cursor:pointer; background:var(--rempli); color:var(--bleu-barian); white-space:nowrap}
.acc2-bascule{color:var(--gris); margin-left:0; font-size:12px; padding:4px 10px; text-transform:none; letter-spacing:0}
.acc2-titres{flex:1; min-width:0}
.acc2-date{display:flex; align-items:center; justify-content:space-between; gap:10px}
header.acc2-entete,header:has(> .acc2-essayer){display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap}
.acc2-date{font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--gris); margin-bottom:2px}
.acc-v2 .acc2-entete h1, .acc2-entete h1{font-size:34px; font-weight:800; letter-spacing:-.025em; line-height:1.1; margin:0}
.acc-v2 .acc-page{gap:26px}
.acc-v2 .carte-section{background:var(--papier); border:0; border-radius:16px; box-shadow:var(--ombre); padding:16px 18px}
.acc-v2 .carte-section > h3, .acc-v2 .acc-menage-tete h3, .acc-v2 .acc-arr-tete h3, .acc-v2 .acc-chiffres-tete h3{
  font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--gris)}
/* Résumé : anneau + phrase */
.acc2-resume{display:flex; align-items:center; gap:18px; background:var(--papier); border-radius:20px; padding:18px 20px; box-shadow:var(--ombre)}
.acc2-resume b{display:block; font-size:19px; font-weight:700; letter-spacing:-.01em; line-height:1.25}
.acc2-resume span{display:block; margin-top:4px; font-size:14px; color:var(--gris)}
.acc2-anneau{flex:none; width:76px; height:76px}
.acc2-anneau circle{fill:none; stroke-width:8}
.acc2-anneau .fond{stroke:var(--rempli)}
.acc2-anneau .plein{stroke:var(--vert); stroke-linecap:round; transition:stroke-dasharray .4s ease}
.acc2-anneau text{text-anchor:middle; fill:var(--encre); font-family:var(--police)}
.acc2-anneau .n{font-size:22px; font-weight:800}
.acc2-anneau .s{font-size:10.5px; fill:var(--gris); font-weight:600}
/* Chiffres en widgets */
.acc-v2 .grille-stats{gap:12px}
.acc-v2 .carte-stat{border:0; border-radius:18px; box-shadow:var(--ombre); padding:14px 16px; flex-direction:column; align-items:flex-start; gap:10px}
.acc-v2 .carte-stat .stat-nombre{font-size:28px; font-weight:800; letter-spacing:-.02em; line-height:1}
.acc-v2 .carte-stat .stat-libelle{font-size:13px; color:var(--gris)}
.acc-v2 .carte-stat.actif{box-shadow:0 0 0 2px var(--bleu-barian)}
/* Ménages : contrôle segmenté à la place de « Demain → » */
.acc2-menage .acc-menage-tete{align-items:center}
.acc2-seg{margin-left:auto}
/* Arrivées et départs : liste groupée à filets fins */
.acc-v2 .ligne-mouvement{border:0; border-radius:0; padding:12px 2px; background:none; box-shadow:none; border-bottom:0.5px solid var(--trait)}
.acc-v2 .ligne-mouvement:last-of-type{border-bottom:0}
.acc-v2 .acc-planning-lien{border:0; background:var(--rempli); color:var(--bleu-barian); border-radius:12px; font-weight:600}
.acc-v2 .acc-marque{opacity:.6}
@media (max-width:880px){
  .acc-v2 .acc2-entete h1{font-size:30px}
  .acc2-resume{padding:14px 16px; gap:14px}
  .acc2-resume b{font-size:17px}
  .acc2-essayer{font-size:12px; padding:6px 11px}
}

/* Plus de flou en haut de l'écran (Florian, 27/10/2026) : la barre du haut est opaque, sans effet de verre. */
.topbar{background:var(--fond, var(--papier)) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important}
/* Téléphone : la page ne passe plus sous la zone de l'heure et de la batterie, où iPhone la floutait au défilement
   (Florian, 27/10/2026) — une bande opaque couvre cette zone et le contenu commence juste en dessous. */
@media (max-width:880px){
  body{padding-top:env(safe-area-inset-top)}
  body::before{content:""; position:fixed; top:0; left:0; right:0; height:env(safe-area-inset-top); background:var(--toile); z-index:70; pointer-events:none}
}
/* Plus de bande grise au-dessus de la barre du bas (Messages, Planning — 27/10/2026) : le contenu descend jusque sous la
   barre ; c'est la zone qui défile (liste des conversations, colonnes du planning) qui garde l'espace pour finir lisible. */
@media (max-width:880px){
  body[data-page="messages"] #module-root:not(.conv-ouverte) main{padding-bottom:0 !important}
  body[data-page="messages"] #module-root:not(.conv-ouverte) .liste{padding-bottom:calc(var(--nb-h) + 34px + env(safe-area-inset-bottom))}
  #module-root:has(> .bande-scroll){padding-bottom:0}
  #module-root .bande-scroll .jour-cartes{padding-bottom:calc(var(--nb-h) + 40px + env(safe-area-inset-bottom))}
}

/* Mode sombre — éléments bleus pleins (12/11/2026, relevé par trois relecteurs) : le texte blanc sur le bleu clair du mode
   sombre (#64A8D2) ne faisait que 2,6:1 (4,5:1 minimum). Texte bleu nuit à la place (≈ 6,5:1), comme Messages.
   Liste établie automatiquement : toute règle « background:var(--bleu-barian) + color:#fff » de styles.css et apple.css.
   Un nouvel élément bleu plein à texte blanc doit être ajouté ici.
   18/11/2026 (revue de Mail et Suivi) : la règle ne vise QUE l'état bleu plein. Les variantes qui ne sont pas bleues —
   boutons secondaires (.ml-bouton.second, .ent-btn.second : texte invisible, 1,02:1), boutons rouges foncés (.principal.danger,
   micro en écoute, pastille d'alerte : texte bleu nuit sur rouge, 3:1) — en sont exclues par :where(:not(…)) ; .hs-danger
   reste dedans (son rouge clair du mode sombre, #FF453A, se lit mieux en bleu nuit : 4,8:1 contre 3,4:1 en blanc),
   sans changer la priorité de la règle (:where ne compte pas) : les boutons bleus pleins gardent leur texte bleu nuit. */
:root[data-theme="dark"] .pia-preset.actif,
:root[data-theme="dark"] .principal:where(:not(.danger)),
:root[data-theme="dark"] .fleche-envoi,
:root[data-theme="dark"] .micro.actif,
:root[data-theme="dark"] .jour-colonne.auj .jn-num,
:root[data-theme="dark"] .btn-itineraire:hover,
:root[data-theme="dark"] .btn-fait,
:root[data-theme="dark"] .iti-num,
:root[data-theme="dark"] .pin-iti,
:root[data-theme="dark"] .fact-onglet.actif,
:root[data-theme="dark"] .ana-periode.actif,
:root[data-theme="dark"] .ana-page-num.actif,
:root[data-theme="dark"] .rdv-vue-toggle button.actif,
:root[data-theme="dark"] .hs-avatar,
:root[data-theme="dark"] .hs-personne.actif .hs-coche,
:root[data-theme="dark"] .hs-enregistrer,
:root[data-theme="dark"] .ml-pastille:where(:not(.alerte)),
:root[data-theme="dark"] .ml-statut.repondre,
:root[data-theme="dark"] .ml-m-avatar,
:root[data-theme="dark"] .ml-micro:where(:not(.actif)),
:root[data-theme="dark"] .ml-bouton:where(:not(.second)),
:root[data-theme="dark"] .ml-envoyer,
:root[data-theme="dark"] .ml-type.t-rdv,
:root[data-theme="dark"] .ml-h-type.t-rdv,
:root[data-theme="dark"] .rp-b.principal,
:root[data-theme="dark"] .lo-filtre.actif,
:root[data-theme="dark"] .mx .compteur.actif,
:root[data-theme="dark"] .mx .compteur-badge,
:root[data-theme="dark"] .pr-puce.actif,
:root[data-theme="dark"] .pr-etapes button.actif span,
:root[data-theme="dark"] .pr-onglets-etape button.actif,
:root[data-theme="dark"] .pv-btn-principal,
:root[data-theme="dark"] .pv-etape.actif,
:root[data-theme="dark"] .pv-col-onglets button.actif span,
:root[data-theme="dark"] .pdf-bouton.plein,
:root[data-theme="dark"] .bandeau-notif button.principal,
:root[data-theme="dark"] .eval-valider,
:root[data-theme="dark"] .rj-valider,
:root[data-theme="dark"] .ph-tete span b,
:root[data-theme="dark"] .iam-micro:where(:not(.ecoute)),
:root[data-theme="dark"] .ent-btn:where(:not(.second)),
:root[data-theme="dark"] .ml-rappels-n,
:root[data-theme="dark"] .ml-groupe.g-repondre .ml-groupe-tete b,
:root[data-theme="dark"] .ml-barre-n,
:root[data-theme="dark"] .mx-statut.a-repondre,
html.ia-ouvert[data-theme="dark"] .bl-ia,
:root[data-theme="dark"] .ml-filtre.actif,
:root[data-theme="dark"] .mp-btn.mp-principal,
:root[data-theme="dark"] .mp-tri-vig.gardee .mp-tri-coche,
:root[data-theme="dark"] .cu-btn.plein:not(.rouge):not(.vert):not(.orange),
:root[data-theme="dark"] .ml-filtre b{color:#10202b}
:root[data-theme="dark"] .ml-filtre.actif b{background:#10202b; color:var(--bleu-barian)}
html.ia-ouvert[data-theme="dark"] .bl-ia .bl-ia-etoile{fill:#10202b}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .pia-preset.actif,
  :root:not([data-theme="light"]) .principal:where(:not(.danger)),
  :root:not([data-theme="light"]) .fleche-envoi,
  :root:not([data-theme="light"]) .micro.actif,
  :root:not([data-theme="light"]) .jour-colonne.auj .jn-num,
  :root:not([data-theme="light"]) .btn-itineraire:hover,
  :root:not([data-theme="light"]) .btn-fait,
  :root:not([data-theme="light"]) .iti-num,
  :root:not([data-theme="light"]) .pin-iti,
  :root:not([data-theme="light"]) .fact-onglet.actif,
  :root:not([data-theme="light"]) .ana-periode.actif,
  :root:not([data-theme="light"]) .ana-page-num.actif,
  :root:not([data-theme="light"]) .rdv-vue-toggle button.actif,
  :root:not([data-theme="light"]) .hs-avatar,
  :root:not([data-theme="light"]) .hs-personne.actif .hs-coche,
  :root:not([data-theme="light"]) .hs-enregistrer,
  :root:not([data-theme="light"]) .ml-pastille:where(:not(.alerte)),
  :root:not([data-theme="light"]) .ml-statut.repondre,
  :root:not([data-theme="light"]) .ml-m-avatar,
  :root:not([data-theme="light"]) .ml-micro:where(:not(.actif)),
  :root:not([data-theme="light"]) .ml-bouton:where(:not(.second)),
  :root:not([data-theme="light"]) .ml-envoyer,
  :root:not([data-theme="light"]) .ml-type.t-rdv,
  :root:not([data-theme="light"]) .ml-h-type.t-rdv,
  :root:not([data-theme="light"]) .rp-b.principal,
  :root:not([data-theme="light"]) .lo-filtre.actif,
  :root:not([data-theme="light"]) .mx .compteur.actif,
  :root:not([data-theme="light"]) .mx .compteur-badge,
  :root:not([data-theme="light"]) .pr-puce.actif,
  :root:not([data-theme="light"]) .pr-etapes button.actif span,
  :root:not([data-theme="light"]) .pr-onglets-etape button.actif,
  :root:not([data-theme="light"]) .pv-btn-principal,
  :root:not([data-theme="light"]) .pv-etape.actif,
  :root:not([data-theme="light"]) .pv-col-onglets button.actif span,
  :root:not([data-theme="light"]) .pdf-bouton.plein,
  :root:not([data-theme="light"]) .bandeau-notif button.principal,
  :root:not([data-theme="light"]) .eval-valider,
  :root:not([data-theme="light"]) .rj-valider,
  :root:not([data-theme="light"]) .ph-tete span b,
  :root:not([data-theme="light"]) .iam-micro:where(:not(.ecoute)),
  :root:not([data-theme="light"]) .ent-btn:where(:not(.second)),
  :root:not([data-theme="light"]) .ml-rappels-n,
  :root:not([data-theme="light"]) .ml-groupe.g-repondre .ml-groupe-tete b,
  :root:not([data-theme="light"]) .ml-barre-n,
  :root:not([data-theme="light"]) .mx-statut.a-repondre,
  html.ia-ouvert:not([data-theme="light"]) .bl-ia,
  :root:not([data-theme="light"]) .ml-filtre.actif,
  :root:not([data-theme="light"]) .mp-btn.mp-principal,
  :root:not([data-theme="light"]) .mp-tri-vig.gardee .mp-tri-coche,
  :root:not([data-theme="light"]) .cu-btn.plein:not(.rouge):not(.vert):not(.orange),
  :root:not([data-theme="light"]) .ml-filtre b{color:#10202b}
  :root:not([data-theme="light"]) .ml-filtre.actif b{background:#10202b; color:var(--bleu-barian)}
  html.ia-ouvert:not([data-theme="light"]) .bl-ia .bl-ia-etoile{fill:#10202b}
}
