/* 
 * FICHIER CSS POUR LES STYLES COMMUNS
 * Contient les styles de base et éléments partagés du site Savoor
 */

/* Import des modes de recherche (hero et header) */
@import url('hero-search-modes.css');

/* ============================================
   ANTI-FOUC DARK MODE STYLES v2
   Optimisé pour réduire le délai
============================================ */

/* Prévention du FOUC avec détection rapide */
html {
    /* Pas de transition par défaut pour éviter les délais */
    background-color: #f9f9f9;
    color: #333;
    /* Empêcher le défilement horizontal */
    overflow-x: hidden;
    /* Forcer la scrollbar verticale pour éviter le décalage gauche-droite au chargement */
    overflow-y: scroll;
}

/* Application immédiate du dark mode */
html.dark-mode {
    background-color: #1e2526 !important;
    color: #f0f0f0 !important;
}

/* Light mode explicite */
html.light-mode {
    background-color: #f9f9f9 !important;
    color: #333 !important;
}

/* Body hérite du background */
body {
    background-color: transparent !important;
    min-height: 100vh;
}

/* Transition uniquement lors du changement manuel */
html.theme-transitioning {
    transition: background-color 0.3s ease, color 0.3s ease;
}

html.theme-transitioning * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* S'assurer que les éléments critiques ont la bonne couleur immédiatement */
html.dark-mode .main-header {
    background: #232a2e !important;
    background: linear-gradient(135deg, #232a2e 0%, #2f2929 100%) !important;
}

html.dark-mode footer {
    background-color: #1a1f20 !important;
}

/* Réinitialiser après les anciennes classes */
html.theme-loading,
html.theme-ready {
    /* Ces classes ne sont plus utilisées */
}

/* ============================================
   VARIABLES GLOBALES ET RESET
============================================ */
:root {
    --primary-color: #ff6b6b;
    --primary-color-rgb: 255, 107, 107; /* Version RGB pour transparence */
    --secondary-color: #4ecdc4;
    --accent-color: #ffd166;
    --dark-color: #2d3436;
    --light-color: #f9f9f9;
    --text-color: #333;
    --text-light: #666;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --card-bg: #ffffff;
}

.dark-mode {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffd166;
    --dark-color: #f9f9f9;
    --light-color: #1e2526;
    --text-color: #f0f0f0;
    --text-light: #cccccc;
    --card-bg: #232a2e;
    --footer-bg: #1a1f20;
    --header-bg: #2a3334;
    --dropdown-bg: #2a3334;
    --border-color: #3a4446;
    --hover-bg: #3a4446;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    transition: var(--transition);
}

/* Clearfix Utility */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}


/* ============================================
   HEADER ET NAVIGATION
============================================ */

/* Structure du header */
.main-header {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    height: 80px;
    background-color: white;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.main-header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-header.scrolling {
    z-index: 9999; /* Valeur très élevée pour s'assurer que le header reste au-dessus */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); /* Ombre plus prononcée pendant le défilement */
}

.dark-mode .main-header {
    background: #2a3334;
    background: linear-gradient(135deg, #2a3334 0%, #2f2929 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    height: 80px; /* Hauteur explicite correspondant au header */
}

.header-left, .header-center, .header-right {
    display: flex;
    align-items: center;
}

.header-left {
    flex: 0 0 auto;
    min-width: 200px;
    height: 45px;
    display: flex;
    align-items: center;
    margin-right: auto;
}

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 990;
    padding-top: 0px;
    flex: 1 1 auto;
    position: absolute;
    left: 210px;
    right: 210px;
    margin: 0 auto;
    height: 45px;
    width: calc(100% - 420px);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    white-space: nowrap;
    height: 60px;
}

.logo:focus-visible {
    outline: none;
    border: none;
}

.logo img {
    width: 120px;
    margin: 0 7px 0 0;
}

.logo span.infinity {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-right: 5px;
}

.logo-text {
    display: inline-block;
}

/* ============================================
   BARRE DE RECHERCHE DU HEADER - STYLÉE
============================================ */
.header-search-container {
    width: 100%;
    max-width: 500px; /* Taille réduite comme avant */
    transition: var(--transition);
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
}

.header-search {
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,245,245,0.95) 100%);
    border-radius: 50px;
    padding: 0;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    height: 45px; /* Hauteur réduite comme avant */
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* Effet de brillance subtle - une seule fois au hover (sauf si focus) */
.header-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: none; /* Pas de transition pour éviter le retour */
    pointer-events: none;
}

.header-search:hover:not(:focus-within)::before {
    animation: sweep 0.8s ease-out forwards;
}

@keyframes sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.header-search:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12), 0 3px 12px rgba(0,0,0,0.06);
    border-color: rgba(var(--primary-color-rgb), 0.2);
}

.header-search:focus-within {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.2), 0 4px 15px rgba(0,0,0,0.08);
}

/* Dark mode */
.dark-mode .header-search {
    background: linear-gradient(135deg, rgba(58,68,70,0.95) 0%, rgba(48,56,58,0.95) 100%);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
}

.dark-mode .header-search:hover {
    border-color: rgba(var(--primary-color-rgb), 0.3);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0,0,0,0.3);
}

.dark-mode .header-search:focus-within {
    background: linear-gradient(135deg, #3a4446 0%, #2d3638 100%);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.3), 0 4px 15px rgba(0,0,0,0.4);
}

.header-search .search-input {
    background: transparent;
    border: none;
    padding: 0 20px;
    flex: 1;
    font-size: 0.98rem;
    font-weight: 400;
    outline: none;
    caret-color: var(--primary-color);
    height: 100%;
    width: calc(100% - 60px);
    box-sizing: border-box;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.header-search .search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
    font-weight: 400;
    transition: color 0.3s ease;
}

.header-search:focus-within .search-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

/* Styles pour éviter le zoom automatique sur mobile */
@media (max-width: 768px) {
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Taille minimale pour éviter le zoom */
        -webkit-appearance: none;
        appearance: none;
    }
}

.dark-mode .header-search .search-input {
    color: white;
}

.dark-mode .header-search .search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.dark-mode .header-search:focus-within .search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Bouton de recherche stylé */
.header-search .search-btn {
    border-radius: 50px;
    padding: 0;
    margin: 0px;
    width: 41px;
    height: 40px;
    min-width: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #e55c5c 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

/* Effet de pulse sur le bouton */
.header-search .search-btn::after {
    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 ease, height 0.6s ease;
}

.header-search .search-btn:hover::after {
    width: 100%;
    height: 100%;
}

.header-search .search-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.45);
}

