/* =========================================================================
   Pro Loco Sant'Ambrogio – Sacra San Michele — site.css
   Archétype : « patrimoine médiéval / heritage éditorial » (abbaye, bourg, Piémont).
   Signature : TITRES INSCRIPTIONNELS Cinzel + LETTRINE DORÉE (drop-cap) + ARCS ROMANS
   en sommet d'image + cartes chevauchant un hero plein cadre.
   ANTI-FOOTPRINT : aucune classe custom — uniquement classes/ids Bootstrap existants,
   éléments et pseudo-éléments.
   ========================================================================= */

:root {
  --pl-stone: #243a52;          /* bleu-pierre nuit (dominante) */
  --pl-stone-rgb: 36, 58, 82;
  --pl-stone-2: #1a2c3f;
  --pl-stone-deep: #11202f;
  --pl-gold: #c19a3e;           /* or doré (accent) */
  --pl-gold-rgb: 193, 154, 62;
  --pl-gold-deep: #9c7a26;
  --pl-parch: #f3ebda;         /* parchemin (fond) */
  --pl-parch-2: #e9dec6;
  --pl-surface: #fbf6ea;
  --pl-ink: #241f1a;           /* brun-noir encre */
  --pl-muted: #6f6552;
  --pl-border: #ddccae;

  --bs-primary: #243a52;
  --bs-primary-rgb: 36, 58, 82;

  --bs-body-bg: var(--pl-parch);
  --bs-body-color: #3a342b;
  --bs-body-font-family: 'Cormorant Garamond', Georgia, serif;
  --bs-body-font-size: 1.22rem;
  --bs-body-line-height: 1.65;

  --bs-heading-color: var(--pl-ink);
  --bs-link-color: var(--pl-stone);
  --bs-link-hover-color: var(--pl-gold-deep);
  --bs-border-color: var(--pl-border);

  --pl-shadow: 0 30px 60px -34px rgba(17, 32, 47, 0.5), 0 8px 22px -14px rgba(17, 32, 47, 0.28);
}

body {
  background-color: var(--pl-parch);
  background-image:
    radial-gradient(1100px 560px at 88% -10%, rgba(193, 154, 62, 0.1), transparent 60%),
    radial-gradient(900px 480px at -6% 4%, rgba(36, 58, 82, 0.07), transparent 58%);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typographie ---------- */
h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--pl-ink);
}
.lead { font-size: 1.35rem; }
p { text-wrap: pretty; }
::selection { background: var(--pl-gold); color: #fff; }
a { transition: color 0.18s ease; }

/* intitulés de section : losange or + petites capitales espacées */
#section-kicker, #hero-eyebrow {
  font-family: 'Cinzel', serif; font-weight: 600;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.26em;
  color: var(--pl-gold-deep);
}
#section-kicker { display: inline-flex; align-items: center; gap: 0.6rem; }
#section-kicker::before { content: ''; width: 8px; height: 8px; transform: rotate(45deg); background: var(--pl-gold); }

/* =========================================================================
   NAVBAR — bandeau pierre + or
   ========================================================================= */
.navbar.sticky-top {
  background-color: rgba(26, 44, 63, 0.97) !important;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 2px solid var(--pl-gold);
}
#brand-logo { border-radius: 6px; border: 1px solid rgba(193, 154, 62, 0.5); }
#brand-name { font-family: 'Cinzel', serif; font-weight: 600; font-size: 1.1rem; color: var(--pl-parch); letter-spacing: 0.04em; }
#brand-sub { color: var(--pl-gold); letter-spacing: 0.2em; font-size: 0.66rem; text-transform: uppercase; }
.navbar .nav-link {
  font-family: 'Cinzel', serif; font-weight: 500; font-size: 0.92rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(243, 235, 218, 0.86) !important;
  position: relative; padding-inline: 0.9rem;
}
.navbar .nav-link::after {
  content: ''; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.35rem;
  height: 2px; background: var(--pl-gold); transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.navbar .nav-link:hover::after, .navbar .nav-link:focus::after { transform: scaleX(1); }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: #fff !important; }
.navbar-toggler { border-color: rgba(193, 154, 62, 0.6); }
.navbar-toggler-icon { filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg); }

