/* ==========================================================================
   Rencontre Brest — Design System
   Inspired by photo-de-mariage.com, adapted with Bretagne palette
   ========================================================================== */

/* ---------- 1. RESET & CUSTOM PROPERTIES ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }
table { border-collapse: collapse; width: 100%; }

:root {
  --bg: #F4F7FA;
  --bg-alt: #E8EDF3;
  --bg-dark: #1B2637;
  --bg-card: #FFFFFF;
  --primary: #2A6DB5;
  --primary-light: #A3C4E4;
  --primary-dark: #1A4A7A;
  --accent: #3D8EC9;
  --slate: #4A5568;
  --slate-light: #8D99A8;
  --txt: #1B2637;
  --txt-sec: #5A6577;
  --txt-light: #8D99A8;
  --txt-white: #F4F7FA;
  --border: #D4DCE6;
  --shadow-sm: 0 2px 8px rgba(27,38,55,.06);
  --shadow-md: 0 4px 20px rgba(27,38,55,.08);
  --shadow-lg: 0 8px 40px rgba(27,38,55,.12);
  --overlay: rgba(27,38,55,.55);
  --sp-xs: .5rem;
  --sp-sm: 1rem;
  --sp-md: 2rem;
  --sp-lg: 4rem;
  --sp-xl: 6rem;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: .3s;
  --max: 1220px;
}

/* ---------- 2. TYPOGRAPHY ---------- */
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--txt);
  background: var(--bg);
}
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', Georgia, serif; line-height: 1.15; color: var(--txt); }
h1 { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 700; margin-bottom: var(--sp-sm); max-width: 14ch; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 600; margin-bottom: var(--sp-sm); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); font-weight: 600; margin-bottom: var(--sp-xs); }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin-bottom: 1rem; color: var(--txt-sec); }
p, li { font-size: 1rem; }
ul { padding-left: 1.2rem; }
strong { color: var(--txt); font-weight: 600; }
blockquote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--txt);
  border-left: 3px solid var(--primary);
  padding: var(--sp-sm) var(--sp-md);
  margin: var(--sp-md) 0;
  background: var(--bg-alt);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.content-card a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: .18rem; }
.content-card a:hover { color: var(--primary); }

/* ---------- 3. LAYOUT ---------- */
.page-shell, .header-inner, .city-strip-inner, .hero-inner, .footer-grid { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

/* ---------- 4. READING PROGRESS BAR ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1001; width: 0; transition: width .1s linear;
}

/* ---------- 5. HEADER & NAVIGATION ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,247,250,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.logo { display: inline-flex; align-items: center; gap: .75rem; font-weight: 700; letter-spacing: .02em; }
.logo strong { color: var(--primary); }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: white; font-weight: 800; font-size: .9rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(42,109,181,.25);
}
.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav a {
  padding: .45rem .8rem; font-size: .88rem; font-weight: 500; color: var(--txt-sec);
  border-radius: var(--r-full); transition: all var(--dur) var(--ease); position: relative;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary-dark); background: rgba(42,109,181,.08); }
.main-nav a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--primary); border-radius: 1px;
}
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--txt); margin: 5px 0; border-radius: 2px; transition: all var(--dur) var(--ease); }

/* ---------- 6. CITY STRIP ---------- */
.city-strip {
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.city-strip::-webkit-scrollbar { display: none; }
.city-strip-inner { display: flex; gap: .25rem; padding: .55rem 0; white-space: nowrap; }
.city-strip a {
  padding: .3rem .7rem; font-size: .78rem; font-weight: 500;
  color: var(--txt-sec); border-radius: var(--r-full);
  transition: all var(--dur) var(--ease); flex-shrink: 0;
}
.city-strip a:hover, .city-strip a.active { background: var(--primary); color: #fff; }

/* ---------- 7. HERO SECTIONS ---------- */
.hero {
  position: relative; min-height: 75vh; display: flex; align-items: flex-end;
  isolation: isolate; overflow: hidden; background: var(--bg-dark);
}
.hero-image, .error-page img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,38,55,.08) 0%, rgba(27,38,55,.68) 100%),
              linear-gradient(90deg, rgba(27,38,55,.72) 0%, rgba(27,38,55,.15) 55%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 8rem 0 4rem; color: white; }
.hero-inner h1, .hero-inner p, .hero-inner a, .breadcrumbs, .breadcrumbs a { color: white; }
.hero-copy { max-width: 58ch; font-size: 1.08rem; }
.eyebrow {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .22em;
  font-weight: 800; opacity: .86; margin-bottom: 1rem; color: var(--primary-light);
}
.hero-inner .eyebrow { color: rgba(255,255,255,.8); }
.breadcrumbs { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; font-size: .88rem; margin-bottom: 1.2rem; opacity: .84; }
.crumb-sep { opacity: .65; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- 8. BUTTONS ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 1.4rem; border-radius: var(--r-full);
  font-weight: 700; font-size: .9rem; transition: all var(--dur) var(--ease);
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; box-shadow: 0 16px 30px rgba(42,109,181,.28);
}
.button-primary:hover { box-shadow: 0 20px 40px rgba(42,109,181,.35); }
.button-secondary {
  border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: white;
}
.button-secondary:hover { background: rgba(255,255,255,.15); }

/* ---------- 9. PAGE SHELL & CONTENT ---------- */
.page-shell { padding: 3rem 0 5rem; }

/* Highlights strip */
.highlights {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; margin-top: -3.5rem; margin-bottom: 2rem; position: relative; z-index: 2;
}
.highlight-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-md); backdrop-filter: blur(16px);
}
.highlight-card p { margin: 0; font-weight: 700; color: var(--txt); font-size: .92rem; }

