/* ================================================== */
/* HEADER LIFECRAFTER - STYLES OPTIMISÉS            */
/* Compatible avec lifecrafter-auth.js v6.1.1        */
/* ================================================== */

/* ================================================== */
/* MASQUER ÉLÉMENTS GHOST SUBSCRIPTION              */
/* ================================================== */
/* TEMPORAIREMENT COMMENTÉ POUR TESTER L'AUTH
[data-portal="signup"],
[data-portal="subscribe"],
.gh-portal,
.gh-portal-triggerbtn,
.gh-btn[data-portal],
button[data-portal],
a[href*="#/portal"],
.subscribe-form,
.members-subscribe,
.portal-popup,
#ghost-portal-root,
.gh-portal-popup {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
*/

/* ================================= */
/* VARIABLES CSS PERSONNALISÉES     */
/* ================================= */
:root {
  --header-height: 72px; /* Hauteur de l'en-tête */
  --nav-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Transition par défaut pour la navigation */
  --dropdown-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --dropdown-shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  
  /* OVERRIDE ABSOLU - Variables Tailwind */
  --color-rose-500: var(--color-brand, #FD3D00) !important;
  --color-rose-400: var(--color-brand, #FD3D00) !important;
  --color-rose-600: var(--color-brand, #FD3D00) !important;
}

/* ================================= */
/* FORCE NAVIGATION HOVER - PRIORITÉ MAXIMALE */
/* ================================= */
/* Tous les éléments de navigation - Spécificité maximale */
html body header nav .nav-main a.nav-link:hover,
html body header .nav-main a:hover,
html body .nav-main a:hover,
.nav-main a:hover,
a.nav-link:hover,
a[class*="nav-link"]:hover {
  background-color: var(--sage-100, #f4f2ee) !important;
  color: var(--sage-600, #566c40) !important;
  border-radius: var(--radius, 20px) !important;
}

/* Fix bordure rose de .nav-main */
.nav-main:hover {
  border-color: var(--sage-200, #ede8e0) !important;
}

/* Fix bouton profil avec prénom */
.nav-profile-button:hover,
.nav-profile-button.hover\:bg-bgr-tone:hover,
button.nav-profile-button:hover {
  background-color: var(--sage-100, #f4f2ee) !important;
  color: var(--sage-600, #566c40) !important;
}

/* Fix spécifique pour le span profile-name */
.nav-profile-button:hover .profile-name,
.nav-profile-button:hover span.profile-name,
button.nav-profile-button:hover .profile-name,
.profile-name:hover {
  color: var(--sage-600, #566c40) !important;
}

/* Fix dropdown arrow rose */
.nav-profile-button:hover .dropdown-arrow,
.nav-profile-button:hover span.dropdown-arrow,
button.nav-profile-button:hover .dropdown-arrow,
.dropdown-arrow:hover {
  color: var(--sage-600, #566c40) !important;
}

/* ================================= */
/* HEADER PRINCIPAL                  */
/* ================================= */
.header-main {
  position: relative;
  transition: var(--nav-transition);
}

.header-main.sticky {
  backdrop-filter: blur(10px); /* Effet de flou sur l'arrière-plan */
  -webkit-backdrop-filter: blur(10px); /* Compatibilité Webkit */
  background: rgba(var(--bgr-rgb, 255, 255, 255), 0.95); /* Couleur de fond avec opacité */
}

/* ================================= */
/* BRAND ET LOGO                     */
/* ================================= */
.header-brand .brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: var(--nav-transition);
}

.header-brand .brand-link:hover {
  transform: translateY(-1px); /* Léger déplacement vers le haut au survol */
}

/* ================================= */
/* NAVIGATION PRINCIPALE             */
/* ================================= */
.nav-main {
  transition: var(--nav-transition);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.nav-main:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Ombre au survol */
}

/* ================================= */
/* CORRECTION HOVER NAVIGATION       */
/* ================================= */

/* Override du hover rose par défaut pour utiliser notre couleur de marque */
.nav-link:hover,
.nav-main .nav-link:hover {
  background-color: var(--color-background-tone) !important;
  color: var(--color-brand) !important;
  border-color: transparent !important;
}

/* Hover pour les boutons d'action dans la navigation */
.action-button:hover,
.mobile-menu-toggle:hover {
  background-color: var(--color-background-tone) !important;
  color: var(--color-brand) !important;
}

/* Hover pour les éléments de profil */
.nav-profile-button:hover {
  background-color: var(--color-background-tone) !important;
  color: var(--color-brand) !important;
}

/* Hover pour les éléments du dropdown profil */
.dropdown-item:hover {
  background-color: var(--color-background-tone) !important;
  color: var(--color-typography) !important;
}

/* Style spécial pour le lien de déconnexion */
.dropdown-item:hover.logout-button-premium,
.dropdown-item:hover[id*="logout"] {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
}

/* Navigation mobile - hover states */
.nav-link-premium:hover,
.profile-action-premium:hover {
  background-color: var(--color-background-tone) !important;
  color: var(--color-brand) !important;
  transform: translateX(2px);
}

/* ================================= */
/* CORRECTION TAILWIND HOVERS       */
/* ================================= */

/* DÉFINITION DES CLASSES MANQUANTES DU THÈME */
/* Ces classes sont utilisées dans le HTML mais n'existent pas dans Tailwind */

.hover\:bg-bgr-tone:hover {
  background-color: var(--sage-100, #f4f2ee) !important;
}

.hover\:text-brand:hover {
  color: var(--sage-600, #566c40) !important;
}

.hover\:rounded-theme:hover {
  border-radius: var(--radius, 20px) !important;
}

/* SÉLECTEURS EXACTS BASÉS SUR L'ANALYSE HTML RÉELLE */
/* Cible précisément les liens de navigation avec les classes exactes */
a.nav-link.hover\:bg-bgr-tone.hover\:text-brand.hover\:rounded-theme:hover {
  background-color: var(--sage-100, #f4f2ee) !important;
  color: var(--sage-600, #566c40) !important;
  border-radius: var(--radius, 20px) !important;
}

/* Spécifique pour la navigation - sélecteurs très précis */
header[data-header] nav[data-nav="desktop"] ul li a:hover,
header[data-header] .nav-main .nav-link:hover,
.header-main .nav-main a.nav-link:hover {
  background-color: var(--color-background-tone) !important;
  color: var(--color-brand) !important;
  border-radius: 0.375rem !important;
}

/* Reset spécifique et ciblé pour la navigation seulement */
.nav-main a.nav-link:hover,
.nav-main button.nav-profile-button:hover,
.nav-main .nav-auth a:hover,
.nav-main .nav-auth button:hover:not([id*="logout"]) {
  background-color: var(--color-background-tone) !important;
  color: var(--color-brand) !important;
  border-color: transparent !important;
  border-radius: 0.375rem !important;
}

/* --- GESTION DU FLICKERING ET DE L'AFFICHAGE JS (AJOUTS CLÉS) --- */

/* Conteneur des éléments de navigation Auth (Connexion / Profil)
   Initialement masqué par défaut pour éviter le flickering.
   JavaScript (.lifecrafter-auth.js) le révélera une fois l'état d'authentification connu. */
.nav-auth-hide-until-ready {
    display: flex !important; /* Assure l'affichage même si masqué initialement */
    opacity: 0;    /* Pour une transition d'opacité douce */
    visibility: hidden; /* Meilleure gestion de la visibilité */
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

/* Classe ajoutée par JavaScript pour révéler le conteneur principal de navigation auth */
.nav-auth-hide-until-ready.is-ready {
    opacity: 1;
    visibility: visible;
}

/* --- FIN GESTION DU FLICKERING ET DE L'AFFICHAGE JS --- */


/* États de chargement de la navigation principale (gérés par .lifecrafter-auth.js) */
.nav-auth-loading {
  opacity: 0.8;
  /* Si vous voulez masquer complètement la navigation pendant le chargement,
     vous pouvez ajouter ici : pointer-events: none; */
}

.nav-auth-ready {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Éléments de navigation individuels */
.nav-item {
  position: relative;
}

.nav-main ul .nav-item.nav-current .nav-link {
  background-color: var(--color-background-tone);
  color: var(--color-typography);
  border-radius: var(--radius);
}

[data-nav=desktop] li.nav-current:not(:has(a[href="#"])){
    background-color: transparent !important;
    border-color: transparent !important;
}

.nav-current-auth .nav-link{
  position: relative;
  font-weight: 500;
  transition: var(--nav-transition);
  background: var(--brand);
  color: var(--brand-contrast);
  border-radius: var(--radius);
}

.nav-main .nav-link:hover {
  text-decoration: none;
  border-radius: var(--nav-border-radius);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand); /* Utilisez la variable de votre thème */
  transition: var(--nav-transition);
  transform: translateX(-50%);
}

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

/* ================================= */
/* NAVIGATION AUTH - ÉTAT INVITÉ     */
/* ================================= */
.nav-auth-guest .nav-link {
  font-weight: 600;
  color: var(--brand);
  border: 1px solid var(--brand);
  background: transparent;
}

.nav-auth-guest .nav-link:hover {
  background: var(--brand);
  color: var(--brand-contrast);
}

/* ================================= */
/* BOUTON PROFIL UTILISATEUR         */
/* ================================= */
.nav-profile-button {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--nav-transition);
}

.nav-profile-button:focus {
  box-shadow: 0 0 0 2px rgba(var(--brand-rgb, 59, 130, 246), 0.2);
}

.nav-profile-button[aria-expanded="true"] {
  background: var(--bgr-tone);
  color: var(--brand);
}

.nav-profile-button[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

/* Icône profil avec badge */
.profile-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--bgr);
  animation: pulse-premium 2s infinite;
}

@keyframes pulse-premium {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Nom utilisateur responsive */
.profile-name {
  transition: var(--nav-transition);
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ================================= */
/* MENU DÉROULANT PROFIL             */
/* ================================= */
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #ffffff;;
  border: 1px solid #e5e7eb;;
  border-radius: 12px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  min-width: 18rem;
  
  /* États d'animation et de visibilité par défaut */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: var(--nav-transition);
  pointer-events: none; /* Empêche les interactions quand masqué */
}

/* Cette règle est activée par JavaScript en retirant la classe 'hidden' */
.profile-dropdown.show, /* Votre JS ne l'ajoute pas, mais c'est une bonne pratique */
.profile-dropdown:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto; /* Permet les interactions quand visible */
}

/* En-tête du dropdown */
.dropdown-header {
  position: relative;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1rem;
  border-radius: 12px 12px 0 0;
}

.dropdown-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--brd) 50%, transparent 100%);
}

/* Informations utilisateur */
.dropdown-name {
  font-weight: 700;
  color: #1e293b; /* Gris foncé pour meilleur contraste */
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.dropdown-email {
  color: #64748b; /* Gris moyen */
  font-size: 0.875rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

/* Badges de statut améliorés */
.dropdown-status {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  
  /* Statut Gratuit */
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.dropdown-status.premium,
.dropdown-status[class*="premium"] {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #ffffff;
  border: 1px solid #d97706;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}
.dropdown-status:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ================================= */
/* SECTIONS DU MENU                  */
/* ================================= */
.dropdown-section + .dropdown-section {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}
.dropdown-item.logout:hover,
.dropdown-item[href*="logout"]:hover,
.dropdown-item:last-child:hover {
  background: #fef2f2;
  color: #dc2626;
  border-left-color: #dc2626;
}
.dropdown-item.logout:hover .material-symbols-outlined,
.dropdown-item[href*="logout"]:hover .material-symbols-outlined,
.dropdown-item:last-child:hover .material-symbols-outlined {
  color: #dc2626;
}
/* Items du menu */
.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-align: left;
  font-family: inherit;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: #1e293b;
  border-left: 3px solid var(--brand, #3b82f6);
  padding-left: 0.875rem;
  transform: none;
}

.dropdown-item:focus {
  outline: none;
  background: #eff6ff;
  color: #1d4ed8;
  border-left: 3px solid var(--brand, #3b82f6);
  padding-left: 0.875rem;
}

/* Items spéciaux */
.dropdown-item.group:hover .material-symbols-outlined {
  transform: scale(1.1);
}

/* Déconnexion avec état hover rouge */
.dropdown-item:hover.group {
  background: rgba(239, 68, 68, 0.05);
  color: rgb(239, 68, 68);
}
.dropdown-item .material-symbols-outlined {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  color: #6b7280; /* Gris moyen pour les icônes */
  transition: color 0.15s ease;
}
.dropdown-item:hover .material-symbols-outlined {
  color: var(--brand, #3b82f6);
}
/* ================================= */
/* ZONE ACTIONS                      */
/* ================================= */

/* Badge utilisateur dans le header */
.header-user-badge {
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.header-user-badge.is-ready {
  opacity: 1;
  visibility: visible;
}

.header-user-badge .user-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.header-user-badge .user-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-user-badge .user-badge .material-symbols-outlined {
  font-size: 14px;
}

.action-button {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--nav-transition);
}

.action-button:hover {
  transform: scale(1.05);
}

.action-button:focus {
  box-shadow: 0 0 0 2px rgba(var(--brand-rgb, 59, 130, 246), 0.2);
}

/* CTA Button */
.cta-button {
  position: relative;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  transition: var(--nav-transition);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}


/* ================================= */
/* MENU MOBILE                       */
/* ================================= */
.mobile-menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--nav-transition);
}

.hamburger-line {
  transition: var(--nav-transition);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* ================================= */
/* RESPONSIVE DESIGN                 */
/* ================================= */

/* DESKTOP: Cacher le burger menu à partir de 768px (md breakpoint) */
@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  
  #mobile-menu {
    display: none !important;
  }
}

/* ===== SOLUTION CERTIFIÉE POUR ALIGNEMENT HEADER-ACTIONS ===== */

/* 1. Styles de base avec spécificité élevée */
.header-main .header-actions,
div[class*="header-actions"],
[data-header-actions] {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex-shrink: 0 !important;
  margin-left: auto !important; /* FORCE à droite */
  opacity: 1 !important;
  visibility: visible !important;
}

/* 2. Override TOTAL des styles de scroll (spécificité maximale) */
.header-main[data-header].is-scrolled [data-header-actions],
.header-main[data-header].is-scrolled-onload [data-header-actions],
[data-header].is-scrolled .header-actions,
[data-header].is-scrolled-onload .header-actions,
[data-header].is-scrolled [data-header-actions],
[data-header].is-scrolled-onload [data-header-actions] {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  margin-left: auto !important;
  position: static !important;
}

/* 3. Correction du layout parent pour garantir le fonctionnement */
.header-main .max-w-container {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

/* Layout parfait sur desktop avec espacement optimal */
@media (min-width: 768px) {
  .header-main .max-w-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2rem; /* Espacement général */
  }
  
  /* Logo : reste à gauche */
  .header-brand {
    flex-shrink: 0;
    margin-right: 2rem; /* Espace après le logo */
  }
  
  /* Navigation : centre flexible */
  .nav-main {
    flex: 1;
    display: flex !important;
    justify-content: center;
    margin: 0 2rem; /* Espace autour de la nav */
  }
  
  /* Actions : à droite */
  .header-actions {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto; /* Force à droite */
  }
}
@media (max-width: 640px) {
  .profile-dropdown {
    min-width: calc(100vw - 2rem);
    max-width: 20rem;
    margin-top: 0.25rem;
  }
  
  .dropdown-header {
    padding: 1rem;
  }
  
  .dropdown-item {
    padding: 1rem;
    font-size: 1rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  .profile-name {
    display: none;
  }
    .dropdown-item .material-symbols-outlined {
    font-size: 1.5rem;
    margin-right: 1rem;
  }
}

@media (max-width: 480px) {
  .profile-dropdown {
    min-width: calc(100vw - 2rem);
    max-width: 320px;
  }
  
  .nav-main {
    padding: 0.125rem;
  }
}

/* ================================= */
/* ANIMATIONS D'ENTRÉE              */
/* ================================= */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Anime le dropdown lorsqu'il passe de masqué à visible par JS (retrait de 'hidden') */
.profile-dropdown:not(.hidden) {
  animation: slideInDown 0.2s ease-out;
}

.profile-dropdown:not(.hidden) {
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Amélioration des transitions */
.dropdown-item,
.dropdown-status {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Meilleure lisibilité sur fond clair */
body.light-theme .profile-dropdown,
.profile-dropdown {
  background: #ffffff;
  color: #1f2937;
}

/* Force les couleurs pour une meilleure lisibilité */
.profile-dropdown * {
  text-shadow: none;
}

/* ================================= */
/* DARK MODE SUPPORT                 */
/* ================================= */
@media (prefers-color-scheme: dark) {
  .header-main.sticky {
    background: rgba(var(--bgr-rgb, 0, 0, 0), 0.95);
  }
  
  .profile-dropdown {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 10px 20px -5px rgba(0, 0, 0, 0.3);
  }
  
  .dropdown-header {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-bottom-color: #4b5563;
  }
  
  .profile-badge {
    border-color: var(--bgr);
  }
    .dropdown-name {
    color: #f9fafb;
  }
  
  .dropdown-email {
    color: #d1d5db;
  }
  
  .dropdown-status {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
  }
  
  .dropdown-item {
    color: #e5e7eb;
  }
  
  .dropdown-item:hover {
    background: #374151;
    color: #ffffff;
  }
  
  .dropdown-section + .dropdown-section {
    border-top-color: #374151;
  }
}

/* ================================= */
/* ÉTATS DE FOCUS ACCESSIBLES        */
/* ================================= */
.nav-profile-button:focus-visible,
.action-button:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--theme-border-radius, 8px);
}

.dropdown-item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* ================================= */
/* ANIMATIONS MICRO-INTERACTIONS     */
/* ================================= */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.nav-auth-ready {
  animation: fadeInScale 0.3s ease-out;
}

/* Animation du badge premium */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.dropdown-status[class*="bg-brand"]:hover {
  background: linear-gradient(90deg, var(--brand), rgba(var(--brand-rgb, 59, 130, 246), 0.8), var(--brand));
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ================================= */
/* OPTIMISATIONS PERFORMANCE         */
/* ================================= */
.profile-dropdown {
  contain: layout style paint;
}

.dropdown-item {
  contain: layout style;
}

/* Optimisation GPU pour les animations */
.nav-profile-button,
.dropdown-arrow,
.profile-dropdown,
.dropdown-item {
  will-change: transform;
}

.nav-profile-button:not(:hover),
.dropdown-item:not(:hover) {
  will-change: auto;
}

/* ================================= */
/* ÉTATS D'ERREUR ET DE LOADING      */
/* ================================= */
/* Ces règles sont pour l'icône de profil elle-même (le bouton) */
.nav-auth-loading .nav-profile-button {
  opacity: 0.7;
  pointer-events: none;
}

.nav-auth-loading .nav-profile-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--typ-tone);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* État d'erreur */
.nav-auth-error .nav-profile-button {
  color: #dc2626;
  border-color: #dc2626;
}

.nav-auth-error .profile-badge {
  background: #dc2626;
  animation: pulse-error 1s infinite;
}

@keyframes pulse-error {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

/* ================================= */
/* AMÉLIORATIONS TYPOGRAPHIQUES      */
/* ================================= */
.dropdown-name {
  font-feature-settings: "kern" 1, "liga" 1;
}

.dropdown-email {
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.dropdown-status {
  font-feature-settings: "smcp" 1;
  letter-spacing: 0.025em;
}

/* ================================= */
/* PRINT STYLES                      */
/* ================================= */
@media print {
  .header-main {
    position: static !important;
    box-shadow: none !important;
  }
  
  .profile-dropdown,
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .nav-main {
    border: none !important;
    background: transparent !important;
  }
}

/* ================================= */
/* REDUCED MOTION SUPPORT            */
/* ================================= */
@media (prefers-reduced-motion: reduce) {
  .nav-profile-button,
  .dropdown-arrow,
  .profile-dropdown,
  .dropdown-item,
  .nav-link,
  .action-button,
  .cta-button {
    transition: none;
  }
  
  .profile-badge {
    animation: none;
  }
  
  .profile-dropdown:not(.hidden) {
    animation: none;
  }
  
  .nav-auth-ready {
    animation: none;
  }
}

/* ================================= */
/* ÉTATS SPÉCIAUX GHOST              */
/* ================================= */

/* Navigation active/current */
.nav-current-auth .nav-link {
  background: var(--brand);
  color: var(--brand-contrast);
}

.nav-current-auth .nav-link:hover {
  background: var(--brand);
  opacity: 0.9;
}

/* Synchronisation Ghost + Supabase */
.nav-auth[data-sync-status="synced"] .profile-badge::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 4px;
  height: 4px;
  background: #10b981;
  border-radius: 50%;
  border: 1px solid var(--bgr);
}

.nav-auth[data-sync-status="pending"] .profile-icon {
  opacity: 0.7;
}

.nav-auth[data-sync-status="error"] .profile-icon {
  opacity: 0.5;
  filter: grayscale(1);
}

/* ================================= */
/* MESSAGES D'AUTHENTIFICATION       */
/* ================================= */

/* Conteneur de messages (si présent) */
#auth-messages {
  position: fixed;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  max-width: 90vw;
  width: 400px;
}

.alert {
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: var(--theme-border-radius, 8px);
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideInFromTop 0.3s ease-out;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #1e40af;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ================================= */
/* DEBUGGING HELPERS                 */
/* ================================= */

/* Mode debug pour développement */
[data-debug="true"] .nav-auth::before {
  content: attr(data-auth-state);
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 10px;
  background: #000;
  color: #fff;
  padding: 2px 4px;
  border-radius: 2px;
  z-index: 1000;
}

[data-debug="true"] .nav-auth[data-member-id]::after {
  content: "ID: " attr(data-member-id);
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: 10px;
  background: var(--brand);
  color: white;
  padding: 2px 4px;
  border-radius: 2px;
  z-index: 1000;
}

/* ================================= */
/* COMPATIBILITÉ LEGACY              */
/* ================================= */

/* Ancien système de profil (rétrocompatibilité) */
#supabase-user-profile-menu {
  transition: var(--nav-transition);
}

#supabase-user-profile-menu.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

#profile-dropdown.hidden {
  display: none !important;
}

/* Anciens boutons */
.supabase-guest-only {
  transition: var(--nav-transition);
}

.supabase-user-only {
  transition: var(--nav-transition);
}

/* ================================= */
/* OPTIMISATIONS FINALES             */
/* ================================= */

/* Préchargement des images */
.dropdown-header img {
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

/* Optimisation scroll */
.profile-dropdown {
  overscroll-behavior: contain;
}

/* Optimisation touch */
@media (hover: none) and (pointer: coarse) {
  .dropdown-item {
    min-height: 44px;
    padding: 0.875rem 1rem;
  }
  
  .nav-profile-button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .action-button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ================================= */
/* VARIABLES CSS POUR CUSTOMISATION  */
/* ================================= */

/* Variables exposées pour personnalisation */
.nav-main {
  --nav-border-radius: var(--theme-border-radius, 8px);
  --nav-padding: 0.25rem;
  --nav-gap: 0.125rem;
  --nav-transition-duration: 0.2s;
  --nav-hover-bg: var(--bgr-tone);
  --nav-hover-color: var(--brand);
}

.profile-dropdown {
  --dropdown-border-radius: var(--theme-border-radius, 8px);
  --dropdown-shadow: var(--dropdown-shadow-lg);
  --dropdown-bg: var(--bgr);
  --dropdown-border: var(--brd);
  --dropdown-item-hover: var(--bgr-tone);
  --dropdown-width: 16rem;
}

/* ================================ */
/* MOBILE MENU PREMIUM STYLES       */
/* ================================ */

/* Correction menu mobile : dans l'écran */
#mobile-menu {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  overflow: hidden !important;
}

#mobile-menu .absolute.inset-0 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

#mobile-menu > div:last-child {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-y: auto !important;
  background: white !important;
  box-shadow: none !important;
}

/* Header du menu mobile */
#mobile-menu .flex.items-center.justify-between {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px;
  margin: 0;
}

#mobile-menu .px-6.py-6 {
  padding: 0 !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Navigation principale container avec couleurs sage/stone */
#mobile-menu .nav-principal-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfcfa 0%, #f7f5f2 50%, #efebe6 100%);
  border-radius: 16px;
  margin: 16px;
  padding: 24px;
  border: 1px solid rgba(117, 140, 99, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#mobile-menu .nav-principal-container::before {
  content: '';
  position: absolute;
  top: -12px;
  right: -12px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  border-radius: 50%;
  opacity: 0.1;
}

#mobile-menu .nav-principal-container::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: -8px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4a5b37 0%, #c08552 100%);
  border-radius: 50%;
  opacity: 0.1;
}

/* Titre navigation */
#mobile-menu .nav-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #544840 0%, #566c40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Liens navigation premium */
#mobile-menu .nav-link-premium {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #544840;
  border-radius: 12px;
  transition: all 0.3s ease;
  transform: translateX(0);
  margin-bottom: 4px;
}

#mobile-menu .nav-link-premium:hover {
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  color: white;
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(86, 108, 64, 0.3);
}

/* Auth Section Guest avec couleurs sage/stone */
#mobile-auth-section .auth-guest-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfcfa 0%, #f7f5f2 50%, #efebe6 100%);
  border-radius: 16px;
  margin: 16px;
  padding: 32px;
  border: 1px solid rgba(117, 140, 99, 0.2);
  box-shadow: 0 8px 32px rgba(86, 108, 64, 0.15);
}

#mobile-auth-section .auth-guest-premium::before {
  content: '';
  position: absolute;
  top: -24px;
  right: -24px;
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  border-radius: 50%;
  opacity: 0.1;
}

#mobile-auth-section .auth-guest-premium::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: -16px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #4a5b37 0%, #c08552 100%);
  border-radius: 50%;
  opacity: 0.1;
}

/* Auth Section Member avec couleurs sage/stone */
#mobile-auth-section .auth-member-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f9f8f6 0%, #f4f2ee 50%, #ede8e0 100%);
  border: 1px solid rgba(86, 108, 64, 0.2);
  border-radius: 16px;
  margin: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(86, 108, 64, 0.15);
}

#mobile-auth-section .auth-member-premium::before {
  content: '';
  position: absolute;
  top: -16px;
  right: -16px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  border-radius: 50%;
  opacity: 0.1;
}

#mobile-auth-section .auth-member-premium::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: -12px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #4a5b37 0%, #c08552 100%);
  border-radius: 50%;
  opacity: 0.1;
}

/* Member avatar */
#mobile-auth-section .member-avatar-premium {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(86, 108, 64, 0.3);
  transition: transform 0.3s ease;
  position: relative;
}

#mobile-auth-section .member-avatar-premium:hover {
  transform: scale(1.05);
}

