/* Barre du haut et onglets en verre dépoli (demandes d'Amélie du 08/11/2026 : « les boutons du haut ne vont pas du
   tout », « du liquid glass, transparent par rapport à l'orange »). Chargée par construire.mjs après les styles de chaque
   espace (Mon espace, console, Smooth TVA, INDay, Optimic Clarity, Strategy Blueprint) : une seule barre alignée sur une ligne, à gauche le logo
   et le nom de l'outil, à droite « Mes outils » puis le bouton du compte (<be-compte>, app/src/ui/menu-compte.js).
   Même fichier pour Judy (importé par App.tsx) : une seule source.
   Onglets sous la barre : verre et sélection orange doux, partagés avec Judy.
   Sans backdrop-filter : fond crème à 92 %. Contrastes vérifiés (AA) sur le dégradé orange du fond.
   Barre et onglets : seulement dans les outils (pages qui ont #be-outils, #compte ou #barre) ; Judy garde sa mise en page et
   reprend « Mes outils » et le bouton du compte. */
/* Le verre de la barre est sur ::before : un parent avec backdrop-filter empêcherait les menus qu'il contient (« Mes outils »,
   compte) de flouter la page derrière eux. */
html:has(#be-outils,#compte,#barre) .wrap>header.top{position:relative;z-index:30;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 12px;padding:8px 8px 8px 18px;border-radius:99px;
  background:none;-webkit-backdrop-filter:none;backdrop-filter:none;border:0;box-shadow:none}
html:has(#be-outils,#compte,#barre) .wrap>header.top::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;
  background:rgba(255,255,255,.55);-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);border:1px solid rgba(255,255,255,.7);box-shadow:0 12px 32px -20px rgba(41,62,57,.35)}
