/* ============================================================
   UTPLC — Un Tour Pour La Cause
   Design: minimal, clean, mobile-first
   ============================================================ */

:root {
  --c-black: #0a0a0a;
  --c-white: #ffffff;
  --c-accent: #e8390e;      /* red-orange */
  --c-accent-dark: #c22e0a;
  --c-grey-100: #f7f7f5;
  --c-grey-200: #ebebeb;
  --c-grey-400: #9e9e9e;
  --c-grey-600: #555555;
  --c-text: #1a1a1a;

  --font-body: "Inter", sans-serif;
  --font-display: "Playfair Display", serif;

  --nav-h: 64px;
  --radius: 4px;
  --shadow: 0 2px 16px rgba(0,0,0,.08);
  --transition: 0.2s ease;
  --max-w: 1200px;
  --max-w-narrow: 720px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--c-text); background: var(--c-white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }
.lead { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--c-grey-600); font-weight: 300; }

/* ── Utilities ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--max-w-narrow); }
.center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-muted { color: var(--c-grey-400); }
.text-sm { font-size: 0.875rem; }

/* ── Section ── */
.section { padding: 80px 0; }
.section--light { background: var(--c-grey-100); }
.section--accent { background: var(--c-black); color: var(--c-white); }
.section--cta { background: var(--c-accent); color: var(--c-white); }
.section--cta h2, .section--cta p { color: var(--c-white); }
.section--cta .btn-primary { background: var(--c-white); color: var(--c-accent); }
.section--cta .btn-primary:hover { background: var(--c-grey-100); }
.section--association { background: var(--c-grey-100); }

.section-title { font-family: var(--font-display); margin-bottom: 2rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem;
  transition: var(--transition); letter-spacing: 0.01em;
}
.btn-primary { background: var(--c-accent); color: var(--c-white); }
.btn-primary:hover { background: var(--c-accent-dark); }
.btn-secondary { background: transparent; color: var(--c-text); border: 2px solid var(--c-text); }
.btn-secondary:hover { background: var(--c-text); color: var(--c-white); }
.btn-text { color: var(--c-accent); font-weight: 600; padding: 0; }
.btn-text:hover { text-decoration: underline; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ── Nav ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-grey-200);
  transition: var(--transition);
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--c-accent); letter-spacing: -0.02em;
}
.nav-links {
  display: flex; list-style: none; gap: 8px; align-items: center;
}
.nav-links a {
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover { background: var(--c-grey-100); }
.nav-cta { background: var(--c-accent) !important; color: var(--c-white) !important; }
.nav-cta:hover { background: var(--c-accent-dark) !important; }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--c-text); transition: var(--transition); }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.03);
  transition: transform 0.1s linear;
}
.hero-bg--placeholder { background: linear-gradient(135deg, #1a1a1a 0%, #3d1c0a 100%); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,.6) 100%);
}
.hero-content {
  position: relative; z-index: 1; text-align: center;
  color: var(--c-white); padding: 0 24px; max-width: 800px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  margin-bottom: 1rem; text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin-bottom: 2rem; opacity: 0.9; font-weight: 300;
}
.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: 1.5rem; animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── Page Hero (sub-pages) ── */
.page-hero {
  position: relative; min-height: 60vh;
  display: flex; align-items: flex-end;
  padding-top: var(--nav-h); overflow: hidden;
}
.page-hero--short { min-height: 280px; }
.page-hero--no-img { background: var(--c-black); }
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.page-hero-content {
  position: relative; z-index: 1; width: 100%;
  padding: 48px 0; color: var(--c-white);
}
.page-hero-content h1 { font-family: var(--font-display); }
.page-hero-content time { font-size: 0.85rem; opacity: 0.7; display: block; margin-bottom: 8px; }
.page-hero--short .page-hero-content { color: var(--c-text); }
.page-hero--short:not(.page-hero--no-img) { background: var(--c-grey-100); }

/* ── Stats bar ── */
.stats-bar { background: var(--c-black); color: var(--c-white); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2rem; text-align: center; margin-bottom: 2rem; }
.stats-grid--event { margin-bottom: 0; }
.stat-value { display: block; font-size: clamp(1.8rem, 4vw, 3rem); font-family: var(--font-display); font-weight: 700; color: var(--c-accent); }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }

.progress-bar-wrap { display: flex; align-items: center; gap: 12px; }
.progress-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; }
.progress-bar-track--lg { height: 10px; background: var(--c-grey-200); }
.progress-bar-fill { height: 100%; background: var(--c-accent); border-radius: 99px; transition: width 0.8s ease; }
.progress-percent { font-size: 0.9rem; font-weight: 600; min-width: 3rem; text-align: right; }

/* ── Cards ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.card { display: block; padding: 2rem; border: 1px solid var(--c-grey-200); border-radius: var(--radius); transition: var(--transition); }
.card:hover { border-color: var(--c-accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.card--highlight { background: var(--c-accent); color: var(--c-white); border-color: var(--c-accent); }
.card--highlight h3, .card--highlight p { color: var(--c-white); }
.card-icon { font-size: 2rem; margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--c-grey-600); font-size: 0.9rem; }

/* ── Donors ── */
.donors-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.donor-card { padding: 1rem 1.25rem; border: 1px solid var(--c-grey-200); border-radius: var(--radius); }
.donor-card--sm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; font-size: 0.9rem; }
.donor-name { font-weight: 600; }
.donor-amount { color: var(--c-accent); font-weight: 700; }
.donor-bet { font-size: 0.8rem; background: var(--c-grey-100); padding: 2px 8px; border-radius: 99px; }
.donor-message { font-size: 0.875rem; color: var(--c-grey-600); margin-top: 4px; font-style: italic; }

