/* ============================================================================
 *  W812 – Design system de l'interface
 *  Style inspiré des Apple Human Interface Guidelines :
 *  minimaliste, espaces généreux, coins très arrondis, glassmorphism subtil,
 *  ombres légères, animations fluides, thème clair / sombre.
 * ==========================================================================*/

/* ------------------------------- Tokens ---------------------------------- */
:root{
  --bg:#f5f5f7;
  --surface:#ffffff;
  --surface-2:#f5f5f7;
  --surface-glass:rgba(255,255,255,.72);
  --border:rgba(0,0,0,.08);
  --txt:#1d1d1f;
  --muted:#86868b;

  --blue:#0071e3;   --blue-soft:rgba(0,113,227,.10);
  --green:#34c759;  --green-soft:rgba(52,199,89,.12);
  --red:#ff3b30;    --red-soft:rgba(255,59,48,.10);
  --orange:#ff9500; --orange-soft:rgba(255,149,0,.12);

  --shadow-sm:0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md:0 4px 24px rgba(0,0,0,.06);
  --shadow-lg:0 12px 48px rgba(0,0,0,.10);

  --radius-lg:22px;
  --radius-md:16px;
  --radius-sm:12px;

  --ease:cubic-bezier(.25,.1,.25,1);
  --spring:cubic-bezier(.34,1.4,.64,1);
}
[data-theme="dark"]{
  --bg:#000000;
  --surface:#1c1c1e;
  --surface-2:#2c2c2e;
  --surface-glass:rgba(22,22,24,.72);
  --border:rgba(255,255,255,.10);
  --txt:#f5f5f7;
  --muted:#98989d;

  --blue:#0a84ff;   --blue-soft:rgba(10,132,255,.16);
  --green:#30d158;  --green-soft:rgba(48,209,88,.16);
  --red:#ff453a;    --red-soft:rgba(255,69,58,.14);
  --orange:#ff9f0a; --orange-soft:rgba(255,159,10,.16);

  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 4px 24px rgba(0,0,0,.5);
  --shadow-lg:0 12px 48px rgba(0,0,0,.6);
}

/* -------------------------------- Base ----------------------------------- */
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; min-height:100dvh;
  background:var(--bg); color:var(--txt);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
  transition:background .35s var(--ease), color .35s var(--ease);
}
h1,h2,h3{ font-weight:600; letter-spacing:-.02em; margin:0; }
p{ margin:0; }
a{ color:var(--blue); text-decoration:none; }
button{ font-family:inherit; }
svg{ display:block; }
.muted{ color:var(--muted); }
.small{ font-size:13px; }
.tnum{ font-variant-numeric:tabular-nums; }

