/* ==========================================================================
   Action Humanitaire Kové Grande Comore
   Palette dérivée du logo : vert (terre/espoir), or (lumière), rouge & bleu
   (accents comoriens), sur fond ivoire chaleureux. Motif signature : la
   feuille qui pousse dans la main du logo, reprise en filigrane discret.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@500;600;700&display=swap');

:root {
  --green-deep: #1f6f4a;
  --green-soft: #2f8f5f;
  --gold: #e8a63b;
  --gold-soft: #f3c775;
  --red-accent: #c8393f;
  --blue-accent: #29528c;
  --ivory: #faf6ec;
  --ivory-dim: #f1ead9;
  --ink: #1c2620;
  --ink-soft: #4b5850;
  --card-bg: #ffffff;
  --border-soft: rgba(31, 111, 74, 0.16);

  --bg: var(--ivory);
  --bg-alt: var(--ivory-dim);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --surface: var(--card-bg);
  --shadow: 0 10px 30px rgba(28, 38, 32, 0.08);

  --font-display: 'Cormorant Garamond', 'Noto Naskh Arabic', serif;
  --font-body: 'Inter', 'Noto Naskh Arabic', sans-serif;
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #10221a;
  --bg-alt: #0b1a14;
  --text: #f2ede0;
  --text-soft: #b9c5bd;
  --surface: #163427;
  --border-soft: rgba(232, 166, 59, 0.2);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  --ivory: #10221a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  transition: background .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { font-family: 'Noto Naskh Arabic', var(--font-body); }

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-family: 'Noto Naskh Arabic', var(--font-display);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Motif de feuille signature, en filigrane */
.leaf-motif {
  position: absolute;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .leaf-motif { opacity: 0.09; }

/* ---------------------------------- Header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.brand-text span { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); }

.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all .2s ease;
}
.main-nav a:hover, .main-nav a.active { background: var(--surface); color: var(--green-deep); box-shadow: var(--shadow); }
.main-nav .cta-btn { background: var(--green-deep); color: #fff !important; }
.main-nav .cta-btn:hover { background: var(--green-soft); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-soft); background: var(--surface);
  color: var(--text); font-size: 1rem;
}
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; border: 1px solid var(--border-soft);
  color: var(--text-soft);
}
.lang-switch a.active { background: var(--gold); color: #26200c; border-color: var(--gold); }

.burger { display: none; }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero-media-layer { position: absolute; inset: 0; z-index: 0; }
.hero-media-layer .slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.6s ease;
}
.hero-media-layer .slide.active { opacity: 1; }
.hero-media-layer img, .hero-media-layer video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(16,34,26,.35) 0%, rgba(16,34,26,.55) 55%, rgba(11,20,16,.92) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 90px 24px 64px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  padding: 6px 16px; border-radius: 999px;
  font-size: 0.78rem; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #fff;
  margin: 0 0 18px;
}
.hero-content p {
  font-size: 1.12rem;
  color: rgba(255,255,255,.88);
  max-width: 640px;
  margin: 0 auto 34px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #26200c; box-shadow: 0 10px 24px rgba(232,166,59,.35); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-green { background: var(--green-deep); color: #fff; }
.btn-green:hover { background: var(--green-soft); }

.hero-dots { position: relative; z-index: 2; display: flex; gap: 8px; justify-content: center; padding-bottom: 28px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); border: none; padding: 0; }
.hero-dots button.active { background: var(--gold); width: 22px; border-radius: 5px; transition: all .3s ease; }

/* ---------------------------------- Sections ---------------------------------- */
section { padding: 84px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-eyebrow {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-deep); font-weight: 700; margin-bottom: 10px; display: block;
}
[data-theme="dark"] .section-eyebrow { color: var(--gold); }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 0 0 12px; }
.section-head p { color: var(--text-soft); font-size: 1.05rem; line-height: 1.6; }

/* Missions grid */
.missions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.mission-card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 26px 22px;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.mission-card:hover { transform: translateY(-4px); }
.mission-card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--green-deep), var(--green-soft));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem; margin-bottom: 14px;
}
.mission-card h3 { font-size: 1.08rem; margin: 0; font-family: var(--font-body); font-weight: 600; }

/* Event cards */
.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.event-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow);
  transition: transform .25s ease;
}
.event-card:hover { transform: translateY(-5px); }
.event-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); position: relative; }
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.event-card:hover .thumb img { transform: scale(1.06); }
.event-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gold); color: #26200c; font-size: .72rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; letter-spacing: .04em;
}
[dir="rtl"] .event-badge { left: auto; right: 12px; }
.event-card .body { padding: 20px; }
.event-date { font-size: .8rem; color: var(--green-deep); font-weight: 700; letter-spacing: .04em; }
[data-theme="dark"] .event-date { color: var(--gold); }
.event-card h3 { font-size: 1.2rem; margin: 8px 0 6px; font-family: var(--font-display); }
.event-card p { color: var(--text-soft); font-size: .92rem; margin: 0 0 12px; }

