/* ╔══════════════════════════════════════════════════════════════════╗
   ║  v2.css — Maison Saint-Hospice de Nice · Pénitents Rouges       ║
   ║  Feuille de styles partagée (navigation, footer, composants)     ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ── VARIABLES ── */
:root {
  --bg:        #f2ede8;
  --bg-card:   #ede8e2;
  --bg-hero:   #1a1410;
  --text:      #1a1208;
  --muted:     #7a7168;
  --accent:    #ad2d2d;
  --border:    rgba(26,18,8,0.12);
  --font:      'Cormorant Garamond', Georgia, serif;
  --container: 1120px;
  --r-card:    12px;
  --r-btn:     100px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  animation: page-fadein 0.22s ease both;
}
@keyframes page-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) { .wrap { padding: 0 24px; } }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ════════════════════════════════
   NAVIGATION
════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 68px;
  display: flex;
  align-items: center;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo-text { font-size: 15px; letter-spacing: -0.01em; line-height: 1.3; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 6px;
  display: block;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links > li > a:hover { color: var(--text); background: rgba(26,18,8,0.05); }
.nav-links > li > a.has-drop::after { content: ' ▾'; font-size: 9px; opacity: 0.5; }

/* Dropdown */
.nav-drop {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 6px 6px; /* top padding = invisible bridge height */
  min-width: 240px;
  box-shadow: 0 8px 28px rgba(26,18,8,0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 300;
}
/* Transparent bridge that fills the gap so the mouse never exits the li */
.nav-drop::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
}
.nav-links > li:hover > .nav-drop,
.nav-links > li:focus-within > .nav-drop { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-drop a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s;
}
.nav-drop a:hover { background: var(--bg-card); }
.nav-drop-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.nav-drop-sep { height: 1px; background: var(--border); margin: 4px 0; }
.nav-drop-ext { color: var(--muted) !important; font-size: 13px !important; }

.nav-cta {
  background: var(--text) !important;
  color: var(--bg) !important;
  border-radius: 100px !important;
  padding: 7px 18px !important;
  font-size: 14px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-left: 6px;
}
.nav-cta:hover { opacity: 0.82 !important; background: var(--text) !important; color: var(--bg) !important; }

.nav-burger {
  display: none;
  background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--text);
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

/* Mobile overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  padding: 84px 24px 40px;
  overflow-y: auto;
}
.nav-mobile.open { display: block; }
.nav-mobile-close {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; color: var(--text);
  z-index: 10;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
.nav-mobile-group { margin-bottom: 28px; }
.nav-mobile-group h4 {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.nav-mobile-group a {
  display: block; font-size: 18px;
  color: var(--text); text-decoration: none;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.nav-mobile-group a.ext { color: var(--muted); font-size: 16px; }

/* ════════════════════════════════
   LABEL / EYEBROW
════════════════════════════════ */
.label {
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.btn-filled {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 12px 28px; border-radius: var(--r-btn);
  font-family: var(--font); font-size: 14px;
  text-decoration: none; border: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.07em;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-filled:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; text-decoration: none; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: #fff;
  padding: 12px 28px; border-radius: var(--r-btn);
  border: 1px solid rgba(255,255,255,0.45);
  font-family: var(--font); font-size: 14px;
  text-decoration: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.07em;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); color: #fff; text-decoration: none; transform: translateY(-1px); }

.btn-outline-dark {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  padding: 10px 22px; border-radius: var(--r-btn);
  border: 1px solid var(--border);
  font-family: var(--font); font-size: 14px;
  text-decoration: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.07em;
  transition: background 0.15s, transform 0.15s;
}
.btn-outline-dark:hover { background: rgba(26,18,8,0.06); transform: translateY(-1px); color: var(--text); text-decoration: none; }

/* ════════════════════════════════
   PAGE HERO (pages internes)
════════════════════════════════ */
.page-hero {
  position: relative;
  padding: 148px 0 80px;
  background: var(--bg-hero) center / cover no-repeat;
  overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(10,7,5,0.62);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero .label { color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.page-hero h1 {
  font-size: clamp(28px, 4.5vw, 54px);
  color: #fff; line-height: 1.2;
  letter-spacing: -0.02em; max-width: 820px;
}
.page-hero p.hero-sub {
  font-size: 18px; color: rgba(255,255,255,0.72);
  max-width: 600px; line-height: 1.65; margin-top: 18px;
}

/* ════════════════════════════════
   PAGE CONTENT
════════════════════════════════ */
.page-content { padding: 80px 0 100px; }

/* Section avec titre et texte */
.content-section {
  max-width: 820px;
  margin: 0 auto 72px;
}
.content-section h2 {
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.25; letter-spacing: -0.01em;
  margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.content-section p {
  font-size: 17px; color: var(--text);
  line-height: 1.72; margin-bottom: 18px;
}
.content-section p:last-child { margin-bottom: 0; }
.content-section strong { color: var(--text); }
.content-section em { font-style: normal; }
.content-section ul, .content-section ol {
  padding-left: 1.4rem; margin-bottom: 18px;
}
.content-section li { font-size: 17px; line-height: 1.7; margin-bottom: 6px; }
.content-section blockquote {
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  margin: 28px 0;
}
.content-section blockquote p { font-size: 18px; }
.content-section blockquote cite {
  font-size: 14px; color: var(--muted); font-style: normal;
  display: block; margin-top: 8px;
}

/* Sous-section avec titre h3 */
.sub-section { margin-bottom: 44px; padding-bottom: 44px; border-bottom: 1px solid var(--border); }
.sub-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.sub-section h3 { font-size: clamp(18px, 2.2vw, 26px); margin-bottom: 16px; }
.sub-section p { font-size: 17px; line-height: 1.72; margin-bottom: 14px; }
.sub-section p:last-child { margin-bottom: 0; }
.sub-section ul, .sub-section ol { padding-left: 1.4rem; margin-bottom: 14px; }
.sub-section li { font-size: 17px; line-height: 1.7; margin-bottom: 6px; }

/* Carte / boîte */
.content-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 32px 36px; margin-bottom: 28px;
}
.content-card h3 { font-size: 22px; margin-bottom: 18px; }
.content-card p { font-size: 17px; color: var(--text); line-height: 1.72; margin-bottom: 14px; }
.content-card p:last-child { margin-bottom: 0; }
.content-card ul, .content-card ol { padding-left: 1.4rem; margin-bottom: 14px; }
.content-card li { font-size: 17px; line-height: 1.7; margin-bottom: 6px; }
.content-card em { font-style: normal; }

/* Map embed */
.map-wrap {
  border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden; margin-bottom: 40px;
}
.map-wrap iframe { display: block; width: 100%; height: 420px; border: none; }

/* Grille équipe (chanoines) */
.personnes-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 48px;
}
@media (max-width: 768px) { .personnes-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .personnes-grid { grid-template-columns: 1fr; } }
.personne {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 28px 20px; text-align: center;
}
.personne img {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--accent); margin: 0 auto 16px;
}
.personne-nom { font-size: 17px; color: var(--text); margin-bottom: 8px; }
.personne-titre { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ════════════════════════════════
   PROGRAMME GRID (partagé)
════════════════════════════════ */
.programme-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-bottom: 48px;
}
@media (max-width: 900px) { .programme-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .programme-grid { grid-template-columns: repeat(2, 1fr); } }
.prog-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 16px 14px;
}
.prog-jour { margin-bottom: 14px; display: block; font-size: 11px; }
.prog-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.prog-item:last-child { border-bottom: none; }
.prog-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prog-heure { color: var(--text); min-width: 38px; font-size: 14px; }
.prog-lieu { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Légende couleurs */
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Iframe calendrier */
.cal-wrap {
  border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden; margin-bottom: 24px;
}
.cal-head {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.cal-head-title { font-size: 15px; color: var(--text); }
.cal-head-sub { font-size: 13px; color: var(--muted); }
.cal-wrap iframe { display: block; width: 100%; border: none; }

/* ════════════════════════════════
   FAQ ACCORDION (partagé)
════════════════════════════════ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left;
  background: none; border: none; padding: 20px 0;
  font-family: var(--font); font-size: 17px;
  color: var(--text); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; transition: color 0.15s;
}
.faq-q:hover { color: var(--muted); }
.faq-plus {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-family: monospace; color: var(--muted);
  transition: transform 0.25s, background 0.2s;
}
.faq-item.open .faq-plus { transform: rotate(45deg); background: var(--text); color: var(--bg); border-color: var(--text); }
.faq-a { display: none; padding: 0 0 20px; font-size: 16px; color: var(--muted); line-height: 1.7; }
.faq-item.open .faq-a { display: block; }
.faq-a a { color: var(--text); }
.faq-a ul { padding-left: 1.3rem; margin-top: 8px; }
.faq-a li { margin-bottom: 4px; }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .nav-logo { margin-bottom: 14px; display: inline-flex; }
.footer-brand p { font-size: 15px; color: var(--muted); line-height: 1.65; }
.footer-brand .icrsp-logo { margin-top: 20px; height: 56px; width: auto; }
.footer-col h4 {
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 15px; color: var(--text);
  text-decoration: none; margin-bottom: 10px; transition: color 0.15s;
}
.footer-col a:hover { color: var(--muted); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  font-size: 13px; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}

/* ════════════════════════════════
   SCROLL REVEAL ANIMATIONS
════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.62s cubic-bezier(0.22,1,0.36,1),
              transform 0.62s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* Fade only variant (no Y movement) */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.reveal-fade.visible { opacity: 1; }

/* ════════════════════════════════
   EMOJI → TEXT RENDERING
════════════════════════════════ */
.nav-drop-icon,
.hero-badge span:first-child,
.nav-burger,
.nav-mobile-close,
.faq-plus {
  font-variant-emoji: text;
  -webkit-font-variant-emoji: text;
}

/* ════════════════════════════════
   RESPONSIVE FIXES — MOBILE
════════════════════════════════ */

/* Nav logo : tronquer texte sur petit écran */
@media (max-width: 400px) {
  .nav-logo-text { font-size: 13px; }
  .nav-logo img { height: 36px; }
}

/* Programme grid : 1 col sur très petit */
@media (max-width: 400px) {
  .programme-grid { grid-template-columns: 1fr; }
}

/* Hero badges / boutons : stack vertical sur petit écran */
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn-filled,
  .hero-ctas .btn-outline { width: 100%; justify-content: center; }
}

/* Sections padding réduit sur mobile */
@media (max-width: 480px) {
  .section-about,
  .section-apostolat,
  .section-actu,
  .section-reflexions,
  .section-faq { padding: 60px 0; }
  .page-content { padding: 48px 0 60px; }
  .page-hero { padding: 120px 0 60px; }
}

/* Grille reflexions / FAQ : gap réduit */
@media (max-width: 480px) {
  .reflexions-inner,
  .faq-inner { gap: 32px; }
}

/* Soutenir : padding adapté */
@media (max-width: 480px) {
  .soutenir-body { padding: 28px 20px; }
  .soutenir-btns { flex-direction: column; }
  .soutenir-btns .btn-filled,
  .soutenir-btns .btn-outline { width: 100%; justify-content: center; }
}

/* Contact grid : 1 col sur mobile */
@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr !important; }
}

