/* ==========================================================================
   1. RESET & BASES
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body {
    background: url('../ressources_site/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #f5ebe0;
    font-family: 'EB Garamond', serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

main { flex: 1; }

/* ==========================================================================
   2. HEADER & BANNIÈRE (Ambre Royal)
   ========================================================================== */
.site-header {
    width: 100%;
    background: #050505;
    border-bottom: 2px solid #e67e22; 
}

.site-header, .banner {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    display: flex; /* ou block selon ton cas */
}

.banner {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    position: relative;
    /* On s'assure qu'il n'y a aucune marge interne/externe en bas */
    margin-bottom: 0; 
    padding-bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, white, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #fff, rgba(0,0,0,0)),
        radial-gradient(circle at center, rgba(230, 126, 34, 0.1) 0%, #050505 80%);
    background-size: 200px 200px;
}

.dragon-icon { 
    height: 80px; 
    width: auto; 
    filter: drop-shadow(0 0 10px rgba(230, 126, 34, 0.4)); 
    z-index: 2; 
}

.main-title {
    font-family: 'MedievalSharp', cursive;
    font-size: 3.2rem;
    color: #e67e22; 
    background: linear-gradient(to bottom, #ffb347 0%, #e67e22 50%, #d35400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 1), 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

/* ==========================================================================
   3. MODULES TEXTURÉS (Parchment & Co)
   ========================================================================== */
.content-wrapper {
    max-width: 1100px;
    margin: 20px auto; 
    padding: 0 20px;
}

/* Style partagé pour tous les blocs de contenu */
.parchment, .maint-col-right > div {
    position: relative;
    
    /* 1. Le Maillage : On crée des lignes de 1px croisées ultra-fines */
    background-image: 
        linear-gradient(rgba(230, 126, 34, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 126, 34, 0.03) 1px, transparent 1px);
    background-size: 3px 3px; /* C'est ici qu'on règle la finesse (3px = très serré) */
    
    /* 2. La Transparence : On utilise un RGBA pour laisser passer le fond du site */
    background-color: rgba(10, 10, 10, 0.82); 
    
    /* 3. Le Flou : Indispensable pour l'élégance de la transparence */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Bordures et finitions */
    border: 1px solid rgba(193, 154, 107, 0.2);
    border-top: 3px solid #e67e22;
    
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 
                inset 0 0 50px rgba(0,0,0,0.5);
    border-radius: 3px;
}

.parchment { padding: 30px; }
.small-padding { padding: 20px; }

.closed-sign {
    position: absolute;
    top: -35px; left: -25px; width: 170px; z-index: 100;
    filter: drop-shadow(5px 8px 12px rgba(0,0,0,0.8));
    transform: rotate(-7deg);
    pointer-events: none;
}

.maint-text { padding: 30px 0 10px 20px; font-size: 1.1rem; color: #f5ebe0; }

/* ==========================================================================
   4. LAYOUT & FORMULAIRES
   ========================================================================== */
.maintenance-grid { display: flex; gap: 25px; }
.maint-col-left { flex: 1.8; }
.maint-col-right { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; /* Ajout de l'espace entre les blocs de droite */
}

.sub-title { 
    font-family: 'MedievalSharp'; 
    color: #ffb347; 
    border-bottom: 1px solid rgba(230, 126, 34, 0.3);
    padding-bottom: 10px; 
    margin: 0 0 15px 0;
    display: flex;
    align-items: center; /* Aligne l'icône sur le centre vertical du texte */
    gap: 15px;           /* On augmente un peu l'espace pour laisser respirer l'icône */
}

.section-icon {
    height: 32px;        /* Taille augmentée pour la lisibilité */
    width: auto;         /* On laisse la largeur s'adapter pour ne pas écraser l'image */
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(230, 126, 34, 0.5));
    /* On peut ajouter une petite marge négative en bas si l'icône semble trop haute */
    margin-bottom: 4px; 
}

/* --- Barre de progression --- */
.progress-container { margin-bottom: 20px; }
.label { display: block; margin-bottom: 5px; font-size: 0.95rem; color: #c19a6b; }
.bar-bg { 
    background: rgba(0, 0, 0, 0.4); height: 24px; border-radius: 12px;
    overflow: hidden; border: 1px solid rgba(193, 154, 107, 0.1);
}
.bar-fill { 
    background: linear-gradient(90deg, #5d1111, #e67e22); 
    height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: bold; color: #ffffff;
    min-width: 45px; box-shadow: 0 0 10px rgba(230, 126, 34, 0.2);
}

/* --- Correction Formulaires --- */
.maint-form { display: flex; flex-direction: column; gap: 15px; margin-top: 10px; }

.maint-form input, .maint-form textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(193, 154, 107, 0.3);
    padding: 12px 15px;
    color: #f5ebe0;
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.maint-form input:focus, .maint-form textarea:focus {
    outline: none;
    border-color: #e67e22;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.3);
}

.maint-form textarea { min-height: 100px; resize: vertical; }
.maint-form ::placeholder { color: rgba(193, 154, 107, 0.5); font-style: italic; }

.btn-adventure {
    background: linear-gradient(to bottom, #ffb347 0%, #e67e22 50%, #d35400 100%);
    color: #1a1a1a; border: 1px solid #ffb347; border-radius: 4px;
    padding: 12px; font-family: 'MedievalSharp'; text-transform: uppercase;
    font-weight: bold; cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-adventure:hover {
    background: linear-gradient(to bottom, #ffd194 0%, #ffb347 50%, #e67e22 100%);
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.5); transform: translateY(-2px);
}

/* ==========================================================================
   BARRE DE STATUT (Full Width & Fusionnée)
   ========================================================================== */
.status-bar {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 0 !important; 
    display: block;
    vertical-align: top;
    padding: 10px 0;
    background-color: #050505;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, white, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #fff, rgba(0,0,0,0)),
        radial-gradient(circle at center, rgba(230, 126, 34, 0.1) 0%, #050505 80%);
    background-size: 200px 200px;
    
    /* MODIFICATION ICI */
    border-top: none; /* On retire celui-ci car le header le fait déjà */
    border-bottom: 2px solid #e67e22; /* On garde celui-là pour séparer du fond étoilé */
    
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 99;
}

.status-content {
    max-width: 1100px;         /* Le texte à l'intérieur, lui, reste centré */
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Sous-éléments de la barre --- */
.user-info {
    color: #f5ebe0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank {
    color: #e67e22;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.pulse { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }

.status-nav .nav-link {
    color: #c19a6b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.status-nav .nav-link:hover {
    color: #ffb347;
    text-shadow: 0 0 5px rgba(255, 179, 71, 0.5);
}

.nav-link-btn {
    color: #c19a6b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.nav-link-btn:hover {
    color: #ffb347;
    background: rgba(230, 126, 34, 0.1);
    border: 1px solid rgba(230, 126, 34, 0.3);
    text-shadow: 0 0 5px rgba(255, 179, 71, 0.5);
}

.nav-separator {
    color: #444;
    margin: 0 5px;
}

.icon-key, .icon-scroll {
    font-size: 0.8rem;
    margin-right: 5px;
    opacity: 0.7;
}

/* ==========================================================================
   5. NEWS
   ========================================================================== */
   
/* Conteneur principal des news */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 95%;
    max-width: 1100px; /* Largeur confortable */
    margin: 40px auto;
}

/* La carte individuelle */
.news-card {
    background-color: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(193, 154, 107, 0.2);
    border-top: 3px solid #e67e22;
    padding: 30px;
    border-radius: 3px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* L'en-tête (Titre + Date) */
.news-card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(230, 126, 34, 0.2);
    padding-bottom: 10px;
}

.news-title {
    font-family: 'MedievalSharp', cursive;
    color: #e67e22;
    font-size: 2.2rem;
    margin: 0;
}

.news-date {
    color: #c19a6b;
    font-size: 0.9rem;
    font-style: italic;
}

/* Alignement Image à gauche / Texte à droite */
.news-card-body {
    display: flex;
    gap: 30px; /* Espace entre l'image et le texte */
    align-items: flex-start;
}

/* ON BRIDE L'IMAGE ICI */
.news-image {
    flex: 0 0 300px; /* L'image fera toujours 300px de large sur PC */
    max-width: 300px;
}

.news-image img {
    width: 100%; /* Elle prend 100% de ses 300px */
    height: 200px; /* Hauteur fixe pour l'harmonie */
    object-fit: cover; /* Recadre proprement si l'image est trop grande */
    border: 1px solid rgba(230, 126, 34, 0.4);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.news-text {
    flex: 1; /* Le texte prend tout le reste de la place */
    color: #f5ebe0;
    line-height: 1.7;
    text-align: justify;
    font-size: 1.1rem;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
}

.page-number {
    font-family: 'MedievalSharp', cursive;
    color: #c19a6b;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px black;
}

/* Style spécifique pour les boutons de pagination s'ils sont trop gros */
.news-pagination .btn-adventure {
    padding: 8px 15px;
    font-size: 0.9rem;
    text-decoration: none;
}

/* ==========================================================================
   5. FOOTER & RESPONSIVE
   ========================================================================== */

footer {
    width: 100%; 
    padding: 30px 0; 
    text-align: center;
    border-top: none; /* On a supprimé le liseré ici */
    color: #c19a6b; 
    font-family: 'MedievalSharp', cursive; 
    font-size: 0.9rem; 
    margin-top: auto;
}

footer a, footer a:visited { 
    color: inherit !important; 
    text-decoration: none !important; 
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

footer a:hover { opacity: 1; }

/* --- TABLETTES --- */
@media (max-width: 900px) {
    .maintenance-grid { flex-direction: column; }
    .maint-col-left, .maint-col-right { width: 100%; }
}

/* --- MOBILE VERTICAL (Portrait) --- */
@media (max-width: 600px) {
    .dragon-icon { display: none; }
    .content-wrapper { max-width: 95%; padding: 0 5px; }
    .main-title { font-size: 1.5rem; letter-spacing: 1px; }
    .maintenance-grid { flex-direction: column !important; }
    .parchment, .maint-col-right > div { width: 100%; box-sizing: border-box; }
	.status-content { flex-direction: column; gap: 5px; text-align: center; }
}

/* --- MOBILE HORIZONTAL (Paysage) --- */
@media (max-height: 500px) and (orientation: landscape) {
    .banner { height: 70px; }
    .dragon-icon { height: 40px; }
    .main-title { font-size: 1.4rem; letter-spacing: 2px; }
    .section-icon { height: 22px; width: 22px; }
    .content-wrapper { margin-top: 5px; }
}

@media (max-width: 800px) {
    .news-card-body {
        flex-direction: column;
        align-items: center;
    }
    .news-image {
        width: 100%;
        max-width: 100%;
        flex: none;
    }
    .news-image img {
        height: auto; /* On laisse l'image respirer sur mobile */
    }
}