/* Importation de polices médiévales */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=IM+Fell+Double+Pica&display=swap');

/* ============================================================
   1. VARIABLES & FONDATIONS
   ============================================================ */
:root {
    --gold: #D3AF37;
    --dark-wood: #2a1f14;
    --voile-blanc: rgba(255, 255, 255, 0.45);
    --border-med: #4a3c2c;
    --accent-color: #8b0000; /* Rouge bordeaux unique */
    --text-color: #3b2f2f;   /* Marron foncé unique */
    --bg-color: #f5f5dc; 
    --border-color: #4a3c2c; 
    --menu-bg: #4a3c2c; 
    --menu-text: #f5f5dc;
    --footer-bg: #2d231b;
	--flame: #B0340B;
	--green: #176624;
}

body {
    font-family: 'IM Fell Double Pica', serif;
    color: var(--text-color);
    background-color: #f4d0a2;
    background-image: url('../../assets/images/parcho.jpg');
    background-size: cover;
    background-attachment: fixed;
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   HEADER & LOGO (RESTAURATION) & FOOTER
   ============================================================ */
.main-header {
    background-image: url('../../assets/images/banniere.png') !important;
    
    /* PROPRIÉTÉS CLÉS POUR LE REMPLISSAGE */
    background-size: 100% auto !important;      /* Force l'image à couvrir TOUTE la surface */
   	background-position: center top !important;  /* Centre l'image pour ne pas couper le sujet principal */
    background-repeat: no-repeat !important; /* Empêche l'image de se répéter si le header est grand */
		
	min-height: 300px;
	
    box-shadow: inset 0 -5px 15px rgba(0,0,0,0.3);
    border-bottom: 3px solid var(--gold);
    padding: 20px 0 !important;
    margin: 0 !important;
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-content-centered {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    width: 90%;
}

.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    max-height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.header-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.site-title {
    font-family: 'Cinzel Decorative', serif;
    color: var(--gold);
    font-size: 3em !important;
    margin: 0 !important;
    line-height: 1.1;
    text-shadow: 
        -1px -1px 0 #2a1f14,  
         1px -1px 0 #2a1f14,
        -1px  1px 0 #2a1f14,
         1px  1px 0 #2a1f14,
         3px 3px 6px rgba(0,0,0,0.7); /* ombre portée en dernier */
}

.site-tagline {
    font-family: 'IM Fell Double Pica', serif;
    font-style: italic;
    color: #fdf5e6 !important;
    margin: 5px 0 0 0 !important;
    font-size: 1.4rem !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

/* --- MOBILE HEADER --- */
/* --- ADAPTATION MOBILE DU HEADER --- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column !important; /* On empile blason et texte sur mobile */
        padding: 10px !important;
    }
    
    .header-logo img {
        width: 80px !important; /* Taille réduite du blason */
        margin-right: 0 !important;
        margin-bottom: 10px;
        filter: drop-shadow(0 0 8px rgba(0,0,0,0.6));
    }

    .header-text {
        text-align: center !important; /* On centre le texte sous le blason */
    }

    .site-title {
        font-size: 1.5rem !important;
        line-height: 1.2;
    }

    .site-tagline {
        font-size: 1.2rem !important;
    }
}

.main-footer {
    /* --- TON STYLE CONSERVÉ --- */
    background-image: url('../../assets/images/banniere.png') !important;
    background-size: cover !important;
    background-position: bottom !important;
    background-repeat: no-repeat !important;
    box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.3);
    border-top: 3px solid #d4af37; /* Remplacement de var(--gold) si non définie */
    
    /* --- ADAPTATION POUR LE CONTENU --- */
    padding: 60px 0 !important; /* Ajusté pour laisser respirer le parchemin */
    margin: 0 !important;
    width: 100% !important;
    
    /* Force l'empilement vertical et le centrage */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- AJUSTEMENT DES ÉLÉMENTS INTERNES --- */

.footer-copyright {
    margin-top: 20px;
    color: rgba(245, 245, 220, 0.8) !important;
    font-family: 'IM Fell Double Pica', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); /* Pour la lisibilité sur l'image */
}

.update-container {
    margin-top: 15px;
}

/* On s'assure que le lecteur ne soit pas transparent par rapport à la bannière */
.player-parchment-bg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

/* --- ÉTAGE 2 : CHRONIQUES --- */
.update-container {
    margin: 15px 0 !important;
}

