/* ==========================================================================
   VARIABLES & UTILITAIRES
   ========================================================================== */

:root {
    --cloe-primary: #ff6d00;
    --cloe-primary-dark: #f66a01;
    --cloe-secondary: #021657;
    --cloe-text: #333;
    --cloe-text-light: #7f8c8d;
    --cloe-border: #e0e0e0;
    --cloe-bg-light: #f8f9fa;
    --cloe-white: #fff;
    --cloe-error-bg: #fff3e0;
    --cloe-success: #28a745;
    --cloe-radius: 8px;
    --cloe-radius-lg: 12px;
    --cloe-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --cloe-shadow-hover: 0 6px 20px rgba(255, 109, 0, 0.6);
    --cloe-transition: all 0.3s ease;
}

/* ==========================================================================
   LAYOUT GÉNÉRAL
   ========================================================================== */

.altitude-cloe-page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: slideInUp 0.5s ease-out;
}

/* ==========================================================================
   EN-TÊTE DE PAGE
   ========================================================================== */

.altitude-cloe-page-header {
    text-align: center;
    margin-bottom: 50px;
}

.altitude-cloe-page-header h1 {
    font-size: 32px;
    color: var(--cloe-secondary);
    margin-bottom: 10px;
    font-weight: 700;
}

.altitude-cloe-page-header .subtitle {
    font-size: 18px;
    color: var(--cloe-text-light);
    margin-bottom: 20px;
}

.price-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--cloe-primary) 0%, var(--cloe-primary-dark) 100%);
    color: var(--cloe-white);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 109, 0, 0.4);
}

.price-badge .price-amount {
    font-size: 36px;
    font-weight: 700;
    margin-right: 5px;
}

.price-badge .price-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ==========================================================================
   MESSAGES & ALERTES
   ========================================================================== */

.altitude-cloe-message {
    padding: 15px 20px;
    border-radius: var(--cloe-radius);
    margin-bottom: 30px;
}

.altitude-cloe-error {
    background-color: var(--cloe-error-bg);
    border-left: 4px solid var(--cloe-primary);
    color: var(--cloe-secondary);
}

.altitude-cloe-message p,
.altitude-cloe-message ul {
    margin: 0;
}

.altitude-cloe-message ul {
    padding-left: 20px;
}

/* ==========================================================================
   FORMULAIRE
   ========================================================================== */

.altitude-cloe-frontend-form {
    background: var(--cloe-white);
    border-radius: var(--cloe-radius-lg);
    box-shadow: var(--cloe-shadow);
}

/* Sections du formulaire */
.altitude-cloe-form-section {
    padding: 30px;
    border-bottom: 1px solid #ecf0f1;
    animation: slideInUp 0.5s ease-out backwards;
}

.altitude-cloe-form-section:last-of-type {
    border-bottom: none;
}

.altitude-cloe-form-section:nth-child(1) { animation-delay: 0.1s; }
.altitude-cloe-form-section:nth-child(2) { animation-delay: 0.2s; }
.altitude-cloe-form-section:nth-child(3) { animation-delay: 0.3s; }
.altitude-cloe-form-section:nth-child(4) { animation-delay: 0.4s; }
.altitude-cloe-form-section:nth-child(5) { animation-delay: 0.5s; }

.altitude-cloe-form-section h3 {
    font-size: 20px;
    color: var(--cloe-secondary);
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--cloe-primary) 0%, var(--cloe-primary-dark) 100%);
    color: var(--cloe-white);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Lignes et groupes de formulaire */
.form-row {
    margin-bottom: 20px;
}

.form-row-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row-half {
    flex: 1;
    min-width: 0;
}

.form-row-group .form-row {
    margin-bottom: 0;
}

/* Labels */
.form-row label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--cloe-secondary);
    margin-bottom: 8px;
    cursor: pointer;
}

.form-row small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--cloe-text-light);
    line-height: 1.4;
    font-style: italic;
}

/* ==========================================================================
   CHAMPS DE FORMULAIRE
   ========================================================================== */

/* Base commune pour tous les champs */
.altitude-cloe-input,
.altitude-cloe-select,
.altitude-cloe-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--cloe-border);
    border-radius: var(--cloe-radius) !important;
    transition: var(--cloe-transition);
    font-family: inherit;
    box-sizing: border-box;
    background: var(--cloe-white);
}

/* Focus states */
.altitude-cloe-input:focus,
.altitude-cloe-select:focus,
.altitude-cloe-textarea:focus {
    outline: none;
    border-color: var(--cloe-primary);
    box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.1);
    animation: inputFocus 0.3s ease-out;
}

/* Placeholders */
.altitude-cloe-input::placeholder,
.altitude-cloe-textarea::placeholder {
    color: #999;
    opacity: 1;
}

/* Select */
.altitude-cloe-select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ff6d00" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
    appearance: none;
    padding-right: 45px;
}
.altitude-cloe-select option {
    width: 100%;
}

/* Textarea */
.altitude-cloe-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Icônes pour email et téléphone */
.altitude-cloe-input[type="email"] {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23999" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.altitude-cloe-input[type="tel"] {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23999" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

/* Icônes en focus */
.altitude-cloe-input[type="email"]:focus {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ff6d00" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>');
}

.altitude-cloe-input[type="tel"]:focus {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ff6d00" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></svg>');
}

/* Datepicker readonly */
.altitude-cloe-datepicker[readonly] {
    background-color: var(--cloe-white) !important;
    cursor: pointer;
}

/* ==========================================================================
   BOUTON DE SOUMISSION
   ========================================================================== */

.altitude-cloe-form-actions {
    padding: 30px;
    text-align: center;
    background: var(--cloe-bg-light);
    border-radius: 0 0 var(--cloe-radius-lg) var(--cloe-radius-lg);
}

.altitude-cloe-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 320px;
    padding: 18px 35px;
    font-size: 16px;
    font-weight: 600;
    color: var(--cloe-white);
    background: linear-gradient(135deg, var(--cloe-primary) 0%, var(--cloe-primary-dark) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--cloe-transition);
    box-shadow: 0 4px 15px rgba(255, 109, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.altitude-cloe-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--cloe-shadow-hover);
    background: linear-gradient(135deg, var(--cloe-primary-dark) 0%, var(--cloe-primary) 100%);
}

