/* Manager netVD : même charte que netvd.ch (tokens, police, en-tête, cartes, boutons, logo).
   Source de référence : ~/netvd-site-prep/styles.css. Charger APRÈS le style propre à la page :
   les alias ci-dessous (--bg, --card, --accent…) remplacent les couleurs des pages. */
:root{
  --ground:#fbfbfd;--surface:#ffffff;--surface-2:#f5f5f7;
  --ink:#1d1d1f;--ink-soft:#3a3a3c;--muted:#6e6e73;--line:#e6e6ea;
  --accent:#0071e3;--accent-ink:#0058b6;--ok:#1d8a4e;
  --shadow:0 2px 6px rgba(0,0,0,.04), 0 14px 40px rgba(20,20,40,.07);
  --shadow-hover:0 4px 12px rgba(0,0,0,.06), 0 24px 60px rgba(20,20,40,.12);
  --radius:22px;--radius-sm:14px;--maxw:1200px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    --ground:#000000;--surface:#151517;--surface-2:#1c1c1f;
    --ink:#f5f5f7;--ink-soft:#d6d6d8;--muted:#98989d;--line:#2a2a2e;
    --accent:#2997ff;--accent-ink:#5aacff;--ok:#3ccf7e;
    --shadow:0 2px 6px rgba(0,0,0,.5), 0 18px 50px rgba(0,0,0,.55);
    --shadow-hover:0 4px 12px rgba(0,0,0,.6), 0 28px 70px rgba(0,0,0,.7);
  }
}
/* Le bouton clair / sombre doit l'emporter sur la media query */
:root[data-theme="light"]{
  --ground:#fbfbfd;--surface:#ffffff;--surface-2:#f5f5f7;--ink:#1d1d1f;--ink-soft:#3a3a3c;
  --muted:#6e6e73;--line:#e6e6ea;--accent:#0071e3;--accent-ink:#0058b6;--ok:#1d8a4e;
  --shadow:0 2px 6px rgba(0,0,0,.04), 0 14px 40px rgba(20,20,40,.07);
  --shadow-hover:0 4px 12px rgba(0,0,0,.06), 0 24px 60px rgba(20,20,40,.12);
}
:root[data-theme="dark"]{
  --ground:#000000;--surface:#151517;--surface-2:#1c1c1f;--ink:#f5f5f7;--ink-soft:#d6d6d8;
  --muted:#98989d;--line:#2a2a2e;--accent:#2997ff;--accent-ink:#5aacff;--ok:#3ccf7e;
  --shadow:0 2px 6px rgba(0,0,0,.5), 0 18px 50px rgba(0,0,0,.55);
  --shadow-hover:0 4px 12px rgba(0,0,0,.6), 0 28px 70px rgba(0,0,0,.7);
}
/* Alias pour les pages du manager (qui utilisent --bg, --card…) */
:root{
  --bg:var(--ground);--card:var(--surface);
  --accent-soft:color-mix(in srgb,var(--accent) 12%,transparent);
  --chip:var(--surface-2);
}