/* Content card */
.content-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}
.content-section + .content-section { margin-top: 2.4rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* Panel (for blog articles) */
.panel {
  background: var(--bg-alt); border-left: 4px solid var(--primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-sm) var(--sp-md); margin: var(--sp-md) 0;
  font-size: .95rem; line-height: 1.7;
}
.panel strong { color: var(--primary-dark); }

/* Tables */
.table-wrap { overflow-x: auto; margin: var(--sp-md) 0; border-radius: var(--r-md); }
.content-table { width: 100%; border-collapse: collapse; min-width: 540px; font-size: .92rem; }
.content-table th {
  background: var(--bg-dark); color: var(--txt-white); padding: .85rem 1rem;
  text-align: left; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .5px;
}
.content-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); color: var(--txt-sec); }
.content-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.content-table tbody tr:hover { background: rgba(42,109,181,.04); }

/* ---------- 10. SECTIONS ---------- */
.story-grid-section { margin-top: 3rem; }
.intent-section, .faq-section { margin-top: 3rem; }
.meet-network-section { margin-top: 3rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.section-copy { max-width: 72ch; }

/* ---------- 11. INTENT GRID ---------- */
.intent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.intent-card {
  padding: 1.35rem; border-radius: var(--r-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: all var(--dur) var(--ease);
}
.intent-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--primary-light); }
.intent-label { display: block; font-weight: 800; color: var(--txt); margin-bottom: .45rem; }
.intent-copy { display: block; color: var(--txt-sec); font-size: .92rem; }

/* ---------- 12. STORY GRID (Cards) ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.story-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--dur) var(--ease);
}
.story-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.story-card img { width: 100%; height: 240px; object-fit: cover; transition: transform .6s var(--ease); }
.story-card:hover img { transform: scale(1.05); }
.story-content { padding: 1.25rem; }
.story-tag {
  font-size: .75rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--primary);
}
.story-content h3 { margin-top: .35rem; margin-bottom: .45rem; font-size: 1.15rem; }
.story-content p { font-size: .9rem; color: var(--txt-sec); margin-bottom: .6rem; }
.story-cta { display: inline-flex; margin-top: .4rem; font-weight: 800; color: var(--primary-dark); font-size: .88rem; }

/* ---------- 13. BLOG CARDS ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.blog-card {
  background: var(--bg-card); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--dur) var(--ease); border: 1px solid var(--border);
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.blog-card-img { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.blog-card:hover .blog-card-img img { transform: scale(1.06); }
.blog-card-badge {
  position: absolute; top: var(--sp-sm); left: var(--sp-sm);
  background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
  padding: .25rem .7rem; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: .5px;
}
.blog-card-body { padding: 1.15rem 1.35rem; }
.blog-card-body h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.blog-card-body p { font-size: .88rem; color: var(--txt-sec); margin-bottom: .6rem; }
.blog-card-meta { font-size: .78rem; color: var(--txt-light); display: flex; align-items: center; gap: .5rem; }

/* ---------- 14. MEET NETWORK ---------- */
.meet-network-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.meet-card {
  overflow: hidden; border-radius: var(--r-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: all var(--dur) var(--ease);
}
.meet-card:hover { box-shadow: var(--shadow-md); }
.meet-card-media { position: relative; }
.meet-card-media img { width: 100%; height: 250px; object-fit: cover; }
.meet-card-label {
  position: absolute; top: 1rem; left: 1rem;
  display: inline-flex; align-items: center; min-height: 30px;
  padding: 0 .8rem; border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.meet-card-body { padding: 1.25rem; }
.meet-card-title { margin: 0; color: var(--txt); font-weight: 800; font-size: 1.3rem; font-family: "Cormorant Garamond", serif; }
.meet-card-subtitle { margin: .15rem 0 .8rem; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-sec); }
.meet-card-text { margin-bottom: 1rem; }
.meet-card-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.meet-card-chips span {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 .7rem;
  border-radius: var(--r-full); background: var(--bg-alt); color: var(--txt-sec); font-size: .8rem;
}
.meet-card-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white !important; font-weight: 800; text-decoration: none !important;
  box-shadow: 0 12px 28px rgba(42,109,181,.2); transition: all var(--dur) var(--ease);
}
.meet-card-button:hover { transform: translateY(-1px); color: white !important; box-shadow: 0 16px 35px rgba(42,109,181,.3); }