.loading-dots { display: flex; gap: 6px; }
.loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--c-grey-200); animation: pulse 1.2s infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ── Donation page ── */
.donation-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: start; }
.donation-progress-card { background: var(--c-grey-100); padding: 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.donation-progress-card h3 { margin-bottom: 1rem; }
.progress-amounts { font-size: 1.5rem; font-weight: 700; margin-top: 12px; }
.progress-amounts .text-muted { font-size: 1rem; font-weight: 400; }
.progress-sub { color: var(--c-grey-600); font-size: 0.875rem; margin-top: 4px; }
.donors-sidebar-list { display: flex; flex-direction: column; gap: 8px; }

/* ── Forms ── */
.donation-form, .contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
  padding: 12px 14px; border: 1.5px solid var(--c-grey-200);
  border-radius: var(--radius); font-family: inherit; font-size: 1rem;
  transition: var(--transition); background: var(--c-white);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(232,57,14,.1);
}
.form-check { flex-direction: row; align-items: center; gap: 8px; }
.form-check input { width: auto; }
.form-hint { font-size: 0.8rem; color: var(--c-grey-400); }
.form-note { font-size: 0.8rem; color: var(--c-grey-400); text-align: center; }
.form-error { background: #fef2f2; color: #991b1b; padding: 12px; border-radius: var(--radius); font-size: 0.9rem; }

.amount-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.amount-btn {
  padding: 8px 20px; border: 2px solid var(--c-grey-200);
  border-radius: var(--radius); font-weight: 600; transition: var(--transition);
}
.amount-btn:hover, .amount-btn.active { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-white); }

.thanks-box { text-align: center; padding: 3rem; }
.thanks-icon { font-size: 3rem; color: var(--c-accent); margin-bottom: 1rem; background: #fef2f2; width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }

/* ── Gallery ── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gallery-item { cursor: pointer; overflow: hidden; border-radius: var(--radius); position: relative; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 12px; font-size: 0.8rem; color: white; background: linear-gradient(to top, rgba(0,0,0,.7), transparent); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.92); display: flex;
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox-content { max-width: 900px; width: 100%; text-align: center; }
.lightbox-content img { max-height: 80vh; width: auto; max-width: 100%; border-radius: var(--radius); }
.lightbox-content p { color: rgba(255,255,255,.7); margin-top: 12px; font-size: 0.9rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; color: white; font-size: 1.5rem;
  padding: 12px; opacity: 0.7; transition: var(--transition);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }

/* ── Blog ── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.blog-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-grey-200); transition: var(--transition); }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.blog-card-img-wrap { display: block; aspect-ratio: 16/9; overflow: hidden; }
.blog-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-card:hover .blog-card-img-wrap img { transform: scale(1.04); }
.blog-card-body { padding: 1.25rem; }
.blog-date { font-size: 0.8rem; color: var(--c-grey-400); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-card-title { font-size: 1.15rem; margin-bottom: 8px; }
.blog-card-title a:hover { color: var(--c-accent); }
.blog-excerpt { color: var(--c-grey-600); font-size: 0.9rem; margin-bottom: 12px; }

/* ── Route map ── */
.route-map { border-radius: var(--radius); max-width: 100%; margin: 0 auto; }

/* ── Association card ── */
.association-card { text-align: center; padding: 2rem; }
.association-logo { max-height: 80px; max-width: 200px; margin: 0 auto 1rem; }
.association-card h3 { margin-bottom: 1rem; }

/* ── Rich text ── */
.rich-text h2 { margin: 1.5em 0 0.75em; font-size: 1.5rem; }
.rich-text h3 { margin: 1.25em 0 0.5em; }
.rich-text p { margin-bottom: 1em; color: var(--c-grey-600); line-height: 1.75; }
.rich-text ul, .rich-text ol { margin: 1em 0 1em 1.5em; }
.rich-text li { margin-bottom: 0.4em; color: var(--c-grey-600); }
.rich-text a { color: var(--c-accent); text-decoration: underline; }
.rich-text blockquote { border-left: 3px solid var(--c-accent); padding-left: 1.25rem; color: var(--c-grey-600); font-style: italic; margin: 1.5em 0; }
.lead-text p { font-size: 1.1rem; line-height: 1.8; }

/* ── Footer ── */
.site-footer { background: var(--c-black); color: rgba(255,255,255,.6); padding: 48px 0 0; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px 48px; display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.footer-logo { font-family: var(--font-display); font-size: 1.5rem; color: var(--c-white); }
.footer-brand p { font-size: 0.875rem; margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { font-size: 0.875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--c-white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 24px; text-align: center; font-size: 0.8rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .donation-layout { grid-template-columns: 1fr; }
  .donation-sidebar { order: 2; }
  .donation-main { order: 1; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--c-white); padding: 16px;
    border-bottom: 1px solid var(--c-grey-200);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px; }
  .nav-burger { display: flex; }

  .section { padding: 56px 0; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .donors-list { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .amount-presets { gap: 6px; }
  .amount-btn { padding: 8px 14px; }
}
