/* ==========================================================================
   ACM2V — Feuille de style principale
   Palette oklch dérivée du logo (verts profonds) + accent doré évoquant
   les lanternes et motifs géométriques de l'architecture des mosquées.
   ========================================================================== */

:root {
  /* Couleurs */
  --ink:            oklch(21% 0.025 155);
  --ink-soft:       oklch(40% 0.03 155);
  --paper:          oklch(99% 0.004 155);
  --tint:           oklch(98% 0.008 155);
  --tint-strong:    oklch(95.5% 0.02 155);
  --border:         oklch(90% 0.015 155);

  --green-900:      oklch(22% 0.055 155);
  --green-800:      oklch(24% 0.05 155);
  --green-700:      oklch(29% 0.08 155);
  --green-600:      oklch(34% 0.085 155);
  --green-500:      oklch(36% 0.10 155);
  --green-btn:      oklch(42% 0.10 155);
  --green-btn-hover: oklch(34% 0.085 155);
  --green-glow:     oklch(50% 0.11 155 / 0.35);

  --gold-700:       oklch(45% 0.13 85);
  --gold-500:       oklch(66% 0.10 85);
  --gold-400:       oklch(70% 0.10 85);
  --gold-100:       oklch(94% 0.03 85);

  --shadow-sm: 0 1px 3px oklch(24% 0.05 155 / 0.08);
  --shadow-md: 0 8px 28px oklch(0% 0 0 / 0.25);

  /* Typographie */
  --font-display: 'Spectral', Georgia, 'Iowan Old Style', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Échelle */
  --radius-card: 14px;
  --container: 1180px;
}

/* --------------------------------------------------------------------
   Reset léger
   -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--green-800);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

/* Focus visible clavier — accessibilité RGAA */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Lien d'évitement (accès rapide au contenu) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-900);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------
   Bandeau d'information (Jumu'a, annonces ponctuelles)
   -------------------------------------------------------------------- */
.top-bar {
  background: var(--green-800);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  padding: 9px 16px;
  letter-spacing: 0.01em;
}
.top-bar a { color: var(--gold-100); text-decoration: underline; }

/* --------------------------------------------------------------------
   En-tête / navigation
   -------------------------------------------------------------------- */
.site-header {
  background: oklch(99% 0.004 155 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text strong {
  font-family: var(--font-display);
  color: var(--green-700);
  font-size: 1.05rem;
}
.brand-text span {
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav a {
  display: inline-block;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 8px;
}
.main-nav a:hover { background: var(--tint-strong); }
.main-nav a[aria-current="page"] {
  color: var(--green-600);
  background: var(--tint-strong);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--tint-strong);
  color: var(--green-600);
  flex-shrink: 0;
  text-decoration: none;
}
.social-icon:hover { background: oklch(90% 0.03 155); }
.social-icon svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  background: var(--green-900);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px 24px 20px; gap: 2px; }
  .main-nav a { display: block; }
}

/* --------------------------------------------------------------------
   Hero + horaires de prière
   -------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  color: #fff;
  padding: 72px 0 64px;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-position: center center;
  background-image:
    repeating-linear-gradient(45deg, oklch(70% 0.10 85 / 0.08) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(-45deg, oklch(70% 0.10 85 / 0.08) 0 1px, transparent 1px 46px);
}
.hero-glow {
  position: absolute;
  right: -140px;
  top: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-glow), transparent 70%);
  pointer-events: none;
}
.hero-motif { position: absolute; inset: 0; pointer-events: none; }
.motif-arch {
  position: absolute;
  right: 6%;
  top: 60px;
  width: 200px;
  height: 270px;
  clip-path: polygon(50% 0%, 100% 38%, 100% 100%, 0% 100%, 0% 38%);
  border: 2px solid oklch(70% 0.10 85 / 0.4);
}
.motif-arch--sm {
  right: calc(6% + 26px);
  top: 96px;
  width: 148px;
  height: 200px;
  border-color: oklch(70% 0.10 85 / 0.32);
}
.motif-star {
  position: absolute;
  width: 64px;
  height: 64px;
}
.motif-star span {
  position: absolute;
  inset: 0;
  border: 3px solid oklch(70% 0.10 85 / 0.9);
}
.motif-star span:last-child { transform: rotate(45deg); }
.motif-star--lg { right: 17%; top: 360px; }
.motif-star--md {
  right: 29%;
  top: 440px;
  width: 26px;
  height: 26px;
}
.motif-star--md span { border-width: 1.5px; border-color: oklch(70% 0.10 85 / 0.45); }
.motif-star--sm {
  right: 8%;
  top: 310px;
  width: 14px;
  height: 14px;
}
.motif-star--sm span { border-width: 1.5px; border-color: oklch(70% 0.10 85 / 0.4); }

@media (max-width: 780px) {
  .hero-motif { display: none; }
}

.hero-inner { position: relative; z-index: 2; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: oklch(100% 0 0 / 0.12);
  border: 1px solid oklch(70% 0.10 85 / 0.4);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold-100);
}
.hero h1 {
  color: #fff;
  margin: 22px 0 14px;
  max-width: 18ch;
}
.hero-sub {
  max-width: 58ch;
  font-size: 1.1rem;
  color: oklch(96% 0.01 155 / 0.88);
  margin: 0 0 32px;
}

/* Carte "horaires du jour" */
.next-prayer-card {
  max-width: 440px;
  background: oklch(28% 0.06 155 / 0.55);
  border: 1px solid oklch(70% 0.10 85 / 0.45);
  box-shadow: 0 0 0 5px oklch(28% 0.06 155 / 0.3);
  border-radius: 6px;
  padding: 26px 24px 22px;
  position: relative;
}
.next-prayer-pin {
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: var(--gold-400);
}
.next-prayer-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.next-prayer-head .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold-100);
  font-weight: 700;
}
.next-prayer-head .name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.next-prayer-head .name .arabic {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-left: 6px;
}
.next-prayer-head .countdown {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  background: oklch(100% 0 0 / 0.14);
  padding: 5px 12px;
  border-radius: 4px;
  font-weight: 700;
}