.header-search .search-btn:active {
    transform: scale(0.95);
}

.header-search .search-btn svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    bottom: 1px;
}

/* Bouton clear pour effacer la recherche */
.header-search .search-clear-btn,
.search-input-wrapper .search-clear-btn {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    z-index: 2;
}

.header-search .search-clear-btn:hover,
.search-input-wrapper .search-clear-btn:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
}

/* Afficher la croix quand il y a du texte */
.header-search-container.has-text .search-clear-btn,
.search-input-wrapper.has-text .search-clear-btn {
    opacity: 1;
    visibility: visible;
}

/* Dark mode */
.dark-mode .header-search .search-clear-btn,
.dark-mode .search-input-wrapper .search-clear-btn {
    color: #888;
}

.dark-mode .header-search .search-clear-btn:hover,
.dark-mode .search-input-wrapper .search-clear-btn:hover {
    background-color: rgba(255, 107, 107, 0.15);
    color: var(--primary-color);
}

.header-search .search-btn-icon {
    display: none; /* Caché par défaut sur grands écrans */
}

/* Filtres avancés du header */
.header-advanced-filters {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background-color: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    z-index: 1060;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: none;
    transform-origin: top center;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
}

.header-advanced-filters::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    margin-left: -8px;
    width: 16px;
    height: 16px;
    background-color: white;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    z-index: -1;
}

.dark-mode .header-advanced-filters {
    background-color: var(--dark-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .header-advanced-filters::before {
    background-color: var(--dark-color);
    border-color: #444;
}

.show-filters .header-advanced-filters {
    max-height: 150px;
    opacity: 1;
    visibility: visible;
    padding: 15px 20px;
    border-color: #eee;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dark-mode .show-filters .header-advanced-filters {
    border-color: #444;
}

.header-advanced-filters .filter-tag {
    padding: 10px 18px;
    background-color: #f5f5f5;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin: 0 4px;
}

.dark-mode .header-advanced-filters .filter-tag {
    background-color: #3a3a3a;
}

.header-advanced-filters .filter-tag:hover {
    background-color: #ededed;
    transform: translateY(-2px);
}

.dark-mode .header-advanced-filters .filter-tag:hover {
    background-color: #444;
}

.header-advanced-filters .filter-tag.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    font-weight: 600;
}

/* ============================================
   MENU UTILISATEUR ET DROPDOWN
============================================ */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 200px;
    height: 45px; /* Hauteur cohérente avec les autres éléments */
    justify-content: flex-end;
}

/* =================================================
   NOUVEAU MENU TOGGLE AVEC DEUX ÉTATS
   ================================================= */

/* Structure principale du menu toggle */
.menu-toggle {
    cursor: pointer;
    height: 45px;
    margin-left: 10px;
    z-index: 101;
    position: relative;
    width: 90px;
}

/* Style pour les deux états (normal et actif) */
.menu-normal-state,
.menu-active-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease;
}

/* Par défaut, l'état normal est visible et l'état actif est caché */
.menu-normal-state {
    opacity: 1;
    pointer-events: auto;
}

.menu-active-state {
    opacity: 0;
    pointer-events: none;
}

/* Quand le menu est ouvert, on inverse la visibilité */
.profile-dropdown.show ~ .menu-toggle .menu-normal-state {
    opacity: 0;
    pointer-events: none;
}

.profile-dropdown.show ~ .menu-toggle .menu-active-state {
    opacity: 1;
    pointer-events: auto;
}

/* Styles des boutons dans les deux états */
.menu-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #dddddd;
    border-radius: 40px;
    padding: 0 12px 0 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    height: 45px;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

/* DÉSACTIVÉ : Pas d'effet hover/focus/active natif */
.menu-button:hover,
.menu-button:focus,
.menu-button:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    border-color: #dddddd;
    outline: none;
}

/* Effet glow UNIQUEMENT quand le dropdown est ouvert (géré par JS) */
.menu-button.active-dropdown {
    box-shadow: 0 0 8px var(--primary-color) !important;
    border-color: transparent !important;
}

/* Styles pour les icônes */
.menu-button .hamburger-icon {
    margin-right: 10px;
    margin-left: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #333;
    flex-shrink: 0;
}

.menu-button .hamburger-icon i {
    font-size: 24px;
    line-height: 1;
}

.menu-button .profile-icon {
    width: 24px;
    height: 24px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-button .profile-icon > i {
    font-size: 24px;
    line-height: 1;
}

/* Couleur blanche pour les icônes dans l'état actif */
.menu-button.active .hamburger-icon,
.menu-button.active .profile-icon {
    color: white;
}

/* SVG dans profile-icon */
.menu-button .profile-icon svg {
    display: block;
    height: 100%;
    width: 100%;
    fill: currentcolor;
}

/* Mode sombre */
.dark-mode .menu-button {
    border-color: var(--border-color);
    background-color: #3a4446;
}

.dark-mode .menu-button .hamburger-icon,
.dark-mode .menu-button .profile-icon {
    color: #e0e0e0;
}

/* Bouton actif en mode sombre */
.dark-mode .menu-button.active {
    background-color: var(--primary-color);
}

.dark-mode .menu-button.active .hamburger-icon,
.dark-mode .menu-button.active .profile-icon {
    color: white;
}

/* Menu dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #ffffff;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    width: 320px;
    padding: 12px 0;
    z-index: 1060;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    pointer-events: none;
    border: 1px solid rgba(0,0,0,0.06);
}

/* S'assurer que le menu est toujours visible sur mobile */
@media (max-width: 1024px) {
    .profile-dropdown {
        z-index: 1070;
    }
}

/* Adaptation pour petits écrans */
@media (max-width: 480px) {
    .profile-dropdown {
        width: calc(100vw - 16px);
        max-width: 320px;
        right: 8px;
    }

    .dropdown-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 19px;
    }

    .dropdown-item-modern {
        padding: 11px 14px 11px 8px !important;
        gap: 12px;
        margin: 0 6px;
    }
}