.medieval-date {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #d4af37; /* Or médiéval */
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* --- ÉTAGE 3 : COPYRIGHT --- */

.footer-copyright {
    width: 100% !important;
    display: flex !important;           /* Active le mode Flex */
    justify-content: center !important; /* Centre horizontalement */
    align-items: center !important;     /* Centre verticalement */
    margin-top: 10px !important;        /* Espace avec le lecteur */
    padding: 5px 0 !important;
}

.footer-copyright p {
    text-align: center !important;
    margin: 0 !important;
    width: auto !important;             /* Empêche le texte de prendre toute la largeur */
    color: rgba(245, 245, 220, 0.6) !important;
    font-family: 'IM Fell Double Pica', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* --- RAPPEL DIMENSIONS LECTEUR (Pour être sûr) --- */
.main-footer .player-parchment-bg {
    width: 650px !important; 
    height: 180px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* ============================================================
   2. LE CADRE BLANC (SPA)
   ============================================================ */
#content {
    background-color: rgba(255, 255, 255, 0.25) !important; 
    backdrop-filter: blur(1px); 
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 10px auto 10px auto !important; 
    padding: 40px !important;
    max-width: 1150px;
    width: 95%;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-height: 70vh;
    box-sizing: border-box;
}

/* On applique ton nouveau style de titre à l'intérieur du contenu */
#content {
    min-height: 400px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: opacity 0.3s ease-in-out; /* Effet de fondu pour la SPA */
}
#content h2, #content h3 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    margin-top: 30px;
}




/* ============================================================
   3. NAVIGATION - STYLE VITRAIL ÉMAILLÉ
   ============================================================ */
.medieval-nav {
    background-color: var(--menu-bg);
    border-top: 2px solid #f1c40f;
    border-bottom: 3px solid #1a130d;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
    margin: 0;
}

.nav-btn {
    display: inline-block;
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #f4e4bc !important;

    background: linear-gradient(145deg, #5d4a36, #2a1f14);
    border: 2px solid #D3AF37;
    outline: 1px solid #D3AF37;
    outline-offset: -4px;
    padding: 10px 18px;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    white-space: nowrap;
}

.nav-btn:hover, .nav-btn.active {
    background: #AB5329;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 0, 0, 0.5);
    border-color: #D3AF37;
    outline-color: #D3AF37;
}

@media (max-width: 850px) {
    .nav-links {
        display: none; 
        flex-direction: column;
        align-items: center;
        background: #2a1f14;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px 0;
        border-bottom: 3px solid #d4af37;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        gap: 15px;
    }
    .nav-links.active {
        display: flex !important;
    }
    .nav-btn {
        display: block;
        width: 90%;
        margin: 5px auto;
        text-align: center;
        outline-offset: -6px;
    }
}

/* ============================================================
   4. MENU HAMBURGER & RESPONSIVE
   ============================================================ */
.menu-toggle, .navbar-toggler {
    display: none;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

.hamburger-bar {
    display: block;
    width: 30px;
    height: 3px;
    margin: 2.5px 0 !important;
    background-color: #f1c40f;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* --- ANIMATION DE LA CROIX --- */

/* La barre du haut pivote et descend */
.menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg) !important;
}

/* La barre du milieu disparaît proprement */
.menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0 !important;
    transform: translateX(-10px) !important;
}

/* La barre du bas pivote et monte */
.menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) !important;
}

@media (max-width: 850px) {
    .menu-toggle {
        display: flex !important;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		padding: 0 !important;
		
    }
	.nav-btn {
        display: flex !important;       /* Pour centrer le texte proprement */
        align-items: center;            /* Centre verticalement */
        justify-content: center;        /* Centre horizontalement */
        
        /* UNIFORMITÉ ET TAILLE */
        width: 80% !important;          /* Force tous les boutons à 80% de la largeur écran */
        min-width: 280px;               /* Sécurité pour qu'ils ne soient pas trop fins */
        height: 55px !important;        /* Force la hauteur pour tous */
        
        margin: 10px auto !important;   /* Les centre et les espace */
        padding: 0 !important;          /* On retire le padding qui déformait la taille */
        
        font-size: 1rem !important;     /* On remonte un peu la taille du texte pour la lisibilité */
    }
}

/* ============================================================
   5. COMPAGNONS, GALERIE & FOOTER
   ============================================================ */
/* --- 1. CARTES DES COMPAGNONS (STYLE PARCHEMIN CHALEUREUX) --- */
.compagnon-card.parchment-style {
    background-color: #f4e4bc !important; /* Crème plus lumineux que le jaune sombre */
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png') !important;
    
    /* Bordure plus douce (Brun chaud) */
    border: 2px solid #8b4513 !important; 
    border-radius: 5px 15px 5px 25px / 15px 5px 25px 5px !important;
    
    /* Ombre portée pour le relief sur la page */
    box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.3), 
                inset 0 0 30px rgba(139, 69, 19, 0.15) !important;

    /* Configuration Flexbox pour l'alignement des boutons */
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 25px !important;
    transition: transform 0.10s ease;
    margin-bottom: 20px;
   
    position: relative;
    text-align: center ;
    align-items: center;
}

