/* ═══════════════════════════════════════════════════════════════
   DIVASS LOGISTICS — PALETTES (dl-theme.css)
   Deux thèmes : « clair » (défaut) et « ardoise ».
   Le thème actif est porté par <html data-theme="…">, posé par
   dl-theme.js avant le premier affichage.

   Les pages n'écrivent JAMAIS une couleur en dur : elles
   utilisent uniquement les variables ci-dessous. Changer de
   thème devient alors gratuit, sur n'importe quelle page.
   ═══════════════════════════════════════════════════════════════ */

/* ─── CLAIR — fond lumineux, accents or (thème par défaut) ─── */
:root,
html[data-theme="clair"]{
  --bg:#F2F5F9;
  --surface:#FFFFFF;
  --surface-2:#F8FAFC;
  --fieldbg:#F6F8FB;
  --fieldfocus:#FFFDF2;
  --border:#DFE4EC;
  --border-strong:#C9D1DE;
  --text:#14171E;
  --text-soft:#3C4452;
  --muted:#667085;
  --placeholder:#AAB2C0;
  --footbg:#FFFFFF;

  --navbg:rgba(11,12,15,.97);
  --navborder:rgba(255,203,1,.22);
  --navtext:#AEB6C4;

  --gold:#FFCB01;          /* aplats : boutons, pastilles   */
  --golddark:#E6B800;      /* survol des aplats             */
  --ongold:#0B0C0F;        /* texte posé SUR un aplat or    */
  --goldtext:#A87F00;      /* or en grand texte             */
  --label:#8A6A00;         /* or en petit texte (lisible)   */
  --goldsoft:rgba(255,203,1,.16);
  --goldline:rgba(255,203,1,.45);

  --pageglow:radial-gradient(ellipse at 50% 0%,rgba(255,203,1,.16) 0%,transparent 58%);
  --overlay:rgba(18,22,32,.5);
  --shadow:0 16px 44px rgba(20,28,48,.10);
  --shadow-sm:0 2px 10px rgba(20,28,48,.06);

  --err:#DC2626;  --errbg:rgba(220,38,38,.07);  --errline:rgba(220,38,38,.22);
  --ok:#059669;   --okbg:rgba(5,150,105,.07);   --okline:rgba(5,150,105,.22);
  --info:#2563EB; --infobg:rgba(37,99,235,.07); --infoline:rgba(37,99,235,.22);
  --warn:#B45309; --warnbg:rgba(180,83,9,.07);  --warnline:rgba(180,83,9,.22);
  /* Pastilles de statut — teintes soutenues, lisibles sur blanc */
  --b-prep:#1D4ED8;    --b-prep-bg:rgba(37,99,235,.10);  --b-prep-line:rgba(37,99,235,.26);
  --b-exp:#B45309;     --b-exp-bg:rgba(180,83,9,.10);    --b-exp-line:rgba(180,83,9,.26);
  --b-transit:#6D28D9; --b-transit-bg:rgba(109,40,217,.10); --b-transit-line:rgba(109,40,217,.26);
  --b-douane:#C2410C;  --b-douane-bg:rgba(194,65,12,.10);--b-douane-line:rgba(194,65,12,.26);
  --b-dispo:#047857;   --b-dispo-bg:rgba(4,120,87,.10);  --b-dispo-line:rgba(4,120,87,.26);
  --b-livre:#065F46;   --b-livre-bg:rgba(6,95,70,.13);   --b-livre-line:rgba(6,95,70,.30);

  /* Barre de navigation — verre dépoli façon iOS.
     Opacité volontairement basse : c'est elle qui laisse le flou
     opérer. À .95 le flou ne se verrait pas. */
  --navglass:rgba(228,233,241,.72);
  --navglass-line:rgba(15,23,42,.10);
  --navitem:#5B6472;
  --navitem-hover:#1F2937;
  --navitem-on:#A87F00;
}