/* Pour les très petits écrans (320px) */
@media (max-width: 360px) {
    .profile-dropdown {
        width: calc(100vw - 16px);
        max-width: 304px;
    }

    .user-info-link {
        padding: 10px 12px !important;
        gap: 10px !important;
    }

    .user-avatar-dropdown {
        width: 38px !important;
        height: 38px !important;
    }

    .logout-btn {
        width: 44px !important;
    }

    .user-info strong {
        font-size: 0.95em;
    }

    .dropdown-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 18px !important;
    }

    .dropdown-item-modern {
        padding: 10px 12px 10px 6px !important;
        gap: 10px !important;
        margin: 0 6px !important;
    }

    .dropdown-item-modern span {
        font-size: 13.5px !important;
    }
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0,0,0,0.08);
    border-left: 1px solid rgba(0,0,0,0.08);
    z-index: -1;
}

.profile-dropdown.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    z-index: 2050; /* Z-index plus élevé que le header (2000) pour s'assurer qu'il est visible */
}

.dropdown-section {
    padding: 4px 0;
}

.dropdown-nav-items {
    padding: 4px 0;
}

.dropdown-item {
    display: block;
    padding: 14px 16px;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
}

.dropdown-item:hover {
    background-color: #f7f7f7;
    color: var(--text-color);
}

/* Styles modernes pour les items avec icônes */
.dropdown-item-modern {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 12px 16px 12px 8px !important;
    border-radius: 10px;
    margin: 0 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item-modern:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
}

.dropdown-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 2px rgba(255,255,255,0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item-modern:hover .dropdown-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2), inset 0 1px 2px rgba(255,255,255,0.9);
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    color: #FF6B6B;
}

.dropdown-item-modern span {
    flex: 1;
    font-size: 14.5px;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0 50%, transparent);
    margin: 4px 0;
    opacity: 0.6;
}

/* Mode sombre pour le dropdown */
.dark-mode .profile-dropdown {
    background: #232a2e;
    background: linear-gradient(135deg, #232a2e 0%, #2f2929 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.1);
}

.dark-mode .profile-dropdown::before {
    background: #232a2e;
    border-color: rgba(255,255,255,0.1);
}

.dark-mode .dropdown-item {
    color: #f0f0f0;
}

.dark-mode .dropdown-item:hover {
    background-color: var(--hover-bg);
    color: #ffffff;
}

.dark-mode .dropdown-item-modern:hover {
    background: linear-gradient(135deg, rgba(255,107,107,0.15) 0%, rgba(255,107,107,0.25) 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.dark-mode .dropdown-icon {
    background: linear-gradient(135deg, #3a3a3a 0%, #232a2e 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.05);
}

.dark-mode .dropdown-item-modern:hover .dropdown-icon {
    background: linear-gradient(135deg, #444 0%, #333 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3), inset 0 1px 2px rgba(255,255,255,0.1);
}

.dark-mode .dropdown-divider {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1) 50%, transparent);
}

/* Badges Connexion/Inscription */
.dropdown-auth-badges {
    display: flex !important;
    gap: 8px;
    padding: 12px 12px !important;
}

.auth-badge {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
}

.auth-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #ccc;
}

.auth-badge-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border-color: #ff6b6b;
    color: white;
}

.auth-badge-primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    border-color: #ff5252;
    color: white;
}

/* Mode sombre pour les badges */
.dark-mode .auth-badge {
    background: #3a3a3a;
    border-color: #555;
    color: #f0f0f0;
}

.dark-mode .auth-badge:hover {
    background: #444;
    border-color: #666;
    color: #fff;
}

.dark-mode .auth-badge-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border-color: #ff6b6b;
    color: white;
}

.dark-mode .auth-badge-primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
    border-color: #ff5252;
    color: white;
}

/* Mode sombre - Toggle Switch */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 8px !important;
    border-radius: 10px;
    margin: 0 8px;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode-toggle:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
}

.dark-mode .dark-mode-toggle:hover {
    background: linear-gradient(135deg, rgba(255,107,107,0.15) 0%, rgba(255,107,107,0.25) 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.dark-mode-label {
    font-size: 14.5px;
    color: var(--text-color);
    font-weight: 500;
    flex: 1;
    cursor: pointer;
}

/* Switch container */
.dark-mode-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.dark-mode-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider (background) */
.dark-mode-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    border-radius: 14px;
    transition: background-color 0.3s ease;
}

/* Circle */
.dark-mode-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

/* État actif (mode sombre activé) */
.dark-mode-switch input:checked + .dark-mode-slider {
    background-color: #ff6B6B;
}

.dark-mode-switch input:checked + .dark-mode-slider::before {
    transform: translateX(24px);
}

/* Hover */
.dark-mode-switch:hover .dark-mode-slider {
    background-color: #d0d0d0;
}

.dark-mode-switch input:checked:hover + .dark-mode-slider {
    background-color: #ff5555;
}

/* Mode sombre - Styles inversés */
.dark-mode .dark-mode-label {
    color: #f0f0f0;
}

.dark-mode .dark-mode-slider {
    background-color: #3a3a3a;
}

.dark-mode .dark-mode-slider::before {
    background-color: #e0e0e0;
}

.dark-mode .dark-mode-switch:hover .dark-mode-slider {
    background-color: #4a4a4a;
}

.dark-mode .dark-mode-switch input:checked + .dark-mode-slider {
    background-color: #ff6B6B;
}

.dark-mode .dark-mode-switch input:checked:hover + .dark-mode-slider {
    background-color: #ff5555;
}

/* Overlay pour le dropdown et les filtres */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2045; /* Juste en dessous du dropdown mais au-dessus du reste */
    display: none;
    pointer-events: none;
    background-color: transparent;
}

.dropdown-overlay.active {
    display: block;
    background-color: transparent;
}

.dark-mode .dropdown-overlay.active {
    background-color: transparent;
    opacity: 0;
}

/* ============================================
   MENU DE RECHERCHE AVANCÉE
============================================ */
.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 100%;
    padding: 15px;
    z-index: 2050;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    box-sizing: border-box;
}

.search-dropdown.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-dropdown-header {
    padding: 0 0 15px;
}

/* Barre de recherche mobile - IDENTIQUE à header-search */
.search-input-wrapper {
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,245,245,0.95) 100%);
    border-radius: 50px;
    padding: 0;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    height: 45px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* Effet de brillance subtle - une seule fois au hover (sauf si focus) */
