/* UFK Core CSS - Styles du framework (READ-ONLY) */
/* ⚠️ NE PAS MODIFIER CE FICHIER ! */
/* Pour personnaliser, utilisez app.css qui est chargé après */
/* @ia-index
{
    "file": "public/assets/css/core.css",
    "sections": [
        {
            "id": "foundations",
            "start_marker": "@ia-index-start foundations",
            "purpose": "Fondations CSS : variables, reset, typographie",
            "exports": ["body", "a", ".container"],
            "dependencies": ["page_header", "page_footer"]
        },
        {
            "id": "navigation",
            "start_marker": "@ia-index-start navigation",
            "purpose": "Navigation principale, avatars, menus, sélecteur langues",
            "exports": [".site-header", ".user-menu", ".language-switch"],
            "dependencies": ["initUserDropdown", "header.php"]
        },
        {
            "id": "ui-base",
            "start_marker": "@ia-index-start ui-base",
            "purpose": "Blocs UI fondamentaux et états",
            "exports": [".btn", ".card", ".form-control", ".alert"],
            "dependencies": ["showNotification", "hero", "articles_grid", "alert"]
        },
        {
            "id": "layout",
            "start_marker": "@ia-index-start layout",
            "purpose": "Structures de page et sections majeures",
            "exports": [".page-header", ".layout-grid", ".hero"],
            "dependencies": ["page_header", "hero", "feature_grid"]
        },
        {
            "id": "components-advanced",
            "start_marker": "@ia-index-start components-advanced",
            "purpose": "Composants avancés réutilisables",
            "exports": [".carousel", ".breadcrumb", ".content-section", ".map"],
            "dependencies": ["initCarousels", "initMap", "carousel", "breadcrumb", "map"]
        },
        {
            "id": "pages-specific",
            "start_marker": "@ia-index-start pages-specific",
            "purpose": "Styles spécifiques par page",
            "exports": [".profile-page", ".blog-page", ".article-page"],
            "dependencies": ["initArticleGallery", "member-profile.php", "blog.php", "article.php"]
        },
        {
            "id": "admin",
            "start_marker": "@ia-index-start admin",
            "purpose": "Styles des interfaces d'administration",
            "exports": [".admin-dashboard", ".admin-table"],
            "dependencies": ["initAdminCache", "admin-dashboard.php", "admin-cache-clear.php"]
        },
        {
            "id": "utilities",
            "start_marker": "@ia-index-start utilities",
            "purpose": "Classes utilitaires globales",
            "exports": [".text-muted", ".hidden", ".visually-hidden"],
            "dependencies": ["toggleDarkMode"]
        }
    ]
}
*/
/* Index IA-first: cette structure remplace l'ancienne table des matières humaine. */
/* @ia-index-start foundations */
/* ========================
   Importation de fonts
   ======================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================
   Variables globales
   ======================== */
:root {
    /* Couleurs principales - Plus sobres et élégantes */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;
    
    /* Couleurs neutres */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Couleurs sémantiques */
    --success-color: #059669;
    --success-bg: #10b981;
    --danger-color: #ef4444;
    --danger-bg: #fee2e2;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --info-color: #3b82f6;
    --info-bg: #dbeafe;
    
    /* Thème clair (par défaut) */
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --border-color: var(--gray-200);
    --border-hover: var(--gray-300);
    
    /* Ombres modernes avec couleur */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-colored: 0 10px 40px -10px var(--primary-color);
    --shadow-soft: 0 2px 20px 0 rgba(0, 0, 0, 0.05);
    
    /* Espacements (margin, padding, gap) */
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 1rem;      /* 16px */
    --spacing-4: 1.5rem;    /* 24px */
    --spacing-5: 2rem;      /* 32px */
    --spacing-6: 3rem;      /* 48px */
    
    /* Rayons de bordure */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Thème sombre */
[data-theme="dark"] {
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --bg-tertiary: var(--gray-700);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-400);
    --text-tertiary: var(--gray-500);
    --border-color: var(--gray-700);
    --border-hover: var(--gray-600);
    
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

/* ========================
   Reset et base
   ======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

/* Sélection de texte moderne */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* Fond avec motif subtil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, var(--primary-light) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--primary-light) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, var(--primary-light) 0%, transparent 50%);
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

/* Curseur moderne (optionnel, peut être désactivé si trop) */
@media (pointer: fine) {
    * {
        cursor: inherit;
    }
    
    a, button, [role="button"], .btn {
        cursor: pointer;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea {
        cursor: text;
    }
}
/* @ia-index-end foundations */

/* @ia-index-start navigation */
/* ========================
   Header secondaire (optionnel)
   ======================== */
.header-secondary {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.header-secondary-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header-secondary-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.header-secondary-link:hover {
    color: var(--primary-color);
}

.header-secondary-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Responsive header secondaire */
@media (max-width: 768px) {
    .header-secondary-content {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    /* Masquer texte sur mobile, garder icônes */
    .header-secondary-link {
        font-size: 0;
    }
    
    .header-secondary-icon {
        width: 20px;
        height: 20px;
        font-size: 1rem;
    }
}

/* ========================
   Navigation moderne
   ======================== */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .navbar {
    background-color: rgba(17, 24, 39, 0.8);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 0 0.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--primary-color);
}

.navbar-brand img {
    height: 56px;
    width: auto;
    display: block;
    transition: all var(--transition-fast);
}

.navbar-brand .site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Logos séparés light/dark (si définis dans config) */
.navbar-brand .logo-dark {
    display: none;
}

[data-theme="dark"] .navbar-brand .logo-light {
    display: none;
}

[data-theme="dark"] .navbar-brand .logo-dark {
    display: block;
}

/* Logo au survol - effet simple et élégant */
.navbar-brand:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 8px rgba(91, 107, 255, 0.3));
}

[data-theme="dark"] .navbar-brand:hover img {
    filter: drop-shadow(0 2px 8px rgba(91, 107, 255, 0.4));
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.navbar-nav a {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.875rem;
}

.navbar-nav a:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.navbar-nav a.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cacher les actions mobile sur desktop */
.navbar-actions-mobile {
    display: none;
}

/* Menu de navigation principal */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    margin-left: 2rem;
}

/* ========================
   Sous-menus déroulants
   ======================== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Zone tampon invisible pour éviter de perdre le menu accidentellement */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 10px;
    z-index: 999;
    pointer-events: none; /* Invisible à la souris par défaut */
}

.nav-dropdown.active::before {
    pointer-events: auto; /* Active seulement quand le menu est ouvert */
}

/* Toggle hérite de .nav-link, on ajoute juste l'alignement */
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.nav-dropdown-toggle:hover {
    text-decoration: none;
}

.nav-dropdown-arrow {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.nav-dropdown.active .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px); /* Espace optimal sans triangle */
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04); /* Ombre plus douce et moderne */
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px); /* Animation plus subtile */
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
    padding: 0.5rem 0;
}

/* Triangle supprimé pour un look plus moderne et épuré */

/* Menu actif */
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 450;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
}

.nav-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Barre de sélection au hover */
.nav-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    transition: height var(--transition-fast);
    border-radius: 0 2px 2px 0;
}

.nav-dropdown-item:hover::before {
    height: 60%;
}

.nav-dropdown-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.nav-dropdown-item:hover svg {
    opacity: 1;
}

.nav-link {
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9375rem;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width var(--transition-fast);
}

.nav-link:hover {
    background-color: rgba(var(--bg-tertiary-rgb, 243, 244, 246), 0.5);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(91, 107, 255, 0.1);
}

.nav-link.active::before {
    width: 100%;
}

/* Note: Les styles dropdown sont définis plus haut (lignes ~350) */
/* Cette section dupliquée a été supprimée pour éviter les conflits */

/* Bouton menu mobile */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar-toggle:hover {
    background-color: var(--bg-tertiary);
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all var(--transition-fast);
}