/* --------------------------- Barre de navigation -------------------------- */
.nav{
  position:sticky; top:0; z-index:100;
  background:var(--surface-glass);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  max-width:1180px; margin:0 auto; padding:10px 20px;
  display:flex; align-items:center; gap:10px;
}
.brand{ display:flex; align-items:center; gap:11px; margin-right:8px; }
.brand-badge{
  width:38px; height:38px; border-radius:11px; flex:none;
  background:linear-gradient(135deg,#4facfe,#0071e3);
  display:flex; align-items:center; justify-content:center;
  color:#fff; box-shadow:0 4px 12px rgba(0,113,227,.35);
}
.brand-badge svg{ width:20px; height:20px; }
.brand-name{ font-weight:600; font-size:15px; letter-spacing:-.01em; line-height:1.15; }
.brand-sub{ font-size:11.5px; color:var(--muted); line-height:1.15; }

.tabs{ display:flex; gap:2px; margin:0 auto; background:var(--surface-2);
       border-radius:999px; padding:3px; border:1px solid var(--border); }
.tab{
  display:flex; align-items:center; gap:7px;
  padding:7px 15px; border-radius:999px; border:0; cursor:pointer;
  background:transparent; color:var(--muted); font-size:13.5px; font-weight:500;
  transition:background .25s var(--ease), color .25s var(--ease);
  text-decoration:none; min-height:34px;
}
.tab svg{ width:16px; height:16px; }
.tab:hover{ color:var(--txt); }
.tab.active{ background:var(--surface); color:var(--txt); box-shadow:var(--shadow-sm); }

.nav-actions{ display:flex; align-items:center; gap:8px; margin-left:auto; }
.icon-btn{
  position:relative; width:38px; height:38px; border-radius:12px; border:1px solid var(--border);
  background:var(--surface); color:var(--txt); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:transform .15s var(--spring), background .25s var(--ease);
}
.icon-btn svg{ width:18px; height:18px; }
.icon-btn:hover{ background:var(--surface-2); }
.icon-btn:active{ transform:scale(.92); }
.badge-dot{
  position:absolute; top:6px; right:6px; min-width:16px; height:16px; padding:0 4px;
  border-radius:8px; background:var(--red); color:#fff;
  font-size:10px; font-weight:700; line-height:16px; text-align:center;
  box-shadow:0 0 0 2px var(--surface);
}

/* ------------------------------ Mise en page ------------------------------ */
.page{ max-width:1180px; margin:0 auto; padding:24px 20px 56px; }
.page-title{ font-size:26px; margin:6px 0 2px; }
.page-sub{ color:var(--muted); font-size:14px; margin-bottom:22px; }
.grid{ display:grid; gap:16px; }
.grid-stats{ grid-template-columns:repeat(4,1fr); }
.grid-2{ grid-template-columns:1fr 1fr; }
.grid-main{ grid-template-columns:5fr 7fr; }
@media (max-width:900px){
  .grid-stats{ grid-template-columns:repeat(2,1fr); }
  .grid-main,.grid-2{ grid-template-columns:1fr; }
}

/* -------------------------------- Cartes ---------------------------------- */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md);
  padding:22px;
  transition:background .35s var(--ease), border-color .35s var(--ease);
}
.card-label{
  display:flex; align-items:center; gap:7px;
  font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); margin-bottom:10px;
}
.card-label svg{ width:15px; height:15px; }
.stat-value{ font-size:21px; font-weight:600; letter-spacing:-.02em; }
.stat-sub{ font-size:13px; color:var(--muted); }

/* ------------------------------- Boutons ---------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px; min-height:46px;
  border:0; border-radius:14px; cursor:pointer;
  font-size:15px; font-weight:600; letter-spacing:-.01em;
  transition:transform .15s var(--spring), opacity .2s, background .25s var(--ease);
  -webkit-tap-highlight-color:transparent; touch-action:manipulation;
}
.btn:active{ transform:scale(.965); }
.btn:disabled{ opacity:.45; cursor:default; }
.btn-primary{ background:var(--blue); color:#fff; }
.btn-primary:hover{ opacity:.9; }
.btn-tinted{ background:var(--blue-soft); color:var(--blue); }
.btn-danger-tinted{ background:var(--red-soft); color:var(--red); }
.btn-ghost{ background:var(--surface-2); color:var(--txt); border:1px solid var(--border); }
.btn-block{ width:100%; }
.btn .spinner{ width:16px; height:16px; border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* --------------------------- Interrupteur iOS ----------------------------- */
.switch{ position:relative; display:inline-block; width:51px; height:31px; flex:none; }
.switch input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.switch .track{
  position:absolute; inset:0; border-radius:999px;
  background:rgba(120,120,128,.32);
  transition:background .25s var(--ease);
}
.switch .knob{
  position:absolute; top:2px; left:2px; width:27px; height:27px; border-radius:50%;
  background:#fff; box-shadow:0 3px 8px rgba(0,0,0,.25), 0 1px 1px rgba(0,0,0,.12);
  transition:transform .25s var(--spring);
}
.switch input:checked + .track{ background:var(--green); }
.switch input:checked + .track + .knob{ transform:translateX(20px); }
.switch input:disabled ~ *{ opacity:.5; }

