/* ============================================
   AUTH.CSS - Styles d'authentification G2T Corp
   Modals modernes, inspirés de Booking.com
   ============================================ */

/* ---------- MODAL GLOBAL ---------- */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: authModalFadeIn 0.3s ease;
}

@keyframes authModalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-modal.active {
    display: block;
}

/* ---------- CONTENU DU MODAL ---------- */
.auth-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 40px 36px;
    width: 92%;
    max-width: 440px;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: authModalSlideUp 0.35s ease;
}

@keyframes authModalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---------- BOUTON FERMER ---------- */
.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    line-height: 1;
}

.auth-modal-close:hover {
    color: #0f172a;
}

/* ---------- LOGO / TITRE ---------- */
.auth-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-modal-header .logo-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
}

.auth-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #003580;
    margin: 0;
}

.auth-modal-header p {
    color: #64748b;
    font-size: 14px;
    margin-top: 6px;
}

/* ---------- FORMULAIRES ---------- */
.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 4px;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #0f172a;
}

.auth-form input:focus {
    border-color: #003580;
    box-shadow: 0 0 0 4px rgba(0, 53, 128, 0.1);
    outline: none;
    background: #ffffff;
}

.auth-form input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.auth-form .input-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.auth-form .error-message {
    font-size: 13px;
    color: #e74c3c;
    margin-top: 4px;
    display: none;
}

.auth-form .error-message.visible {
    display: block;
}

/* ---------- BOUTONS ---------- */
.auth-btn-primary {
    width: 100%;
    padding: 14px;
    background: #003580;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.auth-btn-primary:hover {
    background: #0057b8;
}

.auth-btn-primary:active {
    transform: scale(0.98);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---------- SÉPARATEUR ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 18px;
    color: #94a3b8;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider::before { margin-right: 16px; }
.auth-divider::after { margin-left: 16px; }

/* ---------- BOUTONS SOCIAUX ---------- */
.auth-social-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #0f172a;
}

.auth-social-btn:hover {
    border-color: #003580;
    background: #f8fafc;
}

.auth-social-btn.google svg {
    width: 20px;
    height: 20px;
}

/* ---------- LIENS ---------- */
.auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #64748b;
}

.auth-links a {
    color: #003580;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ---------- 2FA ---------- */
.auth-2fa-code {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 16px 0;
}

.auth-2fa-code input {
    width: 52px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.auth-2fa-code input:focus {
    border-color: #003580;
    box-shadow: 0 0 0 4px rgba(0, 53, 128, 0.1);
    outline: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 28px 20px;
        margin: 10% auto;
    }
    .auth-modal-header h2 {
        font-size: 20px;
    }
    .auth-2fa-code input {
        width: 44px;
        height: 48px;
        font-size: 20px;
    }
}

/* ---------- SECTION MES RÉSERVATIONS ---------- */
.bookings-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.booking-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.booking-card .booking-info {
    flex: 1;
}

.booking-card .booking-info h4 {
    margin: 0 0 4px 0;
    color: #0f172a;
}

.booking-card .booking-info p {
    margin: 2px 0;
    color: #64748b;
    font-size: 14px;
}

.booking-card .booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.booking-status.confirmed {
    background: #d1fae5;
    color: #065f46;
}

.booking-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.booking-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #c0392b;
}

.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Section Mes réservations */
.bookings-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}
.booking-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.booking-card .booking-info {
    flex: 1;
}
.booking-card .booking-info h4 {
    margin: 0 0 4px 0;
    color: #0f172a;
}
.booking-card .booking-info p {
    margin: 2px 0;
    color: #64748b;
    font-size: 14px;
}
.booking-card .booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.booking-status.confirmed {
    background: #d1fae5;
    color: #065f46;
}
.booking-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}
.booking-status.pending {
    background: #fef3c7;
    color: #92400e;
}
.btn-cancel {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-cancel:hover {
    background: #c0392b;
}
.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   BOUTONS CONNEXION / INSCRIPTION
   Animations uniformes + responsive
   ============================================ */

/* ============================================
   BOUTON INSCRIPTION (SECONDARY)
   ============================================ */

.btn.primary,
.btn.secondary {
    background: linear-gradient(135deg, #003580 0%, #482a8ee3 100%);
    color: #fff;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #211bb9 0%, #6537d0db 100%);
}

.btn.secondary:hover {
    background: linear-gradient(135deg, #211bb9 0%, #6537d0db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 53, 128, 0.3);
}

/* ============================================
   ANIMATION COMMUNE POUR LES DEUX BOUTONS
   (Connexion et Inscription)
   ============================================ */

.btn.primary:hover,
.btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1127px) {
    .btn.primary,
    .btn.secondary {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .btn.primary,
    .btn.secondary {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
    }
}

@media (max-width: 320px) {
    .btn.primary,
    .btn.secondary {
        padding: 4px 8px;
        font-size: 10px;
        min-height: 24px;
        border-radius: 4px;
    }
}

/* ===== ADAPTATION RESPONSIVE POUR TRÈS PETITS ÉCRANS ===== */
@media (max-width: 320px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        padding: 0 4px;
    }
    .logo {
        font-size: 14px;
    }
    .logo img {
        width: 28px;
        height: 28px;
    }
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
    }
    .user-info .user-name {
        font-size: 9px;
        white-space: nowrap;
    }
    .user-info .btn.small {
        font-size: 8px;
        padding: 2px 6px;
        min-height: 20px;
        line-height: 1.2;
    }
    .premium-badge {
        font-size: 7px;
        padding: 1px 3px;
    }
    .quota-info {
        font-size: 7px;
        padding: 1px 3px;
    }
    #auth-logout-btn,
    #auth-login-btn,
    #auth-register-btn {
        font-size: 8px !important;
        padding: 2px 6px !important;
        min-height: 20px !important;
    }
}

/* ===== ADAPTATION POUR TRÈS PETITS ÉCRANS (MOINS DE 285PX) ===== */
@media (max-width: 320px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 8px;
        justify-content: center;
    }
    .logo {
        font-size: 16px;
    }
    .logo img {
        width: 32px;
        height: 32px;
    }
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    .user-info .user-name {
        font-size: 10px;
        white-space: nowrap;
    }
    .user-info .btn.small {
        font-size: 9px;
        padding: 2px 8px;
        min-height: 24px;
        line-height: 1.2;
    }
    .premium-badge {
        font-size: 8px;
        padding: 1px 4px;
        white-space: nowrap;
    }
    .quota-info {
        font-size: 8px;
        padding: 1px 4px;
        white-space: nowrap;
    }
    .header-ctas {
        gap: 4px;
    }
}

#auth-logout-btn {
    background: #e74c3c;
    border: none;
    transition: all 0.25s ease;
    
    padding-top: 4px;
    padding-left: 10px;
    padding-bottom: 4px;
    padding-right: 10px;

}
#auth-logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}