/**
 * =====================================================
 * Ô Zen Esthétique - Système de Réservation Complet
 * Design moderne style Calendly
 * =====================================================
 */

/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --oz-primary: #6B5048;
    --oz-primary-dark: #4A3A33;
    --oz-beige: #F4EDE4;
    --oz-beige-rose: #D4A59A;
    --oz-white: #FFFFFF;
    --oz-light-gray: #F9F9F9;
    --oz-border: #E8E8E8;
    --oz-text: #333333;
    --oz-text-light: #666666;
}

/* ============================================
   MODAL OVERLAY & CONTAINER
   ============================================ */
.oz-booking-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.oz-booking-modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.oz-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.oz-modal-container {
    position: relative;
    background: var(--oz-white);
    margin: 40px auto;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.oz-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
}

.oz-modal-close:hover {
    background: var(--oz-light-gray);
    color: var(--oz-primary);
    transform: rotate(90deg);
}

/* ============================================
   HEADER - RÉCAP SERVICE
   ============================================ */
.oz-modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--oz-border);
    background: linear-gradient(135deg, var(--oz-beige) 0%, var(--oz-white) 100%);
}

.oz-modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 26px;
    color: var(--oz-primary);
}

.oz-service-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    color: var(--oz-text-light);
    font-size: 15px;
}

/* ============================================
   PROGRESS STEPS (1. Date 2. Paiement 3. Confirmation)
   ============================================ */
.oz-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    gap: 10px;
}

.oz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s;
}

.oz-step.active {
    opacity: 1;
}

.oz-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--oz-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--oz-text-light);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.oz-step.active .oz-step-number {
    background: var(--oz-primary);
    color: white;
    border-color: var(--oz-primary);
}

.oz-step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--oz-text-light);
}

.oz-step.active .oz-step-label {
    color: var(--oz-primary);
}

.oz-step-line {
    width: 60px;
    height: 2px;
    background: var(--oz-border);
    margin: 0 5px;
}

/* ============================================
   CONTENU MODAL
   ============================================ */
.oz-modal-content {
    padding: 30px;
}

.oz-step-content {
    display: none;
}

.oz-step-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* ============================================
   CALENDRIER PERSONNALISÉ
   ============================================ */
.oz-calendar-wrapper {
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Header Calendrier (Mois + Navigation) */
.oz-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--oz-border);
}

.oz-cal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--oz-primary);
    margin: 0;
    flex: 1;
    text-align: center;
}

.oz-cal-nav {
    background: transparent;
    border: 1px solid var(--oz-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--oz-primary);
    transition: all 0.3s;
}

.oz-cal-nav:hover {
    background: var(--oz-primary);
    color: white;
    border-color: var(--oz-primary);
}

/* Grille Calendrier */
.oz-calendar-grid {
    user-select: none;
}

/* Jours de la semaine (Lun Mar Mer...) */
.oz-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.oz-cal-weekday {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--oz-text-light);
    padding: 10px 0;
    text-transform: uppercase;
}

/* Jours du mois */
.oz-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.oz-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.oz-cal-day.empty {
    cursor: default;
}

.oz-cal-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: transparent;
}

.oz-cal-day.available {
    color: var(--oz-text);
    background: var(--oz-light-gray);
}

.oz-cal-day.available:hover {
    background: var(--oz-beige);
    transform: scale(1.05);
}

.oz-cal-day.today {
    border: 2px solid var(--oz-primary);
}

.oz-cal-day.selected {
    background: var(--oz-primary);
    color: white;
}

/* ============================================
   CRÉNEAUX HORAIRES
   ============================================ */
.oz-timeslots-wrapper {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--oz-border);
}

.oz-selected-date-display {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--oz-primary);
    margin-bottom: 20px;
    padding: 15px;
    background: var(--oz-beige);
    border-radius: 8px;
}

.oz-timeslots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.oz-time-slot {
    padding: 15px;
    border: 2px solid var(--oz-border);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: var(--oz-text);
}

.oz-time-slot:hover {
    border-color: var(--oz-primary);
    background: var(--oz-beige);
    transform: translateY(-2px);
}

.oz-time-slot.selected {
    background: var(--oz-primary);
    color: white;
    border-color: var(--oz-primary);
}

.oz-time-slot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   PAIEMENT
   ============================================ */
