/**
 * Styles communs - Ado Plus v2.0
 * Header, Footer et éléments partagés
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    /* Couleurs principales */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Couleurs de texte */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    /* Couleurs de fond */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Espacements */
    --header-height: 70px;
    --container-max-width: 1200px;
    
    /* Animations */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border-color: #374151;
        
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Bloc dans le flux après le footer : garantit la hauteur de scroll (padding body/flex peu fiable selon moteurs) */
.ado-bottom-nav-scroll-spacer {
    flex-shrink: 0;
    width: 100%;
    height: 0;
    min-height: 0;
    pointer-events: none;
    visibility: hidden;
}

@media (max-width: 767px) {
    html.ado-logged-in .ado-bottom-nav-scroll-spacer {
        /* FOUC / sans JS : évite le chevauchement avant mesure */
        min-height: max(112px, calc(6.5rem + env(safe-area-inset-bottom, 0px)));
    }
}

@media (min-width: 768px) {
    html.ado-logged-in .ado-bottom-nav-scroll-spacer {
        min-height: 0;
    }
}

body.menu-open {
    overflow: hidden;
}

/* Admin : le combo main flex:1 + min-height 100vh + footer margin-top:auto décale le pied de page */
body.admin-route .main-content {
    flex: 0 1 auto;
    min-height: 0;
}

body.admin-route footer.site-footer {
    margin-top: 0;
}

/* ========================================
   MOBILE — pas de zoom iOS au focus des champs
   Safari zoome si font-size < 16px sur input/textarea/select.
   ======================================== */
@media (max-width: 1023px) {
    input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="file"]):not([type="range"]):not([type="color"]),
    textarea,
    select {
        font-size: 16px;
    }
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

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

.logo-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.logo-text {
    font-size: 1.25rem;
}

/* Navigation desktop */
.nav-desktop {
    display: none; /* Masqué par défaut sur mobile */
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex; /* Affiché sur desktop */
    }
}

.nav-link {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

/* Actions header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Boutons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

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

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

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

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

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

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    font-size: 0.9375rem;
}

.user-menu-trigger:hover {
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.user-avatar,
.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.user-menu-trigger:hover .user-menu-arrow {
    transform: translateY(2px);
}

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

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

.user-menu-header {
    padding: 1rem;
}

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

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.badge-admin {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-moderator {
    background-color: #dbeafe;
    color: #1e40af;
}

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

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color var(--transition-fast);
    font-size: 0.9375rem;
}

.user-menu-item:hover {
    background-color: var(--bg-secondary);
}

.user-menu-item:first-of-type {
    border-radius: 0.75rem 0.75rem 0 0;
}

.user-menu-item:last-of-type {
    border-radius: 0 0 0.75rem 0.75rem;
}

.user-menu-item .item-icon {
    font-size: 1.125rem;
    line-height: 1;
}

.item-danger {
    color: var(--danger-color);
}

.item-danger:hover {
    background-color: #fee2e2;
}

.notification-badge {
    margin-left: auto;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.25rem;
    text-align: center;
}

/* Menu mobile toggle */
.mobile-menu-toggle {
    display: flex; /* Affiché par défaut sur mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none; /* Masqué sur desktop */
    }
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* Menu mobile */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
    transform: translateX(0) !important;
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none; /* Complètement masqué sur desktop */
    }
}

.mobile-nav {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    transition: background-color var(--transition-fast);
}

.mobile-nav-link:hover {
    background-color: var(--bg-secondary);
}

.mobile-nav-danger {
    color: var(--danger-color);
}

.mobile-nav-primary {
    background-color: var(--primary-color);
    color: white;
}

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

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

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    flex: 1;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ========================================
   BOTTOM NAVIGATION BAR
   ======================================== */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 998;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0 max(0.5rem, env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(10px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex: 1;
    max-width: 100px;
}

.bottom-nav-item:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
    border-radius: 0.75rem;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active .bottom-nav-icon svg {
    stroke: var(--primary-color);
}

/* Icône téléphone verte quand un appel est actif */
.bottom-nav-item.call-active {
    color: #10b981;
}

.bottom-nav-item.call-active .bottom-nav-icon svg {
    stroke: #10b981;
    fill: #10b981;
}

.bottom-nav-item.call-active:hover {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.bottom-nav-item.call-active:hover .bottom-nav-icon svg {
    stroke: #059669;
    fill: #059669;
}

.bottom-nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-icon svg {
    transition: all 0.2s ease;
}

.bottom-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.bottom-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 1rem;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

/* Animation pour les badges */
.bottom-nav-badge.badge-pulse {
    animation: badgePulse 0.6s ease-in-out;
    transform: scale(1.2);
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.2); }
}

