/* Style pour l'overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Style pour le popup lui-même */
.popup {
    width: 73%;
    max-width: 1200px;
    height: 70%;
    background: white;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Bouton de fermeture */
.close-btn {
    font-size: 24px;
    font-weight:600;
    cursor: pointer;
    margin: -5px 0;
    padding: 0;
    color:#797979;
}

/* Style du header dans le popup */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
}

/* Style pour les boutons de navigation dans le popup */
.popup-nav {
    display: flex;
    justify-content: flex-start;

}

.popup-nav a {
    text-decoration: none;
    color: #797979;
    font-weight: bold;
    font-weight: bold;
    margin-right: 20px;
    cursor: pointer;
    display: inline-flex;
}

.popup-nav a.active {
    font-weight: 600 !important;
}


.content-create {
    height:92%;
    display: flex;
    /* gap: 20px; */
    justify-content: flex-start;
    flex-direction: column;
}

.content-manage {
    height: 92%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.general-content {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 15px;
    justify-content: flex-start;
}

div#content-create {
    justify-content: center;
}

/*.text-container, .images-container, .manage-container {
    display: flex;
    height: 108%;
    gap: 15px;
    flex-direction: column;
}*/
.text-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.manage-container {
    /* box-shadow: inset 2px 2px 6px 0px #1d1d1d14; */
    border-radius: 3px;
    background-color: white;
}

.button-container {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    gap:20px;
}

.description {
    min-height: 150px !important;
}

.text {
    width: 66%;
}

#date{
    width:calc(66% - 5px);
}

.category-select {
    width: 66%;
    padding: 3px 0;
    border:1px solid #e1e1e1;
    font-size: 1em;
    color:gray;
    border-radius: 3px;
}

option {
    padding: 2px 0;
}

h2 {
    padding:0;
    margin:0;
    vertical-align: top;
}

.title-box {
    display: flex;
    margin: 0;
    padding: 0;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
}

/*BUTTONS*/

/* Styles pour les boutons Project et Publications */
.create-buttons, .specific-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.button-special {
    width: 150px;
    padding: 12px 0;
    background-color: #f0f0f066;
    color: #aeaeae;
    font-size: 1.2em;
    border: 1px solid #cccccc2e;
    box-shadow: inset 2px 2px 2px #fff, inset -2px -2px 2px #0000001f, 2px 2px 5px rgb(155 155 155 / 10%);
    margin: 0 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-special:hover {
    background-color: #e0e0e059;
}

.search-ok {
    position: absolute;
    left: 10px;
    top: 9px;
    color: gray;
}

#searchBox {
    min-height: 35px !important;
    border-radius: 19px;
    padding-left: 30px;
    font-size: 1em;
    padding: 0 0 0 30px!important;
}

.choice {
    display: flex; /* Utilisation de Flexbox */
    align-items: center; /* Centre les éléments verticalement */
    gap: 20px;
}

/* Style général pour les select */
.select-style {
    display: inline-block;
    position: relative;
    padding: 5px 5px;
    background-color: white;
    border: 1px solid #ededed;
    border-radius: 4px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 1em;
    color: gray;
    width: 130px; /* ou 100% pour une largeur flexible */
}

/* Icône de flèche personnalisée */
.select-style:after {
    content: '\25BC'; /* Flèche vers le bas */
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 12px;
    color: #aaa;
    pointer-events: none; /* Empêche l'interaction avec l'icône */
}

/* Style lorsque l'utilisateur interagit avec le select */
.select-style:hover {
    border-color: #888;
}

.select-style:focus {
    border-color: #b8b8b8;
    outline: none;
}

/* Style pour le conteneur du select pour gérer le positionnement */
.select-container {
    margin: 10px;
}


/*MODALE*/

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000000000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 30%; /* Could be more or less, depending on screen size */
}

/* Lorsque .modal est ouverte */
.modal.display-block {
    display: flex;
    /* Autres styles pour la modale visible */
}
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.hidden {
    display: none !important;
  }

#modal-text{
    margin:15px;
}

.simple-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* initialement caché */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* ajustez selon votre z-index existant pour les modales */
}

.simple-modal-content {
    background: white;
    gap: 15px;
    display: flex;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    align-items: center;
}


/*CHARGEMENT D'IMAGES*/

