/* ============================================================
   1. IMPORTATION ET VARIABLES
   ============================================================ */
/* Importation de Montserrat depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap');

:root {
    --fond-ecran: hsl(30, 100%, 20%);
    --papier-creme: #fdf5e6;
    --brun-encre: #2b1d0e;
    --or-vif: #d4af37;
    --rouge-cire: #8b0000; /* Rouge profond pour le sceau */
    --bordure-papier: #d2b48c;
    --accent-rouge: #8b0000;
    
    /* Variables de polices */
    --police-titre: 'Montserrat', sans-serif;
    --police-corps: 'Avenir', 'Avenir Next', 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }

body {
    background-color: var(--fond-ecran);
    margin: 0;
    padding: 20px;
    font-family: var(--police-corps);
    color: var(--brun-encre);
    -webkit-font-smoothing: antialiased;
}

/* Taille ajustée : passage de 1.25rem à 1.15rem pour plus de finesse */
p, li {
    font-size: 1.15rem !important;
    line-height: 1.65;
    margin-bottom: 22px;
    text-align: justify;
}

/* ============================================================
   2. LE MANUSCRIT (Conteneur)
   ============================================================ */
.manuscrit-aurigene {
    max-width: 880px; /* Légèrement plus étroit pour l'élégance */
    margin: 0 auto;
    background-color: var(--papier-creme);
    border: 1px solid var(--bordure-papier);
    box-shadow: 10px 10px 40px rgba(0,0,0,0.4);
    padding: 45px;
    min-height: 100vh;
}

.cadre-banniere-enigme {
    margin: -45px -45px 30px -45px;
    width: calc(100% + 90px);
    overflow: hidden;
    line-height: 0;
    border-bottom: 2px solid var(--bordure-papier);
}

.cadre-banniere-enigme img { width: 100%; height: auto; display: block; }

/* ============================================================
   3. TITRES ET BANDES (Montserrat)
   ============================================================ */
h1.titre-recit {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.2rem; /* Un peu moins gros */
    color: var(--accent-rouge);
    text-align: center;
    margin: 10px 0 30px 0;
   text-transform: uppercase;
    letter-spacing: 1px;
}


p {
    font-size: 1.15rem !important;
    line-height: 1.3;
    margin-bottom: 22px;
    text-align: justify;
}

/* ============================================================
3. L'EFFET SPÉCIAL : LE SCEAU D'AURIGÈNE
   ============================================================ */
.sceau-categorie {
    display: block;
    width: fit-content;
    margin: 0 auto 20px auto;
    background-color: hsl(30, 100%, 20%);
    color: white;
    font-family: var(--police-titre);
    font-weight: 800;
    padding: 10px 25px;
    border-radius: 50px; /* Forme de sceau allongé */
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    box-shadow: 3px 3px 0px  hsl(30, 100%, 400%), inset 0 0 10px hsl(30, 100%, 20%);
    transform: rotate(-4deg); /* Petit effet "tamponné à la main" */
    border: 2px solid #a52a2a;
}


/* --- BLOC À-PROPOS (Contexte historique ou littéraire) --- */
.a-propos {
    background-color: rgba(210, 180, 140, 0.1); /* Un beige très transparent */
    border: 1px dashed var(--bordure-papier);
    border-left: 5px solid var(--bordure-papier);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 4px 4px 0;
}

.a-propos-titre {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8b5a2b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.a-propos-titre::before {
    content: "ℹ️"; /* Petit symbole discret */
    font-size: 0.9rem;
}

.a-propos-contenu {
    font-family: var(--police-corps);
    font-size: 1rem !important; /* Plus petit que le récit principal */
    line-height: 1.5;
    color: #5d4037;
    margin-bottom: 0; /* Évite l'espace vide à la fin du bloc */
}

.a-propos-contenu em {
    font-style: italic;
    opacity: 0.9;
}



.bande-secret, .bande-drolerie, .bande-confidence {
    padding: 22px;
    margin: 25px 0;
    font-family: var(--police-corps);
}

.bande-secret { background-color: #fff9c4; border-left: 6px solid var(--or-vif); }
.bande-drolerie { background-color: #f1f8e9; border-left: 6px solid #8bc34a; }
.bande-confidence { background-color: #f3e5f5; border-left: 6px solid #9c27b0; }

/* ============================================================
   4. COMPOSANTS (Ligne 4px, Photos, Nav)
   ============================================================ */
.hr-separation {
    height: 4px;
    background-color: var(--bordure-papier);
    border: none;
    margin: 35px auto;
    width: 70%;
    border-radius: 4px;
}

/* ============================================================
   SECTION ILLUSTRATIONS (VERSION HABILLAGE DE TEXTE)
   ============================================================ */

/* On enlève le centrage et on laisse l'image flotter à gauche */
.cadre-photo {
    float: left;             /* Fait monter le texte à droite de l'image */
    width: 280px;            /* Largeur fixe pour éviter l'étirement */
    background-color: #fff;
    padding: 8px;
    border: 1px solid #d2b48c;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
    
    /* Marges pour créer de l'air autour du cadre */
    margin: 5px 25px 15px 0; 
    
    transform: rotate(-1.5deg);
}

.cadre-photo img {
    width: 100%;             /* L'image remplit exactement les 280px du cadre */
    height: auto;
    display: block;
    border: 1px solid #eee;
}

/* Légende rapetissée */
.legende-photo {
    margin-top: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;      /* Taille réduite pour plus de discrétion */
    font-weight: 700;
    color: #6d4c41;
    text-align: center;
    line-height: 1.2;
}

/* Nettoyage : empêche les éléments suivants de remonter si le texte est trop court */
.texte-narratif::after {
    content: "";
    display: table;
    clear: both;
}

/* --- NAVIGATION & LIENS DE SORTIE --- */
.navigation-footer {
    margin-top: 50px; /* Espace important après le texte */
    padding-top: 20px;
    border-top: 1px double var(--bordure-papier);
}

.nav-ligne {
    display: flex;
    justify-content: space-between; /* Un à gauche, un à droite */
    align-items: center;
    margin-bottom: 25px; /* Espace entre les deux lignes de navigation */
    gap: 20px; /* Évite qu'ils se touchent si le texte est long */
}

/* Style des liens Montserrat */
.lien-elegant {
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    color: var(--accent-rouge);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem; /* Plus petit et élégant */
    letter-spacing: 1.2px;
    transition: 0.3s;
}

.lien-elegant:hover {
    color: var(--brun-encre);
}

/* Adaptation pour iPad Portrait (on les empile proprement) */
@media (max-width: 768px) {
    .nav-ligne {
        flex-direction: column;
        gap: 15px; /* Espace entre les liens empilés */
        text-align: center;
    }





/* ============================================================
   5. IPAD RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .manuscrit-aurigene { padding: 30px; }
    .cadre-banniere-enigme { margin: -30px -30px 20px -30px; width: calc(100% + 60px); }
    h1.titre-recit { font-size: 1.6rem; }
    p, li { font-size: 1.1rem !important; }
}