/* =========================================================================
   HERO — plein cadre (Sacra di San Michele) + titre inscriptionnel
   ========================================================================= */
#hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  padding: 7rem 0 9rem;
  background:
    linear-gradient(180deg, rgba(17, 32, 47, 0.62), rgba(17, 32, 47, 0.5) 45%, rgba(36, 58, 82, 0.82)),
    url('/images/sacra.jpg') center 28% / cover no-repeat;
}
#hero::after {
  content: ''; position: absolute; inset: 1rem; pointer-events: none;
  border: 1px solid rgba(243, 235, 218, 0.28);
}
#hero-inner { position: relative; z-index: 2; max-width: 60rem; margin: 0 auto; }
#hero-eyebrow { color: var(--pl-gold); display: block; margin-bottom: 1.2rem; }
#hero-title {
  color: var(--pl-parch); font-size: clamp(2.3rem, 5.2vw, 4.3rem);
  font-weight: 700; line-height: 1.12;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}
#hero-rule { display: block; width: 88px; height: 3px; margin: 1.8rem auto 0; background: var(--pl-gold); }
#hero-scroll {
  position: absolute; left: 50%; bottom: 2.6rem; transform: translateX(-50%); z-index: 3;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pl-stone); background: var(--pl-gold);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.6);
  animation: pl-bob 1.8s ease-in-out infinite;
}
@keyframes pl-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* =========================================================================
   FEATURES — cartes chevauchant le hero, image à arc roman
   ========================================================================= */
#features { position: relative; z-index: 4; margin-top: -6rem; padding-bottom: 2rem; }
#feat-card {
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  border-radius: 6px; overflow: hidden;
  box-shadow: var(--pl-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#feat-card:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -34px rgba(17, 32, 47, 0.6); }
#feat-media { position: relative; overflow: hidden; border-radius: 180px 180px 4px 4px; margin: 0.5rem 0.5rem 0; }
#feat-media img { display: block; transition: transform 0.5s ease; aspect-ratio: 3 / 2; object-fit: cover; }
#feat-card:hover #feat-media img { transform: scale(1.06); }
#feat-index {
  position: absolute; top: 0.8rem; left: 0.8rem;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.1em;
  color: var(--pl-parch); background: rgba(26, 44, 63, 0.82);
  border: 1px solid var(--pl-gold); border-radius: 999px;
  width: 2.2rem; height: 2.2rem; display: inline-flex; align-items: center; justify-content: center;
}
#feat-title { color: var(--pl-stone); position: relative; padding-top: 0.6rem; }
#feat-title::before { content: ''; position: absolute; top: 0; left: 0; width: 34px; height: 2px; background: var(--pl-gold); }
#feat-text { color: var(--pl-muted); font-size: 1.12rem; }

/* =========================================================================
   BENVENUTO — éditorial à lettrine dorée + figure à arc roman
   ========================================================================= */
#benvenuto { background:
    linear-gradient(180deg, transparent, rgba(233, 222, 198, 0.5)),
    var(--pl-parch); }
#benvenuto-title { color: var(--pl-stone); font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
#benvenuto-lead { font-size: 1.3rem; color: #3a342b; }
#benvenuto-lead::first-letter {
  float: left; font-family: 'Cinzel', serif; font-weight: 700;
  font-size: 4.2rem; line-height: 0.82; color: var(--pl-gold-deep);
  margin: 0.35rem 0.7rem 0 0;
}
#benvenuto-figure {
  position: relative; overflow: hidden;
  border-radius: 260px 260px 6px 6px;
  border: 1px solid var(--pl-border); box-shadow: var(--pl-shadow);
}
#benvenuto-figure img { display: block; width: 100%; }
#benvenuto-figure::after { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(243, 235, 218, 0.5); border-radius: 252px 252px 2px 2px; pointer-events: none; }
#benvenuto-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  text-align: center; padding: 2.2rem 1rem 0.9rem;
  font-family: 'Cinzel', serif; font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pl-parch);
  background: linear-gradient(180deg, transparent, rgba(17, 32, 47, 0.78));
}

/* =========================================================================
   PAGES INTERNES — bandeau hero + corps d'article
   ========================================================================= */
