/* ============================================================
   MEUS Réservations — Styles front-end
   ============================================================ */

/* ── Conteneur principal ─────────────────────────────────── */
.meus-reservation-form {
    margin: 24px 0;
    font-family: inherit;
}

.meus-form-section {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.meus-form-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #111;
}

/* ── Champs dates ────────────────────────────────────────── */
.meus-date-fields {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meus-field {
    flex: 1;
    min-width: 180px;
}

.meus-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

.meus-field input[type="text"],
.meus-field input[type="email"],
.meus-field input[type="tel"] {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.meus-field input:focus {
    outline: none;
    border-color: #111;
}

.meus-hint {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-top: 4px;
}

/* ── Infobulle (tooltip) sur les labels ─────────────────── */
.meus-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0 0 0 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    line-height: 1;
}

.meus-tooltip-icon {
    font-size: 14px;
    color: #9ca3af;
    transition: color 0.15s;
    font-style: normal;
}

.meus-tooltip-trigger:hover .meus-tooltip-icon,
.meus-tooltip-trigger:focus .meus-tooltip-icon {
    color: #374151;
}

.meus-tooltip-bubble {
    display: block;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 230px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* Flèche en bas de la bulle */
.meus-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.meus-tooltip-trigger:hover .meus-tooltip-bubble,
.meus-tooltip-trigger:focus .meus-tooltip-bubble {
    opacity: 1;
}

/* ── Bloc notices ────────────────────────────────────────── */
.meus-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

/* ── Note week-end ──────────────────────────────────────── */
.meus-weekend-notice {
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 13px;
    color: #78350f;
}

/* ── Note récupération / retour ─────────────────────────── */
.meus-pickup-notice {
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 13px;
    color: #1e3a8a;
}

/* ── Statut disponibilité ────────────────────────────────── */
.meus-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.meus-status--available  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.meus-status--unavailable{ background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.meus-status--checking   { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.meus-status--error      { background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; }

/* ── Options ─────────────────────────────────────────────── */
.meus-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meus-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-weight: normal;
}

.meus-option-item:hover {
    border-color: #9ca3af;
}

.meus-option-item:has(input:checked) {
    border-color: #111;
    background: #f0fdf4;
}

.meus-option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #111;
    flex-shrink: 0;
}

.meus-option-name {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: #111;
}

.meus-option-desc {
    flex-basis: 100%;
    font-size: 12px;
    color: #6b7280;
    margin-left: 28px;
}

.meus-option-price {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

/* ── Récapitulatif prix ──────────────────────────────────── */
.meus-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.meus-price-table td {
    padding: 6px 0;
}

.meus-price-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.meus-price-total td {
    padding-top: 10px;
    border-top: 2px solid #111;
    font-size: 16px;
}

.meus-price-notice {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 10px;
}

/* ── Boutons ─────────────────────────────────────────────── */
.meus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}

.meus-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.meus-btn--secondary {
    background: #f3f4f6;
    color: #111;
    border: 1.5px solid #d1d5db;
}

.meus-btn--secondary:not(:disabled):hover {
    background: #e5e7eb;
}

/* ── Mini-calendrier disponibilités ─────────────────────── */
#meus-mini-calendar .flatpickr-calendar { box-shadow: none; border: 1px solid #e5e7eb; }

.meus-availability-legend {
    margin-top: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.meus-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.meus-dot--free { background: #4ade80; }
.meus-dot--busy { background: #ef4444; }

/* Flatpickr — jours désactivés = rouge clair */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-radius: 4px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media ( max-width: 480px ) {
    .meus-date-fields { flex-direction: column; }
    .meus-field { min-width: 100%; }
}