/* ---------- 15. CTA BANNER ---------- */
.cta-banner {
  margin-top: 2.6rem; padding: 1.5rem 1.6rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}

/* ---------- 16. FAQ ACCORDION ---------- */
.faq-list { display: grid; gap: .7rem; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); transition: all var(--dur) var(--ease);
}
.faq-item[open] { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-item summary {
  cursor: pointer; list-style: none; font-weight: 700; color: var(--txt);
  padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1.2rem; color: var(--primary); font-weight: 400;
  transition: transform var(--dur) var(--ease); flex-shrink: 0; margin-left: 1rem;
}
.faq-item[open] summary::after { content: '-'; }
.faq-item p { margin: 0 1.25rem 1rem; font-size: .92rem; color: var(--txt-sec); line-height: 1.7; }

/* ---------- 17. GALLERY ---------- */
.gallery-masonry { column-count: 3; column-gap: var(--sp-sm); }
.gallery-masonry figure {
  break-inside: avoid; margin-bottom: var(--sp-sm); border-radius: var(--r-md);
  overflow: hidden; position: relative; cursor: pointer;
}
.gallery-masonry figure img { width: 100%; display: block; transition: transform .6s var(--ease); }
.gallery-masonry figure:hover img { transform: scale(1.04); }
.gallery-masonry figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff; padding: var(--sp-md) var(--sp-sm) var(--sp-sm);
  font-size: .85rem; opacity: 0; transition: opacity var(--dur) var(--ease);
}
.gallery-masonry figure:hover figcaption { opacity: 1; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-sm);
}
.gallery-grid figure { border-radius: var(--r-md); overflow: hidden; cursor: pointer; position: relative; }
.gallery-grid figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-grid figure:hover img { transform: scale(1.05); }

/* ---------- 18. FOOTER ---------- */
.site-footer { background: var(--bg-dark); color: var(--txt-white); padding: var(--sp-xl) 0 var(--sp-md); }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-lg); margin-bottom: var(--sp-lg);
}
.site-footer h2 { font-size: 1.1rem; color: var(--primary-light); font-family: "Manrope", sans-serif; margin-bottom: .9rem; }
.site-footer a, .site-footer p { display: block; color: rgba(244,247,250,.6); margin-bottom: .55rem; font-size: .88rem; transition: color var(--dur); }
.site-footer a:hover { color: var(--primary-light); }
.footer-logo { margin-bottom: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(244,247,250,.1); padding-top: var(--sp-md);
  text-align: center; font-size: .8rem; color: rgba(244,247,250,.4);
}

/* ---------- 19. BACK TO TOP ---------- */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
  background: var(--primary); color: #fff; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 1.1rem; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all var(--dur) var(--ease); z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ---------- 20. SCROLL ANIMATIONS ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 21. ERROR PAGE ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden; }
.error-page::after { content: ""; position: absolute; inset: 0; background: rgba(27,38,55,.64); }
.error-card {
  position: relative; z-index: 1; width: min(calc(100% - 2rem), 760px);
  padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--r-lg);
  background: rgba(255,255,255,.92); box-shadow: var(--shadow-lg);
}

/* ---------- 22. UTILITIES ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mt-1 { margin-top: var(--sp-xs); } .mt-2 { margin-top: var(--sp-sm); } .mt-3 { margin-top: var(--sp-md); } .mt-4 { margin-top: var(--sp-lg); }
.mb-1 { margin-bottom: var(--sp-xs); } .mb-2 { margin-bottom: var(--sp-sm); } .mb-3 { margin-bottom: var(--sp-md); } .mb-4 { margin-bottom: var(--sp-lg); }

/* ---------- 23. RESPONSIVE ---------- */
@media (max-width: 1040px) {
  .highlights, .story-grid, .footer-grid, .intent-grid, .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .main-nav {
    position: absolute; top: 72px; left: 1rem; right: 1rem;
    display: none; flex-direction: column; align-items: flex-start; gap: .6rem;
    padding: 1rem; border-radius: var(--r-lg);
    background: rgba(255,255,255,.98); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .main-nav a { padding: .6rem .8rem; width: 100%; }
  body.menu-open .main-nav { display: flex; }
  .hero { min-height: 65vh; }
  .highlights, .story-grid, .footer-grid, .intent-grid, .meet-network-grid, .blog-grid { grid-template-columns: 1fr; }
  .cta-banner, .section-heading { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }
  .gallery-masonry { column-count: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-image { animation: none; }
}
