/* ============================================
   AL BOOKING — FRONT CSS
   Style Aria Luna — Identique Audio Personnalisé
   Palette : Prune #6B327B / Améthyste #8B5A9B / Lilas #AB7ABB / Brume #D5C0DB / Aube #f5f0f7
   ============================================ */

/* Masquer les prix WooCommerce quand le booking est actif */
.al-booking-prices-hidden .woocommerce-variation-price,
.al-booking-prices-hidden .woocommerce-variation-price .price,
.al-booking-prices-hidden .single_variation_wrap .woocommerce-variation-price,
.al-booking-prices-hidden .single_variation .price,
.al-booking-prices-hidden .woocommerce-variation .price,
.al-booking-prices-hidden .variations_form .woocommerce-variation-price,
.al-booking-prices-hidden .product-type-variable > .price,
.al-booking-prices-hidden .summary > .price {
    display: none !important;
}

.al-booking-form {
    background: linear-gradient(135deg, #f8f3fa 0%, #faf6fb 100%);
    border: 2px solid #6B327B;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(107, 50, 123, 0.08);
}

.al-booking-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #6B327B;
}

.al-booking-header h3 {
    color: #6B327B;
    font-size: 20px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.al-booking-header h3::before {
    content: "🌙 ";
    animation: al-pulse 2s ease-in-out infinite;
}

.al-booking-header p {
    color: #5a2868;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

@keyframes al-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Section titles — style audio perso */
.al-booking-section-title {
    color: #6B327B;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.al-booking-section {
    margin-bottom: 20px;
}

.al-booking-section:last-child {
    margin-bottom: 0;
}

.al-optional {
    font-weight: 400;
    font-size: 12px;
    color: #9d7ba8;
    margin-left: 6px;
}

/* ---- Calendrier ---- */

.al-calendar {
    margin-bottom: 20px;
}

.al-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

#al-cal-week-label {
    font-size: 14px;
    color: #6B327B;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
}

/* Jours de la semaine — dégradé prune */
.al-calendar-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.al-day-btn {
    flex: 1;
    min-width: 80px;
    padding: 12px 8px;
    background: #fff;
    border: 2px solid #d4b3de;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.al-day-btn:hover {
    border-color: #6B327B;
    box-shadow: 0 4px 12px rgba(107, 50, 123, 0.15);
    transform: translateY(-2px);
}

.al-day-btn.active {
    background: linear-gradient(135deg, #6B327B 0%, #8B5A9B 50%, #AB7ABB 100%);
    background-size: 200% 200%;
    border-color: #6B327B;
    color: #fff;
    box-shadow: 0 6px 20px rgba(107, 50, 123, 0.35);
    animation: al-shine 4s ease-in-out infinite;
}

.al-day-btn.no-slots {
    opacity: 0.4;
    cursor: default;
}

.al-day-btn .al-day-name {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: #8B5A9B;
}

.al-day-btn .al-day-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #6B327B;
}

.al-day-btn .al-day-count {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.7;
    color: #AB7ABB;
}

.al-day-btn.active .al-day-name,
.al-day-btn.active .al-day-num,
.al-day-btn.active .al-day-count {
    color: #fff;
    opacity: 1;
}

@keyframes al-shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Créneaux horaires */
.al-slots-container {
    margin-top: 15px;
}

.al-slots-label {
    font-size: 13px;
    color: #9d7ba8;
    font-style: italic;
    text-align: center;
    margin: 15px 0 5px;
}

.al-timezone-notice {
    font-size: 11px;
    color: #AB7ABB;
    text-align: center;
    margin: 0 0 12px;
    font-style: italic;
}

.al-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.al-slot-btn {
    padding: 10px 8px;
    background: #fff;
    border: 2px solid #d4b3de;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #6B327B;
}

.al-slot-btn:hover {
    border-color: #6B327B;
    box-shadow: 0 4px 12px rgba(107, 50, 123, 0.2);
    transform: translateY(-2px);
}

/* Créneau sélectionné — dégradé prune */
.al-slot-btn.selected {
    background: linear-gradient(135deg, #6B327B 0%, #8B5A9B 50%, #AB7ABB 100%);
    background-size: 200% 200%;
    border-color: #6B327B;
    color: #fff;
    box-shadow: 0 6px 20px rgba(107, 50, 123, 0.35);
    animation: al-shine 4s ease-in-out infinite;
}

.al-slot-btn .al-slot-range {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 2px;
    color: #AB7ABB;
}

.al-slot-btn.selected .al-slot-range {
    opacity: 1;
    color: #fff;
}

/* Créneau sélectionné — résumé */
.al-selected-slot {
    background: linear-gradient(135deg, rgba(107, 50, 123, 0.08) 0%, rgba(139, 90, 155, 0.12) 100%);
    border: 2px solid #6B327B;
    border-radius: 15px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 14px;
    color: #5a2868;
}

.al-selected-slot strong {
    color: #6B327B;
}

/* ---- Champ Téléphone ---- */
.al-field {
    margin-bottom: 18px;
}

.al-field label {
    display: block;
    color: #5a2868;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.al-field label .required {
    color: #d63384;
    font-weight: 700;
}

.al-field label small {
    font-weight: 400;
    color: #9d7ba8;
    font-size: 12px;
}

.al-field input[type="tel"] {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 2px solid #d4b3de;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #FFF;
    color: #6B327B;
    font-family: inherit;
}

.al-field input[type="tel"]:focus {
    outline: none;
    border-color: #6B327B;
    box-shadow: 0 0 0 3px rgba(107, 50, 123, 0.1);
}

.al-field input[type="tel"]::placeholder {
    color: #9d7ba8;
    font-style: italic;
}

.al-field small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #9d7ba8;
    font-style: italic;
}

/* ---- Thématiques — Checkboxes style audio perso ---- */
.al-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.al-theme-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #d4b3de;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: #5a2868;
    position: relative;
}

