/* ============================================================
   CHARDONNERET ÉLÉGANT — Design System
   Palette : Crème #F1FAEE | Rouge #E63946 | Or #FFB703
             Acier #457B9D | Marine #1D3557 | Teal #A8DADC
   ============================================================ */

:root {
  --cream:  #F1FAEE;
  --rouge:  #E63946;
  --or:     #FFB703;
  --acier:  #457B9D;
  --marine: #1D3557;
  --teal:   #A8DADC;
  --vert:   #2D6A4F;
  --blanc:  #FFFFFF;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--marine);
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-serif); line-height: 1.2; }
p { line-height: 1.75; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── NAVIGATION ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
#navbar.scrolled {
  background: rgba(29, 53, 87, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(241,250,238,0.85);
  transition: color 0.25s;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--or);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--or); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--or); }

/* Burger menu */
#burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
#burger span { display: block; width: 24px; height: 2px; background: var(--cream); border-radius: 2px; transition: all 0.3s; }
#burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger.open span:nth-child(2) { opacity: 0; }
#burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-menu {
  display: none; flex-direction: column; align-items: center; gap: 1.5rem;
  padding: 2rem; background: rgba(29, 53, 87, 0.98); position: absolute;
  top: 100%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,0.1);
}
#mobile-menu.open { display: flex; }
#mobile-menu a { font-size: 1.1rem; color: var(--cream); padding: 0.5rem 1rem; }

@media (max-width: 768px) { #burger { display: flex; } }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d2137 0%, #1D3557 40%, #2C4A6E 65%, #1a3a2a 100%);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,183,3,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 80%, rgba(230,57,70,0.06) 0%, transparent 50%);
}
.hero-bg-text {
  position: absolute;
  font-family: var(--font-serif);
  font-size: clamp(80px, 14vw, 200px);
  font-style: italic;
  color: rgba(255,255,255,0.03);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

/* Floating feathers */
.feather {
  position: absolute;
  width: 8px; height: 30px;
  background: linear-gradient(180deg, var(--or) 0%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0;
  animation: floatFeather var(--dur, 8s) var(--delay, 0s) infinite ease-in-out;
}
@keyframes floatFeather {
  0%   { transform: translateY(100vh) rotate(var(--rot, 15deg)) translateX(0); opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-20vh) rotate(calc(var(--rot, 15deg) + 30deg)) translateX(30px); opacity: 0; }
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #1D3557 0%, #2C4A6E 60%, #1a3a2a 100%);
  position: relative; overflow: hidden;
  text-align: center;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,183,3,0.07) 0%, transparent 70%);
}
.page-hero-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--or);
  background: rgba(255,183,3,0.12);
  border: 1px solid rgba(255,183,3,0.3);
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--cream); margin-bottom: 1rem; }
.page-hero p { font-size: 1.1rem; color: rgba(241,250,238,0.75); max-width: 600px; margin: 0 auto; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--rouge);
  color: var(--blanc);
  box-shadow: 0 4px 20px rgba(230,57,70,0.35);
}
.btn-primary:hover {
  background: #c0303b;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(230,57,70,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(241,250,238,0.5);
}
.btn-outline:hover {
  border-color: var(--or);
  color: var(--or);
}
.btn-or {
  background: var(--or);
  color: var(--marine);
}
.btn-or:hover { background: #e0a203; transform: translateY(-2px); }

/* ── AUDIO PLAYER ── */
.audio-player {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  max-width: 420px;
}
.audio-play-btn {
  width: 52px; height: 52px; flex-shrink: 0;
  background: var(--rouge);
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 15px rgba(230,57,70,0.4);
}
.audio-play-btn:hover { background: #c0303b; transform: scale(1.05); }
.audio-play-btn svg { width: 20px; height: 20px; fill: white; margin-left: 3px; }
.audio-play-btn.playing svg.icon-play { display: none; }
.audio-play-btn.playing svg.icon-pause { display: block !important; }
.audio-progress { flex: 1; }
.audio-label { font-size: 0.8rem; color: rgba(241,250,238,0.7); margin-bottom: 0.4rem; }
.audio-title { font-size: 0.95rem; font-weight: 600; color: var(--cream); margin-bottom: 0.5rem; }
.progress-bar {
  height: 4px; background: rgba(255,255,255,0.2);
  border-radius: 999px; cursor: pointer; position: relative;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--or);
  border-radius: 999px; transition: width 0.1s linear;
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute;
  right: -5px; top: -4px;
  width: 12px; height: 12px;
  background: var(--or);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,183,3,0.6);
}
.audio-time { font-size: 0.75rem; color: rgba(241,250,238,0.5); margin-top: 0.3rem; }

/* Audio player variant (light) */
.audio-player-light {
  background: var(--blanc);
  border: 1px solid rgba(29,53,87,0.1);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.audio-player-light .audio-label { color: var(--acier); }
.audio-player-light .audio-title { color: var(--marine); }
.audio-player-light .progress-bar { background: rgba(29,53,87,0.1); }
.audio-player-light .audio-time { color: rgba(29,53,87,0.4); }

/* ── STAT COUNTER ── */
.counter-section {
  background: var(--marine);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.counter-section::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,183,3,0.04) 0%, transparent 50%, rgba(230,57,70,0.04) 100%);
}
.stat-card {
  text-align: center;
  padding: 2rem;
}
.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--or);
  display: block;
  line-height: 1;
}
.stat-unit {
  font-size: 1.5rem;
  color: var(--rouge);
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(241,250,238,0.65);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}
.stat-divider {
  width: 1px; background: rgba(255,255,255,0.1);
  margin: 0 auto;
}

