/* ═══════════════════════════════════════════════════════════════════════════
   🎨 ATLAS MAPPER 360° - SYSTÈME DE THÈMES MULTI-AGENCES
   Permet de changer les couleurs de l'interface via ?theme=nom-agence
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   THÈME PAR DÉFAUT (Atlas Mapper - Indigo/Purple)
   ─────────────────────────────────────────────────────────────────────────── */
:root {
    /* Couleurs principales */
    --theme-primary: #6366f1;
    --theme-primary-light: #818cf8;
    --theme-primary-dark: #4f46e5;
    --theme-secondary: #a855f7;
    --theme-accent: #22d3ee;

    /* Couleurs de fond */
    --theme-bg-dark: #0f172a;
    --theme-bg-medium: #1e293b;
    --theme-bg-light: #334155;

    /* Couleurs de texte */
    --theme-text-primary: #f8fafc;
    --theme-text-secondary: #94a3b8;
    --theme-text-muted: #64748b;

    /* Glassmorphism */
    --theme-glass-bg: rgba(15, 23, 42, 0.85);
    --theme-glass-border: rgba(255, 255, 255, 0.1);

    /* Logo / Branding */
    --theme-logo-gradient-start: #6366f1;
    --theme-logo-gradient-end: #a855f7;

    /* Nom de l'agence (optionnel) */
    --theme-agency-name: "Atlas Mapper 360°";
}

/* ─────────────────────────────────────────────────────────────────────────────
   THÈME ADECCO (Rouge Cardinal #CC1E2B + Bleu Tory #0E56A2)
   ─────────────────────────────────────────────────────────────────────────── */
[data-theme="adecco"] {
    /* Couleurs ADECCO officielles */
    --theme-primary: #CC1E2B;
    /* Rouge Cardinal */
    --theme-primary-light: #E63946;
    --theme-primary-dark: #A31621;
    --theme-secondary: #0E56A2;
    /* Bleu Tory */
    --theme-accent: #0E56A2;

    /* Dégradé logo ADECCO */
    --theme-logo-gradient-start: #CC1E2B;
    --theme-logo-gradient-end: #0E56A2;

    /* Glass avec teinte rouge subtile */
    --theme-glass-bg: rgba(20, 15, 20, 0.9);
    --theme-glass-border: rgba(204, 30, 43, 0.2);

    /* Nom affiché */
    --theme-agency-name: "ADECCO Virtual Tours";
}

/* ─────────────────────────────────────────────────────────────────────────────
   THÈME MANPOWER (Bleu #003087 + Jaune #FFD100)
   ─────────────────────────────────────────────────────────────────────────── */
[data-theme="manpower"] {
    --theme-primary: #003087;
    --theme-primary-light: #0050B8;
    --theme-primary-dark: #002060;
    --theme-secondary: #FFD100;
    --theme-accent: #FFD100;

    --theme-logo-gradient-start: #003087;
    --theme-logo-gradient-end: #FFD100;

    --theme-glass-bg: rgba(0, 20, 50, 0.9);
    --theme-glass-border: rgba(0, 48, 135, 0.3);

    --theme-agency-name: "Manpower Virtual Tours";
}

/* ─────────────────────────────────────────────────────────────────────────────
   THÈME RANDSTAD (Bleu #003366 + Orange #FF6600)
   ─────────────────────────────────────────────────────────────────────────── */
[data-theme="randstad"] {
    --theme-primary: #003366;
    --theme-primary-light: #004C99;
    --theme-primary-dark: #002244;
    --theme-secondary: #FF6600;
    --theme-accent: #FF6600;

    --theme-logo-gradient-start: #003366;
    --theme-logo-gradient-end: #FF6600;

    --theme-glass-bg: rgba(0, 25, 50, 0.9);
    --theme-glass-border: rgba(0, 51, 102, 0.3);

    --theme-agency-name: "Randstad Virtual Tours";
}

/* ─────────────────────────────────────────────────────────────────────────────
   THÈME SYNERGIE (Vert #00A651 + Gris #58595B)
   ─────────────────────────────────────────────────────────────────────────── */