#mobile-auth-section .member-avatar-premium::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #566c40;
  border: 2px solid white;
  border-radius: 50%;
}

#mobile-auth-section .member-avatar-premium::before {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* Member info */
#mobile-auth-section .member-name-premium {
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(135deg, #544840 0%, #566c40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Container pour badges dynamiques */
#mobile-auth-section .member-badges-mobile-container {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Badges dynamiques basés sur user-badges.js */
#mobile-auth-section .mobile-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

/* Styles spécifiques par rôle avec couleurs sage/stone */
#mobile-auth-section .mobile-user-badge[data-badge-key="admin"] {
  background: linear-gradient(135deg, #8f8075 0%, #6b5d52 100%);
  color: white;
}

#mobile-auth-section .mobile-user-badge[data-badge-key="coach"] {
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  color: white;
}

#mobile-auth-section .mobile-user-badge[data-badge-key="coachee"] {
  background: linear-gradient(135deg, #d4965a 0%, #c08552 100%);
  color: white;
}

#mobile-auth-section .mobile-user-badge[data-badge-key="member"] {
  background: linear-gradient(135deg, #e2ddd6 0%, #c4bab0 100%);
  color: #544840;
}

#mobile-auth-section .mobile-user-badge .material-symbols-outlined {
  font-size: 14px;
}

