@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Indie+Flower&display=swap');

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

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
}

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  background: var(--bg-color);
  box-shadow: var(--shadow);
  z-index: 100;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Indie Flower', cursive;
  font-size: 1.45rem;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.burger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: 0.3s ease;
}

/* ── HOME HERO ── */
.home-hero {
  min-height: calc(100vh - 70px);
  background-image:
    linear-gradient(135deg, rgba(44,62,80,0.78) 0%, rgba(52,152,219,0.55) 100%),
    url('../images/ecrins.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  color: white;
}

.home-hero-content h1 {
  font-family: 'Indie Flower', cursive;
  font-size: 5.5rem;
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.hero-tagline {
  font-size: 1.4rem;
  font-weight: 300;
  opacity: 0.9;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  opacity: 0.7;
  font-size: 0.9rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── PAGE HERO (sous-pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 4.5rem 2rem;
  text-align: center;
  color: white;
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.6rem;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto;
}

/* ── SECTIONS ── */
.section { padding: 5rem 2rem; }
.section--light { background: var(--bg-light); }
.section--white { background: var(--bg-color); }

.container { max-width: 900px; margin: 0 auto; }
.container--wide { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

/* ── DÉFINITION ── */
.definition-block {
  background: white;
  border-left: 4px solid var(--secondary-color);
  padding: 2rem 2.5rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.9;
}

.handicap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.handicap-card {
  background: white;
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.handicap-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.handicap-card h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.handicap-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ── HISTOIRE ── */
.story-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.story-image { flex: 0 0 260px; }

.story-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: var(--shadow-hover);
  object-fit: cover;
}

.story-text {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.9;
}

.story-text p + p { margin-top: 1.2rem; }
.story-text strong { color: var(--primary-color); }

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0; bottom: 0;
  width: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 50px);
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 50px);
}

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 80px;
  background: white;
  border: 4px solid var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--primary-color);
  z-index: 1;
  text-align: center;
  line-height: 1.3;
}

.timeline-content {
  background: white;
  padding: 1.5rem 1.8rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 340px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.timeline-item:nth-child(1) .timeline-content { background: #f5d5e8; }
.timeline-item:nth-child(2) .timeline-content { background: #fff9d5; }
.timeline-item:nth-child(3) .timeline-content { background: #d5e8f5; }
.timeline-item:nth-child(4) .timeline-content { background: #d5f5e8; }
.timeline-item:nth-child(5) .timeline-content { background: #f5ead5; }

.timeline-content h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.65;
}

.btn-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 1px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.btn-link:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ── DON PAGE ── */
.don-intro {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}

.don-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

.don-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid var(--secondary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.don-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.don-card .don-icon { font-size: 3rem; margin-bottom: 1rem; }

.don-card h3 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.don-card .price {
  font-size: 3rem;
  font-weight: 900;
  color: var(--secondary-color);
  margin: 0.8rem 0;
  line-height: 1;
}

.don-card .price span { font-size: 1.2rem; font-weight: 400; }

.don-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 2rem;
  flex: 1;
}

.btn-don {
  display: inline-block;
  padding: 1rem 2.2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(52,152,219,0.3);
}

.btn-don:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52,152,219,0.45);
}

/* ── PROJETS ── */
.projet-group-title {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--secondary-color);
}

.projet-group-title:first-of-type { margin-top: 0; }

.projet-card {
  background: white;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--secondary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projet-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.projet-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.year-badge {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.status-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.projet-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.7rem;
}

.projet-card p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 0.98rem;
}

.projet-card ul {
  margin-top: 0.8rem;
  padding-left: 1.5rem;
  color: var(--text-light);
  line-height: 1.9;
  font-size: 0.95rem;
}

/* ── CONTACT ── */
.contact-block {
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}

.contact-block p {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(44,62,80,0.3);
}

.contact-email-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52,152,219,0.4);
}

/* ── FOOTER ── */
.footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2.5rem 2rem;
}

.footer p { opacity: 0.85; font-size: 0.95rem; margin-bottom: 0.4rem; }
.footer a { color: var(--secondary-color); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── FADE IN ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 70px; right: 0; bottom: 0;
    width: 260px;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    align-items: flex-start;
    gap: 1.5rem;
    z-index: 99;
  }

  .nav.open { display: flex; }
  .burger { display: flex; }

  .home-hero-content h1 { font-size: 3.2rem; }
  .hero-tagline { font-size: 1.1rem; }

  .story-layout { flex-direction: column; }
  .story-image { flex: none; width: 100%; max-width: 260px; margin: 0 auto; }

  .timeline::before { left: 30px; }

  .timeline-item,
  .timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 85px;
  }

  .timeline-year { left: 30px; width: 60px; height: 60px; font-size: 0.72rem; }
  .timeline-content { max-width: 100%; }

  .page-hero h1 { font-size: 1.9rem; }
  .section-title { font-size: 1.75rem; }
  .don-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .home-hero-content h1 { font-size: 2.5rem; }
  .handicap-grid { grid-template-columns: 1fr; }
}
