/* --- 1. FOND DE PAGE --- */
body.accueil {
    background-color: #2c1e11;
    background-image: url('images-regime/fondseigneurie.png');
    background-attachment: fixed;
    background-size: cover;
    margin: 0;
    padding: 20px;
    font-family: 'Verdana', sans-serif;
}

/* --- 2. LE CADRE MAÎTRE (Papier) --- */
.registre-maitre {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fdf5e6;
    box-shadow: 0 0 50px rgba(0,0,0,0.6);
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Style pour la fausse proclamation de Marc Borduas */
.fausse-loi {
    background-color: #fff;
    border: 1px solid #8b5a2b;
    padding: 25px;
    margin: 30px 10%;
    font-family: 'Times New Roman', serif;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.fausse-loi p {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.4;
}

.fausse-loi strong {
    color: #d32f2f; /* Un rouge rappelant le sceau en confiture */
    display: block;
    margin-bottom: 5px;
}

/* --- 3. EN-TÊTE --- */
.entete-registre {
    text-align: center;
    border-bottom: 2px double #8b5a2b;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.image-header {
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.entete-registre h1 {
    font-family: 'Times New Roman', serif;
    color: #5d4037;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 5px 0;
}

/* --- 4. GRILLE DES SECTIONS --- */
.grille-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

.cellule-registre {
    background-color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border: 1px solid #d2b48c;
}

.titre-registre {
    font-size: 0.9rem;
    color: #8b5a2b;
    border-bottom: 1px solid #8b5a2b;
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform:;
}

.liste-liens a {
    display: block;
    padding: 6px 0;
    border-bottom: 1px dotted #ccc;
    font-size: 0.95rem;
    color: #333;
    text-decoration: none;
}

.liste-liens a:hover {
    color: #d32f2f;
    background-color: rgba(139, 90, 43, 0.05);
}

.liste-liens a span {
    font-weight: bold;
    color: #8b5a2b;
    margin-right: 8px;
}

.confidentiel {
    background-color: rgba(211, 47, 47, 0.03);
    border: 1px solid #d32f2f;
}

/* --- 5. BAS DU CADRE (Image et Navigation) --- */
.bas-registre {
    margin-top: auto; 
    padding-top: 20px;
}

.image-de-fin img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

/* Navigation élégante style Village */
.navigation-village {
    padding: 10px 0;
}

.ligne-separatrice {
    height: 1px;
    background: linear-gradient(to right, transparent, #8b5a2b, transparent);
    margin-bottom: 15px;
    opacity: 0.4;
}

.nav-ligne {
    display: flex;
    justify-content: space-between;
}

.lien-elegant {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: bold;
    color: #8b5a2b !important;
    text-decoration: none;
    letter-spacing: 1px;
}

.lien-elegant:hover {
    color: #d32f2f !important;
}

/* --- 6. STYLE DES ARTICLES STANDARDS --- */
.article-complet {
    padding: 20px 0;
}

.article-header {
    text-align: center;
    border-bottom: 1px dashed #d2b48c;
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.article-header h1 {
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    color: #5d4037;
    margin-bottom: 10px;
}

.date-auteur {
    font-style: italic;
    color: #8b5a2b;
    font-size: 0.95rem;
}

/* Style pour un séparateur épais de 4px */
.ligne-epaisse {
    height: 4px;
    background-color: #6c757d; /* Gris moderne par défaut */
    border: none;
    margin: 20px 0;
    border-radius: 2px; /* Optionnel : arrondit les coins pour plus de douceur */
}


.corps-texte p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.liste-redevances {
    list-style: none;
    padding: 20px;
    background-color: rgba(139, 90, 43, 0.05);
    border-left: 3px solid #8b5a2b;
    margin: 30px 0;
}

.liste-redevances li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.signature-article {
    margin-top: 50px;
    text-align: right;
    font-family: 'Georgia', serif;
    font-style: italic;
}

.nom-auteur {
    font-weight: bold;
    font-size: 1.3rem;
    color: #5d4037;
    margin: 5px 0;
}

.encadre-explication {
    background-color: #fcf1e3;
    border: 1px solid #d2b48c;
    padding: 15px;
    margin: 25px 0;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #5d4037;
}

/* --- 7. STYLE RECHERCHE & ARCHIVES (Pages Confidentielles) --- */

/* Fond spécifique pour simuler un bureau sombre */
body.recherche-confidentielle {
    background-color: #3e2723; 
    background-image: none;
}

/* La "chemise" de dossier cartonnée */
.dossier-archives {
    background-color: #e0d4b4 !important; /* Couleur chemise de classement */
    border-left: 15px solid #c5b38a;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5) !important;
    padding: 50px !important;
    position: relative;
}

/* Tampon CONFIDENTIEL */
.tampon-confidentiel {
    position: absolute;
    top: 40px;
    right: 40px;
    border: 4px solid #d32f2f;
    color: #d32f2f;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.4rem;
    padding: 10px 20px;
    transform: rotate(15deg);
    opacity: 0.7;
    text-transform: uppercase;
}

/* En-tête de dossier administratif */
.entete-recherche {
    border-bottom: 2px solid #5d4037;
    margin-bottom: 30px;
    font-family: 'Courier New', Courier, monospace;
}

.reference-dossier {
    font-weight: bold;
    color: #5d4037;
    text-decoration: underline;
}

/* Simulation du papier de transcription jauni */
.document-transcrit {
    background-color: #fff9eb;
    padding: 30px;
    border: 1px solid #dcd0b9;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    font-family: 'Courier New', Courier, monospace; /* Style machine à écrire */
    color: #2b2b2b;
    margin: 30px 0;
    line-height: 1.4;
}

.document-transcrit h3 {
    text-align: center;
    text-decoration: underline;
}

/* Analyse du chercheur (fond différent) */
.analyse-chercheur {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid #8b5a2b;
    padding: 20px;
    margin-top: 40px;
}

/* Style pour les photos dans le tableau de correction */
.photo-table {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%; /* Portrait circulaire pour un look médaillon */
    border: 2px solid #8b5a2b;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    display: block;
    margin: 0 auto;
}

.tableau-corrige td {
    vertical-align: middle;
    text-align: center;
    padding: 10px;
}

/* On aligne le texte à gauche pour les noms et indices */
.tableau-corrige td:nth-child(4),
.tableau-corrige td:nth-child(5) {
    text-align: left;
}

/* Optimisation iPad */
@media (max-width: 768px) {
    .photo-table {
        width: 45px;
        height: 45px;
    }
    .tableau-corrige {
        font-size: 0.85rem;
    }


.bandeau-analyse {
    background-color: #5d4037;
    color: white;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

/* --- 8. IMAGES & ALIGNEMENT --- */
.image-gauche { float: left; margin-right: 15px; margin-bottom: 5px; max-width: 25%; }
.image-droite { float: right; margin-left: 15px; margin-bottom: 5px; max-width: 25%; }
.image-petite { max-width: 14%; }
.image-moyenne { max-width: 40%; }
.image-grande { max-width: 60%; }

/* Style pour les cartes d'identité du Hub Lemieux */
.identity-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background-color: rgba(224, 212, 180, 0.8) !important;
}

.identity-card:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #d32f2f;
}

.enigme-intro {
    font-size: 0.95rem;
    line-height: 1.0;
    margin: 10px 0;
    color: #2b2b2b;
    border-left: 2px solid #8b5a2b;
    padding-left: 10px;
}

.indice-enigme {
    margin-top: 15px;
    border-top: 1px dashed #c5b38a;
    padding-top: 5px;
    color: #5d4037;
    font-style: italic;
}

/* --- 9. PAGINATION --- */
.pagination-article-double {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.lien-navigation {
    display: inline-block;
    background-color: #8b5a2b;
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

.lien-navigation:hover { background-color: #d32f2f; }


/* Style du tableau de correction */
.tableau-corrige {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    background-color: #fff9eb;
}

.tableau-corrige th {
    background-color: #5d4037;
    color: white;
    padding: 12px;
    text-align: left;
    border: 1px solid #3e2723;
}

.tableau-corrige td {
    padding: 10px;
    border: 1px solid #dcd0b9;
    vertical-align: middle;
}

.tableau-corrige tr:nth-child(even) {
    background-color: #f2e8cf;
}

.tableau-corrige strong {
    color: #d32f2f;
}

/* Optimisation pour iPad Portrait */
@media (max-width: 768px) {
    .tableau-corrige {
        font-size: 0.9rem;
    }
    .tableau-corrige th, .tableau-corrige td {
        padding: 8px 5px;
    }
}

/* --- 10. ADAPTATION IPAD & MOBILES --- */
@media (max-width: 768px) {
    .grille-sections { grid-template-columns: 1fr; }
    .registre-maitre, .dossier-archives { padding: 20px !important; }
    .dossier-archives { border-left: none; }
    .nav-ligne { flex-direction: column; align-items: center; gap: 10px; }
    .article-header h1 { font-size: 1.6rem; }
    .corps-texte p { text-align: left; }
    .tampon-confidentiel { font-size: 1rem; top: 10px; right: 10px; }
}

@media (max-width: 600px) {
    .pagination-article-double {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


/* --- Optimisation iPad --- */
.corps-texte p, .document-transcrit p {
    font-size: 1.2rem !important; /* Taille augmentée pour iPad */
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Style pour les lettres d'index (A, B, C...) */
.lettre-enigme {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.8rem;
    color: #5d4037;
    background-color: #dcd0b9;
    width: 45px;
    height: 45px;
    text-align: center;
    line-height: 45px;
    border-radius: 5px;
    margin-right: 15px;
    border: 1px solid #8b5a2b;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Ajustement des bandes de couleur si nécessaire */
.bande-beige { background-color: #f5f5dc; padding: 15px; border-radius: 5px; margin-bottom: 10px; }
.bande-grise { background-color: #eeeeee; padding: 15px; border-radius: 5px; margin-bottom: 10px; }



