body {
    background: linear-gradient(to right, #490683, #0d3eba);
    color: #111111; /* Couleur du texte sombre (--foreground) */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main {
    flex: 1; /* Permet au main de prendre tout l'espace et de pousser le footer en bas */
}

/* =========================================
   2. HEADER (Identique au reste du site)
========================================= */
.header {
    background-color:#1e293b;
    height: 140px; 
    text-align: center;
    position: relative;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 20px;
}

.header-logo img {
    height: 90px;
    width: auto;
}

.header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: white;
    font-size: 2rem; 
    font-weight: bold;
    white-space: nowrap;
}

.header-profil {
    display: flex;
    align-items: center;
}

.btn-header {
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.btn-header:hover {
    transform: translateY(-2px);
}

.btn-green { background-color: greenyellow; color: #000; }
.btn-danger { background-color: #dc3545; color: white; }


/* =========================================
   3. RECHERCHE ET FILTRES (Formulaire)
========================================= */
.search-wrapper {
    position: relative;
    display: inline-block;
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #333;
}

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

.suggestion-item:hover {
    background-color: #f8fafc;
    color: #4f46e5;
}

.btn-filtrer {
    background-color: #10b981; /* Emerald 500 */
    color: white;
    border-radius: 8px;
    border: none;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-filtrer:hover {
    background-color: #059669; /* Emerald 600 */
    color: white;
    transform: translateY(-2px);
}

/* =========================================
   4. CARTES KPIs (Chiffres clés du haut)
========================================= */
.kpi-card {
    border-radius: 15px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #ffffff;
}

.kpi-card:hover { 
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.kpi-title {
    font-size: 0.85rem;
    color: #64748b; /* Slate 500 */
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
}

/* Couleurs spécifiques traduites de Figma */
.text-indigo { color: #4f46e5 !important; }  /* Violet/Bleu */
.text-emerald { color: #10b981 !important; } /* Vert */
.text-amber { color: #f59e0b !important; }   /* Jaune/Orange */
.text-rose { color: #e11d48 !important; }    /* Rouge/Rose */
.text-dark { color: #0f172a !important; }    /* Noir ardoise */


/* =========================================
   5. CARTES DÉTAILS (Distances)
========================================= */

.stat-detail-card {
    background-color: #d4cdcd; /* Fond de la carte (--card) */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Bordure subtile (--border) */
    border-radius: 0.625rem; /* Rayon de la bordure (--radius) */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Légère ombre pour décoller la carte du fond blanc */
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-detail-card span { 
    font-size: 0.95rem; 
    color: #717182; /* Couleur grise pour les textes secondaires (--muted-foreground) */
}

/* On modifie aussi les cartes KPI du haut pour qu'elles matchent */
.kpi-card {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.625rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* =========================================
   6. FIGURES (Ronds de Quilles)
========================================= */
.figure-container {
    background-color: #d4cdcd;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
}

/* Disposition en grille pour les 8 quilles (3 en haut, 2 au milieu, 3 en bas) */
.quilles-grid {
    display: grid;
    grid-template-columns: repeat(3, 25px);
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.quille-cercle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: #cbd5e1; /* Quille debout (Gris) */
    transition: background-color 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.quille-cercle.tombee {
    background-color: #3be332; 
    /* box-shadow: 0 0 8px #3be332; */
}

/* Tableaux sous les figures */
.table-figures th, .table-figures td {
    padding: 5px 10px;
    font-size: 0.9rem;
}


/* =========================================
   7. CHARGEMENT (Loading Overlay)
========================================= */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; /* Masqué par défaut */
}

.spinner-container {
    text-align: center;
    color: #4f46e5;
}

.spinner-container i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.spinner-container p {
    font-weight: bold;
    font-size: 1.2rem;
    color: #334155;
}


/* =========================================
   8. FOOTER (Identique au reste du site)
========================================= */
.site-footer {
    background-color: #1e293b; 
    color: white;               
    padding-top: 25px;
    border-top: 4px solid #1E90FF;
    font-size: 0.95rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px 10px 20px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 10px;
}

.footer-brand {
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: white;
    margin-bottom: 5px;
}

.footer-right {
    text-align: right;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;             
    justify-content: flex-end;
    gap: 20px;                 
}

.footer-links a {
    color: #b2bbc8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #4f46e5;
}

.footer-links i {
    margin-right: 5px;
    color: #1E90FF;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .header-title { font-size: 1.5rem; }
    .kpi-value { font-size: 1.8rem; }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-right { text-align: center; }
    .footer-links { justify-content: center; flex-direction: column; gap: 10px; }
}

