/**
 * Styles pour l'authentification des réservations
 * Version: 1.0.0
 */

/* Modal d'authentification */
.reservation-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reservation-auth-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.reservation-auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.reservation-auth-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.reservation-auth-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.reservation-auth-close:hover {
    color: #333;
}

/* Onglets */
.reservation-auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.reservation-auth-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.reservation-auth-tab.active {
    background: white;
    color: #007cba;
    border-bottom: 2px solid #007cba;
}

.reservation-auth-tab:hover:not(.active) {
    background: #e9ecef;
}

/* Contenu des formulaires */
.reservation-auth-body {
    padding: 20px;
}

.reservation-auth-form {
    display: none;
}

.reservation-auth-form.active {
    display: block;
}

/* Styles des formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.cgv-label {
    font-size: 14px;
    line-height: 1.4;
}

.cgv-link {
    color: #007cba;
    text-decoration: underline;
    font-weight: 500;
}

.cgv-link:hover {
    color: #005a87;
    text-decoration: none;
}

.reservation-auth-btn {
    width: 100%;
    padding: 12px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reservation-auth-btn:hover {
    background: #005a87;
}

.reservation-auth-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.forgot-password {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Messages */
.reservation-auth-messages {
    margin-top: 15px;
}

.reservation-auth-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

.reservation-auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.reservation-auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .reservation-auth-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .reservation-auth-header {
        padding: 15px;
    }
    
    .reservation-auth-body {
        padding: 15px;
    }
}

/* État modal ouvert */
body.modal-open {
    overflow: hidden;
}

/* Styles pour les éléments d'authentification */
.auth-required {
    display: none;
}

.user-info {
    display: none;
}

.auth-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 0;
}

.auth-button:hover {
    background: #218838;
}

/* Animation d'apparition */
.reservation-auth-modal {
    animation: fadeIn 0.3s ease;
}

.reservation-auth-content {
    animation: slideIn 0.3s ease;
}

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

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