@import url('https://fonts.googleapis.com/css2?family=Italiana&family=Tenor+Sans&display=swap');

:root {
    --bg-color: #011128;
    --text-color: #e2e8f0;
    --title-color: #ffffff; /* Pour garder les gros titres bien blancs */
    --accent-violet: #9f7aea; /* La couleur d'accent unique (violet mystique) */
    --font-title: 'Italiana', serif;
    --font-text: 'Tenor Sans', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typographie */
h1, h2, h3, .logo-text {
    font-family: var(--font-title);
    color: var(--title-color);
    font-weight: normal;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
    color: var(--accent-violet); /* Harmonisation : le survol devient violet */
}

.devise{
    font-size : 1.3em;
    font-family: var(--font-title);
    font-style: italic ;
    font-weight: bold;
}


/* Structure */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    box-sizing: border-box;
}

/* Header & Navigation */
header {
    text-align: center;
    padding: 50px 0;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    text-decoration: none;
}

.logo-img {
    height: 40vh; 
    width: auto; 
}

.logo-text {
    font-size: 3rem;
    letter-spacing: 2px;
}

nav {
    font-family: var(--font-title);
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Important pour le responsive */
    gap: 30px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a.active {
    color: var(--accent-violet);
    border-bottom: 1px solid var(--accent-violet); /* Harmonisation : barre active violette */
}

/* Sections Accueil */
.manifeste {
    text-align: justify;
    font-size: 1.1rem;
    margin: 60px 0;
    line-height: 1.8;
}

.qui-suis-je {
    margin: 60px 0;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Section Contact */
.contact-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed rgba(159, 122, 234, 0.3);
}

.contact-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed rgba(159, 122, 234, 0.3);
    text-align: center; /* On centre tout le bloc contact */
}

.btn-contact {
    display: inline-block; /* Permet de le centrer avec le text-align du parent */
    margin-top: 20px;
    padding: 12px 30px;
    border: 2px solid var(--accent-violet); /* Bordure légèrement plus épaisse */
    color: var(--accent-violet);
    text-transform: uppercase;
    font-family: var(--font-title);
    letter-spacing: 1px;
    font-weight: bold; /* Texte en gras */
    text-align: center; /* Texte centré */
    border-radius: 50px; /* Coins bien arrondis */
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background-color: var(--accent-violet);
    color: var(--bg-color);
}

/* Articles JSON */
.post {
    margin-bottom: 80px; /* Un peu plus d'espace entre les textes */
    padding-bottom: 60px; /* L'espace entre la fin du texte et la barre */
    position: relative;
    border-bottom: none; /* On enlève l'ancienne petite bordure blanche */
    text-align: justify;
}

/* La nouvelle barre de séparation (Violette, toute la largeur) */
.post::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Épaisseur de la barre */
    background-color: var(--accent-violet);
    border-radius: 2px; /* Bords très légèrement arrondis */
    box-shadow: 0 0 10px rgba(159, 122, 234, 0.3); /* Léger effet de halo mystique autour de la barre */
}

/* On masque la barre pour le tout dernier texte de la page pour que ce soit plus propre près du footer */
.post:last-child::after {
    display: none;
}

.post:last-child {
    margin-bottom: 20px;
    padding-bottom: 0;
}

.post h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.post-content {
    text-align: justify;
    
    /* Optionnel mais très recommandé pour le texte justifié sur le web : */
    hyphens: auto;
    -webkit-hyphens: auto;
}

.avertissement-anonymat {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.05); /* Un fond très léger (assombri) */
    border-radius: 8px;
    color: #666; /* Couleur de texte adoucie */
}

/* Styles BBCode */
strong { font-weight: bold; color: #fff; }

blockquote {
    border-left: 3px solid var(--accent-violet);
    margin: 20px 0;
    padding-left: 20px;
    font-style: italic;
    color: #a0aec0;
}

.publi-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    margin: 30px 0;
    border-radius: 4px;
    font-size: 1.1rem;
    color: #fff;
    text-align: justify;
     hyphens: auto;
    -webkit-hyphens: auto;
}

