/* ================================================================
   Outdoor Booking — booking.css v1.0.0
   Variables CSS personnalisables via l'admin :
     --ob-color-primary  couleur principale (boutons, focus, sélection)
     --ob-color-dark     couleur sombre (header, titres, créneaux actifs)
     --ob-font-size      taille de base du texte
     --ob-radius         arrondi des coins
   ================================================================ */

.ob-booking-wrap {
    --ob-color-primary: #2563eb;
    --ob-color-dark:    #1a3a5c;
    --ob-font-size:     1rem;
    --ob-radius:        8px;

    max-width: 760px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--ob-font-size);
    color: #1f2937;
}

/* ── Header ─────────────────────────────────────────────────────── */
.ob-booking-header {
    background: linear-gradient(135deg, var(--ob-color-dark) 0%, var(--ob-color-primary) 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: calc(var(--ob-radius) + 4px);
    margin-bottom: 28px;
}
.ob-booking-header h2 { margin: 0 0 8px; font-size: 1.375em; }
.ob-booking-header p  { margin: 0; opacity: .85; font-size: 0.875em; line-height: 1.6; }

/* ── Étapes ─────────────────────────────────────────────────────── */
.ob-steps {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-radius: var(--ob-radius);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.ob-step {
    flex: 1;
    padding: 12px 6px;
    text-align: center;
    font-size: 0.8125em;
    font-weight: 600;
    color: #9ca3af;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ob-step:last-child { border-right: none; }
.ob-step span {
    width: 22px; height: 22px;
    background: #e5e7eb;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875em;
    font-weight: 700;
    color: #9ca3af;
    flex-shrink: 0;
}
.ob-step.active { background: #eff6ff; color: var(--ob-color-primary); }
.ob-step.active span { background: var(--ob-color-primary); color: #fff; }
.ob-step.done { color: #16a34a; }
.ob-step.done span { background: #16a34a; color: #fff; }

/* ── Contenus d'étape ───────────────────────────────────────────── */
.ob-step-content { display: none; }
.ob-step-content.active { display: block; }
.ob-step-title { font-size: 1.125em; margin: 0 0 20px; color: var(--ob-color-dark); }

/* ── Niveaux & cartes prestation ────────────────────────────────── */
.ob-niveau-group  { margin-bottom: 20px; }
.ob-niveau-label  {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    margin-bottom: 10px;
}
.ob-prestation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ob-prestation-card { cursor: pointer; display: block; }
.ob-prestation-card input { display: none; }
.ob-pcard-inner {
    border: 2px solid #e5e7eb;
    border-radius: var(--ob-radius);
    padding: 14px;
    background: #fff;
    transition: all .15s;
    height: 100%;
    box-sizing: border-box;
}
.ob-prestation-card:hover .ob-pcard-inner {
    border-color: #93c5fd;
    background: #f0f9ff;
}
.ob-prestation-card input:checked + .ob-pcard-inner {
    border-color: var(--ob-color-primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-color-primary) 12%, transparent);
}
.ob-pcard-nom  { font-weight: 700; font-size: 0.875em; margin-bottom: 6px; color: #1f2937; }
.ob-pcard-desc { font-size: 0.75em; color: #6b7280; margin-bottom: 8px; line-height: 1.5; }
.ob-pcard-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-pcard-meta span {
    font-size: 0.6875em;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 20px;
    color: #374151;
}
.ob-pcard-prix {
    background: #ecfdf5 !important;
    color: #16a34a !important;
    font-weight: 700;
}

/* ── Image prestation card ───────────────────────────────────────── */
.ob-pcard-image {
    margin: -14px -14px 12px -14px;
    border-radius: calc(var(--ob-radius) - 1px) calc(var(--ob-radius) - 1px) 0 0;
    overflow: hidden;
    height: 140px;
}
.ob-pcard-image img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s ease;
}
.ob-prestation-card:hover .ob-pcard-image img { transform: scale(1.04); }
.ob-prestation-card input:checked + .ob-pcard-inner .ob-pcard-image {
    border-radius: calc(var(--ob-radius) - 2px) calc(var(--ob-radius) - 2px) 0 0;
}

/* ── Champs ─────────────────────────────────────────────────────── */
.ob-field { margin-bottom: 18px; }
.ob-field label { display: block; font-size: 0.8125em; font-weight: 600; color: #374151; margin-bottom: 6px; }
.ob-field input[type="text"],
.ob-field input[type="email"],
.ob-field input[type="tel"],
.ob-field input[type="number"],
.ob-field input[type="date"],
.ob-field select,
.ob-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--ob-radius);
    font-size: 0.875em;
    box-sizing: border-box;
    transition: border .15s, box-shadow .15s;
    background: #fff;
    color: #1f2937;
}
.ob-field input:focus,
.ob-field select:focus,
.ob-field textarea:focus {
    outline: none;
    border-color: var(--ob-color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-color-primary) 10%, transparent);
}
.ob-field input.ob-error,
.ob-field select.ob-error,
.ob-field textarea.ob-error { border-color: #dc2626; }
.ob-hint { font-size: 0.75em; color: #9ca3af; margin-top: 4px; display: block; }
.req { color: #dc2626; }

.ob-field-row { display: flex; gap: 16px; }
.ob-field-row .ob-field { flex: 1; }

/* ── Colonnes fixes via shortcode ───────────────────────────────── */
.ob-grid-col-1 { grid-template-columns: 1fr; }
.ob-grid-col-2 { grid-template-columns: repeat(2, 1fr); }
.ob-grid-col-3 { grid-template-columns: repeat(3, 1fr); }
.ob-grid-col-4 { grid-template-columns: repeat(4, 1fr); }
.ob-grid-col-5 { grid-template-columns: repeat(5, 1fr); }
.ob-grid-col-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 560px) {
    .ob-field-row { flex-direction: column; }
    .ob-prestation-grid,
    .ob-prestation-grid[class*="ob-grid-col-"] { grid-template-columns: 1fr; }
}
@media (min-width: 561px) and (max-width: 768px) {
    .ob-grid-col-3,
    .ob-grid-col-4,
    .ob-grid-col-5,
    .ob-grid-col-6 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Checkbox ───────────────────────────────────────────────────── */
.ob-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
}
.ob-checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--ob-color-primary);
}

/* ── Stripe ─────────────────────────────────────────────────────── */
.ob-stripe-element {
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--ob-radius);
    background: #fff;
    transition: border .15s;
}
.ob-stripe-element.StripeElement--focus {
    border-color: var(--ob-color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-color-primary) 10%, transparent);
}
.ob-stripe-element.StripeElement--invalid { border-color: #dc2626; }

/* ── Notices ─────────────────────────────────────────────────────── */
.ob-notice {
    padding: 14px 16px;
    border-radius: var(--ob-radius);
    font-size: 0.8125em;
    line-height: 1.6;
    margin-bottom: 16px;
}
.ob-notice-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.ob-notice-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.ob-notice-error   { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* ── Navigation étapes ──────────────────────────────────────────── */
.ob-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}
.ob-step-nav .ob-btn:first-child:last-child { margin-left: auto; }

/* ── Boutons ─────────────────────────────────────────────────────── */
.ob-btn {
    padding: 10px 22px;
    border-radius: var(--ob-radius);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: all .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ob-btn:hover { background: #f9fafb; }
.ob-btn-primary {
    background: var(--ob-color-primary);
    border-color: var(--ob-color-primary);
    color: #fff;
}
.ob-btn-primary:hover {
    filter: brightness(0.9);
}
.ob-btn-lg { padding: 13px 28px; font-size: 0.9375em; }
.ob-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Succès ──────────────────────────────────────────────────────── */
.ob-success-wrap {
    text-align: center;
    padding: 48px 20px;
    border: 2px solid #bbf7d0;
    border-radius: calc(var(--ob-radius) + 4px);
    background: #f0fdf4;
}
.ob-success-icon { font-size: 3.5em; margin-bottom: 16px; }
.ob-success-wrap h2 { color: #16a34a; font-size: 1.5em; margin: 0 0 12px; }
.ob-success-wrap p  { color: #374151; font-size: 0.9375em; max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* ── Moyens de paiement (étape 4) ───────────────────────────────── */
.ob-payment-summary { margin-bottom: 20px; }
.ob-payment-summary ul { margin: 8px 0; padding-left: 20px; }
.ob-payment-summary li { margin: 6px 0; font-size: 0.875em; }
.ob-payment-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ob-payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--ob-radius);
    cursor: pointer;
    background: #fff;
    font-size: 0.875em;
    font-weight: 500;
    transition: border-color .2s, background .2s;
    min-width: 160px;
}
.ob-payment-option input[type="radio"] { accent-color: var(--ob-color-primary); }
.ob-payment-option:has(input:checked) {
    border-color: var(--ob-color-primary);
    background: #eff6ff;
}
.ob-pm-opt-icon  { font-size: 1.125em; }
.ob-pm-opt-label { color: #1f2937; }
.ob-stripe-block,
.ob-onsite-block { margin-top: 16px; }

/* ── Toolbar calendrier (nav + switcher vues) ───────────────────── */
.ob-cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ob-color-dark);
    border-radius: calc(var(--ob-radius) + 2px) calc(var(--ob-radius) + 2px) 0 0;
    padding: 10px 14px;
    color: #fff;
    gap: 8px;
}
.ob-cal-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.ob-cal-prev, .ob-cal-next {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1.125em;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1;
    transition: background .15s;
    flex-shrink: 0;
}
.ob-cal-prev:hover, .ob-cal-next:hover { background: rgba(255,255,255,.3); }
.ob-cal-prev:disabled, .ob-cal-next:disabled { opacity: .3; cursor: default; }
.ob-cal-month-label {
    font-weight: 700;
    font-size: 0.875em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: center;
}
.ob-cal-view-switch {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,.2);
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}
.ob-view-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 0.75em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.ob-view-btn:hover  { color: #fff; background: rgba(255,255,255,.1); }
.ob-view-btn.active { background: #fff; color: var(--ob-color-dark); }

/* ── Vue MOIS ────────────────────────────────────────────────────── */
.ob-cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f1f5f9;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}
.ob-cal-hday {
    text-align: center;
    font-size: 0.6875em;
    font-weight: 700;
    color: #6b7280;
    padding: 8px 0;
    text-transform: uppercase;
}
.ob-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0 0 calc(var(--ob-radius) + 2px) calc(var(--ob-radius) + 2px);
    overflow: hidden;
}
.ob-cal-day {
    position: relative;
    text-align: center;
    padding: 10px 4px 8px;
    font-size: 0.875em;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ob-cal-day.ob-cal-empty       { background: #fafafa; }
.ob-cal-day.ob-cal-past        { color: #d1d5db; background: #fafafa; }
.ob-cal-day.ob-cal-unavailable { color: #d1d5db; }
.ob-cal-day.ob-cal-available {
    cursor: pointer;
    font-weight: 700;
    color: var(--ob-color-dark);
    background: #fff;
    transition: background .15s;
}
.ob-cal-day.ob-cal-available:hover { background: #dbeafe; }
.ob-cal-day.ob-cal-full            { color: #9ca3af; }
.ob-cal-day.ob-cal-selected {
    background: var(--ob-color-dark) !important;
    color: #fff !important;
}
.ob-cal-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ob-color-primary);
    margin-top: 4px;
}

/* ── Vue MOIS — panneau créneaux au clic ─────────────────────────── */
.ob-cal-slots {
    margin-top: 12px;
    border: 1px solid #bfdbfe;
    border-radius: var(--ob-radius);
    padding: 16px;
    background: #f0f9ff;
}
.ob-cal-slots-label { font-weight: 700; font-size: 0.875em; color: var(--ob-color-dark); margin-bottom: 12px; }
.ob-cal-slots-list  { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Vue JOUR ────────────────────────────────────────────────────── */
.ob-jour-wrap {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 calc(var(--ob-radius) + 2px) calc(var(--ob-radius) + 2px);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
    min-height: 80px;
}

/* ── Créneaux (vues Mois/Jour) ───────────────────────────────────── */
.ob-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    border-radius: var(--ob-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    min-width: 90px;
}
.ob-slot-available { background: #fff; border-color: #93c5fd; color: var(--ob-color-dark); }
.ob-slot-available:hover { background: #dbeafe; border-color: var(--ob-color-primary); }
.ob-slot-selected  { background: var(--ob-color-dark) !important; border-color: var(--ob-color-dark) !important; color: #fff !important; }
.ob-slot-full      { background: #f3f4f6; color: #9ca3af; cursor: default; border-color: #e5e7eb; }
.ob-slot-heure     { font-size: 1.0625em; font-weight: 700; }
.ob-slot-info      { font-size: 0.6875em; margin-top: 4px; }

/* ── Vue SEMAINE ─────────────────────────────────────────────────── */
.ob-sem-grid {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 calc(var(--ob-radius) + 2px) calc(var(--ob-radius) + 2px);
    overflow: hidden;
}
.ob-sem-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
}
.ob-sem-hday {
    text-align: center;
    padding: 8px 4px;
    border-right: 1px solid #e5e7eb;
    font-size: 0.75em;
}
.ob-sem-hday:last-child { border-right: none; }
.ob-sem-hday-past { color: #d1d5db; }
.ob-sem-jour-nom {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 0.75em;
    color: #6b7280;
}
.ob-sem-jour-num {
    display: block;
    font-size: 1.125em;
    font-weight: 700;
    color: var(--ob-color-dark);
    line-height: 1.2;
}
.ob-sem-hday-past .ob-sem-jour-num { color: #d1d5db; }
.ob-sem-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
    min-height: 80px;
    align-items: start;
}
.ob-sem-col {
    border-right: 1px solid #f3f4f6;
    padding: 6px 3px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 60px;
}
.ob-sem-col:last-child { border-right: none; }
.ob-sem-past { background: #fafafa; min-height: 60px; }
.ob-sem-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 2px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    transition: all .15s;
    font-size: 0.6875em;
}
.ob-sem-slot-available { background: #dbeafe; color: var(--ob-color-dark); }
.ob-sem-slot-available:hover { background: #bfdbfe; }
.ob-sem-slot-selected  { background: var(--ob-color-dark) !important; color: #fff !important; }
.ob-sem-slot-full      { background: #f3f4f6; color: #9ca3af; cursor: default; }
.ob-sem-heure { font-weight: 700; font-size: 1em; }
.ob-sem-badge {
    display: inline-block;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 0.85em;
    font-weight: 700;
    margin-top: 2px;
    background: rgba(255,255,255,.6);
    color: var(--ob-color-dark);
}
.ob-badge-restant { background: rgba(255,255,255,.6); }
.ob-badge-full    { background: #fecaca; color: #dc2626; }
.ob-sem-slot-selected .ob-sem-badge { background: rgba(255,255,255,.25); color: #fff; }

/* ── Commun ──────────────────────────────────────────────────────── */
.ob-cal-loading   { padding: 24px; text-align: center; color: #9ca3af; font-size: 0.8125em; }
.ob-cal-empty-msg { text-align: center; color: #9ca3af; font-size: 0.8125em; padding: 16px; margin: 0; }
.ob-badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:0.75em; font-weight:600; }
.ob-badge-blue  { background:#dbeafe; color:#1e40af; }
.ob-badge-green { background:#dcfce7; color:#166534; }

/* ── Widget +/- participants ─────────────────────────────────────── */
.ob-nb-widget {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--ob-radius);
    overflow: hidden;
    height: 42px;
}
.ob-nb-btn {
    background: #f9fafb;
    border: none;
    color: var(--ob-color-dark);
    font-size: 1.25em;
    font-weight: 700;
    width: 42px;
    height: 100%;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    line-height: 1;
}
.ob-nb-btn:hover:not(:disabled) { background: #e5e7eb; }
.ob-nb-btn:disabled { color: #d1d5db; cursor: default; }
#ob-nb-display {
    min-width: 40px;
    text-align: center;
    font-size: 1.125em;
    font-weight: 700;
    color: var(--ob-color-dark);
    padding: 0 8px;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ob-cal-day   { padding: 6px 2px; font-size: 0.75em; min-height: 40px; }
    .ob-cal-hday  { font-size: 0.625em; padding: 6px 0; }
    .ob-slot      { min-width: 70px; padding: 8px 10px; }
    .ob-view-btn  { padding: 5px 7px; font-size: 0.6875em; }
    .ob-sem-slot  { font-size: 0.625em; }
    .ob-sem-jour-num { font-size: 1em; }
}

/* ── Bouton suivant sticky sur mobile ───────────────────────────── */
@media (max-width: 768px) {
    .ob-step-nav {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 12px 0 8px;
        margin-top: 16px;
        border-top: 1px solid #e5e7eb;
        z-index: 10;
    }
}

/* ── Récapitulatif prix étape 4 ─────────────────────────────────── */
.ob-prix-recap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: var(--ob-radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.9375em;
}
.ob-prix-recap #ob-prix-recap-label { color: #374151; }
.ob-prix-recap #ob-prix-recap-total { font-size: 1.375em; font-weight: 700; color: #16a34a; }

/* ── Bouton solo paiement (lecture seule) ───────────────────────── */
.ob-payment-solo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--ob-radius);
    background: #f9fafb;
    font-size: 0.875em;
    font-weight: 500;
    color: #374151;
    margin-top: 8px;
}

/* ── Bouton scroll dans la carte prestation ─────────────────────── */
.ob-pcard-scroll-btn { pointer-events: all; }
.ob-btn-scroll-cal   { cursor: pointer; border-radius: var(--ob-radius); font-weight: 600; transition: background .15s; }