.compagnon-card.parchment-style:hover {
    transform: translateY(-5px);
   /* border-color: #d4af37 !important; /* Devient doré au survol */
    box-shadow: 8px 15px 30px rgba(0, 0, 0, 0.4) !important;
}

/* --- 2. CADRES PHOTOS UNIFORMISÉS (MOINS MORTUAIRE) --- */
/* On crée un conteneur pour forcer la dimension de l'image */
.compagnon-card.parchment-style .img-wrapper {
    width: 100%;
    height: 220px; /* Hauteur fixe pour toutes les photos */
    margin-bottom: 15px;
    border: 1px solid #8b4513; /* Filet fin brun */
    padding: 4px;
    background: #fff;
    overflow: hidden;
}

.compagnon-card.parchment-style img {
	display: flex;
	flex-direction: column;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image sans la déformer */
    filter: sepia(0.1) contrast(1.05); /* Uniformise les photos avec une teinte douce */
}

/* --- 3. LE MINI-PHOENIX : FLAMME ET DORURE --- */
.compagnon-card.parchment-style.mini-phoenix {
    /* Mise en valeur par la bordure et le halo */
    border: 3px ridge #e67e22 !important; 
    box-shadow: 0 0 25px rgba(230, 126, 34, 0.4), 
                inset 0 0 30px rgba(255, 215, 0, 0.2) !important;
    
    /* Fond légèrement plus chaud que les autres parchemins */
    background: linear-gradient(145deg, #f4e4bc, rgba(255, 215, 0, 0.2)) !important;
    
    /* Mise en avant légère */
    transform: scale(1.03);
    z-index: 10;
}

/* Le cadre photo avec l'effet de dégradé flamme interne */
.mini-phoenix .img-container {
    border: 3px solid #d35400 !important; /* Bordure orange brûlé */
    position: relative;
    overflow: hidden;
}

/* Création de l'effet dégradé flamme sur l'image */
.mini-phoenix .img-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%; /* Le dégradé monte sur l'image */
    background: linear-gradient(to top, 
                rgba(178, 34, 34, 0.5) 0%,   /* Rouge brique en bas */
                rgba(230, 126, 34, 0.3) 40%, /* Orange au milieu */
                transparent 100%);           /* Transparent en haut */
    pointer-events: none;
    z-index: 2;
}

.mini-phoenix .img-container img {
    filter: sepia(0.2) saturate(1.3) contrast(1.1); /* Rend la photo plus "chaude" */
}

.mini-phoenix h3 {
    color: #b22222 !important; /* Rouge brique plus vivant */
    text-shadow: 1px 1px 3px rgba(230, 126, 34, 0.3);
}

/* Hover spécial pour l'éveil du feu */
.compagnon-card.parchment-style.mini-phoenix:hover {
    transform: translateY(-8px) scale(1.04) !important;
    box-shadow: 0 0 35px rgba(230, 126, 34, 0.7) !important;
    border-color: #ff9f43 !important;
}