.oz-payment-options {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.oz-payment-option {
    padding: 20px;
    border: 2px solid var(--oz-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.oz-payment-option:hover {
    border-color: var(--oz-primary);
    background: var(--oz-beige);
}

.oz-payment-option.selected {
    border-color: var(--oz-primary);
    background: var(--oz-beige);
}

.oz-payment-icon {
    font-size: 32px;
}

.oz-payment-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--oz-primary);
}

.oz-payment-details p {
    margin: 0;
    font-size: 14px;
    color: var(--oz-text-light);
}

.oz-stripe-form {
    margin-top: 20px;
    padding: 20px;
    background: var(--oz-light-gray);
    border-radius: 8px;
}

#card-element {
    padding: 15px;
    border: 1px solid var(--oz-border);
    border-radius: 6px;
    background: white;
}

#card-errors {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
}

/* ============================================
   BOUTONS
   ============================================ */
.oz-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.oz-btn-primary {
    background: var(--oz-primary);
    color: white;
}

.oz-btn-primary:hover {
    background: var(--oz-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 80, 72, 0.3);
}

.oz-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.oz-btn-continue {
    width: 100%;
    margin-top: 20px;
}

.oz-btn-back {
    background: transparent;
    color: var(--oz-primary);
    border: 2px solid var(--oz-primary);
}

.oz-btn-back:hover {
    background: var(--oz-primary);
    color: white;
}

.oz-btn-confirm-booking {
    width: 100%;
    margin-top: 20px;
}

/* ============================================
   FORMULAIRE CLIENT
   ============================================ */
.oz-form-group {
    margin-bottom: 20px;
}

.oz-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--oz-text);
    font-size: 14px;
}

.oz-form-group input[type="text"],
.oz-form-group input[type="email"],
.oz-form-group input[type="tel"],
.oz-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--oz-border);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

.oz-form-group input:focus,
.oz-form-group textarea:focus {
    outline: none;
    border-color: var(--oz-primary);
    box-shadow: 0 0 0 3px rgba(107, 80, 72, 0.1);
}

/* ============================================
   LOADER
   ============================================ */
.oz-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(5px);
}

.oz-loader {
    text-align: center;
    color: white;
}

.oz-spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.oz-loader-text {
    font-size: 18px;
    font-weight: 600;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.oz-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px 50px 20px 20px;
    border-radius: 8px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideInRight 0.4s ease;
}

.oz-notification.oz-success {
    border-left: 5px solid #28a745;
}

.oz-notification.oz-error {
    border-left: 5px solid #dc3545;
}

.oz-notification-icon {
    font-size: 28px;
}

.oz-notification-message {
    flex: 1;
}

.oz-notification-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oz-notification-close:hover {
    color: var(--oz-text);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
    .oz-modal-container {
        margin: 20px auto;
        width: 95%;
        max-height: 95vh;
    }

    .oz-modal-header {
        padding: 20px;
    }

    .oz-modal-header h2 {
        font-size: 22px;
    }

    .oz-modal-content {
        padding: 20px;
    }

    .oz-progress-steps {
        padding: 20px 10px;
    }

    .oz-step-label {
        font-size: 11px;
    }

    .oz-step-line {
        width: 30px;
    }

    .oz-cal-weekday {
        font-size: 11px;
        padding: 8px 0;
    }

    .oz-cal-day {
        font-size: 14px;
    }

    .oz-timeslots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .oz-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: calc(100% - 20px);
    }
}

/* ============================================
   SYSTÈME DE COMPTES (ton CSS existant)
   ============================================ */
