html, body {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding-bottom: 25px;
}

/* Conteneur principal */
#communaute {
    width: 100%;
    max-width: 860px;
    padding: 20px;
    background-color: #252538; /* Gris anthracite */
    border-radius: 14px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    max-height: calc(100vh - 150px);
}

/* Titre */
#communaute h1 {
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    color: #E2E2E2;
    margin-bottom: 20px;
}

/* Formulaire d'ajout de question */
form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

form input[type="text"] {
    padding: 8px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    background: #30304A;
    color: #E2E2E2;
}

form input[type="text"]:focus {
    outline: none;
    background: #3B3B5C;
}

form button {
    padding: 8px;
    font-size: 0.9rem;
    background-color: #6464F1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #5050D8;
}

#supp{
    background-color: #D85050;
}
#supp:hover{
    background-color: #B03030;
}

/* Section des questions */
.question {
    background-color: #2E2E44;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.question-header strong {
    font-size: 0.95rem;
    font-weight: 500;
    color: #E2E2E2;
}

.question-text {
    font-size: 0.9rem;
    color: #B8B8D2;
    margin-top: 5px;
}

/* Boutons */
.delete-button,
.edit-question-button {
    background-color: transparent;
    border: none;
    color: #FF6767;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 5px;
    text-align: left;
}

.delete-button:hover,
.edit-question-button:hover {
    text-decoration: underline;
}

/* Section des réponses */
.replies {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid #3B3B5C;
}

.reply {
    background-color: #3A3A54;
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #D0D0F2;
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.avatar {
    width: 45px; /* Taille ajustée pour s'intégrer discrètement */
    height: 45px;
    border-radius: 50%; /* Rend l'image totalement ronde */
    object-fit: cover; /* Évite la déformation */
    border: 2px solid #5050D8; /* Bordure assortie au design */
    transition: transform 0.2s ease-in-out;
}

.avatar:hover {
    transform: scale(1.1); /* Zoom léger au survol */
}

#text {
    min-height: 50px;
    max-height: 300px;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f8f8f8;
    border: 2px solid #5050D8; /* Bordure avec ta couleur */
    border-radius: 8px;
    outline: none;
    resize: vertical; /* Permet de redimensionner seulement en hauteur */
    transition: border-color 0.3s, box-shadow 0.3s;
}

#text:focus {
    border-color: #4040B8; /* Assombrit légèrement au focus */
    box-shadow: 0 0 5px rgba(80, 80, 216, 0.5); /* Ajoute une lueur subtile */
}

#text::placeholder {
    color: #888;
    font-style: italic;
}

/* Bouton flottant de retour en haut */
#scroll-up {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: #6464F1;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: none;
}

#scroll-up:hover {
    background-color: #5050D8;
}

/* Responsive */
@media (max-width: 600px) {
    #communaute {
        padding: 15px;
    }

    .question {
        padding: 12px;
    }
}
