/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   THEME illiCO travaux — feuille de style UNIQUE de la charte
   Source : CHARTE GRAPHIQUE illiCO travaux 2026 (PDF du franchiseur, 20 pages, appliquee le 30/09/2026).
   Elle REMPLACE integralement la charte d'octobre 2025 : ce n'est pas un ajustement, c'est une autre palette.
     couleurs officielles (page 11)
       #12284c  bleu illiCO travaux   Pantone 2767 C   RVB 18/40/76     RAL 5011
       #dae5f4  bleu clair            Pantone 2706 C   RVB 218/229/244
       #f05b48  corail                Pantone 7416 C   RVB 240/91/72    — « en petite touche » uniquement
       #ffffff  blanc
     nuances DERIVEES pour les besoins de l'application (survols, degrades, fonds) : elles ne figurent PAS
     dans la charte. Meme teinte (218 deg) et meme saturation (62 %) que le bleu illiCO, seule la
     luminosite change : #091325  #0c1a32  #2959ae  #5282d6  #8fb0e8  #7f93b5, et #facec8 #f9a596 #fdeae6
     pour le corail.
     polices (page 12)      Plus Jakarta Sans (principale)   Lora (secondaire, decorative uniquement)
   Chargee EN DERNIER par chaque module (apres son propre <style>), jamais par les templates de documents.
   Deux familles : <body class="theme-sombre"> (modules sur fond marine) et <body class="theme-clair">
   (modules sur fond clair, pilotes par des variables CSS). Les couleurs d'ETAT (vert / rouge / R0..R4)
   restent semantiques et n'ont pas ete touchees par la bascule 2026.
   REGLE DE LISIBILITE (re-mesuree le 30/09/2026, WCAG 4.5:1) : le bleu clair #5282d6 et le corail #f05b48
   ne portent JAMAIS de texte blanc (3,80 et 3,34) : sur eux le texte est sombre #1a1a1a (4,58 et 5,22).
   Sur fond blanc, le bleu clair de TEXTE est #2959ae (6,70) et le bleu illiCO #12284c (14,65).
   Sur le marine #091325, tout est lisible (4,88 a 18,56).
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */
/* Polices AUTO-HEBERGEES (dossier fonts/, sous-ensemble latin, woff2) : aucun appel a Google Fonts ajoute par le theme —
   les portails client / entreprise et la page de connexion n en faisaient aucun avant lui, ils n en font toujours aucun (RGPD, CSP font-src self). */
