/* ========================================
   NAVBAR DOCTOASSIST
   ======================================== */


/* =========================================================
   NAVBAR - BASE
   ========================================================= */

.navbar {
    background-color: #34657f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}


/*
 * Le container Bootstrap sert de repère
 * pour le badge desktop.
 */
.navbar>.container {
    position: relative;
}


/* =========================================================
   LOGO
   ========================================================= */

.navbar-logo {
    height: 60px;
    transition: height 0.3s ease;
}


/* =========================================================
   LIENS PRINCIPAUX
   ========================================================= */

.nav-link {
    color: white !important;
    font-size: 1rem;
    position: relative;
    display: inline-block;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        font-size 0.2s ease;
}


.nav-link:hover {
    color: #dceaf2 !important;
}


/* Soulignement au survol */

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #dceaf2;
    transition: width 0.3s ease;
}


.nav-link:hover::after {
    width: 100%;
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.dropdown-menu {
    background-color: #34657f;
}


.dropdown-item {
    color: white;
}


.dropdown-item:hover {
    background-color: #2b4e66;
}


.nav-item.dropdown .dropdown-menu {
    border: 1px solid white;
    background-color: #34657f;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1);
}


.nav-item.dropdown .dropdown-item {
    color: white !important;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}


.nav-item.dropdown .dropdown-item:hover,
.nav-item.dropdown .dropdown-item:focus {
    color: white !important;
    background-color: #2b4e66;
}


/* =========================================================
   NAVBAR COLLAPSE
   ========================================================= */

.navbar-collapse {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: right;
    width: 100%;
}


/* Suppression des contours Bootstrap */

.nav-item:focus,
.nav-item:active,
.nav-link:focus,
.nav-link:active {
    outline: none;
    box-shadow: none;
}


/* =========================================================
   BOUTON HAMBURGER
   ========================================================= */

.navbar-toggler {
    border: none;
    background: transparent;
}


.navbar-toggler:focus {
    box-shadow: none;
}


.navbar-toggler-icon {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"%3E%3Cpath fill="%23FFFFFF" d="M0 6h30v3H0zm0 7h30v3H0zm0 7h30v3H0z"%3E%3C/path%3E%3C/svg%3E');
}


/* =========================================================
   PROCHAINE SESSION - BADGE DESKTOP
   ========================================================= */

.next-session-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform:
        translate(-50%, -50%) rotate(-2deg);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #356d83;
    border-radius: 8px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12);
    line-height: 1.15;
    white-space: nowrap;
    z-index: 20;
    transition:
        padding 0.2s ease,
        gap 0.2s ease,
        transform 0.2s ease;
}


/* Icône calendrier */

.next-session-badge .bi {
    font-size: 1.6rem;
    transition: font-size 0.2s ease;
}


/* Les trois lignes */

.next-session-badge>div {
    display: flex;
    flex-direction: column;
}


/* PROCHAINE SESSION */

.next-session-label {
    font-size: 0.70rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: font-size 0.2s ease;
}


/* du 4 janvier 2027 */

.next-session-badge strong {
    font-size: 1rem;
    font-weight: 700;
    transition: font-size 0.2s ease;
}


/* au 26 avril 2027 */

.next-session-end {
    font-size: 0.72rem;
    opacity: 0.8;
    transition: font-size 0.2s ease;
}


/* =========================================================
   PROCHAINE SESSION - VERSION MOBILE / TABLETTE
   ========================================================= */

/*
 * Cachée par défaut.
 * Elle sera activée uniquement sous 992px.
 */

.next-session-mobile {
    display: none;
}


/* =========================================================
   GRAND DESKTOP
   1200px ET PLUS
   ========================================================= */

@media (min-width: 1200px) {

    /* Logo */

    .navbar-logo {
        height: 130px;
    }


    /* Menu */

    .nav-link {
        font-size: 0.9rem;
    }


    /* Badge desktop */

    .next-session-badge {
        display: flex;
        padding: 8px 15px;
        gap: 10px;
    }


    .next-session-badge .bi {
        font-size: 1.6rem;
    }


    .next-session-label {
        font-size: 0.70rem;
        letter-spacing: 0.04em;
    }


    .next-session-badge strong {
        font-size: 1rem;
    }


    .next-session-end {
        font-size: 0.72rem;
    }


    /* Version mobile cachée */

    .next-session-mobile {
        display: none;
    }
}


/* =========================================================
   PETIT DESKTOP
   992px → 1199.98px

   Badge conservé dans la navbar mais plus compact.
   ========================================================= */

@media (min-width: 992px) and (max-width: 1199.98px) {

    /* Logo plus compact */

    .navbar-logo {
        height: 95px;
    }


    /* Menu plus compact */

    .nav-link {
        font-size: 0.72rem;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }


    /* Dropdown */

    .nav-item.dropdown .dropdown-item {
        font-size: 0.75rem;
    }


    /* Badge desktop plus compact */

    .next-session-badge {
        display: flex;
        padding: 4px 8px;
        gap: 5px;
        border-radius: 6px;
        transform:
            translate(-50%, -50%) rotate(-1deg);
    }


    .next-session-badge .bi {
        font-size: 1rem;
    }


    .next-session-label {
        font-size: 0.48rem;
        letter-spacing: 0.015em;
    }


    .next-session-badge strong {
        font-size: 0.68rem;
    }


    .next-session-end {
        font-size: 0.52rem;
    }


    /* Version mobile cachée */

    .next-session-mobile {
        display: none;
    }
}


