/**
 * Thème Centralisé Purple Telecom - FICHIER UNIQUE
 * Emplacement : /home/yqqyvar/domains/purpletelecom.fr/public_html/assets/css/theme-purple-telecom.css
 * Permissions : 0644
 * Version : 3.0.0 - TOUT CENTRALISÉ ICI
 * 
 * CE FICHIER CONTRÔLE TOUT LE SITE
 * Un seul fichier = changement global instantané
 */

/* ============================================
   PARTIE 1 : VARIABLES GLOBALES
   ============================================ */
:root {
  /* ========== COULEURS PRINCIPALES ========== */
  /* Violet Purple Telecom */
  --purple-primary: #9b59b6;
  --purple-hover: #8e44ad;
  --purple-dark: #7d4199;
  --purple-light: #bb8fce;
  --purple-pale: #e8daef;
  
  /* Bleu technologique */
  --blue-primary: #3498db;
  --blue-hover: #2980b9;
  --blue-dark: #1e5f8e;
  --blue-light: #5dade2;
  --blue-pale: #ebf5fb;
  
  /* Vert succès */
  --green-success: #10B981;
  --green-hover: #059669;
  --green-dark: #047857;
  --green-light: #34D399;
  --green-pale: #ECFDF5;
  
  /* Rouge erreur */
  --red-error: #EF4444;
  --red-hover: #DC2626;
  --red-dark: #B91C1C;
  --red-light: #F87171;
  --red-pale: #FEE2E2;
  
  /* Orange warning */
  --orange-warning: #F59E0B;
  --orange-hover: #D97706;
  --orange-dark: #B45309;
  --orange-light: #FBD38D;
  --orange-pale: #FEF3C7;
  
  /* ========== GRIS (IMPORTANT POUR COOKIES) ========== */
  --gray-light: #f8f9fa;
  --gray-medium: #e9ecef;
  --gray-dark: #495057;
  
  /* ========== TEXTES ========== */
  --text-primary: #203859;
  --text-secondary: #4a4a6a;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #FFFFFF;
  
  /* ========== BACKGROUNDS ========== */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  --bg-dark: #0f172a;
  --bg-overlay: rgba(0,0,0,0.5);
  
  /* ========== BORDURES ========== */
  --border-light: #E5E7EB;
  --border-default: #D1D5DB;
  --border-dark: #9CA3AF;
  --border-purple: rgba(155, 89, 182, 0.15);
  
  /* ========== GRADIENTS ========== */
  --gradient-purple: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  --gradient-blue: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  --gradient-mixed: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
  
  /* ========== OMBRES ========== */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --shadow-purple: 0 10px 30px rgba(155,89,182,0.25);
  --shadow-blue: 0 10px 30px rgba(52,152,219,0.25);
  
  /* ========== ANIMATIONS ========== */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* ========== ESPACEMENTS ========== */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* ========== BORDER RADIUS ========== */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-2xl: 30px;
  --radius-full: 9999px;
  
  /* ========== TYPOGRAPHIE ========== */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;
  
  /* ========== Z-INDEX ========== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-notification: 800;
  --z-cookies: 9997;
  --z-cookies-panel: 9999;
}

/* ============================================
   PARTIE 2 : STYLES DU FOOTER
   ============================================ */
.purple-footer {
    position: relative;
    background: transparent;
    margin-top: 80px;
    font-family: var(--font-primary);
}

.footer-wave {
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.footer-wave svg {
    width: 100%;
    height: 100%;
}

.footer-content {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 40px 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-logo .logo-purple {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo .logo-telecom {
    color: var(--text-primary);
}

.footer-logo .logo-r {
    font-size: 16px;
    font-weight: 400;
    color: var(--purple-primary);
    vertical-align: super;
    margin-left: 2px;
}

/* ============================================
   PARTIE 3 : SYSTÈME COOKIES COMPLET
   ============================================ */

/* Bannière principale cookies */
.purple-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.1);
    z-index: var(--z-cookies);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cookie-banner-text p {
    font-size: 14px;
    color: var(--gray-dark);
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Boutons cookies */
.cookie-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cookie-btn-accept {
    background: var(--gradient-mixed);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-purple);
}

.cookie-btn-reject {
    background: var(--gray-medium);
    color: var(--gray-dark);
}

.cookie-btn-reject:hover {
    background: #dae0e5;
}

.cookie-btn-settings {
    background: transparent;
    color: var(--gray-dark);
    padding: 8px 16px;
}

.cookie-btn-settings:hover {
    color: var(--blue-primary);
}

.cookie-btn-primary {
    background: var(--purple-primary);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--purple-hover);
}

.cookie-btn-secondary {
    background: white;
    color: var(--purple-primary);
    border: 2px solid var(--purple-primary);
}

.cookie-btn-secondary:hover {
    background: var(--purple-primary);
    color: white;
}

/* Panneau de paramètres cookies */
.cookie-settings-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-cookies-panel);
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    animation: fadeIn 0.3s ease-out;
}

.cookie-settings-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.cookie-settings-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-dark);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.cookie-close-btn:hover {
    background: var(--gray-light);
    color: var(--text-primary);
}

.cookie-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-medium);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-category h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category p {
    font-size: 14px;
    color: var(--gray-dark);
    margin: 8px 0 0 0;
}

/* Toggle switches pour cookies */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition-normal);
    border-radius: 26px;
}

.cookie-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
}

.cookie-switch input:checked + label {
    background: var(--gradient-mixed);
}

.cookie-switch input:checked + label:before {
    transform: translateX(24px);
}

.cookie-switch.disabled label {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-medium) !important;
}

.cookie-settings-footer {
    padding: 24px;
    border-top: 1px solid var(--gray-medium);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

/* Bouton flottant cookies */
.cookie-floating-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    background: var(--gray-medium);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    z-index: var(--z-cookies);
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #dee2e6;
    color: var(--gray-dark);
}

/* Protection contre les blocages de clics */
#cookieSettingsPanel {
    pointer-events: none;
}

#cookieSettingsPanel[style*="block"] {
    pointer-events: auto;
}

#purpleCookieBanner {
    pointer-events: none;
}

#purpleCookieBanner[style*="block"] {
    pointer-events: auto;
}

#cookieFloatingBtn {
    pointer-events: auto !important;
}

/* ============================================
   PARTIE 4 : CLASSES UTILITAIRES
   ============================================ */

/* Visibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Couleurs rapides */
.text-purple { color: var(--purple-primary); }
.text-blue { color: var(--blue-primary); }
.bg-purple { background: var(--purple-primary); }
.bg-blue { background: var(--blue-primary); }

/* ============================================
   PARTIE 5 : RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-settings-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-settings-footer {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
}