:root {

    --primary-color: #1a2a1f;

    --secondary-color: #4CAF50;

    --accent-color: #8BC34A;

    --text-color: #E8F5E9;

    --background-color: #0a0f0c;

    --range-background: #2c3e50;

    --card-background: #1e2a23;

    --card-text-color: #E8F5E9;

    --card-hover-color: #2a3a2f;

    --sidebar-width: 250px;

    --transition-duration: 0.3s;

}



.avis-header {

    margin-bottom: 2rem;

    background-color: var(--card-background);

    padding: 1rem;

    border-radius: 10px;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    text-align: center;

    border: 1px solid rgba(76, 175, 80, 0.2);

}



.avis-header h1 {

    font-size: 2rem;

    color: #ffffff;

    margin: 0;

    text-align: center;

}



/* Conteneur global pour centrer tous les éléments de la page */

.page-container {

    max-width: 1200px;

    margin: 2rem auto;

    padding: 1rem;

}



/* Titre principal de la page */

.page-container h1 {

    font-size: 2.5rem;

    color: #a5d6a7;

    margin-bottom: 1.5rem;

    text-align: center;

}



/* Section des avis avec grille */

#avis-section {

    width: 100%;

    background-color: var(--card-background);

    border-radius: 8px;

    padding: 1.5rem;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    border: 1px solid rgba(76, 175, 80, 0.2);

    min-height: 500px;

}



#avis-section h2 {

    font-size: 1.8rem;

    color: var(--secondary-color);

    margin-bottom: 1.5rem;

    text-align: center;

}



#avis-section strong {

    font-size: 1.1rem;

    color: #FFFFFF;

    text-decoration: underline;

}



/* Grille d'avis */

#avis-list {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

    gap: 1.5rem;

}



/* Avis individuel */

.avis {

    position: relative;

    max-width: 250px;

    /* Limitez la largeur de chaque avis */

    padding: 1rem;

    background-color: #2c3e50;

    border: 1px solid #37474f;

    border-radius: 8px;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);

    overflow: hidden;

    /* Empêche les éléments de déborder */

}



.avis:hover {

    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);

}



.avis .note {

    font-size: 1.2rem;

    color: #ffd54f;

    margin-bottom: 0.5rem;

}



.avis p {

    margin: 0.5rem 0;

    font-size: 1rem;

    color: #b0bec5;

    line-height: 1.6;

    text-align: center;

}



.avis .date {

    text-align: right;

    font-size: 0.85rem;

    color: #78909c;

    margin-top: 0.5rem;

}



.avis img {

    max-width: 100%;

    height: auto;

    margin-top: 0.8rem;

    border-radius: 4px;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);

}



/* Disposition en ligne des photos dans chaque avis */

.avis .photo-gallery {

    display: flex;

    gap: 8px;

    margin-top: 0.5rem;

    justify-content: center;

}



.avis .photo-gallery img {

    width: 70px;

    height: 70px;

    object-fit: cover;

    cursor: pointer;

    border-radius: 4px;

    transition: transform 0.2s ease;

}



.avis .photo-gallery img:hover {

    transform: scale(1.05);

}



/* Conteneur du formulaire en pleine largeur avec disposition en deux colonnes */

#ajouter-avis {

    max-width: 100%;

    margin: 2rem auto;

    padding: 2rem;

    background-color: var(--card-background);

    border-radius: 8px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    border: 1px solid rgba(76, 175, 80, 0.2);

}



#ajouter-avis h2 {

    font-size: 1.8rem;

    color: var(--secondary-color);

    margin-bottom: 1.5rem;

    text-align: center;

}



/* Styles pour la section de notation par étoiles */

/* Styles pour la section de notation par étoiles */

.star-rating {

    display: inline-flex;

    cursor: pointer;

    font-size: 2rem;

    color: #ccc;

    /* Gris pour les étoiles non sélectionnées */

    gap: 0.2rem;

}



.star-rating .star.selected {

    color: #ffd700;

    /* Couleur dorée pour les étoiles sélectionnées */

}



.star-rating .star.hover {

    color: #ffd700;

    /* Couleur dorée pour les étoiles survolées */

}



/* Disposition en deux colonnes pour les champs */

#ajouter-avis form {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1.5rem;

    align-items: start;

}



/* Styles pour les champs de formulaire à gauche */

.form-fields label,

.photo-section label {

    font-size: 1rem;

    color: #b0bec5;

    margin-top: 1rem;

    display: block;

}



.photo-section label {

    text-align: center;

}



.form-fields select,

.form-fields textarea {

    width: 100%;

    padding: 0.6rem;

    font-size: 1rem;

    margin-top: 0.5rem;

    border: 1px solid #37474f;

    border-radius: 4px;

    background-color: #2c3e50;

    color: #eceff1;

    transition: border-color 0.3s ease;

    font-family: 'Comfortaa', cursive;

    height: 140px;

}



/* Conteneur pour les champs de fichier et prévisualisations côte à côte */

.photo-section .photo-upload-group {

    display: flex;

    justify-content: space-evenly;

    gap: 1rem;

}



/* Style pour chaque zone d'ajout de photo */

