/* =================================================================
    THÈME "SOMMET CÉLESTE"
================================================================= */

/* --- IMPORTATION DES POLICES --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@400;600&display=swap');

/* --- VARIABLES DE COULEURS ET POLICES --- */
:root {
    --primary-color: #4a4a4a; /* Gris ardoise profond */
    --secondary-color: #a48c6c; /* Beige/Or vieilli */
    --background-color: #f5f5f0; /* Blanc cassé / Roche claire */
    --text-color: #333333;
    --light-text-color: #ffffff;
    --accent-color: #6b8e23; /* Vert olive */
    --error-color: #d32f2f;

    --font-serif: 'Cinzel', serif;
    --font-sans-serif: 'Montserrat', sans-serif;
}

/* =================================================================
    STYLES DE BASE ET RESET
================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans-serif);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
	display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

body.noscroll {
    overflow: hidden;
}

main {
    padding: 2rem;
    flex-grow: 1;
    
    /* CRITIQUE : Nécessaire pour positionner le fond */
    position: relative;
    /* S'assure que le contenu est au-dessus du fond */
    z-index: 1; 
}

main::before {
    /* 1. Contenu et chemin de l'image */
    content: "";
    /* background-image: url('goatlogobrown.png'); */
    
    /* 2. Styles de l'image (les mêmes qu'avant) */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 30vw 30vh; 
    background-attachment: fixed; 
    
    /* 3. Positionnement (couvre tout l'élément 'main') */
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    
    /* 4. Se place DERRIÈRE le contenu de 'main' */
    z-index: -1; 
    
    /* 5. VOS NOUVELLES DEMANDES */
    opacity: 0.5;      /* Opacité à 50% */
    filter: blur(4px); /* Ajoute un flou (vous pouvez ajuster 4px) */
}

section {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; margin-bottom: 2.5rem; }
h3 { font-size: 1.5rem; text-align: left; }


/* =================================================================
    HEADER ET NAVIGATION
================================================================= */
header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    
    /* AJOUTEZ CES LIGNES : */
    display: flex;        /* Aligne l'image et le texte horizontalement */
    align-items: center;  /* Centre l'image et le texte verticalement */
    gap: 0.5rem;          /* Ajoute un petit espace entre l'image et le texte */
}

/* AJOUTEZ CETTE NOUVELLE RÈGLE : */
.logo-img {
    /* La hauteur de l'image est maintenant liée à la taille du texte */
    height: 1.5rem; 
    width: auto; /* Garde les proportions */
}

header nav {
    display: flex;
    align-items: center;
}

header nav a {
    color: var(--light-text-color);
    text-decoration: none;
    margin: 0 1rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

header nav a:hover, header nav a.active {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}


#menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--light-text-color);
}

/* =================================================================
    ÉLÉMENTS COMMUNS (BOUTONS, CARTES, etc.)
================================================================= */
.cta-button, button {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-sans-serif);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover, button:hover {
    background-color: #8a7354;
    transform: translateY(-2px);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-top: 4px solid var(--secondary-color);
}

.card-content-image { /* Classe pour l'image de fond (anciennement imbriquée) */
    background-image: url(craptaxidermyn&m.png);
    background-blend-mode: lighten;
}

.sources {
    font-size: 1rem; 
}

/* =================================================================
    STYLES SPÉCIFIQUES AUX PAGES
================================================================= */

/* --- Page d'accueil --- */
.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .home-grid {
        grid-template-columns: 280px 1fr 280px;
    }
}

.widget {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-top: 4px solid var(--primary-color);
}

.widget h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.main-content .hero-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1589834943343-6963e6db8f7a?q=80&w=2070') center/cover;
    height: 150px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 2rem;
}

.main-content .hero-banner h1 {
    color: white;
    font-size: 2.5rem;
}


.main-content .quote {
    border-left: 3px solid var(--secondary-color);
    padding-left: 1rem;
    margin: 2rem 0; 
    text-align: justify;
}

.main-content .quote-footer {
    display: block;
    text-align: right; 
    margin-top: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
}