/* Indicateur d'amis en ligne */
.online-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    z-index: 10;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
    }
}

/* Animation d'entrée pour les nouveaux éléments */
.bottom-nav-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item:hover {
    transform: translateY(-2px);
}

.bottom-nav-item.active {
    transform: translateY(-1px);
}

/* Adaptation responsive */
@media (min-width: 1024px) {
    .bottom-nav-bar {
        display: none; /* Masquer sur desktop uniquement (>1024px) */
    }

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

/* Animation pour les badges */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.bottom-nav-badge:not(:empty) {
    animation: badgePulse 2s ease-in-out infinite;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.footer-icon {
    font-size: 1.5rem;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-item span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

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

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright,
.footer-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-copyright {
    margin-bottom: 0.25rem;
}

.footer-copyright strong {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    .btn {
        display: inline-flex;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 60px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .user-name {
        display: none;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-outline {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* La première section (À propos) prend toute la largeur (compatible 1 colonne ou plus) */
    .footer-content > .footer-section:first-child {
        grid-column: 1 / -1;
    }
    
    .footer-section {
        gap: 0.5rem;
    }
    
    .footer-title {
        font-size: 1.125rem;
    }
    
    .footer-icon {
        font-size: 1.25rem;
    }
    
    .footer-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    .footer-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
    }
    
    .footer-links {
        gap: 0.5rem;
    }
    
    .footer-links a {
        font-size: 0.875rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .btn-primary {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    /* Footer encore plus compact sur très petits écrans */
    .footer-content {
        gap: 1.25rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-description {
        font-size: 0.8125rem;
    }
    
    .footer-subtitle {
        font-size: 0.875rem;
    }
    
    .footer-links a {
        font-size: 0.8125rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

.btn:focus,
.nav-link:focus,
.user-menu-trigger:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
    }
    
    .btn-outline,
    .user-menu-trigger {
        border-width: 2px;
    }
}

/* Masquer le menu raccourci en mode horizontal (landscape) */
@media (orientation: landscape) and (max-height: 500px) {
    .bottom-nav-bar {
        display: none !important;
    }
    
    /* Ajuster le padding du contenu principal en mode horizontal */
    .main-content {
        padding-bottom: 0 !important;
    }
}

/* ========================================
   Bottom nav mobile — style « liquid glass » (type barre iOS)
   ======================================== */
@media (max-width: 1023px) {
    #bottomNavBar.bottom-nav-bar {
        overflow: visible !important;
        /* Laisse le blob suivre le doigt sans que le navigateur vole le geste (scroll / cancel). */
        touch-action: none;
        left: max(0.65rem, env(safe-area-inset-left, 0px)) !important;
        right: max(0.65rem, env(safe-area-inset-right, 0px)) !important;
        bottom: max(0.55rem, env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        justify-content: space-between;
        align-items: stretch;
        gap: 0.1rem;
        padding: 0.42rem 0.3rem !important;
        margin: 0 auto;
        max-width: min(100%, 28rem);
        border-radius: 1.35rem;
        background: rgba(255, 255, 255, 0.38) !important;
        -webkit-backdrop-filter: blur(26px) saturate(185%);
        backdrop-filter: blur(26px) saturate(185%);
        border: 1px solid rgba(255, 255, 255, 0.48);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.55),
            0 10px 36px rgba(15, 23, 42, 0.12),
            0 2px 12px rgba(15, 23, 42, 0.06);
        box-sizing: border-box;
        isolation: isolate;
    }

    #bottomNavBar.bottom-nav-bar .bottom-nav-item {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        padding: 0.35rem 0.15rem;
        gap: 0.12rem;
        border-radius: 0.85rem;
    }

    #bottomNavBar.bottom-nav-bar a.bottom-nav-item {
        position: relative;
        overflow: visible;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    #bottomNavBar.bottom-nav-bar a.bottom-nav-item .bottom-nav-icon,
    #bottomNavBar.bottom-nav-bar a.bottom-nav-item .bottom-nav-label {
        position: relative;
        z-index: 2;
    }

    @keyframes bottom-nav-blob-morph {
        0% {
            border-radius: 42% 58% 52% 48% / 48% 52% 45% 55%;
        }
        50% {
            border-radius: 54% 46% 45% 55% / 52% 48% 55% 45%;
        }
        100% {
            border-radius: 46% 54% 50% 50% / 50% 46% 54% 50%;
        }
    }

    #bottomNavBar .bottom-nav-lift-blob {
        position: absolute;
        width: 4.25rem;
        height: 4.25rem;
        margin: 0;
        pointer-events: none;
        z-index: 60;
        left: 0;
        top: 0;
        opacity: 0;
        transform: scale(0.32);
        will-change: transform, left, top, opacity;
        border-radius: 45% 55% 48% 52% / 50% 48% 52% 50%;
        background: radial-gradient(
            120% 120% at 35% 30%,
            rgba(255, 255, 255, 0.72) 0%,
            rgba(255, 255, 255, 0.28) 42%,
            rgba(99, 102, 241, 0.14) 100%
        );
        -webkit-backdrop-filter: blur(22px) saturate(200%);
        backdrop-filter: blur(22px) saturate(200%);
        border: 1.5px solid rgba(255, 255, 255, 0.62);
        box-shadow:
            inset 0 2px 12px rgba(255, 255, 255, 0.55),
            inset 0 -1px 8px rgba(99, 102, 241, 0.12),
            0 12px 36px rgba(99, 102, 241, 0.28),
            0 4px 14px rgba(15, 23, 42, 0.12);
        transition:
            opacity 0.14s ease,
            transform 0.42s cubic-bezier(0.34, 1.55, 0.45, 1);
        animation: bottom-nav-blob-morph 2.2s ease-in-out infinite;
    }

    #bottomNavBar .bottom-nav-lift-blob--visible {
        opacity: 0.98;
        transform: scale(1);
    }

    #bottomNavBar .bottom-nav-lift-blob--dragging {
        transition:
            left 0.07s ease-out,
            top 0.07s ease-out,
            opacity 0.12s ease,
            transform 0.28s cubic-bezier(0.25, 0.9, 0.35, 1);
    }

    @media (prefers-color-scheme: dark) {
        #bottomNavBar .bottom-nav-lift-blob {
            background: radial-gradient(
                120% 120% at 35% 30%,
                rgba(255, 255, 255, 0.16) 0%,
                rgba(40, 48, 60, 0.55) 45%,
                rgba(79, 70, 229, 0.18) 100%
            );
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.12),
                0 14px 40px rgba(0, 0, 0, 0.45);
        }
    }

    body.dark-theme #bottomNavBar .bottom-nav-lift-blob {
        background: radial-gradient(
            120% 120% at 35% 30%,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(40, 48, 60, 0.55) 45%,
            rgba(79, 70, 229, 0.18) 100%
        );
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            0 14px 40px rgba(0, 0, 0, 0.45);
    }

    #bottomNavBar.bottom-nav-bar a.bottom-nav-item.bottom-nav-item--pressing {
        transform: scale(0.93) translateY(0) !important;
        transition: transform 0.14s cubic-bezier(0.32, 0.72, 0, 1);
    }

    #bottomNavBar.bottom-nav-bar a.bottom-nav-item.bottom-nav-item--lift {
        transform: scale(1.06) translateY(0) !important;
        transition: transform 0.26s cubic-bezier(0.34, 1.5, 0.55, 1);
    }

    #bottomNavBar.bottom-nav-bar .bottom-nav-item:hover {
        background: rgba(255, 255, 255, 0.22);
    }

    #bottomNavBar.bottom-nav-bar .bottom-nav-label {
        font-size: 0.625rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        line-height: 1.1;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #bottomNavBar.bottom-nav-bar .bottom-nav-icon svg {
        width: 22px;
        height: 22px;
    }

    @media (prefers-color-scheme: dark) {
        #bottomNavBar.bottom-nav-bar {
            background: rgba(22, 28, 36, 0.55) !important;
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 12px 40px rgba(0, 0, 0, 0.45),
                0 2px 10px rgba(0, 0, 0, 0.3);
        }

        #bottomNavBar.bottom-nav-bar .bottom-nav-item:hover {
            background: rgba(255, 255, 255, 0.06);
        }
    }

    body.dark-theme #bottomNavBar.bottom-nav-bar {
        background: rgba(22, 28, 36, 0.55) !important;
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            0 12px 40px rgba(0, 0, 0, 0.45),
            0 2px 10px rgba(0, 0, 0, 0.3);
    }

    body.dark-theme #bottomNavBar.bottom-nav-bar .bottom-nav-item:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    @media (prefers-reduced-transparency: reduce) {
        #bottomNavBar.bottom-nav-bar {
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
            background: var(--bg-primary) !important;
            border: 1px solid var(--border-color) !important;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06) !important;
        }

        #bottomNavBar .bottom-nav-lift-blob {
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
            animation: none !important;
        }
    }

    /* Discussion : la barre est dans .bottom-fixed-container (position relative), pas fixed plein écran */
    .bottom-fixed-container #bottomNavBar.bottom-nav-bar {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: calc(100% - 1.3rem) !important;
        max-width: min(100%, 28rem);
        margin: 0.35rem auto 0.45rem !important;
    }
}