html:has(#be-outils,#compte,#barre) .wrap>header.top .top-gauche{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto;flex-wrap:nowrap}
html:has(#be-outils,#compte,#barre) .wrap>header.top .top-gauche img{height:24px;width:auto;flex:none}
html:has(#be-outils,#compte,#barre) .wrap>header.top .programme{display:inline-flex;align-items:center;gap:8px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 12px;border-radius:99px;background:rgba(255,255,255,.6);border:1px solid rgba(255,255,255,.75);box-shadow:none;color:#293E39}
html:has(#be-outils,#compte,#barre) .wrap>header.top .top-droite{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:nowrap;margin:0;padding:0;border:0;background:none;box-shadow:none}
html:has(#be-outils,#compte,#barre) .wrap>header.top .top-droite:empty,html:has(#be-outils,#compte,#barre) .wrap>header.top #compte:empty{display:none}
html:has(#be-outils,#compte,#barre) .wrap>header.top .top-droite>*{flex:none}
html:has(#be-outils,#compte,#barre) .wrap>header.top #be-outils,html:has(#be-outils,#compte,#barre) .wrap>header.top #compte{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
html:has(#be-outils,#compte,#barre) .wrap>header.top .bo{position:relative}
html .bo-bouton{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 16px;border-radius:99px;border:1px solid rgba(255,255,255,.7);background:rgba(255,255,255,.55);-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);color:#293E39;font-weight:700;cursor:pointer;box-shadow:0 8px 24px -14px rgba(41,62,57,.45);transition:background .5s,box-shadow .5s}
html .bo-bouton:hover,html .bo-bouton[aria-expanded="true"]{background:rgba(255,255,255,.8);border-color:rgba(255,255,255,.9);box-shadow:0 0 20px rgba(250,154,3,.3)}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  html:has(#be-outils,#compte,#barre) .wrap>header.top::before,html .bo-bouton{background:rgba(255,242,227,.92)}
}
:root[data-theme="dark"]:has(#be-outils,#compte,#barre) .wrap>header.top::before,:root[data-theme="dark"] .bo-bouton{background:rgba(250,154,3,0.6);border-color:rgba(255,255,255,.14);color:#293E39}
:root[data-theme="dark"]:has(#be-outils,#compte,#barre) .wrap>header.top .programme{background:rgba(250,154,3,0.6);border-color:rgba(255,255,255,.14);color:#293E39}
/* Téléphone : tout tient sur une ligne. « Mes outils » garde son nom pour les lecteurs d'écran, l'icône seule s'affiche. */
@media (max-width:600px){
  html:has(#be-outils,#compte,#barre) .wrap>header.top{gap:6px;padding:6px 6px 6px 12px;margin-top:10px}
  html:has(#be-outils,#compte,#barre) .wrap>header.top .top-gauche{gap:8px}
  html:has(#be-outils,#compte,#barre) .wrap>header.top .top-gauche img{height:19px}
  html:has(#be-outils,#compte,#barre) .wrap>header.top .programme{padding:5px 10px;font-size:.92rem}
  html:has(#be-outils,#compte,#barre) .wrap>header.top .programme i{display:none}
  html .bo-bouton{width:44px;padding:0;justify-content:center;gap:0}
  html .bo-bouton .bo-texte{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
}
@media (max-width:370px){html:has(#be-outils,#compte,#barre) .wrap>header.top .top-gauche a:first-child{display:none}}
/* Icône de « Mes outils » (la même partout, Judy compris) */
html .bo-bouton{text-decoration:none;font-size:.88rem}
html .bo-grille{display:grid;grid-template-columns:repeat(2,5px);gap:2px}html .bo-grille i{width:5px;height:5px;border-radius:1.5px;background:#FA9A03}
:root[data-theme="dark"] .bo-grille i{background:#f6ead9}
html .bo-bouton:focus-visible{outline:3px solid #FA9A03;outline-offset:2px}
/* Style Judy dans les outils (08/11/2026) : plus de bouton ni d'encart vert foncé plein ; bouton orange, encart crème.
   Ne touche pas Judy (ses classes sont les siennes). */
html body .wrap .principal,html body .wrap .tache-lien{background:#FA9A03;color:#22322e;border-color:#FA9A03;box-shadow:0 8px 18px -10px rgba(250,154,3,.7)}
html body .wrap .principal:hover,html body .wrap .tache-lien:hover{box-shadow:0 0 20px rgba(250,154,3,.3)}
html body .wrap .bulle{background:rgba(255,242,227,.85);color:#22322e;border:1px solid rgba(255,255,255,.75)}
html body .wrap .bulle strong{color:#22322e}

/* Navigation partagée : mêmes règles pour Judy et les pages du socle. */
:root{--be-orange:#FA9A03;--be-encre:#293E39;--be-creme:#FFF2E3;--be-orange-doux:color-mix(in srgb,var(--be-orange) 24%,white);--be-onglet-rayon:99px}
/* Même barre d'onglets dans tous les outils (15/11/2026, « harmoniser la présentation et les onglets ») : la forme du
   dock des outils (espaces-produits.css), centrée sous l'en-tête, fond blanc et bord beige. */
html body .wrap>nav.onglets{box-sizing:border-box;display:flex;flex-wrap:nowrap;align-items:center;gap:2px;width:max-content;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;margin:0 auto 18px;padding:6px;border:1px solid #F0E3D0;border-radius:28px;background:rgba(255,255,255,.92);-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);box-shadow:0 14px 36px rgba(41,62,57,.1)}
html body .wrap>nav.onglets .onglet{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;gap:6px;position:relative;min-height:44px;margin:0;padding:12px 16px;border:0;border-radius:22px;background:transparent;color:var(--be-encre);font:600 .92rem/1.3 Raleway,system-ui,sans-serif;white-space:nowrap;text-decoration:none;box-shadow:none;cursor:pointer;transition:background .15s}
html body .wrap>nav.onglets .onglet:hover{box-shadow:inset 0 0 0 1px var(--be-orange)}
html body .wrap>nav.onglets[hidden],html body .wrap>nav.onglets .onglet[hidden]{display:none}
/* Le deuxième niveau reste léger sous le verre principal. */
html body .wrap :is(.sous-club,nav.sous-onglets,.lib-onglets,.dep-onglets),html body .wrap>.sous-onglets{box-sizing:border-box;display:flex;flex-wrap:nowrap;align-items:center;gap:4px;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;margin:0 0 18px;padding:4px;border:0;border-radius:0;background:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
html body .wrap :is(.sous-club,nav.sous-onglets,.lib-onglets,.dep-onglets)>button,html body .wrap>.sous-onglets>button,html body .wrap .navigation-suite>.sous-onglet{box-sizing:border-box;flex:0 0 auto;min-height:36px;margin:0;padding:7px 12px;border:0;border-radius:var(--be-onglet-rayon);background:transparent;color:var(--be-encre);font:500 .85rem/1.3 Raleway,system-ui,sans-serif;white-space:nowrap;box-shadow:none;cursor:pointer;transform:none;-webkit-backdrop-filter:none;backdrop-filter:none}
html body .wrap :is(.sous-club,nav.sous-onglets,.lib-onglets,.dep-onglets)>button:hover,html body .wrap>.sous-onglets>button:hover{background:rgba(255,255,255,.4)}
html body .wrap :is(nav.onglets,.sous-club,.sous-onglets,.lib-onglets,.dep-onglets)::-webkit-scrollbar{display:none}
html body .wrap [data-be-suite="true"]{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 30px),transparent)}
@media(max-width:600px){html body .wrap>nav.onglets{position:relative;top:auto;margin-inline:0}html body .wrap>nav.onglets .onglet{padding-inline:13px}}
/* Notifications : une ligne fine et discrète partout (« Ta banque est connectée », « C'est enregistré »…), jamais un
   bandeau orange en gras. Judy : .be-note (ui/NoteDiscrete.tsx) ; outils : leur .toast. */
html body .toast{background:#FFFFFF!important;color:#293E39!important;border:1px solid #F0E3D0!important;font-weight:500!important;font-size:.86rem!important;box-shadow:0 14px 36px rgba(41,62,57,.1)!important}

/* Présentation commune (19/11/2026, « même présentation que Smooth TVA et INDay, avec la barre latérale ») :
   onglets du haut avec leur pictogramme, 48 px, texte 15 px ; sous-menu en barre latérale à gauche dès 900 px de large,
   en haut sur téléphone. */
html body .wrap>nav.onglets .onglet{min-height:48px;font-size:.94rem;gap:8px}
html body .wrap>nav.onglets .onglet .onglet-picto{flex:none}
html body .wrap .avec-cote{display:block}
html body .wrap .navigation-rubrique>.navigation-suite{display:contents}
html body .wrap .navigation-rubrique .sous-onglet[hidden]{display:none}
html body .wrap .navigation-rubrique .navigation-plus{border:1px solid #F0E3D0}
html body .wrap .navigation-rubrique .navigation-plus[aria-expanded="true"]{border-color:var(--be-orange)}
@media (min-width:900px){
  html body .wrap .avec-cote{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;align-items:start}
  html body .wrap .avec-cote>nav.sous-onglets{position:sticky;top:16px;flex-direction:column;align-items:stretch;flex-wrap:nowrap;overflow:visible;gap:2px;margin:0;padding:12px;border:1px solid #F0E3D0;border-radius:22px;background:rgba(255,255,255,.92);box-shadow:0 14px 36px rgba(41,62,57,.08)}
  html body .wrap .avec-cote>nav.sous-onglets .sous-onglet{justify-content:flex-start;text-align:left;width:100%;min-height:40px;padding:9px 12px;border-radius:12px;font-size:.9rem;white-space:normal}
  html body .wrap .avec-cote>main{min-width:0}
}
@media (max-width:640px){
  html body .wrap>nav.onglets.navigation-judy{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;overflow:visible}
  html body .wrap>nav.onglets.navigation-judy .onglet{min-height:44px;justify-content:flex-start;gap:5px;padding:8px 6px;font-size:.84rem}
  html body .wrap>nav.onglets.navigation-judy .onglet-picto{width:16px;height:16px}
  html body .wrap .avec-cote>nav.navigation-rubrique{flex-wrap:wrap;overflow:visible}
  html body .wrap .avec-cote>nav.navigation-rubrique .sous-onglet{min-height:44px;white-space:normal;max-width:100%}
}
@media (max-width:365px){
  html body .wrap>nav.onglets.navigation-judy .onglet-picto{display:none}
}

/* Même sélection en colonne et en rangée. La couche prime sur les anciennes surcharges des outils. */
@layer be-onglets {
  :is(nav.onglets .onglet, .sous-onglet, nav.sous-onglets > button, .sous-club > button,
      .lib-onglets > button, .dep-onglets > button, [role="tablist"] > [role="tab"],
      nav.me-dock > a, #espaces a, #bas-tel > a, nav.msc-dock > .msc-onglet,
      .param-liste .param-ligne, .analyse-v2 .feuille button.o) {
    &:focus-visible {
      outline: 2px solid var(--be-encre) !important;
      outline-offset: -2px !important;
    }
    &:not(:hover, [aria-current="true"], [aria-current="page"], [aria-selected="true"]) {
      background: transparent !important;
    }
    &:is([aria-current="true"], [aria-current="page"], [aria-selected="true"]) {
      background: var(--be-creme) !important;
      border-color: transparent !important;
      box-shadow: none !important;
      color: var(--be-encre) !important;
      font-weight: 700 !important;
      text-decoration: none !important;

      &::before {
        content: "";
        display: inline-block;
        width: 6px;
        height: 6px;
        flex: none;
        margin-inline-end: var(--be-onglet-espacement, 8px);
        border-radius: 50%;
        background: var(--be-orange);
        vertical-align: middle;
      }
    }
  }
}
nav.onglets .onglet, nav.me-dock > a, #espaces a, #bas-tel > a, nav.msc-dock > .msc-onglet {
  --be-onglet-espacement: 0px;
}
#bas-tel > a { display: inline-flex; align-items: center; justify-content: center; }

/* En-tête de Judy comme celui des outils (19/11/2026) : bande blanche de bord à bord, 64 px, la maison puis le nom de
   l'outil en Fanwood italique orange suivi de « by business émoi » ; fond de page crème #FFFAF3. */
html body:has(.wrap>header.top .top-outil){background-color:#FFFAF3}
html body .wrap>header.top:has(.top-outil){position:relative;z-index:30;min-height:64px;margin:0 0 6px;padding:10px 0;background:#FFFFFF}
/* Bande blanche de bord à bord sans clip-path : un clip-path coupait le menu du compte (il s'ouvre sous l'en-tête). */
html body .wrap>header.top:has(.top-outil)::after{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 50vw);width:100vw;background:#FFFFFF;border-bottom:1px solid rgba(41,62,57,.1);z-index:-1;pointer-events:none}
html body .wrap>header.top:has(.top-outil)::before{content:none}
html body .wrap>header.top .top-maison{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;color:#293E39;text-decoration:none}
html body .wrap>header.top .top-outil{display:inline-flex;align-items:baseline;gap:8px;text-decoration:none;white-space:nowrap}
html body .wrap>header.top .top-outil-nom{font-family:"Fanwood Text",Georgia,serif;font-style:italic;font-size:32px;line-height:1;color:#FA9A03}
html body .wrap>header.top .top-outil-par{font:400 .8rem/1 Raleway,system-ui,sans-serif;color:#293E39}
@media (max-width:600px){html body .wrap>header.top .top-outil-nom{font-size:26px}html body .wrap>header.top .top-outil-par{display:none}}
:root[data-theme="dark"] body .wrap>header.top:has(.top-outil){background:transparent;box-shadow:none}