/* ── RUBRIQUE CARDS ── */
.card {
  background: var(--blanc);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  box-shadow: 0 2px 15px rgba(29,53,87,0.08);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(29,53,87,0.15);
}
.card-img {
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-badge {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 999px;
}

/* ── TABS (Male / Femelle / Juvénile) ── */
.tabs-nav {
  display: flex; gap: 0.5rem;
  background: rgba(29,53,87,0.06);
  border-radius: 12px; padding: 0.4rem;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1; min-width: 100px;
  padding: 0.65rem 1.2rem;
  border: none; background: transparent;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem; font-weight: 500;
  color: rgba(29,53,87,0.6);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.tab-btn:hover { color: var(--marine); }
.tab-btn.active {
  background: var(--blanc);
  color: var(--marine);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── BIRD COMPARISON ── */
.bird-figure {
  background: linear-gradient(135deg, #f8f5f0 0%, #e8f0f8 100%);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 2px solid rgba(29,53,87,0.06);
}
.bird-figure svg { max-width: 200px; margin: 0 auto 1rem; }
.bird-trait {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(29,53,87,0.06);
}
.bird-trait:last-child { border-bottom: none; }
.trait-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}

/* ── ARTICLE ── */
.article-content { max-width: 780px; margin: 0 auto; }
.article-lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(29,53,87,0.75);
  border-left: 4px solid var(--rouge);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}
.article-h3 {
  font-size: 1.4rem;
  color: var(--marine);
  margin: 2.5rem 0 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.article-h3::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--or);
  border-radius: 50%;
  flex-shrink: 0;
}
.article-p { margin-bottom: 1.25rem; color: rgba(29,53,87,0.85); }
.highlight-box {
  background: linear-gradient(135deg, rgba(255,183,3,0.08) 0%, rgba(255,183,3,0.03) 100%);
  border-left: 4px solid var(--or);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}
.alert-box {
  background: linear-gradient(135deg, rgba(230,57,70,0.08) 0%, rgba(230,57,70,0.03) 100%);
  border-left: 4px solid var(--rouge);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}
.info-box {
  background: linear-gradient(135deg, rgba(69,123,157,0.08) 0%, rgba(69,123,157,0.03) 100%);
  border-left: 4px solid var(--acier);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* ── PLANT CARDS ── */
.plant-card {
  background: var(--blanc);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s var(--ease);
}
.plant-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.plant-icon {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

/* ── EMERGENCY CONTACTS ── */
.contact-card {
  background: var(--blanc);
  border-radius: 16px;
  padding: 1.5rem;
  border-left: 4px solid var(--rouge);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: all 0.3s var(--ease);
}
.contact-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateX(4px); }

/* ── GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.gallery-card {
  background: var(--blanc);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s var(--ease);
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.gallery-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, #e8f0f8 0%, #d4e4f0 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  position: relative;
}

/* ── UPLOAD FORM ── */
.upload-zone {
  border: 2px dashed rgba(29,53,87,0.2);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  background: rgba(241,250,238,0.5);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--or);
  background: rgba(255,183,3,0.05);
}
.form-input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1.5px solid rgba(29,53,87,0.15);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--marine);
  background: var(--blanc);
  transition: border-color 0.25s;
  outline: none;
}
.form-input:focus { border-color: var(--acier); box-shadow: 0 0 0 3px rgba(69,123,157,0.1); }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--marine); margin-bottom: 0.5rem; display: block; }

/* ── SECTION HEADERS ── */
.section-badge {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rouge);
  background: rgba(230,57,70,0.08);
  border: 1px solid rgba(230,57,70,0.2);
  padding: 0.3rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--marine);
  margin-bottom: 1rem;
}
.section-title span { color: var(--rouge); }
.section-subtitle { color: rgba(29,53,87,0.65); font-size: 1.05rem; max-width: 600px; }
.divider {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--rouge) 0%, var(--or) 100%);
  border-radius: 999px;
  margin: 1.5rem 0;
}

/* ── FOOTER ── */
footer {
  background: var(--marine);
  color: rgba(241,250,238,0.7);
  padding: 4rem 0 2rem;
}
footer h3 { color: var(--cream); font-family: var(--font-serif); margin-bottom: 1rem; }
.footer-link { color: rgba(241,250,238,0.6); font-size: 0.9rem; display: block; margin-bottom: 0.5rem; transition: color 0.25s; }
.footer-link:hover { color: var(--or); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: 0.8rem;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── UTILS ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-rouge { color: var(--rouge); }
.text-or    { color: var(--or); }
.text-marine { color: var(--marine); }
.text-acier  { color: var(--acier); }
.text-cream  { color: var(--cream); }
.bg-cream  { background: var(--cream); }
.bg-marine { background: var(--marine); }
.bg-blanc  { background: var(--blanc); }
.italic-serif { font-family: var(--font-serif); font-style: italic; }
.section-pad { padding: 6rem 0; }
.section-pad-sm { padding: 4rem 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .section-pad { padding: 4rem 0; }
  .hero { min-height: auto; padding: 120px 0 80px; }
}
