/* ============================================================
   1. BASES ET POLICES (Standard Montserrat & Playfair)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #dcdcdc; /* La table grise */
    color: #333;
}

/* Le conteneur papier (1100px max pour iPad et PC) */
.conteneur-papier {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #fdf5e6; /* Crème papier */
    min-height: 90vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}



.zone-credits {
    margin: 30px 0;
    font-family: 'Montserrat', sans-serif;
    color: #3e2723;
    line-height: 1.6;
}

.liste-enseignants {
    margin-bottom: 15px;
    text-align: justify;
}

.ligne-tab {
    display: flex;
    margin-bottom: 8px;
}

.label {
    /* Ajustez cette valeur pour décaler plus ou moins les noms */
    min-width: 130px; 
    font-weight: bold;
    display: inline-block;
}

.valeur {
    flex: 1;
}

.texte-brut {
    white-space: pre-wrap;
    tab-size: 4; /* Définit la largeur de la tabulation */
}
/* ============================================================
   2. BANNIÈRE INTÉGRÉE (Rien ne dépasse)
   ============================================================ */
.cadre-banniere-futur {
    width: 100%;
    overflow: hidden;
    border-bottom: 2px solid #8b5a2b;
}

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

/* ============================================================
   3. EN-TÊTE ET TITRES
   ============================================================ */
.entete-page {
    text-align: center;
    padding: 20px 20px;
}

.entete-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #3e2723;
    margin: 0;
}

.sous-titre {
    font-variant: small-caps;
    color: #8b5a2b;
    font-weight: 400;
    letter-spacing: 1.5px;
    margin-top: 10px;
}

/* ============================================================
   4. LA GRILLE DES 4 SECTIONS (2x2)
   ============================================================ */
.grille-futur {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0 50px 50px 50px;
}

.carte-categorie {
    background: #ffffff;
    border: 1px solid #d2b48c;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.carte-categorie:hover {
    transform: translateY(-5px);
    border-color: #8b5a2b;
}

/*.carte-categorie h3 {
    font-family: 'Playfair Display', serif;
    color: #3e2723;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f4f4f4;
    padding-bottom: 10px;
}*/

/* --- Style du titre de la carte (légèrement réduit) --- */
.carte-categorie h3 {
    font-family: 'Playfair Display', serif;
    color: #3e2723;
    font-size: 1.1rem; /* Réduit de 1.2 à 1.1 */
    margin-bottom: 3px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f4f4f4;
}

/* --- Style de la description (Le texte que vous vouliez remettre) --- */
.description-categorie {
    font-size: 0.8rem; /* Police plus petite pour gagner de l'espace */
    font-style: ;
    color: hslhsl(30, 100%, 20%);
    line-height: 1.3;
    margin-bottom: 15px;
    margin-top: 0;
}

/*/* --- Liste des messages sous chaque titre --- */
.liste-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Liste des liens (resserrée) --- */
.liste-messages {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Réduit de 12px à 8px pour tasser le contenu */
}

.liste-messages a {
    font-size: 0.85rem; /* Un peu plus petit pour l'iPad */
    color: #8b5a2b;
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 1px dotted #eee;
}
.liste-messages a:hover {
    color: #d32f2f; /* Rouge brique au survol */
    padding-left: 8px;
}

/* ============================================================
   5. NAVIGATION ET RESPONSIVE
   ============================================================ */
.nav-bas {
    margin-top: auto;
    padding: 2px 100px;
    display: flex;
    justify-content: space-between;
}

.lien-retour {
    text-decoration: none;
    color: #8b5a2b;
    font-weight: bold;
    font-variant: small-caps;
}

