/* Cadre commun du cockpit — référence validée du 1er octobre.
   Les composants métier gardent leurs états et leurs dimensions fonctionnelles. */
body[data-theme="hud"] {
  --hud-r:12px; --hud-shadow:none; --hud-shadow-h:0 0 0 1px var(--hud-line-h);
  --text:var(--hud-ink); --muted:var(--hud-muted); --bg:var(--hud-bg);
  --panel:var(--hud-panel); --accent:var(--hud-corail); --accent-soft:var(--hud-row-h);
  font-family:"Public Sans",sans-serif; font-size:14px; line-height:1.5;
}
body[data-theme="hud"]:is([data-hud="ardoise"],[data-hud="encre"]) {
  color-scheme:dark; --hud-bg:#15181C; --hud-panel:#1D2126; --hud-side:#1D2126;
  --hud-side-opaque:#1D2126; --hud-row:#20262C; --hud-row-h:#2A3138;
  --hud-ink:#FAF7F2; --hud-muted:#B3BBC5; --hud-side-muted:#B3BBC5;
  --hud-line:#353C44; --hud-line-h:#58626E; --hud-corail-d:#FF795F;
}
body[data-theme="hud"]:is([data-hud="jour"],[data-hud="lin"],[data-hud="sable"]) {
  color-scheme:light; --hud-panel:#fff; --hud-side:#FAF7F2;
}
body[data-theme="hud"] #app::before,body[data-theme="hud"] #app::after {display:none}
body[data-theme="hud"] #app {padding:0;gap:0;background:var(--hud-bg)}
body[data-theme="hud"] #side {
  width:216px;border:0;border-right:1px solid var(--hud-line);border-radius:0;
  background:var(--hud-side);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
