/* ==========================================================================
   Appointment Form Component
   ========================================================================== */

.appointment-form {
    width: 100%;
    margin: 0 auto;
    padding: 16px 0;
}

/* Header
   ========================================================================== */
.appointment-form__header {
    margin-bottom: 32px;
    text-align: center;
}

.appointment-form__title {
    font-size: 32px;
    font-weight: 700;
    color: #061AAF;
    margin-bottom: 8px;
}

.appointment-form__subtitle {
    font-size: 16px;
    color: #666;
}

/* Progress Steps
   ========================================================================== */
.appointment-form__progress {
    margin-bottom: 16px;
}

.appointment-form__progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

.appointment-form__progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.appointment-form__progress-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E8EBFF;
    color: #061AAF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.appointment-form__progress-step.active .appointment-form__progress-number,
.appointment-form__progress-step.completed .appointment-form__progress-number {
    background: #061AAF;
    color: white;
}

.appointment-form__progress-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.appointment-form__progress-step.active .appointment-form__progress-label,
.appointment-form__progress-step.completed .appointment-form__progress-label {
    color: #061AAF;
}

.appointment-form__progress-bar {
    height: 4px;
    background: #E8EBFF;
    border-radius: 2px;
    overflow: hidden;
}

.appointment-form__progress-bar-fill {
    height: 100%;
    background: #061AAF;
    width: 25%;
    transition: width 0.3s ease;
}

/* Form Container
   ========================================================================== */
.appointment-form__container {
    border-radius: 16px;
}

/* Form Steps (Sections)
   ========================================================================== */
.appointment-form .form-step {
    display: none;
}

.appointment-form .form-step.active {
    display: block;
}

.appointment-form .form-step__title {
    font-size: 20px;
    font-weight: 600;
    color: #1C45F5;
    margin-bottom: 16px;
    font-family: "EightiesComeback-Bold";
}

.appointment-form .form-step__description {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.appointment-form .form-step__title--success {
    color: #4CAF50;
}

/* Form Sections
   ========================================================================== */

.appointment-form .form-section--bordered {
    padding-top: 16px;
    border-top: 1px solid #E8EBFF;
}

.appointment-form .form-section__title {
    color: #061AAF;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
}

.appointment-form .form-section__title--warning {
    color: #EA4335;
}

/* Confirmation Step
   ========================================================================== */
.appointment-form .form-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.appointment-form .form-confirmation__icon {
    width: 80px;
    height: 80px;
    background: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.appointment-form .form-confirmation__message {
    max-width: 500px;
    margin: 16px auto;
}

.appointment-form .form-confirmation__note {
    color: #666;
    font-size: 14px;
    margin-top: 24px;
}

.appointment-form .form-confirmation--analysis {
    background: #FFF8E1;
    border-radius: 12px;
    padding: 40px 20px;
}

.appointment-form .form-confirmation__icon--warning {
    background: #FFF3E0;
}

.appointment-form .form-step__title--warning {
    color: #FF9800;
}

/* Form Warning Message
   ========================================================================== */
.appointment-form .form-section--warning {
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 8px;
    padding: 16px;
}

.appointment-form .form-warning {
    color: #E65100;
    font-size: 14px;
    margin: 0;
}

/* File Upload
   ========================================================================== */
.appointment-form .wpcf7-file {
    width: 100%;
    padding: 16px 20px;
    border: 2px dashed #D1DAFF;
    border-radius: 8px;
    background: #F5F7FF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.appointment-form .wpcf7-file:hover {
    border-color: #061AAF;
    background: #E8EBFF;
}

.appointment-form .form-field__hint {
    font-size: 12px;
    color: #666;
    margin: 4px 0 8px 0;
}

/* Form Grid Layout
   ========================================================================== */
.appointment-form .form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.appointment-form .form-grid--2cols {
    grid-template-columns: repeat(2, 1fr);
}

.appointment-form .form-grid--1col {
    grid-template-columns: 1fr;
}

.appointment-form .form-field {
    display: flex;
    flex-direction: column;
}

.info_complementaires .form-field {
    margin-bottom: 16px;
}

.appointment-form .form-field--full {
    grid-column: 1 / -1;
}

.appointment-form .form-field--2cols {
    grid-column: span 2;
}

/* Form Inputs
   ========================================================================== */
.appointment-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.appointment-form input[type="text"],
.appointment-form input[type="email"],
.appointment-form input[type="tel"],
.appointment-form input[type="date"],
.appointment-form input[type="number"],
.appointment-form select,
.appointment-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #D1DAFF;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #212121;
    background: white;
    transition: all 0.2s ease;
}

.appointment-form input::placeholder,
.appointment-form textarea::placeholder {
    color: #999;
}

.appointment-form input:focus,
.appointment-form select:focus,
.appointment-form textarea:focus {
    outline: none;
    border-color: #061AAF;
    box-shadow: 0 0 0 3px rgba(6, 26, 175, 0.1);
}

.appointment-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 32px;
    cursor: pointer;
}

.appointment-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Labels with asterisk
   ========================================================================== */
.appointment-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.appointment-form .required-asterisk {
    color: #EA4335;
}

/* Required field with floating label */
.appointment-form .form-field--required {
    position: relative;
}