body{
  font-family:var(--font) !important;
  background:var(--ground) !important;color:var(--ink);
  letter-spacing:-.01em;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
::selection{background:var(--accent);color:#fff}
h1,h2{letter-spacing:-.02em}

/* Surface « carte » netVD (tuiles, chiffres, formulaires) */
.lg-glass{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);
}
/* Variante translucide floutée, comme l'en-tête de netvd.ch (barres collantes) */
.lg-frost{
  background:color-mix(in srgb,var(--ground) 82%,transparent);
  -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
}

/* ---------- En-tête (copie de header.nav de netvd.ch) ---------- */
.lg-nav{
  position:sticky;top:0;z-index:60;
  border-bottom:1px solid transparent;transition:border-color .3s;
}
.lg-nav.scrolled{border-bottom-color:var(--line)}
.lg-nav-inner{max-width:var(--maxw);margin:0 auto;padding:0 16px;display:flex;align-items:center;gap:12px;height:56px}
.lg-brand{display:inline-flex;align-items:center;gap:10px;margin-right:auto;color:var(--muted);text-decoration:none;
  font-size:14.5px;font-weight:500;white-space:nowrap}
.lg-brand img{height:36px;width:auto;display:block;transition:opacity .2s ease}
.lg-brand:hover img{opacity:.82}
.lg-brand .sep{width:1px;height:20px;background:var(--line)}
.lg-logo-dark{display:none !important}
@media (prefers-color-scheme: dark){.lg-logo-light{display:none !important}.lg-logo-dark{display:block !important}}
:root[data-theme="dark"] .lg-logo-light{display:none !important}
:root[data-theme="dark"] .lg-logo-dark{display:block !important}
:root[data-theme="light"] .lg-logo-light{display:block !important}
:root[data-theme="light"] .lg-logo-dark{display:none !important}
.lg-links{display:flex;align-items:center;gap:clamp(14px,3vw,30px)}
.lg-links a{font-size:14.5px;color:var(--muted);text-decoration:none;transition:color .2s;display:flex;align-items:center;gap:7px;white-space:nowrap}
.lg-links a svg{width:17px;height:17px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lg-links a:hover{color:var(--ink)}
.lg-links a[aria-current="page"]{color:var(--ink);font-weight:600}
.lg-links a:focus-visible,.lg-brand:focus-visible,.theme-btn:focus-visible,.burger:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}

/* Bouton clair / sombre (identique à netvd.ch) */
.theme-btn{
  display:inline-grid;place-items:center;width:34px;height:34px;flex:0 0 auto;margin-left:clamp(6px,2vw,18px);
  border:1px solid var(--line);border-radius:999px;background:var(--surface);
  color:var(--muted);cursor:pointer;padding:0;transition:color .2s, border-color .2s, transform .2s;
  -webkit-tap-highlight-color:transparent
}
.theme-btn:hover{color:var(--ink);border-color:var(--muted)}
.theme-btn:active{transform:scale(.94)}
.theme-btn svg{width:17px;height:17px;grid-area:1/1}
.theme-btn .ico-soleil{display:none}
.theme-btn .ico-lune{display:block}
@media (prefers-color-scheme: dark){.theme-btn .ico-soleil{display:block}.theme-btn .ico-lune{display:none}}
:root[data-theme="dark"] .theme-btn .ico-soleil{display:block}
:root[data-theme="dark"] .theme-btn .ico-lune{display:none}
:root[data-theme="light"] .theme-btn .ico-soleil{display:none}
:root[data-theme="light"] .theme-btn .ico-lune{display:block}

/* 9 entrées : entre le mobile et le grand écran, icônes seules (libellé en infobulle) */
@media(min-width:641px) and (max-width:1360px){
  .lg-links{gap:6px}
  .lg-links a{padding:8px;border-radius:10px}
  .lg-links a:hover{background:var(--surface-2)}
  .lg-links a span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .lg-links a[aria-current="page"]{color:var(--accent);background:var(--accent-soft)}
}
@media(min-width:1181px){.lg-links{gap:clamp(12px,1.6vw,24px)}.lg-links a{font-size:14px}}

/* Menu burger (mobile), comme netvd.ch */
.burger{display:none;position:relative;width:40px;height:40px;flex:0 0 auto;border:0;background:transparent;cursor:pointer;border-radius:10px;-webkit-tap-highlight-color:transparent}
.burger:hover{background:var(--surface-2)}
.burger span{position:absolute;left:10px;right:10px;height:2px;border-radius:2px;background:var(--ink);transition:transform .3s cubic-bezier(.16,1,.3,1), opacity .2s ease}
.burger span:nth-child(1){top:14px}.burger span:nth-child(2){top:19px}.burger span:nth-child(3){top:24px}
.burger[aria-expanded="true"] span:nth-child(1){transform:translateY(5px) rotate(45deg)}
.burger[aria-expanded="true"] span:nth-child(2){opacity:0}
.burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}
@media(max-width:640px){
  .lg-brand img{height:30px}
  .lg-brand .sep,.lg-brand small{display:none}
  .burger{display:block}
  .lg-links{
    position:absolute;top:100%;left:0;right:0;margin:0;
    flex-direction:column;align-items:stretch;gap:0;
    background:color-mix(in srgb,var(--ground) 96%,transparent);
    -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
    border-bottom:1px solid var(--line);box-shadow:var(--shadow);
    padding:6px 16px 14px;
    opacity:0;transform:translateY(-10px);pointer-events:none;
    transition:opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1)
  }
  .lg-links.open{opacity:1;transform:none;pointer-events:auto}
  .lg-links a{font-size:17px;color:var(--ink);padding:14px 4px;border-bottom:1px solid var(--line)}
  .lg-links a:last-child{border-bottom:0}
  .lg-links a[aria-current="page"]{color:var(--accent)}
}

/* ---------- Tuiles de la page d'accueil (cartes netVD) ---------- */
.lg-tile{display:flex;flex-direction:column;gap:10px;padding:26px;color:var(--ink);text-decoration:none;
  transition:transform .3s ease, box-shadow .3s ease}
.lg-tile:hover{transform:translateY(-4px);box-shadow:var(--shadow-hover)}
.lg-tile .ic{width:48px;height:48px;border-radius:var(--radius-sm);display:grid;place-items:center;color:var(--accent);
  background:color-mix(in srgb,var(--accent) 10%,transparent)}
.lg-tile .ic svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.lg-tile h2{margin:0;font-size:21px;font-weight:600}
.lg-tile p{margin:0;color:var(--muted);font-size:15px}
.lg-tile .go{margin-top:auto;font-weight:500;font-size:15px;color:var(--accent)}

/* Boutons netVD (pilule) */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 24px;border-radius:999px;
  font:500 16px/1.25 var(--font);border:1px solid transparent;cursor:pointer;text-decoration:none;
  transition:transform .18s ease, background .2s}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-ink);transform:translateY(-1px)}

@media(prefers-reduced-motion:reduce){.lg-tile,.theme-btn,.btn{transition:none}.lg-tile:hover{transform:none}}
