/* ─────────────────────────────────────────────────────────────
   Café des Générations — style.css
   Inter + Playfair Display + teal identity
   Single stylesheet, no framework.
   ───────────────────────────────────────────────────────────── */

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

:root {
  --brown:         #0A9396;
  --brown-dark:    #005F73;
  --brown-light:   #94D2BD;
  --cream:         #F5FAFA;
  --cream-dark:    #EDF5F5;
  --cream-darker:  #D8EDED;
  --text:          #1D1D1F;
  --text-light:    #636366;
  --text-faded:    #8E8E93;
  --border:        #C8D8D8;
  --green:         #0A9396;
  --green-dark:    #005F73;
  --white:         #FFFFFF;
  --shadow:        rgba(0, 95, 115, 0.08);
  --shadow-strong: rgba(0, 95, 115, 0.15);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --radius: 8px;
  --radius-lg: 12px;
  --container-max: 1100px;
}

html {
  scroll-behavior: smooth;
  background: var(--brown-dark);
  -webkit-text-size-adjust: 100%;
}

/* iOS safe area — no white gaps */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0);
  background: var(--brown-dark);
  z-index: 9999;
}
body::after {
  content: '';
  display: block;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: env(safe-area-inset-bottom, 0);
  background: var(--brown-dark);
  z-index: 9999;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--brown);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.8rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.4rem; font-family: var(--font-body); font-weight: 600; color: var(--brown-dark); }

p { margin-bottom: 1rem; }
strong { color: var(--brown-dark); font-weight: 600; }
a { color: var(--brown); text-decoration: none; }
a:hover { color: var(--brown-dark); text-decoration: underline; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Candidacy banner ─────────────────────────────── */
.candidacy-banner {
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.candidacy-banner strong {
  color: var(--white);
  font-weight: 700;
  margin-right: 0.3rem;
}

/* ─── Hero ─────────────────────────────── */
.hero {
  background: linear-gradient(180deg, rgba(0,95,115,0.85) 0%, rgba(10,147,150,0.75) 100%), url('images/hero-intergenerational.jpg') center/cover no-repeat;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
  color: var(--white);
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: var(--container-max);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.topnav .brand {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
}

.topnav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.topnav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topnav a:hover {
  color: var(--white);
  text-decoration: none;
}

.hero-content {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  text-align: center;
}

.hero-content h1 {
  margin-bottom: 0.3rem;
  color: var(--white);
}

.hero-content .subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
}

.hero-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--brown-light);
  max-width: 700px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  line-height: 1.4;
}

.hero-lede {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.92);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.hero-lede strong {
  color: var(--white);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--brown);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brown-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--brown);
}

.btn-ghost:hover {
  background: var(--brown);
  color: var(--white);
  text-decoration: none;
}

/* Hero-specific button overrides for dark background */
.hero .btn-primary {
  background: var(--white);
  color: var(--brown-dark);
}

.hero .btn-primary:hover {
  background: var(--cream);
  color: var(--brown-dark);
}

.hero .btn-ghost {
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.hero .btn-ghost:hover {
  background: var(--white);
  color: var(--brown-dark);
  border-color: var(--white);
}

.hero-meta {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  margin-top: 1.5rem;
}

.hero-meta strong {
  color: var(--white);
}

/* ─── Sections ─────────────────────────────── */
.section {
  padding: 5rem 0;
}

.section-light {
  background: var(--cream-dark);
}

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-lede {
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 780px;
  margin: 0 auto 3rem;
}

.section-closer {
  text-align: center;
  font-size: 1.02rem;
  color: var(--text);
  max-width: 720px;
  margin: 2rem auto 0;
}

/* ─── Section image breaks (parallax) ─────────────────── */
.section-break {
  height: 250px;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  position: relative;
}

.section-break::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 95, 115, 0.3);
}

.section-break--dune   { background-image: url('images/nature-dune-sunset.jpg'); }
.section-break--cafe   { background-image: url('images/cafe-friends.jpg'); }

/* ─── Section with forest background ──────────────────── */
.section-forest {
  background: url('images/pine-forest.jpg') center / cover no-repeat;
  position: relative;
}
.section-forest::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(237, 245, 245, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 0;
}
.section-forest > .container { position: relative; z-index: 1; }

/* ─── Inline section images ──────────────────────────── */
.section-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

/* ─── Photo credits ──────────────────────────────────── */
.photo-credits {
  font-size: 0.75rem;
  color: rgba(245, 250, 250, 0.5);
  margin-top: 0.8rem;
}

/* ─── Stats (constat) ─────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0 2rem;
}

.stat {
  background: var(--white);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--brown);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.5;
}

.stat-label .source {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faded);
  margin-top: 0.3rem;
  font-style: italic;
}

/* ─── Two columns (solution) ─────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

.two-col h3 {
  color: var(--brown);
  margin-bottom: 1rem;
}

.two-col ul {
  list-style: none;
}

.two-col li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

.two-col li::before {
  content: "\00B7";
  position: absolute;
  left: 0.5rem;
  color: var(--brown);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
}

/* ─── Zones grid (lieu) ─────────────────────────────── */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.zone {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}

