        :root { --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom); --safe-left: env(safe-area-inset-left); --safe-right: env(safe-area-inset-right); }
        
        /* Theme Sombre par defaut */
        [data-theme="dark"] {
            --bg-primary: #0f0f0f;
            --bg-secondary: #161616;
            --bg-card: #1a1a1a;
            --bg-elevated: #242424;
            --bg-input: #0a0a0a;
            --text-primary: #ebebeba8;
            --text-secondary: #9b9b9b;
            --text-muted: #6b6b6b;
            --border: #262626;
            --border-hover: #333333; 
            --accent: #ebebeb;
            --accent-contrast: #0f0f0f;
            --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
            --header-bg: rgba(15, 15, 15, 0.95);
            --notion-gray: rgba(151, 151, 151, 0.4);
            --notion-brown: rgba(186, 133, 111, 0.4);
            --notion-orange: rgba(215, 129, 58, 0.4);
            --notion-yellow: rgba(203, 173, 82, 0.4);
            --notion-green: rgba(108, 174, 117, 0.4);
            --notion-blue: rgba(82, 148, 226, 0.4);
            --notion-purple: rgba(154, 109, 215, 0.4);
            --notion-pink: rgba(211, 115, 165, 0.4);
            --notion-red: rgba(223, 84, 82, 0.4);
            --notion-gray-text: #d0d0d0;
            --notion-brown-text: #e0b8a0;
            --notion-orange-text: #f0a060;
            --notion-yellow-text: #e8d080;
            --notion-green-text: #90d898;
            --notion-blue-text: #80c0ff;
            --notion-purple-text: #c8a8f0;
            --notion-pink-text: #f0a0c8;
            --notion-red-text: #f08080;
        }
        
        /* === THEMES LIGHT === */
        
        /* Light Classique - Blanc gris noir */
        [data-theme="light"] {
            --bg-primary: #f5f5f5;
            --bg-secondary: #fafafa;
            --bg-card: #ffffff;
            --bg-elevated: #eeeeee;
            --bg-input: #ffffff;
            --text-primary: #1a1a2e;
            --text-secondary: #616161;
            --text-muted: #9e9e9e;
            --border: #dcd9d9;
            --border-hover: #e0e0e0; 
            --accent: #424242; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08); 
            --header-bg: rgba(245, 245, 245, 0.98);
            --notion-gray: rgba(158, 158, 158, 0.2);
            --notion-brown: rgba(161, 136, 127, 0.2);
            --notion-orange: rgba(255, 167, 38, 0.2);
            --notion-yellow: rgba(255, 235, 59, 0.25);
            --notion-green: rgba(102, 187, 106, 0.2);
            --notion-blue: rgba(66, 165, 245, 0.2);
            --notion-purple: rgba(171, 71, 188, 0.2);
            --notion-pink: rgba(236, 64, 122, 0.2);
            --notion-red: rgba(239, 83, 80, 0.2);
            --notion-gray-text: #424242;
            --notion-brown-text: #5d4037;
            --notion-orange-text: #e65100;
            --notion-yellow-text: #f9a825;
            --notion-green-text: #2e7d32;
            --notion-blue-text: #1565c0;
            --notion-purple-text: #7b1fa2;
            --notion-pink-text: #c2185b;
            --notion-red-text: #c62828;
        }
        
        /* Zen Pastel - Turquoise apaisant */
        [data-theme="zen-pastel"] { 
            --bg-primary: #e0f0ed; 
            --bg-secondary: #eaf5f3; 
            --bg-card: #f0f8f6; 
            --bg-elevated: #d5ebe7; 
            --bg-input: #f5faf9; 
            --text-primary: #2d4a47; 
            --text-secondary: #4a6a66; 
            --text-muted: #6a8a86; 
            --border: #dcecea;
            --border-hover: #c8e0dc; 
            --accent: #5a9f95; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 12px rgba(107, 178, 168, 0.15); 
            --header-bg: rgba(224, 240, 237, 0.98);
            --notion-gray: rgba(107, 178, 168, 0.2);
            --notion-brown: rgba(186, 160, 140, 0.25);
            --notion-orange: rgba(230, 160, 100, 0.25);
            --notion-yellow: rgba(220, 200, 120, 0.3);
            --notion-green: rgba(107, 178, 148, 0.25);
            --notion-blue: rgba(107, 158, 178, 0.25);
            --notion-purple: rgba(158, 138, 188, 0.25);
            --notion-pink: rgba(198, 148, 168, 0.25);
            --notion-red: rgba(198, 118, 118, 0.25);
            --notion-gray-text: #3a5a56;
            --notion-brown-text: #5a4535;
            --notion-orange-text: #8a5025;
            --notion-yellow-text: #6a5818;
            --notion-green-text: #2a5a3a;
            --notion-blue-text: #2a4a6a;
            --notion-purple-text: #4a3a6a;
            --notion-pink-text: #7a3a5a;
            --notion-red-text: #8a3a3a;
        }
        
        /* The Vert - Vert menthe doux */
        [data-theme="the-vert"] { 
            --bg-primary: #e2f0e2; 
            --bg-secondary: #ecf5ec; 
            --bg-card: #f2f8f2; 
            --bg-elevated: #d5e8d5; 
            --bg-input: #f6faf6; 
            --text-primary: #2d4a3a; 
            --text-secondary: #4a6a5a; 
            --text-muted: #6a8a7a; 
            --border: #c8dcc8;
            --border-hover: #a8cca8; 
            --accent: #5fa878; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 12px rgba(140, 190, 160, 0.15); 
            --header-bg: rgba(226, 240, 226, 0.98);
            --notion-gray: rgba(140, 170, 150, 0.2);
            --notion-brown: rgba(170, 150, 130, 0.25);
            --notion-orange: rgba(210, 170, 120, 0.25);
            --notion-yellow: rgba(200, 190, 130, 0.3);
            --notion-green: rgba(100, 170, 120, 0.3);
            --notion-blue: rgba(120, 160, 180, 0.25);
            --notion-purple: rgba(150, 140, 180, 0.25);
            --notion-pink: rgba(190, 150, 170, 0.25);
            --notion-red: rgba(190, 130, 130, 0.25);
            --notion-gray-text: #3a5a4a;
            --notion-brown-text: #5a4a3a;
            --notion-orange-text: #8a5a2a;
            --notion-yellow-text: #6a6020;
            --notion-green-text: #2a6a3a;
            --notion-blue-text: #2a4a6a;
            --notion-purple-text: #4a3a6a;
            --notion-pink-text: #7a4a5a;
            --notion-red-text: #8a4a4a;
        }
        
        /* Rose Poudre - Rose delicat */
        [data-theme="rose-poudre"] { 
            --bg-primary: #f5e8e8; 
            --bg-secondary: #f9efef; 
            --bg-card: #fcf5f5; 
            --bg-elevated: #f0dede; 
            --bg-input: #fdf8f8; 
            --text-primary: #4a3a3e; 
            --text-secondary: #6a5a5e; 
            --text-muted: #8a7a7e; 
            --border: #e8d8da;
            --border-hover: #dcc8cc; 
            --accent: #c48a95; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 12px rgba(200, 160, 170, 0.15); 
            --header-bg: rgba(245, 232, 232, 0.98);
            --notion-gray: rgba(180, 160, 165, 0.2);
            --notion-brown: rgba(180, 150, 140, 0.25);
            --notion-orange: rgba(220, 170, 140, 0.25);
            --notion-yellow: rgba(220, 200, 150, 0.3);
            --notion-green: rgba(160, 190, 160, 0.25);
            --notion-blue: rgba(160, 170, 200, 0.25);
            --notion-purple: rgba(180, 160, 200, 0.25);
            --notion-pink: rgba(210, 160, 180, 0.3);
            --notion-red: rgba(210, 140, 140, 0.25);
            --notion-gray-text: #4a3a3e;
            --notion-brown-text: #5a4030;
            --notion-orange-text: #8a5030;
            --notion-yellow-text: #7a6020;
            --notion-green-text: #3a6a3a;
            --notion-blue-text: #3a4a7a;
            --notion-purple-text: #5a3a7a;
            --notion-pink-text: #8a3a5a;
            --notion-red-text: #8a3a3a;
        }
        
        /* Lavande Douce - Lavande relaxante */
        [data-theme="lavande-douce"] { 
            --bg-primary: #ebe6f2; 
            --bg-secondary: #f2eef8; 
            --bg-card: #f6f3fa; 
            --bg-elevated: #e0d8ec; 
            --bg-input: #f8f6fc; 
            --text-primary: #3e3a4a; 
            --text-secondary: #5a5a6a; 
            --text-muted: #7a7a8a; 
            --border: #dcd8e8;
            --border-hover: #ccc8dc; 
            --accent: #9080b0; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 12px rgba(170, 160, 200, 0.15); 
            --header-bg: rgba(235, 230, 242, 0.98);
            --notion-gray: rgba(160, 155, 175, 0.2);
            --notion-brown: rgba(170, 150, 140, 0.25);
            --notion-orange: rgba(210, 170, 140, 0.25);
            --notion-yellow: rgba(210, 200, 150, 0.3);
            --notion-green: rgba(150, 185, 160, 0.25);
            --notion-blue: rgba(150, 165, 200, 0.25);
            --notion-purple: rgba(160, 140, 200, 0.3);
            --notion-pink: rgba(200, 160, 190, 0.25);
            --notion-red: rgba(200, 140, 150, 0.25);
            --notion-gray-text: #4a4a5a;
            --notion-brown-text: #5a4a3a;
            --notion-orange-text: #8a5a3a;
            --notion-yellow-text: #6a6030;
            --notion-green-text: #3a6a4a;
            --notion-blue-text: #3a4a7a;
            --notion-purple-text: #5a3a8a;
            --notion-pink-text: #7a3a6a;
            --notion-red-text: #8a3a4a;
        }
        
        /* Terre Douce - Beige naturel */
        [data-theme="terre-douce"] { 
            --bg-primary: #f0ebe2; 
            --bg-secondary: #f5f0e8; 
            --bg-card: #f8f5ef; 
            --bg-elevated: #e8e0d5; 
            --bg-input: #faf8f4; 
            --text-primary: #4a4540; 
            --text-secondary: #6a6560; 
            --text-muted: #8a8580; 
            --border: #e0d8cc;
            --border-hover: #d0c8bc; 
            --accent: #b0a080; 
            --accent-contrast: #4a4540;
            --shadow-card: 0 2px 12px rgba(190, 180, 160, 0.15); 
            --header-bg: rgba(240, 235, 226, 0.98);
            --notion-gray: rgba(170, 165, 155, 0.22);
            --notion-brown: rgba(180, 155, 130, 0.28);
            --notion-orange: rgba(210, 170, 130, 0.28);
            --notion-yellow: rgba(210, 195, 140, 0.3);
            --notion-green: rgba(160, 180, 150, 0.25);
            --notion-blue: rgba(150, 165, 185, 0.25);
            --notion-purple: rgba(170, 155, 185, 0.25);
            --notion-pink: rgba(195, 160, 170, 0.25);
            --notion-red: rgba(195, 145, 140, 0.25);
            --notion-gray-text: #4a4540;
            --notion-brown-text: #5a4530;
            --notion-orange-text: #8a5520;
            --notion-yellow-text: #6a5a18;
            --notion-green-text: #3a5a38;
            --notion-blue-text: #3a4868;
            --notion-purple-text: #4a3a68;
            --notion-pink-text: #7a4050;
            --notion-red-text: #8a4038;
        }
        
        /* Ciel Doux - Bleu ciel apaisant */
        [data-theme="ciel-doux"] { 
            --bg-primary: #e0eef5; 
            --bg-secondary: #eaf4f8; 
            --bg-card: #f0f7fa; 
            --bg-elevated: #d5e8f0; 
            --bg-input: #f5fafc; 
            --text-primary: #2a4050; 
            --text-secondary: #4a6070; 
            --text-muted: #6a8090; 
            --border: #c8dce8;
            --border-hover: #a8c8dc; 
            --accent: #6a9fc0; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 12px rgba(100, 150, 190, 0.15); 
            --header-bg: rgba(224, 238, 245, 0.98);
            --notion-gray: rgba(120, 150, 170, 0.2);
            --notion-brown: rgba(160, 140, 130, 0.25);
            --notion-orange: rgba(200, 160, 120, 0.25);
            --notion-yellow: rgba(200, 190, 130, 0.3);
            --notion-green: rgba(130, 180, 150, 0.25);
            --notion-blue: rgba(100, 150, 190, 0.3);
            --notion-purple: rgba(150, 140, 190, 0.25);
            --notion-pink: rgba(190, 150, 170, 0.25);
            --notion-red: rgba(190, 130, 130, 0.25);
            --notion-gray-text: #3a5060;
            --notion-brown-text: #5a4a3a;
            --notion-orange-text: #8a5a30;
            --notion-yellow-text: #6a6020;
            --notion-green-text: #3a6a4a;
            --notion-blue-text: #2a5080;
            --notion-purple-text: #4a4080;
            --notion-pink-text: #7a4060;
            --notion-red-text: #8a4040;
        }
        
        /* Malibu - Rose corail chaud */
        [data-theme="malibu"] { 
            --bg-primary: #fce8ea; 
            --bg-secondary: #fdf0f1; 
            --bg-card: #fef5f6; 
            --bg-elevated: #f8d8dc; 
            --bg-input: #fef8f8; 
            --text-primary: #5a4045; 
            --text-secondary: #7a5a60; 
            --text-muted: #9a7a80; 
            --border: #f0d8dc;
            --border-hover: #e8c8cc; 
            --accent: #f0909a; 
            --accent-contrast: #ffffff;
            --shadow-card: 0 2px 12px rgba(255, 176, 181, 0.2); 
            --header-bg: rgba(252, 232, 234, 0.98);
            --notion-gray: rgba(200, 180, 182, 0.22);
            --notion-brown: rgba(200, 165, 155, 0.28);
            --notion-orange: rgba(249, 200, 170, 0.35);
            --notion-yellow: rgba(249, 220, 180, 0.35);
            --notion-green: rgba(180, 210, 185, 0.28);
            --notion-blue: rgba(180, 195, 220, 0.28);
            --notion-purple: rgba(200, 180, 210, 0.28);
            --notion-pink: rgba(255, 180, 190, 0.4);
            --notion-red: rgba(255, 160, 165, 0.35);
            --notion-gray-text: #4a4245;
            --notion-brown-text: #5a4238;
            --notion-orange-text: #8a5830;
            --notion-yellow-text: #6a5520;
            --notion-green-text: #3a5a3a;
            --notion-blue-text: #3a4568;
            --notion-purple-text: #5a3a68;
            --notion-pink-text: #8a3a50;
            --notion-red-text: #8a3a3a;
        }
        
        /* === THEMES DARK APAISANTS === */
        
        /* Ocean Nuit - Bleu profond */
        [data-theme="ocean-nuit"] { 
            --bg-primary: #1a2a30; 
            --bg-secondary: #1f3038; 
            --bg-card: #243840; 
            --bg-elevated: #2a4048; 
            --bg-input: #1f3038; 
            --text-primary: #e0f0f0; 
            --text-secondary: #90b0b8; 
            --text-muted: #608088; 
            --border: #2a3840;
            --border-hover: #384850; 
            --accent: #70b0c0; 
            --accent-contrast: #1a2a30;
            --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3); 
            --header-bg: rgba(26, 42, 48, 0.95);
            --notion-gray: rgba(120, 150, 160, 0.3);
            --notion-brown: rgba(160, 130, 110, 0.3);
            --notion-orange: rgba(200, 140, 90, 0.3);
            --notion-yellow: rgba(200, 180, 100, 0.35);
            --notion-green: rgba(100, 170, 130, 0.35);
            --notion-blue: rgba(90, 150, 190, 0.35);
            --notion-purple: rgba(140, 120, 180, 0.3);
            --notion-pink: rgba(180, 120, 150, 0.3);
            --notion-red: rgba(190, 110, 110, 0.3);
            --notion-gray-text: #b0c8d0;
            --notion-brown-text: #d0b8a0;
            --notion-orange-text: #e8b070;
            --notion-yellow-text: #e0d090;
            --notion-green-text: #80d0a0;
            --notion-blue-text: #80c0e0;
            --notion-purple-text: #b8a0e0;
            --notion-pink-text: #e0a0c0;
            --notion-red-text: #e09090;
        }
        
        /* Foret Profonde - Vert nature */
        [data-theme="foret-profonde"] { 
            --bg-primary: #1a2820; 
            --bg-secondary: #1f3028; 
            --bg-card: #243830; 
            --bg-elevated: #2a4038; 
            --bg-input: #1f3028; 
            --text-primary: #e0f0e8; 
            --text-secondary: #90b0a0; 
            --text-muted: #608070; 
            --border: #2a3830;
            --border-hover: #384840; 
            --accent: #70b890; 
            --accent-contrast: #1a2820;
            --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3); 
            --header-bg: rgba(26, 40, 32, 0.95);
            --notion-gray: rgba(120, 150, 140, 0.3);
            --notion-brown: rgba(160, 140, 110, 0.3);
            --notion-orange: rgba(200, 150, 100, 0.3);
            --notion-yellow: rgba(200, 190, 110, 0.35);
            --notion-green: rgba(100, 180, 130, 0.4);
            --notion-blue: rgba(100, 150, 180, 0.3);
            --notion-purple: rgba(140, 130, 180, 0.3);
            --notion-pink: rgba(180, 130, 150, 0.3);
            --notion-red: rgba(190, 120, 110, 0.3);
            --notion-gray-text: #b0c8c0;
            --notion-brown-text: #d0c0a0;
            --notion-orange-text: #e8c080;
            --notion-yellow-text: #e0e0a0;
            --notion-green-text: #90e0b0;
            --notion-blue-text: #90c0d0;
            --notion-purple-text: #b8b0e0;
            --notion-pink-text: #e0a8c0;
            --notion-red-text: #e0a090;
        }
        
        /* Nuit Lavande - Violet nocturne */
        [data-theme="nuit-lavande"] { 
            --bg-primary: #221f2a; 
            --bg-secondary: #282530; 
            --bg-card: #302a38; 
            --bg-elevated: #383040; 
            --bg-input: #282530; 
            --text-primary: #f0e8f8; 
            --text-secondary: #b0a0c0; 
            --text-muted: #806888; 
            --border: #302838;
            --border-hover: #403848; 
            --accent: #a890c8; 
            --accent-contrast: #221f2a;
            --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3); 
            --header-bg: rgba(34, 31, 42, 0.95);
            --notion-gray: rgba(140, 130, 160, 0.3);
            --notion-brown: rgba(160, 140, 120, 0.3);
            --notion-orange: rgba(200, 150, 110, 0.3);
            --notion-yellow: rgba(200, 185, 120, 0.35);
            --notion-green: rgba(120, 170, 140, 0.3);
            --notion-blue: rgba(120, 150, 190, 0.3);
            --notion-purple: rgba(150, 130, 200, 0.4);
            --notion-pink: rgba(190, 130, 170, 0.35);
            --notion-red: rgba(190, 120, 130, 0.3);
            --notion-gray-text: #c0b8d0;
            --notion-brown-text: #d0c0a8;
            --notion-orange-text: #e8c090;
            --notion-yellow-text: #e0d8a0;
            --notion-green-text: #98d8b0;
            --notion-blue-text: #98c0e0;
            --notion-purple-text: #c0a8f0;
            --notion-pink-text: #f0a8d0;
            --notion-red-text: #e0a0a8;
        }