#news-widget-content article {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}
#news-widget-content article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
#news-widget-content article h4 {
    font-family: var(--font-serif);
    margin-bottom: 0.5rem;
}

#upcoming-events-widget .event-preview {
    margin-bottom: 1rem;
}
#upcoming-events-widget .event-date {
    font-weight: 600;
    color: var(--accent-color);
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}


/* --- Page Événements --- */
.admin-section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#event-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

#event-form #event-title,
#event-form #event-description,
#event-form .form-buttons {
    grid-column: 1 / -1;
}

#event-form input,
#event-form textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-sans-serif);
}

#event-form textarea {
    min-height: 120px;
    resize: vertical;
}

#event-list { display: grid; gap: 1.5rem; }

.event-item {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 5px solid var(--accent-color);
}
.event-item h3 { color: var(--primary-color); }
.event-date { font-weight: 600; color: var(--accent-color); margin-bottom: 0.5rem; }
.event-admin-buttons { margin-top: 1rem; display: flex; gap: 0.5rem; }


/* --- Page Contact --- */
.contact-container {
    display: flex;
    gap: 2rem;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
}
.contact-info { flex-basis: 40%; }
.contact-form-wrapper { flex-basis: 60%; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-sans-serif);
}
#contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* --- Page Connexion --- */
.auth-container {
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 2rem auto;
}
.auth-container h2 { margin-bottom: 2rem; }
.auth-container form { display: flex; flex-direction: column; gap: 1rem; }
.auth-container form input { padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; }
.auth-divider { display: flex; align-items: center; text-align: center; color: #999; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid #ddd; }
.auth-divider:not(:empty)::before { margin-right: .5em; }
.auth-divider:not(:empty)::after { margin-left: .5em; }
.auth-toggle-link { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.auth-toggle-link a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.error-message { color: var(--error-color); font-size: 0.9rem; text-align: center; }

.google-login-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 15px; width: 100%; height: 42px; padding: 0 10px; background-color: #ffffff; border: 1px solid #747775; border-radius: 4px; font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 500; color: #1f1f1f; cursor: pointer; transition: background-color .3s, box-shadow .3s; }
.google-login-btn:hover { background-color: #f7fafe; border-color: #d2e3fc; }
.google-logo { width: 18px; height: 18px; }

/* --- Page Profil --- */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.profile-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2rem;
}

#message-form {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-container .profile-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-container label {
    font-weight: 600;
    margin-bottom: -0.5rem;
}

.profile-container input {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.profile-container button {
    margin-top: 0.5rem;
    align-self: flex-start;
}

#logout-btn {
    display: block;
    margin: 2rem auto 0 auto;
    background-color: var(--primary-color);
}

/* --- MESSAGES DE SUCCÈS/ERREUR --- */
.message {
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 1rem;
    display: none;
}
.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}
.message.error {
    background-color: #ffcdd2;
    color: var(--error-color);
}


/* =================================================================
    FOOTER
================================================================= */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

/* =================================================================
    RESPONSIVITÉ (MOBILE)
================================================================= */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    main { padding: 1rem; }

    header { flex-wrap: wrap; padding: 1rem; }
    header nav { display: none; flex-direction: column; width: 100%; background-color: var(--primary-color); padding: 1rem 0; order: 3; }
    header nav.active { display: flex; }
    header nav a { margin: 0.5rem 1rem; text-align: center; }
    #menu-toggle { display: block; order: 2; }
    
    #user-info-link { order: 1; }

    .contact-container { flex-direction: column; }
    .content-grid { grid-template-columns: 1fr; }
    #event-form { grid-template-columns: 1fr; }
    #event-form #event-title,
    #event-form #event-description,
    #event-form .form-buttons {
        grid-column: auto;
    }
}

