/* --- STRUCTURE GLOBALE --- */

body {
    margin: 0;
    padding: 0;
    /* On s'assure que le fond (PNJ) couvre tout derrière la sidebar */
    background-attachment: fixed; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.cadre-texte a:hover {
	opacity: 0.7;
}

.cadre-texte p {
    text-align: justify;
}

/* Overriding hyperlink style */
a {
    color: #2c1a0b;
    text-decoration: none;
}


/* Conteneur qui aligne Sidebar + Zone de contenu */
.main-layout {
    display: flex;
	align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    position: relative;
    padding-top: 0;
    flex: 1;
    margin-top: 0;
}

.base-banniere {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.3);
}

/* Les Overlays qui font le fondu vers le background du site */
.banniere-overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.left-unifier { left: 0; }
.right-unifier { right: 0; }

/* Le Logo avec Parallaxe */
.main-logo {
    position: absolute;
    top: 30px;
    margin-left: 3%;
    max-width: 450px;
    height: auto;
    z-index: 10;
	filter: drop-shadow(-7px -7px 15px #3a210e);
    transition: transform 0.1s ease-out; 
}

/* --- ZONE DE CONTENU (Tes News) --- */
.content-area {
    flex: 1;
    padding: 0px 50px 20px 20px;
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* Centre les cadres dans l'espace restant */
    min-width: 0; /* Évite les bugs de débordement flex */
    min-height: 1300px; /* On force cette zone à être au moins aussi haute que la sidebar 
       pour que le flux normal de la page pousse le footer vers le bas */
    gap: 30px; /* Espace entre les news et le panneau de patch */

}

/* --- LES CADRES (CARNET) --- */
.cadre {
    position: relative;
    width: 130%;
    max-width: 1150px; 
    margin-top: 30px;
    margin-bottom: 50px;
    margin-left: calc(30vw - 500px);
    margin-right: calc(30vw - 400px);
}

.cadre-fond {
    background-image: url("../img/frame-middle.webp");
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: center;
    /* Padding ajusté pour le texte à l'intérieur du carnet */
    padding: 2% 7% 3% 23%;
    min-height: 373px;
    filter: drop-shadow(4px 8px 15px rgba(0,0,0,0.5));
}

/* On garde tes proportions pour le haut et le bas du carnet */
.cadre-top {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    aspect-ratio: 5.5;
    background-image: url("../img/frame-top.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
}

.cadre-bottom {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    aspect-ratio: 2.75;
    background-image: url("../img/frame-bottom.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
}

.cadre-embed {
	display: flex;
	justify-content: center;
	margin-bottom: 10px;
}

.cadre-texte {
    position: relative;
    z-index: 9;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2c1a0b; /* Une couleur d'encre sombre pour le carnet */
    min-height: 343px;
    justify-content: space-between;
    display: flex;
    flex-direction: column;
}

.date{
    text-align: right;
    opacity: 0.65;
    font-size: 0.9rem
}

/* --- HEADER & SÉPARATEUR --- */

.header-scene {
    position: relative;
    width: 100%;
    height: 230px;
    margin-bottom: 0; 
    background-image: url("../img/banner-back.jpg");
    background-repeat: repeat;
    background-size: 65%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    z-index: 1000; /* Doit être au-dessus de la sidebar pour la transition */
}
.top-border-separator {
    clear: both;
    width: 100%;
    height: 10px;
    background-image: url('../img/border_bottom.webp');
    
    /* REMPLACE 'contain' PAR '100% 100%' ou 'cover' */
    background-size: 100% 100%; 
    background-repeat: repeat-x;
    
    /* ON SUPPRIME LES MARGES PAR DÉFAUT QUI PEUVENT CRÉER UN GAP */
    margin-bottom: 0;
    display: block; /* Force le comportement de bloc pour éviter l'espace des lignes de texte */
    
    position: relative;
    z-index: 5; 
    filter: drop-shadow(0px 4px 5px rgba(0,0,0,0.5));
}

.main-footer {
    width: 100%;
    min-height: 100px; /* On augmente un peu car on a plus de texte */
    margin-top: 0px;
    background-image: url('../img/footer.png');
    background-repeat: repeat;
    background-position: center bottom;
    background-size: contain;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 30px;
    position: relative;
    z-index: 5;
}

.footer-content {
    text-align: center;
    max-width: 800px; /* On limite la largeur pour que le texte ne s'étale pas trop */
    padding: 0 20px;
}

.footer-content p {
    font-family: 'Averia Serif Libre', serif;
    color: var(--sign-brown);
    margin: 5px 0;
}

.legal-notice {
    font-size: 0.85rem; /* Plus petit pour le disclaimer */
    opacity: 0.8;       /* Un peu plus discret */
    line-height: 1.4;
}

.legal-notice strong {
    color: #5d3a1a; /* Un brun un peu plus soutenu pour Falcom */
}

.content-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px; /* On évite que ça s'étale trop sur les écrans 4K */
    gap: 30px;
    align-items: flex-start;
}

.news-column {
    flex: 3; /* Prend 3 parts de l'espace */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.patch-status-panel {
    width: 300px; /* Largeur fixe pour ton bloc de droite */
    min-width: 300px;
    position: sticky;
    top: 20px;
    z-index: 10;
    margin-top: 60px;
}


.status-card {
    background: rgba(45, 30, 20, 0.9);
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    color: #f0e6d2;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 6px;
    margin: 5px 0 15px 0;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #fde08d);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Conteneur pour espacer les boutons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* Style commun aux boutons d'action du panel */
.discord-button {
    position: relative;
    overflow: hidden;
    display: block;
    /* Strictement les mêmes dimensions que Tita */
    padding: 14px 20px; 
    
    font-family: 'Averia Serif Libre', serif;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    text-align: left; /* Aligné à gauche pour Olivier à droite */
    background-position: right -150px bottom !important;
    /* COULEURS DISCORD (Blurple & White) */
    background-color: #ffffff !important; 
    color: #5F61F1 !important;
    border: 2px solid #5F61F1 !important; /* Un bleu légèrement plus foncé pour la bordure */
    border-radius: 8px;
    
    /* IMAGE DE FOND (Olivier) */
    background-image: url('../img/olivier.webp') !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important; 
    background-size: contain !important; 

    box-shadow: 0 4px 6px rgba(88, 101, 242, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#discord-count {
    font-weight: normal;
    font-style: italic;
    display: inline-block; /* Lui permet d'avoir une largeur/hauteur */
    min-width: 20px;       /* Empêche le 0x0 */
    font-size: 0.85rem;
    opacity: 0.8;
    font-family: Arial, sans-serif; /* Plus lisible pour les chiffres */

}

/* Effets au survol */
.discord-button:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
}

.discord-icon, .dl-icon {
    margin-right: 8px;
}

.pagination .download-button {
	padding: 5px 40px 5px 15px;
  	margin: 8px;
}

.download-button {
    position: relative;
    overflow: hidden;
    display: block;
    padding: 14px 20px;
    
    /* Typographie d'origine conservée pour la cohérence */
    font-family: 'Averia Serif Libre', serif;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    text-align: left; /* Aligné à gauche pour laisser de la place à l'image */
    
    /* COULEURS : Fond blanc, texte et bordure rouge Liberl */
    background-color: #ffffff !important;
    color: #8b0000 !important;
    border: 2px solid #8b0000 !important;
    border-radius: 8px;
    
    /* IMAGE DE FOND (Tita) */
    background-image: url('../img/tita.png') !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important; /* Calée à droite */
    background-size: contain !important; /* S'adapte à la hauteur du bouton */

    box-shadow: 0 4px 6px rgba(139, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* L'effet de brillance (Shine) adapté au fond blanc */
.download-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(139, 0, 0, 0) 0%, 
        rgba(139, 0, 0, 0.05) 50%, 
        rgba(139, 0, 0, 0) 100%
    );
    transform: skewX(-25deg);
}

/* État : Survol */
.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(139, 0, 0, 0.2);
    border-color: #ff4500 !important; /* Devient un peu plus vif au survol */
    background-color: #fffaf0 !important; /* Très léger voile crème au survol */
}

.download-button:hover::after {
    left: 150%;
    transition: all 0.6s ease;
}

/* État : Clic */
.download-button:active {
    transform: translateY(0) scale(0.98);
}



.progress-details {
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.chapter-stat {
    margin-bottom: 5px;
}

.chap-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-weight: bold;
}

.progress-bar.mini {
    height: 6px; /* Plus fin pour le détail */
    margin: 2px 0;
}

.chap-count {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
    text-align: right;
}

.total-status {
    border-top: 1px solid var(--sign-brown);
    padding-top: 10px;
    text-align: center;
    color: #d4af37;
    font-size: 1.1rem;
}
.visitor-stats {
    display: flex;
    flex-direction: column; /* On empile verticalement */
    align-items: center;    /* On centre le tout horizontalement */
    gap: 8px;              /* Espace réduit entre les deux lignes */
    margin-bottom: 15px;
    font-family: 'Averia Serif Libre', serif;
}

.stat-item {
    display: flex;
    justify-content: space-between; /* Aligne le label à gauche et le chiffre à droite */
    align-items: center;
    width: 180px;          /* Largeur fixe pour que les colonnes soient alignées */
    color: #020202;
    font-size: 0.85rem;
}

.stat-item .count {
    background: rgba(0, 0, 0, 0.6); /* Un poil plus sombre pour le contraste */
    padding: 2px 10px;
    border: 1px solid #5d4037;
    border-radius: 4px;
    color: #fde08d;
    font-weight: bold;
    min-width: 60px;       /* Un peu plus large pour les gros chiffres */
    text-align: right;     /* Chiffres alignés à droite pour la lisibilité */
}

.sidebar-partners {
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    
    text-align: center;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    
    /* LARGEUR FLEXIBLE */
    width: 240px; 
    max-width: 95%; /* Empêche de coller aux bords de l'écran sur mobile */
    
    /* CADRE IMAGE */
    border-style: solid;
    border-width: 37px;
    border-image-source: url('../img/bg_partners.webp');
    border-image-slice: 60 37 60 37 fill;
    
    /* CHANGEMENT ICI : 'round' au lieu de 'stretch' évite la compression dégueu */
    border-image-repeat: round; 
    
    height: auto; 
    
    overflow: visible !important; 
    filter: drop-shadow(0px 10px 5px rgba(0,0,0,0.5));
    min-height: 180px;
}

.partners-title {
    font-family: 'Averia Serif Libre', serif;
    color: #d4af37;
    font-size: 1.2rem; /* Police agrandie */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.5); 
    /* Petit effet d'ombre pour que le texte "pop" */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: block;
}

.partners-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px; /* Un peu plus d'espace entre les logos */
}

.partners-grid a {
    display: block;
    width: 100%;
    max-width: 180px; /* Taille contrôlée pour tes logos 300x120 */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partners-grid img {
    width: 100%;
    height: auto;
    display: block;
    /* Un léger filtre pour que les logos s'intègrent mieux au fond sombre */
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.6)) brightness(0.9);
}

