/* --- DESIGN SYSTEM & TOKENS --- */
:root {
    --bg-main: #090710;
    --bg-sidebar: #0f0c1b;
    --bg-card: rgba(23, 19, 42, 0.6);
    --bg-card-hover: rgba(33, 27, 61, 0.8);
    --border-glass: rgba(139, 92, 246, 0.15);
    --border-glass-hover: rgba(139, 92, 246, 0.3);
    
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --primary-light: #a78bfa;
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #6b7280;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BASES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-primary);
    overflow: hidden;
    height: 100vh;
}

button {
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* --- SCROLLBAR CUSTOMIZATION --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 12, 27, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- LAYOUT STRUCTURE --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 24px;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-smooth);
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(139, 92, 246, 0.1);
}

.nav-item.active {
    color: var(--text-main);
    background-color: var(--primary);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.badge {
    margin-left: auto;
    background-color: var(--secondary);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.premium-box-sidebar {
    background: radial-gradient(circle at top left, rgba(139, 92, 246, 0.2), transparent);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    margin-top: auto;
}

.premium-box-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.premium-icon {
    color: var(--warning);
    width: 28px;
    height: 28px;
    animation: pulse 2s infinite;
}

.premium-box-content h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
}

.premium-box-content p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- MAIN CONTENT & TOP BAR --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-bar {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background-color: rgba(9, 7, 16, 0.8);
    backdrop-filter: blur(10px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 6px 16px;
    width: 320px;
}

.search-box i {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
    font-size: 14px;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    border: 2px solid var(--border-glass-hover);
}

.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-badge.free {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.status-badge.premium {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 32px;
}

/* --- THEATER VIEW --- */
.theater-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    height: 100%;
}

@media (max-width: 1024px) {
    .theater-layout {
        grid-template-columns: 1fr;
    }
}

.player-container-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
}

.video-player-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* overlay de verrouillage */
.player-overlay-lock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 7, 16, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.lock-card {
    text-align: center;
    max-width: 400px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lock-card-icon {
    width: 48px;
    height: 48px;
    color: var(--warning);
    animation: pulse 2s infinite;
}

.lock-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.lock-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Détails du média */
.media-details {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.media-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.media-header h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.media-tags {
    display: flex;
    gap: 8px;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.tag-lang {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.tag-level {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.media-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- MODULE D'APPRENTISSAGE / SOUS-TITRES --- */
.learning-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.learning-panel .panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 10px;
}

.learning-panel .panel-header h2 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
}

.learning-panel .panel-header i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.subtitle-timeline-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.subtitle-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subtitle-empty-state {
    color: var(--text-dark);
    font-size: 13px;
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

/* Cartes de Sous-titres */
.subtitle-card {
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    transition: var(--transition-smooth);
    background-color: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.subtitle-card:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.subtitle-card.active {
    background-color: rgba(139, 92, 246, 0.06);
    border: 1px solid var(--border-glass-hover);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Mots Interactifs */
.sub-original {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.word-span {
    position: relative;
    padding: 1px 2px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.word-span:hover {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 8px var(--primary-glow);
}

.sub-translation {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- BOUTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-glass-hover);
}

.btn-premium-sidebar {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: #fff;
    width: 100%;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
}

.btn-premium-sidebar:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* --- BIBLIOTHÈQUE VIEW --- */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.library-header h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    padding: 4px;
    border-radius: 20px;
}

.filter-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 16px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.filter-btn.active, .filter-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.08);
}

/* Grille Vidéo */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.video-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-poster-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    background-color: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.video-card:hover .card-poster {
    transform: scale(1.05);
}

.card-overlay-lock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.lock-badge {
    background-color: rgba(0,0,0,0.8);
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-top: auto;
}

.card-meta .tag {
    padding: 2px 6px;
}

/* --- MON VOCABULAIRE VIEW --- */
.vocab-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.vocab-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 16px;
    position: relative;
    transition: var(--transition-smooth);
}

.vocab-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.vocab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.vocab-original {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-light);
}

.vocab-btn-delete {
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.vocab-btn-delete:hover {
    color: var(--danger);
}

.vocab-pronunciation {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.vocab-translation {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 2px solid var(--secondary);
}

.vocab-example-container {
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 8px;
}

.vocab-example-orig {
    color: var(--text-main);
    margin-bottom: 2px;
}

.vocab-example-trans {
    color: var(--text-muted);
}

/* --- GLOSSAIRE POPOVER (TOOLTIP FLOATING) --- */
.glossary-popover {
    position: absolute;
    background-color: #120e26;
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 16px;
    width: 260px;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.popover-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.word-original {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-light);
}

.word-pronunciation {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.popover-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.popover-translation {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.popover-example {
    font-size: 11px;
    color: var(--text-muted);
    background-color: rgba(255,255,255,0.02);
    padding: 6px;
    border-radius: 4px;
}

.btn-action-vocab {
    width: 100%;
    background-color: var(--primary);
    color: #fff;
    padding: 6px;
    font-size: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-action-vocab:hover {
    background-color: var(--primary-light);
}

/* --- MODAL OVERLAYS (PAYWALL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(9, 7, 16, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background-color: #120e26;
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 680px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    color: var(--text-main);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-sparkles-icon {
    width: 42px;
    height: 42px;
    color: var(--warning);
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.pricing-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .pricing-plans {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-smooth);
}

.pricing-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
}

.pricing-card.premium-card {
    border-color: var(--primary);
    background-color: rgba(139, 92, 246, 0.03);
}

.card-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
}

.card-badge.premium {
    background-color: var(--primary);
    color: #fff;
}

.pricing-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.price {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 13px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    width: 16px;
    height: 16px;
    color: var(--success);
}

.pricing-card .btn {
    margin-top: auto;
    width: 100%;
}

/* Faux Formulaire Stripe */
.payment-demo-box {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    animation: slideDown 0.3s ease;
}

.payment-demo-box h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-light);
}

.stripe-mock-elements {
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass-hover);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.card-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-input-row i {
    color: var(--text-dark);
}

.card-input-row input {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 14px;
}

.stripe-security-notice {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.stripe-security-notice i {
    color: var(--success);
    width: 14px;
    height: 14px;
}

/* --- UTILS --- */
.hidden {
    display: none !important;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- STYLES D'AUTHENTIFICATION --- */
.auth-card {
    max-width: 420px;
    padding: 32px;
}

.modal-auth-icon {
    width: 42px;
    height: 42px;
    color: var(--primary);
    margin-bottom: 12px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--text-dark);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.input-wrapper input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 12px 10px 38px;
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

.auth-error-msg {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 13px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.btn-auth-submit {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

.auth-toggle-link {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.auth-toggle-link a {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* --- POPOVER DE COMPTE --- */
.account-popover {
    position: absolute;
    background-color: #120e26;
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 16px;
    width: 220px;
    z-index: 100;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    top: 60px;
    right: 24px;
}

.account-popover-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.account-email {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-role {
    font-size: 11px;
    color: var(--warning);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}

.account-popover-body {
    display: flex;
    flex-direction: column;
}

