@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');
*{
margin: 0;
padding: 0;
outline: none;
text-decoration: none;
list-style: none;
list-style-type:none ;
scroll-behavior: smooth;
box-sizing: border-box;
}
body{
display: grid;
grid-template-columns:200px 1fr;
grid-template-rows:  1fr;
grid-template-areas: "nav main" ;
font-family: "Poppins" , sans-serif;
}
nav{
grid-area: nav;
background-color: black;
position: sticky;
top: 0;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-items: flex-start;
align-self: start !important;
justify-content:start;
height: auto;
min-height: 80px;
height: 100%;
}
.btnContainer{
display: inline-flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: space-around;
justify-content: flex-start;
}
main{
grid-area: main;
background-color: whitesmoke;
position: relative;
height: 100%;
min-height: 100dvh;
text-align: center;
}

.container{
margin: 10px;
display: flex;
flex-direction: column !important;
flex-direction: row;
justify-content: space-around;
align-items: center;

}


h1 {
        margin-bottom: 20px;
    }

    form {
        background-color: rgba(255, 255, 255, 0.12);
        padding: 25px;
        border-radius: 24px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(2px);
        
        border: 1px solid rgba(255, 255, 255, 0.3);
        width: 450px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    td {
        padding: 15px;
        border: 1px solid gray;
        text-align: center !important;
    }

    label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
    }

    input,
    select, textarea {
        width: 100%;
        padding: 8px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 3px;
        box-sizing: border-box;
    }

    button[type="submit"] {
        background-color: #4CAF50;
        color: white;
        padding: 10px 15px;
        border: none;
        border-radius: 3px;
        cursor: pointer;
        font-size: 16px;
    }

    button[type="submit"]:hover {
        background-color: #45a049;
    }

    .error-message {
        color: red;
        margin-top: 10px;
    }

    .success-message {
        color: green;
        margin-top: 10px;
    }
td {
            padding: 10px;
        }

        .boxContainer {
            display: inline-flex;
            flex-direction: row;
            flex-wrap: wrap;
            width:100%;
            
        }

        .box {
            margin: 15px;
            width: 100%;
            max-width: 1500px;
            display: inline-flex;
            flex-wrap: wrap;
            flex-direction: row;
            align-items: center;
            justify-content: space-around;
            text-align: center;
        }

        .btnSupprimer {
            /* background-color: red !important; */
            padding: 5px !important;
        }

        /* style régie  */
.form-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.select-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.select-trigger {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    color: #333;
}

.select-trigger.active {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.select-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-trigger svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.select-trigger.active svg {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.select-dropdown input[type="text"] {
    width: calc(100% - 20px);
    padding: 8px 10px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.select-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.select-dropdown li {
    padding: 10px;
    cursor: pointer;
    color: #333;
}

.select-dropdown li:hover,
.select-dropdown li.selected {
    background-color: #f0f0f0;
}

.select-dropdown li.no-results {
    padding: 10px;
    color: #777;
    font-style: italic;
    cursor: default;
}

.select-dropdown li.no-results:hover {
    background-color: transparent;
}


/* style overlay --------------------------------*/
.overlay {
    /* Caché par défaut */
    display: none;

    /* Positionné par-dessus tout le reste */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);

    /* Assure qu'il est au-dessus des autres éléments */
    z-index: 1000;

    /* Centre le contenu de la modale */
    justify-content: center;
    align-items: center;
}

/* Classe ajoutée par JavaScript pour rendre la modale visible */
.overlay.visible {
    display: flex;
}

.modal-contenu {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    z-index: 1001;
    /* Au-dessus de l'overlay */
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

.close-btn:hover {
    color: #000;
}

/* Vos autres styles de formulaire peuvent rester ici ou être déplacés dans main.css */
form {
    background-color:rgba(255, 255, 255, 0.3) ;
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    width: 100%;
    /* S'adapte au conteneur modal-contenu */
    box-sizing: border-box;
}
.boxContainer {
        display: inline-flex;
        flex-wrap: wrap;
        flex-direction: column;
        gap: 20px;
        justify-content: center;
        padding: 20px;
    }

    .box {
        background-color: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .box a {
        background-color: black;
        color: white;
        padding: 10px 15px;
        text-decoration: none;
        border-radius: 4px;
        display: inline-block;
        margin-bottom: 20px;
    }

    form {
        background-color: rgba(255, 255, 255, 0.12);
        padding: 25px;
        border-radius: 24px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3);
        width: 100%;
        max-width: 500px;
        box-sizing: border-box;
    }

    form h1 {
        margin-bottom: 20px;
        font-size: 1.5em;
        text-align: center;
        color: #333;
    }

    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    input[type="text"],
    input[type="date"],
    input[type="datetime-local"],
    select, input[type="hiden"] {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-sizing: border-box;
        font-family: 'Poppins', sans-serif;
    }

    input[type="submit"] {
        background-color: #5cb85c;
        color: white;
        padding: 10px 20px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        width: 100%;
    }

    input[type="submit"]:hover {
        background-color: #4cae4c;
    }

    .form-message {
        padding: 10px;
        margin-bottom: 15px;
        border-radius: 4px;
        text-align: center;
    }