/**
 * Thème Lavande pour Ina1000
 * Remplace les couleurs bleu marine par des nuances de lavande
 */

/* Override des boutons login/signup */
.login-prompt-btn.primary,
.btn-primary,
.cta-button,
button[type="submit"],
a.primary {
    background: linear-gradient(135deg, #a578e8 0%, #9561e2 100%) !important;
    color: white !important;
}

.login-prompt-btn.primary:hover,
.btn-primary:hover,
.cta-button:hover,
button[type="submit"]:hover,
a.primary:hover {
    background: linear-gradient(135deg, #b794f6 0%, #a578e8 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(165, 120, 232, 0.3) !important;
}

/* Liens de formulaire */
.form-link,
.forgot-password,
.signup-link,
.login-link,
a[href*="forgot"],
a[href*="signup"],
a[href*="login"] {
    color: #9561e2 !important;
}

.form-link:hover,
.forgot-password:hover,
.signup-link:hover,
.login-link:hover,
a[href*="forgot"]:hover,
a[href*="signup"]:hover,
a[href*="login"]:hover {
    color: #a578e8 !important;
    text-decoration: underline;
}

/* Inputs focus */
input:focus,
textarea:focus,
select:focus {
    border-color: #a578e8 !important;
    box-shadow: 0 0 0 3px rgba(165, 120, 232, 0.1) !important;
}

/* Checkboxes et radios */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #9561e2 !important;
    border-color: #9561e2 !important;
}

/* Messages d'erreur/success */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.success-message {
    background: rgba(165, 120, 232, 0.1);
    border-color: #a578e8;
    color: #7c3aed;
}

/* Bouton d'installation PWA */
#pwa-install-button {
    background: linear-gradient(135deg, #a578e8 0%, #9561e2 100%) !important;
}

#pwa-install-button:hover {
    background: linear-gradient(135deg, #b794f6 0%, #a578e8 100%) !important;
    box-shadow: 0 6px 30px rgba(165, 120, 232, 0.6) !important;
}

/* Sidebar active items */
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(165, 120, 232, 0.08) !important;
    border-left-color: #a578e8 !important;
}

/* Loading spinners */
.spinner,
.loading {
    border-color: rgba(165, 120, 232, 0.2) !important;
    border-top-color: #9561e2 !important;
}

/* ===== SIDEBAR STYLES ===== */
/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
    padding: 2rem 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.visible {
    transform: translateX(0);
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem 0 1.5rem;
    margin-top: 1rem;
}

.sidebar-logo h2 {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin: 0 0 0.5rem 0;
}

.sidebar-logo p {
    font-size: 0.8rem;
    opacity: 0.8;
    font-style: italic;
    margin: 0;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.3rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 0.9rem;
}

.sidebar-nav a .nav-emoji {
    margin-right: 12px;
    font-size: 1.1rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(129, 140, 248, 0.08);
    border-left: 4px solid #a5b4fc;
    color: #f9fafb;
    transform: translateX(5px);
}

/* Login-required items styling */
.sidebar-nav a.login-required {
    position: relative;
    opacity: 0.7;
}

.sidebar-nav a.login-required::after {
    content: '🔒';
    position: absolute;
    right: 1rem;
    opacity: 0.6;
    font-size: 0.8rem;
}

.sidebar-nav a.login-required:hover {
    background: rgba(251, 191, 36, 0.08);
    border-left: 4px solid #fbbf24;
    cursor: pointer;
}

/* Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #374151;
    color: #f9fafb;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: #4b5563;
    transform: scale(1.1);
}

.sidebar-toggle.active {
    left: 300px;
}

/* Hamburger Icon */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

/* Active state hamburger animation */
.sidebar-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.sidebar-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }

    .sidebar-toggle.active {
        left: 20px;
    }
}