/* --- Mise en page de l'article de texte --- */
.article-complet {
    padding: 0 50px 40px 50px;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.sous-titre-article {
    font-style: italic;
    color: #8b5a2b;
    margin-top: -10px;
}

.encadre-mandat {
    background: rgba(139, 90, 43, 0.05);
    padding: 20px;
    border: 1px dashed #d2b48c;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Gestion des images flottantes */
.img-flottante-droite {
    float: right;
    margin: 0 0 15px 15px;
    border: 3px solid white;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    max-width: 200px;
}

.img-flottante-gauche {
    float: left;
    margin: 0 15px 15px 0;
    border: 3px solid white;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    max-width: 200px;
}

/* Important : Empêche les images de déborder sur le paragraphe suivant */
.journal-eleve {
    display: flow-root; 
    border-bottom: 1px solid #eee;
    padding: 5px 0;
}

./* On s'assure que le titre H3 ne souligne pas le nom si possible */
.date-entree {
    border-bottom: 1px solid rgba(139, 90, 43, 0.2);
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #3e2723;
}

/* Style du prénom à côté de la date */
.nom-entree {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
    color: #d32f2f; /* Couleur rouge brique de l'index */
    font-weight: 700;
    text-decoration: none !important; /* On enlève le soulignement de la date pour le nom */
    display: inline-block;
    margin-left: 10px;
    font-variant: small-caps;
}

.nom-eleve {
    font-weight: bold;
    text-transform: uppercase;
    color: #d32f2f;
    text-align: right;
    clear: both;
}

.image-de-fin-article {
    text-align: center;
    margin: 40px 0;
}

.image-de-fin-article img {
    max-width: 100%;
    height: auto;
}/* ============================================================
   STYLE VIEILLE PHOTO ET ENCADREMENT
   ============================================================ */

/* Le cadre principal du texte (Couleurs de l'index) */
.article-complet {
    margin: 20px 40px 40px 40px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.4); /* Voile blanc léger sur le crème */
    border: 2px solid #d2b48c; /* Bordure beige/tan */
    border-radius: 4px;
    position: relative;
}

/* Style Vieille Photo (Type Polaroid/Argentique) */
.vieille-photo {
    background-color: #fff;
    padding: 5px 5px 20px 10px; /* Plus d'espace en bas pour le look photo */
    border: 1px solid #ddd;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
    display: inline-block;
    transition: transform 0.3s ease;
}

.vieille-photo img {
    display: block;
    border: 1px solid #eee;
}

/* Légère inclinaison pour donner un aspect "posé sur la table" */
.photo-droite {
    float: right;
    margin: 10px 0 20px 25px;
    transform: rotate(2deg);
}

.photo-gauche {
    float: left;
    margin: 10px 25px 20px 0;
    transform: rotate(-2deg);
}

/* Effet au survol : la photo se remet droite */
.vieille-photo:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

/* Style des noms d'élèves (Cadre signature) */
.nom-eleve {
    font-weight: 700;
    color: #3e2723;
    background-color: #f4ece1;
    padding: 5px 10px;
    display: inline-block;
    border-left: 3px solid #8b5a2b;
    margin-top: 10px;
}


/* --- Navigation de fin de page (Style Harmonisé) --- */
.navigation-village {
    margin-top: 50px;
    padding: 20px 0;
}

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

.nav-ligne {
    display: flex;
    justify-content: space-between; /* Un à gauche, un à droite */
    padding: 0 10px;
}

.lien-elegant {
    text-decoration: none;
    color: #8b5a2b !important; /* Couleur brique de l'index */
    font-family: 'Montserrat', sans-serif;
    font-variant: small-caps;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.lien-elegant:hover {
    color: #3e2723 !important; /* Brun plus foncé au survol */
}

.icone-nav {
    font-size: 1.1rem;
    vertical-align: middle;
}

/* Adaptation iPad/Mobile pour la navigation */
@media (max-width: 600px) {
    .nav-ligne {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }
}

/* Adaptation iPad */
@media (max-width: 850px) {
    .article-complet { padding: 0 20px 30px 20px; }
    .img-flottante-droite, .img-flottante-gauche {
        float: none;
        display: block;
        margin: 10px auto;
        max-width: 80%;
    }
}
/* Adaptation iPad Portrait et Mobile */
@media (max-width: 850px) {
    .grille-futur {
        grid-template-columns: 1fr; /* On passe à une seule colonne */
        padding: 0 25px 25px 25px;
    }
    
    .entete-page h1 { font-size: 1.8rem; }
}