/* État actif du menu mobile */
.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Menu mobile responsive */
@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem;
        margin-left: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-fast);
        box-shadow: var(--shadow-lg);
        z-index: var(--z-sticky);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }
    
    /* Cacher les actions dans la navbar principale sur mobile */
    .navbar-content > .navbar-actions {
        display: none;
    }
    
    /* Afficher les actions dans le menu mobile */
    .navbar-actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    /* Adapter les boutons pour mobile */
    .navbar-actions-mobile .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Bouton déconnexion dans le formulaire */
    .navbar-actions-mobile form {
        margin: 0;
    }
    
    .navbar-actions-mobile form button {
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        font-size: inherit;
    }
    
    /* User menu mobile */
    .navbar-actions-mobile .user-menu {
        width: 100%;
    }
    
    .navbar-actions-mobile .user-info {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        background: var(--bg-secondary);
        border-radius: var(--radius-md);
        margin-bottom: 0.5rem;
    }
    
    .navbar-actions-mobile .avatar {
        flex-shrink: 0;
    }
    
    .navbar-actions-mobile .user-details {
        flex: 1;
        min-width: 0;
    }
    
    .navbar-actions-mobile .user-details strong {
        display: block;
        font-size: 0.9375rem;
        color: var(--text-primary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .navbar-actions-mobile .user-details small {
        display: block;
        font-size: 0.8125rem;
        color: var(--text-secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Actions en ligne */
    .navbar-actions-mobile .mobile-actions-row {
        display: flex;
        gap: 0.75rem;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Theme toggle et language selector côte à côte */
    .navbar-actions-mobile .theme-toggle,
    .navbar-actions-mobile .language-selector {
        flex: 1;
    }
    
    .navbar-actions-mobile .language-toggle {
        width: 100%;
    }
    
    /* Sélecteur de langues mobile dans navbar-actions-mobile */
    .navbar-actions-mobile .language-selector {
        position: relative;
    }
    
    .navbar-actions-mobile .language-toggle {
        padding: 0 0.5rem;
        font-size: 0.8125rem;
        height: 44px;
        border-width: 1px;
    }
    
    .navbar-actions-mobile .language-code {
        font-size: 0.75rem;
    }
    
    .navbar-actions-mobile .language-arrow {
        width: 10px;
        height: 10px;
    }
    
    .navbar-actions-mobile .language-dropdown {
        position: absolute;
        bottom: 100%;
        left: 0;
        right: auto;
        top: auto;
        margin-bottom: 0.5rem;
        min-width: 160px;
        font-size: 0.875rem;
    }
    
    /* Sous-menus déroulants en mobile */
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: var(--bg-secondary);
        margin-left: 1rem;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        max-height: 300px;
        padding: 0.5rem 0;
    }
    
    .nav-dropdown-item {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    /* Overlay mobile pour fermer le menu */
    .navbar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-fast);
        z-index: calc(var(--z-sticky) - 1);
    }
    
    .navbar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Amélioration du menu mobile */
    .navbar-menu.active {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            transform: translateY(-110%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-secondary);
        margin: 0.5rem 0 0 1rem;
        display: none;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
    }
    
    .nav-dropdown.active .nav-dropdown-toggle svg {
        transform: rotate(180deg);
    }
}

/* ========================
   Composant Avatar
   ======================== */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    user-select: none;
    transition: all var(--transition-fast);
    background: var(--primary-color);
    color: white;
    cursor: pointer;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

/* ========================
   User Menu Dropdown
   ======================== */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu-toggle:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(91, 107, 255, 0.15);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-info strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-info small {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    font-size: 0.875rem;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.dropdown-item .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.user-dropdown .divider {
    margin: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

/* ========================
   Language Selector
   ======================== */
.language-selector {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    height: 44px;
}

/* Hover uniquement pour les appareils qui le supportent vraiment */
@media (hover: hover) {
    .language-toggle:hover {
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(91, 107, 255, 0.15);
    }
}

/* État actif pour le feedback sur mobile */
.language-toggle:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

/* Focus visible pour l'accessibilité clavier */
.language-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.language-code {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.language-arrow {
    transition: transform var(--transition-fast);
}

.language-selector:hover .language-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
    padding: 0.5rem;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.language-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.language-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.language-name {
    display: block;
}

/* Theme Toggle - Style épuré cohérent avec language selector */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(141, 151, 161, 0.2);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

/* Hover uniquement pour les appareils qui le supportent vraiment */
@media (hover: hover) {
    .theme-toggle:hover {
        background: var(--bg-secondary);
        border-color: var(--border-color);
        transform: rotate(15deg) scale(1.05);
        box-shadow: 0 4px 12px rgba(91, 107, 255, 0.15);
    }
}

/* État actif pour le feedback sur mobile */
.theme-toggle:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

/* Focus visible pour l'accessibilité clavier */
.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-toggle .icon {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
}

.sun-icon,
.moon-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-fast);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* ❌ DUPLICATION SUPPRIMÉE - Les styles .avatar-xl et .avatar-color-* sont déjà définis plus haut */

/* ========================
   Toggle de thème - Styles des icônes
   ======================== */
/* Note: Les styles de base du bouton sont définis plus haut dans le fichier */

.theme-toggle .icon {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
}

.sun-icon,
.moon-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-fast);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* ========================
   Sélecteur de langues moderne
   ======================== */
.language-selector {
    position: relative;
}

.language-toggle {
    position: relative;
    height: 44px;
    padding: 0 0.875rem;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(141, 151, 161, 0.2);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.language-toggle:hover {
    background-color: rgba(141, 151, 161, 0.05);
    border-color: rgba(141, 151, 161, 0.3);
    transform: translateY(-1px);
}

.language-toggle:active {
    transform: translateY(0);
}


.language-code {
    font-weight: 600;
    letter-spacing: 0.025em;
    font-size: 0.8125rem;
}

.language-arrow {
    margin-left: 0.125rem;
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.language-toggle:hover .language-arrow {
    opacity: 1;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background-color: var(--bg-primary);
    border: 1px solid rgba(141, 151, 161, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
                0 2px 10px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.language-selector:hover .language-dropdown,
.language-selector.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.language-item::before {
    content: attr(data-lang);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    font-size: 0.75rem;
    opacity: 0.3;
    letter-spacing: 0.05em;
}

.language-item:hover {
    background-color: rgba(37, 99, 235, 0.08);
    padding-left: 1.375rem;
}

.language-item:hover::before {
    opacity: 0.5;
}

.language-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.language-item.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.language-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

.language-item.active:hover {
    background-color: rgba(37, 99, 235, 0.15);
}


/* Mode sombre - Sélecteur de langues */
[data-theme="dark"] .language-toggle {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .language-dropdown {
    background-color: var(--bg-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-item:hover {
    background-color: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .language-item.active {
    background-color: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .language-item.active:hover {
    background-color: rgba(37, 99, 235, 0.25);
}

/* ========================
   Dropdown utilisateur
   ======================== */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.user-menu-toggle:hover {
    background: var(--bg-tertiary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 260px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.user-info strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.user-info small {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
}

.dropdown-item .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.user-dropdown .divider {
    margin: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

/* ========================
   Language Selector
   ======================== */
.language-selector {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    height: 44px;
}

/* Hover uniquement pour les appareils qui le supportent vraiment */
@media (hover: hover) {
    .language-toggle:hover {
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(91, 107, 255, 0.15);
    }
}

/* État actif pour le feedback sur mobile */
.language-toggle:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

/* Focus visible pour l'accessibilité clavier */
.language-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.language-code {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.language-arrow {
    transition: transform var(--transition-fast);
}

.language-selector:hover .language-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
    padding: 0.5rem;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.language-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.language-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.language-name {
    display: block;
}

/* Theme Toggle - Style épuré cohérent avec language selector */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(141, 151, 161, 0.2);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

/* Hover uniquement pour les appareils qui le supportent vraiment */
@media (hover: hover) {
    .theme-toggle:hover {
        background: var(--bg-secondary);
        border-color: var(--border-color);
        transform: rotate(15deg) scale(1.05);
        box-shadow: 0 4px 12px rgba(91, 107, 255, 0.15);
    }
}

/* État actif pour le feedback sur mobile */
.theme-toggle:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

/* Focus visible pour l'accessibilité clavier */
.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-toggle .icon {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
}

.sun-icon,
.moon-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-fast);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* ❌ DUPLICATION SUPPRIMÉE - Les styles .avatar-xl et .avatar-color-* sont déjà définis plus haut */

/* ========================
   Toggle de thème - Styles des icônes
   ======================== */
/* Note: Les styles de base du bouton sont définis plus haut dans le fichier */

.theme-toggle .icon {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
}

.sun-icon,
.moon-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-fast);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* ========================
   Sélecteur de langues moderne
   ======================== */
.language-selector {
    position: relative;
}

.language-toggle {
    position: relative;
    height: 44px;
    padding: 0 0.875rem;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(141, 151, 161, 0.2);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.language-toggle:hover {
    background-color: rgba(141, 151, 161, 0.05);
    border-color: rgba(141, 151, 161, 0.3);
    transform: translateY(-1px);
}

.language-toggle:active {
    transform: translateY(0);
}


.language-code {
    font-weight: 600;
    letter-spacing: 0.025em;
    font-size: 0.8125rem;
}

.language-arrow {
    margin-left: 0.125rem;
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.language-toggle:hover .language-arrow {
    opacity: 1;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background-color: var(--bg-primary);
    border: 1px solid rgba(141, 151, 161, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
                0 2px 10px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.language-selector:hover .language-dropdown,
.language-selector.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.language-item::before {
    content: attr(data-lang);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    font-size: 0.75rem;
    opacity: 0.3;
    letter-spacing: 0.05em;
}

.language-item:hover {
    background-color: rgba(37, 99, 235, 0.08);
    padding-left: 1.375rem;
}

.language-item:hover::before {
    opacity: 0.5;
}

.language-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.language-item.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.language-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

.language-item.active:hover {
    background-color: rgba(37, 99, 235, 0.15);
}


/* Mode sombre - Sélecteur de langues */
[data-theme="dark"] .language-toggle {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .language-dropdown {
    background-color: var(--bg-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .language-item:hover {
    background-color: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .language-item.active {
    background-color: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .language-item.active:hover {
    background-color: rgba(37, 99, 235, 0.25);
}

/* ========================
   Dropdown utilisateur
   ======================== */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.user-menu-toggle:hover {
    background: var(--bg-tertiary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 260px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.user-info strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.user-info small {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
}

.dropdown-item .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.dropdown-item:hover .icon {
    color: var(--primary-color);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

/* Ajustements pour le formulaire dans le dropdown */
.user-dropdown form {
    display: block;
    margin: 0;
    padding: 0;
}

.user-dropdown .dropdown-item {
    border-radius: 0;
}

.user-dropdown .dropdown-item:first-of-type {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.user-dropdown .dropdown-item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Mode sombre pour le dropdown */
[data-theme="dark"] .user-dropdown {
    background: var(--gray-800);
    border-color: var(--gray-700);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .user-info {
    background: var(--gray-900);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--gray-700);
}
/* @ia-index-end navigation */

/* @ia-index-start ui-base */
/* ========================
   Boutons modernes
   ======================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Effet de hover moderne avec onde */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Animation au clic */
.btn:active {
    transform: scale(0.98);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Variantes de boutons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

[data-theme="dark"] .btn-secondary {
    background-color: var(--bg-primary);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-ghost:hover {
    background-color: var(--bg-tertiary);
}

/* Bouton pleine largeur */
.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-outline {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Tailles de boutons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Groupes de boutons */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
    flex-shrink: 0;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================
   Cards modernes
   ======================== */
.card {
    --card-padding: 1.5rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    padding: var(--card-padding);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .card {
    background: rgba(31, 41, 55, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: translateX(-100%);
    transition: transform var(--transition-base);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.card:hover::before {
    transform: translateX(0);
}

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

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* ========================
   Forms modernes
   ======================== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.025em;
}

[data-theme="dark"] .form-label {
    color: var(--gray-300);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
    position: relative;
}

/* Effet moderne au focus */
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--shadow-sm);
    transform: translateY(-1px);
    background-color: var(--bg-primary);
}

/* Animation du label flottant */
.form-group {
    position: relative;
}

.form-label.floating {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    pointer-events: none;
    transition: all var(--transition-fast);
    background: var(--bg-primary);
    padding: 0 0.25rem;
}

.form-control:focus ~ .form-label.floating,
.form-control:not(:placeholder-shown) ~ .form-label.floating {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.form-control:hover {
    border-color: var(--gray-300);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--shadow-sm);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--gray-400);
    opacity: 0.8;
}

/* Dark mode pour les inputs */
[data-theme="dark"] .form-control {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
    box-shadow: none;
}

[data-theme="dark"] .form-control:hover {
    border-color: var(--gray-600);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ========================
   États d'accessibilité
   ======================== */

/* États disabled */
.btn:disabled,
.btn[disabled],
.form-control:disabled,
.form-control[disabled],
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background-color: var(--bg-tertiary);
}

/* Focus visible pour navigation clavier uniquement */
.btn:focus {
    outline: none;
}

.btn:focus-visible,
.form-control:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip links pour accessibilité */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) 0;
    z-index: var(--z-tooltip);
}

.skip-link:focus {
    top: 0;
}

/* ========================
   États de formulaires et validation
   ======================== */

/* État d'erreur */
.form-control.error,
.form-control.is-invalid {
    border-color: var(--danger-color);
    background-color: var(--bg-primary);
}

.form-control.error:focus,
.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* État de succès */
.form-control.success,
.form-control.is-valid {
    border-color: var(--success-color);
    background-color: var(--bg-primary);
}

.form-control.success:focus,
.form-control.is-valid:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Messages d'erreur */
.form-error,
.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--danger-color);
    font-weight: 500;
}

/* Messages de succès */
.form-success,
.valid-feedback {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--success-color);
    font-weight: 500;
}

/* Icônes de validation */
.form-group.has-error .form-label,
.form-group.has-danger .form-label {
    color: var(--danger-color);
}

.form-group.has-success .form-label {
    color: var(--success-color);
}

/* Groupe de formulaire avec validation */
.form-group.has-error .form-control,
.form-group.has-danger .form-control {
    border-color: var(--danger-color);
}

.form-group.has-success .form-control {
    border-color: var(--success-color);
}

/* Tooltip d'erreur */
.form-tooltip-error {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    z-index: var(--z-tooltip);
    opacity: 0;
    transform: translateY(-5px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.form-tooltip-error::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 1rem;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    transform: rotate(45deg);
}

.form-group:hover .form-tooltip-error,
.form-control:focus ~ .form-tooltip-error {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========================
   Alerts modernes
   ======================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem 0;
    box-shadow: var(--shadow-sm);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .alert {
        margin: 1rem 0;
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-success {
    background-color: var(--success-bg);
    color: white;
    border: 1px solid var(--success-color);
    font-weight: 500;
}

.alert-danger,
.alert-error {
    background-color: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-warning {
    background-color: var(--warning-bg);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.alert-info {
    background-color: var(--info-bg);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

/* ========================
   Composants réutilisables
   ======================== */

/* Tags */
.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.813rem;
    display: inline-block;
    transition: all var(--transition-base);
    border: 1px solid transparent;
    cursor: default;
}

.tag:hover {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border-color: rgba(74, 144, 226, 0.3);
    transform: translateY(-1px);
}

/* Featured Badge */
.featured-badge {
    background: var(--warning-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.sidebar-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.sidebar-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.sidebar-card p {
    margin: 0;
    color: var(--text-secondary);
}

/* Boutons réseaux sociaux */
.btn-twitter {
    background: #1DA1F2;
    color: white;
}

.btn-twitter:hover {
    background: #1a8cd8;
}

.btn-linkedin {
    background: #0077B5;
    color: white;
}

.btn-linkedin:hover {
    background: #006ba1;
}

/* ============================================================================
   PAGE HEADER - Styles pour les en-têtes de pages
   ============================================================================ */

.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header .lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ============================================================================
   LAYOUT GRID - Système avec sidebar
   ============================================================================ */

/* Espacement pour les containers avec sidebar après un header */
.container.with-sidebar {
    margin-top: 2rem;
}

/* Layout Grid pour sidebar (pattern commun) */
@media (min-width: 768px) {
    .container.with-sidebar {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 2.5rem;
        align-items: start;
    }
    
    .content-main {
        grid-column: 1;
    }
    
    .content-sidebar {
        grid-column: 2;
        position: sticky;
        top: 1rem;
    }
}
/* @ia-index-end ui-base */

/* @ia-index-start layout */
/* ========================
   Hero Section
   ======================== */
.main-content {
    min-height: calc(100vh - 60px);
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    margin-bottom: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Animation de fond subtile */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: heroShine 8s ease-in-out infinite;
}

@keyframes heroShine {
    0%, 100% { transform: translate(-30%, -30%) rotate(0deg); }
    50% { transform: translate(-20%, -20%) rotate(180deg); }
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero .version {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-subtitle .icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin: 0 0.25rem;
    animation: heartBeat 2s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20% { transform: scale(0.95); }
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.hero-actions .btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

/* ========================
   Features Section
   ======================== */
.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.feature-card .icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.feature-card p {
    margin-bottom: 1.5rem;
}

.feature-card .btn {
    margin-top: 0.5rem;
}

/* ========================
   Auth Pages
   ======================== */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.08), 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .auth-card {
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3), 0 10px 30px -5px rgba(0, 0, 0, 0.2);
    border-color: var(--border-color);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 2rem;
}

.auth-form .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-sm);
}

.auth-form .btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.auth-link {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-demo {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--info-bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--info-color);
    text-align: center;
}

.auth-demo small {
    color: var(--info-color);
    line-height: 1.6;
}

/* ========================
   Footer
   ======================== */
footer {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

footer .version-info {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

footer .version-info span {
    margin: 0 0.25rem;
}

/* ========================
   Icônes SVG
   ======================== */
/* Taille par défaut des icônes */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Tailles d'icônes */
.icon-xs { width: 16px; height: 16px; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* @ia-index-end layout */

/* @ia-index-start components-advanced */
/* ========================
   Composants additionnels
   ======================== */
/* Blockquotes */
blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-style: italic;
}

blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: normal;
}

/* Code inline et blocks */
code {
    padding: 0.125rem 0.375rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--primary-color);
}

pre {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
    position: relative;
    scroll-padding: 1rem;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
    display: block;
    white-space: pre;
}

/* Mode sombre pour les blocs de code */
[data-theme="dark"] pre {
    background: var(--gray-900);
    color: var(--gray-100);
    border: 1px solid var(--gray-700);
}

/* Mode sombre pour les cartes et sections */
[data-theme="dark"] .demo-card,
[data-theme="dark"] .decision-matrix,
[data-theme="dark"] .cache-stats,
[data-theme="dark"] .example,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .article-excerpt,
[data-theme="dark"] .article-content {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

/* Code blocks dans les cards */
.card > pre,
.card > h2 + pre {
    margin-left: calc(-1 * var(--card-padding, 1.5rem));
    margin-right: calc(-1 * var(--card-padding, 1.5rem));
    border-radius: 0;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.card > pre:last-child {
    margin-bottom: calc(-1 * var(--card-padding, 1.5rem));
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.card > h2 {
    margin-bottom: 1rem;
}

.card > pre + p {
    margin-top: 1.5rem;
}

/* Dividers */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Divider spécifique pour les dropdowns */
.user-dropdown .divider {
    margin: 0.5rem 0;
}

.divider-thick {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* Images responsives */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-rounded {
    border-radius: var(--radius-lg);
}

.img-circle {
    border-radius: 50%;
}

.img-thumbnail {
    padding: 0.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

/* Système de toasts amélioré */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(400px);
    transition: all var(--transition-base);
    pointer-events: auto;
    position: relative;
}

.toast.show {
    transform: translateX(0);
}

/* Icône de toast */
.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Contenu du toast */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Bouton de fermeture */
.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Variantes de toasts */
.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-error .toast-icon {
    color: var(--danger-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast-info .toast-icon {
    color: var(--info-color);
}

/* Barre de progression */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    transition: width linear;
}

/* Animation de sortie */
.toast.hide {
    transform: translateX(400px);
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ========================
   États de chargement
   ======================== */

/* Spinner simple */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Spinner centré dans un conteneur */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

/* Skeleton screens */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-800) 0%,
        var(--gray-700) 50%,
        var(--gray-800) 100%
    );
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Skeleton variantes */
.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
    width: 100%;
}

.skeleton-title {
    height: 1.5em;
    margin-bottom: 1rem;
    width: 50%;
}

.skeleton-img {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Skeleton card */
.skeleton-card {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Pulsation pour indicateur de chargement */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================
   États vides
   ======================== */

/* Conteneur d'état vide */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    color: var(--gray-400);
}

[data-theme="dark"] .empty-state-icon {
    color: var(--gray-600);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-action {
    margin-top: 2rem;
}

/* Variantes d'états vides */
.empty-state-404 .empty-state-icon {
    font-size: 6rem;
}

.empty-state-search {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
}

.empty-state-compact {
    padding: 2rem 1rem;
}

.empty-state-compact .empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.empty-state-compact .empty-state-title {
    font-size: 1.125rem;
}

/* Illustration SVG pour états vides */
.empty-state-illustration {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    opacity: 0.8;
}

/* ========================
   Utilitaires
   ======================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Container plus étroit pour le contenu texte */
.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Limite la largeur de lecture pour le confort */
.prose {
    max-width: 70ch;
}

/* Actions et formulaires */
.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.actions .btn {
    margin: 0;
}

.actions form {
    margin: 0;
}

.inline {
    display: inline-block;
    margin: 0;
}

form.inline {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

/* @ia-index-start utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
/* @ia-index-end utilities */

/* ========================
   Pages spécifiques
   ======================== */
.about-section {
    margin: 0 auto;
    padding: 2rem 0;
}

.about-content h2,
.about-content h3 {
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-content h3 svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.about-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.about-content li {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.architecture {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.arch-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.arch-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.arch-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.unique-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.feature-block {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.feature-block:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-block h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-block h4 svg {
    flex-shrink: 0;
}

.feature-block ul {
    list-style: none;
    padding: 0;
}

.feature-block li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.principle {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.principle:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.principle strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--shadow-lg);
}

.cta h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta pre {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    margin: 1rem auto;
    max-width: 600px;
}

.cta code {
    color: white;
}

.getting-started {
    margin: 4rem 0;
}

.getting-started h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.getting-started h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Les styles getting-started héritent maintenant de la règle générale pre */

.highlights {
    margin: 3rem 0;
}

.highlights h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}


blockquote {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: var(--radius-md);
}

/* ========================
   Responsive
   ======================== */

/* Très grands écrans */
@media (min-width: 1600px) {
    .container {
        max-width: 1440px;
    }
    
    .container.with-sidebar {
        grid-template-columns: 1fr 350px;
        gap: 3rem;
    }
}

/* Écrans moyens (laptops 1366px) */
@media (max-width: 1440px) {
    .container {
        max-width: 1280px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .container.with-sidebar {
        display: block;
        padding: 1rem;
    }
    
    .content-main {
        margin-bottom: 2rem;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
}

/* ========================
   Notifications
   ======================== */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform var(--transition-base);
    z-index: var(--z-tooltip);
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--info-color);
}

/* ========================
   Classes JavaScript
   ======================== */
.js-enabled .no-js {
    display: none;
}

.js-disabled {
    display: none;
}

.js-enabled .js-disabled {
    display: block;
}

/* ========================
   Page Profil améliorée
   ======================== */
.profile-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem 2rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -30px) rotate(180deg); }
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.avatar-large {
    width: 120px;
    height: 120px;
    font-size: 3rem;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    position: relative;
}

.avatar-large::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: var(--success-color);
    border: 3px solid white;
    border-radius: 50%;
}

.profile-header-info h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.profile-header-info p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 1.125rem;
}

.profile-body {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
}

.info-icon svg {
    width: 24px;
    height: 24px;
}

.info-content label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-content p {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

[data-theme="dark"] .profile-header {
    background: linear-gradient(135deg, var(--gray-700), var(--gray-800));
}

[data-theme="dark"] .info-icon {
    background: rgba(59, 130, 246, 0.2);
}

/* Stats cards (manquant) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.stat-card .icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    margin: 0 auto 0.75rem;
    display: block;
}

/* Footer amélioré */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================================================
   SYSTÈME DE CARTES UNIFIÉ - Composants réutilisables
   ============================================================================ */

/* Base commune pour toutes les cartes */
.card-base {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Variantes de cartes */
.card-secondary {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.card-content {
    padding: 1.5rem;
}

.card-content-sm {
    padding: 1rem;
}

.card-content-lg {
    padding: 2rem;
}

/* Effets hover standardisés */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color-light, #e3f2fd);
}

.card-hover-strong:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Images dans les cartes */
.card-image {
    width: 100%;
    height: 200px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.card-hover:hover .card-image img {
    transform: scale(1.05);
    opacity: 0.95;
}

.card-image img[src$=".svg"] {
    object-fit: contain;
    background: #f8f9fa;
}

/* Titres dans les cartes */
.card-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.card-title-sm {
    font-size: 1.25rem;
}

.card-title-lg {
    font-size: 2rem;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary-color);
}

/* ============================================================================
   SYSTÈME DE MÉTADONNÉES UNIFIÉ
   ============================================================================ */

.meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-inline {
    display: inline-flex;
    margin-bottom: 0;
}

/* ============================================================================
   SYSTÈME DE CONTENU TEXTUEL UNIFIÉ (PROSE)
   ============================================================================ */

.prose {
    font-size: 1.125rem;
    line-height: 1.7;
    max-width: 75ch;
    margin: 0 auto;
}

.prose h1,
.prose h2,
.prose h3 {
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }

.prose p {
    margin-bottom: 1.5rem;
}

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

.prose li {
    margin-bottom: 0.5rem;
}

.prose code {
    background: var(--bg-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre {
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

.prose a {
    color: var(--primary-color);
    text-decoration: underline;
}

.prose a:hover {
    text-decoration: none;
}

/* Prose centré pour les pages about */
.prose-centered {
    max-width: 70ch;
    margin: 0 auto;
}

/* ============================================================================
   ANIMATIONS ET TRANSITIONS HARMONISÉES
   ============================================================================ */

/* Animation d'apparition standardisée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out backwards;
}

/* Délais d'animation en cascade */
.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.2s; }
.fade-in-up:nth-child(5) { animation-delay: 0.25s; }
.fade-in-up:nth-child(6) { animation-delay: 0.3s; }

/* Animation au scroll moderne */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes directionnelles */
.scroll-reveal-left {
    transform: translateX(-30px);
}

.scroll-reveal-right {
    transform: translateX(30px);
}

.scroll-reveal-scale {
    transform: scale(0.9);
}

/* Animation de fade simple */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

/* Transitions hover standardisées */
.transition-fast { transition: all var(--transition-fast); }
.transition-base { transition: all var(--transition-base); }
.transition-slow { transition: all var(--transition-slow); }

/* ============================================================================
   ESPACEMENT STANDARDISÉ
   ============================================================================ */

/* Espacements verticaux standardisés pour les cartes et sections */
.mt-card {
    margin-top: 2rem;
}

.mb-card {
    margin-bottom: 2rem;
}

/* ============================================================================
   COMPOSANTS CORPORATE (Services, Team, Testimonials, CTA, etc.)
   ============================================================================ */

/* Services Grid */
.services-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.services-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.services-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.services-grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.service-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon .icon {
    width: 32px;
    height: 32px;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: gap var(--transition-base);
}

.service-link:hover {
    gap: 0.75rem;
}

.services-grid-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* Team Grid */
.team-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.team-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.team-grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.team-grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.team-member-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
}

.team-member-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.team-member-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.team-member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

.team-member-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.team-member-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-member-bio {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.team-member-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.team-member-socials a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.team-member-socials a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.team-grid-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* Testimonials */
.testimonials {
    position: relative;
    margin: 3rem 0;
    padding: 2rem;
}

.testimonials-track {
    position: relative;
    min-height: 300px;
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.testimonial-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.testimonial-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.testimonial-quote {
    position: relative;
    margin-bottom: 1.5rem;
}

.quote-mark {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    line-height: 1;
}

.testimonial-quote p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
    margin: 1rem 0;
}

.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.star {
    color: var(--gray-300);
    font-size: 1.25rem;
}

.star.filled {
    color: #fbbf24;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial-photo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.testimonial-author-info {
    text-align: left;
}

.testimonial-author-info strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-company {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.testimonials-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.testimonials-prev,
.testimonials-next {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonials-prev:hover,
.testimonials-next:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.testimonials-indicators {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.testimonials-indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.testimonials-indicator.active {
    background: var(--primary-color);
    width: 32px;
}

.testimonials-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* CTA Banner */
.cta-banner {
    background: var(--primary-color);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    margin: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-banner .btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
}

/* Accordion */
.accordion {
    margin: 2rem 0;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--bg-primary);
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--bg-primary);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
}

.accordion-header:hover {
    background: var(--bg-secondary);
}

.accordion-header[aria-expanded="true"] {
    background: var(--primary-light);
    color: var(--primary-color);
}

.accordion-icon {
    transition: transform var(--transition-base);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-body {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
}

.accordion-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* Tabs */
.tabs {
    margin: 2rem 0;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Tabs verticaux */
.tabs-vertical {
    display: flex;
    gap: 2rem;
}

.tabs-vertical .tabs-nav {
    flex-direction: column;
    border-bottom: none;
    border-right: 2px solid var(--border-color);
    min-width: 200px;
}

.tabs-vertical .tab-button {
    border-bottom: none;
    border-right: 3px solid transparent;
    justify-content: flex-start;
}

.tabs-vertical .tab-button.active {
    border-right-color: var(--primary-color);
    border-bottom-color: transparent;
}

.tabs-vertical .tabs-content {
    flex: 1;
}

.tabs-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    gap: 2rem;
    margin: 3rem 0;
    align-items: start;
}

.pricing-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pricing-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.pricing-grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.pricing-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: all var(--transition-base);
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pricing-card-highlighted {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
}

.pricing-card-highlighted:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.feature-included {
    color: var(--text-primary);
}

.feature-excluded {
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.pricing-grid-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* Timeline */
.timeline {
    position: relative;
    margin: 3rem 0;
}

.timeline-vertical {
    padding-left: 2rem;
}

.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-primary);
    position: relative;
    z-index: 2;
}

.timeline-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Timeline horizontal */
.timeline-horizontal {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
}

.timeline-horizontal .timeline-item {
    min-width: 250px;
    padding-left: 0;
    padding-top: 3rem;
}

.timeline-horizontal .timeline-marker {
    left: 50%;
    transform: translateX(-50%);
}

.timeline-horizontal::before {
    content: '';
    position: absolute;
    top: 19px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
}

.timeline-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

/* Mode sombre pour composants corporate */
[data-theme="dark"] .service-card,
[data-theme="dark"] .team-member-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .timeline-content {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .service-icon,
[data-theme="dark"] .team-member-initials,
[data-theme="dark"] .timeline-icon {
    background: rgba(79, 70, 229, 0.2);
}

/* @ia-index-end components-advanced */

/* @ia-index-start pages-specific */
/* ============================================================================
   Page: Blog (extraction des styles inline)
   ============================================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid var(--border-color);
    cursor: pointer;
    animation: fadeInUp 0.5s ease-out backwards;
    overflow: hidden;
}

.blog-card-content { padding: 1.5rem; }

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color-light, #e3f2fd);
}

.blog-card h2 { font-size: 1.5rem; margin: 0 0 0.5rem 0; }
.blog-card h2 a { color: inherit; text-decoration: none; }
.blog-card h2 a:hover { color: var(--primary-color); }

.blog-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-excerpt { margin: 1rem 0; color: var(--text-secondary); }
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }

/* Tag actif (complément) */
.tag-active { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.tag-active:hover { background: var(--primary-color-dark, #1976d2); color: white; }

.blog-card .btn { transition: all 0.2s ease; }
.blog-card:hover .btn { background-color: var(--primary-color-dark, #1976d2); transform: translateX(4px); }

/* Badge vedette positionné */
.featured-badge { position: absolute; top: 1rem; right: 1rem; z-index: 2; }

.blog-card-image {
    width: 100%; height: 200px; margin: 0; overflow: hidden; background: #f8f9fa;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease, opacity 0.3s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.05); opacity: 0.95; }
.blog-card-image img[src$=".svg"] { object-fit: contain; background: #f8f9fa; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 2rem 0; }
.pagination-info { color: var(--text-secondary); }
.blog-sidebar { margin-top: 0; }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--text-secondary); }

/* Nuage de tags sidebar */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-filter {
    display: inline-block; padding: 0.5rem 0.75rem; background: var(--bg-secondary); color: var(--text-secondary);
    border-radius: var(--radius-md); text-decoration: none; font-size: 0.875rem; border: 1px solid var(--border-color);
    transition: all 0.2s ease; white-space: nowrap; cursor: pointer;
}
.tag-filter:hover { background: var(--primary-color-light, #e3f2fd); color: var(--primary-color); border-color: var(--primary-color); text-decoration: none; transform: translateY(-1px); }
.tag-filter.tag-active { background: var(--primary-color); color: white; border-color: var(--primary-color); box-shadow: var(--shadow-sm); }
.tag-filter.tag-active:hover { background: var(--primary-color-dark, #1976d2); color: white; }
.tag-count { opacity: 0.8; font-size: 0.75rem; }

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .blog-card { padding: 1rem; }
    .blog-card h2 { font-size: 1.25rem; }
    .pagination { flex-wrap: wrap; gap: 0.5rem; }
    .pagination .btn { flex: 1; min-width: auto; }
    .blog-sidebar { margin-top: 2rem; order: 2; }
    .blog-stats { flex-direction: row; gap: 1rem; }
    .stat-item strong { font-size: 1.25rem; }
    .tag-cloud { gap: 0.25rem; }
    .tag-filter { font-size: 0.75rem; padding: 0.375rem 0.5rem; }
}

/* ============================================================================
   Page: Article (extraction des styles inline)
   ============================================================================ */
.article-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.article-header { margin-bottom: 2rem; position: relative; }
.article-header h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; }

.article-meta { color: var(--text-secondary); display: flex; align-items: center; gap: 0.25rem; margin-bottom: 1rem; }
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.featured-badge { margin-bottom: 1rem; }

.article-excerpt { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 2rem; padding: 1rem; background: var(--bg-secondary); border-radius: var(--radius-md); }

.article-body { font-size: 1.125rem; line-height: 1.7; margin-bottom: 3rem; max-width: 75ch; margin-left: auto; margin-right: auto; }
.article-body h1, .article-body h2, .article-body h3 { margin: 2rem 0 1rem; }
.article-body h1 { font-size: 2rem; }
.article-body h2 { font-size: 1.5rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body p { margin-bottom: 1.5rem; }
.article-body ul, .article-body ol { margin: 1.5rem 0; padding-left: 2rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body code { background: var(--bg-secondary); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875em; }
.article-body pre { padding: 1rem; border-radius: var(--radius-md); overflow-x: auto; margin: 1.5rem 0; }
.article-body pre code { background: none; padding: 0; }
.article-body a { color: var(--primary-color); text-decoration: underline; }
.article-body a:hover { text-decoration: none; }

.article-footer { border-top: 1px solid var(--border-color); padding-top: 2rem; }
.article-actions { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }

@media (min-width: 1600px) {
    .article-header h1 { font-size: 3rem; }
    .article-body { font-size: 1.2rem; line-height: 1.8; max-width: 80ch; }
    .article-content { padding: 3rem 4rem; }
}

@media (max-width: 768px) {
    .article-content { padding: 1rem; margin: 0; border-radius: var(--radius-md); }
    .article-actions { flex-direction: column; gap: 0.75rem; }
    .article-actions .btn { width: 100%; justify-content: center; }
    .article-header h1 { font-size: 2rem !important; }
    .article-excerpt { padding: 0.75rem; font-size: 1.125rem; }
}

.share-buttons { display: flex; gap: 0.5rem; }

/* Images */
.article-featured-image { margin: 1rem 0 2rem; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.article-featured-image img { width: 100%; height: auto; display: block; }
.article-gallery { margin: 2rem 0; padding: 1.5rem; background: var(--bg-secondary); border-radius: var(--radius-lg); }
.article-gallery h3 { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-item { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 150px; object-fit: cover; display: block; }

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
    .gallery-item img { height: 120px; }
}

/* ========================
   CARROUSEL RÉUTILISABLE - KISS + IA-FIRST
   ======================== */

/* Conteneur principal */
.ufk-carousel {
    position: relative;
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    z-index: 1; /* Sous les dropdowns (z-index: 1000) */
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Items du carrousel */
.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    display: block;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    z-index: 2; /* Sous les dropdowns mais au-dessus de l'image */
}

.carousel-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white;
}

.carousel-description {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* Contrôles de navigation */
.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2; /* Localement au-dessus du carrousel mais sous les dropdowns */
}

.carousel-prev,
.carousel-next {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.carousel-prev:focus,
.carousel-next:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Indicateurs */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2; /* Même niveau que les contrôles, sous les dropdowns */
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active,
.carousel-indicator:hover {
    background: white;
    border-color: white;
}

.carousel-indicator:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* État vide */
.carousel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-container {
        height: 300px;
    }
    
    .carousel-content {
        padding: 1.5rem 1rem 1rem;
    }
    
    .carousel-title {
        font-size: 1.25rem;
    }
    
    .carousel-description {
        font-size: 0.9rem;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .carousel-controls {
        padding: 0 0.5rem;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 250px;
    }
    
    .carousel-content {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .carousel-title {
        font-size: 1.125rem;
    }
    
    .carousel-description {
        font-size: 0.85rem;
    }
}

/* ========================
   BREADCRUMB RÉUTILISABLE - KISS + IA-FIRST avec SEO
   ======================== */

.breadcrumb {
    margin: 0 0 1.5rem 0;
    padding: 0;
}


/* Espacement cohérent pour tous les containers après la nav */
main > .container:first-child,
#main-content > .container:first-child {
    padding-top: 2rem;
}

/* Breadcrumb comme premier élément nécessite plus d'espace */
main > .breadcrumb:first-child,
#main-content > .breadcrumb:first-child {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Si un breadcrumb suit un container (ex: après flash messages) */
.container + .breadcrumb {
    margin-top: 1rem;
}

/* Espacement standard entre éléments principaux */
main > *:not(:first-child),
#main-content > *:not(:first-child) {
    margin-top: 1.5rem;
}

/* Reset pour les éléments spécifiques qui gèrent leur propre espacement */
main > .hero,
main > .container.with-sidebar,
#main-content > .hero,
#main-content > .container.with-sidebar {
    margin-top: 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    flex-wrap: nowrap;
    overflow: hidden;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
    min-width: 0;
    flex-shrink: 1;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
    flex-shrink: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    margin: -0.375rem -0.625rem;
    border-radius: var(--radius-md);
    position: relative;
    max-width: 250px;
    min-width: 0;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    background: rgba(91, 107, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(91, 107, 255, 0.15);
    transform: translateY(-1px);
}

/* Icône home améliorée */
.breadcrumb-home-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.breadcrumb-home-icon .icon {
    width: 18px;
    height: 18px;
}

.breadcrumb-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Troncature efficace pour tous les textes */
.breadcrumb-item a span[itemprop="name"],
.breadcrumb-item > span[aria-current="page"] {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Séparateur amélioré */
.breadcrumb-separator {
    margin: 0 0.75rem;
    color: var(--text-muted);
    opacity: 0.3;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.breadcrumb-separator .icon {
    width: 16px;
    height: 16px;
}

/* Effet de transition entre les éléments */
.breadcrumb-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.375rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: var(--border-color);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.breadcrumb-list:hover .breadcrumb-item:not(:last-child)::after {
    opacity: 0.2;
}

/* Texte caché sur mobile pour l'accueil */
@media (max-width: 480px) {
    .breadcrumb-item:first-child .breadcrumb-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        white-space: nowrap;
        border: 0;
    }
    
    .breadcrumb-item:first-child a {
        padding: 0.375rem;
    }
}

/* Responsive breadcrumb amélioré */
@media (max-width: 768px) {
    .breadcrumb-list {
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
    }
    
    .breadcrumb-item a span[itemprop="name"],
    .breadcrumb-item > span[aria-current="page"] {
        max-width: 140px;
    }
    
    .breadcrumb-separator {
        margin: 0 0.5rem;
    }
    
    .breadcrumb-separator .icon {
        width: 14px;
        height: 14px;
    }
    
    .breadcrumb-home-icon .icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .breadcrumb-list {
        padding: 0.5rem 0.75rem;
    }
    
    .breadcrumb-item {
        font-size: 0.75rem;
    }
    
    .breadcrumb-item a span[itemprop="name"],
    .breadcrumb-item > span[aria-current="page"] {
        max-width: 100px;
    }
    
    /* Affiche uniquement premier et dernier sur très petit écran */
    .breadcrumb-item:not(:first-child):not(:last-child) {
        display: none;
    }
    
    /* Affiche "..." si des éléments sont cachés */
    .breadcrumb-item:first-child + .breadcrumb-separator + .breadcrumb-item:not(:last-child) + .breadcrumb-separator::after {
        content: "...";
        margin-left: 0.25rem;
    }
}

/* Mode sombre */
.dark-mode .breadcrumb-list {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.dark-mode .breadcrumb-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.dark-mode .breadcrumb-separator {
    opacity: 0.4;
}

/* ========================
   CONTENT SECTION RÉUTILISABLE - KISS + IA-FIRST
   ======================== */

.content-section {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Centre le contenu textuel pour une meilleure lisibilité */
.content-section .prose {
    max-width: 70ch;
    margin: 0 auto;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.philosophy-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.philosophy-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.philosophy-card h4 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: normal;
}

.principles-list {
    list-style: none;
    padding: 0;
}

.principles-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.principles-list li:last-child {
    border-bottom: none;
}

.principles-list li:before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
}

/* Éléments spécifiques pour pages about */
.target-audience {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.audience-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform 0.2s;
}

.audience-card:hover {
    transform: translateY(-2px);
}

.audience-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.quote {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: var(--radius-md);
}

.quote cite {
    display: block;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive content-section */
@media (max-width: 768px) {
    .content-section {
        padding: 1.5rem;
    }
    
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .target-audience {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Alias pour compatibilité (certaines sections utilisent encore about-section) */
.about-section {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section .prose {
    max-width: 70ch;
    margin: 0 auto;
}

/* ========================
   CONTENT BLOCK RÉUTILISABLE - KISS + IA-FIRST  
   Blocs texte+image avec 5 layouts
   ======================== */

/* Base content-block */
.content-block {
    margin: 2rem 0;
    display: flex;
    gap: 2rem;
    align-items: var(--align, center);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.content-block:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Layouts horizontaux */
.content-block.layout-text-left,
.content-block.layout-text-right {
    flex-direction: row;
}

/* Note: text-right utilise l'ordre HTML inversé, pas de row-reverse */

/* Layouts verticaux */
.content-block.layout-image-top,
.content-block.layout-image-bottom {
    flex-direction: column;
    gap: 1.5rem;
}

.content-block.layout-image-bottom {
    flex-direction: column-reverse;
}

/* Layout overlay */
.content-block.layout-overlay {
    position: relative;
    flex-direction: column;
    gap: 0;
    min-height: 500px; /* Plus imposant pour hero banner */
}

.content-block.layout-overlay .content-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.content-block.layout-overlay .content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Image couvre tout l'espace */
}

/* Éléments de contenu */
.content-text {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: var(--justify, center);
}

.content-image {
    flex: 0 0 auto;
    position: relative;
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Amélioration pour les images SVG */
.content-image img[src$=".svg"] {
    object-fit: contain;
}

/* Pour layouts verticaux, adapter la hauteur selon la taille demandée */
.content-block.layout-image-top .content-image img,
.content-block.layout-image-bottom .content-image img {
    object-fit: contain;
}

.content-block.layout-image-top.image-small .content-image img,
.content-block.layout-image-bottom.image-small .content-image img {
    max-height: 150px;
}

.content-block.layout-image-top.image-medium .content-image img,
.content-block.layout-image-bottom.image-medium .content-image img {
    max-height: 250px;
}

.content-block.layout-image-top.image-large .content-image img,
.content-block.layout-image-bottom.image-large .content-image img {
    max-height: 350px;
}

/* Centrer les images dans leur conteneur */
.content-block.layout-image-top .content-image,
.content-block.layout-image-bottom .content-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Overlay spécifique */
.content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    color: white;
    padding: 3rem 2rem;
    z-index: 2; /* Au-dessus de l'image */
}

.content-overlay h1,
.content-overlay h2,
.content-overlay h3 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Tailles d'images (sauf pour overlay qui doit toujours être 100%) */
.content-block:not(.layout-overlay).image-small .content-image {
    flex-basis: 200px;
    max-width: 200px;
}

.content-block:not(.layout-overlay).image-medium .content-image {
    flex-basis: 300px;
    max-width: 300px;
}

.content-block:not(.layout-overlay).image-large .content-image {
    flex-basis: 400px;
    max-width: 400px;
}


/* Alignements verticaux */
.content-block.align-top {
    --align: flex-start;
    --justify: flex-start;
}

.content-block.align-center {
    --align: center;
    --justify: center;
}

.content-block.align-bottom {
    --align: flex-end;
    --justify: flex-end;
}

/* Responsive - Mobile stack */
@media (max-width: 768px) {
    .content-block.layout-text-left,
    .content-block.layout-text-right {
        flex-direction: column;
    }
    
    .content-block {
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .content-text {
        padding: 1.5rem;
    }
    
    .content-block.image-small .content-image,
    .content-block.image-medium .content-image,
    .content-block.image-large .content-image {
        flex-basis: auto;
        max-width: 100%;
    }
    
    .content-overlay {
        padding: 1.5rem 1rem;
    }
    
    .content-block.layout-overlay {
        min-height: 300px; /* Plus petit sur mobile */
    }
}

/* Carrousel spécifique à la page d'accueil */
.home-carousel {
    margin-bottom: 0;
    border-radius: var(--radius-xl);
}

.home-carousel .carousel-container {
    height: 450px;
}

@media (max-width: 768px) {
    .home-carousel .carousel-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .home-carousel .carousel-container {
        height: 280px;
    }
}
/* @ia-index-end pages-specific */

/* @ia-index-start admin */
/* ============================================================================
   Page: Admin Blog Images (extraction des styles inline)
   ============================================================================ */
.form-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.upload-form {
    margin-top: 1rem;
}

.current-image {
    margin: 1rem 0;
}

.current-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.gallery-delete {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    padding: 0.25rem 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-thumb:hover .gallery-delete {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-delete {
        opacity: 1;
    }
}

/* ============================================================================
   Page: Admin Cache Clear (extraction des styles inline)
   ============================================================================ */
.cache-options {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.cache-form {
    margin: 0;
}

.cache-option {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.cache-option h3 {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cache-option p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cache-stats {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

@media (min-width: 768px) {
    .cache-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   Page: Admin Sitemap (extraction des styles inline)
   ============================================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.sitemap-actions {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.sitemap-form {
    margin: 0;
}

.action-item {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.action-item h3 {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-item p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .sitemap-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   Page: About (extraction des styles inline)
   ============================================================================ */
.overlay-content {
    text-align: center;
}

.overlay-title {
    color: white;
    margin-bottom: 1rem;
}

.overlay-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.overlay-cta {
    font-size: 1.1rem;
}

/* ============================================================================
   Composants: Header (extraction des styles inline)
   ============================================================================ */
.visually-hidden {
    display: none;
}

.nav-link-button {
    width: 100%;
    text-align: left;
}

/* ============================================================================
   Formulaires: Styles inline (extraction)
   ============================================================================ */
.form-inline-display {
    display: inline;
}

/* ============================================================================
   Page: Home (extraction des styles inline)
   ============================================================================ */
.section-space-top {
    margin-top: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-cta {
    text-align: center;
    margin-top: 2rem;
}

/* ============================================================================
   Page: Contact avec carte interactive
   ============================================================================ */

/* Layout principal de la page contact */
.contact-content {
    display: grid;
    gap: 3rem;
    margin: 2rem 0;
}

/* Section formulaire de contact */
.contact-form-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-form-section p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

/* Liens rapides dans la sidebar contact */
.contact-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-links li {
    margin-bottom: 0.75rem;
}

.contact-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-links a:hover {
    color: var(--primary-color);
}

.contact-links .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Erreurs de formulaire */
.form-errors {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--danger-alpha);
    margin-bottom: 1.5rem;
}

.form-errors li {
    margin-bottom: 0.5rem;
}

.form-errors li:last-child {
    margin-bottom: 0;
}

/* Section informations de contact */
.contact-info-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-info-section .sidebar-card {
    margin-bottom: 1.5rem;
}

.contact-info-section .sidebar-card:last-of-type {
    margin-bottom: 0;
}

/* Section carte */
.contact-map-section {
    margin: 3rem 0;
}

.contact-map-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ============================================================================
   Composant: Map interactive réutilisable
   ============================================================================ */

/* Conteneur principal de la carte */
.map-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 300px;
    width: 100%;
}

/* Carte de fallback (quand JavaScript désactivé ou Leaflet indisponible) */
.map-fallback {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Locations dans la carte de fallback */
.map-locations {
    text-align: left;
    max-width: 400px;
    width: 100%;
}

.map-location {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-location:last-child {
    margin-bottom: 0;
}

.map-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.map-location strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.map-location a {
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.map-location a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Notice sous la carte */
.map-notice {
    margin-top: 1rem;
    text-align: center;
}

.map-notice p {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Classes Leaflet personnalisées */
.leaflet-container {
    font-family: var(--font-body);
    border-radius: var(--radius-lg);
}

.leaflet-popup-content-wrapper {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px var(--shadow-color);
    border: 1px solid var(--border);
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.leaflet-popup-tip {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-top: none;
    border-right: none;
}

/* Responsive pour la page contact */
@media (min-width: 768px) {
    .contact-content {
        grid-template-columns: 2fr 1fr;
        gap: 4rem;
    }
    
    .map-locations {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .map-location {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    
    .contact-map-section {
        margin: 4rem 0;
    }
}

/* Classes utilitaires pour différentes tailles de carte */
.map-container.map-small {
    min-height: 200px;
}

.map-container.map-large {
    min-height: 500px;
}

.map-container.contact-map {
    min-height: 450px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

/* ============================================================================
   Isochrones - Zones d'accessibilité temporelles
   ============================================================================ */

/* Polygones d'isochrones Leaflet */
.leaflet-interactive[fill*="#00ff00"] {
    /* Style pour zone 5 min (vert) */
    stroke-dasharray: none;
    transition: opacity 0.3s ease;
}

.leaflet-interactive[fill*="#0080ff"] {
    /* Style pour zone 10 min (bleu) */
    stroke-dasharray: 5, 5;
    transition: opacity 0.3s ease;
}

.leaflet-interactive[fill*="#ff0000"] {
    /* Style pour zone 15 min (rouge) */
    stroke-dasharray: 10, 5;
    transition: opacity 0.3s ease;
}

/* Interaction hover sur les polygones */
.leaflet-interactive:hover {
    opacity: 0.8 !important;
}

/* Popups d'isochrones */
.leaflet-popup.isochrone-popup .leaflet-popup-content-wrapper {
    background: rgba(var(--bg-primary-rgb), 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.leaflet-popup.isochrone-popup .leaflet-popup-content {
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
}

/* Légende des isochrones */
.isochrone-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(var(--bg-primary-rgb), 0.9);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px var(--shadow-color);
    font-size: 0.8rem;
    z-index: 1000;
}

.isochrone-legend h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.isochrone-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.isochrone-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.isochrone-legend-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Loading état pour isochrones */
.map-container.loading-isochrones::after {
    content: "Chargement des zones d'accessibilité...";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    z-index: 1000;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ============================================================================
   Préférences utilisateur - Accessibilité
   ============================================================================ */

/* Respect des préférences de mouvement réduit */
@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;
    }
    
    /* Désactiver les transformations au hover */
    .btn:hover,
    .card:hover,
    .form-control:focus,
    .map-location:hover {
        transform: none !important;
    }
}

/* ============================================================================
   Page: Admin Configuration
   ============================================================================ */
.config-form {
    max-width: 800px;
}
.config-form .form-check-label {
    cursor: pointer;
}
.config-form .form-check-label small {
    margin-left: 24px;
}

/* ============================================================================
   Page: Contact - Recherche bureaux partenaires
   ============================================================================ */

/* Section de recherche de bureaux */
.partner-search-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.partner-search-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Formulaire de recherche */
.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    gap: 0;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    overflow: visible; /* CHANGÉ: permet aux suggestions d'être visibles */
    position: relative;
}

/* Container pour auto-complétion */
.search-autocomplete-container {
    position: relative;
    flex: 1;
}

.search-input-group .form-control {
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    box-shadow: none;
    border-right: 1px solid var(--border-color);
}

.search-input-group .btn {
    border-radius: 0;
    padding: 1rem 2rem;
    border: none;
    font-weight: 600;
    white-space: nowrap;
}

/* Suggestions d'auto-complétion */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.search-suggestion {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-suggestion:hover,
.search-suggestion.highlighted {
    background: var(--primary-light);
    color: var(--primary-color);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-suggestion:hover .search-suggestion-icon,
.search-suggestion.highlighted .search-suggestion-icon {
    color: var(--primary-color);
}

.search-suggestion-text {
    flex: 1;
    min-width: 0;
}

.search-suggestion-main {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion:hover .search-suggestion-main,
.search-suggestion.highlighted .search-suggestion-main {
    color: var(--primary-color);
}

.search-suggestion-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* État de chargement des suggestions */
.search-suggestions.loading {
    display: block;
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

.search-suggestions.loading:after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Message "Aucune suggestion" */
.search-suggestions.no-results {
    display: block;
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================================================
   Filtres par tags
   ============================================================================ */

.tags-filter-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(var(--bg-secondary-rgb), 0.5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.tags-filter-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.tags-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Filtre de tag individuel */
.tag-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    font-size: 0.9rem;
}

.tag-filter:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.tag-filter.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tag-filter input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tag-label {
    flex: 1;
    font-weight: 500;
}

.tag-count {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
}

.tag-filter.selected .tag-label,
.tag-filter.selected .tag-count {
    color: white;
}

/* Tags sélectionnés (filtres actifs) */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.selected-tags strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
}

.remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-base);
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clear-all-tags {
    background: var(--text-muted);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background var(--transition-base);
}

.clear-all-tags:hover {
    background: var(--danger-color);
}

/* Grille des partenaires trouvés */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Carte individuelle de partenaire */
.partner-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* En-tête de carte partenaire */
.partner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
    min-height: 2rem; /* Assurer une hauteur minimum même sans badge */
}

.partner-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 600;
    flex: 1;
    line-height: 1.3;
}

.partner-header h4 i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* Style pour headers sans badge de distance */
.partner-header:not(:has(.distance-badge)) {
    justify-content: flex-start;
}

/* Fallback pour navigateurs sans support :has() */
.partner-header h4:only-child {
    width: 100%;
}

/* Badge de distance */
.distance-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Détails du partenaire */
.partner-details p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

.partner-details p:last-child {
    margin-bottom: 0;
}

.partner-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.partner-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.partner-details a:hover {
    text-decoration: underline;
}

/* Tags des partenaires */
.partner-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.partner-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    border: 1px solid;
}

/* Tags par catégorie */
.partner-tag.tag-bureau-principal,
.partner-tag.tag-agence,
.partner-tag.tag-bureau-secondaire,
.partner-tag.tag-antenne {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.partner-tag.tag-services-complets,
.partner-tag.tag-services-particuliers,
.partner-tag.tag-services-proximite,
.partner-tag.tag-services-de-base {
    background: var(--info-light);
    color: var(--info-color);
    border-color: var(--info-color);
}

.partner-tag.tag-entreprise,
.partner-tag.tag-particulier,
.partner-tag.tag-conseil {
    background: var(--success-light);
    color: var(--success-color);
    border-color: var(--success-color);
}

.partner-tag.tag-parking,
.partner-tag.tag-accessible,
.partner-tag.tag-weekend,
.partner-tag.tag-rendez-vous-soir,
.partner-tag.tag-pres-transport,
.partner-tag.tag-centre-ville {
    background: var(--warning-light);
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.partner-tag.tag-ville-principale {
    background: var(--secondary-light);
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.partner-tag.tag-immobilier,
.partner-tag.tag-credit,
.partner-tag.tag-assurance,
.partner-tag.tag-investissement {
    background: #f8d7da;
    color: #721c24;
    border-color: #721c24;
}

.partner-tag.more-tags {
    background: var(--text-muted);
    color: white;
    border-color: var(--text-muted);
    font-weight: 600;
}

/* Informations du réseau */
.network-info {
    margin-top: 2rem;
}

.network-info .alert {
    border-left: 4px solid var(--info-color);
    background: var(--info-light);
    border-radius: var(--radius-lg);
}

/* Responsive pour recherche partenaires */
@media (max-width: 768px) {
    .partner-search-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }
    
    .search-input-group .form-control {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .search-input-group .btn {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        justify-content: center;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .partner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .distance-badge {
        align-self: flex-start;
    }
}

@media (min-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2rem;
    }
}

/* Améliorations pour grandes listes */
.partners-grid.large-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.partners-grid.large-list .partner-card {
    padding: 1.25rem;
}

.partners-grid.large-list .partner-header h4 {
    font-size: 1rem;
}

/* Animation d'apparition des cartes */
.partner-card {
    animation: slideInUp 0.3s ease-out;
}

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

/* États de chargement */
.search-form.loading .btn {
    position: relative;
}

.search-form.loading .btn:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   Améliorations carte pour nombreux partenaires
   ============================================================================ */

/* Carte adaptée pour afficher de nombreux points */
.contact-map.many-partners {
    min-height: 500px;
}

/* Clusters de marqueurs personnalisés (si ajoutés plus tard) */
.leaflet-marker-cluster {
    background: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    color: white;
    font-weight: bold;
}

.leaflet-marker-cluster.marker-cluster-small {
    background: var(--primary-color);
}

.leaflet-marker-cluster.marker-cluster-medium {
    background: var(--warning-color);
}

.leaflet-marker-cluster.marker-cluster-large {
    background: var(--danger-color);
}

/* Popups de partenaires sur carte */
.leaflet-popup.partner-popup .leaflet-popup-content-wrapper {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.leaflet-popup.partner-popup .leaflet-popup-content {
    margin: 1rem;
    line-height: 1.5;
}

.leaflet-popup.partner-popup h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1rem;
}

.leaflet-popup.partner-popup p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.leaflet-popup.partner-popup .distance-info {
    background: var(--success-light);
    color: var(--success-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ============================================================================
   PRODUITS - Système e-commerce
   ============================================================================ */

/* Badge Admin (fonctionnalités réservées) */
.badge-admin {
    background: #dc2626;
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-left: var(--spacing-1);
    vertical-align: middle;
}

.admin-only-field {
    border-left: 3px solid #dc2626;
    padding-left: var(--spacing-3);
    background: rgba(220, 38, 38, 0.03);
    border-radius: var(--radius-md);
}

/* Grille de produits */
.products-grid {
    display: grid;
    gap: var(--spacing-5); /* Augmenté à 2rem (32px) pour espacer les cartes */
    margin: var(--spacing-4) 0;
}

.products-grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.products-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.products-grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Carte produit */
.product-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-content {
    padding: var(--spacing-3);
}

.product-sku {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-1);
}

.product-card h2 {
    font-size: 1.125rem;
    margin: var(--spacing-2) 0;
}

.product-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
}

.product-card h2 a:hover {
    color: var(--primary);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: var(--spacing-2) 0;
}

.product-stock {
    font-size: 0.875rem;
    margin: var(--spacing-2) 0;
}

.product-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: var(--spacing-2) 0;
    line-height: 1.5;
}

.product-specs {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: var(--spacing-2) 0;
}

.product-owner {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: var(--spacing-2) 0;
    padding-top: var(--spacing-2);
    border-top: 1px solid var(--border-color);
}

/* Badges stock */
.stock-badge {
    position: absolute;
    top: var(--spacing-2);
    right: var(--spacing-2);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
}

.stock-badge.stock-low {
    background: var(--warning);
    color: white;
}

.stock-badge.stock-out {
    background: var(--error);
    color: white;
}

/* Produit inactif */
.product-card.product-inactive {
    opacity: 0.6;
}

.product-card-compact .product-card-content {
    padding: var(--spacing-2);
}

/* Page détail produit */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
    margin: var(--spacing-4) 0;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

.product-gallery {
    position: sticky;
    top: var(--spacing-4);
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    cursor: pointer;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--spacing-2);
    margin-top: var(--spacing-3);
}

.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary);
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-2);
}

.product-price-big {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: var(--spacing-3) 0;
}

.product-stock-info {
    display: flex;
    gap: var(--spacing-2);
    align-items: center;
    margin: var(--spacing-3) 0;
}

.product-description-full {
    margin: var(--spacing-4) 0;
}

.product-description-full h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-2);
}

.product-specs-detailed {
    margin: var(--spacing-4) 0;
    padding: var(--spacing-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.product-specs-detailed h2 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-2);
}

.product-specs-detailed ul {
    list-style: none;
    padding: 0;
}

.product-specs-detailed li {
    padding: var(--spacing-2) 0;
    border-bottom: 1px solid var(--border-color);
}

.product-specs-detailed li:last-child {
    border-bottom: none;
}

.product-owner-info {
    font-size: 0.9375rem;
    padding: var(--spacing-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin: var(--spacing-3) 0;
}

.product-actions {
    display: flex;
    gap: var(--spacing-2);
    flex-wrap: wrap;
}

/* Filtres de recherche produits */
.filters-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-3);
}

@media (max-width: 768px) {
    .filters-form .form-row {
        grid-template-columns: 1fr;
    }
}

.results-header {
    padding: var(--spacing-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-3);
}

/* Galerie d'images dans le formulaire */
.product-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-3);
    margin: var(--spacing-3) 0;
}

.form-section {
    margin-top: var(--spacing-4);
    padding-top: var(--spacing-4);
    border-top: 2px solid var(--border-color);
}

.form-section h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-3);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

/* Galerie d'images (admin/membre) */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-3);
    margin-top: var(--spacing-3);
}

.image-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.image-item.image-main {
    border-color: var(--success);
}

.image-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.image-actions {
    padding: var(--spacing-2);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.image-item small {
    display: block;
    padding: 0 var(--spacing-2) var(--spacing-2);
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
}

/* ============================================================================
   Page: Member Products - Interface compacte pour gestion de masse
   ============================================================================ */

/* Layout compact */
.page-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header-compact h1 {
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

/* Barre de filtres compacte */
.filters-bar {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group:last-child {
    flex-direction: row;
    align-items: flex-end;
    margin-left: auto;
}

.view-switcher {
    display: flex;
    gap: 0.25rem;
}

.view-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.view-btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.view-btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Table de base - Styles communs */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    white-space: nowrap;
    background: var(--bg-secondary);
}

.table th a {
    color: inherit;
    text-decoration: none;
}

.table th a:hover {
    color: var(--primary);
}

.table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tr:hover {
    background: var(--bg-secondary);
}

.table tbody tr:nth-child(even) {
    background: var(--bg-tertiary);
}

.table tbody tr:nth-child(even):hover {
    background: var(--bg-secondary);
}

/* Table compacte - Surcharge uniquement padding */
.table-compact td {
    padding: 0.5rem;
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.no-image-thumb {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

/* Édition inline */
.inline-edit {
    width: 70px;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: inherit;
    transition: all var(--transition-fast);
}

.inline-edit:hover,
.inline-edit:focus {
    border-color: var(--border-color);
    background: var(--bg-primary);
    outline: none;
}

.inline-edit:focus {
    border-color: var(--primary);
}

.currency {
    margin-left: 0.25rem;
    color: var(--text-secondary);
}

/* Switch toggle compact */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: .2s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Actions compactes */
.btn-group-compact {
    display: flex;
    gap: 0.25rem;
}

.btn-group-compact .btn {
    padding: 0.25rem 0.5rem;
}

.bulk-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Cartes de statistiques compactes */
.stats-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    min-width: 120px;
    flex: 1;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-unit {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* Barre de filtres réutilisable */
.filters-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
}

.filters-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-inline input[type="checkbox"] {
    cursor: pointer;
}

/* Responsive filters */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
        min-width: 100%;
    }
    
    .filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .filter-actions .btn {
        flex: 1;
    }
    
    .stats-cards {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: 100%;
    }
}

/* Grille compacte de produits */
.products-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem; /* Augmenté de 1rem à 1.25rem pour éviter touche-touche */
}

.product-card-compact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.product-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-card-compact .product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-secondary);
}

.product-card-compact .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-compact .no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.product-card-compact .product-info {
    padding: 0.75rem;
}

.product-card-compact h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.product-card-compact .sku {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.product-meta .price {
    font-weight: 600;
    color: var(--primary);
}

.product-meta .stock {
    color: var(--text-secondary);
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
}

/* Pagination améliorée */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.per-page-selector select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg-primary);
}

/* Desktop : Filtres en ligne pour plus de compacité */
@media (min-width: 769px) {
    .filters-form {
        align-items: flex-end;
    }
    
    .filter-group {
        flex-direction: column;
        min-width: 150px;
    }
    
    .filter-group:first-child {
        flex: 1;
        max-width: 300px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters-form {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group .form-control {
        width: 100%;
    }
    
    .stats-bar {
        gap: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* Table responsive avec scroll horizontal */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-compact {
        font-size: 0.75rem;
        min-width: 600px;
    }
    
    .inline-edit {
        width: 50px;
    }
    
    .products-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ========================
   Modal pour member-products
   ======================== */

.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 2% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Form dans le modal */
.modal-body .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 60vh;
    }
    
    .modal-body .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Améliorations UX du dropdown utilisateur (Mode UFK)
   ========================================================================== */

/* Ajouter un indicateur visuel de dropdown sur l'avatar */
.user-menu-toggle {
    position: relative;
    padding: 0.375rem !important; /* Zone de clic élargie mais sans déborder */
}

.user-menu-toggle::after {
    content: '';
    position: absolute;
    bottom: 2px;  /* À l'intérieur de l'avatar */
    right: 2px;   /* À l'intérieur de l'avatar */
    width: 10px;
    height: 10px;
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Légère ombre pour visibilité */
}

/* Légère rotation au survol pour indiquer l'interactivité */
.user-menu-toggle:hover::after {
    transform: rotate(45deg);
}

/* Rotation complète quand le menu est ouvert */
.user-menu.active .user-menu-toggle::after {
    transform: rotate(180deg);
}

/* Amélioration du focus pour l'accessibilité */
.user-menu-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Animation plus fluide du dropdown */
.user-dropdown {
    transform-origin: top right;
}

/* Amélioration des items du dropdown */
.user-dropdown .dropdown-item {
    position: relative;
    overflow: hidden;
}

.user-dropdown .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    transform: translateX(-100%);
    transition: transform var(--transition-fast);
}

.user-dropdown .dropdown-item:hover::before,
.user-dropdown .dropdown-item:focus::before {
    transform: translateX(0);
}

.user-dropdown .dropdown-item:focus {
    outline: none;
    background: var(--bg-tertiary);
}

/* Badge admin plus visible */
.user-info .badge {
    margin-top: 0.5rem;
    display: inline-block;
}

/* Amélioration mobile : garder le dropdown cohérent */
@media (max-width: 768px) {
    .navbar-actions-mobile .user-menu {
        position: relative;
    }
    
    .navbar-actions-mobile .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: 280px;
        margin-top: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all var(--transition-fast);
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-actions-mobile .user-menu.active .user-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Masquer l'affichage statique sur mobile */
    .navbar-actions-mobile .user-info:not(.user-dropdown .user-info) {
        display: none;
    }
    
    .navbar-actions-mobile .nav-link:has(.icon) {
        display: none;
    }
}
/* @ia-index-end admin */
