:root {
    --primary: #e5a00d;
    --primary-dark: #cc8a00;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-radius: 12px;

    /* Thème sombre (par défaut) */
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f1a;
    --bg-card: #252542;
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --navbar-bg: rgba(15, 15, 26, 0.95);
}

/* Thème clair */
[data-theme="light"] {
    --bg-dark: #f0f0f5;
    --bg-darker: #ffffff;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6b6b80;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.95);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-darker);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-darker);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

.btn-outline {
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--primary) !important;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-darker) !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 0;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 2rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-simple {
    min-height: 50vh;
    justify-content: center;
    text-align: center;
}

.hero-simple .hero-buttons {
    justify-content: center;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 300px;
}

.floating-cards .card {
    position: absolute;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: 0 10px 40px var(--shadow-color);
    animation: float 3s ease-in-out infinite;
}

.card-1 { top: 0; left: 20%; animation-delay: 0s; background: linear-gradient(135deg, #667eea, #764ba2); }
.card-2 { top: 30%; right: 0; animation-delay: 0.5s; background: linear-gradient(135deg, #f093fb, #f5576c); }
.card-3 { bottom: 20%; left: 0; animation-delay: 1s; background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card-4 { bottom: 0; right: 20%; animation-delay: 1.5s; background: linear-gradient(135deg, var(--primary), #ff6b6b); }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Features */
.features {
    padding: 5rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.features h2, .tutorials h2, .quick-links h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

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

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(229, 160, 13, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

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

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tutorials */
.tutorials {
    padding: 5rem 2rem;
    background: var(--bg-dark);
}

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

.tutorial-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.tutorial-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.tutorial-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
}

.tutorial-icon svg {
    width: 100%;
    height: 100%;
    color: var(--primary);
}

.tutorial-card h3 {
    margin-bottom: 0.5rem;
}

.tutorial-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Quick Links */
.quick-links {
    padding: 5rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.links-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 3rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.quick-link-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.quick-link-icon.plex {
    background: var(--primary);
    color: var(--bg-darker);
}

.quick-link-icon.overseerr {
    background: linear-gradient(135deg, #7b68ee, #9370db);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    text-align: left;
}

.modal-content ol {
    padding-left: 1.5rem;
}

.modal-content li {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.modal-content strong {
    color: var(--text);
}

.modal-content a {
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--bg-dark);
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-muted);
}

.admin-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

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

/* Responsive - voir section complète en bas du fichier */

/* Admin Styles */
.admin-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 100px 2rem 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 2rem;
}

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

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

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

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }

/* Table */
.table-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
}

th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color);
}

tr:hover td {
    background: var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.paid { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.status-badge.pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.status-badge.overdue { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 0.5rem;
    background: var(--bg-dark);
    border: none;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--primary);
    color: var(--bg-darker);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.login-box .btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Responsive Table */
@media (max-width: 900px) {
    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }
}

/* Nav User Menu */
.nav-user {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-user a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-menu:hover {
    background: var(--border-color);
}

.user-thumb-nav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border-radius: 12px;
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
}

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

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: var(--border-color);
    color: var(--primary);
}

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

.nav-container {
    position: relative;
}

/* Notification Badge */
.notif-badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 0.25rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 3000;
    max-width: 350px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

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

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

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

/* Plex Login Modal */
.plex-login-icon {
    margin-bottom: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--border-color);
    color: var(--text);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--bg-darker);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

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

/* Admin action buttons */
.btn-danger {
    background: var(--danger);
    color: white;
}

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

/* Tutorials list (admin) */
.tutorials-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tutorial-item {
    background: var(--bg-darker);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-item h4 {
    margin: 0;
}

/* Editor */
.editor-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.editor-container h3 {
    margin-bottom: 1rem;
}

.editor-container textarea {
    min-height: 300px;
    font-family: monospace;
    resize: vertical;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

/* User thumb large */
.user-thumb-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

/* Responsive mobile nav user */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    /* Nav links - garder visible mais simplifier */
    .nav-links {
        display: flex;
        gap: 0.5rem;
    }

    .nav-links .nav-link-desktop {
        display: none;
    }

    .nav-links .btn .btn-text {
        display: none;
    }

    .nav-links .btn svg {
        margin: 0;
    }

    /* Nav user reste visible mais compact */
    .nav-user {
        display: flex;
        gap: 0.5rem;
    }

    .nav-user > a {
        display: none;
    }

    .user-menu {
        padding: 0.25rem;
        gap: 0.35rem;
    }

    .user-menu #userName,
    .user-menu span:not(.notif-badge) {
        display: none;
    }

    .user-menu svg {
        display: none;
    }

    .user-thumb-nav {
        width: 36px;
        height: 36px;
    }

    .user-dropdown {
        right: -0.5rem;
        min-width: 180px;
    }

    .user-dropdown a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .logo span:not(.logo-icon) {
        display: none;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

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

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.25rem;
        max-height: 90vh;
        margin: 0;
    }

    .modal-content h2 {
        font-size: 1.25rem;
        padding-right: 2rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .login-box {
        padding: 1.5rem;
    }

    .login-box h1 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-visual {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .tutorials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .tutorial-card {
        padding: 1.25rem;
    }

    .tutorial-card h3 {
        font-size: 0.95rem;
    }

    .tutorial-card p {
        font-size: 0.75rem;
    }

    .tutorial-icon {
        width: 40px;
        height: 40px;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .tutorials-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .tutorial-card {
        padding: 1rem;
    }

    .tutorial-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0.5rem;
    }

    .tutorial-card h3 {
        font-size: 0.85rem;
    }
}

/* ============================================
   LOGIN SECTION STYLES
   ============================================ */

.login-section {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.login-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-logo {
    margin-bottom: 2rem;
}

.logo-icon-large {
    display: inline-flex;
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 24px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 3rem;
    color: var(--bg-darker);
    box-shadow: 0 10px 40px rgba(229, 160, 13, 0.3);
}

.login-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.login-content > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.login-notice {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1.5rem;
}

.btn-large {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    justify-content: center;
    gap: 0.75rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .login-content {
        max-width: 320px;
    }

    .logo-icon-large {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
        border-radius: 20px;
    }

    .login-content h1 {
        font-size: 2rem;
    }

    .login-content > p {
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
}

/* Mobile bottom navigation - HIDDEN by default on all screens */
.mobile-bottom-nav {
    display: none !important;
}

/* Mobile dashboard navigation */
@media (max-width: 768px) {
    .navbar.mobile-app {
        background: var(--bg-dark);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Bottom navigation for mobile dashboard - show only on mobile */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        border-top: 1px solid var(--border-color);
        padding: 0.5rem;
        z-index: 1000;
        justify-content: space-around;
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        color: var(--text-muted);
        text-decoration: none;
        padding: 0.5rem;
        font-size: 0.7rem;
        transition: color 0.2s;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        color: var(--primary);
    }

    .mobile-bottom-nav svg {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px;
        max-width: 24px;
    }
}

/* ============================================
   VERSION DISPLAY & UPDATE BANNER
   ============================================ */

.app-version {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.update-banner {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    transition: bottom 0.3s ease;
}

.update-banner.show {
    bottom: 20px;
}

@media (max-width: 768px) {
    .update-banner.show {
        bottom: 80px; /* Au-dessus de la nav mobile */
    }
}

.update-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.update-content span {
    font-size: 0.9rem;
    white-space: nowrap;
}

.update-content .btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.update-content .btn-close:hover {
    color: var(--text);
}

/* ============================================
   PWA INSTALL & NOTIFICATION BANNERS
   ============================================ */

.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-banner.show {
    transform: translateY(0);
}

.pwa-banner-content {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.875rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.pwa-banner-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    color: var(--bg-darker);
}

.pwa-banner-icon.notif-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.pwa-banner-icon.ios-icon {
    background: linear-gradient(135deg, #007AFF, #0051D5);
    color: white;
}

.pwa-banner-icon.brave-icon {
    background: linear-gradient(135deg, #FB542B, #FF7654);
    color: white;
}

.pwa-banner-extended .pwa-banner-text {
    flex: 1;
}

.pwa-instructions {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 4px;
}

.pwa-instructions strong {
    color: var(--text);
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.pwa-banner-text span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-banner-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-close-banner {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

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

/* Instructions d'installation manuelles */
.install-instructions {
    text-align: left;
}

.install-instructions h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.install-instructions ol {
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.install-instructions li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.install-instructions li svg {
    vertical-align: middle;
    margin: 0 0.25rem;
}

.install-instructions p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Responsive - Mobile nav overlap */
@media (max-width: 768px) {
    .pwa-banner {
        padding-bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4rem));
    }

    .pwa-banner-content {
        padding: 0.75rem;
    }

    .pwa-banner-icon {
        width: 40px;
        height: 40px;
    }

    .pwa-banner-text strong {
        font-size: 0.85rem;
    }

    .pwa-banner-text span {
        font-size: 0.75rem;
    }

    .pwa-banner-actions .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   PWA INSTALL MODAL (pour mobile)
   ============================================ */

.pwa-install-modal {
    z-index: 10000;
}

.pwa-modal-content {
    max-width: 360px;
    text-align: center;
    padding: 2rem 1.5rem;
}

.pwa-modal-icon {
    margin-bottom: 1.5rem;
}

.pwa-modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pwa-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Liste des fonctionnalités */
.pwa-modal-features {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.pwa-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text);
}

.pwa-feature svg {
    flex-shrink: 0;
}

/* Instructions iOS étape par étape */
.pwa-ios-instructions {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.pwa-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text);
}

.pwa-step:last-child {
    margin-bottom: 0;
}

.pwa-step-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--bg-darker);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.pwa-step svg {
    flex-shrink: 0;
    color: var(--primary);
}

/* Actions de la modale */
.pwa-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.btn-text-link:hover {
    color: var(--text);
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: var(--border-color);
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text);
}

.theme-toggle-btn:hover {
    background: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Icône soleil (thème clair) - visible en mode sombre */
.theme-toggle-btn .icon-sun {
    display: block;
}

.theme-toggle-btn .icon-moon {
    display: none;
}

/* Icône lune (thème sombre) - visible en mode clair */
[data-theme="light"] .theme-toggle-btn .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle-btn .icon-moon {
    display: block;
}

/* Ajustements thème clair spécifiques */

/* Toutes les cartes et sections en mode clair */
[data-theme="light"] .dashboard-section,
[data-theme="light"] .bg-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .tutorial-card,
[data-theme="light"] .quick-link-card,
[data-theme="light"] .quick-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .table-container,
[data-theme="light"] .login-box,
[data-theme="light"] .modal-content,
[data-theme="light"] .editor-container,
[data-theme="light"] .notification-item,
[data-theme="light"] .push-status-card,
[data-theme="light"] .account-status-card,
[data-theme="light"] .preference-item,
[data-theme="light"] .monitoring-card,
[data-theme="light"] .admin-tabs {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Navbar en mode clair */
[data-theme="light"] .navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* User dropdown en mode clair */
[data-theme="light"] .user-dropdown {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Boutons secondaires en mode clair */
[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-outline {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Inputs en mode clair */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Paiements mois en mode clair */
[data-theme="light"] .payment-month {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .logo-icon {
    color: #ffffff;
}

[data-theme="light"] .btn-primary {
    color: #ffffff;
}

[data-theme="light"] .btn-primary:hover {
    color: #ffffff;
}

[data-theme="light"] th {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .logo-icon-large {
    color: #ffffff;
}

/* Toast en mode clair */
[data-theme="light"] .toast {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Notification toggle button in navbar */
.notif-toggle-nav {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}

.notif-toggle-nav:hover {
    color: var(--primary);
    background: var(--border-color);
}

.notif-badge-nav {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e53935;
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Theme toggle button in navbar */
.theme-toggle-nav {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-toggle-nav:hover {
    color: var(--primary);
    background: var(--border-color);
}

/* Afficher soleil en mode sombre, lune en mode clair */
.theme-toggle-nav .icon-sun {
    display: block;
}
.theme-toggle-nav .icon-moon {
    display: none;
}
[data-theme="light"] .theme-toggle-nav .icon-sun {
    display: none;
}
[data-theme="light"] .theme-toggle-nav .icon-moon {
    display: block;
}

/* Theme menu item in dropdown */
.theme-menu-item .theme-icon-sun {
    display: inline;
}
.theme-menu-item .theme-icon-moon {
    display: none;
}
[data-theme="light"] .theme-menu-item .theme-icon-sun {
    display: none;
}
[data-theme="light"] .theme-menu-item .theme-icon-moon {
    display: inline;
}

/* Light theme adjustments for cards with borders */
[data-theme="light"] .quick-card,
[data-theme="light"] .notification-item,
[data-theme="light"] .push-status-card,
[data-theme="light"] .account-status-card,
[data-theme="light"] .payment-month {
    border: 1px solid var(--border-color);
}

/* Theme toggle on login page */
.login-theme-btn {
    margin-top: 2rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.login-theme-btn:hover {
    opacity: 1;
}
