/* ==========================================================================
   BASES
   ========================================================================== */
* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    background-color: #800000; 
    font-family: 'Georgia', serif; 
    font-size: 14pt; 
    color: #000000;
    line-height: 1.5;
}

img { border: 0; vertical-align: bottom; max-width: 100%; height: auto; display: block; }
a { color: #0000ff; text-decoration: none; background-color: transparent; }
a:visited { color: #800080; }
a:hover { text-decoration: underline; }

/* ==========================================================================
   STRUCTURE DU SITE
   ========================================================================== */
.site-wrapper {
    width: 960px; margin: 0 auto;
    background-color: transparent; 
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.site-header {
    background-position: center top; background-repeat: no-repeat; background-color: transparent;
    display: flex; flex-direction: column; align-items: center;
    padding-top: 10px; min-height: auto;
}

.header-inner {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; gap: 20px; margin-bottom: 10px;
}

.header-left { flex: 0 0 auto; }
.header-photo { max-height: 140px; width: auto; display: block; }

.header-center { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; }
.big-title { max-height: 100px; width: auto; margin-bottom: 0; display: block; }

.header-right { flex: 0 0 auto; }
.header-blason { max-height: 120px; width: auto; display: block; }

/* ==========================================================================
   MENU DE NAVIGATION
   ========================================================================== */
.main-navigation { width: 100%; background-color: transparent; margin: 0; padding-bottom: 10px; }

.main-menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; justify-content: space-between; flex-wrap: nowrap; gap: 2px;
}

.main-menu > li { flex: 1; position: relative; }

.main-menu > li > a {
    display: flex; align-items: center; justify-content: center;
    height: 100%; min-height: 42px;
    position: relative; z-index: 1;
    background: none; transition: none;
    color: #ffffff; text-shadow: 1px 1px 1px #000;
    font-family: 'Georgia', serif; font-size: 12pt; font-weight: normal;
    text-align: center; text-decoration: none;
    padding: 5px 2px; border-radius: 3px; width: 100%;
}

.main-menu > li > a::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../images/8F366A7D012352F320D1ABFA339E2A59.png');
    background-repeat: repeat-x; background-size: cover; border-radius: 3px;
    z-index: -1; transition: none;
}

.main-menu > li > a:hover::before, .main-menu > li.has-submenu:hover > a::before {
    filter: grayscale(100%) brightness(140%);
}
.main-menu > li > a:hover, .main-menu > li.has-submenu:hover > a {
    color: #ffffff; text-shadow: 1px 1px 1px #000; text-decoration: none; font-weight: normal;
}

.submenu {
    display: none; position: absolute; top: 100%; left: 0;
    min-width: 220px; background-color: #fff;
    border: 1px solid #ccc; box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 1000; padding: 0; list-style: none;
}
.has-submenu:hover .submenu { display: block; }
.submenu li a {
    display: block; padding: 10px 15px;
    color: #000; text-decoration: none; border-bottom: 1px solid #eee;
    font-family: 'Georgia', serif; font-size: 12pt; text-align: left;
    background: #fff; text-shadow: none; font-weight: normal; width: 100%; height: auto;
}
.submenu li a::before { content: none; display: none; }
.submenu li a:hover { background-color: #eee; color: #000; }

/* ==========================================================================
   CONTENU PRINCIPAL
   ========================================================================== */
main { 
    background-color: #ffffff; 
    padding: 10px 10px; 
    min-height: 400px; 
    text-align: left; 
}

h2, h3, h4 { color: #800000; font-family: 'Georgia', serif; font-weight: bold; margin-top: 20px; margin-bottom: 10px; line-height: 1.2; }
h2 { font-size: 14pt; }
h3 { font-size: 12pt; }
p { margin-bottom: 15px; font-family: 'Georgia', serif; }

.historical-gallery {
    display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}

.historical-gallery img {
    width: calc((100% - 30px) / 4);
    border: 1px solid #800000;
    padding: 4px;
    background-color: #ffffff;
    display: block;
}

.intro-text {
    display: flex; justify-content: space-between; align-items: center;
    gap: 40px; margin-bottom: 30px; text-align: left;
}

.intro-content { flex: 1; }

.intro-content h2, .intro-content h3, .intro-content p {
    text-align: left; color: #000000; font-weight: bold; font-size: 12pt;
    font-style: normal; margin-top: 0; margin-bottom: 8px;
    font-family: 'Georgia', serif; line-height: 1.4;
}

.external-link { flex: 0 0 auto; margin-top: 0; }
.external-link img { max-width: 220px; }

.description .content-wrapper { display: flex; gap: 20px; align-items: flex-start; }
.description .float-left img { border: 1px solid #000; }
.text-content { text-align: justify; font-style: italic; }

.languages {
    text-align: center; font-size: 11pt; font-style: normal;
    padding-top: 0; border-top: none; border-bottom: 1px solid #dcdcdc;
}

/* ==========================================================================
   TOOLTIPS & INFOS PRATIQUES
   ========================================================================== */
.tooltip-link { position: relative; cursor: help; text-decoration: none; }

.tooltip-text {
    visibility: hidden; width: 450px; background-color: #ffffe1; color: #000000;
    text-align: justify; border: 1px solid #000000; padding: 10px; border-radius: 0;
    position: absolute; z-index: 1000; bottom: 120%; right: 0;
    font-size: 10pt; font-weight: normal; font-style: normal; line-height: 1.3;
    box-shadow: 4px 4px 5px rgba(0,0,0,0.3); opacity: 0; transition: opacity 0.2s;
}

.tooltip-link:hover .tooltip-text { visibility: visible; opacity: 1; }

.practical-info {
    display: flex; flex-direction: column; gap: 40px; margin-top: 30px;
    padding-top: 20px; border-top: none; background-color: transparent;
}

.info-card {
    display: flex; align-items: center; gap: 30px; padding: 0; text-align: left;
}

.info-card img { flex: 0 0 250px; width: 250px; margin: 0; border: 0; }
.card-content { flex: 1; }

.info-card h2 {
    margin-top: 0; border-bottom: 1px solid #dcdcdc; padding-bottom: 5px; display: inline-block;
}

.info-card:nth-of-type(2) { flex-direction: row-reverse; }

.schedules {
    text-align: left; padding: 20px; margin-top: 20px;
    background: linear-gradient(90deg, rgba(255, 224, 192, 1), rgba(255, 255, 255, 1) 100%);
    border: 1px solid #800000;
}

.schedules h3 {
    text-align: center; color: #800000; font-size: 12pt;
    border-bottom: 1px solid #dcdcdc; padding-bottom: 5px; margin-top: 0;
}

.schedules p { font-size: 11pt; margin-bottom: 8px; }
.warning { color: #ff0000; font-weight: bold; }
.fax-margin { margin-left: 30px; display: inline-block; }

.location { margin-top: 40px; text-align: left; }
.location-container { display: flex; align-items: center; }

.map-visual { flex: 0 0 50%; width: 50%; padding-right: 15px; }
.map-visual img { width: 100%; border: 1px solid #000; display: block; }

.location-right-col {
    flex: 0 0 50%; width: 50%; padding-left: 15px;
    display: flex; flex-direction: column; gap: 15px;
}

.location-right-col h2 { margin-top: 0; font-style: italic; color: #000; }
.google-map { width: 100%; border: 1px solid #000; }

footer { background-color: #800000; color: #fff; padding: 20px; text-align: center; margin-top: auto; }

/* ==========================================================================
   CADRES D'IMAGES
   ========================================================================== */
figure.image-frame {
    display: flex; flex-direction: column;
    width: fit-content; min-width: min-content;
    margin: 10px;
    border: 2px solid rgb(192, 0, 0);
    background-color: #fff; text-align: center; position: relative;
}

figcaption.frame-caption {
    order: -1; width: 100%;
    background-color: rgb(192, 0, 0); color: #ffffff;
    font-family: 'Georgia', serif; font-size: 10pt; font-weight: bold;
    padding: 4px 8px; text-align: center;
    border-bottom: 2px solid rgb(192, 0, 0);
}

figure.image-frame img {
    display: block; width: auto; height: auto; max-width: 100%;
    border: 0; margin: auto; padding: 5px;
}

figure.image-frame.frame-lg { width: 175px; flex: 0 0 175px; }
figure.image-frame.frame-lg img { width: 100%; }

.historical-gallery figure.image-frame {
    width: calc((100% - 40px) / 5); margin: 0 0 10px 0;
}

.right-images-stack {
    display: flex; flex-direction: column; gap: 20px;
    flex: 0 0 auto; align-items: center; margin-left: 20px;
}

.page-sigillographie .description p,
.page-sigillographie .text-content {
    font-size: 14pt; line-height: 1.6; margin-bottom: 20px;
}

/* ==========================================================================
   RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .site-wrapper { width: 100%; padding: 0 10px; }
    .header-inner { flex-direction: column; gap: 15px; }
    .header-center { order: 1; } .header-left { order: 2; } .header-right { order: 3; }
    .big-title { max-height: 60px; }
    .main-menu { flex-direction: column; }
    .submenu { position: relative; width: 100%; border: none; border-left: 5px solid #800000; }
    .historical-gallery { flex-wrap: wrap; }
    .historical-gallery img { width: 48%; margin-bottom: 10px; }
    .historical-gallery figure.image-frame { width: 48%; }
    
    figure.image-frame.frame-lg { width: 100%; flex: auto; max-width: 100%; }
    .description .content-wrapper, .map-container, .practical-info { flex-direction: column; display: flex; }
    .location-container { flex-direction: column; }
    .map-visual, .location-right-col { flex: auto; width: 100%; padding: 0; }
    .map-visual { margin-bottom: 20px; }
    
    .partition-row { flex-direction: column; }
    .col-quarter, .col-half, .col-half-wide { max-width: 100%; flex: 1 0 auto; }
}

/* ==========================================================================
   AUTRES
   ========================================================================== */

.bordered-section {
    border: 1px solid #800000;
    background-color: #ffffff;
    padding: 15px;
}
.bordered-section h3 { margin-top: 0; }

.separator-line {
    border: 0; border-top: 1px solid #dcdcdc; margin: 30px 0;
}

.mt-15 { margin-top: 15px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.gap-10 { gap: 10px; }
.text-center { text-align: center; }

.flex-center { display: flex; justify-content: center; flex-wrap: wrap; }
.flex-center-content { display: flex; align-items: center; justify-content: center; }
.flex-fill { flex: 1; }

.partition-row {
    display: flex; gap: 15px; align-items: stretch; margin-bottom: 20px;
}
.row-gap-10 { align-items: stretch; gap: 10px; }

.col-quarter {
    flex: 0 0 calc(25% - 5px); max-width: calc(25% - 5px);
}
.col-half, .col-half-wide {
    flex: 0 0 calc(50% - 5px); max-width: calc(50% - 5px);
}
.row-gap-10 .col-half-wide {
    flex: 0 0 calc(50% - 10px); max-width: calc(50% - 10px);
}

.col-40 { flex: 0 0 40%; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.col-60 { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }

.text-align-box {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center; padding: 15px;
    box-sizing: border-box; height: 100%;
}
.text-align-box h3, .text-align-box p { margin: 0; }

.card-inner {
    padding: 10px; display: flex; flex-direction: column; flex: 1;
}

.list-container-centered {
    padding: 10px; display: flex; flex-direction: column; flex: 1; justify-content: center;
}

.img-row {
    display: flex; justify-content: center; gap: 10px; height: 100%; align-items: stretch;
}
.img-row.nowrap { flex-wrap: nowrap; }

.symbolic-grid {
    padding: 10px; flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.intro-gallery {
    flex: 1; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}

.intro-fig { flex: 1 0 20%; margin: 0; }

.partition-fig {
    flex: 1; margin: 0 !important; display: flex; flex-direction: column;
}
.partition-fig img {
    width: 100%; aspect-ratio: 3 / 4; object-fit: cover; height: 100%;
}

.img-fluid-noborder { width: 100%; border: none; }

.fig-full-height {
    width: 100%; height: 100%; display: flex; flex-direction: column; margin: 0;
}

.static-caption { order: 0; position: static; margin-bottom: 0; }

.disc-list {
    list-style-type: disc; margin-left: 20px; margin-bottom: 15px; text-align: left;
}

.source-text {
    font-size: 0.9em; font-style: italic; margin-top: 20px;
}

.intro-content h1 {
    text-align: left;
    color: #000000;
    font-weight: bold;
    font-size: 12pt;
    font-style: normal;
    margin-top: 0;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
    line-height: 1.4;
}
h1 {
    color: #800000;
    font-family: 'Georgia', serif;
    font-weight: bold;
    font-size: 14pt;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.2;
}