/* =============================================================================
   SITE WEB ÉDUCATIF ACCESSIBLE - FEUILLE DE STYLE PRINCIPALE
   Auteur: Assistant IA spécialisé en accessibilité web
   Version: 2.0
   Description: Styles complets pour une expérience d'apprentissage inclusive
============================================================================= */

/* ===== POLICES EXTERNES ===== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Roboto:wght@300;400;500;700&family=Lato:wght@300;400;700&family=Source+Sans+Pro:wght@300;400;600;700&family=Inter:wght@300;400;500;600;700&family=Nunito:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&display=swap');

/* ===== VARIABLES CSS POUR LES THÈMES ===== */
:root {
    /* Thème par défaut - Moderne */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --hover-color: #f1f5f9;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Variables pour la typographie */
    --font-family: 'Inter', sans-serif;
    --font-size-base: 16px;
    --font-size-multiplier: 1;
    
    /* Variables pour l'espacement et layout */
    --content-max-width: 1200px;
    --sidebar-width: 280px;
    --navbar-height: 60px;
    --container-padding: 20px;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== THÈMES PRÉDÉFINIS ===== */

/* Thème Sombre */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --accent-color: #60a5fa;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --hover-color: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --gradient: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

/* Thème Océan */
[data-theme="ocean"] {
    --primary-color: #0891b2;
    --secondary-color: #0e7490;
    --accent-color: #06b6d4;
    --background-color: #f0f9ff;
    --surface-color: #e0f2fe;
    --text-color: #164e63;
    --text-secondary: #0891b2;
    --border-color: #bae6fd;
    --hover-color: #e0f2fe;
    --gradient: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

/* Thème Forêt */
[data-theme="forest"] {
    --primary-color: #059669;
    --secondary-color: #047857;
    --accent-color: #10b981;
    --background-color: #f0fdf4;
    --surface-color: #dcfce7;
    --text-color: #14532d;
    --text-secondary: #166534;
    --border-color: #bbf7d0;
    --hover-color: #dcfce7;
    --gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Thème Coucher de Soleil */
[data-theme="sunset"] {
    --primary-color: #ea580c;
    --secondary-color: #c2410c;
    --accent-color: #fb923c;
    --background-color: #fff7ed;
    --surface-color: #fed7aa;
    --text-color: #9a3412;
    --text-secondary: #c2410c;
    --border-color: #fdba74;
    --hover-color: #fed7aa;
    --gradient: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
}

/* Thème Haut Contraste */
[data-theme="high-contrast"] {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #0066cc;
    --background-color: #ffffff;
    --surface-color: #f5f5f5;
    --text-color: #000000;
    --text-secondary: #333333;
    --border-color: #000000;
    --hover-color: #eeeeee;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --gradient: linear-gradient(135deg, #000000 0%, #333333 100%);
}

/* NOUVEAU - Thème Nucléaire */
[data-theme="nuclear"] {
    --primary-color: #10b981;
    --secondary-color: #059669;
    --accent-color: #34d399;
    --background-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --text-color: #10b981;
    --text-secondary: #6ee7b7;
    --border-color: #34d399;
    --hover-color: #1f2937;
    --shadow: 0 4px 20px rgb(16 185 129 / 0.3);
    --gradient: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
}

/* NOUVEAU - Thème Rétro Café */
[data-theme="retro-cafe"] {
    --primary-color: #92400e;
    --secondary-color: #78350f;
    --accent-color: #d97706;
    --background-color: #fef7ed;
    --surface-color: #fed7aa;
    --text-color: #451a03;
    --text-secondary: #92400e;
    --border-color: #fdba74;
    --hover-color: #fde68a;
    --shadow: 0 4px 6px -1px rgb(120 53 15 / 0.3);
    --gradient: linear-gradient(135deg, #92400e 0%, #d97706 50%, #f59e0b 100%);
}

/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: calc(var(--font-size-base) * var(--font-size-multiplier));
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
    overflow-x: hidden;
}

/* ===== CONTENEURS STRUCTURELS ===== */
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    margin-bottom: 3rem;
}

.card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgb(0 0 0 / 0.1);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-content {
    line-height: 1.7;
}

/* ===== MISE EN ÉVIDENCE AMÉLIORÉE ===== */
.highlight-mode .content p,
.highlight-mode .content li,
.highlight-mode .content h1,
.highlight-mode .content h2,
.highlight-mode .content h3 {
    position: relative;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: var(--border-radius);
    background: var(--gradient) !important;
    color: #ffffff !important;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow);
    font-weight: 500;
    transition: var(--transition);
}

.highlight-mode .content p:hover,
.highlight-mode .content li:hover,
.highlight-mode .content h1:hover,
.highlight-mode .content h2:hover,
.highlight-mode .content h3:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px -5px rgb(0 0 0 / 0.3);
}

/* ===== BARRE DE PROGRESSION ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient);
    z-index: 1000;
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}

/* ===== NAVIGATION PRINCIPALE ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.navbar h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ===== BOUTONS DE CONTRÔLE ===== */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--gradient);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgb(0 0 0 / 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--hover-color);
}