/* =================================================================
    STYLES POUR LA MODALE (LIGHTBOX) ET TEXTE TRONQUÉ
================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal-overlay .modal-card {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    cursor: default;
    animation: zoomIn 0.3s ease;
    text-align: justify;
}

.modal-overlay .close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    padding: 0.5rem;
}
.modal-overlay .close-btn:hover {
    color: #000;
}

.expandable-card {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.expandable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.expandable-card .description-container {
    position: relative;
    max-height: 120px;
    overflow: hidden;
}

.expandable-card .fade-out {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #ffffff);
}

.event-preview .description-container {
    position: relative;
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.event-preview .description-container .fade-out {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, transparent, var(--background-color));
    transition: opacity 0.3s ease;
}
.read-more-btn {
    background: none; border: none; padding: 0; color: var(--primary-color);
    font-weight: 600; cursor: pointer; font-size: 0.9rem; margin-top: 0.5rem;
}
.read-more-btn:hover { background: none; transform: none; text-decoration: underline; }
.event-preview.expanded .description-container { max-height: 1000px; }
.event-preview.expanded .fade-out { opacity: 0; }


/* =================================================================
    ANIMATIONS
================================================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.paysHisto {
    font-size: 135%;
    font-weight: bold;
    text-decoration: underline;
    font-style: italic;
    padding-top: 3%;
}

.symboleHisto {
    padding-top: 3%;
}

/* --- BOUTONS SUPPRIMER / ADMIN (Inline) --- */
.admin-buttons-inline {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.small-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.delete-btn.small-btn {
    background-color: var(--error-color);
}
.delete-btn.small-btn:hover {
    background-color: #b71c1c;
    transform: none;
}

#news-widget-content article::after {
    content: "";
    clear: both;
    display: table;
}

/* =================================================================
    STYLES POUR LA PAGE ADMINISTRATION
================================================================= */
.admin-page-section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.admin-page-section h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.admin-user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-user-table th,
.admin-user-table td {
    border: 1px solid #ddd;
    padding: 0.8rem 1rem;
    text-align: left;
    vertical-align: middle;
}

.admin-user-table th {
    background-color: var(--background-color);
    font-weight: 600;
}

.admin-user-table td:last-child {
    white-space: nowrap;
}

.admin-user-table .admin-action-btn {
    margin-right: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}
.admin-user-table .admin-action-btn:last-child {
    margin-right: 0;
}

.admin-user-table .delete-btn {
    background-color: var(--error-color);
}
.admin-user-table .delete-btn:hover {
    background-color: #b71c1c;
}

#admin-action-message {
    margin-top: 1rem;
}
/* =================================================================
    STYLES POUR FORMULAIRES ADMIN (Page d'accueil)
================================================================= */

.admin-form-section {
    background-color: #e8eaf6;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border: 1px solid #c5cae9;
}

.admin-form-section h4 {
    font-family: var(--font-sans-serif);
    font-size: 1.1rem;
    text-align: left;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid #c5cae9;
    padding-bottom: 0.5rem;
}

#admin-news-form,
#admin-quote-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#admin-news-form input[type="text"],
#admin-news-form textarea,
#admin-quote-form input[type="text"],
#admin-quote-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-sans-serif);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

#admin-news-form textarea,
#admin-quote-form textarea {
    min-height: 100px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#admin-news-form button[type="submit"],
#admin-quote-form button[type="submit"] {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.cancel-btn {
    background-color: #757575;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
}
.cancel-btn:hover {
    background-color: #616161;
}

.secondary-btn {
    background-color: #f0f0f0;
    color: var(--primary-color);
    border: 1px solid #ccc;
    margin-top: 1rem;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
}
.secondary-btn:hover {
    background-color: #e0e0e0;
    transform: none;
}
#quote-display p{
    font-size: 1.50em;
    font-weight: 300; /* CORRECTION: 75 n'est pas valide */
}
.loader {
    border: 16px solid #f3f3f300;
    border-top: 16px solid var(--secondary-color); /* CORRECTION: Utilise la variable */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* =========================================== */
/* STYLES POUR LE BANDEAU COOKIES
/* =========================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2c2c2c;
    color: #f0f0f0;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-banner .cookie-link {
    text-decoration: underline;
    color: #bbdefb;
}

.cookie-button {
    background-color: var(--secondary-color); /* CORRECTION: var() manquant */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
}

.cookie-button:hover {
    background-color: #8a7354;
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-button {
        width: 100%;
        text-align: center;
    }
}