.next-event-banner {
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--green-deep), #17513a);
  color: #fff; border-radius: 20px; padding: 32px; box-shadow: var(--shadow);
}
.next-event-banner img { width: 220px; height: 150px; object-fit: cover; border-radius: 12px; }
.next-event-banner .info { flex: 1; min-width: 240px; }
.next-event-banner .tag { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.next-event-banner h3 { font-size: 1.6rem; margin: 8px 0; color: #fff; }

/* About page */
.about-hero { padding-top: 60px; }
.pillars-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pillars-list li {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 16px 18px; font-size: .96rem;
}
.pillars-list li::before {
  content: "◆"; color: var(--gold); font-size: .7rem; margin-top: 5px;
}
.bank-card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.bank-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.bank-card dt { color: var(--text-soft); font-size: .85rem; }
.bank-card dd { margin: 0; font-weight: 600; font-family: monospace; letter-spacing: .02em; }

/* Donate page */
.donate-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .donate-grid { grid-template-columns: 1fr; } }

.trust-banner {
  display: flex; gap: 14px; align-items: center;
  background: color-mix(in srgb, var(--green-deep) 10%, var(--surface));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 26px;
}
.trust-banner .icon { font-size: 1.6rem; }
.trust-banner strong { display: block; margin-bottom: 3px; }
.trust-banner p { margin: 0; font-size: .88rem; color: var(--text-soft); }

.not-obligatory-box {
  border: 1px dashed var(--gold); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 26px; background: color-mix(in srgb, var(--gold) 8%, var(--surface));
}
.not-obligatory-box h3 { margin: 0 0 8px; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; color: var(--green-deep); }
[data-theme="dark"] .not-obligatory-box h3 { color: var(--gold); }
.not-obligatory-box p { margin: 0; color: var(--text-soft); font-size: .93rem; line-height: 1.6; }

.quran-quotes { display: grid; gap: 16px; margin-bottom: 30px; }
.quote-card {
  background: var(--surface); border-inline-start: 4px solid var(--gold);
  border-radius: 10px; padding: 18px 22px; box-shadow: var(--shadow);
}
.quote-card p.arabic { font-family: 'Noto Naskh Arabic', serif; font-size: 1.25rem; margin: 0 0 8px; line-height: 2; color: var(--green-deep); }
[data-theme="dark"] .quote-card p.arabic { color: var(--gold); }
.quote-card p.translation { margin: 0 0 6px; font-style: italic; color: var(--text); }
.quote-card cite { font-size: .82rem; color: var(--text-soft); font-style: normal; }

.donate-form-card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 20px; padding: 30px; box-shadow: var(--shadow);
  position: sticky; top: 100px;
}
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 18px; }
.amount-btn {
  padding: 14px 0; border-radius: 12px; border: 1.5px solid var(--border-soft);
  background: var(--bg); font-weight: 700; font-size: 1.05rem; text-align: center;
}
.amount-btn.selected { border-color: var(--green-deep); background: color-mix(in srgb, var(--green-deep) 12%, var(--bg)); color: var(--green-deep); }
[data-theme="dark"] .amount-btn.selected { color: var(--gold); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--bg)); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-soft); }
.field input[type=text], .field input[type=email], .field input[type=number], .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border-soft);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: .95rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 14px; }

.optional-info-box {
  border-top: 1px solid var(--border-soft); margin-top: 20px; padding-top: 18px;
}
.optional-info-box h4 { font-size: .9rem; margin: 0 0 4px; }
.optional-info-box > p { font-size: .8rem; color: var(--text-soft); margin: 0 0 12px; }

.submit-btn { width: 100%; justify-content: center; margin-top: 6px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); border: 1px solid var(--border-soft); }

/* Footer */
.site-footer { background: #0f1f18; color: #d9e6dd; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.site-footer a { color: #b9cabd; font-size: .92rem; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .82rem; color: #8fa397; text-align: center; }

/* Utility */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.badge-secure {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--green-deep); font-weight: 600;
}
[data-theme="dark"] .badge-secure { color: var(--gold); }

/* Responsive nav */
@media (max-width: 880px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--bg); flex-direction: column;
    align-items: stretch; padding: 20px; gap: 10px; transform: translateX(100%); transition: transform .3s ease; z-index: 90; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { text-align: center; padding: 14px; font-size: 1.05rem; }
  .burger { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--border-soft); background: var(--surface); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------- Réseaux sociaux flottants ---------------------------------- */
.social-float {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.social-btn:hover { transform: translateX(-4px) scale(1.06); }
.social-facebook { background: #1877f2; }
.social-instagram { background: radial-gradient(circle at 30% 110%, #fdf497, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-whatsapp { background: #25d366; }
.social-youtube { background: #ff0000; }
.social-tiktok { background: #111; }

@media (max-width: 700px) {
  .social-float { right: 10px; gap: 8px; }
  .social-btn { width: 38px; height: 38px; }
  .social-btn svg { width: 16px; height: 16px; }
}

/* Focus visibility (accessibilité) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