/* Upgrade quick link */
#mobile-auth-section .upgrade-quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #d4965a 0%, #c08552 100%);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(192, 133, 82, 0.3);
}

#mobile-auth-section .upgrade-quick-link:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(192, 133, 82, 0.4);
}

#mobile-auth-section .upgrade-quick-link .material-symbols-outlined {
  font-size: 16px;
}

/* Profile actions avec design premium cohérent */
#mobile-auth-section .profile-action-premium {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #544840;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(249, 248, 246, 0.8) 0%, rgba(244, 242, 238, 0.9) 100%);
  border: 1px solid rgba(86, 108, 64, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  overflow: hidden;
}

#mobile-auth-section .profile-action-premium::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  border-radius: 50%;
  opacity: 0.1;
  transition: all 0.3s ease;
}

#mobile-auth-section .profile-action-premium:hover {
  background: linear-gradient(135deg, #566c40 0%, #4a5b37 100%);
  color: white;
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(86, 108, 64, 0.3);
}

#mobile-auth-section .profile-action-premium:hover::before {
  opacity: 0.3;
  transform: scale(1.5);
}

#mobile-auth-section .profile-icon-premium {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(86, 108, 64, 0.1) 0%, rgba(74, 91, 55, 0.15) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #566c40;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(86, 108, 64, 0.1);
}

