/* Mise en page mobile et tablette — CNRHP */

#burger {
    display: none;
}

@media (max-width: 900px) {
    body.site-shell {
        height: 100dvh;
        max-height: 100dvh;
    }

    body {
        overflow-x: hidden;
    }

    .site-header {
        width: 95%;
        margin: 0 auto;
    }

    .site-header table,
    .site-header tbody,
    .site-header tr,
    .site-header td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .site-header table {
        width: 100%;
    }

    .header-banner {
        flex: 1 1 100%;
        order: -1;
        padding: 0.5rem 0;
    }

    .header-banner img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .site-header tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }

    .header-logo,
    .header-aphp {
        flex: 1 1 40%;
        max-width: 48%;
    }

    .header-logo img,
    .header-aphp img {
        width: 100%;
        max-height: 72px;
        height: auto;
        object-fit: contain;
    }

    #burger {
        display: block;
        width: 95%;
        max-width: 1200px;
        margin: 0.5rem auto;
        padding: 14px;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 1.1rem;
        border: none;
        background: #084586;
        color: #fff;
        cursor: pointer;
        border-radius: 4px;
    }

    #burger:hover,
    #burger:focus-visible {
        background-color: #003366;
    }

    #Menu {
        display: none;
        width: 95%;
        margin: 0 auto 0.75rem;
        float: none;
        overflow: hidden;
        border-radius: 4px;
    }

    #Menu.open {
        display: block;
    }

    #Menu > ul {
        width: 100%;
    }

    #Menu > ul > li.Menu-debut,
    #Menu > ul > li.Menu-deroule {
        float: none;
        width: 100%;
        display: block;
        background-image: none;
        background-color: #084586;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    #Menu > ul > li > .menu-trigger {
        width: 100%;
        min-height: 3rem;
        height: auto;
        padding: 12px 10px;
        font-size: 1rem;
        box-sizing: border-box;
    }

    #Menu > ul > li.open > .menu-trigger {
        background-color: #003366;
    }

    /* Sous-menus en accordéon (clic, pas survol) */
    #Menu .Menu-deroule:hover > ul,
    #Menu .Menu-deroule:focus-within > ul {
        position: static;
        display: block;
        width: 100%;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease;
    }

    #Menu .Menu-deroule.open > ul {
        position: static;
        display: block;
        width: 100%;
        max-height: 1200px;
        opacity: 1;
        overflow: visible;
    }

    #Menu .Menu-deroule.open > ul .Fond-deroule {
        float: none;
        width: 100%;
        background-image: none;
        background-color: #06366a;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    #Menu .Menu-deroule.open > ul .Fond-deroule a {
        width: 100%;
        height: auto;
        min-height: 2.75rem;
        padding: 10px 12px;
        font-size: 0.95rem;
        box-sizing: border-box;
        white-space: normal;
        line-height: 1.35;
    }

    #Menu .Menu-deroule.open > ul .clear {
        display: none;
    }

    .site-main {
        flex: 1 1 auto;
        min-height: 120px;
        position: relative;
        overflow: hidden;
    }

    #mainFrame {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }

    .site-bas {
        flex: 0 0 auto;
        width: 100%;
    }

    #basFrame {
        width: 100%;
        display: block;
    }
}

@media (max-width: 480px) {
    .header-logo,
    .header-aphp {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .header-logo img {
        max-height: 56px;
    }

}
