/* === GLOBAL === */
body {
    background-color: #f8f9fa;
}

h1 {
    margin-bottom: 20px;
}

.card {
    margin: 10px 0;
}

.navbar-brand {
    font-weight: bold;
}

#map {
    height: 500px;
    width: 100%;
    margin-bottom: 20px;
}

button {
    z-index: 1000;
}

.list-group-item {
    font-size: 16px;
    padding: 10px 15px;
}

/* === ENVIRONNEMENTS === */
body.pwa-mobile {
    background-color: #f0fff4;
}

body.pwa-desktop {
    background-color: #f0f4ff;
}

body.mobile-browser {
    background-color: #fffaf0;
}

body.desktop-browser {
    background-color: #f9f9f9;
}

/* === BOTTOM NAVBAR === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    color: #fff;
    background-color: #1b1352; /* Fond noir */
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    border-top: 1px solid #333;
    padding-bottom: env(safe-area-inset-bottom); /* iPhone support */
}

.bottom-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex; /* Modification : inline-flex pour aligner les éléments horizontalement */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    padding-top: 5px;
    padding-bottom: 3px;
    transition: background-color 0.2s, color 0.2s;
}

.bottom-nav a i {
    font-size: 20px;
    margin-bottom: 2px;
}

/* L'élément actif */
.bottom-nav a.active {
    color: #0dfd29; /* Bleu Bootstrap pour l'onglet actif */
    font-weight: 600;
}

/* Effet tactile sur le bouton actif */
.bottom-nav a:active {
    background-color: #57955a;
    color: #c760e6;
    transition: none;
    transform: scale(0.96);
}

/* === BOTTOM NAVBAR - Mobile PWA === */
@media (max-width: 768px) {
    /* Détection du mode mobile PWA installé */
    .bottom-nav {
        color: #fff;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: #2ec217 !important;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 9999;
        border-top: 1px solid #333;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav a {
        color: #fff;
        text-decoration: none;
        font-size: 12px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        padding-top: 5px;
        padding-bottom: 3px;
        transition: background-color 0.2s, color 0.2s;
    }

    .bottom-nav a i {
        font-size: 20px;
        color: #fff;
        margin-bottom: 2px;
    }

    .bottom-nav a.active {
        color: #cce927;
        font-weight: 600;
    }

    .bottom-nav a:active {
        background-color: #111;
        color: #fd0dcd;
        transition: none;
        transform: scale(0.96);
    }

    /* Cache la navbar Bootstrap classique pour mobile */
    .navbar {
        display: none;
    }

    /* Affiche la navbar en bas seulement sur mobile (PWA et mobile browser) */
    .bottom-nav {
        display: flex;
    }

    /* === STYLE POUR PWA INSTALLEE (standalone mode) === */
    body.pwa-mobile {
        background-color: #ded5d5 !important;
        color: #000000;
    }

    .bottom-nav {
        display: flex;
    }
}

/* === STYLE POUR PWA INSTALLEE (standalone mode) === */
@media (display-mode: standalone) {
    .bottom-nav {
        background-color: #433737 !important;
        color: #ffffff;
    }

    .bottom-nav a {
        background-color: #433737 !important;
        color: #ffffff;
    }

    .bottom-nav a.active {
        background-color: #433737 !important;
        color: #ffffff;
    }

    .bottom-nav a:active {
        background-color: #433737 !important;
        color: #ffffff;
    }
}
