/* ============================================
   WRAPPER & INTRO
   ============================================ */

.wcl-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.wcl-intro {
    text-align: center;
    margin-bottom: 22px;
}

.wcl-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.wcl-subtitle {
    margin: 0 auto;
    max-width: 620px;
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

/* ============================================
   CARTE DU FORMULAIRE
   ============================================ */

.wcl-form {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
}

.wcl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.wcl-field label {
    display: block;
    margin: 0 0 7px;
    font-weight: 600;
    font-size: 15px;
}

.wcl-ast,
.wcl-required {
    color: #c62828;
}

/* Styles d'inputs uniformes pour TOUS les types de champs,
   y compris ceux de la section cours d'essai (number,
   datetime-local, select). */
.wcl-field input[type="text"],
.wcl-field input[type="email"],
.wcl-field input[type="tel"],
.wcl-field input[type="number"],
.wcl-field input[type="datetime-local"],
.wcl-field select,
.wcl-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    color: #222;
    font-size: 16px;
    line-height: 1.4;
    font-family: inherit;
}

.wcl-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.wcl-field textarea {
    resize: vertical;
}

.wcl-field input:focus,
.wcl-field select:focus,
.wcl-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, .12);
}

.wcl-message {
    margin-top: 20px;
}

.wcl-consent {
    margin-top: 20px;
}

.wcl-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
}

.wcl-consent input {
    margin-top: 4px;
    flex: 0 0 auto;
    accent-color: #2271b1;
}

/* ============================================
   TYPE DE DEMANDE (RADIOS EN CARTES)
   ============================================ */

.wcl-request-type {
    margin: 20px 0 0;
    padding: 0;
    border: 0;
}

.wcl-request-type legend {
    padding: 0;
    margin: 0 0 7px;
    font-weight: 600;
    font-size: 15px;
}

.wcl-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wcl-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    padding: 13px 14px;
    background: #fff;
    cursor: pointer;
    font-weight: 400;
    font-size: 15px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.wcl-choice:hover {
    border-color: #2271b1;
}

.wcl-choice input {
    margin: 0;
    flex: 0 0 auto;
    accent-color: #2271b1;
}

.wcl-choice:has(input:checked) {
    border-color: #2271b1;
    background: rgba(34, 113, 177, .06);
    box-shadow: 0 0 0 1px #2271b1 inset;
}

/* ============================================
   SECTION CONDITIONNELLE COURS D'ESSAI
   ============================================ */

.wcl-trial-section {
    display: none;
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    background: #fafafa;
}

.wcl-trial-section.active {
    display: block;
}

.wcl-trial-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.wcl-trial-title-secondary {
    margin-top: 24px;
}

.wcl-trial-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: #777;
}

.wcl-trial-section .wcl-grid {
    gap: 16px;
}

/* ============================================
   GALERIE DES PLANNINGS
   ============================================ */

.wcl-plannings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.wcl-planning-item {
    margin: 0;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.wcl-planning-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.wcl-planning-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.wcl-planning-item figcaption {
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

/* Vignette masquée quand l'image est introuvable (géré en JS). */
.wcl-planning-item.wcl-no-image {
    display: none;
}

/* ============================================
   MODALE D'APERÇU DES PLANNINGS
   ============================================ */

.wcl-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .9);
    padding: 48px 24px 24px;
}

.wcl-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcl-modal-content {
    max-width: min(1000px, 100%);
}

.wcl-modal-content img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
}

.wcl-modal-close {
    position: absolute;
    top: 10px;
    right: 18px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
}

.wcl-modal-close:hover {
    color: #ddd;
}

/* ============================================
   BOUTON, SPINNER, ALERTES, DIVERS
   ============================================ */

.wcl-submit {
    margin-top: 22px;
    border: 0;
    border-radius: 8px;
    padding: 13px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    background: #2271b1;
    color: #fff;
    min-width: 190px;
}

.wcl-submit:hover {
    opacity: .92;
}

.wcl-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.wcl-spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    vertical-align: -3px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcl-spin .7s linear infinite;
}

.wcl-form.is-loading .wcl-spinner {
    display: inline-block;
}

.wcl-form.is-loading .wcl-submit-text {
    opacity: .8;
}

.wcl-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wcl-success {
    background: #e9f7ef;
    border: 1px solid #b9e6c9;
    color: #176b36;
}

.wcl-error {
    background: #fff0f0;
    border: 1px solid #f0b7b7;
    color: #9a2020;
}

.wcl-required {
    margin: 12px 0 0;
    font-size: 13px;
}

.wcl-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@keyframes wcl-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .wcl-form {
        padding: 20px;
    }

    .wcl-grid,
    .wcl-trial-section .wcl-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wcl-choices,
    .wcl-plannings-grid {
        grid-template-columns: 1fr;
    }

    .wcl-trial-section {
        padding: 16px;
    }

    .wcl-submit {
        width: 100%;
    }
}
