/* ======= Layout général ======= */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    height: 100svh;
    min-height: 100svh;
    display: grid;
    font-size: 12px;
    /* OUVERTE */
    grid-template-columns:2fr 3fr 1fr 0.5fr;
    grid-template-rows: 61px 1fr 50px;
    grid-template-areas:
        "logo header identifier right"
        "sidebar main main main"
        "footer footer footer footer";

    transition: grid-template-columns 0.3s;
}

body.collapsed {
    grid-template-columns: 2fr 3fr 1fr 0.5fr;
}

.badge-new {
    font-size: 11px;
    padding: 1px 5px;
    background: #52c41a;
    color: white;
    border-radius: 4px;
}

a {
    color: inherit;
}

a hover {
    color: inherit;
}

a.white {
    color: white;
    text-decoration: none;
}

/* ======= Header ======= */
logo {
    grid-area: logo;
    background: #5E5E5E;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 5vw;
}

header {
    grid-area: header;
    background: #5E5E5E;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 5vw;
}

identifier {
    grid-area: identifier;
    background: #5E5E5E;
    color: white;
    display: flex;
    align-items: center;
    /*padding: 0 5vw;*/
    word-break: break-all;
}
right {
    grid-area: right;
    background: #5E5E5E;
    color: white;
    display: flex;
    align-items: center;
    /*padding: 0 5vw;*/
    word-break: break-all;
}

/* ======= Sidebar ======= */
aside {
    grid-area: sidebar;
    background: #D6D6D6;
    padding: 10px;
    overflow-y: auto;
}

/* Bouton toggle sidebar */
.toggle-btn {
    padding: 8px;
    cursor: pointer;
    border: none;
    background: #D6D6D6;
    color: #2D69B0;
    font-size: 14px;

    /* supprime width 100% pour pouvoir les mettre côte à côte */
    width: auto;

    /* optionnel : un petit gap entre les boutons */
    margin-right: 5px;
}

.button-group {
    display: flex;
    gap: 5px;
    /* espace entre les boutons */
    margin-bottom: 10px;
    justify-content: flex-end;
    /* aligne les boutons à droite */

}


.menu h3 {
    margin-top: 0;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    font-weight: normal;
}

/* Flèche (ou espace réservé) */
.arrow {
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 2px;
    transition: transform 0.3s;
    color: #2D69B0;
}

/* applique la rotation à toutes les flèches avec la classe .open */
.arrow.open {
    transform: rotate(90deg);
}

/* Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 16px;
}

.submenu.open {
    max-height: 2000px;
}

/* Chaque niveau s’indente automatiquement */
.submenu .submenu {
    padding-left: 16px;
}


/* ======= Main ======= */
main {
    grid-area: main;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ======= Footer ======= */
footer {
    grid-area: footer;
    background: #5E5E5E;
    color: white;
    text-align: center;
    line-height: 50px;
}

/* ======= Search box ======= */
input,
textarea,
select,
button .search {
    margin-top: 1em;
    color: initial;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: start;
    width: 300px;
    height: 28px;
}

.search {
    min-height: 64px;
    padding-top: 15px;
    min-width: 10px;
    list-style-type: none;
}

#autocompleteList {
    display: none;
    /*justify-content: center;*/
    /* align-items: center; */
    flex-direction: column;
    /*gap: 10px;*/
    border: 1px solid #557AA8;
    z-index: 2;
    position: absolute;
    background-color: white;
    max-height: 200px;
    overflow-y: auto;
    top: 8vh;
    list-style-type: none;
    min-width: 35vw;
    width: 35vw;
    box-sizing: border-box;
}

#autocompleteList li {
    border-bottom: 1px solid #557AA8;
    padding: 5px;
    min-width: 35vw;
    color: black;
}