/* =========================================================
   INVENTAIRE PATRIMONIAL — STYLE PUBLIC
   Prototype v3
   ========================================================= */

:root {
    --green-dark: #425846;
    --green: #60745f;
    --sage: #edf1e8;
    --cream: #fbf8f1;
    --ink: #293129;
    --muted: #687068;
    --line: rgba(53, 67, 55, .16);
    --shadow: 0 10px 24px rgba(37, 47, 39, .09);
    --radius: 16px;
    --page-width: 1180px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.4;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- En-tête encore plus compact ---------- */

.site-header {
    position: relative;
    z-index: 40;
    background: var(--green-dark);
    color: #fff;
}

.header-inner {
    width: min(var(--page-width), calc(100% - 36px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-right: auto;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: .9rem;
    letter-spacing: .065em;
}

.brand-text small {
    margin-top: 4px;
    color: rgba(255,255,255,.74);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .68rem;
}

.main-nav {
    display: flex;
    align-items: stretch;
    gap: 1px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
}

.nav-home,
.nav-button {
    min-height: 62px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.nav-button::after {
    content: "▾";
    margin-left: 6px;
    font-size: .66rem;
    opacity: .7;
}

.nav-home:hover,
.nav-button:hover,
.has-submenu:hover > .nav-button {
    background: rgba(255,255,255,.09);
}

.nav-item { position: relative; }

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    padding: 7px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow);
}

@media (min-width: 1051px) {
    .has-submenu:hover > .submenu,
    .has-submenu:focus-within > .submenu {
        display: block;
    }
}

.submenu a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
}

.submenu a:hover { background: var(--sage); }

.menu-toggle { display: none; }

/* ---------- Bandeau avec vraie courbe EN HAUT ---------- */

.hero {
    position: relative;
    height: 280px;
    overflow: hidden;
    color: #fff;
    background: var(--green-dark);
}

.hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(24,34,29,.56) 0%, rgba(24,34,29,.18) 45%, rgba(24,34,29,.01) 74%);
}

/* La forme claire descend légèrement dans le haut de la photo
   et crée la courbe visible sous l'en-tête. */
.hero-curve {
    position: absolute;
    z-index: 4;
    left: -3%;
    top: -39px;
    width: 106%;
    height: 58px;
    background: var(--green-dark);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--page-width), calc(100% - 36px));
    margin: 0 auto;
    padding: 50px 0 35px;
}

.hero-kicker,
.eyebrow,
.section-label {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
}

.hero-kicker { margin-bottom: 6px; }

.hero h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(2.05rem, 4vw, 3.85rem);
    line-height: .98;
    text-wrap: balance;
    text-shadow: 0 2px 12px rgba(0,0,0,.20);
}

.hero-content > p:last-child {
    max-width: 600px;
    margin: 12px 0 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(.92rem, 1.4vw, 1.03rem);
    color: rgba(255,255,255,.95);
}

/* ---------- Quatre entrées ---------- */

.activities {
    width: min(var(--page-width), calc(100% - 36px));
    margin: 0 auto;
    padding: 24px 0 19px;
}

