           
      :root {
            color-scheme: light;

            --bg-page: #e5e9ef;
            --bg-panel: #ffffff;
            --bg-input: #ffffff;
            --text-main: #243447;
            --text-secondary: #667085;
            --border-color: #d0d5dd;

            --bg-dolibarr: #f1f5f9;
            --border-dolibarr: #94a3b8;

            --bg-ia: #eff6ff;
            --border-ia: #3b82f6;
        }

        [data-theme="dark"] {
            color-scheme: dark;

            --bg-page: #111827;
            --bg-panel: #1f2937;
            --bg-input: #374151;
            --text-main: #f3f4f6;
            --text-secondary: #cbd5e1;
            --border-color: #4b5563;

            --bg-dolibarr: #273449;
            --border-dolibarr: #64748b;

            --bg-ia: #172b46;
            --border-ia: #60a5fa;
        }
                body {
            font-family: Arial, sans-serif;
            background: var(--bg-page);
            color: var(--text-main);
            margin: 0;
            padding: 40px 20px;
            transition: background 0.25s, color 0.25s;
        }

        .container {
            max-width: 750px;
            margin: auto;
            background: var(--bg-panel);
            padding: 35px;
            border-radius: 12px;
            box-shadow: 0 4px 20px #00000012;
        }

        h1 {
            color: var(--text-main);
        }

        p {
            color: var(--text-secondary);
        }

        input, textarea {
            padding: 12px;
            background: var(--bg-input);
            color: var(--text-main);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            box-sizing: border-box;
        }

        input[name="reference"] {
            width: 70%;
        }

        button {
            padding: 12px 18px;
            background: #2563eb;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
        }

        button:hover {
            background: #1d4ed8;
        }

        .barre-outils {
            position: fixed;
            top: 15px;
            right: 20px;
            z-index: 1000;

            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;

            padding: 10px 14px;
            background: var(--bg-panel);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 4px 16px #00000030;
        }

        #bouton-theme {
            padding: 8px 12px;
            font-size: 18px;
            line-height: 1.2;
        }

        .infos-session {
            display: flex;
            align-items: center;
            gap: 14px;
            color: var(--text-main);
            font-size: 14px;
        }

        .utilisateur-session {
            display: flex;
            align-items: center;
            gap: 7px;
            padding: 7px 11px;
            background: var(--bg-page);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-weight: 500;
            white-space: nowrap;
        }

        #horloge-session {
            color: var(--text-secondary);
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        @media (max-width: 600px) {
            .barre-outils {
                top: 8px;
                right: 8px;
                padding: 7px;
                gap: 8px;
            }

            .infos-session {
                gap: 8px;
                font-size: 11px;
            }

            .utilisateur-session {
                padding: 6px;
            }
        }
      /* Decalage lors du defilement automatique */
#fiche-commerciale {
    scroll-margin-top: 25px;
}


/* ==========================================
   Portail general SIRU IA
   Creation : 24/11/2026
   ========================================== */

.portail {
    max-width: 1100px;
    margin: 45px auto 0;
}

.portail-entete {
    margin-bottom: 35px;
}

.portail-marque {
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
}

.portail-marque span {
    color: #3b82f6;
}

.portail-entete h1 {
    font-size: 34px;
    margin: 30px 0 10px;
}

.grille-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.module-ia {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 25px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    box-sizing: border-box;
    transition: transform .2s, border-color .2s,
                box-shadow .2s;
}

.module-actif {
    border-color: var(--border-ia);
}

.module-actif:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 6px 20px #00000020;
}

.icone-module {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--border-ia);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.module-ia h2 {
    font-size: 20px;
    margin: 20px 0 5px;
}

.module-ia p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.module-lien {
    margin-top: auto;
    color: var(--border-ia);
    font-size: 14px;
    font-weight: bold;
}

.module-futur {
    opacity: .65;
}

.module-futur .icone-module {
    stroke: var(--text-secondary);
}

