/********************************************************
 * HOTEL RESERVATION SYSTEM - STYLE GLOBAL
 * -----------------------------------------------------
 * Ce fichier complète Bootstrap avec une touche moderne :
 * - Bandeau clair et lisible
 * - Cartes élégantes
 * - Espacements et couleurs harmonisés
 *******************************************************/

/* ======================
   STRUCTURE GÉNÉRALE
   ====================== */
html, body {
    height: 100%;
}

body {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa; /* fond clair */
    color: #212529;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.container {
    flex: 1;
}


/* ================
   NAVBAR (bandeau du haut)
   ================ */

.navbar {
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #182430, rgb(47, 68, 92));
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.navbar-light .navbar-brand {
    color: #0d6efd !important; /* bleu Bootstrap */
}

.navbar-light .navbar-brand:hover {
    color: #0b5ed7 !important;
}

.navbar .nav-link {
    color: #cdcdcd !important;
    margin: 0 0.5rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.navbar .nav-link:hover {
    color: #0d6efd !important;
    border-bottom: 2px solid #0d6efd;
}

.navbar .nav-link.active {
    color: #0d6efd !important;
    font-weight: 600;
    border-bottom: 2px solid #0d6efd;
}

.navbar .btn {
    font-weight: 500;
    padding: 0.35rem 0.9rem;
}

/* ======================
   TABLEAUX ET CARTES
   ====================== */
.card {
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: none;
    /*max-width: 600px;*/
    margin: 0 auto;
}

.card-header {
    background-color: #e9f2ff;
    font-weight: 600;
}

.table thead {
    background-color: #0d6efd;
    color: #fff;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f1f3f5;
}

/* ======================
   FORMULAIRES
   ====================== */
form label {
    font-weight: 500;
}

form input, form select, form textarea {
    border-radius: 0.5rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Messages (alertes Bootstrap) */
.alert {
    border-radius: 0.5rem;
    font-weight: 500;
}

/* ======================
   PAGE D'ACCUEIL / TABLEAU DE BORD
   ====================== */
.dashboard ul {
    list-style: none;
    padding-left: 0;
}

.dashboard li {
    margin: 0.5rem 0;
}

.dashboard a {
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
    transition: 0.2s ease-in-out;
}

.dashboard a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/*==================
Carrousel accueil
 ===================*/
.carousel-item {
    padding: 0 10px;
}

.carousel-img {
    height: 480px;
    object-fit: cover;
    border-radius: 0.75rem;
}



/* ======================
   FOOTER
   ====================== */
footer {
    background-color: #f1f3f5;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.75rem 0;
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* ======================
   UTILITAIRES
   ====================== */
.mt-6 { margin-top: 4rem !important; }
.mb-6 { margin-bottom: 4rem !important; }

.text-muted-small {
    color: #868e96;
    font-size: 0.9rem;
}

.shadow-soft {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.icon-inline {
    vertical-align: middle;
    margin-right: 0.3rem;
}

/* ======================
   RESPONSIVE
   ====================== */
@media (max-width: 768px) {
    .navbar .nav-link {
        margin: 0.2rem 0;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 220px;
        top: var(--navbar-height, 60px);
        height: calc(100vh - var(--navbar-height, 60px));
    }
}

/* ======================
   STAR RATING
   ====================== */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
}

.star-rating input { display: none; }

.star-rating label {
    font-size: 2rem;
    color: #ccc;
    cursor: pointer;
    transition: color .2s, transform .15s;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
    transform: scale(1.08);
}

.star-rating input:checked ~ label {
    color: #ffc107;
    text-shadow: 0 0 6px rgba(255,193,7,.5);
}

.star-rating input:focus + label {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* ======================
   SIDEBAR ET MAIN CONTENT
   ====================== */
.sidebar {
    position: fixed;
    top: var(--navbar-height, 70px);
    left: 0;
    width: 260px;
    height: calc(100vh - var(--navbar-height, 70px));
    background: linear-gradient(180deg, #182430, #2f445c);
    color: #fff;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    z-index: 1029; /* un cran en dessous du menu Bootstrap */
    transition: transform 0.3s ease;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar h4 {
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    margin-bottom: 25px;
}

.sidebar .stat {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar .stat .number {
    font-size: 2rem;
    font-weight: bold;
    color: #00c851;
}

.sidebar hr {
    border-color: rgba(255,255,255,0.2);
}

.sidebar small {
    color: rgba(255,255,255,0.7);
}

.main-content {
    margin-left: 280px;
    margin-top: var(--navbar-height, 70px);
    padding: 40px;
    transition: margin 0.3s ease;
}

/* ======================
   IMAGE PRINCIPALE
   ====================== */
.main-image img {
    width: 100%;
    max-width: 850px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    object-fit: cover;
}

/* ======================
   TOGGLE BUTTON MOBILE
   ====================== */
.sidebar-toggle {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 1000;
    background: #1a1a1a;
    color: #fff;
    border: none;
    font-size: 1.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.sidebar-toggle:hover {
    background: #333;
}

/* ======================
   LOYALTY BADGES
   ====================== */
.loyalty-badge {
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
    font-weight: bold;
    display: inline-block;
}

.loyalty-bronze { background-color: #f0ad4e; color: #212529; }
.loyalty-silver { background-color: #6c757d; color: #fff; }
.loyalty-gold { background-color: #ffd700; color: #212529; }
.loyalty-platinum { background-color: #17a2b8; color: #212529; }


/* ======================
   EXTRA SERVICES
   ====================== */
.list-group-item {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}
