/* encoche.css — chantier capsule, lots L1.3 → L4.2 (2026-08-08). Chargée par
   la HOME seule. shell.css n'est PAS touchée. UN SEUL MENU (décision 10.1).
   Forme L1.3 : la barre est SOUDÉE au bord haut par des CONGÉS INVERSÉS
   (10.2, forme Supaste) ; l'étagère ne contient QUE les onglets (10.3) ;
   les utilitaires vivent HORS barre, en haut à droite, sur le blanc, aux
   jetons du thème (10.3bis) ; au défilement la barre se rétracte en
   LANGUETTE toujours visible (10.8).
   L4.2 (décision 15d) : le noir #141519 est REMPLACÉ par la surface de
   verre du thème — la GÉOMÉTRIE et les congés ne bougent pas d'un pixel. */

:root{--enc-h:calc(48px + env(safe-area-inset-top));--enc-r:18px}

/* L4.2 — LA MATIÈRE : deux jetons NEUFS, définis dans LES DEUX thèmes à la
   création (règle dure dark mode). Clair : le fond du thème légèrement
   encré. Sombre : surface RELEVÉE au-dessus du fond #0A0B0E — l'ancienne
   pastille #141519 (== --surface sombre) y disparaissait, mesuré 08/08.
   Le point bleu du logo reste le SEUL accent coloré. */
/* L4.6 — jetons de la MAQUETTE encoche-signature.html (autorité visuelle,
   VALIDÉE 08/08 soir), surface ÉCLAIRCIE D'UN CRAN et lueurs −20 % comme
   demandé. Valeurs de maquette, trois portées de thème. */
:root{
  --enc-surface:#FCFDFF;
  --enc-bord:#DCE3F5;
  --enc-lueur:rgba(1,72,250,.08);
  --enc-lueur-2:rgba(1,72,250,.18);
}
html[data-theme="sombre"]{
  --enc-surface:var(--surface);
  --enc-bord:var(--ligne);
  --enc-lueur:rgba(61,100,224,.13);
  --enc-lueur-2:rgba(61,100,224,.26);
}
@media (prefers-color-scheme:dark){
  html[data-theme="auto"]{
    --enc-surface:var(--surface);
    --enc-bord:var(--ligne);
    --enc-lueur:rgba(61,100,224,.13);
    --enc-lueur-2:rgba(61,100,224,.26);
  }
}