.module-statut {
    margin-top: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.portail-pied {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 35px;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

@media (max-width: 900px) {
    .grille-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .grille-modules {
        grid-template-columns: 1fr;
    }

    .portail-entete h1 {
        font-size: 27px;
    }
}


/* ==========================================
   Architecture graphique commune SIRU IA
   Navigation laterale flottante
   Creation : 24/11/2026
   ========================================== */

:root {
    --largeur-colonne: 370px;
    --espace-colonne: 60px;
    --marge-exterieure: 25px;
}

body {
    padding: var(--marge-exterieure);
    padding-right: calc(
        var(--largeur-colonne) +
        var(--espace-colonne) +
        var(--marge-exterieure)
    );
}

/* Espace de travail principal */

.container {
    max-width: none;
    margin: 0 auto;
}

.portail {
    max-width: none;
    margin: 0 auto;
}

/* Colonne flottante commune */

.colonne-plateforme {
    position: fixed;
    top: var(--marge-exterieure);
    right: var(--marge-exterieure);
    width: var(--largeur-colonne);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
}

/* Barre de session */

.colonne-plateforme .barre-outils {
    position: static;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
}

.colonne-plateforme .infos-session {
    flex-wrap: wrap;
    gap: 8px;
}

/* Navigation */

.navigation-plateforme {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 16px #00000015;
}

.navigation-titre {
    padding: 5px 12px 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.navigation-plateforme a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}

.navigation-plateforme a:hover {
    background: var(--bg-page);
}

.navigation-plateforme .navigation-active {
    background: var(--bg-ia);
    color: var(--border-ia);
    font-weight: bold;
}

.navigation-plateforme svg {
    flex-shrink: 0;
}

/* Adaptation aux resolutions intermediaires */

@media (max-width: 1500px) {
    :root {
        --largeur-colonne: 340px;
        --espace-colonne: 40px;
    }

    .grille-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Adaptation aux petits ecrans */

@media (max-width: 1050px) {
    body {
        padding: 20px;
    }

    .colonne-plateforme {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 30px;
    }

    .navigation-plateforme {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .navigation-titre {
        display: none;
    }

    .navigation-plateforme a {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .grille-modules {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 20px;
    }

    .navigation-plateforme a {
        font-size: 12px;
        gap: 6px;
        padding: 10px 6px;
    }
}

/* Proportions des espaces de travail */

.portail {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (min-width: 1501px) {
    :root {
        --espace-colonne: 100px;
    }
}

@media (min-width: 1051px) {
    .portail, .container {
        width: 90%;
    }
}


/* ==========================================
   SIRU Identity - Panneau de session commun
   Date : 01/12/2026
   Reference : 114.6.3.3.2
   ========================================== */

.colonne-plateforme .identity-barre-commune {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.identity-barre-commune .infos-session {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.identity-barre-commune .utilisateur-session {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
}

.identity-barre-commune .utilisateur-session svg {
    flex-shrink: 0;
}

.identity-panneau-commun {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

#identity-role-commun {
    font-size: 13px;
    color: var(--text-main);
}

#identity-etat-commun {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#identity-etat-commun.identity-session-valide {
    color: #15803d;
}

[data-theme="dark"] #identity-etat-commun.identity-session-valide {
    color: #4ade80;
}

.identity-echeance-commune {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.identity-echeance-commune strong {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#identity-deconnexion-commun {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-page);
    color: var(--text-main);
    cursor: pointer;
}

#identity-deconnexion-commun:hover {
    border-color: #ef4444;
}

#identity-deconnexion-commun:disabled {
    opacity: 0.6;
    cursor: wait;
}


/* ==========================================
   SIRU - Selecteur radial commun
   Reference : 114.7.6.3.1
   ========================================== */

.theme-radial {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    z-index: 1100;
    overflow: visible;
    --theme-cercle: #e4edf9;
    --theme-bleu: #2563eb;
    --theme-bordure: #b6cbe8;
}

[data-theme="dark"] .theme-radial {
    --theme-cercle: #263449;
    --theme-bleu: #60a5fa;
    --theme-bordure: #3b5272;
}

.theme-radial #bouton-theme,
.theme-radial #identity-theme,
.theme-radial .theme-radial-option,
.portail-general .theme-radial button {
    position: relative;
    inset: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    border-radius: 50%;
    border: 1px solid var(--theme-bordure);
    background: var(--theme-cercle);
    color: var(--theme-bleu);
    cursor: pointer;
}

.theme-radial button:hover {
    filter: brightness(1.15);
}

.theme-radial button:focus-visible {
    outline: 2px solid var(--theme-bleu);
    outline-offset: 3px;
}

.theme-radial .theme-radial-options {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.theme-radial .theme-radial-option {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(0, 0) scale(.65);
    transition:
        transform 220ms cubic-bezier(.2,.8,.25,1),
        opacity 160ms ease,
        visibility 220ms;
}

/* Rayon 86px ; angles 15, 45 et 75 degres. */

.theme-radial-light {
    --theme-x: -83.07px;
    --theme-y: 22.26px;
}

.theme-radial-dark {
    --theme-x: -60.81px;
    --theme-y: 60.81px;
}

.theme-radial-system {
    --theme-x: -22.26px;
    --theme-y: 83.07px;
}

.theme-radial-ouvert .theme-radial-option {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform:
        translate(var(--theme-x), var(--theme-y))
        scale(1);
}

.theme-radial-ouvert .theme-radial-dark {
    transition-delay: 25ms;
}

.theme-radial-ouvert .theme-radial-system {
    transition-delay: 50ms;
}

.theme-radial-option[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--theme-bleu);
}

/* Autorise le deploiement hors du panneau lateral. */

.colonne-plateforme {
    overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
    .theme-radial button {
        transition: none !important;
    }
}


/* Correction des interactions du selecteur radial.
   Reference : 114.7.6.3.3 */

.theme-radial .theme-radial-principal {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.theme-radial .theme-radial-options {
    z-index: 1;
    pointer-events: none;
}

.theme-radial:not(.theme-radial-ouvert)
.theme-radial-option {
    pointer-events: none !important;
}

.theme-radial.theme-radial-ouvert
.theme-radial-option {
    pointer-events: auto;
}


/* Correction de la propagation des clics SVG.
   Reference : 114.7.6.3.5 */

.theme-radial svg,
.theme-radial svg * {
    pointer-events: none;
}


/* ==========================================
   SIRU Identity - Bouclier commun
   Reference : 114.7.6.4.2
   Date : 02/12/2026
   ========================================== */

.identity-barre-compacte {
    --identity-vert: #15803d;
    --identity-survol: #e4e9f0;
}

[data-theme="dark"] .identity-barre-compacte {
    --identity-vert: #22b965;
    --identity-survol: #374151;
}

.colonne-plateforme .identity-barre-compacte {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.identity-titre-compact {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

.identity-barre-compacte [hidden] {
    display: none !important;
}

.identity-barre-compacte #portail-securite,
.identity-barre-compacte #identity-deconnexion-commun {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 9px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-main);
    box-sizing: border-box;
    cursor: pointer;
}

.identity-barre-compacte #portail-securite:hover,
.identity-barre-compacte #identity-deconnexion-commun:hover {
    background: var(--identity-survol);
}

.identity-barre-compacte #portail-securite {
    color: var(--text-secondary);
}

.identity-barre-compacte #portail-securite.session-valide {
    color: var(--identity-vert);
}

.identity-barre-compacte #portail-securite svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#portail-securite svg,
#portail-securite svg * {
    pointer-events: none;
}

.identity-barre-compacte #portail-session {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(300px, calc(100vw - 80px));
    padding: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 8px 30px #00000030;
    box-sizing: border-box;
    z-index: 1090;
}

.identity-barre-compacte .identity-panneau-commun {
    font-size: 13px;
    gap: 14px;
}

.identity-barre-compacte .infos-session {
    gap: 8px;
    align-items: flex-start;
}

.identity-barre-compacte button:focus-visible {
    outline: 2px solid var(--border-ia);
    outline-offset: 3px;
}

.portail-general
.identity-barre-compacte #portail-securite.session-valide {
    color: var(--portail-vert);
}

@media (max-width: 400px) {
    .identity-titre-compact {
        font-size: 11px;
    }
}


/* ==========================================
   SIRU - Harmonisation graphique commune
   Reference : 114.7.6.5.1
   Date : 02/12/2026
   ========================================== */

:root {
    --ombre-panneau: 0 4px 14px #00000012;
    --ombre-survol: 0 7px 22px #00000020;
}

[data-theme="dark"] {
    --ombre-panneau: 0 5px 16px #00000035;
    --ombre-survol: 0 8px 24px #00000050;
}

/* Alignement de la colonne laterale. */

.colonne-plateforme {
    gap: 15px;
}

.colonne-plateforme .identity-barre-compacte {
    position: relative;
    inset: auto;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.colonne-plateforme .navigation-plateforme {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Relief commun des panneaux. */

.colonne-plateforme .barre-outils,
.navigation-plateforme,
.container,
.module-ia,
.portail-general .portail {
    box-shadow: var(--ombre-panneau);
}

.module-actif:hover {
    box-shadow: var(--ombre-survol);
}
