/* ============================================================
   PARAFIA — feuille de style publique
   Palette : ivoire / bordeaux / or — élégante et lisible
   ============================================================ */

:root {
    --bg: #faf8f3;
    --surface: #ffffff;
    --ink: #2c2620;
    --muted: #6f675c;
    --primary: #7d2a2a;
    --primary-dark: #5e1f1f;
    --primary-soft: #f6ecec;
    --gold: #a98635;
    --gold-soft: #f3ead3;
    --border: #e8e1d3;
    --radius: 14px;
    --shadow: 0 2px 14px rgba(70, 50, 20, 0.08);
    --shadow-lg: 0 8px 30px rgba(70, 50, 20, 0.14);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-size: 1rem;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
    /* Largeur fluide : s'adapte à la taille de l'écran (jusqu'à 1400px sur grands moniteurs) */
    width: min(1400px, 94vw);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--primary-dark);
    color: #f3e9da;
    font-size: 0.85rem;
    padding: 6px 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.topbar-item strong { color: #ffd98a; }

/* ---------- Header / nav ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(70, 50, 20, 0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    min-width: 0;
}
.brand-cross {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #9c4040, var(--primary-dark));
    color: #f8edd8;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(620px, 42vw);
}
.brand-sub {
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
    padding: 9px 13px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.main-nav a.active { background: var(--primary); color: #fff; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-dark);
    margin: 4px 0;
    transition: 0.2s;
}

/* ---------- Hero (page d'accueil) ---------- */
.hero {
    position: relative;
    /* Hauteur proportionnelle à l'écran (bornée pour rester raisonnable) */
    min-height: clamp(380px, 55vh, 640px);
    display: flex;
    align-items: center;
    background: var(--primary-dark);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.55);
}
.hero-content {
    position: relative;
    color: #fff;
    padding: clamp(48px, 7vh, 90px) 20px;
    max-width: min(820px, 80%);
}
.hero-eyebrow {
    color: #ffd98a;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.hero p.hero-quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.25rem;
    color: #f3e9da;
    margin-bottom: 28px;
    min-height: 2em;
}
.hero p.hero-quote .quote-author { font-size: 0.95rem; opacity: 0.8; font-style: normal; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.97rem;
    border: none;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: #94732b; color: #fff; transform: translateY(-1px); }
.btn-outline { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(40px, 5vw, 72px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.section-head h2 {
    font-size: 2rem;
    color: var(--primary-dark);
}
.section-head h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    margin-top: 8px;
}
.see-all { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }

/* ---------- Bandeau infos clés (messes / adresse / contact) ---------- */
.key-info {
    position: relative;
    z-index: 5;
    margin-top: -54px;
}
.key-info-grid {
    display: grid;
    /* Colonnes fluides : se réorganisent selon la largeur de l'écran */
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}
.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
}
.info-card h3 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.info-card h3 .ico { font-size: 1.15rem; }
.mass-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.mass-table td { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.mass-table td:last-child { text-align: right; font-weight: 700; color: var(--primary); }
.mass-table tr:last-child td { border-bottom: none; }
.mass-table tr.mass-today td { color: var(--gold); }
.mass-table tr.mass-today td:first-child::after { content: " •"; color: var(--gold); }
.info-card p { margin-bottom: 8px; font-size: 0.95rem; }
.info-card .info-line { display: flex; gap: 9px; align-items: baseline; }
.info-card .small-link { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 0.92rem; }

/* ---------- Annonce paroissiale ---------- */
.announcement {
    background: var(--gold-soft);
    border: 1px solid #e3d3a8;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 32px;
}
.announcement h3 { color: #6f5618; font-size: 1.25rem; margin-bottom: 6px; }
.announcement p { color: #5a4a1f; }

/* ---------- Cartes actualités ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
}
.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    color: var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.news-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--primary-soft); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: var(--primary);
    opacity: 0.45;
}
.news-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-date {
    font-size: 0.82rem;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.news-card h3 { font-size: 1.3rem; color: var(--primary-dark); }
.news-card p { font-size: 0.93rem; color: var(--muted); flex: 1; }
.news-card .read-more { font-weight: 700; font-size: 0.92rem; }

/* ---------- Événements ---------- */
.events-list { display: flex; flex-direction: column; gap: 14px; }
.event-row {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    color: var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
}
.event-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.event-date-badge {
    flex: 0 0 64px;
    text-align: center;
    background: var(--primary-soft);
    border: 1px solid #ecd9d9;
    border-radius: 12px;
    padding: 8px 4px;
}
.event-date-badge .d { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); line-height: 1.1; }
.event-date-badge .m { font-size: 0.75rem; font-weight: 700; color: var(--gold); text-transform: uppercase; }
.event-info { flex: 1; min-width: 0; }
.event-info h3 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 2px; }
.event-meta { font-size: 0.86rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.event-type-tag {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gold-soft);
    color: #6f5618;
    border-radius: 99px;
    padding: 3px 10px;
    white-space: nowrap;
}
.event-desc { font-size: 0.92rem; color: var(--muted); margin-top: 6px; }

/* ---------- Bloc histoire (accueil) ---------- */
.history-teaser {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}
.history-teaser-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.history-teaser-img img { width: 100%; height: 100%; object-fit: cover; }
.history-teaser h2 { font-size: 2rem; color: var(--primary-dark); margin-bottom: 14px; }
.history-teaser p { color: var(--muted); margin-bottom: 18px; }
.history-badge {
    display: inline-block;
    background: var(--gold-soft);
    color: #6f5618;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 14px;
    border-radius: 99px;
    margin-bottom: 14px;
}

/* ---------- Galerie ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    background: var(--primary-soft);
    border: none;
    padding: 0;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gallery-caption {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    font-size: 0.85rem;
    padding: 22px 12px 10px;
    text-align: left;
}
.gallery-item .video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 99px;
    padding: 3px 10px;
    font-size: 0.78rem;
}
.gallery-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.gallery-filters a {
    padding: 7px 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}
.gallery-filters a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 5, 0.92);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-caption {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ddd;
    font-size: 0.95rem;
}

/* ---------- En-tête de page interne ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark), #7d3535 70%, #8a5a2a);
    color: #fff;
    padding: 52px 0 46px;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; }
.page-hero p { color: #eddfca; max-width: 640px; }
.breadcrumb { font-size: 0.85rem; color: #d9c4a6; margin-bottom: 10px; }
.breadcrumb a { color: #ffd98a; }

/* ---------- Contenu article / pages texte ---------- */
.content-wrap { max-width: 820px; margin: 0 auto; }
.prose { font-size: 1.05rem; }
.prose h2 { color: var(--primary-dark); font-size: 1.7rem; margin: 32px 0 12px; }
.prose h3 { color: var(--primary-dark); font-size: 1.35rem; margin: 26px 0 10px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose img { border-radius: 12px; margin: 18px 0; }
.prose blockquote {
    border-left: 4px solid var(--gold);
    background: var(--gold-soft);
    padding: 14px 20px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    margin: 18px 0;
}
.article-meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 24px; display: flex; gap: 18px; flex-wrap: wrap; }
.article-featured {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 28px;
}
.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 30px; }
.article-video { margin-top: 24px; }
.article-video video { width: 100%; border-radius: 12px; }
.back-link { display: inline-block; margin-top: 32px; font-weight: 700; }

/* ---------- Liturgia ---------- */
.liturgia-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 28px;
    margin-bottom: 22px;
}
.liturgia-card h3 { color: var(--primary-dark); font-size: 1.45rem; margin-bottom: 6px; }
.liturgia-files { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.liturgia-files a {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 600;
}
.liturgia-files audio { width: 100%; margin-top: 6px; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.contact-info-card, .contact-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
.contact-info-card h3, .contact-form-card h3 { color: var(--primary-dark); font-size: 1.4rem; margin-bottom: 16px; }
.contact-info-card p { margin-bottom: 12px; }
.map-embed {
    margin-top: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.map-embed iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Formulaires ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.97rem;
    background: #fffdf9;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: 2px solid var(--gold);
    border-color: var(--gold);
}
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 0.95rem; }
.alert-success { background: #e8f3e4; border: 1px solid #bcd9b0; color: #2e5c22; }
.alert-error { background: #fbe9e7; border: 1px solid #efc1ba; color: #8c2b1d; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    color: var(--ink);
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- État vide ---------- */
.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 48px 20px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.empty-state .ico { font-size: 2.4rem; display: block; margin-bottom: 10px; opacity: 0.6; }

/* ---------- Footer ---------- */
.site-footer { background: #241a14; color: #d8cdbf; margin-top: 64px; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 36px;
    padding: 48px 20px 36px;
}
.footer-brand { color: #f3e9da; font-size: 1.35rem; margin-bottom: 10px; }
.footer-col h4 {
    color: #ffd98a;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.footer-col p { font-size: 0.93rem; margin-bottom: 7px; }
.footer-col a { color: #e8d9c2; }
.footer-col a:hover { color: #ffd98a; }
.footer-mass-list, .footer-links { list-style: none; }
.footer-mass-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.9rem;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.footer-mass-list strong { color: #f3e9da; }
.footer-links li { padding: 3px 0; font-size: 0.93rem; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 0;
    font-size: 0.85rem;
    color: #a8998a;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .history-teaser { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .brand-title { max-width: 320px; }
}

@media (max-width: 700px) {
    .topbar-mass { display: none; }
    .topbar-inner { justify-content: center; }

    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 8px 0 12px;
        border-top: 1px solid var(--border);
        margin-top: 10px;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 14px; font-size: 1.02rem; }

    .hero { min-height: 360px; }
    .hero-content { padding: 52px 20px; }

    .key-info { margin-top: -34px; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { gap: 28px; }

    .event-row { flex-wrap: wrap; }
    .event-type-tag { order: -1; }

    .article-gallery { grid-template-columns: repeat(2, 1fr); }
    .brand-title { font-size: 1.05rem; max-width: 220px; white-space: normal; line-height: 1.15; }
    .brand-sub { font-size: 0.7rem; }
}