body[data-theme="hud"][data-rail="replie"] #side {width:74px}
body[data-theme="hud"] #side .logo {padding:18px 14px 12px;column-gap:10px}
body[data-theme="hud"] #side .logo-nom {font-size:19px}
body[data-theme="hud"] #side nav {padding:8px 10px 20px;mask-image:none;-webkit-mask-image:none;gap:2px}
body[data-theme="hud"] #side nav button {
  min-height:44px;padding:9px 12px;border:0;border-radius:8px;font-size:13px;line-height:1.4;
  box-shadow:none;gap:10px;background:transparent;color:var(--hud-ink);text-align:left;
}
body[data-theme="hud"] #side nav button:hover {background:var(--hud-row-h);transform:none}
body[data-theme="hud"] #side nav button.active {background:var(--hud-row-h);box-shadow:inset 2px 0 var(--hud-corail)}
body[data-theme="hud"] #side nav button:disabled {opacity:.45;cursor:not-allowed}
body[data-theme="hud"] #side nav .nav-sec {padding:16px 12px 5px;margin:0;font-size:10px;letter-spacing:.08em;color:var(--hud-muted)}
body[data-theme="hud"] #side nav .navigation-reglages {margin-top:12px;border-top:1px solid var(--hud-line)}
body[data-theme="hud"] #side nav .navigation-sous {padding-left:32px;font-size:12px;color:var(--hud-muted)}
body[data-theme="hud"] #side .foot {border-top:1px solid var(--hud-line);background:transparent;padding:12px}
body[data-theme="hud"] #main {min-width:0;padding:0 32px 32px}
body[data-theme="hud"] #hudTop {
  min-height:58px;margin:0 -32px 24px;padding:8px 24px;gap:12px;
  background:var(--hud-bg);border-bottom:1px solid var(--hud-line);border-radius:0;
  box-shadow:none;align-items:center;flex-wrap:wrap;
}
body[data-theme="hud"] #hudTop .hud-search {flex:0 1 240px;min-width:130px;border-radius:8px;min-height:40px;background:var(--hud-panel)}
body[data-theme="hud"] #hudTop .hud-top-droite {margin-left:auto;gap:8px;flex-wrap:wrap}
body[data-theme="hud"] #hudTop .hud-icb {min-height:40px;min-width:40px;border-radius:8px;background:var(--hud-panel);box-shadow:none}
body[data-theme="hud"] #hudTop #hudEtincelle {order:-1;border-color:var(--hud-lagon)}
body[data-theme="hud"] #hudTop #hudProfil {order:5}
body[data-theme="hud"] #main > header,body[data-theme="hud"] #view {width:100%;max-width:1100px;margin-left:auto;margin-right:auto;min-width:0}
body[data-theme="hud"] #main > header {margin-bottom:20px}
body[data-theme="hud"] #main > header h1 {font:600 clamp(22px,2.2vw,30px)/1.2 "Space Grotesk",sans-serif;letter-spacing:-.025em}
body[data-theme="hud"] :is(h1,h2,h3) {font-family:"Space Grotesk",sans-serif}
body[data-theme="hud"] .card {
  padding:20px;border:1px solid var(--hud-line);border-radius:12px;background:var(--hud-panel);
  box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;transition:border-color .15s;
}
body[data-theme="hud"] .card:hover {transform:none;box-shadow:none}
body[data-theme="hud"] .card h3 {font-size:15px;letter-spacing:0;text-transform:none;color:var(--hud-ink)}
body[data-theme="hud"] .card .card {padding:16px;background:var(--hud-row)}
body[data-theme="hud"] .btn {border-radius:8px;min-height:40px;padding:9px 16px;box-shadow:none;font-size:13px}
body[data-theme="hud"] .btn:not(.ghost):not(.lien) {background:var(--hud-corail);color:#15181C}
body[data-theme="hud"] .btn.ghost {background:var(--hud-row);color:var(--hud-ink);border:1px solid var(--hud-line)}
body[data-theme="hud"] :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {border-radius:8px;max-width:100%;font-size:14px;line-height:1.5;color:var(--hud-ink);background:var(--hud-row);border-color:var(--hud-line)}
body[data-theme="hud"] :is(input:not([type=checkbox]):not([type=radio]),select) {min-height:42px}
body[data-theme="hud"] :is(button,a,input,select,textarea,summary):focus-visible {outline:2px solid var(--hud-lagon);outline-offset:3px}
body[data-theme="hud"] :is(.navigation-espace,.hud-pli,.navigation-agenda,.tabbar,.table-wrap) {border-radius:12px;box-shadow:none}
body[data-theme="hud"] .navigation-espace {padding:24px;border:1px solid var(--hud-line);background:var(--hud-panel)}
body[data-theme="hud"] .navigation-espace h2 {font-size:22px;margin:0 0 8px}
body[data-theme="hud"] .navigation-liste > button {min-height:48px;color:var(--hud-ink)}
body[data-theme="hud"] table {font-size:13px;border-radius:10px}
body[data-theme="hud"] :is(td,th) {padding:12px}
body[data-theme="hud"] .hud-hero {padding:24px 0;text-align:center}
body[data-theme="hud"] .hud-hero h1 {font-size:clamp(25px,3vw,38px);line-height:1.2}
body[data-theme="hud"] .hud-hero p {max-width:65ch;margin-left:auto;margin-right:auto}
body[data-theme="hud"] .hud-hero .hud-date {font-size:12px}
body[data-theme="hud"] .hud-tile {border-radius:12px;box-shadow:none;background:var(--hud-panel)}
body[data-theme="hud"] .hud-tile:hover {transform:none;box-shadow:none;border-color:var(--hud-line-h)}
body[data-theme="hud"] #profilActif {border:0;border-bottom:1px solid var(--hud-line);border-radius:0;background:var(--hud-panel);margin-bottom:0}
body[data-theme="hud"] .contexte-structure {min-width:0}
body[data-theme="hud"] .contexte-contenu {min-width:0}
body[data-theme="hud"] #apercuContexteEspace {background:var(--hud-panel);border:1px solid var(--hud-line);border-radius:12px}
body[data-theme="hud"] #apercuContexteEspace > p:not(.contexte-etiquette):not(.contexte-regle) {max-width:72ch}
body[data-theme="hud"] dialog {max-width:min(900px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border-radius:12px}
@media (max-width:1024px) and (min-width:681px) {
  body[data-theme="hud"] #main {padding:0 20px 24px}
  body[data-theme="hud"] #hudTop {margin-left:-20px;margin-right:-20px;padding:8px 16px}
}
@media (max-width:680px) {
  body[data-theme="hud"]:not(.hud-natif) #app {gap:0}
  body[data-theme="hud"]:not(.hud-natif) #side {width:100%;border-radius:0;max-height:155px;border-bottom:1px solid var(--hud-line);border-right:0}
  body[data-theme="hud"]:not(.hud-natif) #side nav {padding:6px;gap:4px}
  body[data-theme="hud"]:not(.hud-natif) #side nav button {min-height:44px;margin:0;white-space:nowrap}
  body[data-theme="hud"]:not(.hud-natif) #side nav .nav-sec {display:none}
  body[data-theme="hud"]:not(.hud-natif) #main {padding:0 14px 24px}
  body[data-theme="hud"]:not(.hud-natif) #hudTop {margin:0 -14px 18px;padding:8px 10px;gap:8px}
  body[data-theme="hud"]:not(.hud-natif) #hudTop .hud-search {flex:1 1 100%;min-height:40px}
  body[data-theme="hud"]:not(.hud-natif) #hudTop .hud-top-droite {margin-left:0;width:100%;justify-content:space-between;gap:4px}
  body[data-theme="hud"]:not(.hud-natif) #hudTop .hud-icb {flex:1 1 calc(50% - 4px);min-width:0;font-size:12px}
  body[data-theme="hud"]:not(.hud-natif) .card {padding:16px}
  body[data-theme="hud"]:not(.hud-natif) .navigation-espace {padding:18px}
}
/* La fenêtre native conserve ses 11 px de marge et sa réglette de 96 px. */
body[data-theme="hud"].hud-natif #app {padding:11px;gap:14px}
body[data-theme="hud"].hud-natif #side {border-radius:12px;border:1px solid var(--hud-line)}
@media (prefers-reduced-motion:reduce) {body[data-theme="hud"] #side,body[data-theme="hud"] .card {transition:none}}
body[data-theme="hud"] #side nav > * {flex-shrink:0}
body[data-theme="hud"] #view > * {animation:none}
body[data-theme="hud"] #main > header h1 {border:0;padding-left:0;background:none;-webkit-text-fill-color:var(--hud-ink)}