.btn-icon {
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== BARRE DE RECHERCHE ===== */
.search-container {
    position: relative;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 14px;
    width: 250px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* ===== SIDEBAR GAUCHE - NAVIGATION SITE (CORRIGÉE) ===== */
.sidebar-left {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 998;
    transition: var(--transition);
    transform: translateX(0);
    box-shadow: var(--shadow);
}

.sidebar-left.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width) + 50px));
}

.sidebar-left.hidden {
    transform: translateX(-100%);
}

/* Bouton de repli du menu */
.sidebar-toggle {
    position: absolute;
    top: 20px;
    right: -25px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

.sidebar-toggle:hover {
    transform: translateX(5px);
}

.sidebar-title {
    padding: 20px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    font-size: 1.1em;
}

.nav-menu {
    list-style: none;
    padding: 0;
}

.nav-item {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-item:hover {
    background-color: var(--hover-color);
}

.nav-link {
    display: block;
    padding: 16px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: var(--transition);
    opacity: 0.1;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    padding-left: 30px;
    font-weight: 600;
}

/* ===== SIDEBAR DROITE - NAVIGATION PAGE ===== */
.sidebar-right {
    position: fixed;
    top: var(--navbar-height);
    right: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background-color: var(--surface-color);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 998;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.sidebar-right.hidden {
    transform: translateX(100%);
}

.toc-title {
    padding: 20px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    font-size: 1.1em;
}

.toc-menu {
    list-style: none;
    padding: 0;
}

.toc-item {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.toc-item:hover {
    background-color: var(--hover-color);
}

.toc-link {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.toc-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: var(--transition);
    opacity: 0.1;
}

.toc-link:hover::before,
.toc-link.active::before {
    left: 0;
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary-color);
    padding-left: 30px;
    font-weight: 500;
}

.toc-link.h2 {
    padding-left: 40px;
    font-size: 13px;
}

.toc-link.h3 {
    padding-left: 60px;
    font-size: 12px;
}

/* ===== CONTENU PRINCIPAL (CORRIGÉ) ===== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-right: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 40px;
    min-height: calc(100vh - var(--navbar-height));
    transition: var(--transition);
}

.main-content.sidebar-left-collapsed {
    margin-left: 50px;
}

.main-content.sidebar-left-hidden {
    margin-left: 0;
}

.main-content.sidebar-right-hidden {
    margin-right: 0;
}

.main-content.both-sidebars-hidden {
    margin-left: 0;
    margin-right: 0;
}

/* ===== CONTENU DES PAGES ===== */
.page {
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.content h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.75em;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.content h2 {
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 2.25em;
    font-weight: 600;
    position: relative;
    padding-left: 20px;
}

.content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.content h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75em;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
}

.content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    transition: var(--transition);
    line-height: 1.8;
}

.content ul, .content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.75rem;
    transition: var(--transition);
    line-height: 1.7;
}

.content blockquote {
    background: var(--gradient);
    color: white;
    border-left: none;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.1em;
    position: relative;
    box-shadow: var(--shadow);
}

.content blockquote::before {
    content: '"';
    font-size: 4em;
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
}

.content code {
    background-color: var(--surface-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.content pre {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.content pre code {
    background: none;
    padding: 0;
    border: none;
}

/* ===== PANNEAU DE PARAMÈTRES AMÉLIORÉ ===== */
.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
    z-index: 1001;
    transition: var(--transition);
    overflow: hidden;
}

.settings-panel.show {
    transform: translate(-50%, -50%) scale(1);
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: var(--gradient);
    color: white;
}

.settings-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.settings-content {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.setting-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.setting-group:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.setting-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1em;
}

.setting-description {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

select, input[type="range"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

select:focus, input[type="range"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== CONTRÔLES DE LECTURE ===== */
.voice-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.voice-btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--border-radius);
    min-width: 80px;
}

/* ===== ÉLÉMENTS LISIBLES AMÉLIORÉS ===== */
.readable {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
}

.readable:hover {
    background-color: var(--hover-color);
    padding: 8px;
    transform: translateX(4px);
}

.readable.speaking {
    background: var(--gradient);
    color: white;
    padding: 8px;
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

/* ===== BOUTON RETOUR EN HAUT ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 30px -5px rgb(0 0 0 / 0.3);
}

/* ===== THÈMES DE GRILLE AMÉLIORÉS ===== */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 1rem;
}

.theme-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.theme-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.theme-option:hover::before {
    left: 100%;
}

.theme-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.theme-option.active {
    border-color: var(--primary-color);
    background: var(--gradient);
    color: white;
    transform: scale(1.05);
}

.theme-preview {
    width: 100%;
    height: 25px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ===== STYLES SPÉCIAUX POUR LES THÈMES ===== */

/* Thème Nucléaire - Effets spéciaux */
[data-theme="nuclear"] .content h1,
[data-theme="nuclear"] .content h2,
[data-theme="nuclear"] .navbar h1 {
    text-shadow: 0 0 20px var(--primary-color);
    animation: nuclearGlow 3s ease-in-out infinite alternate;
}

@keyframes nuclearGlow {
    from { text-shadow: 0 0 20px var(--primary-color); }
    to { text-shadow: 0 0 30px var(--accent-color), 0 0 40px var(--primary-color); }
}

[data-theme="nuclear"] .btn,
[data-theme="nuclear"] .card:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Thème Rétro Café - Effets vintage */
[data-theme="retro-cafe"] .content h1,
[data-theme="retro-cafe"] .content h2 {
    font-family: 'serif';
    text-shadow: 2px 2px 4px rgba(120, 53, 15, 0.3);
}

[data-theme="retro-cafe"] .card {
    background: linear-gradient(145deg, #fef7ed, #fed7aa);
    border: 2px solid var(--border-color);
}

[data-theme="retro-cafe"] .btn {
    font-family: 'serif';
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 1024px) {
    .sidebar-left,
    .sidebar-right {
        transform: translateX(-100%);
    }

    .sidebar-right {
        transform: translateX(100%);
    }

    .main-content {
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
    }

    .navbar-controls {
        gap: 10px;
    }

    .search-input {
        width: 180px;
    }

    .settings-panel {
        width: 95vw;
    }
}

@media (max-width: 768px) {
    .content h1 {
        font-size: 2.25em;
    }

    .content h2 {
        font-size: 1.875em;
    }

    .content h3 {
        font-size: 1.5em;
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar {
        padding: 0 15px;
    }

    .navbar h1 {
        font-size: 1.25em;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }

    .settings-content {
        padding: 1rem;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }

    .navbar-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-input {
        width: 150px;
    }
}

/* ===== ACCESSIBILITÉ ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    z-index: 1002;
    border-radius: 4px;
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
}

/* Focus visible pour navigation clavier */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Réduction des animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mode sombre automatique selon les préférences système */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --secondary-color: #2563eb;
        --accent-color: #60a5fa;
        --background-color: #0f172a;
        --surface-color: #1e293b;
        --text-color: #f1f5f9;
        --text-secondary: #94a3b8;
        --border-color: #334155;
        --hover-color: #334155;
        --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar-left,
    .sidebar-right,
    .navbar,
    .settings-panel,
    .settings-overlay,
    .back-to-top,
    .progress-bar {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .content h1,
    .content h2,
    .content h3 {
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }

    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}