.search-input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: none;
    pointer-events: none;
}

.search-input-wrapper:hover:not(:focus-within)::before {
    animation: sweep 0.8s ease-out forwards;
}

.search-input-wrapper:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12), 0 3px 12px rgba(0,0,0,0.06);
    border-color: rgba(var(--primary-color-rgb), 0.2);
}

.search-input-wrapper:focus-within {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.2), 0 4px 15px rgba(0,0,0,0.08);
}

.search-dropdown .search-input {
    background: transparent;
    border: none;
    padding: 0 20px;
    flex: 1;
    font-size: 0.98rem;
    font-weight: 400;
    outline: none;
    caret-color: var(--primary-color);
    height: 100%;
    width: calc(100% - 60px);
    box-sizing: border-box;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.search-dropdown .search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
    font-weight: 400;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

/* Bouton de recherche mobile - IDENTIQUE à header-search */
.search-dropdown .search-btn {
    border-radius: 50px;
    padding: 0;
    margin: 0px;
    width: 39px;
    height: 39px;
    min-width: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #e55c5c 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

/* Effet de pulse sur le bouton */
.search-dropdown .search-btn::after {
    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 ease, height 0.6s ease;
}

.search-dropdown .search-btn:hover::after {
    width: 100%;
    height: 100%;
}

.search-dropdown .search-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.45);
}

.search-dropdown .search-btn:active {
    transform: scale(0.95);
}

.search-dropdown .search-btn svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.search-filters-section {
    padding: 10px 15px;
}

.search-filters-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 600;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.filter-title-line {
    border: none;
    height: 1px;
    background: transparent;
    box-shadow: 0 1px 0 rgba(255, 107, 107, 0.5);
    margin: 0 0 10px 0;
    width: 100%;
}

.dark-mode .filter-title-line {
    box-shadow: 0 1px 0 rgba(255, 107, 107, 0.5);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.search-dropdown .filter-tag {
    padding: 7px 15px;
    background-color: #f5f5f5;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-dropdown .filter-tag:hover {
    background-color: #ededed;
    transform: translateY(-2px);
}

.search-dropdown .filter-tag.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    font-weight: 600;
}

/* Mode sombre pour le menu de recherche - IDENTIQUE à header-search */
.dark-mode .search-dropdown {
    background-color: var(--dropdown-bg);
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.dark-mode .search-input-wrapper {
    background: linear-gradient(135deg, rgba(58,68,70,0.95) 0%, rgba(48,56,58,0.95) 100%);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
}

.dark-mode .search-input-wrapper:hover {
    border-color: rgba(var(--primary-color-rgb), 0.3);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0,0,0,0.3);
}