/* LA COQUE : un SVG, un seul trait continu — dessiné par encoche.js */
.enc-coque{position:absolute;top:0;pointer-events:none;overflow:visible;z-index:0}
.enc-coque-fond{fill:var(--enc-surface);transition:fill .35s}
.enc-coque-trait{fill:none;stroke:var(--enc-bord);stroke-width:1;transition:stroke .35s}
/* LA VIE INTÉRIEURE — clipée dans la coque */
.enc-vie{position:absolute;top:0;clip-path:url(#enc-coupe);pointer-events:none;z-index:0}
.enc-nappe{position:absolute;left:-30%;top:-40%;width:80%;height:200%;
  background:radial-gradient(45% 55% at 50% 60%, var(--enc-lueur) 0%, transparent 70%);
  animation:encDerive 11s ease-in-out infinite alternate}
@keyframes encDerive{from{transform:translateX(0)}to{transform:translateX(90%)}}
.enc-souffle{position:absolute;inset:0;opacity:0;transition:opacity .6s ease;
  background:radial-gradient(70% 120% at 50% 130%, var(--enc-lueur-2) 0%, transparent 60%)}
.enc-eclair{position:absolute;top:0;bottom:0;left:-45%;width:38%;
  transform:skewX(-16deg);opacity:0;
  background:linear-gradient(90deg, transparent, var(--enc-lueur-2) 50%, transparent)}
/* écoute : le souffle monte et bat — réponse : un éclair de verre traverse */
.encoche[data-lueur="ecoute"] .enc-souffle{opacity:1;
  animation:encBattre 2.2s ease-in-out infinite}
@keyframes encBattre{0%,100%{opacity:.55}50%{opacity:1}}
.encoche[data-lueur="reponse"] .enc-eclair{
  animation:encTraverser 1.15s cubic-bezier(.4,0,.2,1) infinite}
@keyframes encTraverser{0%{left:-45%;opacity:0}12%{opacity:1}55%{opacity:1}
  100%{left:112%;opacity:0}}
/* le « voile d'AUBE » (.enc-zone::before : radial-gradient de --enc-lueur, 900×340 px fixé
   sous l'encoche, opacité .55, l. 66-69 d'origine) est RETIRÉ partout — lot BV2, 2026-09-02 :
   c'était le halo sombre/bleuté mesuré sous l'encoche du Bureau. Décoratif, sans fonction. */
html[data-calme] .enc-nappe,html[data-calme] .enc-souffle,
html[data-calme] .enc-eclair{animation:none!important}
@media (prefers-reduced-motion:reduce){
  .enc-nappe,.enc-souffle,.enc-eclair{animation:none!important}}

/* (l'ancien halo L4.5 est REMPLACÉ par la coque signature L4.6) */


/* Le rayon des CONGÉS est un registre animable : il suit la hauteur de la
   barre à chaque état (10.8 précisé, L1.4) — petites courbes sur la
   languette (7), moyennes sur la pastille (16), pleines sur l'étagère (22).
   Jamais des ailerons de pleine taille sur une barre fine. */
@property --enc-cg{syntax:'<length>';inherits:true;initial-value:16px}

/* ================= la barre, SOUDÉE au bord haut ================= */
.encoche{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:60;
  max-width:calc(100vw - 2*var(--enc-r) - 12px);
  --enc-cg:16px;transition:--enc-cg .25s cubic-bezier(.2,.7,.2,1)}
.encoche:is([data-ouverte],:not([data-fermee]):focus-within){--enc-cg:22px}
@media (hover:hover) and (min-width:901px){
  .encoche:not([data-fermee]):not([data-repli]):hover{--enc-cg:22px}}
/* 4 px, pas 7 : le rayon BAS de la barre s'écrête à sa hauteur — un congé
   aussi haut que la languette n'aurait plus de flanc droit où se souder
   (jour mesuré au pixel, rangées basses du flanc, banc L1.4) */
.encoche[data-repli]{--enc-cg:4px}
html[data-calme] .encoche{transition:none}
@media (prefers-reduced-motion:reduce){.encoche{transition:none}}
.enc-barre{position:relative;display:flex;align-items:center;gap:2px;
  height:var(--enc-h);padding:env(safe-area-inset-top) 10px 0 10px;
  background:transparent;color:var(--texte);
  /* L4.6 : fond, trait et congés vivent dans LA COQUE SVG (un seul trait
     continu) — la barre garde sa BOÎTE et son rayon (géométrie du banc) */
  border-radius:0 0 var(--enc-r) var(--enc-r);
  transition:height .25s cubic-bezier(.2,.7,.2,1),border-radius .25s cubic-bezier(.2,.7,.2,1)}
/* Le Bureau réserve dès la première peinture la largeur unique de sa scène
   menu/contexte. Elle reste compacte et ne varie plus au gré du contenu. */
body[data-etape] .encoche .enc-barre{
  box-sizing:border-box;
  width:min(468px,calc(100vw - 48px));
  transition:width .56s cubic-bezier(.22,.72,.18,1),
    height .25s cubic-bezier(.2,.7,.2,1),
    border-radius .25s cubic-bezier(.2,.7,.2,1)}
/* Bureau — matière seule : la coque garde strictement sa géométrie, mais
   devient un verre bleu-noir plus dense que le Dock. Le fond vit dans la
   couche déjà clipée par le chemin SVG : le wallpaper traverse légèrement
   sans déborder dans les congés. */
body[data-etape] #encoche{
  max-width:calc(100vw - 24px);
  --enc-surface:rgba(8,15,27,.12);
  --enc-bord:rgba(235,244,255,.24);
  --enc-verre:color-mix(in srgb,var(--surface) 66%,transparent);
  --enc-ombre:rgba(0,0,0,.3)}
body[data-etape] #encoche .enc-vie{
  z-index:-1;background:var(--enc-verre);
  -webkit-backdrop-filter:blur(12px) saturate(1.1);
  backdrop-filter:blur(12px) saturate(1.1)}
body[data-etape] #encoche .enc-coque{
  filter:drop-shadow(0 6px 12px var(--enc-ombre))}
html[data-theme="sombre"] body[data-etape] #encoche{
  --enc-surface:color-mix(in srgb,var(--surface) 14%,transparent);
  --enc-bord:color-mix(in srgb,var(--texte) 20%,transparent);
  --enc-verre:rgba(5,11,20,.72);
  --enc-ombre:rgba(0,4,10,.38)}
@media (prefers-color-scheme:dark){
  html[data-theme="auto"] body[data-etape] #encoche{
    --enc-surface:color-mix(in srgb,var(--surface) 14%,transparent);
    --enc-bord:color-mix(in srgb,var(--texte) 20%,transparent);
    --enc-verre:rgba(5,11,20,.72);
    --enc-ombre:rgba(0,4,10,.38)}}
/* les CONGÉS INVERSÉS : la barre FOND dans le bord haut, elle ne flotte pas.
   Quart de cercle transparent dans un carré peint — la courbe concave relie
   le flanc au bord de la fenêtre (10.2, supaste.com). UNE SEULE FORME
   CONTINUE (10.8 précisé) : chaque congé RECOUVRE le corps d'1 px — noir sur
   noir, invisible — parce que la barre vit en demi-pixels (translateX -50%)
   et qu'un congé arrêté PILE au flanc laissait une couture antialiasée :
   le « jour » vu par Jérôme à la recette L1.3. */