.altitude-cloe-submit-btn:active {
    transform: translateY(0);
}

.altitude-cloe-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.altitude-cloe-submit-btn .btn-text {
    flex: 1;
    text-align: left;
}

.altitude-cloe-submit-btn .btn-price {
    font-size: 20px;
    font-weight: 700;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.form-notice {
    margin-top: 15px;
    font-size: 13px;
    color: var(--cloe-text-light);
}

/* ==========================================================================
   FLATPICKR - CALENDRIER
   ========================================================================== */

.altitude-cloe-flatpickr {
    border-radius: var(--cloe-radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: none;
    font-family: inherit;
}

/* Header du calendrier */
.altitude-cloe-flatpickr .flatpickr-months {
    background: linear-gradient(135deg, var(--cloe-secondary) 0%, var(--cloe-secondary) 100%);
    border-radius: var(--cloe-radius-lg) var(--cloe-radius-lg) 0 0;
    padding: 15px 10px;
}

.altitude-cloe-flatpickr .flatpickr-month,
.altitude-cloe-flatpickr .flatpickr-current-month {
    color: var(--cloe-white);
}

/* Dropdown des mois */
.altitude-cloe-flatpickr .flatpickr-current-month .flatpickr-monthDropdown-months {
    background: rgba(255, 255, 255, 0.2);
    color: var(--cloe-white);
    border: none;
    border-radius: 4px;
    padding: 0 10px;
    margin-right: 10px;
    font-weight: 600;
}

.altitude-cloe-flatpickr .flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: rgba(255, 255, 255, 0.3);
}

.altitude-cloe-flatpickr .flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: var(--cloe-white);
    color: var(--cloe-secondary);
}

/* Input année */
.altitude-cloe-flatpickr .flatpickr-current-month .numInputWrapper {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 1x 3px;
}

.altitude-cloe-flatpickr .flatpickr-current-month .numInputWrapper input {
    color: var(--cloe-white);
    font-weight: 600;
}

/* Jours de la semaine */
.altitude-cloe-flatpickr .flatpickr-weekday {
    color: var(--cloe-secondary);
    font-weight: 600;
    font-size: 13px;
}

/* Jours */
.altitude-cloe-flatpickr .flatpickr-day {
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.altitude-cloe-flatpickr .flatpickr-day:hover:not(.flatpickr-disabled) {
    background: var(--cloe-primary);
    border-color: var(--cloe-primary);
    color: var(--cloe-white);
    cursor: pointer;
}

.altitude-cloe-flatpickr .flatpickr-day.selected,
.altitude-cloe-flatpickr .flatpickr-day.startRange,
.altitude-cloe-flatpickr .flatpickr-day.endRange {
    background: var(--cloe-primary);
    border-color: var(--cloe-primary);
    color: var(--cloe-white);
    font-weight: 600;
}

.altitude-cloe-flatpickr .flatpickr-day.today {
    border-color: var(--cloe-primary);
    color: var(--cloe-primary);
    font-weight: 600;
}

.altitude-cloe-flatpickr .flatpickr-day.today:hover {
    background: var(--cloe-primary);
    color: var(--cloe-white);
}

/* Flèches navigation */
.altitude-cloe-flatpickr .flatpickr-months .flatpickr-prev-month svg,
.altitude-cloe-flatpickr .flatpickr-months .flatpickr-next-month svg {
    fill: var(--cloe-white);
    width: 20px;
    height: 20px;
}

.altitude-cloe-flatpickr .flatpickr-months .flatpickr-prev-month:hover svg,
.altitude-cloe-flatpickr .flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--cloe-primary);
}

/* Animation d'ouverture du calendrier */
.flatpickr-calendar.open {
    animation: flatpickrFadeIn 0.3s ease-out;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media screen and (max-width: 768px) {
    .altitude-cloe-page-wrapper {
        padding: 20px 15px;
    }

    .altitude-cloe-page-header h1 {
        font-size: 26px;
    }

    .altitude-cloe-page-header .subtitle {
        font-size: 16px;
    }

    .price-badge {
        padding: 12px 25px;
    }

    .price-badge .price-amount {
        font-size: 28px;
    }

    .altitude-cloe-form-section {
        padding: 20px;
    }

    .altitude-cloe-form-section h3 {
        font-size: 18px;
    }

    .form-row-group {
        flex-direction: column;
        gap: 0;
    }

    .form-row-half {
        width: 100%;
        margin-bottom: 20px;
    }

    .form-row-group .form-row:last-child {
        margin-bottom: 0;
    }

    .altitude-cloe-submit-btn {
        min-width: 100%;
        padding: 15px 25px;
        flex-direction: column;
        gap: 10px;
    }

    .altitude-cloe-submit-btn .btn-price {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-left: 0;
        padding-top: 10px;
    }

    .altitude-cloe-form-actions {
        padding: 20px;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flatpickrFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 109, 0, 0.1);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Spinner de chargement */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--cloe-white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* ==========================================================================
   ÉTATS & UTILITAIRES
   ========================================================================== */

/* État désactivé */
.altitude-cloe-input:disabled,
.altitude-cloe-select:disabled,
.altitude-cloe-textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}