/* --- 4. ALIGNEMENT DES BOUTONS --- */
.story-button-wrapper {
    margin-top: auto !important; 
    padding-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-medieval-overlay {
    position: relative;
    padding: 8px 20px;
    color: #5d4037 !important;
    border: 1.5px solid #8b4513;
    background: rgba(255, 255, 255, 0.3);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-medieval-overlay:hover {
    background: #8b4513;
    color: #fdf5e6 !important;
}

/* --- TITRES --- */
.compagnon-card h3 {
    text-decoration: none;
    border-bottom: 1px solid #8b4513; /* Crée la ligne élégante sous le nom */
    display: inline-block;
    padding-bottom: 3px;
    margin-bottom: 15px;
}

/* Style pour la ligne du rôle */
.compagnon-card p.role-line {
    display: block;
    width: 100%;
    text-align: center; /* Pour que ce soit bien centré comme Jo */
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Style spécifique pour les lignes de texte */
.compagnon-card p {
    text-align: center !important;
    margin-bottom: 10px;
    width: 100%;
}

/* Pour que "Rôle :" et sa valeur restent soudés */
.compagnon-card p strong {
    display: inline; /* Empêche le libellé de prendre toute la ligne */
    margin-right: 5px;
}

/* On s'assure que le label "Rôle :" ne crée pas de décalage */
.role-line strong {
    font-weight: 800;
    color: #5d4037;
    margin-right: 5px; /* Petit espace constant après les deux-points */
}
/* ============================================================
   6. LE LECTEUR MÉDIÉVAL (PARCHEMIN & SCEAU)
   ============================================================ */

/* L'interface sur le parchemin */
.player-interface-overlay {
    width: 80% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    /* On remonte un peu l'ensemble pour le centrer visuellement sur le dessin */
    transform: translateY(-5px); 
}

.player-song-title {
    font-family: 'Cinzel Decorative', serif;
    color: #4a3c2c;
    font-size: 1.2rem !important;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
    margin: 0;
	margin-bottom: 5px !important;
    text-align: center;
}

.controls-main-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
}

/* --- LE SCEAU ROUGE ET SES ICÔNES --- */
.sceau-rouge-final {
    width: 60px !important;
    height: 60px !important;
    background: radial-gradient(circle, #a52a2a 0%, #8b0000 100%) !important;
    border: 3px double #d4af37 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.5) !important;
    flex-shrink: 0;
    position: relative;
}

/* Dessin du Triangle (Play) */
.css-play-icon {
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid #f4e4bc; /* Couleur parchemin */
    margin-left: 6px; /* Ajustement pour centrage optique */
    display: block;
}

/* Dessin des deux barres (Pause) */
.css-pause-icon {
    width: 20px;
    height: 22px;
    border-left: 7px solid #f4e4bc;
    border-right: 7px solid #f4e4bc;
    background: transparent;
    display: block;
}

.sceau-rouge-final:hover {
    transform: scale(1.1) rotate(5deg);
}

/* BARRE DE PROGRESSION DORÉE */
.progress-track-mediev {
    flex-grow: 1;
    height: 10px;
    background: rgba(42, 31, 20, 0.4);
    border: 1px solid #4a3c2c;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-gold {
    height: 100%;
    width: 0%; /* Piloté par le JS */
    background: linear-gradient(to right, #8b0000, #d4af37);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* VOLUME */
.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-medieval-gold {
    accent-color: #8b0000;
    cursor: pointer;
    width: 120px;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .player-parchment-bg {
        height: 250px;
        background-size: 100% 100% !important; /* On force le remplissage sur petit écran */
    }
    .player-interface-overlay {
        width: 80%;
    }
    .player-song-title { font-size: 1rem; }
    .sceau-rouge-final { width: 50px !important; height: 50px !important; }
}


/* ============================================================
   7. Mise à Jour
   ============================================================ */

.update-container {
    text-align: center;
    margin: 20px 0;
}

.medieval-date {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #d4af37;
    background: rgba(45, 35, 27, 0.6); /* Fond sombre translucide */
    padding: 8px 25px;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: inline-block;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

#date-value {
    color: #f5f5dc; /* Texte crème pour la date */
    font-weight: bold;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.feather-icon {
    margin-right: 10px;
    font-size: 1.1rem;
}

.update-note {
    font-style: italic;
    font-size: 0.85rem;
    color: #8b4513; /* Brun chaud comme tes bordures */
    display: block;
    margin-top: 5px;
}

#update-desc {
    font-weight: bold;
    color: #b22222; /* Rouge brique pour attirer l'oeil sur la nouveauté */
}



#gallery-container {
    position: relative;
    background-color: #1a1a1a;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(74, 60, 44, 0.7); /* Couleur médiévale */
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10; /* Toujours au-dessus des images */
    font-size: 24px;
    transition: background 0.3s;
}


/* ============================================================
   8. Gallerie Photos
   ============================================================ */
#gallery-container {
    position: relative; 
    width: 100%;
    max-width: 900px;
    height: 600px; 
    margin: 30px auto; 
    overflow: hidden;
    border: 5px solid var(--border-color);
	background: #000; /* Fond noir pour éviter le blanc entre deux transitions */
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#gallery-container img {
    position: absolute;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
	object-position: center center!important;
	position: absolute !important;
	top: 50% !important ;
    left: 50% !important ;
	transform: translate(-50%, -50%) !important;
    transition: opacity 0.8s ease-in-out;
    opacity: 0;
    z-index: 1;
    border: none !important;
}


#gallery-container img.focus-haut {
    object-position: center 20% !important; 
}

#gallery-container img.focus-moyen {
    object-position: center 40% !important; 
}


#gallery-container img.focus-bas {
    object-position: center 80% !important;
}

@media (max-width: 768px) {
    #gallery-container {
        height: 350px !important;
    }
}

	/* Sauf la première qui doit être visible dès le départ */
	#gallery-container img:first-child {
		opacity: 1;
		z-index: 2;
		position: relative; /* Pour donner la hauteur au conteneur */
	}

/* Style pour les flèches */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(74, 60, 44, 0.7); /* Couleur boisée transparente */
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    border: none;
    z-index: 100;
    transition: background 0.3s;
    font-family: serif;
}

.gallery-nav:hover {
    background: var(--accent-color);
}

.prev-btn { left: 0; border-radius: 0 5px 5px 0; }
.next-btn { right: 0; border-radius: 5px 0 0 5px; }


.gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.5);
	color: white;
	border: none;
	padding: 15px;
	cursor: pointer;
	font-size: 20px;
		}