.enc-conge{position:absolute;top:0;width:calc(var(--enc-cg) + 1px);
  height:var(--enc-cg);pointer-events:none}
.enc-conge-g{left:calc(-1*var(--enc-cg))}
.enc-conge-d{right:calc(-1*var(--enc-cg))}
/* L4.6 : les congés ne PEIGNENT plus (la coque les dessine) — leurs boîtes
   restent : le banc y mesure la soudure au pixel */

/* ---- la couche menu partage toute la scène avec le contexte. Son groupe
   interne occupe 72 % de la largeur utile : centré, régulier, sans réserver
   une ancienne colonne fantôme à droite. ---- */
.enc-menu{display:flex;align-items:center;justify-content:center;
  align-self:stretch;flex:1 1 auto;min-width:0;width:100%}
.enc-menu-groupe{display:flex;align-items:center;justify-content:center;
  width:100%;max-width:428px;min-width:0;gap:8px;
  transition:max-width .56s cubic-bezier(.22,.72,.18,1)}
/* ---- les 8 onglets — l'étagère ne contient QU'eux (10.3) ---- */
.enc-onglets{display:flex;align-items:center;justify-content:space-between;
  flex:1 1 auto;gap:2px;min-width:0;
  transition:opacity .2s}
.enc-onglets a{flex:0 0 auto;display:inline-flex;align-items:center;gap:0;
  min-height:44px;min-width:44px;justify-content:center;padding:0 8px;
  position:relative;cursor:pointer;
  border-radius:999px;color:var(--texte);font-size:calc(13.5px*var(--ech));
  font-weight:700;white-space:nowrap;text-decoration:none;
  -webkit-tap-highlight-color:transparent}
.enc-onglets a .ic{display:inline-flex;line-height:0}
.enc-onglets a .ic svg{width:calc(17px*var(--ech));height:calc(17px*var(--ech))}
.enc-onglets a .lib{max-width:0;opacity:0;overflow:hidden;
  transition:max-width .3s cubic-bezier(.2,.7,.2,1),opacity .22s,margin .3s;
  margin-left:0}
.enc-onglets a:hover,.enc-onglets a:focus-visible{background:color-mix(in srgb,var(--texte) 9%,transparent)}
.enc-onglets a:focus-visible,.enc-micro:focus-visible{
  outline:2px solid var(--action);outline-offset:2px}
.enc-onglets a.sec{color:var(--texte-2)}
.enc-onglets a[aria-current="page"]{color:var(--action)}

/* Bureau : les libellés ne réutilisent jamais l'ancienne .lib. L'encoche
   entière pilote leur révélation : survol du conteneur ou focus conservé
   dedans = les huit titres ensemble. aria-label porte le nom accessible ;
   ce span reste visuel afin de ne pas annoncer deux fois le même lien. */
body[data-etape] #encoche .enc-onglets a{overflow:hidden;
  transition:background-color .18s ease,gap .46s cubic-bezier(.22,.72,.18,1)}
body[data-etape] #encoche .enc-lib-reveal{
  display:inline-block;max-width:0;overflow:hidden;visibility:hidden;
  opacity:0;transform:translateX(-3px);white-space:nowrap;
  font-size:calc(12px*var(--ech));line-height:1;
  transition:max-width .48s cubic-bezier(.22,.72,.18,1),
    opacity .28s ease,transform .36s ease,visibility 0s linear .48s}
body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
  .enc-onglets a{gap:6px}
body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
  .enc-lib-reveal{
  max-width:96px;visibility:visible;opacity:1;transform:translateX(0);
  transition:max-width .48s cubic-bezier(.22,.72,.18,1),
    opacity .36s ease .1s,transform .38s ease .08s,visibility 0s linear 0s}
body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
  .enc-barre{width:min(856px,calc(100vw - 24px))}
body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
  .enc-menu-groupe{max-width:816px}
@media (max-width:900px){
  body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
    .enc-onglets a{padding-inline:3px;gap:3px}
  body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
    .enc-onglets a .ic svg{
    width:calc(15px*var(--ech));height:calc(15px*var(--ech))}
  body[data-etape] #encoche .enc-lib-reveal{font-size:calc(9.5px*var(--ech))}
  body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
    .enc-barre{width:min(676px,calc(100vw - 144px))}
  body[data-etape] #encoche[data-contexte-etat="menu-visible"]:is(:hover,:focus-within)
    .enc-menu-groupe{max-width:636px}
}

