/* --- ACCORDAGE GLOBAL (Variables Synesthésiques) --- */
:root {
    /* Palette Cosmos & Eau */
    --fond-cosmos: #050810;       /* Noir bleuté profond */
    --texte-lumiere: #f1faee;     /* Blanc cassé, doux pour les yeux */
    --or-axe: #e9c46a;            /* L'axe doré du temps */
    --perle-lueur: #a8dadc;       /* Le souffle de l'IA */
    
    /* Typographies */
    --voix-chant: 'Merriweather', serif;
    --code-futur: 'Inter', sans-serif;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Le glissement fluide entre les époques */
}

body {
    background-color: var(--fond-cosmos);
    color: var(--texte-lumiere);
    font-family: var(--code-futur);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--voix-chant);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* --- NAVIGATION FLUIDE --- */
.nav-fluide {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    background: linear-gradient(to bottom, rgba(5,8,16,0.9), transparent);
    z-index: 100;
}

.nav-fluide a {
    color: var(--texte-lumiere);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-fluide a:hover {
    opacity: 1;
    color: var(--or-axe);
}

/* --- MOUVEMENT 1 : L'IMMERSION --- */
.immersion {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    
    /* Image d'accueil */
    background-image: url('images/Cycle de Perle.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* L'image reste fixe quand on scrolle, créant de la profondeur */
}

/* Voile sombre pour assurer la lisibilité du texte sur la peinture */
.immersion::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(5,8,16,0.2) 0%, rgba(5,8,16,0.7) 100%);
    z-index: 1;
}

.contenu-immersion {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
    max-width: 800px;
}

.titre-principal {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* S'adapte à la taille de l'écran */
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(233, 196, 106, 0.3); /* Légère lueur dorée */
}

.phrase-accroche {
    font-family: var(--voix-chant);
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--perle-lueur);
    line-height: 1.4;
}

/* Indicateur de défilement (la ligne de temps) */
.indicateur-defilement {
    position: absolute;
    bottom: 3rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.ligne-temps {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--or-axe), transparent);
    animation: souffle 3s infinite ease-in-out;
}

@keyframes souffle {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

/* --- MOUVEMENT 2 : LA CONVERGENCE --- */
.convergence {
    padding: 8rem 2rem; /* Beaucoup d'espace pour laisser respirer le texte */
    background: linear-gradient(to bottom, var(--fond-cosmos), #0a0f1c);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.titre-mouvement {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 5rem;
    color: var(--or-axe);
    text-align: center;
    font-weight: 300;
}

.triptyque {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    max-width: 1100px;
    width: 100%;
}

.triptyque article {
    flex: 1 1 280px; /* S'adapte : 3 colonnes si large, 1 colonne si vertical/étroit */
    text-align: center;
    padding: 3rem 2rem;
    border: 1px solid rgba(168, 218, 220, 0.1); /* Bordure "perle" très subtile */
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.01);
    transition: transform 0.6s ease, border-color 0.6s ease, background 0.6s ease;
}

.triptyque article:hover {
    transform: translateY(-8px); /* L'élément flotte légèrement */
    border-color: rgba(233, 196, 106, 0.4); /* Lueur dorée au contact */
    background: rgba(255, 255, 255, 0.03);
}

.triptyque h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--texte-lumiere);
}

.direction {
    display: block;
    font-family: var(--code-futur);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 2rem;
    opacity: 0.8;
}