.next-btn { right: 10px; }
.prev-btn { left: 10px; }

/* Animation de pulsation pour le bouton en attente */
button:disabled {
	animation: medievalPulse 1.5s infinite ease-in-out;
		cursor: not-allowed;
	}

@keyframes medievalPulse {
	0% { transform: scale(1); opacity: 0.7; }
	50% { transform: scale(0.98); opacity: 0.5; }
	100% { transform: scale(1); opacity: 0.7; }
	}
/* bouton pause gallerie */
.gallery-controls {
	text-align: center;
	margin-bottom: 15px;
	}

#play-pause-btn {
	background: linear-gradient(145deg, #8b5a2b, #4a3c2c); /* Effet bois texturé */
	color: #f4e1d2;
	border: 3px double #d4af37; /* Double bordure dorée */
	padding: 10px 20px;
	font-family: 'Cinzel', serif; /* Ou ta police médiévale */
	font-size: 1rem;
	font-weight: bold;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 4px;
    min-width: 160px;        /* Force une largeur stable pour contenir "REPRENDRE" */
    justify-content: center; /* Centre le texte et l'icône à l'intérieur de ces 160px */
    
/* Effet de relief (Ombre portée et lumière interne) */
	box-shadow: 
		inset 2px 2px 5px rgba(255, 255, 255, 0.2), 
		inset -2px -2px 5px rgba(0, 0, 0, 0.5),
		0 4px 10px rgba(0, 0, 0, 0.6);

	transition: all 0.2s ease-in-out;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-shadow: 1px 1px 2px black;
}

/* Effet au survol (brillance) */
#play-pause-btn:hover {
	background: linear-gradient(145deg, #a67c52, #5d4a36);
	border-color: #f1c40f;
	box-shadow: 
		inset 2px 2px 5px rgba(255, 255, 255, 0.3), 
		0 0 15px rgba(212, 175, 55, 0.4);
	transform: translateY(-2px);
		}

/* Effet quand on clique (enfoncement) */
#play-pause-btn:active {
	transform: translateY(1px);
	box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.8);
		}

/* Style spécifique quand il est en mode "Paused" */
#play-pause-btn.paused {
	background: linear-gradient(145deg, #4a3c2c, #2a1f14);
	border-color: #a0a0a0; /* Argenté/Grisé pour montrer l'arrêt */
		}		


/* ============================================================
   9. AGENDA
   ============================================================ */
