/* ============================================================
   BH Reservations – Styles front + pop-up
   ============================================================ */

/* ---- Bouton réserver ---- */
.bhres-btn-wrap {
    margin: 12px 0;
}
.bhres-btn-wrap .bhres-hint {
    margin: 6px 0 0;
    font-size: 0.82em;
    color: #6c757d;
}
.bhres-btn-wrap-mini {
    margin-top: 6px;
}

/* ---- Overlay ---- */
.bhres-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: bhresFadeIn 0.2s ease;
}
@keyframes bhresFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Boîte modale ---- */
.bhres-modal-box {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    max-height: 90vh;
    overflow-y: auto;
    animation: bhresSlideIn 0.25s ease;
}
@keyframes bhresSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.bhres-modal-box h2 {
    margin: 0 0 20px;
    font-size: 1.25em;
    font-weight: 700;
    color: #212529;
    padding-right: 28px;
}

/* ---- Bouton fermeture ---- */
.bhres-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s;
}
.bhres-modal-close:hover { color: #212529; }

/* ---- Champs ---- */
.bhres-field {
    margin-bottom: 14px;
}
.bhres-field label {
    display: block;
    font-size: 0.88em;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}
.bhres-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95em;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.bhres-field input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0,123,255,.15);
}

/* ---- Rangée 2 colonnes ---- */
.bhres-row {
    display: flex;
    gap: 12px;
}
.bhres-row .bhres-field {
    flex: 1;
}

/* ---- Quantité ---- */
.bhres-qty-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 1px solid #ced4da;
    border-radius: 6px;
    overflow: hidden;
}
.bhres-qty-btn {
    background: #f8f9fa;
    border: none;
    width: 36px;
    height: 38px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.bhres-qty-btn:hover { background: #e2e6ea; }
.bhres-qty-wrap input[type="number"] {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    border-radius: 0;
    padding: 8px 4px;
    -moz-appearance: textfield;
}
.bhres-qty-wrap input[type="number"]::-webkit-inner-spin-button,
.bhres-qty-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ---- Récapitulatif prix ---- */
.bhres-price-recap {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 14px 0;
    font-size: 0.95em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #495057;
}
.bhres-price-recap strong {
    font-size: 1.1em;
    color: #212529;
}

/* ---- Connecté ---- */
.bhres-connected-as {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9em;
    color: #155724;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bhres-connected-as .material-icons {
    font-size: 1.1em;
    color: #28a745;
}

/* ---- Hint connexion ---- */
.bhres-login-hint {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 14px;
}
.bhres-login-hint a { color: #007bff; }

/* ---- Actions ---- */
.bhres-actions {
    margin-top: 20px;
}
.bhres-actions .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 6px;
}

/* ---- Spinner ---- */
.bhres-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bhresSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes bhresSpin {
    to { transform: rotate(360deg); }
}

/* ---- Feedback ---- */
.bhres-feedback {
    margin-top: 14px;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.92em;
}

/* ============================================================
   Page "Mes réservations"
   ============================================================ */
.bhres-my-reservations { padding-bottom: 40px; }

.bhres-empty {
    text-align: center;
    padding: 40px 20px;
}
.bhres-empty .material-icons { font-size: 3em; display: block; color: #6c757d; margin-bottom: 12px; }

.bhres-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 0.95em;
    color: #495057;
    flex-wrap: wrap;
    gap: 8px;
}
.bhres-summary-total strong { color: #212529; font-size: 1.05em; }

.bhres-list { display: flex; flex-direction: column; gap: 14px; }

.bhres-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    background: #fff;
    transition: box-shadow 0.15s;
}
.bhres-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.bhres-card.bhres-status-cancelled { opacity: 0.65; background: #fafafa; }
.bhres-card.bhres-status-confirmed { border-left: 4px solid #28a745; }
.bhres-card.bhres-status-pending   { border-left: 4px solid #ffc107; }
.bhres-card.bhres-status-converted { border-left: 4px solid #17a2b8; }

.bhres-card-product { display: flex; align-items: center; gap: 14px; }
.bhres-product-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid #dee2e6; flex-shrink: 0; }
.bhres-product-name { font-weight: 600; color: #212529; text-decoration: none; display: block; }
.bhres-product-name:hover { color: #007bff; }
.bhres-ref, .bhres-date { font-size: 0.8em; color: #6c757d; display: block; margin-top: 2px; }

.bhres-card-pricing { text-align: right; }
.bhres-pricing-row { display: flex; gap: 16px; justify-content: flex-end; font-size: 0.88em; color: #6c757d; }
.bhres-line-total { font-size: 0.95em; margin-top: 4px; color: #495057; }

.bhres-grand-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 20px;
    background: #e9f5e9;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    font-size: 1em;
    color: #155724;
}
.bhres-grand-total-value { font-size: 1.3em; font-weight: 700; }

.bhres-back-link {
    margin-top: 20px;
}
.bhres-back-link a {
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    text-decoration: none;
}
.bhres-back-link a:hover { color: #212529; }

/* Responsive */
@media (max-width: 600px) {
    .bhres-card {
        grid-template-columns: 1fr;
    }
    .bhres-card-pricing { text-align: left; }
    .bhres-pricing-row { justify-content: flex-start; }
    .bhres-grand-total { flex-direction: column; text-align: center; }
}

/* ============================================================
   Bouton themé via CSS custom properties (injectées par hookDisplayHeader)
   ============================================================ */
.bhres-themed {
    background-color: var(--bhres-btn-bg, #2563eb) !important;
    color: var(--bhres-btn-color, #fff) !important;
    border-color: var(--bhres-btn-bg, #2563eb) !important;
    border-radius: var(--bhres-btn-radius, 6px) !important;
}
.bhres-themed:hover {
    filter: brightness(0.9);
}
.bhres-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================================
   v2 — Mode livraison / Click & Collect
   ============================================================ */
.bhres-delivery-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.bhres-delivery-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: border-color .15s, background .15s;
    flex: 1;
    min-width: 140px;
}
.bhres-delivery-option:hover {
    border-color: var(--bhres-btn-bg, #2563eb);
    background: #f0f4ff;
}
.bhres-delivery-option input[type="radio"] {
    accent-color: var(--bhres-btn-bg, #2563eb);
    width: 16px;
    height: 16px;
}
.bhres-delivery-option input[type="radio"]:checked ~ span {
    color: var(--bhres-btn-bg, #2563eb);
}
.bhres-delivery-option:has(input:checked) {
    border-color: var(--bhres-btn-bg, #2563eb);
    background: #f0f4ff;
}
.bhres-delivery-icon { font-size: 1.2em; }

/* ---- Badge mode dans "Mes réservations" ---- */
.bhres-delivery-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.78em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}
.bhres-mode-delivery     { background: #dbeafe; color: #1e40af; }
.bhres-mode-clickncollect { background: #d1fae5; color: #065f46; }

/* ---- Bouton "Complet" ---- */
.bhres-btn-full {
    opacity: 0.6;
    cursor: not-allowed !important;
}
.bhres-btn-full:hover { filter: none !important; }

/* ---- Indicateur stock ---- */
.bhres-stock-hint {
    font-size: 0.75em;
    color: #6b7280;
    margin: 4px 0 0;
    text-align: center;
}
.bhres-stock-full {
    color: #dc2626;
    font-weight: 600;
}