@font-face{font-family:'Raleway';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/raleway-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Raleway';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/raleway-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Raleway';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/raleway-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Raleway';font-style:normal;font-weight:800;font-display:swap;src:url('fonts/raleway-800-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/roboto-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/roboto-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/roboto-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

:root{
    --il-bleu:#12284c; --il-bleu-clair:#5282d6; --il-bleu-texte:#2959ae; --il-orange:#f05b48; --il-peche:#facec8;
    --il-marine:#091325; --il-marine-2:#0c1a32; --il-marine-3:#12284c;
    --il-clair:#dae5f4; --il-muted:#7f93b5; --il-bleu-clair-texte:#8fb0e8; --il-orange-texte:#f9a596; --il-encre:#12284c; --il-gris:#f2f5fa; --il-bleu-pale:#dae5f4;
    /* Charte 2026 p.12 : principale « Plus Jakarta Sans », secondaire « Lora » (decorative seule).
       Les .woff2 ne sont PAS encore dans fonts/ : tant qu'ils manquent, le navigateur retombe sur
       Raleway et Roboto auto-heberges ci-dessus — rien ne change a l'ecran, rien ne casse.
       Pour finir la bascule, sans jamais appeler Google Fonts (RGPD, CSP font-src self) :
         1. deposer dans fonts/ : plus-jakarta-sans-{400,600,700,800}-latin.woff2, lora-400-latin.woff2
         2. ajouter les @font-face correspondants au bloc ci-dessus, sur le meme modele
         3. retirer 'Raleway' et 'Roboto' des piles ci-dessous */
    --il-titre:'Plus Jakarta Sans','Raleway','Segoe UI',system-ui,sans-serif;
    --il-texte:'Plus Jakarta Sans','Roboto','Segoe UI',system-ui,sans-serif;
    --il-deco:'Lora',Georgia,'Times New Roman',serif;
}
body.theme-sombre,body.theme-clair{font-family:var(--il-texte)}
body.theme-sombre h1,body.theme-sombre h2,body.theme-sombre h3,body.theme-clair h1,body.theme-clair h2,body.theme-clair h3,
.theme-sombre .logo,.theme-sombre .header-title,.theme-sombre .module-title,.theme-sombre .section-title,.theme-sombre .ca-section-title,
.theme-sombre .chart-title,.theme-sombre .modal-title,.theme-clair .logo,.theme-clair .header-title,.theme-clair .modal-title{font-family:var(--il-titre)}

/* ── FAMILLE SOMBRE : fond marine derive du bleu illiCO ────────────────────────────────────────── */
body.theme-sombre{
    background:linear-gradient(160deg,#091325 0%,#0c1a32 55%,#0f4470 100%) fixed !important;
    /* variables lues par EFFIDASHBOARD (et tout module qui les reprend) */
    --illico-blue:#8fb0e8; --illico-orange:#f9a596; --illico-light-blue:rgba(82,130,214,.18);
    --bg-body:linear-gradient(160deg,#091325,#0c1a32);
    /* variables lues par EFFISUIVI-like */
    --blue:#8fb0e8; --bg:#091325; --bg2:#0c1a32;
}
.theme-sombre a:not(.btn):not([class*="btn"]){color:#8fb0e8}
.theme-sombre .leaflet-container a,.theme-sombre .leaflet-control a{color:#12284c !important}
/* Marque : texte blanc Raleway, plus de degrade cyan en texte */
.theme-sombre .logo,.theme-sombre .header-title{background:none !important;-webkit-background-clip:initial !important;-webkit-text-fill-color:#fff !important;color:#fff !important;font-weight:800;letter-spacing:.01em}
.theme-sombre .logo-icon,.theme-sombre .user-avatar,.theme-sombre .publi-avatar,.theme-sombre .upload-icon{background:linear-gradient(135deg,#12284c,#5282d6) !important;color:#fff !important}
/* Boutons principaux : bleu illiCO plein, texte blanc (7,6) */
.theme-sombre .btn-primary,.theme-sombre .btn-import,.theme-sombre .btn-refresh,.theme-sombre .memo-popup-footer .btn-voir,.theme-sombre .compare-toggle-bar button.active{background:#12284c !important;background-image:none !important;color:#fff !important;border-color:#12284c !important;animation:none !important;box-shadow:none}
.theme-sombre .btn-primary:hover,.theme-sombre .btn-import:hover,.theme-sombre .btn-refresh:hover{background:#2959ae !important}
/* Onglets et filtres actifs : bleu illiCO plein avec un lisere bleu clair (pas de degrade sous du texte blanc) */
.theme-sombre .tab.active,.theme-sombre .main-tab.active,.theme-sombre .tab-btn.active,.theme-sombre .filter-btn.active,.theme-sombre .notif-tab.active,
.theme-sombre .phase-btn.active,.theme-sombre .mode-card.active,.theme-sombre .view-btn.active,.theme-sombre .zoom-btn.active{background:#12284c !important;background-image:none !important;color:#fff !important;border-color:transparent !important;box-shadow:inset 0 -3px 0 #5282d6 !important}
/* Chiffres mis en avant : bleu clair en aplat (5,2 sur marine), plus de degrade en texte */
.theme-sombre .stat-value,.theme-sombre .kpi-card.blue .kpi-value,.theme-sombre .analysis-stat-value,.theme-sombre .collab-stat-value,.theme-sombre .import-stat-val,
.theme-sombre .progress-percent,.theme-sombre .month-collab-total,.theme-sombre .stat-card .stat-value,.theme-sombre .summary-card.info .value{background:none !important;-webkit-background-clip:initial !important;-webkit-text-fill-color:#8fb0e8 !important;color:#8fb0e8 !important}
.theme-sombre .stat-card.active .stat-value,.theme-sombre .stat-card.highlight .stat-value,.theme-sombre .kpi-card.green .kpi-value{-webkit-text-fill-color:#38ef7d !important;color:#38ef7d !important}
.theme-sombre .kpi-card.blue::before,.theme-sombre .progress-fill,.theme-sombre .import-progress-fill,.theme-sombre .upload-progress-fill,.theme-sombre .bar-fill,.theme-sombre .percentile-bar{background:linear-gradient(90deg,#12284c,#5282d6) !important}
/* En-tete de l'Accueil : boutons a style en ligne */
.theme-sombre #btn2fa,.theme-sombre .btn[onclick="openGlobalSearch()"]{background:#12284c !important;background-image:none !important;color:#fff !important}
.theme-sombre .notif-bell{background:#f05b48 !important;background-image:none !important;color:#1a1a1a !important}
/* Cartes de l'Accueil : bandeau et icone aux couleurs de la charte, titre bleu illiCO (7,6 sur blanc) */
.theme-sombre .module-card::before{background:linear-gradient(90deg,#12284c 0%,#5282d6 60%,#f05b48 100%) !important}
.theme-sombre .module-card .module-icon{background:linear-gradient(135deg,#12284c,#5282d6) !important}
.theme-sombre .module-title{background:none !important;-webkit-background-clip:initial !important;-webkit-text-fill-color:#12284c !important;color:#12284c !important}
.theme-sombre .module-badge{background:#f05b48 !important;color:#1a1a1a !important;font-weight:700}
.theme-sombre .module-badge.new{background:#f05b48 !important;color:#1a1a1a !important}
.theme-sombre .module-badge.admin,.theme-sombre .role-badge.admin,.theme-sombre .role-badge{background:#12284c !important;color:#fff !important;background-image:none !important}
.theme-sombre .notif-count{background:#f05b48 !important;color:#1a1a1a !important}
.theme-sombre .notif-item.unread{border-left-color:#5282d6 !important;background:rgba(82,130,214,.10) !important}
.theme-sombre .notif-client-name,.theme-sombre .notif-footer a,.theme-sombre .notif-dropdown-header a,.theme-sombre .memo-banner-link,.theme-sombre .breadcrumb a{color:#8fb0e8 !important}
.theme-sombre .memo-popup-header{background:linear-gradient(135deg,#12284c,#2959ae) !important}
.theme-sombre .memo-popup-item.aujourdhui{border-left-color:#f05b48 !important}
/* En-tetes de fenetres et de sections */
.theme-sombre .modal-header,.theme-sombre .dossier-modal-header,.theme-sombre .files-header,.theme-sombre .checklist-header,.theme-sombre .month-header,.theme-sombre .result-section,.theme-sombre .info-card{background:linear-gradient(135deg,#091325,#12284c) !important;color:#fff}
.theme-sombre .section-title,.theme-sombre .ca-section-title,.theme-sombre .simu-section-title{color:#fff}
.theme-sombre .section-title::before,.theme-sombre .ca-section-title::before{background:#5282d6 !important}
/* Kanban EFFICLIENTS : colonnes aux tons de la charte, texte lisible sur chacune (mesure : 10,9 / 7,6 / 5,4 / 6,5 / 5,7 / 5,5) */
.theme-sombre .column-header.r0{background:#12284c !important;color:#fff !important}
.theme-sombre .column-header.r1{background:#12284c !important;color:#fff !important}
.theme-sombre .column-header.r2{background:#2959ae !important;color:#fff !important}
.theme-sombre .column-header.r3{background:#f05b48 !important;color:#1a1a1a !important}
.theme-sombre .column-header.r3 .column-count{background:rgba(0,0,0,.18) !important;color:#1a1a1a !important}
.theme-sombre .column-header.r4{background:#4b6a85 !important;color:#fff !important}
.theme-sombre .column-header.sans-suite{background:#5f6b76 !important;color:#fff !important}
.theme-sombre .column-cards.drag-over{background:rgba(82,130,214,.18) !important;border-color:#5282d6 !important}
.theme-sombre .card-suivi{color:#12284c !important}
.theme-sombre .card-demarrage{color:#c65a12 !important}
.theme-sombre .card-next{background:#dae5f4 !important;color:#12284c !important}
.theme-sombre .client-card.age-warm{border-left-color:#f05b48 !important}
.theme-sombre .mob-tab.active{background:#12284c !important;color:#fff !important}
/* Chantier / Binome : accents orange charte, boutons de filtre bleus */
.theme-sombre .card.orange,.theme-sombre .card.warm{border-left-color:#f05b48 !important}
.theme-sombre .jauge .fill.orange,.theme-sombre .feu.orange{background:#f05b48 !important}
.theme-sombre .feu.orange{color:#1a1a1a !important}
.theme-sombre .feu.rouge{color:#fca5a5 !important}
.theme-sombre .synth-pill.warn{color:#f9a596 !important}
.theme-sombre .search-input:focus,.theme-sombre .simu-param input:focus,.theme-sombre .obj-input:focus,.theme-sombre .form-group input:focus{border-color:#5282d6 !important;outline-color:#5282d6}
.theme-sombre thead th.sorted,.theme-sombre thead th.sorted .sort-icon{color:#8fb0e8 !important}
.theme-sombre .card.selected{border-color:#5282d6 !important;box-shadow:0 0 0 1px #5282d6 inset !important}
.theme-sombre .kpi-card.editable:hover,.theme-sombre .folder-card:hover,.theme-sombre .upload-zone:hover,.theme-sombre .drop-zone:hover,.theme-sombre .drop-zone.dragover,.theme-sombre .dossier-item:hover,.theme-sombre .import-zone:hover,.theme-sombre .import-card:hover{border-color:#5282d6 !important;background:rgba(82,130,214,.10) !important}
.theme-sombre select option,.theme-sombre .filters select option,.theme-sombre .filter-select option{background:#0c1a32 !important;color:#fff}
.theme-sombre .role-badge{background:#12284c !important}
.theme-sombre .toast.success{background:#12284c !important}
.theme-sombre .agence-badge.brive{background:#12284c !important;color:#fff !important}
.theme-sombre .agence-badge.tulle{background:#f05b48 !important;color:#1a1a1a !important}
.theme-sombre .agence-badge.terrasson{background:#2959ae !important;color:#fff !important}
/* EFFIPILOTAGE : bouton SOFIRENO et onglets */
.theme-sombre .tab.sofireno,.theme-sombre .tab[onclick*="sofireno"]{background:#f05b48 !important;color:#1a1a1a !important}
/* EFFIPILOTAGE : tuiles KPI a degrade en ligne (violet ecart, rose carnet) */
.theme-sombre .kpi-card[style*="#667eea"]{background:linear-gradient(135deg,#12284c,#2959ae) !important}
.theme-sombre .kpi-card[style*="#f093fb"]{background:linear-gradient(135deg,#f9a596,#f05b48) !important}
.theme-sombre .kpi-card[style*="#f093fb"] *{color:#1a1a1a !important}
.theme-sombre .kpi-card.purple::before{background:#12284c !important}
/* Barres du Dashboard */
.theme-sombre .objectif-bar{border-color:rgba(82,130,214,.35) !important}

/* ── FAMILLE CLAIRE : modules pilotes par des variables, portails, agenda ─────────────────────── */
body.theme-clair{
    background:#f2f5fa;
    /* Memo / Prescripteurs / Guide / Newsletter / Evenements */
    --blue:#12284c; --blue-light:#dae5f4; --orange:#f05b48; --orange-light:#fdeae6; --purple:#2959ae; --purple-light:#dae5f4; --cyan:#5282d6;
    /* EDB */
    --primary:#12284c; --primary-dark:#091325; --secondary:#f05b48;
    /* Portails */
    --primary-light:#2959ae;
    /* Contenu / Claude */
    --dark:#091325; --soft:#dae5f4; --plan:#2959ae;
    /* estimo (non charge : template, laisse tel quel) */
}
.theme-clair .btn-primary{background:#12284c !important;background-image:none !important;color:#fff !important;border-color:#12284c !important}
.theme-clair .btn-primary:hover{background:#2959ae !important}
.theme-clair .header,.theme-clair header.header{background:#12284c !important;background-image:none !important}
.theme-clair .header .logo,.theme-clair .header h1,.theme-clair .header-title{color:#fff !important;-webkit-text-fill-color:#fff !important;background:none !important}
.theme-clair .tab-btn.active,.theme-clair .view-btn.active,.theme-clair .agence-day-tab.active,.theme-clair .tab.active{background:#12284c !important;color:#fff !important;border-color:#12284c !important}
.theme-clair .fab{background:#f05b48 !important;color:#1a1a1a !important}
.theme-clair .current-period,.theme-clair .day-title,.theme-clair .modal-title,.theme-clair .modal-info-value,.theme-clair .intro h2{color:#12284c !important}
.theme-clair .day-number{color:#2959ae !important}
.theme-clair .agency-header.brive,.theme-clair .btn-review.brive,.theme-clair .agency.brive{background:#12284c !important;color:#fff !important}
.theme-clair .agency-header.tulle,.theme-clair .btn-review.tulle,.theme-clair .agency.tulle{background:#f05b48 !important;color:#1a1a1a !important}
.theme-clair .agency-header.terrasson,.theme-clair .btn-review.terrasson,.theme-clair .agency.terrasson{background:#2959ae !important;color:#fff !important}
.theme-clair .btn-print{background:#12284c !important;color:#fff !important}
.theme-clair .form-group input:focus,.theme-clair .form-group select:focus,.theme-clair .form-group textarea:focus,.theme-clair .filter-select:focus{border-color:#5282d6 !important}

/* ── PORTAILS client / entreprise (s154) : identite illiCO travaux vue par le client ─────────────── */
.theme-clair.portail .header{background:#12284c !important;background-image:none !important}
.theme-clair.portail h1.brand{display:flex;align-items:center;gap:14px;margin:0;font-family:var(--il-titre);font-size:1.05rem;font-weight:600;color:#fff;letter-spacing:.01em}
.theme-clair.portail .brand-logo{height:46px;width:auto;display:block}
.theme-clair.portail .brand-sep{width:1px;height:28px;background:rgba(255,255,255,.35)}
.theme-clair.portail .brand-title{color:#fff;opacity:.95}
/* Action principale : orange de la charte avec texte sombre (le blanc n y est pas lisible : 2,7) */
.theme-clair.portail .btn-primary{background:#f05b48 !important;background-image:none !important;color:#1a1a1a !important;border-color:#f05b48 !important;font-weight:700}
.theme-clair.portail .btn-primary:hover{background:#e0651a !important;color:#1a1a1a !important}
/* Boutons secondaires (telecharger, consulter) : bleu illiCO */
.theme-clair.portail .doc-dl,.theme-clair.portail .btn-download{background:#12284c !important;color:#fff !important;border:none}
.theme-clair.portail .doc-dl:hover{background:#2959ae !important}
/* Onglets, titres de section, liens */
.theme-clair.portail .tab.active{background:#12284c !important;color:#fff !important}
.theme-clair.portail .section-title{color:#12284c;border-bottom-color:#f05b48;font-family:var(--il-titre)}
.theme-clair.portail .project-card h3,.theme-clair.portail .project-card .title{color:#12284c}
.theme-clair.portail a:not(.btn){color:#2959ae}
/* Pied de page */
.theme-clair.portail .portail-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:32px auto 0;padding:14px 24px;max-width:1100px;font-size:.78rem;color:#4b5b6b;border-top:1px solid #e2e8f0}
.theme-clair.portail .portail-footer b{color:#12284c}
.theme-clair.portail .portail-footer a{color:#2959ae}
@media (max-width:600px){.theme-clair.portail .brand-logo{height:30px}.theme-clair.portail .brand-title{display:none}}

/* Textes secondaires des portails : gris un cran plus fonce (4,4 -> 5,1 sur le fond) */
.theme-clair.portail{--muted:#546575}
