/* ========================================
   MODAL DE BASE
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #ffffff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: #7a9cba;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #2c5f8d;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c5f8d;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ========================================
   ONGLETS
   ======================================== */

.modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e8f0;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #7a9cba;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: #2c5f8d;
    background: rgba(44, 95, 141, 0.05);
}

.tab-btn.active {
    color: #2c5f8d;
    border-bottom-color: #2c5f8d;
}

/* ========================================
   MODES D'AUTHENTIFICATION
   ======================================== */

.auth-mode {
    display: none;
}

.auth-mode.active {
    display: block;
    animation: fadeInMode 0.3s ease;
}

/* ========================================
   FORMULAIRES
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c5f8d;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #2c5f8d;
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.btn-submit {
    width: 100%;
    background: #2c5f8d;
    border: none;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    background: #1e4a6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 141, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ========================================
   MESSAGES
   ======================================== */

.info-text {
    font-size: 0.95rem;
    color: #5a7fa0;
    background: #f0f7ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #2c5f8d;
    margin-bottom: 1.5rem;
}

.success-text {
    font-size: 0.95rem;
    color: #2d7a4f;
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #2d7a4f;
    margin-bottom: 1.5rem;
}

.error-text {
    font-size: 0.95rem;
    color: #c53030;
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #c53030;
    margin-bottom: 1.5rem;
}

/* ========================================
   LIENS DE NAVIGATION
   ======================================== */

.modal-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-links a {
    color: #2c5f8d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.modal-links a:hover {
    color: #1e4a6b;
    text-decoration: underline;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* ========================================
   PAGE LOGIN - MODAL TOUJOURS VISIBLE
   ======================================== */

.landing-page #authModal {
    display: flex !important;
    position: static;
    background: transparent;
    backdrop-filter: none;
    animation: none;
    padding: 0;
}

.landing-page #authModal .modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8edf2;
    animation: none;
}

.landing-page #authModal .close {
    display: none;
}

.landing-page .login-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.landing-page .login-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5f8d;
    margin-bottom: 0.5rem;
}

.landing-page .login-title p {
    font-size: 1.1rem;
    color: #5a7fa0;
    font-weight: 400;
}