#mobile-auth-section .profile-action-premium:hover .profile-icon-premium {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.3) 100%);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

#mobile-auth-section .profile-icon-premium .material-symbols-outlined {
  font-size: 20px;
}

/* Upgrade section avec couleurs cuivre et padding uniforme */
#mobile-auth-section .upgrade-section-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfcfa 0%, #f7f5f2 50%, #efebe6 100%);
  border-radius: 16px;
  margin: 0 24px 16px 24px;
  padding: 24px;
  border: 2px solid rgba(192, 133, 82, 0.3);
  box-shadow: 0 8px 32px rgba(192, 133, 82, 0.2);
  animation: pulse-slow 3s infinite;
}

#mobile-auth-section .upgrade-section-premium::before {
  content: '';
  position: absolute;
  top: -16px;
  right: -16px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #d4965a 0%, #c08552 100%);
  border-radius: 50%;
  opacity: 0.15;
}

#mobile-auth-section .upgrade-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #d4965a 0%, #c08552 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  transform: rotate(12deg);
  box-shadow: 0 4px 12px rgba(192, 133, 82, 0.3);
}

#mobile-auth-section .upgrade-icon-premium {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #d4965a 0%, #c08552 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 25px rgba(192, 133, 82, 0.3);
  transition: transform 0.3s ease;
}

