/* Styles communs aux onglets (accueil, lumières…) */
:root{--bg:#0b1016;--panel:#141b24;--panel2:#18212c;--line:#232e3d;--txt:#e8eef5;--muted:#8291a5;--acc:#4da3ff;--sun:#ffc94d;--rain:#5fb4ff;--ok:#3ecf8e;--warn:#f5b942;--err:#ff5d5d}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--txt);font:15px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none}
main{flex:1;overflow:auto;padding:12px 16px 8px;display:flex;flex-direction:column;gap:10px;scrollbar-width:none}
main::-webkit-scrollbar{display:none}   /* écran tactile : pas d'ascenseur, on fait défiler au doigt */
body{overflow:hidden}
.s{color:var(--muted);font-size:13px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:14px 16px;min-width:0}
.card h2{margin:0 0 10px;font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;display:flex;justify-content:space-between}
.btn{background:var(--panel2);border:1px solid var(--line);color:var(--txt);border-radius:999px;padding:8px 14px;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.4}
.toast{position:fixed;left:50%;bottom:76px;transform:translateX(-50%);background:#2d1717;color:#ffd0d0;border:1px solid #5a2a2a;border-radius:12px;padding:8px 14px;font-size:14px;z-index:9;display:none}
/* fenêtre de confirmation (nav.js : ask) */
.dlg-bg{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(5,8,12,.55);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);animation:dlgf .15s ease-out}
.dlg{width:100%;max-width:400px;background:linear-gradient(180deg,#18212c,#141b24);border:1px solid #2a3647;border-radius:18px;padding:18px 18px 14px;box-shadow:0 18px 50px rgba(0,0,0,.55);animation:dlgp .18s ease-out}
.dlg-h{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.dlg-i{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#16233a;color:var(--acc);flex:none}
.dlg-i svg{width:18px;height:18px}
.dlg.warn .dlg-i{background:#3a2316;color:#ffb27a}
.dlg-t{font-size:16px;font-weight:600}
.dlg-m{font-size:14px;line-height:1.5;color:#c9d4e2;margin:0 0 16px 44px}
.dlg-b{display:flex;gap:8px;justify-content:flex-end}
.dlg-b button{border-radius:12px;padding:9px 16px;font:inherit;font-size:14px;font-weight:600;cursor:pointer;border:1px solid var(--line);background:transparent;color:var(--muted)}
.dlg-b button.yes{background:var(--acc);border-color:var(--acc);color:#06121f}
.dlg.warn .dlg-b button.yes{background:#ff9a4d;border-color:#ff9a4d;color:#1b0e04}
.dlg-b button:active{transform:scale(.97)}
@keyframes dlgf{from{opacity:0}}@keyframes dlgp{from{opacity:0;transform:translateY(8px) scale(.98)}}
/* bouton retour des sous-pages (nav.js) */
.crumb{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.crumb .back{display:inline-flex;align-items:center;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:7px 14px 7px 9px;color:var(--txt);text-decoration:none;font-size:14px;font-weight:600}
.crumb .back svg{width:18px;height:18px;color:var(--acc)}
.crumb .back:active{transform:scale(.97)}
.crumb .here{color:var(--muted);font-size:13.5px}
/* barre d'onglets (remplie par nav.js) */
nav{display:flex;border-top:1px solid var(--line);background:#0e141c;padding-bottom:env(safe-area-inset-bottom)}
nav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 0 8px;color:var(--muted);text-decoration:none;font-size:12px}
nav a svg{width:24px;height:24px}
nav a.on{color:var(--acc)}
/* liens vers d'autres pages : boutons pastille, mêmes sur toutes les pages */
.links{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.links a{display:inline-flex;align-items:center;gap:6px;background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:6px 13px;color:var(--txt);text-decoration:none;font-size:13.5px;font-weight:600}
.links a:hover{border-color:#3a4f73}
.links a.dbg{border-color:#3a4f73;color:var(--acc)}
