/* ============================================
   BOOKING — Modern dark tech / glassmorphism
   ============================================ */

/* ============================================================================
 * Boutons : bordure d'une teinte plus claire que le fond (style « clubEAT »).
 * Le bord s'adapte à la variante du bouton (palette Bootstrap *-300).
 * ========================================================================== */
.btn-primary   { border-color: #6ea8fe !important; }
.btn-secondary { border-color: #adb5bd !important; }
.btn-success   { border-color: #75b798 !important; }
.btn-danger    { border-color: #ea868f !important; }
.btn-warning   { border-color: #ffda6a !important; }
.btn-info      { border-color: #6edff6 !important; }
.btn-dark      { border-color: #6c757d !important; }
.btn-light     { border-color: #dee2e6 !important; }

/* Container principal — glass card */
.booking-container {
    background: rgba(15, 15, 25, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-width: 460px;
    margin: 0 auto;
    color: #e0e0e0;
}

.title_spec {
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
}

.book-logo {
    max-height: 80px;
    border-radius: 8px;
    filter: brightness(0) invert(1);
}

.book-inst-name {
    color: #fff;
    font-weight: 300;
    letter-spacing: 1px;
}

/* ---- Onglets ---- */
#bookingTabs {
    display: flex;
    flex-wrap: nowrap !important;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 6px;
    gap: 4px;
}
#bookingTabs .nav-item {
    flex: 1 1 0;
    text-align: center;
}
#bookingTabs .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: 10px;
    padding: 14px 0;
    width: 100%;
    transition: all 0.25s ease;
}
#bookingTabs .nav-link:hover:not(.disabled) {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
}
#bookingTabs .nav-link.active {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}
#bookingTabs .nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---- Boutons personnes ---- */
.person-btn {
    width: 100%;
    padding: 16px 0;
    font-size: 22px;
    font-weight: 600;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.person-btn:hover {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}
.person-btn.active {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 18px rgba(108, 99, 255, 0.35);
}

/* ---- Calendrier ---- */
.calendar {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    padding: 8px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.calendar table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    --bs-table-bg: transparent;
    --bs-table-color: inherit;
}
.calendar table td,
.calendar table th {
    background: transparent !important;
}
.calendar th {
    padding: 2px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.calendar td {
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
    text-align: center;
    vertical-align: middle;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.15s ease;
}
.calendar td:hover:not(.inactive) {
    background: rgba(108, 99, 255, 0.3);
    color: #fff;
}
.calendar .today {
    background: rgba(108, 99, 255, 0.6);
    color: #fff;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
}
.calendar td.selected,
.calendar td.selected-date {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.4);
}
.calendar td.inactive {
    background: rgba(255, 255, 255, 0.03) !important;
    color: rgba(255, 255, 255, 0.35) !important;
    cursor: not-allowed;
    font-weight: 400;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Boutons horaire ---- */
.time-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}
.time-btn:hover:not(:disabled) {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}
.time-btn.active {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.35);
    font-weight: 600;
}
.time-btn:disabled {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

/* ---- Lieu (place cards) ---- */
.place-card img,
.place-card > div:first-child {
    transition: all 0.25s ease;
    border: 3px solid transparent;
}
.place-card:hover img,
.place-card:hover > div:first-child {
    border-color: rgba(108, 99, 255, 0.5) !important;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.3);
}
.place-card small {
    color: rgba(255, 255, 255, 0.7);
}

/* ---- Boutons table ---- */
.table-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 1.05rem;
    width: 30%;
    text-align: center;
    line-height: 1.2;
    transition: all 0.2s ease;
}
.table-btn:hover {
    background: rgba(108, 99, 255, 0.15);
    border-color: #6c63ff;
    color: #fff;
}
.table-btn.active {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.35);
    font-weight: 600;
}

/* ---- Formulaire ---- */
.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e0e0e0;
    border-radius: 10px;
}
.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #6c63ff;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
/* Override browser autofill background */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 15, 25, 0.95) inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.12);
    transition: background-color 5000s ease-in-out 0s;
}
.form-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}
.form-label.required::before {
    content: "* ";
    color: #ff5252;
    font-weight: bold;
}
.form-check-label {
    color: rgba(255, 255, 255, 0.65);
}
.form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
.form-check-input:checked {
    background-color: #6c63ff;
    border-color: #6c63ff;
}

/* ---- Bouton confirmer ---- */
.btn-confirm {
    height: 60px;
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #6c63ff, #4a3fbf);
    border: none;
    border-radius: 14px;
    color: #fff;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.3);
}
.btn-confirm:hover {
    background: linear-gradient(135deg, #7c74ff, #5a4fd0);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.45);
    transform: translateY(-1px);
}

/* ---- Résumé ---- */
.list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ddd;
}
.list-group-item strong {
    color: #fff;
}
.alert-success {
    background: rgba(0, 200, 83, 0.2);
    border: 2px solid rgba(0, 200, 83, 0.5);
    color: #69f0ae;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 500;
    padding: 20px;
    text-align: center;
}

/* ---- Bouton nouvelle réservation ---- */
#btn_new_reservation,
#btn_back_to_site {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(108, 99, 255, 0.3);
    transition: all 0.25s ease;
    color: #fff;
    text-decoration: none;
    white-space: normal;
    word-wrap: break-word;
}
#btn_new_reservation:hover,
#btn_back_to_site:hover {
    background: linear-gradient(135deg, #7c74ff, #5a4fd0);
    transform: translateY(-1px);
    color: #fff;
}