#mobile-auth-section .upgrade-icon-premium:hover {
  transform: scale(1.1) rotate(3deg);
}

#mobile-auth-section .upgrade-title-premium {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #544840 0%, #c08552 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

#mobile-auth-section .upgrade-title-premium:hover {
  transform: scale(1.05);
}

#mobile-auth-section .upgrade-cta-premium {
  position: relative;
  background: linear-gradient(135deg, #d4965a 0%, #c08552 100%);
  color: white;
  padding: 12px 32px;
  border-radius: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  transform: scale(1);
  box-shadow: 0 8px 25px rgba(192, 133, 82, 0.3);
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#mobile-auth-section .upgrade-cta-premium:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(192, 133, 82, 0.4);
  background: linear-gradient(135deg, #c08552 0%, #a67247 100%);
}

#mobile-auth-section .upgrade-cta-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  border-radius: 16px;
  transition: background 0.3s ease;
}

#mobile-auth-section .upgrade-cta-premium:hover::before {
  background: rgba(255, 255, 255, 0.2);
}

/* Advantages list */
#mobile-auth-section .advantages-list {
  margin-top: 16px;
  font-size: 12px;
  color: #8f8075;
}

#mobile-auth-section .advantage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#mobile-auth-section .advantage-dot {
  width: 8px;
  height: 8px;
  background: #566c40;
  border-radius: 50%;
}