.section-label {
    margin: 0 0 12px;
    color: var(--green);
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.activity-card {
    min-height: 218px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(154, 90, 58, .45);
    border-radius: var(--radius);
    box-shadow: 0 6px 16px rgba(39,49,41,.05);
    display: flex;
    flex-direction: column;
}

.card-temples,
.card-parishes { background: #f3efe5; }

.card-circuits,
.card-search { background: #e7eee5; }

.activity-card h2 {
    margin: 8px 0 5px;
    font-size: 1.13rem;
    line-height: 1.1;
}

.activity-card p {
    margin: 0 0 12px;
    color: #555f56;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .84rem;
}

.card-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(66,88,70,.09);
    color: var(--green-dark);
    font-size: 1.2rem;
}

.card-link,
.text-link {
    margin-top: auto;
    color: var(--green-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.dual-actions {
    margin-top: auto;
    display: grid;
    gap: 6px;
}

.button {
    min-height: 35px;
    padding: 7px 9px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--green-dark);
    border-radius: 8px;
    background: var(--green-dark);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

.button-light {
    background: transparent;
    color: var(--green-dark);
}

.mini-tree {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "root root"
        "line line"
        "child1 child2";
    gap: 2px 5px;
    width: 126px;
    color: var(--green-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .62rem;
    text-align: center;
}

.tree-root {
    grid-area: root;
    justify-self: center;
    padding: 4px 10px;
    background: rgba(66,88,70,.09);
    border-radius: 6px;
}

.tree-line {
    grid-area: line;
    height: 11px;
    margin: 0 17px;
    border-top: 1px solid var(--green);
    border-left: 1px solid var(--green);
    border-right: 1px solid var(--green);
}

.tree-child {
    padding: 3px 5px;
    background: rgba(66,88,70,.06);
    border-radius: 5px;
}

.tree-child:first-of-type { grid-area: child1; }
.tree-child:last-of-type { grid-area: child2; }

/* ---------- Église du mois + statistiques sur la même ligne ---------- */

.monthly-and-stats {
    width: min(var(--page-width), calc(100% - 36px));
    margin: 18px auto 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(340px, .95fr);
    gap: 16px;
    align-items: stretch;
}

.monthly {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 155px;
    overflow: hidden;
    background: #eee6d8;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.monthly-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.monthly-text {
    padding: 17px 22px;
}

.monthly-text .eyebrow {
    color: var(--green);
    margin-bottom: 5px;
}

.monthly h2 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.02;
}

.monthly-name {
    margin: 6px 0 2px;
    font-weight: 700;
}

.monthly-text p:not(.eyebrow):not(.monthly-name) {
    margin: 6px 0;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .84rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: #f5f1e7;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.stats div {
    min-height: 76px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.stats div:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.stats div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
}

.stats strong {
    color: var(--green-dark);
    font-size: 1.45rem;
    line-height: 1;
}

.stats span {
    margin-top: 5px;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---------- Footer aminci ---------- */

.site-footer {
    background: #ddd3c1;
    border-top: 1px solid rgba(56,63,56,.12);
}

.footer-inner {
    width: min(var(--page-width), calc(100% - 36px));
    min-height: 48px;
    margin: 0 auto;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .78rem;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-brand span {
    color: #64675f;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.footer-links a {
    color: #4a5149;
    text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 1050px) {
    .header-inner {
        min-height: 60px;
        flex-wrap: wrap;
        padding: 8px 0;
    }

    .menu-toggle {
        display: inline-block;
        border: 1px solid rgba(255,255,255,.34);
        background: transparent;
        color: #fff;
        padding: 7px 10px;
        border-radius: 7px;
        font: inherit;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1px;
        padding-bottom: 5px;
    }

    .main-nav.is-open { display: flex; }

    .nav-home,
    .nav-button {
        width: 100%;
        min-height: auto;
        padding: 8px 10px;
        justify-content: flex-start;
    }

    .nav-item { width: 100%; }

    .submenu {
        position: static;
        min-width: 0;
        margin: 0 0 5px 14px;
        background: rgba(255,255,255,.96);
        box-shadow: none;
        border-radius: 7px;
    }

    .has-submenu.is-open > .submenu { display: block; }

    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .monthly-and-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .brand-text small { display: none; }

    .hero {
        height: 255px;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .activity-card {
        min-height: 0;
    }

    .monthly {
        grid-template-columns: 1fr;
    }

    .monthly-photo {
        max-height: 160px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* =========================================================
   PAGE PUBLIQUE — LISTE DES ÉGLISES
   ========================================================= */

.public-page {
    width: min(var(--page-width), calc(100% - 36px));
    margin: 0 auto;
    padding: 30px 0 38px;
}

.page-heading {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.page-kicker {
    margin: 0 0 4px;
    color: var(--green);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 0;
    color: var(--green-dark);
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    line-height: 1.05;
    font-weight: 600;
}

.compteur-global {
    margin: 8px 0 0;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: .92rem;
}

.compteur-global strong {
    color: var(--green-dark);
    font-size: 1.15rem;
}

.bloc-commune {
    margin: 0 0 20px;
    overflow: hidden;
    background: #f7f3ea;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 5px 14px rgba(39,49,41,.045);
}

.titre-commune {
    margin: 0;
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    background: #e4eadf;
    color: var(--green-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.05rem;
    line-height: 1.2;
}

.commune-nom {
    font-weight: 700;
}

.commune-compte {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 400;
}

.titre-paroisse {
    margin: 0;
    padding: 11px 16px 6px;
    color: #5b675b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .86rem;
    font-weight: 700;
    border-top: 1px solid rgba(53,67,55,.08);
}

.liste-eglises {
    padding: 4px 16px 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 9px;
}

.eglise-lien {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    background: #fffdf8;
    color: var(--ink);
    border: 1px solid rgba(53,67,55,.13);
    border-radius: 8px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .86rem;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.eglise-lien:hover {
    background: #edf2e9;
    border-color: rgba(66,88,70,.30);
    transform: translateY(-1px);
}

.lieudit {
    color: var(--muted);
    font-size: .80rem;
}

@media (max-width: 700px) {
    .public-page {
        width: min(100% - 24px, var(--page-width));
        padding-top: 22px;
    }

    .titre-commune {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .liste-eglises {
        display: grid;
        grid-template-columns: 1fr;
    }

    .eglise-lien {
        width: 100%;
    }
}


/* Ajustements de contraste validés pour la liste */
.bloc-commune {
    background: #f1ecdf;
    border-color: rgba(53, 67, 55, .24);
}
.titre-commune {
    background: #dce5d7;
    color: #394d3d;
}
.commune-compte {
    color: #4f5b50;
    font-weight: 600;
}
.titre-paroisse {
    color: #465446;
}
.eglise-lien {
    color: #2f352f;
    background: #fffdf8;
}


/* =========================================================
   PAGE PUBLIQUE — CHOIX ET FICHE COMPLÈTE D'UNE ÉGLISE
   ========================================================= */

.fiche-choix .page-heading > p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
}

.choix-fiche-card {
    max-width: 820px;
    padding: 24px;
    background: #f1ecdf;
    border: 1px solid rgba(53, 67, 55, .24);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(39,49,41,.055);
}

.choix-fiche-card form {
    display: grid;
    gap: 12px;
}

.choix-fiche-card label {
    color: #394d3d;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.choix-fiche-card select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(53,67,55,.28);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--ink);
    font: 1rem Arial, Helvetica, sans-serif;
}

.public-button {
    justify-self: start;
    padding: 9px 16px;
    border: 1px solid var(--green-dark);
    border-radius: 8px;
    background: var(--green-dark);
    color: #fff;
    font: 700 .9rem Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.public-button:hover {
    background: #354a3a;
}

/* Barre d'actions sous le menu public */
.fiche-actions {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(241, 236, 223, .97);
    border-bottom: 1px solid rgba(53,67,55,.18);
    backdrop-filter: blur(4px);
}

.fiche-actions-inner {
    width: min(var(--page-width), calc(100% - 36px));
    min-height: 44px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fiche-actions a,
.fiche-actions button {
    padding: 6px 10px;
    border: 1px solid rgba(53,67,55,.22);
    border-radius: 7px;
    background: #fffdf8;
    color: #394d3d;
    font: 700 .78rem Arial, Helvetica, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.fiche-actions a:hover,
.fiche-actions button:hover {
    background: #e5ece1;
}

/* Conteneur principal de la fiche */
.fiche-complete-body {
    background: var(--cream);
}

.fiche-complete-body .page {
    width: min(var(--page-width), calc(100% - 36px));
    min-height: 0;
    margin: 22px auto 34px;
    padding: 28px 36px 34px;
    background: #fffdf8;
    border: 1px solid rgba(53,67,55,.18);
    border-radius: 14px;
    box-shadow: 0 7px 22px rgba(39,49,41,.07);
}

.fiche-complete-body .entete {
    text-align: center;
    border-bottom: 2px solid var(--green);
    padding-bottom: 11px;
    margin-bottom: 17px;
}

.fiche-complete-body .entete .sur-titre {
    margin: 0 0 5px;
    color: var(--green);
    font: 700 11px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.fiche-complete-body .entete h1 {
    margin: 0;
    color: #314435;
    font-size: 2rem;
    line-height: 1.12;
    font-weight: 600;
}

.fiche-complete-body .sous-titre {
    margin: 6px 0 0;
    font-size: 1.1rem;
    font-style: italic;
}

.fiche-complete-body .localisation {
    margin: 7px 0 0;
    color: #526052;
    font: .9rem Arial, Helvetica, sans-serif;
}

.fiche-complete-body .rubrique {
    margin: 0 0 19px;
    break-inside: auto;
}

.fiche-complete-body .rubrique > h2 {
    margin: 18px 0 9px;
    padding: 7px 10px;
    border-left: 5px solid var(--green-dark);
    background: #e3e9de;
    color: #334737;
    font: 700 1rem/1.2 Arial, Helvetica, sans-serif;
    break-after: avoid;
}

.fiche-complete-body h3 {
    margin: 14px 0 7px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(53,67,55,.25);
    color: #465446;
    font: 700 .92rem/1.2 Arial, Helvetica, sans-serif;
    break-after: avoid;
}

.fiche-complete-body h4 {
    margin: 10px 0 3px;
    color: #394d3d;
    font: 700 .86rem/1.25 Arial, Helvetica, sans-serif;
}

.fiche-complete-body p {
    margin: 4px 0 9px;
}

.fiche-complete-body .grille-donnees {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    margin: 0;
}

.fiche-complete-body .donnee {
    display: grid;
    grid-template-columns: minmax(105px, 42%) 1fr;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dotted rgba(53,67,55,.24);
    break-inside: avoid;
}

.fiche-complete-body dt {
    color: #394d3d;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.fiche-complete-body dd {
    margin: 0;
}

.fiche-complete-body .paragraphe {
    margin-top: 9px;
    break-inside: avoid-page;
}

.fiche-complete-body .notice {
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid rgba(53,67,55,.20);
    border-radius: 8px;
    background: #fbf8f1;
    break-inside: avoid-page;
}

.fiche-complete-body .notice h3 {
    margin-top: 0;
}

.fiche-complete-body .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 20px;
    margin: 5px 0 8px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.fiche-complete-body .meta strong {
    color: #394d3d;
}

.fiche-complete-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 13px;
    font-size: 13px;
    break-inside: auto;
}

.fiche-complete-body thead {
    display: table-header-group;
}

.fiche-complete-body tr {
    break-inside: avoid;
}

.fiche-complete-body th,
.fiche-complete-body td {
    padding: 5px 6px;
    border: 1px solid rgba(53,67,55,.30);
    vertical-align: top;
    text-align: left;
}

.fiche-complete-body th {
    background: #e3e9de;
    color: #394d3d;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.fiche-complete-body .vide {
    color: #777;
    font-style: italic;
}

.fiche-complete-body .documents-rubrique {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    margin: 14px 0 4px;
}

.fiche-complete-body .document-image {
    flex: 0 1 100mm;
    max-width: 100mm;
    margin: 0;
    text-align: center;
    break-inside: avoid-page;
}

.fiche-complete-body .document-image img {
    display: block;
    max-width: 100%;
    max-height: 150mm;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    border: 1px solid rgba(53,67,55,.25);
    background: #fff;
}

.fiche-complete-body .document-image a {
    display: inline-block;
    max-width: 100%;
}

.fiche-complete-body .document-image figcaption {
    margin-top: 6px;
    color: #505850;
    font: 12px/1.35 Arial, Helvetica, sans-serif;
}

.fiche-complete-body .mentions-document {
    display: block;
    margin-top: 4px;
    color: #667066;
    font-size: 11px;
}

.fiche-complete-body .document-pdf {
    display: flex;
    flex: 1 1 100%;
    gap: 12px;
    align-items: flex-start;
    max-width: 150mm;
    padding: 10px 12px;
    border: 1px solid rgba(53,67,55,.22);
    border-radius: 8px;
    background: #fbf8f1;
    break-inside: avoid-page;
}

.fiche-complete-body .icone-pdf {
    flex: 0 0 auto;
    padding: 5px 6px;
    border: 1px solid #677267;
    border-radius: 4px;
    color: #394d3d;
    font: 700 11px Arial, Helvetica, sans-serif;
}

.fiche-complete-body .contenu-pdf {
    min-width: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.fiche-complete-body .contenu-pdf > a {
    color: #394d3d;
    font-weight: 700;
}

.fiche-complete-body .contenu-pdf p {
    margin: 5px 0 0;
    font-size: 13px;
}

.fiche-complete-body .sommaire-fiche {
    margin: 0 0 24px;
    padding: 11px 14px;
    border: 1px solid rgba(53,67,55,.22);
    background: #f1ecdf;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.75;
    border-radius: 9px;
}

.fiche-complete-body .sommaire-fiche strong {
    margin-right: 8px;
    color: #394d3d;
}

.fiche-complete-body .sommaire-fiche a {
    white-space: nowrap;
    margin-right: 10px;
    color: #425846;
    text-underline-offset: 2px;
}

.fiche-complete-body .ancre-section {
    scroll-margin-top: 112px;
}

.fiche-complete-body .titre-groupe {
    margin: 28px 0 11px;
    padding: 7px 9px;
    border-bottom: 2px solid var(--green);
    color: #425846;
    font: 700 1.15rem/1.2 Arial, Helvetica, sans-serif;
}

.fiche-complete-body .voir-tous {
    margin: 5px 0 12px;
    font: 13px Arial, Helvetica, sans-serif;
}

.fiche-complete-body .voir-tous a {
    color: #425846;
}

.fiche-complete-body .galerie-complete {
    margin-top: 28px;
    padding-top: 5px;
    border-top: 2px solid var(--green);
}

.fiche-complete-body .galerie-complete .groupe-documents {
    margin: 18px 0 28px;
}

.fiche-complete-body .pied {
    margin-top: 25px;
    padding-top: 7px;
    border-top: 1px solid rgba(53,67,55,.25);
    color: #667066;
    font: 11px Arial, Helvetica, sans-serif;
    text-align: center;
}

@page {
    size: A4 portrait;
    margin: 13mm 14mm 15mm;
}

@media print {
    .site-header,
    .site-footer,
    .fiche-actions,
    .fiche-complete-body .sommaire-fiche,
    .fiche-complete-body .voir-tous,
    .fiche-complete-body .galerie-complete {
        display: none !important;
    }

    .fiche-complete-body {
        background: #fff;
        font-size: 10.5pt;
    }

    .fiche-complete-body .page {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        background: #fff;
        border: 0;
        box-shadow: none;
    }

    .fiche-complete-body .rubrique > h2 {
        margin-top: 14px;
    }

    .fiche-complete-body .notice,
    .fiche-complete-body .paragraphe,
    .fiche-complete-body .document-image,
    .fiche-complete-body .document-pdf {
        break-inside: avoid-page;
    }

    .fiche-complete-body a {
        color: inherit;
        text-decoration: none;
    }
}

@media screen and (max-width: 850px) {
    .fiche-complete-body .page {
        width: min(100% - 24px, var(--page-width));
        margin: 12px auto 24px;
        padding: 18px;
    }

    .fiche-complete-body .grille-donnees {
        grid-template-columns: 1fr;
    }

    .fiche-actions-inner {
        width: min(100% - 24px, var(--page-width));
    }
}

/* =========================================================
   FICHE PUBLIQUE — PALETTE VALIDÉE
   Vert principal + accents rouille
   ========================================================= */

/* Lecture écran : texte plus présent */
@media screen {
    .fiche-complete-body .page {
        color: #252a25;
        font-size: 1.02rem;
        line-height: 1.46;
    }

    /* Grand titre de chaque rubrique */
    .fiche-complete-body .rubrique > h2 {
        padding: 8px 12px;
        border-left: 0;
        border-radius: 8px 8px 0 0;
        background: #35553f;
        color: #fff;
        font-size: 1.08rem;
        letter-spacing: .01em;
    }

    /* Sous-rubriques : fond neutre et accent rouille */
    .fiche-complete-body h3 {
        margin: 14px 0 8px;
        padding: 7px 10px;
        border: 0;
        border-left: 4px solid #9a5a3a;
        background: #f1f0eb;
        color: #70402d;
        font-size: .98rem;
    }

    /* Petits intitulés dans les paragraphes */
    .fiche-complete-body h4 {
        color: #7b4630;
        font-size: .91rem;
    }

    .fiche-complete-body dt {
        color: #314438;
        font-size: .94rem;
    }

    .fiche-complete-body dd,
    .fiche-complete-body p {
        color: #292d29;
    }

    /* Sommaire : très clair, liens rouille bien lisibles */
    .fiche-complete-body .sommaire-fiche {
        background: #f0f1ec;
        border-color: rgba(53, 67, 55, .28);
        color: #293129;
    }

    .fiche-complete-body .sommaire-fiche strong {
        color: #314438;
    }

    .fiche-complete-body .sommaire-fiche a {
        color: #7b4630;
        font-weight: 600;
        text-decoration-color: rgba(123,70,48,.55);
    }

    .fiche-complete-body .sommaire-fiche a:hover {
        color: #593020;
    }

    /* Titres de groupes complémentaires */
    .fiche-complete-body .titre-groupe {
        color: #70402d;
        border-bottom-color: #9a5a3a;
    }

    /* Tableaux : éviter le retour massif du vert clair */
    .fiche-complete-body th {
        background: #f1f0eb;
        color: #70402d;
    }

    /* Quelques textes secondaires moins pâles */
    .fiche-complete-body .localisation,
    .fiche-complete-body .document-image figcaption,
    .fiche-complete-body .mentions-document,
    .fiche-complete-body .pied {
        color: #4d554d;
    }
}


/* =========================================================
   LISTE DES ÉGLISES — PALETTE VALIDÉE
   Commune = vert soutenu / Paroisse = rouille / Église = neutre
   ========================================================= */

@media screen {
    .page-liste .bloc-commune {
        background: #f7f6f1;
        border-color: rgba(53, 67, 55, .24);
        box-shadow: 0 5px 14px rgba(39, 49, 41, .045);
    }

    .page-liste .titre-commune {
        background: #5e725f;
        color: #fffdf8;
    }

    .page-liste .commune-nom {
        color: #fffdf8;
    }

    .page-liste .commune-compte {
        color: rgba(255, 253, 248, .88);
        font-weight: 600;
    }

    .page-liste .titre-paroisse {
        color: #7b4630;
        background: #f3f0ea;
        border-top-color: rgba(123, 70, 48, .16);
        font-size: .9rem;
        font-weight: 700;
    }

    .page-liste .liste-eglises {
        background: #f7f6f1;
    }

    .page-liste .eglise-lien {
        background: #fffefa;
        color: #2e332f;
        border-color: rgba(53, 67, 55, .18);
    }

    .page-liste .eglise-lien:hover {
        background: #edf1ec;
        border-color: rgba(66, 88, 70, .34);
    }

    .page-liste .lieudit {
        color: #555d56;
    }
}


/* =========================================================
   FICHE PUBLIQUE — PRÊTRES
   Même identité graphique que les fiches d'églises
   ========================================================= */

.page-consultation {
    width: min(var(--page-width), calc(100% - 36px));
    margin: 0 auto;
    padding: 22px 0 36px;
}

.pretre-actions {
    min-height: 44px;
    margin: -22px 0 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pretre-actions a,
.pretre-actions button {
    padding: 7px 11px;
    border: 1px solid rgba(53,67,55,.24);
    border-radius: 7px;
    background: #fffefa;
    color: #394d3d;
    font: 700 .82rem Arial, Helvetica, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.pretre-actions a:hover,
.pretre-actions button:hover {
    background: #edf1ec;
}

.pretre-page-heading {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.pretre-page-heading h1 {
    margin: 0;
    color: var(--green-dark);
    font-size: clamp(2rem, 3.2vw, 2.7rem);
    line-height: 1.05;
    font-weight: 600;
}

.pretre-page-heading > p:last-child {
    margin: 8px 0 0;
    color: #4d554d;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .95rem;
}

.recherche-zone,
.rubrique-fiche,
.identite-fiche {
    margin: 0 0 18px;
    overflow: hidden;
    border: 1px solid rgba(53,67,55,.21);
    border-radius: 10px;
    background: #fffefa;
    box-shadow: 0 5px 14px rgba(39,49,41,.045);
}

.rubrique-fiche > h3 {
    margin: 0;
    padding: 9px 13px;
    border: 0;
    background: #35553f;
    color: #fff;
    font: 700 1.02rem/1.2 Arial, Helvetica, sans-serif;
}

.recherche-zone {
    padding-bottom: 16px;
}

.recherche-zone > h3 {
    margin-bottom: 16px;
}

.recherche-publique {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    padding: 0 16px;
}

.recherche-publique label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #314438;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.recherche-publique input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(53,67,55,.28);
    border-radius: 7px;
    background: #fff;
    color: #292d29;
    font: .95rem Arial, Helvetica, sans-serif;
}

.bouton-lien {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--green-dark);
    border-radius: 7px;
    background: var(--green-dark);
    color: #fff;
    font: 700 .84rem Arial, Helvetica, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.bouton-lien:hover {
    background: #314b39;
}

.info-module {
    margin: 12px 16px 0;
    color: #70402d;
    font-family: Arial, Helvetica, sans-serif;
}

.resultats-recherche {
    width: calc(100% - 32px);
    margin: 14px 16px 16px;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .9rem;
}

.resultats-recherche th,
.resultats-recherche td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(53,67,55,.18);
    text-align: left;
    vertical-align: middle;
}

.resultats-recherche th {
    background: #f1f0eb;
    color: #70402d;
    font-weight: 700;
}

.resultats-recherche tbody tr:hover {
    background: #f7f3ef;
}

.identite-fiche {
    padding: 22px 24px;
    border-top: 6px solid #35553f;
}

.identite-consultation {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.identite-consultation h2 {
    margin: 0;
    color: #314435;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 1.05;
}

.identite-consultation p {
    margin: 7px 0 0;
    color: #4d554d;
    font-family: Arial, Helvetica, sans-serif;
}

.etat-fiche {
    padding: 7px 11px;
    border: 1px solid rgba(123,70,48,.24);
    border-radius: 7px;
    background: #f4eee9;
    color: #70402d;
    font-family: Arial, Helvetica, sans-serif;
    white-space: nowrap;
}

.grille-consultation {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 0 24px;
    padding: 8px 14px 14px;
}

.ligne-info {
    display: grid;
    grid-template-columns: minmax(165px, 40%) 1fr;
    gap: 12px;
    padding: 7px 2px;
    border-bottom: 1px dotted rgba(53,67,55,.23);
}

.ligne-info.large {
    grid-column: 1 / -1;
    grid-template-columns: minmax(220px, 27%) 1fr;
}

.ligne-info .etiquette {
    color: #314438;
    font: 700 .91rem Arial, Helvetica, sans-serif;
}

.ligne-info .valeur {
    color: #292d29;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.affectation {
    margin: 14px;
    overflow: hidden;
    border: 1px solid rgba(123,70,48,.25);
    border-radius: 9px;
    background: #fffefa;
}

.affectation h4 {
    margin: 0;
    padding: 8px 12px;
    border-left: 4px solid #9a5a3a;
    background: #f1f0eb;
    color: #70402d;
    font: 700 .95rem Arial, Helvetica, sans-serif;
}

.affectation .grille-consultation {
    padding-top: 5px;
}

.aucune-info {
    margin: 12px 14px 16px;
    color: #5b615b;
    font-style: italic;
}

.rubrique-fiche > p:not(.aucune-info) {
    margin: 12px 16px;
}

@media (max-width: 760px) {
    .recherche-publique,
    .grille-consultation {
        grid-template-columns: 1fr;
    }

    .ligne-info,
    .ligne-info.large {
        grid-column: auto;
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .resultats-recherche,
    .resultats-recherche thead,
    .resultats-recherche tbody,
    .resultats-recherche th,
    .resultats-recherche td,
    .resultats-recherche tr {
        display: block;
    }

    .resultats-recherche thead {
        display: none;
    }

    .resultats-recherche tr {
        margin-bottom: 10px;
        padding: 8px;
        border: 1px solid rgba(53,67,55,.20);
        border-radius: 8px;
        background: #fffefa;
    }

    .resultats-recherche td {
        padding: 4px 0;
        border: 0;
    }
}

@media print {
    .site-header,
    .site-footer,
    .no-print,
    .recherche-zone {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .page-consultation {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .rubrique-fiche,
    .identite-fiche,
    .affectation {
        box-shadow: none;
        break-inside: avoid;
    }
}

/* =========================================================
   LISIBILITÉ ÉCRAN — PUBLIC
   Taille renforcée pour un meilleur confort de lecture
   ========================================================= */

@media screen {
    body {
        font-size: 18px;
        line-height: 1.55;
    }

    .main-nav {
        font-size: 1.05rem;
    }

    .submenu a {
        font-size: 1rem;
        padding: 10px 12px;
    }

    .page-consultation,
    .public-page {
        font-size: 1rem;
    }

    .pretre-page-heading > p:last-child,
    .compteur-global {
        font-size: 1rem;
    }

    .rubrique-fiche > h3 {
        font-size: 1.08rem;
    }

    .rubrique-fiche > p:not(.aucune-info),
    .info-module {
        line-height: 1.6;
    }

    .recherche-publique input,
    .choix-fiche-card select {
        font-size: 1rem;
    }

    .bouton-lien,
    .public-button,
    .fiche-actions a,
    .fiche-actions button {
        font-size: .95rem;
    }

    .resultats-recherche {
        font-size: 1rem;
    }

    .ligne-info .etiquette {
        font-size: 1rem;
    }

    .fiche-complete-body .page {
        font-size: 1.08rem;
        line-height: 1.55;
    }

    .fiche-complete-body table,
    .fiche-complete-body .meta,
    .fiche-complete-body .voir-tous {
        font-size: .95rem;
    }

    .eglise-lien,
    .titre-paroisse {
        font-size: 1rem;
    }

    .commune-compte {
        font-size: .9rem;
    }
}
/* ---------- Ajustements des menus déroulants ---------- */

@media (min-width: 1051px) {

    .submenu {
        min-width: 185px;
        padding: 5px;
        background: #f3efe5;
        border-color: rgba(53, 67, 55, .24);
    }

    .submenu a {
        padding: 9px 10px;
        border-radius: 5px;
    }

    .submenu a:hover {
        background: #dce6d8;
        color: #314438;
    }

    /* Évite qu'un menu reste ouvert après un clic de souris */
    .has-submenu:focus-within > .submenu {
        display: none;
    }

    .has-submenu:hover > .submenu,
    .has-submenu:has(> .nav-button:focus-visible) > .submenu {
        display: block;
    }
}

/* =========================================================
   ACCUEIL — ÉVÉNEMENT TEMPORAIRE / AFFICHE AVEC AGRANDISSEMENT
   ========================================================= */

.event-card {
    grid-template-columns: 185px 1fr;
}

.event-poster-button {
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
}

.event-poster-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.event-text h2 {
    font-size: 1.55rem;
}

.event-open {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    font-size: inherit;
}

body.modal-open {
    overflow: hidden;
}

.event-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 24, 21, .86);
}

.event-modal.is-open {
    display: flex;
}

.event-modal img {
    width: auto;
    height: auto;
    max-width: min(92vw, 900px);
    max-height: 92vh;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 16px 50px rgba(0,0,0,.38);
}

.event-modal-close {
    position: fixed;
    top: 14px;
    right: 20px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    color: #fff;
    font: 38px/40px Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.event-modal-close:hover,
.event-modal-close:focus-visible {
    background: rgba(255,255,255,.18);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .event-card {
        grid-template-columns: 120px 1fr;
    }

    .event-text {
        padding: 14px 16px;
    }

    .event-text h2 {
        font-size: 1.25rem;
    }

    .event-modal {
        padding: 12px;
    }

    .event-modal img {
        max-width: 96vw;
        max-height: 94vh;
    }
}
