/* =====================================================================
   (27/11/2026) Menu de l'appli comme la maquette animée validée par l'utilisateur
   (Desktop/SubScale design/animations/maquette-animee.html) : chargé APRÈS stylepro.css et motion.css, même astuce
   :is(#gs,*) que le reste. Purement visuel : l'ordre des entrées est dans app.html, la logique ne change pas.
   - recherche : une vraie barre pleine largeur (loupe, « Rechercher… », Ctrl K / ⌘K) ;
   - carte de la créatrice et carte du compte : avatar en dégradé de la couleur choisie ;
   - entrées de 34 px, sections avec un chevron qui pivote quand elles sont ouvertes ;
   - SubScale IA : la pastille « IA » en dégradé (reflet qui passe en Animations Normales seulement).
   ===================================================================== */

/* ---------- recherche : la barre de la maquette ---------- */
html body :is(#gs, .app) .side .kbar:is(#gs,*):not(#mn-z) {
  display: flex !important; align-items: center !important; gap: 8px !important; width: 100% !important; height: 34px !important;
  margin: 10px 0 8px !important; padding: 0 8px 0 10px !important; border: 1px solid var(--line) !important; border-radius: 10px !important;
  background: transparent !important; color: var(--muted) !important; font: 500 13px/1 Inter, sans-serif !important; letter-spacing: 0 !important;
  cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
html body :is(#gs, .app) .side .kbar:hover:is(#gs,*):not(#mn-z) { border-color: var(--line-2) !important; background: color-mix(in srgb, var(--fg) 4%, transparent) !important; color: var(--fg-2) !important; }
html body :is(#gs, .app) .side .kbar > svg:is(#gs,*):not(#mn-z) { width: 15px !important; height: 15px !important; flex: none; }
html body :is(#gs, .app) .side .kbar > span:is(#gs,*):not(#mn-z)::after { content: "…"; }
html body :is(#gs, .app) .side .kbar kbd:is(#gs,*):not(#mn-z) { margin-left: auto !important; padding: 2px 6px !important; border: 1px solid var(--line-2) !important; border-radius: 5px !important; background: transparent !important; color: var(--muted) !important; font: 500 10.5px/1.2 Inter, sans-serif !important; }
/* menu réduit (64 px) : la loupe seule, centrée */
html body.side-mini :is(#gs, .app) .side .kbar:is(#gs,*):not(#mn-z) { justify-content: center !important; padding: 0 !important; }

/* ---------- la créatrice (en haut) et le compte (en bas) : avatar en dégradé de la couleur choisie ---------- */
html body :is(#gs, .app) .side .ctx-av:is(#gs,*):not(#mn-z) { background: linear-gradient(135deg, var(--acc), var(--acc-2)) !important; color: #fff !important; }
html body :is(#gs, .app) .side .ctx-av svg:is(#gs,*):not(#mn-z) { color: #fff !important; stroke: #fff !important; }
html body :is(#gs, .app) .side-foot #me-avatar:is(#gs,*):not(#mn-z):not(.has-photo):not(:has(img)) { background: linear-gradient(135deg, var(--acc), var(--acc-2)) !important; color: var(--acc-ink) !important; box-shadow: none !important; }

/* ---------- entrées : 34 px comme la maquette (ordinateur) ---------- */
@media (min-width: 761px) {
  html body:not(.side-mini) :is(#gs, .app) .side .nav > [data-view]:not(.nav-sub):is(#gs,*):not(#mn-z),
  html body:not(.side-mini) :is(#gs, .app) .side .nav > .nav-sec:is(#gs,*):not(#mn-z) { min-height: 34px !important; height: 34px !important; }
  /* sections : un chevron qui pivote quand la section est ouverte (au téléphone, le tiroir a déjà le sien) */
  html body:not(.side-mini) :is(#gs, .app) .side .nav > .nav-sec:not(.locked):is(#gs,*):not(#mn-z)::after {
    content: ""; flex: none; width: 6px; height: 6px; margin-left: 8px; margin-right: 3px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; opacity: .55;
    transform: rotate(-45deg); transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s;
  }
  html body:not(.side-mini) :is(#gs, .app) .side .nav > .nav-sec:not(.locked):not(:has(> .nav-dot:not([hidden]), > .nav-ia)):is(#gs,*):not(#mn-z)::after { margin-left: auto; }
  html body:not(.side-mini) :is(#gs, .app) .side .nav > .nav-sec:not(.locked)[aria-expanded="true"]:is(#gs,*):not(#mn-z)::after { transform: rotate(45deg); opacity: .8; }
  html body:not(.side-mini) :is(#gs, .app) .side .nav > .nav-sec:not(.locked):hover:is(#gs,*):not(#mn-z)::after { opacity: .9; }
}

/* ---------- SubScale IA : la pastille « IA » ---------- */
html body :is(#gs, .app) .side .nav .nav-ia:is(#gs,*):not(#mn-z) {
  margin-left: auto; padding: 3px 6px; border-radius: 6px; font: 700 10px/1 Inter, sans-serif; font-style: normal; letter-spacing: .02em;
  color: var(--acc-ink); background: linear-gradient(90deg, var(--acc), var(--acc-2), var(--acc)); background-size: 200% 100%;
}
html body :is(#gs, .app) .side .nav > .nav-sec:has(> .nav-ia) > .nav-dot:is(#gs,*):not(#mn-z) { margin-left: 6px !important; }
html[data-motion="full"] body :is(#gs, .app) .side .nav .nav-ia:is(#gs,*):not(#mn-z) { animation: mn-sheen 3s linear infinite; }
@keyframes mn-sheen { to { background-position: -200% 0; } }
/* menu réduit : seulement les icônes (la pastille disparaît avec le libellé, stylepro.css .side-mini) */
html body.side-mini :is(#gs, .app) .side .nav .nav-ia:is(#gs,*):not(#mn-z) { display: none !important; }

/* ---------- titres de groupe (Agence, Outils, Administration) : comme la maquette ---------- */
html body :is(#gs, .app) .side .nav > .nav-label.nav-grp:is(#gs,*):not(#mn-z) { margin: 14px 0 4px !important; }

/* ---------- entrée verrouillée (offre supérieure) : un cadenas quand l'offre n'a pas d'icône à elle ----------
   (avant : un carré blanc pour les offres start / growth / agency, que app.css ne connaît pas ; les icônes des anciennes
   offres starter / pro / agence gardent la main, ce repli a la plus faible priorité) */
:where(.side .nav button.locked)::after { --lk-i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%225%22 y=%2211%22 width=%2214%22 height=%2210%22 rx=%222%22/%3E%3Cpath d=%22M8 11V8a4 4 0 0 1 8 0v3%22/%3E%3C/svg%3E"); }
html body :is(#gs, .app) .side .nav button.locked:is(#gs,*):not(#mn-z)::after { width: 13px !important; height: 13px !important; filter: none !important; background: var(--muted) !important; }

/* (27/11/2026) un titre de groupe masqué (hidden) reste masqué : une règle display:flex plus ancienne le réaffichait */
html body :is(#gs, .app) .side .nav > .nav-label[hidden]:is(#gs,*):not(#mn-z) { display: none !important; }
