/* =========================================================
   STYLE GLOBAL
   ========================================================= */

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

#contenant {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
}

/* =========================================================
   ENTÊTE
   ========================================================= */

header {
    background: #2c3e50;
    color: white;
    padding: 0.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    line-height: 1.4;
}

/* =========================================================
   LAYOUT GÉNÉRAL
   ========================================================= */

.layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start; /* empêche les colonnes d'avoir la même hauteur */
}

/* =========================================================
   MENU LATÉRAL
   ========================================================= */

#menu {
    width: 260px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Empêche la colonne de se comprimer */
}

#menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* LI et liens : harmonisation de l'espacement */
#menu li {
    margin: 0.2rem 0;
}

#menu a {
    text-decoration: none;
    color: #2c3e50;
    padding: 0.2rem 0.5rem;
    display: block;
    border-radius: 4px;
    transition: 0.2s;
    cursor: pointer;
    line-height: 1.2;
}

/* Hover / focus / active */
#menu a:hover,
#menu a:focus,
#menu a:active {
    background: #2c3e50;
    color: white;
}

/* Élément actif / sélectionné */
.menu-active a {
    background: #2c3e50;
    color: white;
    font-weight: bold;
    border-left: 4px solid #4682B4;
}

.menu-active {
    font-size: 1.4rem; /* pour "Enfants" */
    margin-top: 0.8rem;
    color: #2c3e50;
    text-align: center;
}

/* Conteneur des liens "navigation globale" */
.menu-meta {
    background: #F0F8FF;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.menu-meta li a {
    font-weight: 600;
    color: #1f3a56;
}

.menu-meta li a:hover {
    background: #1f3a56;
    color: white;
}

/* Responsive : petits écrans */
@media(max-width: 900px) {
    .layout {
        flex-direction: column;
    }
    #menu {
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
    }
    .bloc-2 {
        grid-template-columns: 1fr;
    }
}

/* Astuce pour appareils sans hover */
@media (hover: none) {
    #menu a:active,
    #menu a:focus {
        background: #2c3e50;
        color: white;
    }
}

/* =========================================================
   FICHES COUPLE
   ========================================================= */

.fiche-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.bloc-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
 border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 1er article */
.bloc-2 > article.fiche-individu:nth-child(1) {
    background-color: #F0F8FF; /* bleu clair */
}

/* 2e article */
.bloc-2 > article.fiche-individu:nth-child(2) {
    background-color: #F0F8FF; /* bleu clair */
}
.bloc-2 > article.fiche-individu {
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom:0.0rem;
}


.bloc-1 {
    text-align: left;
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.bloc-1[aria-label="Mariage"] {
    text-align: center;
}

.bloc-1[aria-label="Note"] {
    text-align: left;
}

figure img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.bloc-2 > div,
.bloc-btn > div {
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* .bloc-btn { */
    /* display: grid; */
    /* grid-template-columns: 1fr 1fr; */
    /* gap: 1.5rem; */
    /* margin: 1.5rem auto 0 auto; */
/* } */

.bloc-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}


.bloc-1 h2,
.bloc-2 h2 {
    text-align: center;
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

p {
    margin: 0.4rem 0;
}

/* Boutons actes */
.lien-actes {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #4682B4;
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #c5ced8;
    transition: background 0.2s, transform 0.15s;
}

.lien-actes:hover {
    background: #d5dde6;
    transform: translateY(-2px);
}

.lien-actes:active {
    transform: translateY(0);
}
/* Encadré pour les zones de transcription d'actes */
.transcription {
    background: #eef4f8;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    border: 1px solid #dce4ec;
    line-height: 1.55;
    margin-top: 0.5rem;
}
.transcription h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}
.transcription p {
    font-size: 1.2rem;
}

.acte img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

footer {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 2rem;
    color: #555;
}

/* =========================================================
   BREADCRUMB / FIL D’ARIANE
   ========================================================= */

.breadcrumb {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.breadcrumb a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.4rem;
    color: #7a8a99;
}

.breadcrumb strong {
    color: #2c3e50;
    font-weight: bold;
}

/* =========================================================
   MENU SPÉCIFIQUE / AÏEUL DIRECT
   ========================================================= */

.aieul-direct > a {
    background: #E0FFFF;
    color: black;
    border-radius: 6px;
    padding-left: 0.8rem;
    position: relative;
    transition: 0.2s;
}

.aieul-direct > a:hover {
    background: #2c3e50;
    color: white;
}

.aieul-direct > a::before {
    content: "⭐ ";
    font-size: 0.9rem;
    color: gold;
}

.aieul-direct.info {
    background: #E0FFFF;
    color: black;
    font-size: 1rem;
    font-style: italic;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    display: block;
    transition: 0.2s;
}

.aieul-direct.info:hover {
    background: #2c3e50;
    color: white;
    cursor: pointer;
}

.aieul-direct.info::before {
    content: "⭐ ";
    color: gold;
    font-size: 0.9rem;
}

/* =========================================================
   ENFANT ACTIF
   ========================================================= */

.enfant-actif > a {
    background: #2c3e50;
    color: white !important;
    font-weight: bold;
    border-radius: 6px;
    padding-left: 0.8rem;
    border-left: 4px solid #4682B4;
}

/* =========================================================
   BOUTON RETOUR EN HAUT
   ========================================================= */

#btnTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 10px 14px;
    font-size: 22px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 999;
}

#btnTop.show {
    opacity: 0.85;
    pointer-events: auto;
}

#btnTop:hover {
    opacity: 1;
}
