/**
 * Bottom Navigation - Modèle Uniforme
 * Basé sur le design de index.html (Up & Down)
 * À importer dans toutes les pages pour une apparence cohérente
 */

/* ===== BASE STYLES ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== VARIANTES DE LAYOUT ===== */

/* Config Nav - Bouton aligné à droite */
.bottom-nav-content.config-nav {
    justify-content: flex-end;
}

/* Players Nav - Layout standard (space-between) */
.bottom-nav-content.players-nav {
    justify-content: space-between;
}

/* Results Nav - Utilise un grid layout spécial */
.bottom-nav-content.results-nav {
    display: block;
}

/* ===== RESULTS NAVIGATION GRID ===== */
.results-nav-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

/* Positionner les éléments dans le grid */
.results-nav-grid > button:first-child {
    justify-self: start;
}

.results-nav-grid > button:last-child {
    justify-self: end;
}

/* Groupe de navigation de tours (centré) */
.round-nav-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== RESULTS NAVIGATION BUTTONS (Americano) ===== */
/* Layout pour les boutons de navigation résultats dans americano */
.results-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* ===== VISIBILITY ===== */
/* Masquer la navbar si l'écran parent est masqué */
.screen.d-none .bottom-nav {
    display: none !important;
}

/* ===== RESPONSIVE - TABLETTE (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Augmenter l'espace en bas pour éviter que le contenu soit caché */
    main.container {
        padding-bottom: 100px;
    }

    .bottom-nav {
        padding: 0.75rem;
    }

    /* Masquer le label "Tour" sur tablette pour économiser l'espace */
    .tour-label {
        display: none;
    }

    /* Transformer les boutons en boutons ronds sur tablette */
    .bottom-nav .btn {
        min-width: 48px !important;
        height: 48px !important;
        padding: 0.75rem !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        flex: 0 0 auto !important;
        width: 48px !important;
    }

    .bottom-nav .btn-lg {
        min-width: 56px !important;
        height: 56px !important;
        padding: 1rem !important;
        flex: 0 0 auto !important;
        width: 56px !important;
    }

    /* Afficher seulement les icônes, masquer le texte */
    .bottom-nav .btn i {
        margin: 0 !important;
        font-size: 1.25rem !important;
    }

    /* Grid layout pour la navigation résultats - une seule ligne */
    .results-nav-grid {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        gap: 0.5rem !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Groupe de navigation de tours */
    .round-nav-group {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.25rem !important;
    }

    /* Badge compact pour la navigation de tours */
    .round-nav-group .badge {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
        min-width: 50px !important;
    }

    /* Results Nav Buttons - garder l'alignement space-between */
    .results-nav-buttons {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
}

/* ===== RESPONSIVE - PETIT MOBILE (max-width: 575px) ===== */
@media (max-width: 575px) {
    main.container {
        padding-bottom: 90px;
    }

    .bottom-nav {
        padding: 0.5rem;
    }

    .bottom-nav-content {
        gap: 0.75rem;
    }

    /* Boutons ronds plus compacts sur petit mobile */
    .bottom-nav .btn {
        min-width: 44px !important;
        height: 44px !important;
        padding: 0.625rem !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        flex: 0 0 auto !important;
        width: 44px !important;
    }

    .bottom-nav .btn-lg {
        min-width: 52px !important;
        height: 52px !important;
        padding: 0.875rem !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        flex: 0 0 auto !important;
        width: 52px !important;
    }

    .bottom-nav .btn i {
        margin: 0 !important;
        font-size: 1.125rem !important;
    }

    /* Grid layout pour petit mobile - encore plus compact */
    .results-nav-grid {
        grid-template-columns: 1fr auto 1fr !important;
        gap: 0.4rem !important;
    }

    /* Espacement plus serré sur petit mobile */
    .round-nav-group {
        gap: 0.2rem !important;
    }

    /* Badge encore plus compact pour petit mobile */
    .round-nav-group .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.5rem !important;
        min-width: 45px !important;
    }

    /* Results Nav Buttons - garder l'alignement space-between */
    .results-nav-buttons {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
}