/* ================= l'ÉTAGÈRE : les trois ouvreurs ================= */
.encoche:is([data-ouverte],:not([data-fermee]):focus-within) .enc-onglets a .lib{
  max-width:9em;opacity:1;margin-left:8px}
@media (hover:hover) and (min-width:901px){
  /* sans activité : survoler l'encoche = étagère. PENDANT une activité, le
     geste-étagère est le survol des ONGLETS (l'intention de naviguer) —
     sinon approcher un bouton de suggestion masquerait la suggestion. */
  .encoche:not([data-fermee]):not([data-repli]):not([data-activite]):hover .enc-onglets a .lib{
    max-width:9em;opacity:1;margin-left:8px}
  .encoche[data-activite]:not([data-fermee]):not([data-repli]) .enc-onglets:hover a .lib{
    max-width:9em;opacity:1;margin-left:8px}
}
html[data-calme] .enc-onglets a .lib,
html[data-calme] body[data-etape] #encoche .enc-lib-reveal,
html[data-calme] body[data-etape] #encoche .enc-menu-groupe{transition:none}
@media (prefers-reduced-motion:reduce){
  .enc-onglets a .lib,
  body[data-etape] #encoche .enc-lib-reveal,
  body[data-etape] #encoche .enc-menu-groupe{transition:none}}

/* ---- ≤900 : l'étagère ouverte défile DANS la barre (motif du dock) ---- */
@media (max-width:900px){
  .enc-barre{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}
  .enc-barre::-webkit-scrollbar{display:none}
}

/* Le Bureau tient à 820 px sans défilement interne : les tooltips peuvent
   donc sortir sous la coque. Sous 520 px, le scroll historique reprend. */
@media (min-width:521px){body[data-etape] #encoche .enc-barre{overflow:visible}}
body[data-etape] #encoche :is(.enc-onglets a,.enc-micro)[data-tooltip]{position:relative}
body[data-etape] #encoche :is(.enc-onglets a,.enc-micro)[data-tooltip]::after{
  content:attr(data-tooltip);position:absolute;z-index:72;left:50%;top:calc(100% + 8px);
  padding:6px 9px;border:1px solid rgba(255,255,255,.12);border-radius:8px;
  background:rgba(12,16,24,.94);color:rgba(255,255,255,.96);
  box-shadow:0 10px 28px rgba(0,0,0,.24);font-size:11px;font-weight:650;
  line-height:1.2;white-space:nowrap;pointer-events:none;opacity:0;
  transform:translate(-50%,-3px) scale(.98);
  transition:opacity .16s ease,transform .16s ease}
body[data-etape] #encoche :is(.enc-onglets a,.enc-micro)[data-tooltip]:is(:hover,:focus-visible)::after{
  opacity:1;transform:translate(-50%,0) scale(1)}