.zone h4 {
  color: var(--brown-dark);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.zone p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.zone-surface {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--brown);
  font-weight: 600;
}

.note {
  font-size: 0.88rem;
  color: var(--text-faded);
  font-style: italic;
}

/* ─── Tracks (ambassadeurs) ─────────────────────────────── */
.tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

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

.track {
  background: var(--cream-dark);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--brown);
}

.track h3 {
  color: var(--brown-dark);
  margin-bottom: 0.3rem;
}

.track-hours {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--green-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

.track p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.modules {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.modules h3 {
  margin-bottom: 1.5rem;
  color: var(--brown-dark);
}

.modules ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.modules li {
  margin-bottom: 0.7rem;
  color: var(--text);
  padding-left: 0.3rem;
}

.modules-note {
  font-size: 0.92rem;
  color: var(--text-light);
  background: var(--cream-darker);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--green);
  margin-bottom: 0;
}

/* ─── Budget ─────────────────────────────── */
.budget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 800px) {
  .budget-grid { grid-template-columns: 1fr; }
}

.budget-block {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.budget-block h3 {
  color: var(--brown-dark);
  margin-bottom: 1rem;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.budget-table td {
  padding: 0.55rem 0.3rem;
  border-bottom: 1px solid var(--border);
}

.budget-table td:first-child {
  color: var(--text);
}

.budget-table td:nth-child(2) {
  font-family: var(--font-heading);
  color: var(--brown);
  font-weight: 600;
  text-align: right;
}

.budget-table .pct {
  text-align: right;
  color: var(--text-faded);
  font-size: 0.82rem;
  padding-left: 0.8rem;
}

.budget-table tr.total td {
  border-top: 2px solid var(--brown);
  border-bottom: none;
  padding-top: 0.8rem;
  font-size: 1rem;
}

.apport-nature {
  font-size: 0.92rem;
  background: var(--cream-darker);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--green);
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ─── Documents (3x2 grid → 2x3 tablet → 1 col mobile) ─── */
.docs-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 2rem 0;
}

.doc-tile {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brown);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.doc-tile:hover {
  background: var(--cream-dark);
  border-color: var(--brown);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
  text-decoration: none;
  color: var(--text);
}

.doc-tile h3 { color: var(--brown-dark); font-size: 1.1rem; margin-bottom: 0.4rem; }
.doc-tile p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0; line-height: 1.5; flex-grow: 1; }
.doc-tile p a { color: var(--brown); text-decoration: underline; }
.doc-dl { font-family: var(--font-heading); font-size: 0.78rem; color: var(--brown); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-top: 0.8rem; }

.doc-tile--dual { border-top-color: var(--brown-dark); }
.doc-dual-links { display: flex; gap: 0.8rem; margin-top: 0.8rem; }
.doc-dual-links a {
  display: inline-block; padding: 0.4rem 0.9rem; border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--brown); color: var(--brown); transition: all 0.15s ease;
}
.doc-dual-links a:hover { background: var(--brown); color: var(--white); text-decoration: none; }

@media (max-width: 900px) { .docs-grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .docs-grid-cards { grid-template-columns: 1fr; } }

.docs-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-faded);
  font-style: italic;
  margin-top: 2rem;
}

/* ─── Support (fixed 2x2 grid for 4 items) ─────── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 820px;
}

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

.support-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.support-card h3 {
  color: var(--brown-dark);
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
}

.support-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1.2rem;
}

.support-card .btn-ghost {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  align-self: flex-start;
}

/* ─── Footer ─────────────────────────────── */
.footer {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 3rem 0 1.5rem;
  margin-top: 0;
}

.footer h3 {
  color: var(--cream);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.footer p {
  color: var(--cream-darker);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.footer a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgba(250, 246, 240, 0.3);
}

.footer a:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-meta {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--cream-darker);
  font-style: italic;
}

.footer-bottom {
  border-top: 1px solid rgba(250, 246, 240, 0.15);
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(250, 246, 240, 0.7);
}

/* ─── Responsive tweaks ─────────────────────────────── */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-content { margin-top: 2rem; }
  .hero-quote { font-size: 1.2rem; }
  .section { padding: 3.5rem 0; }
  .container { padding: 0 1.2rem; }
  .topnav ul { gap: 0.8rem; font-size: 0.85rem; }
  .topnav { padding: 1rem 1.2rem; }
}

/* Parallax breaks: disable fixed attachment on mobile (iOS doesn't support it) */
@media (max-width: 768px) {
  .section-break {
    height: 150px;
    background-attachment: scroll;
  }
}