.partners-grid a:hover {
    transform: scale(1.1);
    filter: brightness(1.1) drop-shadow(0px 0px 8px rgba(212, 175, 55, 0.4));
}

.doro-container {
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center;     /* Centre verticalement si besoin */
    width: 100%;             /* S'assure de prendre toute la largeur */
    margin-top: 20px;
}

.doro-gif {
    width: 50px; 
    height: auto;
    animation: doro-float 3s ease-in-out infinite;
    filter: drop-shadow(4px 4px 5px rgba(0, 0, 0, 0.6));
}

@keyframes doro-float {
    0% { transform: translateX(0px); }
    50% { transform: translateX(-8px); }
    100% { transform: translateX(0px); }
}

.stats-graph-container {
    margin-top: 25px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(253, 224, 141, 0.2);
}

/* On laisse respirer le canvas */
#activityChart {
    width: 100% !important;
}

/* La barre de remplissage quand c'est fini */
.fill.is-complete {
    background: #2ecc71 !important; /* Vert émeraude */
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

/* Optionnel : mettre le texte du pourcentage en vert aussi */
.chapter-stat.is-complete .percent-val {
    color: #2ecc71;
    font-weight: bold;
}

/* Optionnel : une petite bordure discrète à gauche pour les chapitres finis */
.chapter-stat.is-complete {
    border-left: 2px solid #2ecc71;
    padding-left: 5px;
}

/* 1. Le conteneur du personnage */
.recruiter-container {
    width: calc(18vw + 250px); /* Ajuste selon la taille réelle de ton image */
    height: 200px;
    margin-top: -1.5vw;
    max-width: 400px;
}

/* 2. L'image elle-même */
.recruiter-img {
    width: 100%;
    height: auto;
    /* On applique l'animation (nom, durée, type de courbe, délai, boucle) */
    animation: peekaboo 5s ease-in-out infinite;
    transform: translateY(60px); /* Position basse par défaut (caché) */
    filter: drop-shadow(2px 2px 15px rgba(0, 0, 0, 0.6));
}


/* 4. DÉFINITION DE L'ANIMATION (Le "Keyframes") */
/*@keyframes peekaboo {
    0%   { transform: translateY(60px); opacity: 1; }  
    5%   { transform: translateY(-30px); opacity: 1; }
    15%  { transform: translateY(-30px); opacity: 1; } 
    20%  { transform: translateY(60px); opacity: 1; } 
    100% { transform: translateY(60px); opacity: 1; } 
}*/

.cadre-illustration {
    margin-bottom: 25px;
    text-align: center;
    width: 100%;
    /* Empêche l'image de pousser les bords du carnet sur mobile */
    display: flex;
    justify-content: center;
}

.cadre-illustration img {
    max-width: 100%; /* L'image ne dépassera jamais la largeur du texte */
    height: auto;
    border: 1px solid #fde08d;
    display: block;
    
    /* L'ombre que tu voulais : une ombre douce et une plus portée */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    
    /* Optionnel : petit effet de relief supplémentaire */
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,1));
    
    /* Pour que l'image soit bien nette */
    image-rendering: auto;
}