/* Logout section avec couleurs stone et padding uniforme */
#mobile-auth-section .logout-section-premium {
  padding: 16px 24px 24px 24px;
}

#mobile-auth-section .logout-container-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfcfa 0%, #f7f5f2 50%, #efebe6 100%);
  border-radius: 16px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(143, 128, 117, 0.3);
  box-shadow: 0 4px 20px rgba(143, 128, 117, 0.2);
}

#mobile-auth-section .logout-container-premium::before {
  content: '';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #8f8075 0%, #6b5d52 100%);
  border-radius: 50%;
  opacity: 0.1;
}

#mobile-auth-section .logout-button-premium {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  color: #6b5d52;
  border-radius: 12px;
  transition: all 0.3s ease;
  transform: scale(1);
  background: none;
  border: none;
  cursor: pointer;
}

#mobile-auth-section .logout-button-premium:hover {
  background: linear-gradient(135deg, #8f8075 0%, #6b5d52 100%);
  color: white;
  transform: scale(1.05);
}

#mobile-auth-section .logout-icon-premium {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #f7f5f2 0%, #efebe6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b5d52;
  transition: all 0.3s ease;
}

#mobile-auth-section .logout-button-premium:hover .logout-icon-premium {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

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

/* ================================= */
/* FIN DU FICHIER CSS               */
/* ================================= */