/* SD ONE — 18/10 publie11 : thèmes « Gris » et « Blanc » (Paramétrage → Choisir le template).
   Le thème « Bleu » (par défaut) n'est PAS touché : toutes les règles ci-dessous ne s'appliquent que si
   <html data-theme="gris"> ou <html data-theme="blanc">. Couleurs ZI : argent #AFC0D6 / #C4D3E6, texte #0F2A4A, sans doré.
   Les compteurs ronds et le calendrier rond gardent leur verre bleu nuit (la « touche de bleu »). */

html[data-theme="gris"],html[data-theme="blanc"]{
  --fond1:#EEF2F7; --fond2:#E4E9F0; --fond3:#D8DFE8; --halo:rgba(196,211,230,.55);
  --argent:#5D7290; --argent2:#5D6B7E; --argent-clair:#F3F6FA;
  --texte:#0F2A4A; --texte2:#45546A; --trait:#C4D3E6; --carte2:#F3F6FA; --carte3:#E9EEF5;
  --ombre:0 8px 24px rgba(15,42,74,.12);
}
html[data-theme="blanc"]{--fond1:#FFFFFF; --fond2:#FAFBFD; --fond3:#F3F6FA; --halo:rgba(196,211,230,.35)}
html[data-theme="gris"],html[data-theme="gris"] body{background-color:#E4E9F0}
html[data-theme="blanc"],html[data-theme="blanc"] body{background-color:#FFFFFF}
html[data-theme="gris"] body,html[data-theme="blanc"] body{background-image:radial-gradient(120% 70% at 50% -10%,var(--halo),transparent 60%),linear-gradient(180deg,var(--fond1) 0%,var(--fond2) 55%,var(--fond3) 100%)!important}
html[data-theme="gris"] body::after,html[data-theme="blanc"] body::after{opacity:.25}

/* décor : quadrillage + filaments, en filets fins bleu-gris */
html[data-theme="gris"] .v2-filaments::before{background-image:linear-gradient(rgba(15,42,74,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(15,42,74,.05) 1px,transparent 1px)}
html[data-theme="blanc"] .v2-filaments::before{background-image:linear-gradient(rgba(30,90,168,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(93,114,144,.06) 1px,transparent 1px)}
html[data-theme="gris"] .v2-filaments i,html[data-theme="blanc"] .v2-filaments i{background:linear-gradient(90deg,transparent,rgba(30,90,168,.55),transparent);filter:none;opacity:.6}
html[data-theme="gris"] .v2-filaments i:nth-child(4),html[data-theme="blanc"] .v2-filaments i:nth-child(4){background:linear-gradient(180deg,transparent,rgba(93,114,144,.55),transparent)}

/* barre du haut */
html[data-theme="gris"] .v2-haut{background:linear-gradient(180deg,#F3F6FA,#DCE4EE)!important;color:#0F2A4A;border-bottom:1px solid #C4D3E6;box-shadow:0 1px 0 #fff inset,0 6px 18px rgba(15,42,74,.10)!important}
html[data-theme="blanc"] .v2-haut{background:rgba(255,255,255,.96)!important;color:#0F2A4A;border-bottom:1px solid #D7E1EC;box-shadow:0 6px 18px rgba(15,42,74,.07)!important}
html[data-theme="gris"] .v2-horloge,html[data-theme="blanc"] .v2-horloge{background:rgba(255,255,255,.7);border-color:#C4D3E6;box-shadow:none}
html[data-theme="gris"] .v2-horloge::before,html[data-theme="blanc"] .v2-horloge::before{background-image:linear-gradient(rgba(15,42,74,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(15,42,74,.05) 1px,transparent 1px)}
html[data-theme="gris"] .v2-hm b,html[data-theme="blanc"] .v2-hm b{color:#0F2A4A}
html[data-theme="gris"] .v2-hm span,html[data-theme="gris"] .v2-jd span:first-child,html[data-theme="blanc"] .v2-hm span,html[data-theme="blanc"] .v2-jd span:first-child{color:#1E5AA8}
html[data-theme="gris"] .v2-jd span:last-child,html[data-theme="blanc"] .v2-jd span:last-child{color:#0F2A4A}
html[data-theme="gris"] .v2-jd,html[data-theme="blanc"] .v2-jd{border-left-color:#C4D3E6}
html[data-theme="gris"] .v2-calbt,html[data-theme="blanc"] .v2-calbt,html[data-theme="gris"] .v2-icones button,html[data-theme="blanc"] .v2-icones button,html[data-theme="gris"] .v2-burger,html[data-theme="blanc"] .v2-burger,html[data-theme="gris"] .v2-burger-m,html[data-theme="blanc"] .v2-burger-m{background:#fff;border:1px solid #AFC0D6;color:#0F2A4A}
html[data-theme="gris"] .v2-calbt:hover,html[data-theme="blanc"] .v2-calbt:hover,html[data-theme="gris"] .v2-icones button:hover,html[data-theme="blanc"] .v2-icones button:hover{background:#E9EEF5;color:#0F2A4A;border-color:#5D7290}
html[data-theme="gris"] .v2-recherche input,html[data-theme="blanc"] .v2-recherche input{background:#fff;border-color:#AFC0D6;color:#0F2A4A}
html[data-theme="gris"] .v2-recherche input::placeholder,html[data-theme="blanc"] .v2-recherche input::placeholder{color:#5D6B7E}
html[data-theme="gris"] .v2-recherche .ico,html[data-theme="blanc"] .v2-recherche .ico{color:#45546A}
html[data-theme="gris"] #sdx-esp-pill,html[data-theme="blanc"] #sdx-esp-pill{color:#0F2A4A}
html[data-theme="gris"] #v2-marque #sdx-esp-pill::before,html[data-theme="blanc"] #v2-marque #sdx-esp-pill::before{border-color:#AFC0D6;background:#fff}
html[data-theme="gris"] #sdx-esp-pill .e-chg,html[data-theme="blanc"] #sdx-esp-pill .e-chg{background:#0F2A4A;color:#fff}
html[data-theme="gris"] #sdx-esp-pill i,html[data-theme="blanc"] #sdx-esp-pill i{box-shadow:0 0 0 2px #AFC0D6}

/* barre des menus */
html[data-theme="gris"] .v2-menu{background:linear-gradient(180deg,#E9EEF5,#DDE5EF)!important;border-bottom:1px solid #C4D3E6;box-shadow:0 4px 12px rgba(15,42,74,.08)!important}
html[data-theme="blanc"] .v2-menu{background:#FFFFFF!important;border-bottom:1px solid #D7E1EC;box-shadow:0 4px 12px rgba(15,42,74,.05)!important}
html[data-theme="gris"] .v2-m1,html[data-theme="blanc"] .v2-m1{color:#0F2A4A}
html[data-theme="gris"] .v2-m1 .fl,html[data-theme="blanc"] .v2-m1 .fl{color:#5D7290}
html[data-theme="gris"] .v2-m1:hover,html[data-theme="blanc"] .v2-m1:hover{background:rgba(30,90,168,.08);color:#0F2A4A}
html[data-theme="gris"] .v2-m1.actif,html[data-theme="gris"] .v2-m1.deplie,html[data-theme="blanc"] .v2-m1.actif,html[data-theme="blanc"] .v2-m1.deplie{background:linear-gradient(180deg,#2A6CC0,#1E5AA8)!important;color:#fff}
html[data-theme="gris"] .v2-m1.actif .fl,html[data-theme="gris"] .v2-m1.deplie .fl,html[data-theme="blanc"] .v2-m1.actif .fl,html[data-theme="blanc"] .v2-m1.deplie .fl{color:#fff}

/* pied de page */
html[data-theme="gris"] .v2-pied{background:rgba(220,228,238,.97);color:#45546A;border-top-color:#C4D3E6}
html[data-theme="blanc"] .v2-pied{background:rgba(255,255,255,.97);color:#45546A;border-top-color:#D7E1EC}

/* bandeau du planning (zone haute) : fond clair, textes bleu nuit ; compteurs et calendrier ronds en verre bleu nuit */
html[data-theme="gris"] #sdx-plan .p-fond{background:radial-gradient(700px 320px at 12% 50%,rgba(175,192,214,.55),transparent 62%),linear-gradient(180deg,#E9EEF5,#DCE4EE)!important}
html[data-theme="blanc"] #sdx-plan .p-fond{background:radial-gradient(700px 320px at 12% 50%,rgba(196,211,230,.35),transparent 62%),linear-gradient(180deg,#FFFFFF,#F3F6FA)!important}
html[data-theme="gris"] #sdx-plan .p-fond::before,html[data-theme="blanc"] #sdx-plan .p-fond::before{filter:invert(1);opacity:.06}
html[data-theme="gris"] #sdx-plan .p-fond::after,html[data-theme="blanc"] #sdx-plan .p-fond::after{opacity:.35}
html[data-theme="gris"] #sdx-plan .p-top,html[data-theme="blanc"] #sdx-plan .p-top{color:#0F2A4A}
html[data-theme="gris"] #sdx-plan .p-top::before,html[data-theme="blanc"] #sdx-plan .p-top::before{filter:invert(1);opacity:.05}
html[data-theme="gris"] #sdx-plan .st,html[data-theme="blanc"] #sdx-plan .st,html[data-theme="gris"] #sdx-plan .st small,html[data-theme="blanc"] #sdx-plan .st small,html[data-theme="gris"] #sdx-plan .st:hover small,html[data-theme="blanc"] #sdx-plan .st:hover small{color:#0F2A4A;text-shadow:none}
html[data-theme="gris"] #sdx-plan .st::after,html[data-theme="blanc"] #sdx-plan .st::after{background:linear-gradient(rgba(15,42,74,.55),rgba(15,42,74,.1))}
html[data-theme="gris"] #sdx-plan.v2-sdx .p-top > .cal::before,html[data-theme="gris"] #sdx-cal-portail .cal::before{background:linear-gradient(180deg,rgba(221,229,239,.95) 0%,rgba(221,229,239,.55) 45%,rgba(221,229,239,0) 100%)}
html[data-theme="blanc"] #sdx-plan.v2-sdx .p-top > .cal::before,html[data-theme="blanc"] #sdx-cal-portail .cal::before{background:linear-gradient(180deg,rgba(255,255,255,.95) 0%,rgba(255,255,255,.55) 45%,rgba(255,255,255,0) 100%)}

/* écran « Choisir le template » (visible dans les trois thèmes) */
.tpl-choix{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-top:14px}
.tpl-carte{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:44px;padding:14px;border-radius:14px;border:2px solid #C4D3E6;background:#fff;color:#0F2A4A;text-align:left;cursor:pointer;font:inherit}
.tpl-carte:hover{border-color:#5D7290}
.tpl-carte[aria-checked="true"]{border-color:#1E5AA8;box-shadow:0 0 0 3px rgba(30,90,168,.2)}
.tpl-carte b{font-family:var(--titre);font-size:15px}
.tpl-carte small{font-size:12.5px;color:#45546A;line-height:1.35}
.tpl-ap{display:flex;align-items:center;width:100%;height:76px;padding:0 12px;border-radius:10px;border:1px solid #C4D3E6}
.tpl-bleu .tpl-ap{background:linear-gradient(180deg,#1E5AA8,#0F2A4A)}
.tpl-gris .tpl-ap{background:linear-gradient(180deg,#F3F6FA,#DCE4EE)}
.tpl-blanc .tpl-ap{background:#fff;background-image:linear-gradient(rgba(30,90,168,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(93,114,144,.06) 1px,transparent 1px);background-size:16px 16px}
.tpl-ap img{height:52px;width:auto}

/* textes posés directement sur le fond de page : bleu nuit en thème clair */
html[data-theme="gris"] .v2-titre,html[data-theme="blanc"] .v2-titre,html[data-theme="gris"] .fiche > .v2-titre,html[data-theme="blanc"] .fiche > .v2-titre,html[data-theme="gris"] .kpi h3,html[data-theme="blanc"] .kpi h3{color:#0F2A4A}
html[data-theme="gris"] #sdx-plan .st small,html[data-theme="blanc"] #sdx-plan .st small{color:#0F2A4A!important;opacity:1!important;text-shadow:none!important}
/* barre Chauffeur / Véhicule du planning : verre bleu nuit (lisible, touche de bleu) */
html[data-theme="gris"] .pl-bandeau,html[data-theme="blanc"] .pl-bandeau{background:linear-gradient(180deg,#2466B6,#173F73)!important;border-color:#AFC0D6}
/* libellés des traits d'état (frise du planning) */
html[data-theme="gris"] #sdx-plan.v2-sdx .tr-et,html[data-theme="blanc"] #sdx-plan.v2-sdx .tr-et{color:#0F2A4A}
html[data-theme="gris"] #sdx-plan.v2-sdx .tr-et small,html[data-theme="blanc"] #sdx-plan.v2-sdx .tr-et small,html[data-theme="gris"] #sdx-plan.v2-sdx .tr-et.on small,html[data-theme="blanc"] #sdx-plan.v2-sdx .tr-et.on small{color:#0F2A4A;text-shadow:none;opacity:1}
/* compteurs ronds et calendrier rond : verre bleu nuit opaque sur fond clair (lisibles) */
html[data-theme="gris"] #sdx-plan .cp,html[data-theme="blanc"] #sdx-plan .cp,html[data-theme="gris"] #sdx-cal-portail .cal,html[data-theme="blanc"] #sdx-cal-portail .cal{background:radial-gradient(circle at 50% 35%,#2A6CC0,#0F2A4A 72%)!important}
html[data-theme="gris"] #sdx-plan .cp,html[data-theme="blanc"] #sdx-plan .cp,html[data-theme="gris"] #sdx-plan .cp *,html[data-theme="blanc"] #sdx-plan .cp *{color:#fff}
html[data-theme="gris"] .pl-bandeau,html[data-theme="blanc"] .pl-bandeau{--argent:#DCE6F2;--argent2:#C4D3E6;--texte2:#DCE6F2}
html[data-theme="gris"] .pl-bandeau label,html[data-theme="blanc"] .pl-bandeau label,html[data-theme="gris"] .pl-bandeau .lib,html[data-theme="blanc"] .pl-bandeau .lib{color:#DCE6F2}