/* =========================================================
   MOBILE + TABLETTE
   MOINS DE 992px

   Le badge blanc disparaît.
   Une ligne compacte est affichée sous le logo/hamburger.
   ========================================================= */

@media (max-width: 991.98px) {

    /*
     * Le container peut maintenant utiliser plusieurs lignes.
     *
     * Ligne 1 :
     * logo + hamburger
     *
     * Ligne 2 :
     * prochaine session
     *
     * Ligne 3 :
     * menu lorsqu'il est ouvert
     */

    .navbar>.container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }


    /* Logo en première position */

    .navbar-brand {
        order: 1;
    }


    /* Hamburger à droite */

    .navbar-toggler {
        order: 2;
        margin-left: auto;
    }


    /* Gros badge desktop caché */

    .next-session-badge {
        display: none;
    }


    /*
     * Petite ligne "Prochaine session".
     * Elle prend toute la largeur sous
     * le logo et le hamburger.
     */

    .next-session-mobile {
        order: 3;
        display: flex;
        flex: 0 0 100%;
        width: 100%;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 3px;
        padding: 5px 8px;
        color: white;
        font-size: 0.72rem;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        border-top:
            1px solid rgba(255, 255, 255, 0.18);
        border-bottom:
            1px solid rgba(255, 255, 255, 0.12);
    }


    /* Calendrier */

    .next-session-mobile .bi {
        font-size: 0.85rem;
        opacity: 0.95;
    }


    /* "Prochaine session" */

    .next-session-mobile-label {
        font-size: 0.68rem;
        font-weight: 400;
        opacity: 0.85;
    }


    /* Dates */

    .next-session-mobile-date {
        font-size: 0.74rem;
        font-weight: 700;
    }


    /*
     * Le menu Bootstrap passe après
     * la ligne "Prochaine session".
     */

    .navbar-collapse {
        order: 4;
        flex-basis: 100%;
        width: 100%;
        flex-direction: column;
        text-align: center;
    }
}


/* =========================================================
   TABLETTE
   768px → 991.98px
   ========================================================= */

@media (min-width: 768px) and (max-width: 991.98px) {

    /* Logo */

    .navbar-logo {
        height: 80px;
    }


    /* Menu */

    .nav-link {
        font-size: 0.95rem;
    }


    /* Dropdown */

    .navbar-nav .nav-item.dropdown {
        position: relative;
    }


    .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: absolute;
        left: 100%;
        top: 0;
        margin-top: 0;
        white-space: nowrap;
    }


    /*
     * Sur tablette, on peut afficher
     * légèrement plus grand.
     */

    .next-session-mobile {
        gap: 8px;
        padding: 6px 10px;
    }


    .next-session-mobile .bi {
        font-size: 0.9rem;
    }


    .next-session-mobile-label {
        font-size: 0.72rem;
    }


    .next-session-mobile-date {
        font-size: 0.78rem;
    }
}


/* =========================================================
   MOBILE
   MOINS DE 768px
   ========================================================= */

@media (max-width: 767.98px) {

    /* Navbar */

    .navbar {
        padding-left: 0.2rem;
        padding-right: 0.2rem;
    }


    /* Logo */

    .navbar-logo {
        height: 70px !important;
    }


    /* Liens du menu */

    .nav-link {
        font-size: 0.95rem;
        padding: 0.25rem 0;
    }


    /* Dropdown */

    .navbar-nav .nav-item.dropdown {
        position: relative;
    }


    .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-top: 0;
        border: 2px solid white;
        background-color: #34657f;
        white-space: nowrap;
        width: max-content;
        min-width: unset;
        max-width: 90vw;
        overflow-x: auto;
        box-shadow:
            0 4px 6px rgba(0, 0, 0, 0.1);
    }


    .navbar-nav .dropdown-item {
        color: white !important;
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }


    .navbar-nav .dropdown-item:hover {
        background-color: #2b4e66;
        color: white !important;
    }


    /*
     * Barre session encore plus discrète
     * sur smartphone.
     */

    .next-session-mobile {
        gap: 5px;
        margin-top: 2px;
        padding: 4px 5px;
    }


    .next-session-mobile .bi {
        font-size: 0.78rem;
    }


    .next-session-mobile-label {
        font-size: 0.62rem;
    }


    .next-session-mobile-date {
        font-size: 0.68rem;
    }
}


/* =========================================================
   TRÈS PETITS MOBILES
   MOINS DE 380px
   ========================================================= */

@media (max-width: 379.98px) {

    /*
     * Sur les écrans très étroits,
     * on réduit encore légèrement
     * pour garder toute la session
     * sur une seule ligne.
     */

    .next-session-mobile {
        gap: 4px;
        padding-left: 2px;
        padding-right: 2px;
    }


    .next-session-mobile .bi {
        font-size: 0.72rem;
    }


    .next-session-mobile-label {
        font-size: 0.56rem;
    }


    .next-session-mobile-date {
        font-size: 0.62rem;
    }
}