.dark-mode .search-input-wrapper:focus-within {
    background: linear-gradient(135deg, #3a4446 0%, #2d3638 100%);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.3), 0 4px 15px rgba(0,0,0,0.4);
}

.dark-mode .search-dropdown .search-input {
    color: white;
}

.dark-mode .search-dropdown .search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.dark-mode .search-input-wrapper:focus-within .search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.dark-mode .search-filters-section h3,
.dark-mode .filter-group h4 {
    color: #f0f0f0;
}

.dark-mode .search-dropdown .filter-tag {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

.dark-mode .search-dropdown .filter-tag:hover {
    background-color: #444;
}

@media (max-width: 480px) {

    .logo {
        font-size: 1.7rem;
    }

    .search-dropdown {
        position: fixed;
        top: 70px;
        left: 5%;
        right: 5%;
        width: 90%;
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* ============================================
   SIDEBAR STYLES
============================================ */
.sidebar {
    box-sizing: border-box;
}

/* ============================================
   STICKY AD CONTAINER
============================================ */
.sticky-ad-container {
    position: sticky;
    position: -webkit-sticky; /* Support Safari */
    top: 100px; /* Distance depuis le haut quand sticky s'active */
    z-index: 100;
    margin-bottom: 2rem;
    transition: top 0.3s ease;
    will-change: transform;
    transform: translateZ(0); /* Accélération matérielle */
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Ajustement pour le header fixe */
.main-header + main .sticky-ad-container {
    top: 100px; /* 80px header + 20px marge */
}

#sticky-ad-placeholder {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Mode sombre pour sticky ad */
.dark-mode #sticky-ad-placeholder {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Désactiver sticky sur mobile */
@media screen and (max-width: 768px) {
    .sticky-ad-container {
        position: static;
    }
}

.sidebar-section {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.dark-mode .sidebar-section {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 600;
    padding: 15px;
    margin: 0;
    background-color: var(--primary-color);
    color: white;
}

.sidebar-card {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dark-mode .sidebar-card {
    background-color: var(--card-bg);
    border-bottom-color: var(--border-color);
}

.sidebar-card:last-child {
    border-bottom: none;
}

.sidebar-card a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.sidebar-recipe-image {
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.sidebar-card-content {
    padding: 15px;
}

.sidebar-card-content h3 {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.sidebar-card-content p {
    margin: 0 0 15px;
    font-size: 0.95rem;
    color: var(--text-color-secondary, #666);
}

.sidebar-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.card-header-colored {
    background-color: var(--primary-color);
    padding: 10px 15px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-header-colored h3 {
    margin: 0;
    font-size: 1rem;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.dark-mode .sidebar-card-content h3,
.dark-mode .sidebar-card-content p {
    color: var(--text-color);
}

/* ============================================
   SECTION TITRES ET STYLES COMMUNS
============================================ */
.section-title {
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

/* Styles pour les liens dans les titres de section */
.section-title-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-title-link:hover {
    color: var(--primary-color);
}

.dark-mode .section-title-link {
    color: var(--text-color);
}

.dark-mode .section-title-link:hover {
    color: var(--primary-color);
}

/* Style pour le conteneur de titre de section */
.section-title-container {
    margin: 0px;
}

/* Premier titre de section avec marge supérieure réduite */
.container > .section-title-container:first-child {
    margin-top: 40px;
}

.section-title-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* Bouton d'action dans le titre */
.section-action-btn {
    margin-left: auto;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.section-line {
    border: none;
    height: 1px;
    background: transparent;
    box-shadow: 0 1px 0 rgba(255, 107, 107, 0.5);
    margin: 0;
    width: 100%;
}

/* Styles spécifiques pour les icônes SVG - conservent leur couleur orange */
.section-icon svg,
.section-icon svg path,
.section-icon svg rect,
.section-icon svg circle,
.section-icon svg line,
.section-icon svg polyline,
.section-icon svg polygon {
    stroke: #ff6b6b !important;
}

/* Alignement des icônes */
.section-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.section-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    min-width: 24px;
    min-height: 24px;
}

.btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    color: white;
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ============================================
   FIL D'ARIANE (BREADCRUMB)
============================================ */
.breadcrumb-container {
    margin: 20px 0 30px 0; /* Espace autour du fil d'ariane */
    font-size: 0.9rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap; /* Permet le retour à la ligne sur petit écran */
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px 10px; /* Espace vertical 5px, horizontal 10px */
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link,
.breadcrumb-current {
    display: inline-flex; /* Pour que le padding s'applique bien */
    align-items: center;
    padding: 6px 16px; /* Augmentation du padding horizontal */
    border-radius: 6px; /* Coins arrondis */
    text-decoration: none;
    transition: background-color 0.3s ease;
    line-height: 1.4; /* Assurer un bon alignement vertical */
    white-space: nowrap; /* Empêcher le texte de passer à la ligne dans un bouton */
    margin-bottom: 5px; /* Espace si retour à la ligne */
}

/* Style des liens normaux */
.breadcrumb-link {
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.06); /* Léger fond gris */
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    background-color: #888; /* Gris moyen au survol */
    color: white; /* Texte blanc au survol */
    transform: none; /* Pas d'effet de soulèvement */
    box-shadow: none; /* Pas d'ombre */
}

.dark-mode .breadcrumb-link {
    background-color: #444;
    color: var(--text-color); /* Assurer la couleur du texte en mode sombre */
}

.dark-mode .breadcrumb-link:hover {
    background-color: #888;
    color: white; /* Maintenir la couleur au survol */
    box-shadow: none;
}

/* Style spécifique pour "Accueil" */
.breadcrumb-home {
    background-color: var(--dark-color); /* Fond sombre */
    color: var(--light-color) !important; /* Force la couleur du texte */
    gap: 6px; /* Espace entre icône et texte */
}

.breadcrumb-home svg {
    fill: var(--light-color); /* Couleur de l'icône */
    width: 18px;  /* Taille fixe */
    height: 18px;
    position: relative;
    bottom: 1px; /* Ajustement vertical fin */
}

/* Style spécifique pour "Catégories" */
.breadcrumb-categories {
    gap: 6px; /* Espace entre icône et texte */
    transition: all 0.3s ease;
}

.breadcrumb-categories svg {
    stroke: var(--text-color); /* Utilise stroke au lieu de fill */
    width: 18px;  /* Taille fixe */
    height: 18px;
    position: relative;
    bottom: 0px; /* Ajustement vertical fin */
    transition: all 0.3s ease;
}

.breadcrumb-link.breadcrumb-categories:hover svg {
    stroke: white; /* Couleur blanche pour l'icône au survol */
}

.dark-mode .breadcrumb-link.breadcrumb-categories {
    background-color: #444; /* Fond plus foncé en mode sombre */
    color: white !important; /* Force la couleur du texte */
}

.dark-mode .breadcrumb-current.breadcrumb-categories {
    background-color: var(--primary-color); /* Correction du bug: utiliser la couleur primaire */
    color: white !important; /* Force la couleur du texte */
}

.dark-mode .breadcrumb-categories svg {
    stroke: white; /* Utilise stroke au lieu de fill en mode sombre */
}

.breadcrumb-home:hover {
    background-color: #555; /* Assombrir légèrement au survol */
    color: white !important; /* Force la couleur du texte */
}

.dark-mode .breadcrumb-home {
    background-color: #444; /* Fond carte en mode sombre */
    color: var(--text-color) !important; /* Force la couleur du texte */
}

.dark-mode .breadcrumb-home svg {
    fill: var(--text-color);
}

.dark-mode .breadcrumb-home:hover {
    background-color: #888;
    color: white !important; /* Force la couleur du texte */
}

/* Style spécifique pour l'élément actuel (dernier) */
.breadcrumb-current {
    background-color: var(--primary-color); /* Fond rouge/orange */
    color: white !important; /* Force la couleur du texte */
    font-weight: 500;
}

/* ============================================
   COULEURS FIL D'ARIANE PAR CATÉGORIE
   (Mêmes dégradés que category-header dans toutes-les-categories.php)
============================================ */

/* Bleu - Boissons & Cocktails */
body[data-category-slug="boissons-et-cocktails"] .breadcrumb-current {
    background: linear-gradient(to right, #4AA0D1, #248ABD);
}

/* Orange/Pêche - Apéritifs */
body[data-category-slug="aperitifs"] .breadcrumb-current {
    background: linear-gradient(to right, #F78C50, #FABA50);
}

/* Rouge Corail - Entrées */
body[data-category-slug="entrees"] .breadcrumb-current {
    background: linear-gradient(to right, #F05B5B, #E87A7A);
}

/* Vert Olive - Salades */
body[data-category-slug="salades"] .breadcrumb-current {
    background: linear-gradient(to right, #8DBF58, #6A9E3E);
}

/* Turquoise - Plats principaux */
body[data-category-slug="plats-principaux"] .breadcrumb-current {
    background: linear-gradient(to right, #41B3A9, #1F9088);
}

/* Vert - Accompagnements */
body[data-category-slug="accompagnements"] .breadcrumb-current {
    background: linear-gradient(to right, #6AAE7B, #4B935B);
}

/* Jaune/Or - Fast-Food */
body[data-category-slug="fast-food"] .breadcrumb-current {
    background: linear-gradient(to right, #F7C833, #EAA80F);
}

/* Orange Brûlé - Petits-Déjeuners */
body[data-category-slug="petits-dejeuners-et-brunchs"] .breadcrumb-current {
    background: linear-gradient(to right, #E88D5A, #D96C3F);
}

/* Violet/Magenta - Desserts */
body[data-category-slug="desserts"] .breadcrumb-current {
    background: linear-gradient(to right, #B35FBC, #C879C8);
}

/* Brun / Terre Cuite - Pâtisseries */
body[data-category-slug="patisseries"] .breadcrumb-current {
    background: linear-gradient(to right, #C97B61, #A65C44);
}

/* Rouge Brique - Sauces */
body[data-category-slug="sauces"] .breadcrumb-current {
    background: linear-gradient(to right, #D9534F, #C9302C);
}

/* Gris - Bases */
body[data-category-slug="bases"] .breadcrumb-current {
    background: linear-gradient(to right, #84939E, #6B7A85);
}

.dark-mode .breadcrumb-current {
    color: white !important; /* Assurer la couleur en mode sombre */
}

/* Style spécifique pour "Catégories" actuel (dernier élément, pas de lien) */
.breadcrumb-current.breadcrumb-categories {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-current.breadcrumb-categories svg {
    stroke: white; /* Couleur blanche pour l'icône */
    width: 18px;
    height: 18px;
    position: relative;
    bottom: 1px;
}

.dark-mode .breadcrumb-current.breadcrumb-categories svg {
    stroke: white; /* Assurer que l'icône reste blanche en mode sombre */
}

/* Ajustements pour le mode sombre si nécessaire pour les séparateurs */
.dark-mode .breadcrumb-item:not(:first-child)::before {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
.breadcrumb-container{
    margin: 20px 0 30px 0;
}
}

@media (max-width: 768px) {
    .breadcrumb-container {
        font-size: 0.85rem; /* Police légèrement plus petite */
        margin: 15px 0;
    }
    .breadcrumb-link,
    .breadcrumb-current {
        padding: 5px 14px; /* Padding horizontal ajusté pour tablettes */
    }
    .breadcrumb {
        gap: 5px 8px; /* Espacement horizontal légèrement réduit */
    }
}

@media (max-width: 480px) {
    .breadcrumb-container {
        font-size: 0.8rem; /* Encore plus petit */
        margin: 15px 0 15px 0;
    }
    .breadcrumb-link,
    .breadcrumb-current {
        padding: 4px 12px; /* Padding horizontal ajusté pour mobiles */
    }
    .breadcrumb {
        gap: 5px 6px; /* Espacement horizontal encore plus réduit */
    }
}

/* ============================================
   FOOTER
============================================ */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.dark-mode footer {
    background-color: var(--footer-bg);
}

.dark-mode .footer-bottom {
    border-top-color: var(--border-color);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.footer-logo img {
    width: 65px;
    margin: 0 7px 0 0;
    position: relative;
    bottom: 10px;
}

.footer-logo span.infinity {
    font-size: 1.8rem;
    margin-right: 5px;
    color: var(--primary-color);
}

.footer-about {
    grid-column: 1;
    margin-bottom: 20px;
    margin-right: 20px;
}

.footer-about p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #ccc;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-nav {
    grid-column: 2;
}

.footer-categories {
    grid-column: 3;
}

.footer-social {
    grid-column: 4;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #ccc;
}

.footer-social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 5px;
    margin-top: 10px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    color: #ccc;
    font-size: 0.95rem;
    transition: var(--transition);
    gap: 10px;
    position: relative;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icon svg {
    width: 28px;
    height: 28px;
}

.footer-social-link:hover {
    color: white;
}

.footer-social-link:hover .social-icon {
    box-shadow: 0 0 15px var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
}

.footer-bottom a {
    color: #ccc;
    margin: 0 5px;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
}

.footer-links-separator {
    color: #555;
    margin: 0 5px;
}

.footer-bottom a:hover {
    color: #FF6B6B;
    text-decoration: none;
}

.footer-bottom .btn-cookies-footer {
    color: #ccc;
    text-decoration: none;
}

.footer-bottom .btn-cookies-footer:hover {
    color: #FF6B6B;
    text-decoration: none;
}

.dark-mode .newsletter-input {
    background-color: #3a4446;
    color: #f0f0f0;
    border: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-link img {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* État vide pour les favoris */
.empty-state {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    background-color: rgba(255, 107, 107, 0.08);
    border-radius: 8px;
    font-size: 1rem;
    color: #777;
    width: 100%;
}

.dark-mode .empty-state {
    background-color: rgba(255, 107, 107, 0.15);
    color: #aaa;
}

/* Styles pour les cartes de catégories générales */
.category-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.dark-mode .category-card {
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.category-image {
    overflow: hidden;
    z-index: 10; /* Garantir que les images de catégories restent sous le header */
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.category-content {
    padding: 15px 5px;
    text-align: center;
}

.category-content h3 {
    margin-bottom: 5px;
}

/* Style pour la carte "Toutes les catégories" */
.category-card-all {
    position: relative;
    transition: all 0.3s ease;
}

.category-all-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
}

.category-all-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.category-all-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    transition: all 0.3s ease;
}

.category-card-all:hover .category-all-icon {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

.dark-mode .category-all-image {
    background: linear-gradient(135deg, #e55c5c, #ff6b6b);
}

.dark-mode .category-all-icon {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   USER AVATAR IN DROPDOWN
============================================ */
.user-info-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
}

/* Container pour avatar avec fallback icône FA */
.user-avatar-container {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icône FA fallback pour avatar dropdown */
.user-avatar-fallback {
    font-size: 44px;
    color: #666;
    line-height: 1;
}

.dark-mode .user-avatar-fallback {
    color: #999;
}

/* Avatar dans le dropdown (div avec background-image) */
.user-avatar-dropdown {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: none; /* Caché par défaut, affiché par CSS critique si photo existe */
}

.user-info-link:hover .user-avatar-dropdown {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2), 0 0 0 1px rgba(255, 107, 107, 0.2);
}

.dark-mode .user-avatar-dropdown {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Container pour le profil utilisateur et le bouton déconnexion */
.user-info-item {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    pointer-events: none;
}

/* Lien vers le profil */
.user-info-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
    padding: 14px 16px !important;
    text-decoration: none !important;
    color: inherit !important;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pas d'effet hover sur Ma cuisine */

.user-info-link .user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.user-info-link .user-info strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.dark-mode .user-info-link .user-info strong {
    color: #f0f0f0;
}

/* Bouton de déconnexion dans le menu dropdown */
.logout-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    background-color: transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
    color: #999 !important;
    text-decoration: none !important;
    border-left: 1px solid rgba(0,0,0,0.08);
    pointer-events: auto;
    position: relative;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%) !important;
    color: #ff4444 !important;
}

.logout-btn:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 60%;
    background: linear-gradient(180deg, transparent, #ff6b6b, transparent);
}

.dark-mode .logout-btn {
    color: #999 !important;
    border-left-color: rgba(255,255,255,0.1);
}

.dark-mode .logout-btn:hover {
    background: linear-gradient(135deg, rgba(255,107,107,0.15) 0%, rgba(255,107,107,0.25) 100%) !important;
    color: #ff6666 !important;
}

.logout-btn svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
}

/* ============================================
   USER PHOTO IN MENU HAMBURGER
============================================ */

/* Photo de profil dans le menu hamburger */
/* Photo de profil dans le menu hamburger (div avec background-image) */
.menu-user-photo {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: content-box;
    display: none; /* Caché par défaut, affiché par CSS critique si photo existe */
}

.dark-mode .menu-user-photo {
    border-color: #666;
}

/* Icône FA fallback pour le menu hamburger (utilisateur connecté sans photo) */
.profile-icon > i.fa-circle-user {
    font-size: 24px;
    line-height: 1;
}

.profile-icon {
    position: relative;
    overflow: visible;
}

/* ============================================
   HARMONISATION DES TITRES H1
   Styles unifiés entre categories.php et recette.php
============================================ */

/* Styles de base pour tous les H1 principaux */
.main-content h1,
.main-content h1.main-title,
.recette-header h1,
.recette-header h1.main-title,
.categories-recettes-page .main-content h1,
.recette-page .recette-header h1 {
    /* Typographie */
    font-size: 1.7rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    
    /* Couleurs */
    color: var(--text-color) !important;
    
    /* Espacement */
    margin-top: 0 !important;
    margin-bottom: 30px !important;
    padding-bottom: 10px !important;
    
    /* Positionnement pour la ligne décorative */
    position: relative !important;
    display: inline-block !important;
    
    /* Réinitialisation */
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Ligne décorative sous le H1 - Style unifié */
.main-content h1::after,
.main-content h1.main-title::after,
.recette-header h1::after,
.recette-header h1.main-title::after,
.categories-recettes-page .main-content h1::after,
.recette-page .recette-header h1::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    bottom: -2px !important;
    width: 100px !important;
    height: 3px !important;
    background-color: var(--primary-color) !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Mode sombre pour H1 */
.dark-mode .main-content h1,
.dark-mode .main-content h1.main-title,
.dark-mode .recette-header h1,
.dark-mode .recette-header h1.main-title,
.dark-mode .categories-recettes-page .main-content h1,
.dark-mode .recette-page .recette-header h1 {
    color: white !important;
}

.dark-mode .main-content h1::after,
.dark-mode .main-content h1.main-title::after,
.dark-mode .recette-header h1::after,
.dark-mode .recette-header h1.main-title::after,
.dark-mode .categories-recettes-page .main-content h1::after,
.dark-mode .recette-page .recette-header h1::after {
    background-color: var(--primary-color) !important;
}

/* Responsive H1 - Tablettes et grands écrans */
@media screen and (max-width: 1200px) {
    .main-content h1,
    .main-content h1.main-title,
    .recette-header h1,
    .recette-header h1.main-title,
    .categories-recettes-page .main-content h1,
    .recette-page .recette-header h1 {
        font-size: 1.6rem !important;
    }
}

@media screen and (max-width: 1024px) {
    .main-content h1,
    .main-content h1.main-title,
    .recette-header h1,
    .recette-header h1.main-title,
    .categories-recettes-page .main-content h1,
    .recette-page .recette-header h1 {
        font-size: 1.5rem !important;
        margin-bottom: 25px !important;
    }
}

/* Responsive H1 - Tablettes */
@media screen and (max-width: 768px) {
    .main-content h1,
    .main-content h1.main-title,
    .recette-header h1,
    .recette-header h1.main-title,
    .categories-recettes-page .main-content h1,
    .recette-page .recette-header h1 {
        font-size: 1.5rem !important;
        margin-bottom: 25px !important;
        padding-bottom: 8px !important;
    }
    
    .main-content h1::after,
    .main-content h1.main-title::after,
    .recette-header h1::after,
    .recette-header h1.main-title::after {
        width: 80px !important;
        height: 3px !important;
    }
}

/* Responsive H1 - Smartphones moyens */
@media screen and (min-width: 321px) and (max-width: 480px) {
    .main-content h1,
    .main-content h1.main-title,
    .recette-header h1,
    .recette-header h1.main-title,
    .categories-recettes-page .main-content h1,
    .recette-page .recette-header h1 {
        font-size: 1.4rem !important;
        line-height: 1.75rem !important;
        margin-bottom: 20px !important;
        padding-bottom: 10px !important;
    }
    
    .main-content h1::after,
    .main-content h1.main-title::after,
    .recette-header h1::after,
    .recette-header h1.main-title::after {
        width: 70px !important;
        height: 2.5px !important;
    }
}

/* Responsive H1 - Petits smartphones */
@media screen and (max-width: 320px) {
    .main-content h1,
    .main-content h1.main-title,
    .recette-header h1,
    .recette-header h1.main-title,
    .categories-recettes-page .main-content h1,
    .recette-page .recette-header h1 {
        font-size: 1.25rem !important;
        line-height: 1.65rem !important;
        margin-bottom: 20px !important;
        padding-bottom: 8px !important;
    }
    
    .main-content h1::after,
    .main-content h1.main-title::after,
    .recette-header h1::after,
    .recette-header h1.main-title::after {
        width: 60px !important;
        height: 2px !important;
    }
}

/* ============================================
   HARMONISATION DES TITRES H2
   Uniformisation entre index, categories et recette
============================================ */

/* Page d'accueil - Structure des conteneurs */
.section-title-container {
    margin-bottom: 0px;
    position: relative;
}



.section-title-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 0px;
    position: relative;
}

/* Masquer les hr.section-line - on utilisera ::after à la place */
.section-line {
    display: none !important;
}

/* Style unifié pour TOUS les titres H2 */
.section-title,
.modal-title,
.sidebar-title-styled,
.recette-ingredients-section h2,
.recette-ustensiles-section h2,
.recette-preparation-section h2,
.recette-nutrition-section h2,
.recette-conseils-section h2,
.recette-suggestions-section h2,
.similar-recipes-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color, #333);
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    position: relative;
}

/* Dark mode pour tous les H2 */
.dark-mode .section-title,
.dark-mode .modal-title,
.dark-mode .sidebar-title-styled,
.dark-mode .recette-ingredients-section h2,
.dark-mode .recette-ustensiles-section h2,
.dark-mode .recette-preparation-section h2,
.dark-mode .recette-nutrition-section h2,
.dark-mode .recette-conseils-section h2,
.dark-mode .recette-suggestions-section h2,
.dark-mode .similar-recipes-section h2 {
    color: white !important;
}

/* Ligne de soulignement avec ::after - DÉSACTIVÉ */
/* .section-title::after,
.modal-title::after,
.sidebar-title-styled::after,
.recette-ingredients-section h2::after,
.recette-ustensiles-section h2::after,
.recette-preparation-section h2::after,
.recette-nutrition-section h2::after,
.recette-conseils-section h2::after,
.recette-suggestions-section h2::after,
.similar-recipes-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--primary-color, #FF6B6B);
} */

/* Pour la sidebar, ligne plus courte - DÉSACTIVÉ */
/* .sidebar-title-styled::after {
    width: 40px;
    height: 2px;
} */

/* Ajustements spécifiques - Sidebar */
.sidebar-title-styled {
    font-size: 1.2rem !important;
    margin: 0 0 15px 0 !important;
    padding-bottom: 10px !important;
}

/* Ajustements spécifiques - Modal */
.modal-title {
    margin-bottom: 20px !important;
}

/* Ajustements spécifiques - Sections de recettes */
.recette-ingredients-section h2,
.recette-ustensiles-section h2,
.recette-preparation-section h2,
.recette-nutrition-section h2,
.recette-conseils-section h2,
.recette-suggestions-section h2,
.similar-recipes-section h2 {
    font-size: 1.4rem !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
}

/* Responsive H2 - Mobile */
@media (max-width: 768px) {
    .section-title,
    .modal-title,
    .recette-ingredients-section h2,
    .recette-ustensiles-section h2,
    .recette-preparation-section h2,
    .recette-nutrition-section h2,
    .recette-conseils-section h2,
    .recette-suggestions-section h2,
    .similar-recipes-section h2 {
        font-size: 1.5rem;
    }
    
    .sidebar-title-styled {
        font-size: 1.2rem !important;
    }
    
    .section-title-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-action-btn {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {


    .section-title,
    .modal-title,
    .recette-ingredients-section h2,
    .recette-ustensiles-section h2,
    .recette-preparation-section h2,
    .recette-nutrition-section h2,
    .recette-conseils-section h2,
    .recette-suggestions-section h2,
    .similar-recipes-section h2 {
        font-size: 1.3rem;
    }
    
    .sidebar-title-styled {
        font-size: 1.1rem !important;
    }
    
    .section-title-container {
        margin-top: 40px;
        margin-bottom: 0px;
    }
}

/* ============================================
   BADGE DE CONNEXION (Anti-cache)
   Indicateur visuel persistant de l'état de connexion
============================================ */

/* Badge de connexion - Point vert en bas à droite de l'icône */
.connection-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #4ade80; /* Vert success */
    border: 2px solid white;
    border-radius: 50%;
    z-index: 10;
    pointer-events: none; /* Ne pas interférer avec les clics */
}

/* Animation pulse pour attirer l'attention */
@keyframes connection-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.connection-badge {
    animation: connection-pulse 2s ease-in-out infinite;
}

/* Mode sombre - Badge avec bordure foncée */
.dark-mode .connection-badge {
    border-color: #1a1a1a;
    background-color: #4ade80; /* Garder le vert vif en mode sombre */
}

/* Assurer que le profile-icon est positionné relativement */
.profile-icon {
    position: relative;
    overflow: visible !important; /* Permettre au badge de déborder */
}

/* Badge pour les deux états du menu (normal et actif) */
.menu-normal-state .profile-icon,
.menu-active-state .profile-icon {
    position: relative;
    overflow: visible !important;
}

/* ============================================
   AUTHENTIFICATION INSTANTANÉE (Anti-FOUC)
   Ces règles s'appliquent via les attributs data-*
   définis par le script inline dans le <head>
============================================ */

/* Affichage état connecté/déconnecté */
html[data-auth-state="logged-in"] .menu-state-logged-out {
    display: none !important;
}

html[data-auth-state="logged-in"] .menu-state-logged-in {
    display: block !important;
}

html[data-auth-state="logged-in"] .dropdown-logged-out {
    display: none !important;
}

html[data-auth-state="logged-in"] .dropdown-logged-in {
    display: block !important;
}

/* Photo de profil via CSS variable */
html[data-has-photo="true"] [data-user-photo-container] [data-user-photo-fallback] {
    display: none !important;
}

html[data-has-photo="true"] [data-user-photo-container] [data-user-photo] {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    background-image: var(--user-photo-url) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

html[data-has-photo="true"] [data-user-avatar-container] [data-user-avatar-fallback] {
    display: none !important;
}

html[data-has-photo="true"] [data-user-avatar-container] [data-user-avatar] {
    display: block !important;
    background-image: var(--user-photo-url) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ============================================
   GESTION DES INTERACTIONS TACTILES
   Désactive les effets hover sur appareils tactiles
   ============================================ */

/* 
 * Les effets hover ne doivent s'appliquer que sur les appareils 
 * équipés d'une souris (hover: hover) avec pointeur précis (pointer: fine).
 * Cela exclut les smartphones et tablettes tactiles.
 */

/* Reset global des hover pour appareils tactiles */
@media (hover: none), (pointer: coarse) {
    /* Désactiver les transformations hover */
    a:hover,
    button:hover,
    .btn:hover,
    .card:hover,
    .recipe-card:hover,
    .theme-card:hover,
    .ingredient-card:hover,
    .ustensile-card:hover,
    .article-card:hover,
    .stat-card:hover,
    .collection-card:hover,
    [class*="-card"]:hover,
    [class*="-item"]:hover {
        transform: none !important;
        box-shadow: inherit !important;
    }
    
    /* Conserver les couleurs de base au hover sur tactile */
    a:hover {
        color: inherit;
    }
    
    /* Boutons : garder l'apparence normale */
    .btn:hover,
    button:hover {
        filter: none !important;
    }
}

/* Effets hover actifs uniquement sur desktop avec souris */
@media (hover: hover) and (pointer: fine) {
    /* Les styles hover existants s'appliquent normalement */
    /* Cette media query permet de cibler spécifiquement les appareils avec souris */
}