/* =========================================== */
/* STYLES PERSONNALISÉS POUR LES LIENS (A)
/* =========================================== */

a {
    color: var(--secondary-color); /* CORRECTION: Syntaxe var() */
    font-weight: bold; /* CORRECTION: "text-weight" n'existe pas */
}

a:visited {
    color: inherit; 
}

a:hover {
    color: var(--primary-color); /* CORRECTION: Syntaxe var() */
    text-decoration: underline; 
}

/* =========================================== */
/* STYLES PAGE COMMUNAUTÉ (FINAUX)
/* =========================================== */
/* NOTE: C'est la version fusionnée et nettoyée */

/* 1. Conteneur de titre (remplace .profile-container) */
.page-title-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.page-title-container h2 {
    text-align: center;
}

/* 2. L'en-tête du mur (pour le titre ET le bouton) */
.wall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    
    font-size: 1.8rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.wall-header h3 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.8rem;
    font-weight: 400;
}

/* 3. Le conteneur pour le bouton / message de connexion */
#wall-actions {
    text-align: right;
}

#show-echo-form-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.wall-login-prompt p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}
.wall-login-prompt p a {
    font-weight: bold;
}

/* 4. On s'assure que le panneau admin (déplacé) est stylé */
#moderation-panel.admin-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* 5. Conteneur pour le formulaire de soumission */
.form-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #555;
}
.form-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 6. Conteneur du Mur */
.murmurs-wall-container {
    width: 100%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
    min-height: 70vh; /* Pousse le footer vers le bas */
}

/* 7. Le "Canevas" (Conteneur des échos) */
#public-messages-list {
    position: relative; 
    width: 100%;
    min-height: 100vh; /* Assez haut pour que le packing ait de la place */
}

/* 8. Style pour UN Écho (Carte "Packée") */
.echo-card-packed {
    position: absolute; 
    width: 280px;
    height: 160px;
    background: #fdfdfd;
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    padding: 15px 20px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s ease, filter 0.3s ease;
    will-change: transform; 
}

/* Header de l'écho */
.echo-card-packed .message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.echo-card-packed .message-photo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.echo-card-packed .message-content {
    font-style: italic;
    font-size: 0.9rem;
    color: #444;
}
.echo-card-packed .admin-buttons-inline {
    position: absolute;
    bottom: 12px;
    right: 15px;
}
.echo-card-packed[data-anonymous="true"] .message-photo {
    display: none;
}
.echo-card-packed[data-anonymous="true"] .message-header strong {
    margin-left: 0;
}

/* 9. Styles de Profondeur (Statiques) - SANS TRANSFORM */
.echo-card-packed[data-depth="1"] { /* Loin */
    filter: blur(1px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    z-index: 10;
}
.echo-card-packed[data-depth="2"] { /* Milieu */
    filter: blur(0.5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    z-index: 20;
}
.echo-card-packed[data-depth="3"] { /* Près */
    filter: blur(0);
    box-shadow: 0 12px 35px rgba(0,0,0,0.18); 
    z-index: 30;
}

/* 10. Effet de survol (CORRIGÉ - SANS TRANSFORM) */
.echo-card-packed:hover {
    filter: blur(0) !important;
    z-index: 99 !important;
}

/* 11. La Modale (pour les échos) */
.echo-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}
.echo-modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem 3rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    animation: zoomIn 0.3s ease 0.1s forwards;
}
.echo-modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    border: none; background: none;
    line-height: 1;
}
.echo-modal-close:hover { color: #000; }
.echo-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}
.echo-modal-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.echo-modal-header strong {
    font-size: 1.2rem;
    color: var(--primary-color);
}
.echo-modal-body p {
    font-size: 1.1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 12. L'overlay pour AJOUTER un écho */
.wall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 20px;
    /* Styles dupliqués de H3 - fusionnés */
    font-size: 1.8rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.wall-header h3 {
    margin-bottom: 0;
    font-size: 1.8rem; /* Assure la cohérence */
    font-weight: 400;
    border: none; /* Inutile, le parent a la bordure */
    padding: 0;
}

#show-echo-form-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

#wall-actions {
    text-align: right;
}