/* ---- Readonly section ---- */
.readonly-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
    padding-bottom: 15px;
}

/* ---- Navigation calendar ---- */
.calendar button,
.calendar .btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
}
.calendar button:hover,
.calendar .btn:hover {
    color: #fff;
}
.calendar h6 {
    color: #fff;
}

/* ---- Footer links ---- */
a {
    color: #8b83ff;
}
a:hover {
    color: #b0abff;
}

/* ---- Mobile ---- */
@media (max-width: 576px) {
    .booking-container {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        padding: 20px;
        border-radius: 16px;
    }
    .calendar {
        transform: scale(0.92);
        transform-origin: top center;
        width: 100%;
    }
    .calendar table {
        font-size: 0.8rem;
    }
}

/* ---- Place buttons (legacy compat) ---- */
.place-btn.active {
    background: linear-gradient(135deg, #6c63ff, #4a3fbf) !important;
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600;
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
html:not([data-bs-theme="dark"]) .booking-container {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
html:not([data-bs-theme="dark"]) .title_spec {
    color: #222;
}
html:not([data-bs-theme="dark"]) .book-logo {
    filter: none;
}
html:not([data-bs-theme="dark"]) .book-inst-name {
    color: #222;
}
html:not([data-bs-theme="dark"]) body::before {
    background: rgba(255, 255, 255, 0.3);
}
html:not([data-bs-theme="dark"]) small,
html:not([data-bs-theme="dark"]) .text-muted {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* Tabs */
html:not([data-bs-theme="dark"]) #bookingTabs {
    background: rgba(0, 0, 0, 0.05);
}
html:not([data-bs-theme="dark"]) #bookingTabs .nav-link {
    color: rgba(0, 0, 0, 0.6);
}
html:not([data-bs-theme="dark"]) #bookingTabs .nav-link:hover:not(.disabled) {
    color: rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.05);
}
html:not([data-bs-theme="dark"]) #bookingTabs .nav-link.active {
    color: #fff;
}

/* Person buttons */
html:not([data-bs-theme="dark"]) .person-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #555;
}
html:not([data-bs-theme="dark"]) .person-btn:hover {
    color: #333;
}

/* Calendar */
html:not([data-bs-theme="dark"]) .calendar {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
html:not([data-bs-theme="dark"]) .calendar th {
    color: rgba(0, 0, 0, 0.6);
}
html:not([data-bs-theme="dark"]) .calendar td {
    color: #333;
}
html:not([data-bs-theme="dark"]) .calendar td:hover:not(.inactive) {
    background: rgba(108, 99, 255, 0.15);
    color: #333;
}
html:not([data-bs-theme="dark"]) .calendar td.inactive {
    background: rgba(0, 0, 0, 0.03) !important;
    color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
/* Navigation mois (titre + flèches) — visibles sur fond clair */
html:not([data-bs-theme="dark"]) .calendar h6 {
    color: #222;
}
html:not([data-bs-theme="dark"]) .calendar button,
html:not([data-bs-theme="dark"]) .calendar .btn {
    color: rgba(0, 0, 0, 0.6);
}
html:not([data-bs-theme="dark"]) .calendar button:hover,
html:not([data-bs-theme="dark"]) .calendar .btn:hover {
    color: #000;
}

/* Time buttons */
html:not([data-bs-theme="dark"]) .time-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #555;
}
html:not([data-bs-theme="dark"]) .time-btn:hover:not(:disabled) {
    color: #333;
}
html:not([data-bs-theme="dark"]) .time-btn:disabled {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.25);
}

/* Place cards */
html:not([data-bs-theme="dark"]) .place-card small {
    color: rgba(0, 0, 0, 0.5);
}

/* Table buttons */
html:not([data-bs-theme="dark"]) .table-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #555;
}
html:not([data-bs-theme="dark"]) .table-btn:hover {
    color: #333;
}

/* Form */
html:not([data-bs-theme="dark"]) .form-control,
html:not([data-bs-theme="dark"]) .form-select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #333;
}
html:not([data-bs-theme="dark"]) .form-control:focus,
html:not([data-bs-theme="dark"]) .form-select:focus {
    background: #fff;
    color: #333;
}
html:not([data-bs-theme="dark"]) .form-control::placeholder {
    color: rgba(0, 0, 0, 0.35);
}
html:not([data-bs-theme="dark"]) .form-control:-webkit-autofill,
html:not([data-bs-theme="dark"]) .form-control:-webkit-autofill:hover,
html:not([data-bs-theme="dark"]) .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    -webkit-text-fill-color: #333 !important;
    border-color: rgba(0, 0, 0, 0.15);
}
html:not([data-bs-theme="dark"]) .form-label {
    color: rgba(0, 0, 0, 0.6);
}
html:not([data-bs-theme="dark"]) .form-check-label {
    color: rgba(0, 0, 0, 0.6);
}
html:not([data-bs-theme="dark"]) .form-check-input {
    background-color: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
}

/* List group (summary) */
html:not([data-bs-theme="dark"]) .list-group-item {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #444;
}
html:not([data-bs-theme="dark"]) .list-group-item strong {
    color: #222;
}
html:not([data-bs-theme="dark"]) .alert-success {
    background: rgba(0, 200, 83, 0.1);
    border: 2px solid rgba(0, 200, 83, 0.3);
    color: #1b8a4a;
}