.al-theme-item:hover {
    border-color: #6B327B;
    box-shadow: 0 4px 12px rgba(107, 50, 123, 0.15);
    transform: translateY(-1px);
}

/* Masquer le checkbox natif */
.al-theme-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Checkbox custom arrondi prune */
.al-theme-check {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #d4b3de;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 12px;
    color: transparent;
    background: #fff;
}

/* Checkbox coché — dégradé prune */
.al-theme-item input[type="checkbox"]:checked ~ .al-theme-check {
    background: linear-gradient(135deg, #6B327B 0%, #8B5A9B 50%, #AB7ABB 100%);
    border-color: #6B327B;
    color: #fff;
    box-shadow: 0 3px 10px rgba(107, 50, 123, 0.35);
}

.al-theme-item input[type="checkbox"]:checked ~ .al-theme-check::after {
    content: "✓";
    font-weight: 700;
    font-size: 14px;
}

/* Label texte coché */
.al-theme-item input[type="checkbox"]:checked ~ .al-theme-label {
    color: #6B327B;
    font-weight: 600;
}

/* Item entier coché */
.al-theme-item:has(input:checked) {
    border-color: #6B327B;
    background: linear-gradient(135deg, rgba(107, 50, 123, 0.05) 0%, rgba(139, 90, 155, 0.08) 100%);
}

.al-theme-label {
    transition: all 0.3s ease;
    line-height: 1.3;
}

/* ---- Prix total — encart prune style audio perso ---- */
.al-booking-price-display {
    background: #fff;
    border: 2px solid #6B327B;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.al-booking-price-label {
    color: #5a2868;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.al-booking-price-amount {
    color: #6B327B;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ---- Loading ---- */
.al-loading {
    text-align: center;
    padding: 30px;
    color: #8B5A9B;
}

.al-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #d4b3de;
    border-top-color: #6B327B;
    border-radius: 50%;
    animation: al-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* ---- Échec de chargement (1.2.3) ----
   Le calendrier ne reste plus bloqué sur le spinner : quand la requête échoue
   (plafond anti-abus, nonce périmé, réseau), ce bloc le remplace et rend la
   main. Il vit dans #al-calendar-days, qui est un conteneur flex — d'où le
   flex-basis à 100 %, sans quoi le message n'occuperait qu'une colonne de jour. */
.al-booking-error {
    flex: 1 1 100%;
    text-align: center;
    padding: 26px 14px;
    color: #8B5A9B;
}

.al-booking-error p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
}

/* Reprend le style du bouton de créneau : aucune couleur nouvelle. */
.al-booking-retry {
    display: inline-block;
    padding: 10px 22px;
    background: #fff;
    border: 2px solid #d4b3de;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6B327B;
    font-family: inherit;
    transition: all 0.3s ease;
}

.al-booking-retry:hover {
    border-color: #6B327B;
    box-shadow: 0 4px 12px rgba(107, 50, 123, 0.2);
    transform: translateY(-2px);
}

.al-booking-retry:focus-visible {
    outline: 2px solid #6B327B;
    outline-offset: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .al-booking-form {
        padding: 15px;
        border-radius: 15px;
    }

    .al-calendar-days {
        gap: 5px;
    }

    .al-day-btn {
        min-width: 60px;
        padding: 8px 4px;
        border-radius: 12px;
    }

    .al-day-btn .al-day-num {
        font-size: 16px;
    }

    .al-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .al-themes-grid {
        grid-template-columns: 1fr;
    }
}