.oz-login-wrapper,
.oz-register-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.oz-account-dashboard {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.oz-account-header {
    background: linear-gradient(135deg, var(--oz-primary) 0%, var(--oz-primary-dark) 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.oz-account-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.oz-tab-btn {
    padding: 15px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.oz-tab-btn:hover {
    color: var(--oz-primary);
}

.oz-tab-btn.active {
    color: var(--oz-primary);
    border-bottom-color: var(--oz-primary);
}

.oz-tab-content {
    display: none;
}

.oz-tab-content.active {
    display: block;
}

.oz-bookings-list {
    display: grid;
    gap: 20px;
}

.oz-booking-card {
    background: white;
    border: 1px solid var(--oz-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.oz-booking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.oz-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--oz-border);
}

.oz-status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.oz-status-badge.pending {
    background: #ffc107;
    color: #000;
}

.oz-status-badge.confirmed {
    background: #28a745;
    color: white;
}

.oz-status-badge.completed {
    background: #007bff;
    color: white;
}

.oz-status-badge.cancelled {
    background: #dc3545;
    color: white;
}

.oz-booking-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.oz-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--oz-light-gray);
    border-radius: 8px;
}

/* ========================================
   CHOIX PAIEMENT
   ======================================== */
.oz-payment-options {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.oz-payment-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.oz-payment-card:hover {
    border-color: var(--oz-primary, #6B5048);
    background: #fdf5f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 80, 72, 0.15);
}

.oz-payment-icon {
    font-size: 40px;
    min-width: 50px;
}

.oz-payment-content {
    flex: 1;
}

.oz-payment-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}

.oz-payment-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.oz-payment-arrow {
    font-size: 24px;
    color: #999;
}

/* Progress Steps avec completed */
.oz-step.completed .oz-step-number {
    background: var(--oz-primary, #6B5048);
    color: white;
    border-color: var(--oz-primary, #6B5048);
}

.oz-step.completed .oz-step-label {
    color: var(--oz-primary, #6B5048);
}

/* Bouton outline */
.oz-btn-outline {
    background: transparent;
    border: 2px solid var(--oz-primary, #6B5048);
    color: var(--oz-primary, #6B5048);
}

.oz-btn-outline:hover {
    background: var(--oz-primary, #6B5048);
    color: white;
}

/* ============================================
   RESPONSIVE MOBILE — AMÉLIORATIONS COMPLÈTES
   (max-width: 480px) — Bottom-sheet + touch-friendly
   ============================================ */
@media (max-width: 480px) {

    /* ── Modal → Bottom-Sheet style iOS ── */
    .oz-booking-modal.active {
        display: flex;
        align-items: flex-end;
        /* ancre en bas */
    }

    .oz-modal-container {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 93vh;
        border-radius: 22px 22px 0 0 !important;
        position: relative;
        animation: slideUpMobile 0.38s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
            opacity: 0.5;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Poignée visuelle (drag handle) */
    .oz-modal-container::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 12px auto 0;
    }

    .oz-modal-header {
        padding: 15px 20px 12px;
    }

    .oz-modal-header h2 {
        font-size: 1.25rem;
        padding-right: 35px;
        /* espace pour le × */
    }

    .oz-modal-content {
        padding: 15px 15px 25px;
    }

    .oz-modal-close {
        right: 12px;
        top: 12px;
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    /* ── Calendrier touch-friendly ── */
    .oz-cal-nav {
        width: 44px;
        height: 44px;
        font-size: 22px;
        flex-shrink: 0;
    }

    .oz-cal-title {
        font-size: 1.05rem;
    }

    .oz-cal-weekdays {
        gap: 3px;
        margin-bottom: 6px;
    }

    .oz-cal-weekdays div {
        font-size: 0.72rem;
    }

    .oz-cal-days {
        gap: 3px;
    }

    .oz-cal-day {
        min-height: 40px;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    /* ── Créneaux horaires : 3 colonnes ── */
    .oz-timeslots-wrapper {
        margin-top: 15px;
        padding-top: 15px;
    }

    .oz-selected-date-display {
        font-size: 0.95rem;
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .oz-timeslots-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px;
        min-width: 0;
    }

    .oz-time-slot {
        padding: 13px 4px;
        min-height: 48px;
        font-size: 0.88rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ── Bouton Continuer ── */
    .oz-btn-continue {
        min-height: 52px !important;
        font-size: 1rem !important;
        border-radius: 14px !important;
        margin-top: 15px !important;
    }

    /* ── Inputs sans zoom iOS + touch-friendly ── */
    .oz-modal-container input[type="text"],
    .oz-modal-container input[type="email"],
    .oz-modal-container input[type="tel"],
    .oz-modal-container input[type="password"] {
        font-size: 16px !important;
        /* empêche le zoom iOS */
        min-height: 48px;
        padding: 12px 14px;
        border-radius: 8px;
    }

    /* ── Formulaires 2-colonnes → 1 colonne ── */
    .oz-form-row-2col {
        display: block !important;
    }

    .oz-form-row-2col>div {
        margin-bottom: 12px;
    }

    /* Override inline-style fallback (sécurité) */
    .oz-booking-step div[style*="grid-template-columns:1fr 1fr"],
    .oz-booking-step div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }

    .oz-booking-step div[style*="grid-template-columns:1fr 1fr"]>div,
    .oz-booking-step div[style*="grid-template-columns: 1fr 1fr"]>div {
        width: 100%;
        margin-bottom: 12px;
    }

    /* ── Boutons généraux ── */
    .oz-booking-step button[style*="padding:14px"],
    .oz-booking-step button[style*="padding: 14px"] {
        min-height: 48px;
    }

    /* ── Récapitulatif paiement ── */
    .oz-payment-online,
    .oz-payment-onsite {
        padding: 15px !important;
    }

    /* ── Notifications toast → haut de l'écran ── */
    #oz-toast-container {
        bottom: auto !important;
        top: 75px !important;
        right: 10px !important;
        left: 10px !important;
        width: calc(100% - 20px) !important;
    }

    #oz-toast-container .oz-toast {
        min-width: auto !important;
        width: 100%;
    }
}