[data-theme="synergie"] {
    --theme-primary: #00A651;
    --theme-primary-light: #00C962;
    --theme-primary-dark: #008040;
    --theme-secondary: #58595B;
    --theme-accent: #00A651;

    --theme-logo-gradient-start: #00A651;
    --theme-logo-gradient-end: #58595B;

    --theme-glass-bg: rgba(10, 30, 20, 0.9);
    --theme-glass-border: rgba(0, 166, 81, 0.2);

    --theme-agency-name: "Synergie Virtual Tours";
}

/* ─────────────────────────────────────────────────────────────────────────────
   THÈME PROMAN (Orange #F7931E + Noir #231F20)
   ─────────────────────────────────────────────────────────────────────────── */
[data-theme="proman"] {
    --theme-primary: #F7931E;
    --theme-primary-light: #FFAB40;
    --theme-primary-dark: #D97B00;
    --theme-secondary: #231F20;
    --theme-accent: #F7931E;

    --theme-logo-gradient-start: #F7931E;
    --theme-logo-gradient-end: #231F20;

    --theme-glass-bg: rgba(35, 31, 32, 0.9);
    --theme-glass-border: rgba(247, 147, 30, 0.2);

    --theme-agency-name: "Proman Virtual Tours";
}

/* ─────────────────────────────────────────────────────────────────────────────
   APPLICATION DES VARIABLES AU STYLE EXISTANT
   ─────────────────────────────────────────────────────────────────────────── */

/* Header Logo */
.glass-panel .bg-gradient-to-br.from-indigo-500.to-purple-600,
[data-theme] .logo-gradient {
    background: linear-gradient(135deg, var(--theme-logo-gradient-start), var(--theme-logo-gradient-end)) !important;
}

/* Badges et boutons actifs */
[data-theme] .bg-indigo-500\/20,
[data-theme] .bg-indigo-600\/20,
[data-theme] .bg-indigo-600\/30 {
    background-color: color-mix(in srgb, var(--theme-primary) 20%, transparent) !important;
}

[data-theme] .bg-indigo-500,
[data-theme] .bg-indigo-600 {
    background-color: var(--theme-primary) !important;
}

[data-theme] .hover\:bg-indigo-500:hover,
[data-theme] .hover\:bg-indigo-600:hover {
    background-color: var(--theme-primary-light) !important;
}

/* Texte coloré */
[data-theme] .text-indigo-400,
[data-theme] .text-indigo-300 {
    color: var(--theme-primary-light) !important;
}

[data-theme] .text-indigo-500,
[data-theme] .text-indigo-600 {
    color: var(--theme-primary) !important;
}

/* Bordures */
[data-theme] .border-indigo-500\/20,
[data-theme] .border-indigo-500\/30 {
    border-color: color-mix(in srgb, var(--theme-primary) 30%, transparent) !important;
}

/* Shadows */
[data-theme] .shadow-indigo-500\/20,
[data-theme] .shadow-indigo-600\/20 {
    --tw-shadow-color: color-mix(in srgb, var(--theme-primary) 20%, transparent);
}

/* Focus rings */
[data-theme] .ring-indigo-500\/50 {
    --tw-ring-color: color-mix(in srgb, var(--theme-primary) 50%, transparent) !important;
}

/* Glass panels avec thème */
[data-theme] .glass-panel {
    background: var(--theme-glass-bg);
    border-color: var(--theme-glass-border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BADGE AGENCE (Optionnel - Affiché si thème actif)
   ─────────────────────────────────────────────────────────────────────────── */
.agency-badge {
    display: none;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    color: white;
    animation: agencyPulse 3s ease-in-out infinite;
}

[data-theme]:not([data-theme=""]) .agency-badge {
    display: inline-block;
}

@keyframes agencyPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   MODE IMPRESSION / ACCESSIBILITÉ
   ─────────────────────────────────────────────────────────────────────────── */
@media print {

    :root,
    [data-theme] {
        --theme-bg-dark: #ffffff;
        --theme-text-primary: #000000;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {

    :root,
    [data-theme] {
        --theme-glass-bg: rgba(0, 0, 0, 0.95);
        --theme-glass-border: rgba(255, 255, 255, 0.3);
    }
}