.text-accent {
    color: var(--accent-violet);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.social-icons a {
    display: inline-block;
    margin: 0 15px;
}
.social-icons svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: fill 0.3s ease;
}
.social-icons a:hover svg {
    fill: var(--accent-violet);
}

/* Admin Styles */
.admin-form {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-sizing: border-box;
}
.admin-form input, .admin-form select, .admin-form textarea {
    width: 100%;
    background: #111827;
    border: 1px solid #374151;
    color: white;
    padding: 15px;
    margin-bottom: 20px;
    font-family: var(--font-text);
    box-sizing: border-box;
}

/* LA ZONE DE TEXTE AGRANDIE */
.admin-form textarea { 
    min-height: 50vh; /* Prend au moins la moitié de l'écran */
    resize: vertical; 
    font-size: 1.1rem;
    line-height: 1.5;
}

.btn {
    background: var(--accent-violet);
    color: var(--bg-color);
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    font-family: var(--font-text);
    text-transform: uppercase;
    font-weight: bold;
}
.btn:hover { background: #b794f6; }
.btn-delete { background: #dc2626; color: white; margin-left: 10px; font-size: 0.8rem; padding: 5px 10px;}
.admin-list li { display: flex; justify-content: space-between; margin-bottom: 15px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px;}

/* ========================================= */
/* RESPONSIVE DESIGN (Mobiles et Tablettes)  */
/* ========================================= */
@media screen and (max-width: 768px) {
    header {
        padding: 30px 0;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-img {
        height: 30vh; /* Légèrement réduit pour gagner de la place */
    }
    
    .logo-text {
        font-size: 2.2rem;
    }
    
    /* CORRECTION : Devise (Force l'italique sur mobile) */
    .devise {
        font-style: italic !important;
        font-size: 1.1em;
        display: block;
        text-align: center;
    }

    nav {
        gap: 15px;
        font-size: 0.95rem;
    }
    
    /* CORRECTION : Manifeste (Texte justifié et réduit) */
    .manifeste {
        font-size: 1.1em; /* Taille réduite comme demandé (0.85em pour rester lisible) */
        text-align: justify !important; /* Force la justification */
        margin: 30px 0;
        line-height: 1.5;
        hyphens: auto; /* Évite les gros trous blancs dans le texte justifié sur mobile */
    }
    
    .post h2 {
        font-size: 1.5rem;
    }
    
    .publi-block {
        padding: 20px;
        font-size: 1.1rem;
    }

    /* CORRECTION : Centrage et style du Bouton Contact */
    .contact-info {
        text-align: center !important;
        width: 100%;
        padding-bottom: 20px;
    }
    
    .btn-contact {
        display: block; /* Permet un centrage parfait avec margin auto */
        width: max-content; /* S'adapte à la taille du texte */
        margin: 20px auto !important; /* Centre horizontalement */
        border: 2px solid var(--accent-violet) !important; /* Force la bordure */
        color: var(--accent-violet) !important; /* Force la couleur du texte */
    }

    /* CORRECTION : Footer (Taille réduite) et Icônes (Couleur visible) */
    footer {
        padding: 20px 0; /* Réduit l'énorme espace du footer sur mobile */
    }
    
    .social-icons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px; /* Espace propre entre les icônes */
    }
    
    .social-icons a {
        margin: 0;
        color: var(--text-color) !important; /* Empêche le lien de devenir noir/gris foncé par défaut */
    }
    
    .social-icons svg {
        width: 28px;
        height: 28px;
        fill: var(--text-color) !important; /* Force la couleur claire */
    }

    .admin-form {
        padding: 15px;
    }
    
    .admin-form textarea {
        min-height: 40vh;
    }
    
    .admin-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}