.next-prayer-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.next-prayer-divider span {
  flex: 1;
  height: 1px;
  background: oklch(70% 0.10 85 / 0.4);
}
.next-prayer-divider i {
  width: 7px;
  height: 7px;
  background: var(--gold-400);
  transform: rotate(45deg);
  font-style: normal;
}

.prayer-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.arch-card {
  position: relative;
  background-image: url("../img/arch-card.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: var(--ink);
  padding: 34px 6px 12px;
  text-align: center;
  filter: drop-shadow(0 4px 6px oklch(24% 0.05 155 / 0.35));
}
.arch-card .p-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--green-600);
  margin: 6px 0 2px;
  position: relative;
}
.arch-card .p-arabic {
  font-size: 0.62rem;
  color: oklch(50% 0.06 155);
  margin-bottom: 3px;
  position: relative;
}
.arch-card .p-time {
  font-size: 0.98rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.arch-card.is-active {
  background-image: url("../img/arch-card-active.svg");
  filter: drop-shadow(0 4px 8px oklch(24% 0.05 155 / 0.4));
}
.arch-card.is-active .p-name { color: var(--gold-700); }

.hero-dates {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: oklch(96% 0.01 155 / 0.65);
}
.hero-note {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: oklch(96% 0.01 155 / 0.55);
}

@media (max-width: 520px) {
  .prayer-band { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------
   Sections génériques
   -------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section--tint { background: var(--tint); }
.section-eyebrow {
  color: var(--gold-700);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 10px;
  display: block;
}
.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.info-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.info-card + .info-card { margin-top: 16px; }
.info-card dt {
  font-weight: 700;
  color: var(--green-600);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 14px;
}
.info-card dt:first-child { margin-top: 0; }
.info-card dd { margin: 4px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn--primary {
  background: var(--green-btn);
  color: #fff;
}
.btn--primary:hover { background: var(--green-btn-hover); }
.btn--ghost {
  background: transparent;
  border-color: var(--green-btn);
  color: var(--green-600);
  padding: 11px 20px;
}
.btn--ghost:hover { background: var(--tint-strong); }

.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-frame iframe { width: 100%; height: 360px; border: 0; display: block; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px;
}
.card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-soft); }

/* --------------------------------------------------------------------
   Section Facebook (accueil)
   -------------------------------------------------------------------- */
.section--facebook {
  padding: 56px 0;
  background: var(--green-800);
  color: #fff;
}
.facebook-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 420px);
  gap: 36px;
  align-items: center;
}
@media (max-width: 860px) {
  .facebook-grid { grid-template-columns: 1fr; }
}
.section--facebook .section-eyebrow { color: var(--gold-400); }
.section--facebook h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 8px; }
.section--facebook p { color: oklch(92% 0.01 155 / 0.85); max-width: 56ch; }
.btn--facebook {
  background: #fff;
  color: var(--green-800);
}
.btn--facebook:hover { background: var(--tint-strong); }
.facebook-embed {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 400px;
}
.facebook-embed iframe {
  border: none;
  overflow: hidden;
  display: block;
  max-width: 100%;
  width: 100%;
  height: 400px;
}
.facebook-embed-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: oklch(92% 0.01 155 / 0.6);
}
.facebook-embed-note a { color: var(--gold-400); }
.facebook-embed-note a:hover { color: var(--gold-100); }

/* --------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------- */
.site-footer {
  background: var(--green-800);
  color: oklch(92% 0.01 155 / 0.85);
  padding: 48px 0 24px;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h2 {
  color: #fff;
  font-size: 1.1rem;
}
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: underline; }
.site-footer a:hover { color: #fff; }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid oklch(92% 0.01 155 / 0.15);
  font-size: 0.85rem;
  opacity: 0.7;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}
.footer-bottom ul { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------
   Pages internes (contenu légal, à propos)
   -------------------------------------------------------------------- */
.page-hero {
  background: var(--tint-strong);
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.legal-content h2 { margin-top: 2em; }
.legal-content { max-width: 78ch; }
.legal-content a { color: var(--green-btn); text-decoration: underline; }
.legal-content a:hover { color: var(--green-btn-hover); }

/* --------------------------------------------------------------------
   Bandeau cookies (RGPD)
   -------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--green-800);
  color: #fff;
  padding: 18px 20px;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.cookie-banner p { margin: 0; max-width: 70ch; font-size: 0.92rem; }
.cookie-banner a { color: var(--gold-100); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn--primary { background: var(--gold-500); color: oklch(20% 0.03 85); }
.cookie-banner .btn--primary:hover { background: oklch(60% 0.10 85); }
.cookie-banner .btn--ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.cookie-banner .btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* --------------------------------------------------------------------
   Visually hidden (accessibilité)
   -------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
