/**
 * Styles modernes pour le formulaire de prise de rendez-vous
 * Avec mise en page en colonnes et effets visuels
 */

/* Variables globales */
:root {
    --primary-color: #d9230f;
    --primary-light: #ff6242;
    --primary-dark: #9e0000;
    --secondary-color: #0066cc;
    --text-color: #333333;
    --text-light: #666666;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --gray-dark: #cccccc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
    --transition-speed: 0.3s;
}

/* Conteneur principal */
.directory-rdv-form-container {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 30px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
}

/* ===== EN-TÊTE ===== */
.directory-rdv-header {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: var(--shadow-sm);
}

.header-icon i {
    font-size: 28px;
    color: #fff;
}

.header-text {
    text-align: left;
}

.header-text h2 {
    margin: 0 0 5px;
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 600;
}

.header-text h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-light);
    font-weight: 400;
}

.company-highlight {
    color: var(--secondary-color);
    font-weight: 500;
}

/* ===== MESSAGES DE CONFIRMATION/ERREUR ===== */
.directory-rdv-message {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.directory-rdv-message-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--success-color);
}

.directory-rdv-message-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--error-color);
}

.message-icon {
    margin-right: 15px;
    font-size: 24px;
}

.directory-rdv-message-success .message-icon i {
    color: var(--success-color);
}

.directory-rdv-message-error .message-icon i {
    color: var(--error-color);
}

.message-content {
    flex: 1;
}

/* ===== INTRODUCTION ===== */
.form-introduction {
    display: flex;
    align-items: center;
    background-color: var(--gray-light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.intro-icon {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: var(--shadow-sm);
}

.intro-icon i {
    font-size: 22px;
    color: var(--secondary-color);
}

.intro-text p {
    margin: 0;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.5;
}

/* ===== INDICATEUR DE PROGRESSION ===== */
.form-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px;
    max-width: 600px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f1f1;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 2px solid var(--gray-medium);
    transition: all var(--transition-speed);
}

.progress-step.active .step-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    border-color: var(--primary-color);
}

.step-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.progress-connector {
    flex: 1;
    height: 3px;
    background-color: var(--gray-medium);
    margin: 0 10px;
    position: relative;
    top: -25px;
    z-index: 0;
    max-width: 80px;
}

.progress-step.active + .progress-connector {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
}

/* ===== STRUCTURE EN COLONNES ===== */
.form-columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    gap: 30px;
}

.form-column {
    flex: 1;
    min-width: 300px;
    padding: 25px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.form-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-medium);
}

.form-section-title i {
    font-size: 20px;
    color: var(--primary-color);
    margin-right: 10px;
}

.form-section-title h4 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 500;
}

/* ===== CHAMPS DE FORMULAIRE ===== */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-dark);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--text-color);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    padding-right: 30px;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-light);
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

.date-time-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.date-group, .time-group {
    flex: 1;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper input {
    padding-right: 40px;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Groupe commentaires */
.comments-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Case à cocher personnalisée */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
}

.checkbox-wrapper input[type="checkbox"] {
    margin-top: 5px;
    margin-right: 10px;
}

.checkbox-wrapper label {
    font-weight: normal;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Séparateur */
.form-separator {
    height: 1px;
    background-color: var(--gray-medium);
    margin: 30px 0;
}

/* Section actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 10px;
}

.directory-rdv-cancel {
    background-color: #fff;
    border: 1px solid var(--gray-dark);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    display: flex;
    align-items: center;
}

.directory-rdv-cancel i {
    margin-right: 8px;
}

.directory-rdv-cancel:hover {
    background-color: var(--gray-light);
}

.directory-rdv-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-speed), transform var(--transition-speed);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.directory-rdv-submit i {
    margin-right: 8px;
}

.directory-rdv-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Animation pour les messages */
.animate__animated {
    animation-duration: 1s;
}

.animate__fadeIn {
    animation-name: fadeIn;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Styles responsifs */
@media (max-width: 768px) {
    .form-columns {
        flex-direction: column;
    }
    
    .form-column {
        min-width: 100%;
        margin-bottom: 20px;
    }
    
    .date-time-container {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .form-introduction {
        flex-direction: column;
        text-align: center;
    }
    
    .intro-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .directory-rdv-cancel, 
    .directory-rdv-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Icône de label */
.label-icon-container {
    margin-left: 10px;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.certificate-check-icon {
    position: relative;
    display: inline-block;
}

.certificate-check-icon .fa-certificate {
    color: blue;
    font-size: 18px;
}

.certificate-check-icon .fa-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
}

/* Section formulaire */
.form-section {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.form-intro {
    margin-bottom: 25px;
    color: #666;
}

/* Style des champs de formulaire */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: #d9230f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(217, 35, 15, 0.2);
}

.form-row.submit-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rendez-vous-submit {
    background-color: #d9230f;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.rendez-vous-submit:hover {
    background-color: #c01f0e;
}

.form-spinner {
    display: inline-block;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(217, 35, 15, 0.3);
    border-radius: 50%;
    border-top-color: #d9230f;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Lien de retour */
.back-link {
    margin-top: 25px;
    text-align: center;
}

.back-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    color: #d9230f;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .company-header {
        flex-direction: column;
        text-align: center;
    }
    
    .company-logo {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .company-info h2 {
        justify-content: center;
    }
    
    .form-section {
        padding: 15px;
    }
}