/* Calendrier iframe : hauteur réduite mobile */
@media (max-width: 600px) {
  .cal-wrap iframe { height: 400px; }
  .map-wrap iframe { height: 300px; }
}

/* Footer : espacement réduit */
@media (max-width: 480px) {
  .footer { padding: 40px 0 28px; }
  .footer-inner { gap: 28px; margin-bottom: 32px; }
  .footer-brand .icrsp-logo { height: 44px; }
}

/* Actu cards : image max height mobile */
@media (max-width: 480px) {
  .actu-card-img { max-height: 200px; object-fit: cover; }
}

/* ════════════════════════════════
   OVERFLOW / WORD-WRAP GLOBAL
════════════════════════════════ */
.content-card,
.content-section,
.prog-card,
.apost-card,
.reflex-card,
.actu-card,
.personne,
.faq-a,
blockquote {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.content-card p,
.content-section p,
.content-section li {
  overflow-wrap: break-word;
  word-break: break-word;
}
/* Prog items : texte lieu ne doit pas tronquer sur mobile */
@media (max-width: 600px) {
  .prog-lieu { white-space: normal; }
  .prog-item { flex-wrap: wrap; }
}

/* Carte Messes + Adresse (chapelle, gesu, cannes) */
.messe-col {
  flex: 1 1 250px;
  min-width: 0;
}
.adresse-col {
  flex: 1 1 200px;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}
@media (max-width: 600px) {
  .adresse-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }
  .content-card { padding: 24px 20px; }
}