#page-hero {
  position: relative; overflow: hidden;
  min-height: 46vh; display: flex; align-items: flex-end;
  padding: 8rem 0 3rem;
  background: var(--pl-stone-deep);
}
#page-hero-img { object-fit: cover; z-index: 0; opacity: 0.55; }
#page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(17, 32, 47, 0.55), rgba(17, 32, 47, 0.86));
}
#page-hero .container { z-index: 2; }
#page-hero #hero-eyebrow { color: var(--pl-gold); display: block; margin-bottom: 0.8rem; }
#page-title {
  color: var(--pl-parch); font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.2rem); text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}
#page-hero #hero-rule { display: block; width: 80px; height: 3px; margin: 1.4rem 0 0; background: var(--pl-gold); }

#page-body { background:
    linear-gradient(180deg, transparent, rgba(233, 222, 198, 0.45)),
    var(--pl-parch); }
#page-body p { font-size: 1.22rem; color: #3a342b; }
/* lettrine dorée sur le 1er paragraphe (signature) */
#page-lead::first-letter {
  float: left; font-family: 'Cinzel', serif; font-weight: 700;
  font-size: 4rem; line-height: 0.82; color: var(--pl-gold-deep);
  margin: 0.32rem 0.7rem 0 0;
}

/* Eventi — calendario */
#cal-title { color: var(--pl-stone); font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: 0.04em; }
#cal-list { border-top: 2px solid var(--pl-gold); }
#cal-row { padding: 1.1rem 0.2rem; border-bottom: 1px solid var(--pl-border); }
#cal-data {
  flex: 0 0 auto; min-width: 12rem;
  font-family: 'Cinzel', serif; font-weight: 600; color: var(--pl-gold-deep);
  letter-spacing: 0.04em;
}
#cal-evento { font-size: 1.3rem; color: var(--pl-ink); }
#cal-link { color: var(--pl-stone); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
#cal-link:hover { color: var(--pl-gold-deep); }
#page-cta { font-style: italic; color: var(--pl-muted); }
#page-cta a { color: var(--pl-stone); font-weight: 600; }
#page-cta a:hover { color: var(--pl-gold-deep); }

/* Legenda — sous-titre */
#legend-sub {
  color: var(--pl-stone); font-size: clamp(1.4rem, 3vw, 2rem);
  position: relative; padding-bottom: 0.8rem;
}
#legend-sub::after { content: ''; position: absolute; left: 0; bottom: 0; width: 60px; height: 3px; background: var(--pl-gold); }

/* =========================================================================
   SEO (bas de page)
   ========================================================================= */
#seo { background: var(--pl-parch-2); border-top: 1px solid var(--pl-border); border-bottom: 1px solid var(--pl-border); }
#seo h2 { color: var(--pl-stone); font-size: 1.4rem; }
#seo p { color: var(--pl-muted); }

/* =========================================================================
   FOOTER — bandeau pierre + or
   ========================================================================= */
footer#colophon {
  background: linear-gradient(180deg, var(--pl-stone-2), var(--pl-stone-deep)) !important;
  border-top: 2px solid var(--pl-gold);
}
#footer-logo { border-radius: 6px; border: 1px solid rgba(193, 154, 62, 0.5); }
#footer-name { color: var(--pl-parch); font-family: 'Cinzel', serif; letter-spacing: 0.03em; }
#footer-tag { color: #b9c4d0; font-style: italic; }
#footer-liens a { font-family: 'Cinzel', serif; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pl-gold) !important; }
#footer-liens a:hover { color: #fff !important; }
#footer-rule { border-top-color: rgba(243, 235, 218, 0.16); opacity: 1; }
#copyright { color: #9fb0bf; font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.06em; }

/* =========================================================================
   ACCESSIBILITÉ & RESPONSIVE
   ========================================================================= */
a:focus-visible, .btn:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--pl-gold); outline-offset: 3px; }
@media (max-width: 991.98px) {
  #hero { min-height: 76vh; padding: 5rem 0 7rem; }
  #features { margin-top: -4rem; }
  #benvenuto-figure { border-radius: 160px 160px 6px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  #feat-card:hover, #feat-card:hover #feat-media img { transform: none; }
}