.wall-login-prompt p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}
.wall-login-prompt p a {
    font-weight: bold;
}

#moderation-panel.admin-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#echo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1900;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    animation: fadeIn 0.3s ease;
}

#echo-overlay #submit-message-panel {
    max-width: 800px;
    width: 90%;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    animation: zoomIn 0.3s ease;
    border-bottom: none;
    padding-bottom: 2.5rem;
}

#close-echo-overlay {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    border: none;
    background: none;
    line-height: 1;
    padding: 0;
}
#close-echo-overlay:hover {
    color: #000;
    background: none;
    transform: none;
}/* =================================================================
    STYLES POUR LA PAGE ADMINISTRATION (admin.html)
================================================================= */

/* (La classe .admin-page-section existe déjà) */

/* Trait de séparation */
hr.admin-divider {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #ddd;
}

/* Style pour les listes de modération d'échos */
#admin-pending-echos,
#admin-recent-echos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-echo-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-left: 5px solid var(--primary-color);
    border-radius: 4px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; /* Gère les petits écrans */
}

/* Style pour un écho en attente */
.admin-echo-item.pending {
    border-left-color: var(--error-color); /* Rouge pour "en attente" */
}

.admin-echo-item .info {
    flex-grow: 1; /* Prend le plus de place */
}

.admin-echo-item .info strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}
.admin-echo-item .info p {
    margin: 0;
    font-style: italic;
    color: #555;
    /* Coupe le texte s'il est trop long */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px; /* Ajustez au besoin */
}
.admin-echo-item .info .date {
    font-size: 0.8rem;
    color: #777;
    font-style: normal;
}

.admin-echo-item .actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0; /* Empêche les boutons de rétrécir */
}

/* Bouton Approuver */
.approve-btn {
    background-color: var(--accent-color); /* Vert */
}
.approve-btn:hover {
    background-color: #55751a;
}
/* =================================================================
    STYLES POUR LA PAGE ADMINISTRATION (Suite)
================================================================= */

/* Grille pour les formulaires complexes (Événements) */
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}
.admin-form-grid input,
.admin-form-grid textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-sans-serif);
}
.admin-form-grid textarea,
.admin-form-grid #admin-event-title, /* Le titre prend toute la largeur */
.admin-form-grid .form-buttons {
    grid-column: 1 / -1; /* Prend 2 colonnes */
}
.admin-form-grid textarea {
    min-height: 120px;
    resize: vertical;
}

/* Formulaire simple (Nouveautés) */
.admin-form-simple {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-form-simple input,
.admin-form-simple textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-sans-serif);
}
.admin-form-simple textarea {
    min-height: 120px;
    resize: vertical;
}


/* Styles pour les listes d'items (Événements, News) */
#admin-recent-events .admin-list-item,
#admin-recent-news .admin-list-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem; /* Espace entre les items */
}

.admin-list-item .info {
    flex-grow: 1;
}
.admin-list-item .info strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}
.admin-list-item .info .date {
    font-size: 0.8rem;
    color: #777;
    font-style: normal;
    display: block; /* Met la date en dessous */
}

.admin-list-item .actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}/* =================================================================
    NOUVEAU : GRILLE 2x2 POUR LA PAGE ADMIN
================================================================= */

.admin-main-grid {
    display: grid;
    /* Crée 2 colonnes de taille égale */
    grid-template-columns: 1fr 1fr; 
    gap: 2rem; /* Espace entre les panneaux */
    
    /* Permet à la grille de s'élargir plus que les autres pages */
    max-width: auto; 
	align-self: center;
}

/* Le titre "Panneau d'Administration" doit prendre toute la largeur */
.admin-main-grid > h2 {
    grid-column: 1 / -1; /* S'étend de la colonne 1 à la dernière */
}

/* Responsive : sur les écrans plus petits, on repasse à 1 colonne */
@media (max-width: 900px) {
    .admin-main-grid {
        grid-template-columns: 1fr; /* 1 seule colonne */
    }
}