/*
 * ========================================================
 * [ÉTAT : FINAL] Date : 21-05-2026 19:50:00
 * FICHIER : reservation.css
 * RÔLE : Mise en page de l'interface de réservation (Grille CSS et Bandeaux)
 * Auteurs : Yvan Dubé & Gemini (IA Collaboratrice)
 * =========================================================
 */

.container {
    max-width: 1100px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* --- HEADER COLLANT (STICKY) --- */
#sticky-header-reservation {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 100;
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--couleur-primaire);
}

.titre-page {
    color: var(--couleur-primaire);
    text-align: center;
    margin-bottom: 20px;
}

/* --- BANDES D'INFORMATION MODES --- */
.mode-info { 
    padding: 15px; 
    margin-bottom: 15px; 
    border-radius: 5px; 
    border: 1px dashed var(--couleur-primaire); 
    background: #fdf7ff; 
}

.admin-tool { 
    background: #fff3cd; 
    border: 1px solid #ffeeba; 
    padding: 15px; 
    margin-bottom: 15px; 
    border-radius: 5px; 
}

/* --- RECHERCHE --- */
.search-container {
    margin-bottom: 15px;
    text-align: right; /* Aligne la barre de recherche à droite */
}

.search-container input {
    padding: 10px;
    font-size: 16px;
    border: 2px solid var(--couleur-bordure);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    transition: border-color var(--transition);
}

.search-container input:focus {
    border-color: var(--couleur-primaire);
    outline: none;
}

/* --- STRUCTURE DU TABLEAU (CSS GRID) --- */
.grid-container-reservation, .grid-item-reservation {
    display: grid;
    /* Ratio des colonnes : Img, Code, Desc, Qté, Stock, Prix, Action */
    grid-template-columns: 80px 100px 1fr 80px 80px 100px 80px;
    align-items: center;
    gap: 15px;
    padding: 15px;
}

.grid-container-reservation {
    background-color: var(--couleur-primaire);
    color: white;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
}

.grid-item-reservation {
    border-bottom: 1px solid #eee;
    transition: background-color var(--transition);
    background-color: white;
}

.grid-item-reservation:last-child {
    border-bottom: none;
}

.grid-item-reservation:hover {
    background-color: #f9f0ff;
    cursor: pointer; /* Indique qu'on peut cliquer sur la ligne */
}

.ligne-selectionnee {
    background-color: #f3e5f5 !important;
    border-left: 4px solid var(--couleur-primaire) !important;
}

/* --- ALIGNEMENTS SPÉCIFIQUES --- */
.col-center { text-align: center; }
.col-right { text-align: right; }
.align-gauche { text-align: left; }

.img-produit-mini { 
    width: 60px; 
    height: 60px; 
    object-fit: cover; 
    border-radius: 4px; 
    border: 1px solid var(--couleur-bordure); 
}

.qty-input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid var(--couleur-bordure);
    border-radius: 4px;
}

/* --- CLASSES SYDA --- */
.mention-syda-liste {
    font-size: 0.85em; 
    color: var(--couleur-primaire); 
    font-weight: bold;
}

.mention-syda-stock {
    color: var(--couleur-primaire); 
    font-size: 0.8em; 
    font-weight: bold; 
    text-align: center;
    display: inline-block;
}

/* --- BOUTON FLOTTANT --- */
.btn-flottant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    background-color: var(--couleur-primaire);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(123, 28, 141, 0.3);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-flottant:hover {
    transform: scale(1.05) translateY(-3px);
    background-color: var(--couleur-primaire-hover);
}


/* ========================================================
   BOÎTE D'INFORMATION - PROCÉDURE DE RÉSERVATION
   ======================================================== */
.boite-procedure {
    background-color: #f9fafb;
    border-left: 5px solid #6a1b9a;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0 25px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.boite-procedure h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.15em;
    color: #333;
}

.boite-procedure p {
    margin: 0;
    font-size: 0.95em;
    color: #444;
    line-height: 1.4;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .grid-container-reservation { display: none; } /* Cache l'en-tête sur mobile */
    .grid-item-reservation { 
        grid-template-columns: 1fr; /* Empile tout sur mobile */
        text-align: center; 
        gap: 10px; 
    }
    .col-right, .align-gauche { text-align: center; }
}