/* ─── ARDOISE — noir et or, éclairci ─── */
html[data-theme="ardoise"]{
  --bg:#15171C;
  --surface:#1D212A;
  --surface-2:#232833;
  --fieldbg:#262B36;
  --fieldfocus:#2B313D;
  --border:#2F3542;
  --border-strong:#3C4454;
  --text:#EEF1F5;
  --text-soft:#C6CCD6;
  --muted:#99A1AE;
  --placeholder:#5B6372;
  --footbg:#111318;

  --navbg:rgba(14,16,20,.96);
  --navborder:rgba(255,203,1,.14);
  --navtext:#99A1AE;

  --gold:#FFCB01;
  --golddark:#E6B800;
  --ongold:#0B0C0F;
  --goldtext:#FFCB01;
  --label:#FFCB01;
  --goldsoft:rgba(255,203,1,.10);
  --goldline:rgba(255,203,1,.22);

  --pageglow:radial-gradient(ellipse at 50% 0%,rgba(255,203,1,.07) 0%,transparent 62%);
  --overlay:rgba(0,0,0,.72);
  --shadow:0 18px 48px rgba(0,0,0,.45);
  --shadow-sm:0 2px 10px rgba(0,0,0,.35);

  --err:#F87171; --errbg:rgba(239,68,68,.12);   --errline:rgba(239,68,68,.30);
  --ok:#34D399;  --okbg:rgba(16,185,129,.12);   --okline:rgba(16,185,129,.30);
  --info:#60A5FA;--infobg:rgba(59,130,246,.12); --infoline:rgba(59,130,246,.30);
  --warn:#FBBF24;--warnbg:rgba(251,191,36,.12); --warnline:rgba(251,191,36,.30);
  /* Pastilles de statut — teintes claires, lisibles sur ardoise */
  --b-prep:#7CB3FB;    --b-prep-bg:rgba(96,165,250,.14); --b-prep-line:rgba(96,165,250,.30);
  --b-exp:#FBCC5C;     --b-exp-bg:rgba(251,191,36,.14);  --b-exp-line:rgba(251,191,36,.30);
  --b-transit:#C9A0F7; --b-transit-bg:rgba(192,132,252,.14); --b-transit-line:rgba(192,132,252,.30);
  --b-douane:#FBAE6B;  --b-douane-bg:rgba(251,146,60,.14);--b-douane-line:rgba(251,146,60,.32);
  --b-dispo:#6EE79B;   --b-dispo-bg:rgba(74,222,128,.14); --b-dispo-line:rgba(74,222,128,.30);
  --b-livre:#34D399;   --b-livre-bg:rgba(16,185,129,.18); --b-livre-line:rgba(16,185,129,.36);

  /* Barre de navigation — verre dépoli façon iOS */
  --navglass:rgba(16,18,23,.70);
  --navglass-line:rgba(255,203,1,.14);
  --navitem:#8B93A1;
  --navitem-hover:#D5DAE2;
  --navitem-on:#FFCB01;
}

/* ─── Bouton de bascule, commun à toutes les pages ─── */
.dl-theme-btn{
  background:none;border:1px solid var(--navborder);color:var(--navtext);
  width:34px;height:34px;border-radius:9px;display:inline-flex;
  align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
  transition:color .2s,border-color .2s;padding:0;
}
.dl-theme-btn:hover{color:var(--gold);border-color:var(--gold);}
.dl-theme-btn svg.lucide{width:17px;height:17px;}
/* Variante posée sur un fond de page (et non sur la barre sombre) */
.dl-theme-btn.on-page{border-color:var(--border);color:var(--muted);}
.dl-theme-btn.on-page:hover{color:var(--goldtext);border-color:var(--gold);}

/* ─── Pastilles de statut — style iOS ───────────────────────────
   Apple ne met pas de liseré sur ces étiquettes : une teinte unie,
   une rondeur complète, un texte dans la couleur pleine. Pas de
   majuscules ni d'interlettrage forcé — c'est ce qui donne l'air
   « web » aux badges. */
.badge,.cl-bdg,[class*="b-prep"],[class*="b-exp"],[class*="b-transit"],
[class*="b-douane"],[class*="b-dispo"],[class*="b-livre"],[class*="b-payee"],[class*="b-attente"]{
  border:0!important;border-radius:999px!important;
  font-weight:600!important;letter-spacing:0!important;text-transform:none!important;
  padding:4px 10px!important;line-height:1.3;white-space:nowrap;
}
.b-prep{background:var(--b-prep-bg);color:var(--b-prep);}
.b-exp,.b-attente{background:var(--b-exp-bg);color:var(--b-exp);}
.b-transit{background:var(--b-transit-bg);color:var(--b-transit);}
.b-douane{background:var(--b-douane-bg);color:var(--b-douane);}
.b-dispo{background:var(--b-dispo-bg);color:var(--b-dispo);}
.b-livre,.b-payee{background:var(--b-livre-bg);color:var(--b-livre);}
