/* style.css - Fichier de styles principal de Toca Colis */

/* 1. RÈGLES GÉNÉRALES ET UTILITAIRES */

.hidden {
    display: none !important;
}
html, body {
    height: 100%; /* CRITIQUE pour le Sticky Footer */
    background-color: #f8f9fa !important; 
    margin: 0;
    padding: 0;
}
body {
    display: flex; /* CRITIQUE pour le Sticky Footer */
    flex-direction: column; /* CRITIQUE pour le Sticky Footer */
}

/* 2. COULEURS THÉMATIQUES ET BOUTONS PERSONNALISÉS */

/* Couleur de fond de la barre de navigation et des éléments sombres */
.bg-custom-toca {
    background-color: #314e82 !important; /* Bleu foncé principal */
    color: #ffffff !important;
}

/* Forcer la couleur de fond spécifiquement sur l'élément NAV (résout le problème de transparence) */
.navbar.bg-custom-toca {
    background: #314e82 !important; 
    --bs-navbar-bg: #314e82 !important;
    --bs-bg-opacity: 1 !important;
    border-color: #314e82 !important;
}

/* Style pour les boutons primaires personnalisés (Recherche/Proposer/Filtrer) */
.btn-custom-toca {
    color: #fff;
    background-color: #314e82;
    border-color: #314e82;
}
.btn-custom-toca:hover {
    color: #fff;
    background-color: #263e68; 
    border-color: #263e68;
}
.btn-custom-toca:focus,
.btn-custom-toca:active {
    box-shadow: 0 0 0 0.25rem rgba(49, 78, 130, 0.5); 
}

/* 3. STYLES DE NAVIGATION (HARMONISATION) */

.navbar-nav .nav-link,
.navbar-nav .nav-btn,
.navbar-brand { 
    color: #ffffff !important;
    border: 1px solid transparent; 
}
.nav-btn {
    flex-grow: 0; 
    flex-shrink: 1;
    white-space: nowrap; 
    overflow: visible; 
    text-overflow: initial;
    margin: 0 5px; 
    padding: 8px 12px; 
}
.nav-btn:hover,
.nav-btn:focus {
    background-color: #99afd7 !important;
    border-color: #99afd7 !important;
    color: #314e82 !important;
    cursor: pointer;
    box-shadow: none;
    outline: none; 
}
.nav-btn.active {
    background-color: #314e82 !important;
    border-color: #314e82 !important;
    color: #ffffff !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 
}

/* 4. STYLES DU LAYOUT PRINCIPAL ET DU FOOTER */

main {
    padding-top: 20px;
    padding-bottom: 20px; 
    flex-grow: 1; /* CRITIQUE pour le Sticky Footer: prend tout l'espace vertical disponible */
}

/* FOOTER POUSSÉ */
footer {
    position: relative; 
    margin-top: 0; 
    
    width: 100%;
    z-index: 1000;
    background-color: #314e82; 
    color: #ffffff; 
    font-family: Arial, sans-serif; 
    padding: 20px 0;
}
footer a {
    color: #ffffff; 
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: #f0f0f0; 
    text-decoration: underline;
}

/* 5. STYLES SPÉCIFIQUES AUX PAGES STATIQUES (CGV, FAQ, Contact) */

.cgv-container, .faq-container, .contact-container {
    padding-top: 0;
    padding-bottom: 0;
}
.cgv-content, .faq-content, .contact-content {
    background-color: #ffffff; 
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 90px; 
    margin-bottom: 90px;
}
.cgv-content h2, .faq-content h2, .contact-content h2 {
    color: #007bff; 
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 600;
}
.faq-content h3, .cgv-content h3 {
    color: #343a40;
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 20px;
}
.faq-content p, .cgv-content p, .faq-content li, .cgv-content li {
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
}
.faq-content .answer {
    background-color: #e9ecef; 
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-style: italic;
}

/* 6. STYLES SPÉCIFIQUES À L'APPLICATION */

.select-group .btn {
    min-width: 120px;
    margin: 5px;
    border-width: 2px;
}
.select-group .btn.active {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.recap-payment p {
    margin-bottom: 0.5rem;
}
.recap-payment .total-a-payer {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--bs-success);
}
.table-primary {
    --bs-table-bg-state: var(--bs-primary-bg-subtle);
    --bs-table-bg-hover: var(--bs-table-bg-state);
}

/* STYLE AUTOCOMPLÉTION */
.autocomplete-container {
    position: relative;
}
.autocomplete-list {
    position: absolute;
    z-index: 1050;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.autocomplete-list li {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}
.autocomplete-list li:hover {
    background-color: #f0f0f0;
}