/* --- 1. CONTENEUR PRINCIPAL --- */
.agenda-medieval {
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.agenda-list {
    list-style: none;
    padding: 0;
}

/* --- 2. LES LIGNES (PARCHEMINS) --- */
.agenda-list li {
    background: #f4e4bc; /* Couleur parchemin clair */
    border: 1px solid #d4af37;
    border-left: 8px solid #8b5a2b; /* Effet reliure */
    margin-bottom: 15px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    min-height: 100px;
}

.agenda-list li:hover {
    transform: translateX(10px);
    background: #fcf1d4;
}

/* --- 3. TEXTES --- */
.agenda-list .date {
    font-family: 'Cinzel', serif;
    font-weight: bold;
    color: #4a3c2c;
    flex: 0 0 150px;
}

.agenda-list .event {
    flex-grow: 1;
    font-size: 1.1rem;
    color: #2c1e10;
    padding: 0 10px;
}

/* --- 4. LE SCEAU DE CIRE (VERSION CORRIGÉE) --- */
.status {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Empêche l'écrasement en largeur */
    
    width: 90px;
    height: 90px;
    aspect-ratio: 1 / 1; /* FORCE LA FORME RONDE (Anti-Haricot) */

    font-family: 'Cinzel', serif;
    font-weight: 900;
    text-align: center;
    color: rgba(244, 228, 188, 0.8);
    text-transform: uppercase;
    
    /* Forme "Écrasée" à la main */
    border-radius: 48% 40% 60% 42% / 40% 55% 45% 62%;
    background: #7a1c1c;
    
    /* Reliefs */
    box-shadow: 
        inset 4px 4px 10px rgba(0, 0, 0, 0.5),
        inset -4px -4px 10px rgba(255, 255, 255, 0.1),
        2px 4px 6px rgba(0, 0, 0, 0.6),
        0 0 0 4px #7a1c1c,
        2px 2px 0 6px rgba(0,0,0,0.2);

    transform: rotate(-8deg);
    font-size: 0.8rem;
    line-height: 0.9;
    letter-spacing: -0.5px;
    word-wrap: break-word;
    overflow: hidden;
    transition: transform 0.3s;
}

/* Sceau Vert (Scellé) */
.status.ok {
    background: #1e3d1a;
    box-shadow: 
        inset 4px 4px 10px rgba(0, 0, 0, 0.5),
        inset -4px -4px 10px rgba(255, 255, 255, 0.1),
        2px 4px 6px rgba(0, 0, 0, 0.6),
        0 0 0 4px #1e3d1a,
        2px 2px 0 6px rgba(0,0,0,0.2);
    transform: rotate(25deg);
}

.status:hover {
    transform: scale(1.05) rotate(0deg);
}

/* --- 5. ÉVÉNEMENTS PASSÉS / ARCHIVES --- */
.event-past, .agenda-list.archive li {
    background: #d2c4a9 !important;
    border-left-color: #7a6b5a !important;
    opacity: 0.7;
    filter: grayscale(0.5);
}

.event-past .event, .agenda-list.archive li .event {
    text-decoration: line-through;
    color: #5d4a36;
}

.event-past .status {
    background: #4a4a4a !important;
    color: #999 !important;
    box-shadow: none;
    border-radius: 50%; /* Plus simple pour les archives */
}

/* --- 6. ADAPTATION SMARTPHONE (LE SECRET) --- */
@media (max-width: 650px) {
    .agenda-list li {
        flex-direction: column; /* Empile Date, Texte et Sceau verticalement */
        text-align: center;
        gap: 15px;
        padding: 20px 10px;
    }

    .agenda-list .date {
        flex: 0 0 auto;
        width: 100%;
        border-bottom: 1px dashed rgba(0,0,0,0.1);
        padding-bottom: 5px;
    }

    .agenda-list .event {
        width: 100%;
    }

    .status {
        width: 80px; 
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        margin: 0 auto; /* Centre le sceau horizontalement */
    }
}

/* Séparateur décoratif */
.medieval-separator {
    border: 0;
    height: 2px;
    background-image: linear-gradient(to right, transparent, #8b5a2b, transparent);
    margin: 40px 0;
}

/* ============================================================
   10. SECTION ALLIANCES & LIENS (STYLE MÉDIÉVAL)
   ============================================================ */

/* 1. On prépare le terrain */
.alliances-container {
    width: 100% !important;
    overflow-x: hidden; /* Empêche le scroll horizontal bizarre */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 2. On force la largeur sans décalage */
.fb-full-width {
    width: 100%; /* On revient à 100% du parent */
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 15px; /* Petite marge de sécurité pour le mobile */
}

.special-fb {
    /* C'est ici qu'on gagne la bataille */
    width: 100% !important; 
    flex: 0 0 100% !important;
    max-width: 1100px !important; /* Elle s'alignera pile sur ton titre "Compagnies Amies" */
    background: #f4e4bc !important;
    border: 1px solid #d4af37 !important;
    box-sizing: border-box;
}

.special-fb .card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centre tout horizontalement */
    text-align: center;     /* Centre le texte des paragraphes */
    width: 100%;
}

.special-fb .card-header {
    justify-content: center; /* Centre l'icône et le titre ensemble */
    width: 100%;
   /* border-bottom: 1px solid rgba(139, 90, 43, 0.3);*/
    margin-bottom: 20px;
}

.special-fb .card-desc {
    max-width: 800px;       /* Évite que le texte ne s'étale trop sur une seule ligne */
    margin-left: auto;
    margin-right: auto;
}

/* 3. Grille des Compagnies Amies */
.alliances-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centre les vignettes orphelines du bas */
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

/* 4. Style des Vignettes (Look Original) */
.alliance-card {
    background: #f4e4bc;
    border: 1px solid #d4af37;
    padding: 25px;
    flex: 1 1 350px; /* Taille flexible, min 350px */
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Aligne le bouton en bas */
    box-shadow: 4px 4px 15px rgba(0,0,0,0.15);
    position: relative;
    transition: transform 0.3s ease;
}

.alliance-card:hover {
    transform: translateY(-5px);
}

/* 5. Ornements des Coins (Tes équerres dorées) */
.card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

.alliance-card::before, .alliance-card::after,
.card-inner::before, .card-inner::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #d4af37;
    pointer-events: none;
}

.alliance-card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.alliance-card::after { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.card-inner::before { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.card-inner::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* 6. Mise en Valeur des Textes (Agrandis) */
.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(139, 90, 43, 0.3);
    padding-bottom: 10px;
}

.card-icon {
    font-size: 2.2rem;
    filter: sepia(0.5) contrast(1.2);
}

.card-title-group h3 {
    font-family: 'Cinzel', serif;
    margin: 0;
    color: #4a3c2c;
    font-size: 1.25rem !important; /* Texte mis en valeur */
    line-height: 1.2;
    min-height: 2.5em;
    display: flex;
    align-items: center;
}

.card-role {
    font-size: 0.85rem !important;
    text-transform: uppercase;
    color: #8b5a2b;
    font-weight: bold;
    letter-spacing: 1px;
}

.card-desc {
    font-size: 1.05rem !important; /* Description plus lisible */
    color: #5d4a36;
    line-height: 1.5;
    margin-bottom: 25px;
    flex-grow: 1; /* Pousse le bouton vers le bas pour l'alignement */
}

/* 7. Liens (Style Original Souligné) */
.alliance-link {
    align-self: center;
    color: #8b5a2b;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1rem !important; /* Lien plus grand */
    border-bottom: 2px solid #d4af37;
    padding-bottom: 3px;
    transition: all 0.2s;
}

.alliance-link:hover {
    color: #4a3c2c;
    border-color: #4a3c2c;
    letter-spacing: 1px;
}

/* 8. Responsive Mobile */
@media (max-width: 768px) {
    .alliances-grid .alliance-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.custom-medieval-icon {
    width: 50px;      /* Ajuste la taille selon tes besoins */
    height: 50px;
    object-fit: contain;
    /* On peut ajouter un filtre pour qu'elle s'accorde au parchemin */
    filter: sepia(0.4) saturate(1.2); 
    display: inline-block;
    vertical-align: middle;
}


/* ============================================================
   11. Formulaire de Contact
   ============================================================ */
/* --- SECTION FORMULAIRE DE CONTACT --- */

.contact-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    color: #4a3c2c;
}

/* Style des champs (Papier clair) */
.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: #fdfae6; /* Effet papier */
    font-family: 'IM Fell Double Pica', serif;
    font-size: 1.1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- BOUTON DE MISSIVE (STYLE HARMONISÉ BOIS & OR) --- */

.btn-medieval-3d {
    background: linear-gradient(145deg, #8b5a2b, #4a3c2c); /* Effet bois comme le lecteur */
    color: #f4e1d2;
    border: 3px double #d4af37; /* La fameuse double bordure dorée */
    padding: 12px 30px;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px black;
    
    /* Relief par ombres internes (effet 3D biseauté) */
    box-shadow: 
        inset 2px 2px 5px rgba(255, 255, 255, 0.2), 
        inset -2px -2px 5px rgba(0, 0, 0, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.6);

    transition: all 0.2s ease-in-out;
    outline: none;
    appearance: none;
}

/* Survol : Brillance et élévation */
.btn-medieval-3d:hover {
    background: linear-gradient(145deg, #a67c52, #5d4a36);
    border-color: #f1c40f;
    box-shadow: 
        inset 2px 2px 5px rgba(255, 255, 255, 0.3), 
        0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Clic : Enfoncement physique */
.btn-medieval-3d:active {
    transform: translateY(1px);
    box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.8);
}

/* État pendant l'envoi (Désactivé / Mode Pausé) */
.btn-medieval-3d:disabled {
    background: linear-gradient(145deg, #4a3c2c, #2a1f14);
    border-color: #a0a0a0; /* Gris argenté */
    cursor: wait;
    opacity: 0.8;
    transform: translateY(0);
}

/* --- MESSAGES DE STATUT --- */

#form-status {
    margin-top: 20px;
    text-align: center;
    font-family: 'IM Fell Double Pica', serif;
    font-weight: bold;
    min-height: 30px;
}

#form-status span {
    display: inline-block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   TYPOGRAPHIE MÉDIÉVALE
   ============================================================ */
h1, .page-title {
    font-family: 'Cinzel Decorative', cursive;
    color: #8B0000;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 2px solid #4a3c2c;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

h2, .compagnon-name {
    font-family: 'Cinzel Decorative', cursive;
    color: #8B0000;
    font-size: 1.4rem;
    margin-top: 15px;
    text-align: center;
}

#content p {
    font-family: 'IM Fell Double Pica', serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #2d231b;
    text-align: justify;
    margin-bottom: 20px;
}

/*#content p:first-of-type::first-letter {
    font-family: 'Cinzel Decorative', cursive;
    float: left;
    font-size: 3.5rem;
    line-height: 1;
    padding-right: 10px;
    color: var(--gold);
    text-shadow: 2px 2px 0px #2d231b;
}*/

#content ul {
    list-style: none;
    padding-left: 20px;
}

#content ul li::before {
    content: "❧"; 
    color: var(--green);
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

/* Titre principal de la page */
.medieval-title {
    color: #8b0000; /* Un rouge sombre royal */
    font-family: 'Cinzel', serif;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Titres des sections (Compagnies Amies, Marchands...) */
.category-divider {
    color: #8b0000; /* Le même rouge pour l'uniformité */
    font-family: 'Cinzel', serif;
    text-align: center;
    margin: 40px 0 20px;
    border-bottom: 2px double #d4af37; /* Ta ligne dorée */
    padding-bottom: 10px;
    width: 100%;
}



/* --- FORCE LE CENTRAGE ABSOLU DU LECTEUR --- */

/* 1. Le conteneur tout en bas (Footer) */
.main-footer {
    width: 100% !important;
    display: block !important;
    padding: 20px 0 !important;
    background-color: var(--footer-bg) !important;
}

/* 2. Le wrapper qui doit occuper toute la largeur */
.main-footer .medieval-player-wrapper {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    justify-content: center !important; /* Centre horizontalement */
    align-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* 3. Le parchemin (on retire les paddings internes fixes) */
.main-footer .player-parchment-bg {
    background-image: url('../../assets/images/ParchLecteur.png') !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    
    /* On utilise des proportions plus souples */
    width: 850px !important; 
    max-width: 95% !important; 
    height: 320px !important;
    
    /* Reset des paddings qui poussaient le contenu à droite */
    padding: 0 !important; 
    margin: 0 auto !important;
    
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 4. L'interface (centrée sur le parchemin) */
.main-footer .player-interface-overlay {
    position: relative !important;
    width: 60% !important; /* On réduit la zone pour rester au centre du parchemin */
    left: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transform: translateY(-5px); /* Ajustement vertical si besoin */
}

/* 5. La rangée Play + Barre */
.controls-main-row {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
}


/* Lecteur audio forcé */

/* --- LECTEUR AFFINÉ : FORCE LES DIMENSIONS --- */
.main-footer .medieval-player-wrapper {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 10px 0 !important;
}

.main-footer .player-parchment-bg {
    background-image: url('../../assets/images/ParchLecteur.png') !important;
    background-size: 100% 100% !important;
    background-repeat: no-no-repeat !important;
    
    /* Dimensions forcées (Plus petit) */
    width: 650px !important;  
    height: 180px !important; 
    
    /* On retire le padding de 120px qui décalait tout */
    padding: 0 !important; 
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* On ajuste l'interface pour qu'elle tienne dans la nouvelle hauteur */
.main-footer .player-interface-overlay {
    width: 80% !important;
    gap: 5px !important; 
    transform: translateY(-5px);
}

.player-song-title {
    font-size: 1.1rem !important;
    margin: 0 0 5px 0 !important;
}

.kerning-space {
    margin-right: 0.03em; /* Ajuste cette valeur : 0.02em pour un souffle, 0.1em pour un espace visible */
    display: inline-block; /* Nécessaire pour que la marge soit prise en compte */
}



/* Media query
/* --- Correction Header : Alignement Horizontal --- */
@media (max-width: 992px) {
    
    .header-content-centered {
        display: flex !important;
        flex-direction: row !important; /* Force le blason à rester à GAUCHE */
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        flex-wrap: nowrap !important; /* Empêche le texte de passer en dessous */
    }

    .header-logo img {
        max-width: 70px !important; /* Réduit le blason pour gagner de la place */
        height: auto !important;
    }

    .header-text-container {
        margin-left: 15px !important; /* Espace entre blason et texte */
        text-align: left !important;
        flex-shrink: 1; /* Permet au texte de se réduire si besoin */
    }

    .site-title {
        font-size: 1.4rem !important; /* Réduit la taille pour que ça tienne */
        margin: 0 !important;
        white-space: nowrap; /* Évite que le titre se coupe */
    }

    .site-tagline {
        font-size: 0.8rem !important;
        margin: 0 !important;
        display: block;
        /* Supprime l'espace insécable &nbsp; si nécessaire pour éviter les décalages */
    }

    /* On s'assure que le cadre en bois s'adapte si le slogan prend deux lignes */
    .main-header {
        height: auto !important;
        min-height: 180px !important;
        padding: 10px 0 !important;
        background-size: 100% 100% !important;
    }
}


/* --- Gallerie Responsive : Version Plein Cadre --- */
@media (max-width: 768px) {
    #gallery-container {
        height: auto !important;
        aspect-ratio: 4 / 3; /* Un peu plus haut sur mobile pour mieux voir les portraits */
        max-height: 60vh; 
        overflow: hidden;
        position: relative;
    }

    #gallery-container img {
        width: 100% !important;
        height: 100% !important;
        /* 1. On remplit tout le cadre (plus de bandes !) */
        object-fit: cover !important; 
        
        /* 2. On centre parfaitement l'image dans le cadre */
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        
        /* 3. Par défaut, on centre le zoom */
        object-position: center center !important; 
    }

    /* 4. TES RÉGLAGES SUR MESURE (remplace ton ancien 00% 45%) */
    /* Ajoute ces classes dans ton HTML sur les photos concernées */
    #gallery-container img.focus-visage {
        object-position: center 25% !important; /* Pour remonter la photo et voir les visages */
    }
    
    #gallery-container img.focus-pieds {
        object-position: center 75% !important; /* Pour descendre la photo */
    }
}