.photo-preview {

    width: 100%;

    max-width: 200px;

    /* Augmentez cette valeur pour agrandir la preview */

    height: 200px;

    /* Hauteur correspondante pour conserver un carré */

    border: 1px solid #37474f;

    border-radius: 4px;

    background-color: #2c3e50;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    position: relative;

    cursor: pointer;

}



.photo-preview input[type="file"] {

    position: absolute;

    opacity: 0;

    width: 100%;

    height: 100%;

    cursor: pointer;

}



.photo-preview img {

    width: 100%;

    height: auto;

    display: block;

    object-fit: cover;

}



/* Placeholder pour le texte "Choisir un fichier" au centre */

.photo-preview::before {

    content: "Choisir une photo";

    color: #b0bec5;

    font-size: 0.9rem;

    text-align: center;

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    pointer-events: none;

}



/* Masquer le texte lorsque l'image est active */

.photo-preview.has-image::before {

    content: "";

}



.photo-preview img {

    width: 100%;

    height: auto;

    display: block;

    object-fit: cover;

}



.photo-preview img.active {

    display: block;

}



.photo-preview input[type="file"]:focus~img.active,

.photo-preview input[type="file"]:hover~img.active {

    display: none;

}



/* Bouton de soumission */



/* Centrage du bouton dans le formulaire */

.submit-container {

    display: flex;

    justify-content: center;
    /* Centrage horizontal */

    margin-top: 2rem;

}



.pushable {

    position: relative;

    background: transparent;

    padding: 0px;

    border: none;

    cursor: pointer;

    outline-offset: 4px;

    outline-color: #8BC34A;

    transition: filter 250ms;

    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

}



.shadow {

    position: absolute;

    top: 0;

    left: 0;

    height: 100%;

    width: 100%;

    background: #0a0f0c;

    border-radius: 8px;

    filter: blur(2px);

    will-change: transform;

    transform: translateY(2px);

    transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);

}



.edge {

    position: absolute;

    top: 0;

    left: 0;

    height: 100%;

    width: 100%;

    border-radius: 8px;

    background: linear-gradient(to right,

            #1a2a1f 0%,

            #2a3a2f 8%,

            #1a2a1f 92%,

            #0a1a0f 100%);

}



.front {

    display: block;

    position: relative;

    border-radius: 8px;

    background: #4CAF50;

    padding: 16px 32px;

    color: #000000;

    font-family: 'Comfortaa', sans-serif;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: 1.5px;

    font-size: 1.2rem;

    transform: translateY(-4px);

    transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);

}



.pushable:hover {

    filter: brightness(110%);

}



.pushable:hover .front {

    transform: translateY(-6px);

    transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);

    background: #8BC34A;

}



.pushable:active .front {

    transform: translateY(-2px);

    transition: transform 34ms;

    background: #3a9a3f;

}



.pushable:hover .shadow {

    transform: translateY(4px);

    transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);

}



.pushable:active .shadow {

    transform: translateY(1px);

    transition: transform 34ms;

}



.pushable:focus:not(:focus-visible) {

    outline: none;

}



/* Message pour les utilisateurs non connectés */

/* Style pour le message de connexion */

.message-connect {

    margin: 2rem auto;

    background-color: var(--card-background);

    border: 2px solid #37474f;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    text-align: center;

    color: #ff5252;

    /* Couleur du texte pour attirer l'attention */

    font-size: 1.5rem;

    text-decoration: underline;

    font-weight: bold;

    max-width: 100%;

    padding: 2rem;

    border-radius: 8px;

    border: 1px solid rgba(76, 175, 80, 0.2);

}



.message-connect p {

    margin: 0;

}



/* Message de confirmation ou d'erreur */

.message-feedback {

    text-align: center;

    font-size: 1rem;

    margin-top: 1rem;

    padding: 0.8rem;

    color: #fff;

    background-color: #43a047;

    border-radius: 4px;

}



/* Styles du modal */

.modal {

    display: none;

    /* Caché par défaut */

    position: fixed;

    z-index: 1000;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    background-color: rgba(0, 0, 0, 0.8);

    justify-content: center;

    align-items: center;

}



.modal-content {

    max-width: 90%;

    max-height: 90%;

    border-radius: 8px;

}



.close {

    position: absolute;

    top: 10px;

    right: 25px;

    color: white;

    font-size: 35px;

    font-weight: bold;

    cursor: pointer;

}



.prev,

.next {

    cursor: pointer;

    position: absolute;

    top: 50%;

    width: auto;

    padding: 16px;

    color: white;

    font-weight: bold;

    font-size: 30px;

    transition: 0.3s;

    user-select: none;

}



.prev {

    left: 10%;

}



.next {

    right: 10%;

}



.prev:hover,

.next:hover {

    color: var(--accent-color);

}

/* Style pour la croix de suppression */

.delete-icon {

    position: absolute;

    top: 5px;

    right: 10px;

    color: red;

    font-size: 1.2rem;

    cursor: pointer;

}


/* Responsive : empiler les sections sur les petits écrans */

@media (max-width: 768px) {

    #avis-list {

        grid-template-columns: 1fr;
        display: flex;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;

    }



    #ajouter-avis form {

        grid-template-columns: 1fr;

    }



    .photo-section .photo-upload-group {

        flex-direction: column;
        align-items: center;
    }



    #ajouter-avis button[type="submit"] {

        grid-column: span 1;

    }

    #main-content {
        margin-left: 0 !important;
    }
}