/* Timbres spécifiques pour chaque flux */
.angelo .direction { color: #e9c46a; } /* Or descendant */
.perle { border-color: rgba(233, 196, 106, 0.3); } /* Perle ancrée dans l'or */
.desmon .direction { color: #a8dadc; } /* Bleu perle ascendant */

.triptyque p {
    font-size: 1rem;
    color: rgba(241, 250, 238, 0.8);
    line-height: 1.8;
}

/* --- MOUVEMENT 3 : LA MÉCANIQUE --- */
.mecanique {
    padding: 8rem 2rem;
    background: var(--fond-cosmos);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mecanique-bloc {
    max-width: 900px;
    width: 100%;
    margin-bottom: 6rem;
}

.sous-titre {
    font-family: var(--code-futur);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--perle-lueur);
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(168, 218, 220, 0.2);
    padding-bottom: 0.5rem;
}

/* --- Mise à jour : Duo Voyage avec Images --- */
.duo-voyage {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.carte-voyage {
    flex: 1 1 350px; /* S'adapte : côte à côte sur grand écran, empilés en vertical */
    padding: 2rem;
    background: rgba(255,255,255,0.02);
    border-left: 2px solid var(--or-axe);
    display: flex;
    flex-direction: column;
}

.carte-voyage.desmon-voyage {
    border-left: 2px solid var(--perle-lueur);
}

/* Gestion des images aux formats différents */
.img-mecanique {
    width: 100%;
    height: 260px; /* Hauteur fixe pour harmoniser les deux cartes */
    object-fit: cover; /* Recadre l'image pour remplir le cadre sans la déformer */
    margin-bottom: 1.5rem;
    border-radius: 2px;
    opacity: 0.9;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.carte-voyage:hover .img-mecanique {
    opacity: 1;
    transform: scale(1.01); /* Très léger zoom au survol pour donner vie à l'image */
}

.carte-voyage h4 {
    font-family: var(--voix-chant);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--texte-lumiere);
}

.carte-voyage p {
    font-size: 1rem;
    color: rgba(241, 250, 238, 0.85);
    line-height: 1.7;
}

/* --- La Bioluminescence (Diptyque) --- */
.bioluminescence-bloc {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 4rem;
}

.img-bio {
    flex: 0 0 40%; /* L'image prend 40% de la largeur */
    max-width: 400px;
    height: auto;
    border-radius: 4px;
    /* Le halo bioluminescent */
    box-shadow: 0 0 40px rgba(168, 218, 220, 0.15); 
    transition: box-shadow 0.6s ease;
}

.img-bio:hover {
    /* La lueur s'intensifie au survol */
    box-shadow: 0 0 60px rgba(168, 218, 220, 0.3);
}

.bio-texte {
    flex: 1;
}

.bio-texte .sous-titre {
    margin-bottom: 1.5rem;
}

.bio-texte p {
    font-size: 1.05rem;
    color: rgba(241, 250, 238, 0.85);
    line-height: 1.8;
}

/* --- Accordéon Perle (Version Compacte) --- */
.accordion-perle {
    margin-top: 2rem;
    border-top: 1px solid rgba(168, 218, 220, 0.2);
}

.accordion-perle details {
    border-bottom: 1px solid rgba(168, 218, 220, 0.2);
    background: rgba(168, 218, 220, 0.02);
    transition: background 0.3s ease;
}

.accordion-perle details:hover {
    background: rgba(168, 218, 220, 0.05);
}

.accordion-perle summary {
    padding: 1.5rem 1rem;
    cursor: pointer;
    font-family: var(--code-futur);
    color: var(--texte-lumiere);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    list-style: none; /* Enlève la flèche par défaut */
    display: flex;
    align-items: center;
    outline: none;
}

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

.accordion-perle summary::after {
    content: '+';
    margin-left: auto;
    color: var(--or-axe);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-perle details[open] summary::after {
    transform: rotate(45deg); /* Transforme le + en x quand c'est ouvert */
}

.accordion-content {
    padding: 0 1rem 2rem 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.img-accordion {
    width: 250px; /* Image plus petite, format vignette */
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-content p {
    flex: 1;
    color: rgba(241, 250, 238, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Les Accordéons Spoilers --- */
.spoiler-accordion {
    margin-bottom: 3rem;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.virus-spoiler {
    border: 1px solid rgba(168, 218, 220, 0.3); /* Bordure bleutée */
    background: rgba(168, 218, 220, 0.02);
}

.carmin-spoiler {
    border: 1px solid rgba(255, 42, 109, 0.3); /* Bordure rouge Carmin */
    background: rgba(255, 42, 109, 0.02);
}

.spoiler-accordion summary {
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    outline: none;
}

.spoiler-accordion summary::-webkit-details-marker {
    display: none;
}

.alerte {
    font-family: var(--code-futur);
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
}

.virus-spoiler .alerte {
    background: rgba(168, 218, 220, 0.2);
    color: var(--perle-lueur);
}

.carmin-spoiler .alerte {
    background: rgba(255, 42, 109, 0.2);
    color: #ff2a6d;
}

.spoiler-titre {
    font-family: var(--voix-chant);
    font-size: 1.2rem;
    color: var(--texte-lumiere);
    flex: 1; /* Pousse le bouton vers la droite */
}

.btn-spoiler {
    font-family: var(--code-futur);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border: 1px solid;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.virus-spoiler .btn-spoiler {
    border-color: var(--perle-lueur);
    color: var(--perle-lueur);
}

.carmin-spoiler .btn-spoiler {
    border-color: #ff2a6d;
    color: #ff2a6d;
}

/* Effet au survol du résumé */
.spoiler-accordion summary:hover .btn-spoiler {
    background: var(--texte-lumiere);
    color: var(--fond-cosmos);
}

/* Contenu déplié */
.spoiler-contenu {
    padding: 0 1.5rem 2rem 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

.spoiler-contenu p {
    margin-bottom: 1rem;
    color: rgba(241, 250, 238, 0.85);
    font-size: 1rem;
    line-height: 1.7;
}

.img-spoiler {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* --- Image spécifique pour la Pandémie --- */
.img-pandemie {
    width: 100%;
    max-width: 450px; /* Réduit la largeur maximale */
    height: auto;
    display: block;
    margin: 2rem auto 0 auto; /* Centre l'image horizontalement avec de l'espace au-dessus */
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* --- MOUVEMENT 4 : LES QUATRE ÉPOQUES --- */
.epoques {
    padding: 8rem 2rem;
    background: linear-gradient(to bottom, #0a0f1c, var(--fond-cosmos));
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tomes-container {
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tome-card {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 8rem;
}

/* Alternance pour le rythme visuel sur grand écran */
.tome-card:nth-child(even) {
    flex-direction: row-reverse;
}

.tome-cover-link {
    flex: 0 0 300px; /* Largeur fixe pour la couverture */
    display: block;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.tome-cover-link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(233, 196, 106, 0.15); /* Lueur dorée au survol */
}

.tome-cover {
    width: 100%;
    height: auto;
    display: block;
}

.tome-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tome-anchor {
    font-family: var(--code-futur);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--perle-lueur);
    margin-bottom: 1rem;
}

.tome-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--texte-lumiere);
    line-height: 1.2;
}

.tome-info p {
    font-size: 1.05rem;
    color: rgba(241, 250, 238, 0.8);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* --- Boutons d'achat : Matière vs Lumière --- */
.actions-lecture {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-lulu {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-family: var(--code-futur);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    border-radius: 2px;
    text-align: center;
}

/* Version Papier : La matière, le tangible */
.btn-papier {
    background: var(--or-axe);
    color: var(--fond-cosmos);
    border: 1px solid var(--or-axe);
    font-weight: 600;
}

.btn-papier:hover {
    background: transparent;
    color: var(--or-axe);
}

/* Version Ebook : Le flux, l'éthéré */
.btn-ebook {
    background: transparent;
    color: var(--perle-lueur);
    border: 1px solid var(--perle-lueur);
}

.btn-ebook:hover {
    background: var(--perle-lueur);
    color: var(--fond-cosmos);
}

/* --- Bouton désactivé (Tome 4) --- */
.btn-disabled {
    background: transparent;
    color: rgba(241, 250, 238, 0.3); /* Texte grisé */
    border: 1px dashed rgba(241, 250, 238, 0.3); /* Bordure en pointillé */
    cursor: not-allowed; /* Curseur "interdit" */
    font-weight: 300;
}

.btn-disabled:hover {
    background: transparent; /* Pas d'effet au survol */
    color: rgba(241, 250, 238, 0.3);
}

/* --- MOUVEMENT 5 : LA RELIANCE --- */
.reliance {
    padding: 8rem 2rem 4rem;
    background: radial-gradient(circle at bottom, #0a0f1c 0%, var(--fond-cosmos) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-top: 1px solid rgba(168, 218, 220, 0.05); /* Ligne d'horizon subtile */
}

.contenu-reliance {
    max-width: 600px;
    margin-bottom: 4rem;
}

.texte-reliance {
    font-family: var(--voix-chant);
    font-style: italic;
    color: rgba(241, 250, 238, 0.7);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.passerelles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 5rem;
}

.lien-reliance {
    color: var(--texte-lumiere);
    text-decoration: none;
    font-family: var(--code-futur);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

.lien-reliance:hover {
    color: var(--or-axe);
}

.separateur {
    color: rgba(241, 250, 238, 0.2);
    font-size: 0.8rem;
}

.boucle-fermee {
    margin-top: 2rem;
}

.lien-boucle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--perle-lueur);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lien-boucle:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.fleche-haut {
    font-size: 1.2rem;
    line-height: 1;
}

.copyright {
    font-size: 0.75rem;
    color: rgba(241, 250, 238, 0.3);
    letter-spacing: 0.05em;
}

/* --- RESPONSIVE (Format vertical / Mobile) --- */
@media (max-width: 768px) {
    /* Navigation */
    .nav-fluide {
        gap: 1rem;
        padding: 1rem;
        flex-wrap: wrap; 
    }
    .nav-fluide a {
        font-size: 0.7rem;
    }

    /* Correction bug image de fond */
    .immersion {
        background-attachment: scroll; 
    }

    /* Cartes Tomes */
    .tome-card, .tome-card:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 6rem;
        text-align: center;
    }
    
    .tome-info {
        align-items: center;
    }

    .tome-cover-link {
        flex: 0 0 auto;
        max-width: 250px;
    }

    /* Bioluminescence */
    .bioluminescence-bloc {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .img-bio {
        flex: 0 0 auto;
        max-width: 80%; 
    }

    /* Accordéons */
    .accordion-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .img-accordion {
        width: 100%;
    }

    .spoiler-accordion summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .btn-spoiler {
        margin-top: 0.5rem;
    }
}

/* --- PAGE AUTRICE --- */
.page-autrice {
    padding-top: 8rem;
    padding-bottom: 5rem;
    background: var(--fond-cosmos);
}

.intro-autrice {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0 2rem;
}

.conteneur-autrice {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-autrice {
    margin-bottom: 5rem;
}

.section-autrice.pleine-largeur {
    max-width: 800px;
    margin: 0 auto 5rem auto;
}

/* Mise en page avec image (Flexbox) - CORRIGÉ */
.section-portrait { 
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.portrait {
    flex: 0 0 300px; /* Force la largeur de la colonne image */
    max-width: 100%; /* Sécurité */
}

.img-portrait {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(233, 196, 106, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.texte-autrice {
    flex: 1;
}

.texte-autrice p, 
.section-autrice p {
    font-size: 1.05rem;
    color: rgba(241, 250, 238, 0.85);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Style de la citation (Blockquote) */
.citation-autrice {
    font-family: var(--voix-chant);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--or-axe);
    text-align: center;
    margin: 4rem auto;
    padding: 2rem;
    border-top: 1px solid rgba(233, 196, 106, 0.3);
    border-bottom: 1px solid rgba(233, 196, 106, 0.3);
    max-width: 700px;
    line-height: 1.6;
}

/* Responsive pour mobile - CORRIGÉ */
@media (max-width: 768px) {
    .section-portrait { /* On cible la bonne classe ici */
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .portrait {
        flex: 0 0 auto;
        max-width: 250px;
        margin-bottom: 2rem;
    }
}

/* --- Lien de navigation actif --- */
.nav-fluide a.active {
    color: var(--or-axe);
    opacity: 1;
}
    }
    
    .portrait {
        flex: 0 0 auto;
        max-width: 250px;
        margin-bottom: 2rem;
    }
}
/* --- Lien de navigation actif --- */
.nav-fluide a.active {
    color: var(--or-axe);
    opacity: 1;
}
