/* --- CONFIGURATION GÉNÉRALE --- */
* {
    box-sizing: border-box;
}

body {
    background-color: #fcf6e8;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* --- GESTION DES COULEURS DE FOND PAR PAGE --- */
#page-histoire { background-color: #E9D8CB; }
#page-geographie { background-color: #D6EDE3; }
#page-culture { background-color: #F8E0E0; }
#page-gastronomie { background-color: #DBE2FA; }
#page-tourisme { background-color: #E2D5F5; }
#page-contact { background-color: #F5F2DF; }
#page-source { background-color: #F8F4EE; }

/* --- HEADER (FIXE ET CENTRÉ) --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    background-color: #ffffff;
    border-bottom: 2px solid #dc143c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header img {
    height: 85px;
    width: auto;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
    color: #333;
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
}

/* --- STRUCTURE ET TEXTE --- */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #000000;
    font-weight: normal;
    margin: 50px 0;
}

h2 {
    text-align: left;
    margin-top: 30px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #000000;
}

p {
    text-align: left;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* --- IMAGES GÉNÉRALES --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- TABLEAUX (DONNÉES CLÉS) --- */
table {
    width: 100%;
    max-width: 500px;
    border-collapse: collapse;
    margin: 25px auto;
    background-color: #fff;
    font-size: 0.9em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #dddddd;
}

td:first-child {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
    width: 40%;
}

tr:hover {
    background-color: #f1f1f1;
}

tr:last-of-type td {
    border-bottom: 2px solid #dc143c;
}

/* --- FOOTER --- */
footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    background-color: #FFFFFF;
    color: black;
}

footer p {
    margin: 0;
}

/* --- SECTIONS SPÉCIFIQUES (CÔTE À CÔTE AVEC AJUSTEMENT AUTO) --- */

.conteneur-bio, .bloc-histoire, .geo-bloc {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.colonne-image, .img-histoire, .img-geo {
    flex: 1;
    max-width: 45%;
}

.colonne-image img, .img-histoire img, .img-geo img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 8px 8px 20px rgba(0,0,0,0.2);
}

.texte-flex, .texte-plat, .texte-histoire, .texte-geo {
    flex: 1.5;
}

/* --- CENTRAGE IMAGE SPÉCIFIQUE (VOÏVODIES) --- */
.conteneur-img-centre {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 30px 0;
}

.img-centre-geo {
    display: block;
    max-width: 600px; /* Ajuste la taille selon tes besoins */
    height: auto;
    border-radius: 8px;
}

/* --- AUTRES SECTIONS FLEX --- */

.bloc-flex, .bloc-plat {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 40px 0;
}

.bloc-flex.inverse, .bloc-plat:nth-of-type(even) {
    flex-direction: row-reverse;
}

.img-standard, .img-plat {
    flex: 1;
    width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.conteneur-liens {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    margin: 30px 0 50px 0;
    flex-wrap: wrap;
}

.bloc-lien, .item-lien {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 160px;
}

.bloc-lien img, .item-lien img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.bloc-lien img:hover, .item-lien img:hover {
    transform: scale(1.1);
}

/* --- RESPONSIVE (MOBILE) --- */
@media screen and (max-width: 768px) {
    header { gap: 15px; }
    header img { height: 60px; }
    header h1 { font-size: 1.4rem; }

    .conteneur-bio, .bloc-histoire, .geo-bloc, .bloc-flex, .bloc-plat {
        flex-direction: column !important;
        align-items: center;
    }

    .colonne-image, .img-histoire, .img-geo {
        max-width: 100%;
    }

    .bloc-flex.inverse, .bloc-plat:nth-of-type(even) {
        flex-direction: column;
    }

    .img-standard, .img-plat {
        width: 100%;
        height: 250px;
    }

    .conteneur-liens { gap: 40px; }
}

/* SOURCES */
#page-sources main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

#page-sources ul {
    list-style-type: disc;
    margin-left: 40px;
    margin-bottom: 50px;
    line-height: 2;
}

.galerie-sources {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 50px;
}

.galerie-sources img {
    width: 450px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin: 0;
}

.img-gauche {
    align-self: flex-start;
}

.img-droite {
    align-self: flex-end; margin-top: -80px !important;
}

.img-bas-gauche {
    align-self: flex-start; margin-top: -50px !important;
}

/* --- MENU HORIZONTAL --- */
.nav-horizontale {
    width: 100%;
    display: flex;
    justify-content: center;
}

.nav-horizontale ul {
    display: flex;
    justify-content: center;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 0;
    gap: 25px;
}

.nav-horizontale li {
    list-style: none !important;
}

.nav-horizontale a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-horizontale a:hover {
    color: #dc143c;
}

/* --- CENTRAGE DU CONTENU (ACCUEIL) --- */
.contenu-centre {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.contenu-centre img {
    margin: 20px 0;
}