@media (max-width:520px){
  body[data-etape] #encoche :is(.enc-onglets a,.enc-micro)[data-tooltip]::after{display:none}}

/* ================= la LANGUETTE (10.8) : rétractée, JAMAIS disparue =================
   L1.4 : encore plus fine — 7 px, congés (4) ET coins bas (4) au diapason. */
.encoche[data-repli] .enc-barre{height:calc(7px + env(safe-area-inset-top));
  border-radius:0 0 4px 4px}
.encoche[data-repli] .enc-onglets{opacity:0;pointer-events:none}
html[data-calme] .enc-barre{transition:none}
@media (prefers-reduced-motion:reduce){.enc-barre,.enc-onglets{transition:none}}

/* ================= UTILITAIRES HORS ENCOCHE (10.3bis) =================
   Posés sur le blanc, sans barre, aux JETONS du thème — .btn-h vient de
   shell.css (jamais cachés ici : la règle .entete .btn-h ≤900 ne les
   concerne pas). À ≥901 ils CÈDENT pendant l'étagère ouverte : mesuré à
   1440, l'étagère déployée (~820 px) et le bloc (~460 px) se chevauchent. */
/* z-61 et non 58 (lot 2e-b, 31/08) — CORRECTION D'UN ÉCART AU CONTRAT.
   Le contrat d'empilement du header veut ces outils AU-DESSUS de l'encoche
   (contenu ≤48 · rail et radio ≤58 · verre 59 · encoche 60 · outils 61).
   Ils étaient à 58, donc SOUS l'encoche (60) : dès qu'un résumé s'y posait,
   la barre recouvrait « Aa » — mesuré au lot 2e-a, bouton non cliquable sur
   les quatre pages, et invisible au Bureau à 1288. Ce ne sont pas des
   éléments décoratifs : ce sont des commandes, elles doivent rester
   atteignables. */
.enc-outils{position:fixed;top:8px;right:max(10px,env(safe-area-inset-right));
  z-index:61;display:flex;align-items:center;gap:4px;
  /* CESSION (lot 2e-b) — même contrat que le rail, du côté droit : les
     outils tiennent hors de l'empreinte de l'encoche + 12 px de jour. Ils
     ne se RÉTRACTENT pas — ce sont des commandes — mais le LIBELLÉ du
     thème peut s'effacer sous contrainte, laissant son icône : c'est la
     seule variable d'ajustement à droite. */
  max-width:calc(50vw - var(--enc-w, 326px) / 2 - 22px);
  transition:opacity .2s}
/* COMPACTION (lot 2e-b) — `radio-globale.js` pose `data-enc-serre` sur
   `body` quand le groupe droit ne tient plus entre la coque et le bord.
   Palier 1 : le libellé du thème s'efface, son icône reste.
   Palier 2 : « Se connecter » se réduit à son icône « personne ».
   Le nom accessible est conservé dans les deux cas (`aria-label`), et la
   cible garde ses 44 px par `.btn-h`. « + Projet », la cloche et « Aa » ne
   cèdent JAMAIS : action, alerte et accessibilité ne se négocient pas. */
body[data-enc-serre] .enc-outils #t-theme{display:none}
body[data-enc-serre="2"] .enc-outils .enc-connexion .lib{display:none}
.enc-outils .enc-connexion .enc-ic-perso{display:none}
body[data-enc-serre="2"] .enc-outils .enc-connexion .enc-ic-perso{display:block}
body[data-enc-serre="2"] .enc-outils .enc-connexion{min-width:44px; justify-content:center}
/* PLAFOND DU RÉSUMÉ (lot 2e-b, E6) — CALCULÉ, pas choisi.
   À 1280 px, avec le groupe droit au palier 2 :
     1280  viewport
     −  10  marge gauche
     − 337,1 rail minimal (commandes + titre à 8 caractères, mesuré)
     −  12  jour gauche
     −  12  jour droit
     − 272,1 groupe droit au palier 2 (mesuré)
     −  10  marge droite
     = 626,8 px de COQUE maximale.
   Le résumé ajoute `largeur + 2 px de gap` à la coque de repos (326 px sur
   la Fiche, la plus large des pages qui affichent un résumé) :
     626,8 − 326 − 2 = 298,8  →  plafond retenu : 298 px.
   Au-delà, le nom s'ellipse : mieux vaut un nom coupé qu'un voisin écrasé. */
.enc-projet{max-width:298px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
/* SOUS 1100 px, le résumé complet ne tient plus : à cette largeur le calcul
   ci-dessus ne laisse que 118,8 px, moins que le plus court résumé réel
   (« Projet Paris · 1 bien », ~154 px mesurés à 7,3 px/caractère). On le
   réduit à sa pastille et au début du compte. */
@media (max-width:1100px){ .enc-projet{max-width:46px} }
.enc-outils > *{flex:0 0 auto}
.enc-outils #b-theme{flex:0 1 auto; min-width:44px; overflow:hidden}
.enc-outils #t-theme{min-width:0; overflow:hidden; text-overflow:clip}
/* L4.3 — « Créer mon projet » (décision 15e) : texte var(--action), SANS
   fond ; la zone cliquable de .btn-h (min 44 px, padding) est conservée. */
.enc-cta{background:transparent;color:var(--action);font-weight:800}
.enc-cta:hover{background:transparent;color:var(--action-2)}
.enc-cta:focus-visible{outline:2px solid var(--action);outline-offset:2px}
.enc-outils .enc-cloche svg{display:block}
@media (max-width:900px){
  .enc-outils{top:calc(var(--enc-h) + 8px)}
  .enc-outils .btn-h{min-height:40px}
  /* P0 RESPONSIVE (2026-08-28) — sous 900 px ces outils DESCENDENT sous
     l'encoche (ligne ci-dessus) ; or ils sont `fixed` en z-index 61
     (58 avant le lot 2e-b ; le commentaire annonçait 90, ce que la mesure
     du 2e-a a démenti — corrigé ici pour ne plus égarer la lecture),
     au-dessus de l'Espace DOMINI (`.pd`, z-85) qui commence à 48 px :
     « Se connecter » / « + Projet » / Aa / thème se superposaient
     alors à l'en-tête de DOMINI (« Votre projet immobilier » illisible,
     mesuré à 375 et 768). Quand DOMINI est OUVERT, ces commandes de la
     Home publique n'ont pas de rôle : l'Espace porte son propre
     en-tête et son ×, qui ramène à la Home où elles réapparaissent.
     Desktop (≥901) strictement inchangé : elles y vivent dans la bande
     d'en-tête, au-dessus de l'Espace, sans recouvrement. */
  body[data-panneau="espace"] .enc-outils{display:none}
}
@media (min-width:901px) and (max-width:1100px){
  /* bureau.css aligne ces outils sur l'horloge en état espace ; à ce palier,
     l'absence de place autour de l'encoche prime sur cet alignement. */
  body[data-etape] .enc-outils{top:calc(var(--enc-h) + 8px)!important}
}
@media (min-width:901px){
  .enc-zone:has(.encoche[data-ouverte]) .enc-outils,
  .enc-zone:has(.encoche:not([data-fermee]):focus-within) .enc-outils{
    opacity:0;pointer-events:none}
}
@media (hover:hover) and (min-width:901px){
  .enc-zone:has(.encoche:not([data-fermee]):not([data-repli]):hover) .enc-outils{
    opacity:0;pointer-events:none}
}
html[data-calme] .enc-outils{transition:none}
@media (prefers-reduced-motion:reduce){.enc-outils{transition:none}}

/* ================= LES PANNEAUX PAR ONGLET (10.4, ≥901) ================= */
.enc-panneau{position:fixed;top:calc(var(--enc-h) + 10px);left:0;right:0;margin:0 auto;
  width:min(980px,calc(100vw - 48px));max-height:calc(100vh - var(--enc-h) - 34px);
  overflow:auto;background:var(--fond);border:1px solid var(--ligne);border-radius:24px;
  box-shadow:0 30px 80px rgba(10,15,35,.2);z-index:59;padding:22px}
.enc-panneau[hidden]{display:none}
@media (prefers-reduced-motion:no-preference){
  .enc-panneau{animation:encPanneau .3s cubic-bezier(.2,.9,.25,1) backwards}}
@keyframes encPanneau{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
html[data-calme] .enc-panneau{animation:none}
.enc-pn-grille{display:grid;grid-template-columns:1.5fr .8fr;gap:24px;align-items:start}
.enc-pn-liste{display:flex;flex-direction:column;gap:6px;min-width:0}
.enc-pn-item{display:grid;grid-template-columns:44px 1fr;gap:4px 12px;align-items:center;
  padding:12px;border-radius:16px;text-decoration:none;color:var(--texte)}
.enc-pn-item:hover,.enc-pn-item:focus-visible{background:var(--survol)}
.enc-pn-ic{grid-row:1/3;width:44px;height:44px;border-radius:14px;
  background:var(--t,var(--survol));color:var(--tt,var(--texte));
  display:flex;align-items:center;justify-content:center}
.enc-pn-ic svg{width:20px;height:20px}
.enc-pn-item b{font-size:calc(15px*var(--ech));font-weight:800;letter-spacing:-.01em}
.enc-pn-item p{margin:0;font-size:calc(12.5px*var(--ech));color:var(--texte-2);
  font-weight:600;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden}
.enc-pn-bas{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;
  margin-top:14px;padding-top:14px;border-top:1px solid var(--ligne);
  font-size:calc(12.5px*var(--ech));color:var(--texte-2);font-weight:600}
.enc-pn-bas a{color:var(--action);font-weight:800;text-decoration:none}
.enc-pn-bas a:hover{text-decoration:underline}
.enc-pn-bas .enc-pn-loin{margin-left:auto}

/* ================= SPEC L2 : L'ENCOCHE INTELLIGENTE =================
   L2a micro (pastille + étagère, JAMAIS en languette — forme 10.8
   intouchable) · L2b écho aria-live · L2c projet (vide jusqu'à L3) ·
   L2d suggestions (causes réelles seules) · L2e badge + panneau cloche.
   La MAIN gagne : l'étagère ouverte masque l'activité, qui revient. */
.enc-micro{flex:0 0 auto;width:44px;min-height:44px;display:inline-flex;
  align-items:center;justify-content:center;border:0;background:transparent;
  color:var(--texte);cursor:pointer;border-radius:999px;
  -webkit-tap-highlight-color:transparent}
.enc-micro:hover{background:color-mix(in srgb,var(--texte) 8%,transparent)}
.enc-micro[data-ecoute]{color:#7EA1FF}
.encoche[data-repli] .enc-micro{opacity:0;pointer-events:none}

.enc-activite{display:flex;align-items:center;gap:8px;min-height:44px;
  padding:0 10px;max-width:46vw;color:var(--texte);
  font-size:calc(13px*var(--ech));font-weight:700;white-space:nowrap;cursor:pointer}
.enc-activite[hidden]{display:none}
.enc-act-texte,.enc-echo{overflow:hidden;text-overflow:ellipsis;max-width:34vw}
.enc-act-texte:empty,.enc-echo:empty,.enc-chrono:empty{display:none}
.enc-chrono{color:#B9BEC9;font-variant-numeric:tabular-nums}
/* l'onde : peinte pendant l'écoute réelle seulement, jamais dans l'aria-live */
.enc-onde{display:none;align-items:center;gap:2px;height:16px}
.enc-activite[data-etat="ecoute"] .enc-onde{display:inline-flex}
.enc-onde i{width:3px;height:6px;border-radius:2px;background:#7EA1FF}
@media (prefers-reduced-motion:no-preference){
  .enc-onde i{animation:encOnde 1s ease-in-out infinite}
  .enc-onde i:nth-child(2){animation-delay:.15s}
  .enc-onde i:nth-child(3){animation-delay:.3s}
  .enc-onde i:nth-child(4){animation-delay:.45s}}
@keyframes encOnde{0%,100%{height:5px}50%{height:15px}}
html[data-calme] .enc-onde i{animation:none}
.enc-act-actions{display:inline-flex;gap:6px}
.enc-act-actions:empty{display:none}
.enc-act-actions button{min-height:34px;border:1px solid var(--enc-bord);
  background:transparent;color:var(--texte);font-weight:800;
  font-size:calc(12px*var(--ech));border-radius:999px;padding:0 11px;cursor:pointer}
.enc-act-actions button:hover{background:color-mix(in srgb,var(--texte) 9%,transparent)}
/* pendant l'activité : onglets ESTOMPÉS, cliquables (arbitrage Jérôme 2) */
.encoche[data-activite] .enc-onglets{opacity:.35}
.encoche[data-activite] .enc-onglets a{pointer-events:auto}
/* la MAIN gagne TOUJOURS : l'étagère (tap, focus, survol des onglets) efface
   l'activité, qui revient à la fermeture ; la languette la clippe aussi.
   Une activité qui PORTE le focus (bouton de suggestion tabulé) reste
   visible : sans quoi le clavier ne pourrait jamais agir dessus. */
.encoche:is([data-ouverte],:not([data-fermee]):focus-within) .enc-activite:not(:focus-within){
  opacity:0;pointer-events:none}
@media (hover:hover) and (min-width:901px){
  .encoche[data-activite]:not([data-fermee]):not([data-repli]) .enc-menu:has(.enc-onglets:hover)~.enc-activite{
    opacity:0;pointer-events:none}}
.encoche[data-repli] .enc-activite{opacity:0;pointer-events:none}
/* ≤900 : l'activité est une PILULE SOUS l'encoche — dans la barre qui défile
   (overflow-x), ses boutons partaient hors de portée du pouce ET du banc
   (le clic « Écrire » tombait sur Aa, verrouillant le scroll — mesuré).
   L'overflow de la barre s'ouvre pendant l'activité pour la laisser sortir. */
@media (max-width:900px){
  .encoche[data-activite] .enc-barre{overflow:visible}
  .enc-activite{position:absolute;top:calc(100% + 6px);left:50%;
    transform:translateX(-50%);background:var(--enc-surface);border:1px solid var(--enc-bord);-webkit-backdrop-filter:blur(14px) saturate(1.15);backdrop-filter:blur(14px) saturate(1.15);border-radius:14px;
    padding:0 12px;box-shadow:0 10px 30px rgba(10,15,35,.25);
    max-width:calc(100vw - 24px)}
}

/* L2c : le résumé du Projet — rien de peint tant qu'il est vide.
   L4.5 (verdict 4) : il est CLIQUABLE — le clic range la conversation. */
.enc-projet{color:var(--texte-2);font-size:calc(12.5px*var(--ech));font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  /* L4.6 : le résumé plafonne — la barre au contenu RECOUVRAIT les outils
     de droite à 1440 (« Sombre » coupé, mesuré aux captures) */
  max-width:min(20vw,280px);
  padding:0 8px;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
/* L4.6 — le POINT BLEU BATTANT devant le résumé (maquette signature) */
.enc-projet::before{content:'';flex:0 0 auto;width:6px;height:6px;
  border-radius:50%;background:var(--action);
  animation:encPouls 3.4s ease-in-out infinite}
@keyframes encPouls{0%,100%{opacity:.55}50%{opacity:1}}
html[data-calme] .enc-projet::before{animation:none}
@media (prefers-reduced-motion:reduce){.enc-projet::before{animation:none}}
.enc-projet:hover{color:var(--texte);text-decoration:underline;
  text-underline-offset:3px}
.enc-projet:focus-visible{outline:2px solid var(--action);outline-offset:2px;
  border-radius:6px}
.enc-projet[hidden],.enc-projet:empty{display:none}

/* ================= CONTEXTE TEMPORAIRE DU BUREAU (2026-08-12) =================
   Le contrôleur de encoche.js pose data-contexte-etat uniquement sur le
   Bureau. La coque ne change pas : sa largeur active est mesurée avant la
   bascule, puis menu et contexte occupent tour à tour ce même espace.
   Au retour du menu, son fade commence pendant les 100 dernières ms du
   fade contexte : aucun trou noir perceptible, sans double lecture. */
.encoche[data-contexte-etat] .enc-menu,
.encoche[data-contexte-etat] .enc-activite{
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .26s cubic-bezier(.4,0,.7,.2),visibility 0s linear .26s}
.encoche[data-contexte-etat="menu-visible"] .enc-menu,
.encoche[data-contexte-etat="menu-showing"] .enc-menu{
  opacity:1;visibility:visible;
  transition:opacity .26s cubic-bezier(.16,1,.3,1),visibility 0s linear 0s}
.encoche[data-contexte-etat="menu-visible"] .enc-menu{pointer-events:auto}
.encoche[data-contexte-etat] .enc-projet{
  position:absolute;left:14px;right:14px;top:env(safe-area-inset-top);
  height:calc(var(--enc-h) - env(safe-area-inset-top));max-width:none;
  justify-content:center;min-width:0;padding:0 18px;text-align:center;
  font-size:calc(14.5px*var(--ech));letter-spacing:-.01em;
  opacity:0;visibility:hidden;transform:translateY(3px);pointer-events:none;
  transition:opacity .26s cubic-bezier(.4,0,.7,.2),
    transform .26s cubic-bezier(.4,0,.7,.2),visibility 0s linear .26s}
.encoche[data-contexte-etat] .enc-projet-texte{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-etape] #encoche .enc-projet-texte{
  text-shadow:0 1px 2px rgba(0,0,0,.34)}
.encoche[data-contexte-etat="context-showing"] .enc-projet,
.encoche[data-contexte-etat="context-visible"] .enc-projet{
  opacity:1;visibility:visible;transform:translateY(0);
  transition:opacity .26s cubic-bezier(.16,1,.3,1),
    transform .26s cubic-bezier(.16,1,.3,1),visibility 0s linear 0s}
.encoche[data-contexte-etat] .enc-projet:hover{text-decoration:none}
/* Le générateur retire l'ancienne .lib du DOM Bureau : seule la révélation
   item par item ci-dessus subsiste. Cette garde interdit aussi à l'ancienne
   couche d'activité de devenir un troisième contenu. */
body[data-etape] #encoche .enc-activite{display:none!important}
.encoche[data-repli][data-contexte-etat] .enc-menu,
.encoche[data-repli][data-contexte-etat] .enc-projet{
  opacity:0;visibility:hidden;pointer-events:none}
@media (max-width:900px){
  .encoche[data-contexte-etat] .enc-projet{left:8px;right:8px;padding:0 10px;
    font-size:calc(12.5px*var(--ech))}
}
html[data-calme] .encoche[data-contexte-etat] .enc-menu,
html[data-calme] .encoche[data-contexte-etat] .enc-activite,
html[data-calme] .encoche[data-contexte-etat] .enc-projet{transition:none}
@media (prefers-reduced-motion:reduce){
  .encoche[data-contexte-etat] .enc-menu,
  .encoche[data-contexte-etat] .enc-activite,
  .encoche[data-contexte-etat] .enc-projet{transition:none}
}

/* L2e : badge de la cloche + panneau honnête */
.enc-cloche{position:relative}
.enc-badge{position:absolute;top:4px;right:4px;min-width:16px;height:16px;
  border-radius:999px;background:var(--action);color:#fff;font-size:10px;
  font-weight:800;display:inline-flex;align-items:center;justify-content:center;
  padding:0 4px;line-height:1}
.enc-badge[hidden]{display:none}
.enc-notifs{position:fixed;top:60px;right:max(10px,env(safe-area-inset-right));
  z-index:61;width:min(320px,calc(100vw - 24px));background:var(--fond);
  border:1px solid var(--ligne);border-radius:16px;
  box-shadow:0 24px 60px rgba(10,15,35,.18);padding:12px}
.enc-notifs[hidden]{display:none}
.enc-notifs p{margin:0;color:var(--texte-2);font-size:calc(13px*var(--ech));
  font-weight:600}
.enc-notifs a{display:block;padding:10px;border-radius:10px;color:var(--texte);
  font-size:calc(13px*var(--ech));font-weight:700;text-decoration:none}
.enc-notifs a:hover{background:var(--survol)}
@media (max-width:900px){.enc-notifs{top:calc(var(--enc-h) + 56px)}}

/* réserve vidéos (10.4) : DANS chaque panneau. data-maquette, régime des chips. */
.enc-video{display:flex;flex-direction:column;gap:10px;border:1px dashed var(--ligne);
  border-radius:20px;padding:14px;min-height:200px;align-self:stretch}
.enc-video-lab{font-size:calc(12px*var(--ech));font-weight:800;letter-spacing:.14em;
  text-transform:uppercase;color:var(--texte-3);margin:0}
.enc-video-res{flex:1 1 auto;border-radius:14px;background:var(--surface)}
.enc-video-note{font-size:calc(12px*var(--ech));color:var(--texte-3);font-weight:600;margin:0}