.upload-area {
    width: 100%;
    height: 300px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* margin-top: 20px; */
    font-size: 150px;
    color: #ccc;
    
}

.images-container {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    /* margin-top: 20px; */
    flex-direction: row;
    gap:0;
    height: 35% !important;
}

/* Styliser la barre de défilement pour Webkit (Chrome, Safari, etc.) */
.images-container::-webkit-scrollbar {
    width: 10px; /* Largeur de la barre de défilement */
    height: 10px; /* Hauteur de la barre de défilement pour un défilement horizontal */
}

.images-container::-webkit-scrollbar-track {
    background: #f1f1f1; /* Couleur de la piste */
}

.images-container::-webkit-scrollbar-thumb {
    background: #888; /* Couleur de la poignée de défilement */
}

.images-container::-webkit-scrollbar-thumb:hover {
    background: #555; /* Couleur de la poignée lors du survol */
}


.image-wrapper {
    position: relative;
    /* margin-right: 10px; */
    /* overflow-y: hidden; */
}

.image-wrapper img {
    width: auto;
    height: 100%;
}

.image-wrapper input[type="checkbox"] {
    position: absolute;
    top: 3px;
    left: 3px;
}


/* MANAGE PART CSS*/

.manage-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    /* height: auto; */ /* Adaptatif selon le contenu, ou définis une hauteur maximale */
    overflow-y: auto;
    padding: 5px;
    gap: 10px; /* Espacement entre les modules */
    height: 74%;
}

.project-thumbnail {
    width: calc(33.33% - 7.5px); /* Calcule pour trois éléments par ligne, ajuster le gap si nécessaire */
    border: 1px solid #cccccc59;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    border-radius:2px;
    box-shadow: 2px 2px 7px rgba(0, 0, 0, 0.1); /* Ajoute l'ombre portée */
}

.project-header{
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7em;
}
.project-content img {
    width: 100%; /* L'image prend toute la largeur du module */
    height: auto;
}

.project-content{
    padding:10px 0;
}

.project-footer{
    display: flex;
    width: 100%;
    gap: 10px;
    justify-content: flex-end;
}

#button-container{
    display: flex;
    justify-content: flex-end;
}

#secondarySelect{
    width: 150px;
}

/* New classes for the edit overlay and popup */
.edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(255 255 255 / 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100000000000;
}

.edit-popup {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 75%;
    /* max-width: 900px; */
    /* width: 100%; */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1100000000001;
}

.edit-popup-header {
    display: flex;
    justify-content: space-between;
}

.edit-close-btn {
    cursor: pointer;
    font-size: 1.5em;
}

.edit-popup-content {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.edit-popup-footer {
    text-align: right;
}

.vignette {
    position: relative; /* Ajouté pour positionner correctement l'overlay */
    width: 150px;
    height: 150px;
    box-shadow: inset 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden; /* Ajouté pour s'assurer que l'overlay ne déborde pas */
}

.vignette img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assurez-vous que l'image couvre entièrement la vignette */
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    display: none; /* Caché par défaut */
    text-align: center;
    cursor: pointer;
}

.vignette:hover .overlay-text {
    display: block; /* Affiche le texte au survol */
}


.serie-images{
    width: 100%;
    box-shadow: inset 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    display: flex;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-direction: row;
    user-select: none;
    align-items: center;
}

.serie-images div {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab; /* Indique que l'élément peut être déplacé */
}

.serie-images div:active {
    cursor: grabbing; /* Indique que l'élément est en cours de déplacement */
}

form#project-details-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.delete-button {
    position: absolute;
    top: -10px;
    right: 3px;
    cursor: pointer;
    color: white;
    font-size: 40px;
    z-index: 10000000000000000000;
}

.add-image-button:hover {
    border-color: #888;
    color: #666;
}


.image-wrapper {
    height: 150px;
    margin-right: 10px;
    position: relative;
    background-color: #eaeaea;
}

.project-image {
    height: 100%;
    width: auto;
    object-fit: cover;
}

.image-wrapper {
    height: 150px;
    margin-right: 10px;
    position: relative;
    background-color: #eaeaea;
}

.add-image-button {
    height: 25px;
    width: 25px;
    padding: 20px;
    color: white;
    background-color: #ddd;
    border: none;
    font-size: 41px;

}
