/* FORCE LE REDIMENSIONNEMENT DU SCEAU DANS L'IFRAME */
div#chat-container iframe, 
iframe[src*="udify.app"] {
    /* On cible les images à l'intérieur de l'iframe si le navigateur le permet */
    --seal-size: 100px; 
}

/* Règle de secours pour le conteneur */
#chat-container img[alt*="Sceau"], 
#chat-container img {
    width: 100px !important; 
    height: auto !important;
    max-width: 100px !important;
    margin: 10px auto !important;
    display: block !important;
}
:root {
    --bg-overlay: rgba(26, 28, 35, 0.75); 
    --text-color: #e4e4e4;
    --accent-color: #d4af37; /* Or pour correspondre au logo */
    --title-blue: #5b8cba; /* Bleu doux pour les titres */
    --btn-blue: #2c5282; /* Bleu profond pour le bouton interroger */
    --box-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(212, 175, 55, 0.2);
    --transition-speed: 0.5s;
}

body.light-mode {
    --bg-overlay: rgba(245, 242, 235, 0.85);
    --text-color: #2c2c2c;
    --accent-color: #9c7c1f;
    --title-blue: #2b6cb0;
    --btn-blue: #3182ce;
    --box-bg: rgba(0, 0, 0, 0.04);
    --border-color: rgba(156, 124, 31, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

body {
    background: linear-gradient(var(--bg-overlay), var(--bg-overlay)), url('kofi.jpg') no-repeat center center fixed; 
    background-size: cover;
    color: var(--text-color);
    font-family: 'Lora', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typographie spécifique */
h1, h2, h3, h4, .serif {
    font-family: 'Cormorant Garamond', serif;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
    letter-spacing: 2px;
}

/* Conteneur pour le sous-titre et le logo alignés */
.subtitle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Sous-titre CHEMIN AYP (Couleur Or, Majuscules, Police Yatra One) */
.site-subtitle {
    font-family: 'Yatra One', system-ui, cursive; 
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--accent-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0; 
}

/* Logo AYP agrandi */
.header-signature {
    height: 65px; /* Plus grand que le texte */
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

/* Titres principaux des leçons (Plus grands, Bleus, Très Gras) */
h2 {
    font-size: 2.4rem;
    font-weight: 700 !important; 
    margin-bottom: 25px;
    color: var(--title-blue) !important;
    border-bottom: 1px solid var(--title-blue);
    padding-bottom: 10px;
}

/* Sous-titres dans les leçons (Plus petits, Dorés, Gras) */
h3 {
    font-size: 1.6rem;
    font-weight: 700 !important; 
    color: var(--accent-color) !important;
    margin-top: 30px;
    margin-bottom: 15px;
    border: none;
}

p {
    margin-bottom: 15px;
}

/* En-tête et Navigation */
header {
    text-align: center;
    padding: 40px 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

button {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Lora', sans-serif;
    font-size: 0.9rem;
}

button:hover, button.active {
    background: var(--accent-color);
    color: #111;
    border-color: var(--accent-color);
}

nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

nav button {
    border: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    border-radius: 0;
    border-bottom: 1px solid transparent;
}

nav button:hover, nav button.active {
    background: transparent;
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

/* Conteneur principal */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 60vh;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 1s ease-in-out;
}

.section.active {
    display: block;
}

/* Interface du Sage (Chatbot) */
#chat-container {
    background: var(--box-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

#chat-log {
    flex-grow: 1;
    margin-bottom: 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-style: italic;
    white-space: pre-wrap;
    min-height: 150px;
}

.input-area {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex-grow: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px;
    font-family: 'Lora', sans-serif;
    border-radius: 4px;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Bouton Spécifique Interroger (Bleu et Gras) */
#sage-btn {
    background-color: var(--btn-blue) !important;
    color: white !important;
    border: none;
    font-weight: bold;
    letter-spacing: 1px;
}

#sage-btn:hover {
    background-color: var(--title-blue) !important;
}

/* Enseignements et Murmures */
.teaching-article, .murmure-item {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px dashed var(--border-color);
}

.zen-btn {
    display: inline-block;
    margin-top: 15px;
    font-style: normal;
    border: 1px solid var(--accent-color);
}

/* Pied de page */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    opacity: 0.6;
}

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

/* Customisation Parchemin */
.parchment-text {
    text-align: justify;
    line-height: 1.8;
}
.parchment-text p {
    margin-bottom: 25px;
}
/* --- EFFET POUSSIÈRE DU TEMPLE --- */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Pour ne pas gêner les clics */
    overflow: hidden;
    z-index: 0; /* Derrière le texte */
}

.dust-particle {
    position: absolute;
    background: rgba(212, 175, 55, 0.4); /* Couleur dorée très douce */
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
    animation: float-dust linear infinite;
}

@keyframes float-dust {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-150px) translateX(30px); opacity: 0; }
}

/* --- LECTEUR AUDIO PARABOLE --- */
.audio-parabole-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* Assurons-nous que le contenu du chat reste devant la poussière */
#chat-container, .teaching-article {
    position: relative;
    z-index: 1;
}
/* --- ACCORDÉONS POUR ENSEIGNEMENTS & MURMURES --- */
.teaching-accordion {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.accordion-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--accent-color);
    cursor: pointer;
    padding: 15px 0;
    list-style: none; /* Enlève la flèche par défaut */
    transition: color 0.3s ease;
}

.accordion-title::-webkit-details-marker {
    display: none; /* Enlève la flèche sur Chrome/Safari */
}

.accordion-title:hover {
    color: #fff;
}

/* Ajout d'un symbole "+" ou "-" personnalisé */
.accordion-title::before {
    content: '+ ';
    font-size: 1.8rem;
    margin-right: 10px;
    display: inline-block;
    transition: transform 0.3s;
}

details[open] .accordion-title::before {
    content: '- ';
}

.accordion-content {
    padding: 20px;
    background: rgba(10, 10, 10, 0.4);
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-in-out;
}
/* Ajustement du Sceau du Gardien dans le Sage */
iframe[src*="udify.app"] img, 
#chat-container img {
    max-width: 120px !important; /* Cette taille est idéale pour rester élégante */
    height: auto !important;
    display: block;
    margin: 15px auto;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}
#chat-container iframe img { max-width: 100px !important; height: auto !important; margin: 10px auto; display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