.appointment-form .floating-label {
    position: absolute;
    left: 20px;
    top: 16px; /* Match input padding-top */
    color: #999;
    font-size: 16px;
    line-height: 1.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.appointment-form .floating-label .required-asterisk {
    color: #EA4335;
    margin-left: 1px;
}

.appointment-form .floating-label.hidden {
    opacity: 0;
    visibility: hidden;
}

.appointment-form .floating-label.focused {
    opacity: 0.6;
}

/* Date input - hide native placeholder text until focused/has value */
.appointment-form input[type="date"].date-has-floating-label {
    color: transparent;
}

.appointment-form input[type="date"].date-has-floating-label::-webkit-datetime-edit {
    color: transparent;
}

.appointment-form input[type="date"].date-has-floating-label.is-focused,
.appointment-form input[type="date"].date-has-floating-label.has-value {
    color: #212121;
}

.appointment-form input[type="date"].date-has-floating-label.is-focused::-webkit-datetime-edit,
.appointment-form input[type="date"].date-has-floating-label.has-value::-webkit-datetime-edit {
    color: #212121;
}

/* Select placeholder styling */
.appointment-form .form-field--required select {
    color: #999;
}

.appointment-form .form-field--required select.has-value {
    color: #212121;
}

.appointment-form .form-field--required select option {
    color: #212121;
}

/* Radio & Checkbox Groups
   ========================================================================== */
.appointment-form .wpcf7-radio,
.appointment-form .wpcf7-checkbox {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
}

.flex-row-checkbox {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.flex-row-checkbox span {
    width: inherit !important;
}

.appointment-form .wpcf7-radio.horizontal,
.appointment-form .wpcf7-checkbox.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.appointment-form .wpcf7-list-item {
    margin: 0 !important;
    display: flex;
    align-items: center;
}

.appointment-form .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.appointment-form .wpcf7-list-item label:hover {
    border-color: #061AAF;
    background: #F5F7FF;
}

.appointment-form .wpcf7-list-item input[type="radio"],
.appointment-form .wpcf7-list-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #061AAF;
    margin: 0 16px 0 0;
}

/* Card-style radio options
   ========================================================================== */
.appointment-form .radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.appointment-form .radio-cards .wpcf7-list-item label {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    min-height: 80px;
}

.appointment-form .radio-cards .wpcf7-list-item input:checked + span {
    color: #061AAF;
    font-weight: 600;
}

.appointment-form .radio-cards .wpcf7-list-item:has(input:checked) label {
    border-color: #061AAF;
    background: #F5F7FF;
    box-shadow: 0 0 0 2px rgba(6, 26, 175, 0.2);
}

/* Conditional Groups
   ========================================================================== */

/* Navigation Buttons
   ========================================================================== */
.appointment-form .form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #E8EBFF;
}

.appointment-form .btn-prev,
.appointment-form .btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.appointment-form .btn-prev {
    background: #F5F5F5;
    color: #666;
}

.appointment-form .btn-prev:hover {
    background: #E0E0E0;
}

.appointment-form .btn-next {
    background: #061AAF;
    color: white;
}

.appointment-form .btn-next:hover {
    background: #0A2ED6;
}

.appointment-form .btn-prev:disabled,
.appointment-form .btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Submit Button
   ========================================================================== */
.appointment-form input[type="submit"],
.appointment-form .wpcf7-submit {
    width: 100%;
    padding: 16px 32px;
    background: #EA4335;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.appointment-form input[type="submit"]:hover,
.appointment-form .wpcf7-submit:hover {
    background: #D33426;
}

/* Validation States
   ========================================================================== */
.appointment-form .wpcf7-not-valid {
    border-color: #EA4335 !important;
}

.appointment-form .wpcf7-not-valid-tip {
    color: #EA4335;
    font-size: 16px;
    margin-top: 4px;
}

.appointment-form .wpcf7-response-output {
    margin: 16px 0 0 0;
    padding: 16px;
    border-radius: 8px;
}

.appointment-form .wpcf7-mail-sent-ok {
    background: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.appointment-form .wpcf7-validation-errors,
.appointment-form .wpcf7-mail-sent-ng {
    background: #FFEBEE;
    border-color: #EA4335;
    color: #C62828;
}

/* Loading State
   ========================================================================== */
.appointment-form .wpcf7-spinner {
    margin: 0 auto;
    display: block;
}

.appointment-form.loading .appointment-form__container {
    opacity: 0.6;
    pointer-events: none;
}

/* Error Message
   ========================================================================== */
.appointment-form__error {
    text-align: center;
    color: #EA4335;
    padding: 32px;
}

/* Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .appointment-form .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .appointment-form .form-field--2cols {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .appointment-form__container {
        padding: 16px 16px;
    }

    .appointment-form .form-grid {
        grid-template-columns: 1fr;
    }

    .appointment-form .form-field--2cols,
    .appointment-form .form-field--full {
        grid-column: span 1;
    }

    .appointment-form__progress-label {
        display: none;
    }

    .appointment-form__progress-steps {
        justify-content: center;
        gap: 32px;
    }

    .appointment-form .form-navigation {
        flex-direction: column;
        gap: 16px;
    }

    .appointment-form .btn-prev,
    .appointment-form .btn-next {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .appointment-form__title {
        font-size: 16px;
    }

    .appointment-form .form-step__title {
        font-size: 20px;
    }
}