/* ---------------------------- Champs de saisie ---------------------------- */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:13px; font-weight:500; color:var(--muted); margin-bottom:7px; }
.input{
  width:100%; padding:12px 15px; min-height:46px;
  border-radius:var(--radius-sm); border:1px solid var(--border);
  background:var(--surface-2); color:var(--txt);
  font-size:16px; font-family:inherit; outline:none;
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.input:focus{
  border-color:var(--blue); background:var(--surface);
  box-shadow:0 0 0 3.5px var(--blue-soft);
}
.field-error{ font-size:13px; color:var(--red); margin-top:6px; min-height:16px; }

/* ------------------------- Pastilles & indicateurs ------------------------ */
.dot{ width:10px; height:10px; border-radius:50%; display:inline-block; flex:none; }
.dot-on{ background:var(--green); box-shadow:0 0 0 4px var(--green-soft); animation:pulse 2.2s infinite; }
.dot-off{ background:var(--muted); opacity:.55; }
.dot-danger{ background:var(--red); box-shadow:0 0 0 4px var(--red-soft); animation:pulse 1.4s infinite; }
@keyframes pulse{ 50%{ box-shadow:0 0 0 8px transparent; } }

.pill{
  display:inline-flex; align-items:center; gap:7px;
  background:var(--surface-2); border:1px solid var(--border);
  color:var(--muted); padding:5px 12px; border-radius:999px; font-size:12.5px; font-weight:500;
}

/* Jauge batterie */
.gauge{ height:12px; border-radius:999px; background:var(--surface-2);
        border:1px solid var(--border); overflow:hidden; }
.gauge-fill{ height:100%; border-radius:999px; background:var(--green);
             transition:width .8s var(--ease), background .4s; }
.gauge-fill.mid{ background:var(--orange); }
.gauge-fill.low{ background:var(--red); }

/* Barres Wi-Fi */
.wifi-bars{ display:inline-flex; gap:3px; align-items:flex-end; height:18px; }
.wifi-bars i{ width:4px; border-radius:2px; background:var(--border); transition:background .3s; }
.wifi-bars i.on{ background:var(--blue); }

/* ------------------------------ Vannes ------------------------------------ */
.valve-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
@media (max-width:700px){ .valve-grid{ grid-template-columns:repeat(2,1fr); } }
.valve{
  position:relative; border:1px solid var(--border); border-radius:var(--radius-md);
  padding:16px 12px 14px; background:var(--surface-2); color:var(--txt);
  cursor:pointer; text-align:center; min-height:110px;
  transition:transform .18s var(--spring), background .3s var(--ease),
             border-color .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-tap-highlight-color:transparent; touch-action:manipulation;
}
.valve:hover{ transform:translateY(-2px); box-shadow:var(--shadow-sm); }
.valve:active{ transform:scale(.96); }
.valve .v-icon{
  width:40px; height:40px; margin:0 auto 8px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--border); color:var(--muted);
  transition:background .3s, color .3s, border-color .3s;
}
.valve .v-icon svg{ width:20px; height:20px; }
.valve .v-name{ font-weight:600; font-size:15px; letter-spacing:-.01em; }
.valve .v-state{ font-size:12px; color:var(--muted); margin-top:1px; }
.valve.open{
  background:var(--blue-soft); border-color:var(--blue);
  box-shadow:0 6px 20px rgba(0,113,227,.15);
}
.valve.open .v-icon{ background:var(--blue); border-color:var(--blue); color:#fff; }
.valve.open .v-state{ color:var(--blue); font-weight:600; }
.valve.busy{ opacity:.55; pointer-events:none; }
.valve.busy .v-state{ color:var(--muted); }

/* ---------------------------- Pages d'accueil ----------------------------- */
.auth-wrap{
  min-height:100dvh; display:flex; align-items:center; justify-content:center;
  padding:20px;
  background:
    radial-gradient(1100px 500px at 15% -10%, var(--blue-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, var(--green-soft), transparent 60%),
    var(--bg);
}
.auth-card{
  width:100%; max-width:400px;
  background:var(--surface-glass);
  -webkit-backdrop-filter:saturate(180%) blur(24px);
  backdrop-filter:saturate(180%) blur(24px);
  border:1px solid var(--border); border-radius:26px;
  box-shadow:var(--shadow-lg); padding:36px 30px;
  animation:rise .5s var(--ease) both;
}
.auth-logo{
  width:64px; height:64px; border-radius:18px; margin:0 auto 16px;
  background:linear-gradient(135deg,#4facfe,#0071e3);
  display:flex; align-items:center; justify-content:center; color:#fff;
  box-shadow:0 10px 26px rgba(0,113,227,.35);
}
.auth-logo svg{ width:32px; height:32px; }
.auth-title{ text-align:center; font-size:21px; }
.auth-sub{ text-align:center; color:var(--muted); font-size:14px; margin:4px 0 26px; }

/* ------------------------------- Toasts ----------------------------------- */
.toasts{
  position:fixed; top:14px; left:50%; transform:translateX(-50%);
  z-index:1000; display:flex; flex-direction:column; gap:8px; width:min(420px,92vw);
  pointer-events:none;
}
.toast{
  display:flex; align-items:flex-start; gap:11px;
  background:var(--surface-glass);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
  border:1px solid var(--border); border-radius:18px;
  box-shadow:var(--shadow-lg); padding:13px 16px;
  animation:rise .4s var(--spring) both; pointer-events:auto;
}
.toast.out{ animation:sink .3s var(--ease) both; }
.toast .t-icon{ width:26px; height:26px; border-radius:8px; flex:none;
  display:flex; align-items:center; justify-content:center; color:#fff; }
.toast .t-icon svg{ width:15px; height:15px; }
.toast .t-title{ font-size:14px; font-weight:600; }
.toast .t-msg{ font-size:13px; color:var(--muted); }
.t-info .t-icon{ background:var(--blue); }
.t-warn .t-icon{ background:var(--orange); }
.t-danger .t-icon{ background:var(--red); }
.t-success .t-icon{ background:var(--green); }

/* ----------------------- Panneau de notifications ------------------------- */
.notif-panel{
  position:fixed; top:62px; right:max(12px, calc((100vw - 1180px)/2 + 20px));
  z-index:500; width:min(380px,94vw); max-height:min(480px,72dvh);
  background:var(--surface-glass);
  -webkit-backdrop-filter:saturate(180%) blur(24px);
  backdrop-filter:saturate(180%) blur(24px);
  border:1px solid var(--border); border-radius:20px; box-shadow:var(--shadow-lg);
  display:flex; flex-direction:column; overflow:hidden;
  animation:rise .3s var(--spring) both;
}
.notif-head{ display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; border-bottom:1px solid var(--border); }
.notif-head h3{ font-size:15px; }
.notif-list{ overflow-y:auto; padding:6px; }
.notif-item{ display:flex; gap:11px; padding:11px 12px; border-radius:14px; }
.notif-item:hover{ background:var(--surface-2); }
.notif-item .n-dot{ width:9px; height:9px; border-radius:50%; margin-top:6px; flex:none; }
.n-info .n-dot{ background:var(--blue); }
.n-warn .n-dot{ background:var(--orange); }
.n-danger .n-dot{ background:var(--red); }
.notif-item.read .n-dot{ background:var(--border); }
.notif-item .n-title{ font-size:14px; font-weight:600; }
.notif-item .n-msg{ font-size:13px; color:var(--muted); }
.notif-item .n-time{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.notif-empty{ padding:34px 16px; text-align:center; color:var(--muted); font-size:14px; }

/* ----------------------------- Tableau (journal) -------------------------- */
.table-wrap{ overflow-x:auto; }
.table{ width:100%; border-collapse:collapse; font-size:14px; }
.table th{
  text-align:left; font-size:12px; font-weight:600; letter-spacing:.05em;
  text-transform:uppercase; color:var(--muted);
  padding:10px 14px; border-bottom:1px solid var(--border); white-space:nowrap;
}
.table td{ padding:11px 14px; border-bottom:1px solid var(--border); }
.table tr:last-child td{ border-bottom:0; }
.table tr{ transition:background .15s; }
.table tbody tr:hover{ background:var(--surface-2); }

.event-chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600;
  background:var(--surface-2); border:1px solid var(--border); color:var(--muted);
  white-space:nowrap;
}
.event-chip.good{ background:var(--green-soft); color:var(--green); border-color:transparent; }
.event-chip.bad{ background:var(--red-soft); color:var(--red); border-color:transparent; }
.event-chip.warn{ background:var(--orange-soft); color:var(--orange); border-color:transparent; }
.event-chip.info{ background:var(--blue-soft); color:var(--blue); border-color:transparent; }

/* ------------------------------ Graphique --------------------------------- */
.chart-box{ position:relative; }
.chart-box svg{ width:100%; height:auto; }
.chart-grid-line{ stroke:var(--border); stroke-width:1; }
.chart-axis-text{ fill:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.chart-tip{
  position:absolute; pointer-events:none; z-index:10;
  background:var(--surface-glass);
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
  border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow-md);
  padding:8px 12px; font-size:12.5px; white-space:nowrap;
  transform:translate(-50%,-110%); transition:opacity .15s; opacity:0;
}
.chart-tip .tt-val{ font-weight:600; font-size:14px; }
.seg{ display:inline-flex; background:var(--surface-2); border:1px solid var(--border);
      border-radius:999px; padding:3px; gap:2px; }
.seg button{
  border:0; background:transparent; color:var(--muted); cursor:pointer;
  padding:6px 14px; border-radius:999px; font-size:13px; font-weight:500;
  transition:background .2s, color .2s; min-height:32px;
}
.seg button.active{ background:var(--surface); color:var(--txt); box-shadow:var(--shadow-sm); }

/* ------------------------------ Divers ------------------------------------ */
.row{ display:flex; align-items:center; gap:10px; }
.row-between{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.divider{ height:1px; background:var(--border); margin:16px 0; border:0; }
.offline-banner{
  display:none; align-items:center; gap:10px;
  background:var(--red-soft); color:var(--red);
  border:1px solid transparent; border-radius:var(--radius-md);
  padding:12px 16px; margin-bottom:16px; font-weight:500; font-size:14px;
}
.offline-banner.visible{ display:flex; animation:rise .35s var(--spring) both; }
.offline-banner svg{ width:18px; height:18px; flex:none; }

.footer{ text-align:center; color:var(--muted); font-size:12.5px; margin-top:36px; }

/* ----------------------- Cartes contrôleurs (hub) ------------------------- */
.device-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.device-card{ display:flex; flex-direction:column; gap:12px; }
.device-card .d-head{ display:flex; align-items:center; gap:11px; }
.device-card .d-badge{
  width:42px; height:42px; border-radius:12px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:var(--blue-soft); color:var(--blue);
}
.device-card .d-badge svg{ width:22px; height:22px; }
.device-card .d-name{ font-weight:600; font-size:16px; letter-spacing:-.01em; }
.device-card .d-host{ font-size:12.5px; color:var(--muted); }
.device-card .d-stats{ display:flex; gap:8px; flex-wrap:wrap; }
.device-card .d-actions{ display:flex; gap:8px; margin-top:auto; }
.device-card .d-actions .btn{ min-height:40px; padding:9px 16px; font-size:14px; }

.add-card{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; min-height:180px; cursor:pointer;
  border:1.5px dashed var(--border); background:transparent; box-shadow:none;
  color:var(--muted); transition:border-color .25s, color .25s, background .25s;
}
.add-card:hover{ border-color:var(--blue); color:var(--blue); background:var(--blue-soft); }
.add-card .plus{
  width:46px; height:46px; border-radius:50%; border:1.5px solid currentColor;
  display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:300;
}

/* ---------------------------- Bouton de langue ---------------------------- */
.lang-btn{
  font-weight:700; font-size:12.5px; letter-spacing:.03em;
  font-family:inherit;
}

/* ------------------------- Horloge (Tunisie, 24 h) ------------------------ */
.clock{
  font-weight:600; color:var(--txt); letter-spacing:.02em;
  padding:7px 13px; font-size:13.5px; min-width:92px; justify-content:center;
}
/*  Sur téléphone : horloge compacte HH:MM (les secondes sont masquées).      */
@media (max-width:560px){
  .clock{ min-width:0; padding:7px 9px; font-size:12.5px; }
  .clock .clock-sec{ display:none; }
}

/* --------------------------- Planifications ------------------------------- */
.sched-item{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:12px 14px; border:1px solid var(--border);
  border-radius:var(--radius-sm); background:var(--surface-2); margin-bottom:8px;
}
.sched-item:last-child{ margin-bottom:0; }
.sched-item .s-valve{
  width:38px; height:38px; border-radius:11px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:var(--blue-soft); color:var(--blue); font-weight:700; font-size:13.5px;
}
.sched-item .s-when{ font-weight:600; font-size:14.5px; }
.sched-item .s-hours{ font-size:13px; color:var(--muted); }
.sched-item .s-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.sched-item.active-now{ border-color:var(--green); background:var(--green-soft); }
.sched-item.disabled .s-when,.sched-item.disabled .s-hours{ opacity:.5; }
.sched-item.past .s-valve{ background:var(--surface); color:var(--muted); }
.icon-btn.small{ width:34px; height:34px; border-radius:10px; }

/* -------------------------------- Modale ---------------------------------- */
.modal-overlay{
  position:fixed; inset:0; z-index:800;
  background:rgba(0,0,0,.35);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center; padding:20px;
  animation:fadeIn .2s var(--ease) both;
}
.modal{
  width:100%; max-width:440px; max-height:90dvh; overflow-y:auto;
  background:var(--surface); border:1px solid var(--border);
  border-radius:24px; box-shadow:var(--shadow-lg); padding:26px;
  animation:rise .3s var(--spring) both;
}
.modal h2{ font-size:19px; margin-bottom:4px; }
.modal .m-sub{ color:var(--muted); font-size:13.5px; margin-bottom:20px; }
@keyframes fadeIn{ from{ opacity:0; } to{ opacity:1; } }

/* Animation d'entrée en cascade des cartes */
.stagger > *{ animation:rise .5s var(--ease) both; }
.stagger > *:nth-child(1){ animation-delay:.02s; }
.stagger > *:nth-child(2){ animation-delay:.07s; }
.stagger > *:nth-child(3){ animation-delay:.12s; }
.stagger > *:nth-child(4){ animation-delay:.17s; }
.stagger > *:nth-child(5){ animation-delay:.22s; }
.stagger > *:nth-child(6){ animation-delay:.27s; }

@keyframes rise{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes sink{ to{ opacity:0; transform:translateY(-8px); } }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* Adaptations mobiles */
@media (max-width:760px){
  .tab span:not([data-icon]){ display:none; }
  .tab{ padding:7px 12px; }
  .brand-sub{ display:none; }
}
@media (max-width:480px){
  .nav-inner{ padding:10px 10px; gap:4px; }
  .brand > div:not(.brand-badge){ display:none; }   /* seul le badge reste  */
  .nav-actions{ gap:5px; }
  .icon-btn{ width:36px; height:36px; }
  .tab{ padding:7px 10px; }
  .page{ padding:18px 14px 48px; }
  .card{ padding:18px; }
  .notif-panel{ right:12px; }
}
