/* ==========================================================================
   Islamobile — site vitrine (statique)
   Palette alignée sur la page « politique de confidentialité » existante.
   ========================================================================== */

/* Polices auto-hébergées (pas de CDN Google Fonts : conformité CNIL).
   Fichiers variables : une seule ressource couvre toutes les graisses. */
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("/assets/fonts/raleway-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --txt: #1c2b27;
  --muted: #5c6b66;
  --accent: #1f7a5a;
  --accent-dark: #175c44;
  --bg: #fbfaf6;
  --card: #ffffff;
  --panel: #f1efe7;
  --line: #e6e2d8;
  --brand-ink: #0f4c48;
  --gold: #c9942a;
  --header-bg: rgba(251, 250, 246, 0.92);
  --logo-filter: none;
  --badge-ring: transparent;
  --glow-1: rgba(31, 122, 90, 0.10);
  --glow-2: rgba(201, 148, 42, 0.09);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'%3E%3Cg fill='none' stroke='%231f7a5a' stroke-width='1'%3E%3Crect x='34' y='34' width='44' height='44'/%3E%3Crect x='34' y='34' width='44' height='44' transform='rotate(45 56 56)'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-opacity: 0.05;
  --icon-bg: rgba(31, 122, 90, 0.10);
  --radius: 16px;
  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

/* Mode sombre — même identité verte/or. Appliqué :
   1. par choix manuel (bouton de l'en-tête → data-theme="dark") ;
   2. sinon automatiquement selon le réglage système,
      sauf si l'utilisateur a explicitement choisi le mode clair. */
:root[data-theme="dark"] {
  --txt: #e9edeb;
  --muted: #a3b3ac;
  --accent: #4cbd97;
  --accent-dark: #63cba7;
  --bg: #101613;
  --card: #1a221e;
  --panel: #212b26;
  --line: #2e3a34;
  --brand-ink: #9fd8c4;
  --gold: #d8a94c;
  --header-bg: rgba(16, 22, 19, 0.92);
  --logo-filter: brightness(1.8) saturate(0.85);
  --badge-ring: #3a3a3c;
  --glow-1: rgba(76, 189, 151, 0.10);
  --glow-2: rgba(216, 169, 76, 0.07);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'%3E%3Cg fill='none' stroke='%234cbd97' stroke-width='1'%3E%3Crect x='34' y='34' width='44' height='44'/%3E%3Crect x='34' y='34' width='44' height='44' transform='rotate(45 56 56)'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-opacity: 0.06;
  --icon-bg: rgba(76, 189, 151, 0.14);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --txt: #e9edeb;
    --muted: #a3b3ac;
    --accent: #4cbd97;
    --accent-dark: #63cba7;
    --bg: #101613;
    --card: #1a221e;
    --panel: #212b26;
    --line: #2e3a34;
    --brand-ink: #9fd8c4;
    --gold: #d8a94c;
    --header-bg: rgba(16, 22, 19, 0.92);
    --logo-filter: brightness(1.8) saturate(0.85);
    --badge-ring: #3a3a3c;
    --glow-1: rgba(76, 189, 151, 0.10);
    --glow-2: rgba(216, 169, 76, 0.07);
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'%3E%3Cg fill='none' stroke='%234cbd97' stroke-width='1'%3E%3Crect x='34' y='34' width='44' height='44'/%3E%3Crect x='34' y='34' width='44' height='44' transform='rotate(45 56 56)'/%3E%3C/g%3E%3C/svg%3E");
    --pattern-opacity: 0.06;
    --icon-bg: rgba(76, 189, 151, 0.14);
    color-scheme: dark;
  }
}

:root[data-theme="light"] { color-scheme: light; }

/* ---------- Accessibilité ---------- */

/* Lien d'évitement : invisible jusqu'au focus clavier */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Focus clavier bien visible partout */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Respect de la préférence « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Titres en serif Lora (ton apaisant), corps en Raleway */
h1, h2,
.page h1, .screens h2 {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Fond décoratif : halos de couleur + motif khatam en filigrane */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 85% -60px, var(--glow-1), transparent 70%),
    radial-gradient(560px 400px at -80px 35%, var(--glow-2), transparent 70%),
    radial-gradient(520px 380px at 105% 85%, var(--glow-1), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--pattern);
  opacity: var(--pattern-opacity);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Texte justifié pour les contenus rédactionnels (avec césure automatique,
   pour éviter les « rivières » d'espaces dans les colonnes étroites). */
.page p:not(.meta),
.page li,
.feature li,
.app-hero .promo,
.app-card p {
  text-align: justify;
  hyphens: auto;
}

img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 60px;
  gap: 8px 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--brand-ink);
}
.brand:hover { text-decoration: none; }
.brand { flex-shrink: 0; }

.brand img {
  width: 24px;
  height: auto;
  filter: var(--logo-filter);
}

.brand .gold { color: var(--gold); }

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.95rem;
}

/* En-tête sur deux lignes centrées quand la largeur manque (mobile) */
@media (max-width: 640px) {
  .site-header .wrap { justify-content: center; }
  .site-nav { justify-content: center; gap: 8px 14px; }
}

.lang-switch {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.lang-switch:hover { color: var(--accent); text-decoration: none; }

/* Bouton clair/sombre (injecté par theme.js dans l'en-tête) */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; }

/* Menu déroulant « Outils » (regroupe Qibla/Dhikr/Convertisseur/Zakat/Comparatif
   pour ne pas saturer la nav principale) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-caret {
  width: 9px;
  height: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}
.nav-dropdown.is-open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  display: none;
  flex-direction: column;
  min-width: 230px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(28, 43, 39, 0.16);
  z-index: 20;
}
.nav-dropdown.is-open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--txt);
  font-size: 0.95rem;
}
.nav-dropdown-menu a:hover { background: var(--panel); color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  .nav-dropdown { flex-basis: 100%; display: flex; flex-direction: column; align-items: center; }
  .nav-dropdown-menu {
    position: static;
    margin-top: 6px;
    box-shadow: none;
    border: none;
    background: none;
    padding: 0;
    min-width: 0;
    align-items: center;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.3rem);
  line-height: 1.18;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

/* Titres en dégradé (touche moderne, avec garde-fou de compatibilité) */
@supports (-webkit-background-clip: text) {
  .hero h1,
  .app-hero h1 {
    background: linear-gradient(115deg, var(--txt) 55%, var(--accent) 130%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.12rem;
}

/* ---------- Grille d'applications (accueil) ---------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 12px 0 72px;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--txt);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.app-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(28, 43, 39, 0.08);
}

.app-card .app-icon {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 4px 14px rgba(28, 43, 39, 0.12);
}

.app-card h2 { margin: 0; font-size: 1.3rem; }
.app-card .tagline { color: var(--accent); font-weight: 600; margin: 0; font-size: 0.95rem; }
.app-card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.app-card .more { margin-top: auto; font-weight: 600; color: var(--accent); }

/* Tant qu'il n'y a qu'une seule application, sa carte occupe toute la largeur
   en présentation horizontale ; la grille reprend sa forme dès la 2e carte. */
@media (min-width: 700px) {
  .app-card:only-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "icon title   more"
      "icon tagline more"
      "icon desc    more";
    align-items: center;
    column-gap: 32px;
    row-gap: 8px;
    padding: 36px 40px;
  }
  .app-card:only-child .app-icon { grid-area: icon; width: 104px; height: 104px; border-radius: 24px; }
  .app-card:only-child h2 { grid-area: title; font-size: 1.5rem; }
  .app-card:only-child .tagline { grid-area: tagline; }
  .app-card:only-child p:not(.tagline) { grid-area: desc; max-width: 560px; }
  .app-card:only-child .more { grid-area: more; margin: 0; white-space: nowrap; }
}

/* ---------- Page application ---------- */

.app-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 64px 0 40px;
  flex-wrap: wrap;
}

.app-hero .app-icon {
  width: 120px;
  height: 120px;
  border-radius: 27px;
  box-shadow: 0 8px 24px rgba(28, 43, 39, 0.15);
  flex-shrink: 0;
}

.app-hero h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.app-hero .subtitle { margin: 0 0 14px; color: var(--accent); font-weight: 600; font-size: 1.15rem; }
.app-hero .promo { margin: 0; color: var(--muted); max-width: 560px; }

.store-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border-radius: 10px;
  padding: 8px 18px 8px 14px;
  line-height: 1.25;
  box-shadow: inset 0 0 0 1px var(--badge-ring);
}
.store-badge { transition: transform 0.2s ease, opacity 0.2s ease; }
.store-badge:hover { text-decoration: none; opacity: 0.88; transform: translateY(-2px); }
.store-badge svg { width: 24px; height: 24px; fill: #fff; }
.store-badge .small { display: block; font-size: 0.65rem; opacity: 0.85; }
.store-badge .big { display: block; font-size: 1.05rem; font-weight: 600; }

/* ---------- QR code de téléchargement ---------- */

.qr { position: relative; }

.qr summary {
  list-style: none;
  cursor: pointer;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.qr summary::-webkit-details-marker { display: none; }
.qr summary:hover { border-color: var(--accent); }
.qr[open] summary { border-color: var(--accent); background: var(--bg); }

.qr summary svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.qr-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(28, 43, 39, 0.16);
  padding: 16px 18px;
  text-align: center;
  width: max-content;
  z-index: 6;
}

/* Fond blanc permanent : le QR doit rester contrasté, y compris en mode sombre */
.qr-pop img {
  margin: 0 auto;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
}
.qr-pop p { margin: 10px 0 0; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 560px) {
  /* Évite que le panneau déborde de l'écran, ancré à gauche du conteneur */
  .qr-pop { left: auto; right: -12px; transform: none; }
}

/* ---------- Bandeau de consentement (Google Analytics) ---------- */

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  margin: 0 auto;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(28, 43, 39, 0.18);
  padding: 18px 20px;
  z-index: 20;
  font-size: 0.92rem;
  color: var(--muted);
}

.consent-banner p { margin: 0 0 12px; }

.consent-banner .consent-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.consent-banner button {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
}

.consent-banner button.accept {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.consent-banner button.accept:hover { background: var(--accent-dark); }
.consent-banner button:not(.accept):hover { color: var(--txt); }

/* ---------- Sections de fonctionnalités ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding: 24px 0 40px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  align-content: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(28, 43, 39, 0.08);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--icon-bg);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 24px; height: 24px; fill: currentColor; }

.feature h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feature ul { grid-column: 1 / -1; margin-top: 14px; }

.feature ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.95rem; }
.feature li { margin-bottom: 6px; }

/* ---------- Captures d'écran : carrousel dans un cadre iPhone ---------- */

/* Sur écran large, iPhone et Apple Watch côte à côte ; empilés sinon. */
@media (min-width: 1000px) {
  .devices {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: 24px;
  }
}

.screens {
  padding: 8px 0 64px;
}

.screens h2 { text-align: center; margin: 0 0 26px; }

.phone-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

/* Cadre iPhone dessiné en CSS (lunette + Dynamic Island) */
.phone-frame {
  width: min(300px, 74vw);
  background: #1c1c1e;
  border: 12px solid #1c1c1e;
  border-radius: 52px;
  box-shadow: 0 24px 60px rgba(28, 43, 39, 0.28), inset 0 0 0 2px #3a3a3c;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.phone-frame::after {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 26px;
  background: #1c1c1e;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}

/* Cadre Apple Watch (couronne + bouton latéral en pseudo-éléments) */
.watch-frame {
  width: min(230px, 60vw);
  background: #1c1c1e;
  border: 14px solid #1c1c1e;
  border-radius: 60px;
  box-shadow: 0 20px 48px rgba(28, 43, 39, 0.26), inset 0 0 0 2px #3a3a3c;
  position: relative;
  flex-shrink: 0;
}

.watch-frame::before {
  /* Couronne digitale */
  content: "";
  position: absolute;
  right: -24px;
  top: 24%;
  width: 11px;
  height: 46px;
  border-radius: 6px;
  background: linear-gradient(90deg, #3a3a3c, #1c1c1e);
}

.watch-frame::after {
  /* Bouton latéral */
  content: "";
  position: absolute;
  right: -20px;
  top: 56%;
  width: 7px;
  height: 58px;
  border-radius: 4px;
  background: #2c2c2e;
}

.watch-frame .carousel { border-radius: 46px; }

.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 40px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel img {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.carousel-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.carousel-btn:hover:not(:disabled) { background: var(--bg); border-color: var(--accent); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.carousel-dots button.active { background: var(--accent); transform: scale(1.25); }

@media (max-width: 560px) {
  /* Sur mobile, on balaie du doigt : les flèches sont superflues */
  .carousel-btn { display: none; }
}

/* ---------- Bandeau confidentialité ---------- */

.privacy-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 0 0 72px;
  text-align: center;
  color: var(--muted);
}
.privacy-note strong { color: var(--txt); }
.privacy-note .store-badge { margin-top: 16px; }

/* ---------- Newsletter (Brevo) ---------- */

.newsletter {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 44px 0 48px;
}

.newsletter .wrap { max-width: 660px; text-align: center; }

.newsletter h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.newsletter p { color: var(--muted); margin: 0 0 20px; }

.nl-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.nl-form input[type="email"] {
  flex: 1 1 260px;
  max-width: 380px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--txt);
  font: inherit;
}
.nl-form input[type="email"]:focus-visible { border-color: var(--accent); }

.nl-form button {
  min-height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nl-form button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.nl-form button:disabled { opacity: 0.6; cursor: default; transform: none; }

.nl-consent { font-size: 0.82rem; color: var(--muted); margin: 14px 0 0; }

.nl-feedback { margin: 14px 0 0; font-weight: 600; }
.nl-feedback.ok { color: var(--accent-dark); }
.nl-feedback.err { color: #c0392b; }

/* Champ-piège anti-robots (honeypot) : jamais visible ni focusable */
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

.social { display: flex; align-items: center; gap: 14px; }
.social a { color: var(--muted); display: flex; }
.social a:hover { color: var(--accent); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Pages « longues » (confidentialité, assistance) ---------- */

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 22px 80px;
}

.page h1 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); margin: 0 0 6px; letter-spacing: -0.01em; }
.page .meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 24px; }
.page h2 { font-size: 1.18rem; margin: 34px 0 10px; color: var(--accent-dark); }
.page h3 { font-size: 1rem; margin: 20px 0 6px; }

.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.95rem;
}
.page th, .page td {
  text-align: left;
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
  background: var(--card);
}
.page th { background: var(--panel); }

.page .note {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 16px 0;
}

/* ---------- Assistance : carte contact + FAQ ---------- */

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 20px 0 32px;
}
.contact-card p { margin: 0 0 6px; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .mail { font-weight: 600; font-size: 1.05rem; }

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 18px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 28px 14px 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.25rem;
}
.faq details[open] summary::after { content: "–"; }
.faq details p, .faq details ul { color: var(--muted); margin-top: 0; }
/* Lien de téléchargement mis en valeur dans une réponse de FAQ (icône + libellé,
   sur sa propre ligne) */
.faq-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--icon-bg);
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}
.faq-download img { display: block; border-radius: 5px; }
.faq-download:hover { background: var(--accent); color: #fff; }

/* Maillage interne : liens vers les pages ville « Heures de prière » */
.city-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0;
}
.city-links a { color: var(--txt); }
.city-links a:hover { color: var(--accent); }
.city-links-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  margin: 6px 0 10px;
}

/* ---------- Pages saisonnières (Ramadan…) ---------- */

.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.season-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 18px 0 28px;
}

.season-dates { display: flex; flex-wrap: wrap; gap: 28px; }
.season-dates > div { display: flex; flex-direction: column; }
.season-dates .lbl {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.season-dates strong {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--brand-ink);
  margin-top: 3px;
}

.season-countdown { margin: 18px 0 0; font-weight: 600; color: var(--accent-dark); }
.season-countdown:empty { display: none; }
.season-countdown[data-state="past"] { color: var(--muted); font-weight: 500; }
.season-convert { margin: 10px 0 0; font-size: 0.9rem; }
.season-convert a { color: var(--accent); }

.season-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.season-table th, .season-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}
.season-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.season-table td a { font-weight: 600; }
/* Alternance de couleur sur les lignes (avant les règles de mise en avant,
   qui doivent la recouvrir) */
.season-table tr:nth-child(even) td { background: var(--icon-bg); }
.season-table tr.is-next td { background: var(--panel); }

/* Calendrier des horaires par ville (pages Ramadan) */
.calendar-tool { margin: 0 0 6px; }
.calendar-city-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 6px;
}
.calendar-city-head h3 { font-family: var(--font-heading); color: var(--brand-ink); margin: 0; }
.calendar-city-head .calendar-print { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.calendar-print-head { display: none; }
.calendar-note { font-size: 0.88rem; color: var(--muted); }
/* Amélioration progressive : avec JS, seule la ville choisie est visible */
.calendar.js .calendar-city { display: none; }
.calendar.js .calendar-city.active { display: block; }

/* Impression : n'imprimer que la ville affichée (classe posée par calendar.js) */
@media print {
  body.has-calendar-print * { visibility: hidden !important; }
  body.has-calendar-print .calendar-city.active,
  body.has-calendar-print .calendar-city.active * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.has-calendar-print .calendar-city.active { position: absolute; inset: 0; margin: 0; background: #fff; }
  .calendar-print-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 0 0 10px; padding-bottom: 8px;
    border-bottom: 2px solid #1f7a5a; color: #0f4c48; font-size: 0.95rem;
  }
  .calendar-print-head strong { color: #0f4c48; }
  .calendar-print-head .pt-print-qr { color: #333; }
  /* La ville est déjà dans le bandeau d'impression → masquer l'en-tête d'écran */
  .calendar-city.active .calendar-city-head { display: none !important; }
  .calendar-city.active .season-table { color: #222; font-size: 11px; line-height: 1.2; }
  .calendar-city.active .season-table th, .calendar-city.active .season-table td {
    border-color: #d8d8d8; padding: 4px 6px;
  }
  /* Lignes explicitement blanches (impaires) puis vertes (paires) : sinon, à
     l'impression depuis le mode sombre, le fond sombre du body transparaît. */
  .calendar-city.active .season-table tbody tr td { background: #fff; }
  .calendar-city.active .season-table tbody tr:nth-child(even) td { background: #eaf5f0; }
  .calendar-city.active .season-table thead th { background: #1f7a5a; color: #fff; border-color: #1f7a5a; }
  @page { margin: 10mm; }
}

/* ---------- Outil « Heures de prière » ---------- */

.pt-tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 18px 0 28px;
}

.pt-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.pt-field { display: flex; flex-direction: column; gap: 6px; }
.pt-field label { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pt-field input, .pt-field select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--txt);
  font: inherit;
  width: 100%;
}
.pt-field input:focus-visible, .pt-field select:focus-visible { border-color: var(--accent); }

/* Recherche de ville + suggestions */
.pt-search { position: relative; }
.pt-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 6;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(28, 43, 39, 0.16);
  max-height: 280px;
  overflow-y: auto;
}
.pt-suggest li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.pt-suggest li:hover { background: var(--panel); color: var(--accent); }
.pt-geo {
  margin-top: 8px;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.pt-geo:hover:not(:disabled) { text-decoration: underline; }
.pt-geo:disabled { color: var(--muted); cursor: default; }

/* Résultats */
.pt-results { margin-top: 22px; }
.pt-place { font-family: var(--font-heading); font-size: 1.2rem; color: var(--brand-ink); margin: 0 0 12px; }
.pt-times { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pt-time {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.pt-time .pt-name { font-weight: 600; }
.pt-time .pt-value { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.pt-time.pt-secondary { opacity: 0.72; }
.pt-time.pt-next { border-color: var(--accent); background: var(--icon-bg); }
.pt-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
}

/* Masquage des horaires facultatifs (vue du jour) */
.pt-hide-optional .pt-time.pt-secondary { display: none; }

/* Vue mensuelle */
.pt-month { margin: 8px 0 28px; }
.pt-month-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.pt-month-nav {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent);
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
}
.pt-month-nav:hover { border-color: var(--accent); }
.pt-month-label {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--brand-ink);
  min-width: 150px;
  text-transform: capitalize;
}
.pt-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.pt-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.pt-pdf {
  margin-left: auto;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit; font-weight: 600;
  cursor: pointer;
}
.pt-pdf:hover { background: var(--accent-dark); }
.pt-month-grid { font-size: 0.9rem; }
.pt-month-grid td, .pt-month-grid th { padding: 8px 10px; text-align: center; font-variant-numeric: tabular-nums; }
.pt-month-grid td:first-child, .pt-month-grid th:first-child { text-align: left; white-space: nowrap; }
.pt-month-grid tr.is-today td { background: var(--panel); font-weight: 600; }
.pt-month-grid tr.is-today td.pt-next-cell { background: var(--accent); color: #fff; font-weight: 700; }
.pt-print-head { display: none; }
.pt-print-brand { display: flex; align-items: center; gap: 10px; }
.pt-print-brand img { display: block; }
.pt-print-qr { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pt-print-qr span { font-size: 0.68rem; white-space: nowrap; }

/* Impression → PDF : n'imprimer que l'en-tête + le tableau mensuel, sur une page */
@media print {
  body * { visibility: hidden !important; }
  .pt-print-area, .pt-print-area * {
    visibility: visible !important;
    /* Les navigateurs suppriment les fonds à l'impression par défaut :
       obligatoire pour conserver l'en-tête vert et l'alternance des lignes */
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .pt-print-area { position: absolute; inset: 0; margin: 0; background: #fff; }
  .pt-print-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid #1f7a5a;
    color: #0f4c48; font-size: 0.95rem;
  }
  .pt-print-head strong { color: #0f4c48; }
  .pt-print-qr { color: #333; }
  .pt-month-grid { color: #222; font-size: 10px; line-height: 1.2; break-inside: avoid; page-break-inside: avoid; }
  .pt-month-grid td, .pt-month-grid th { border-color: #d8d8d8; padding: 3px 5px; }
  .pt-month-grid thead th { background: #1f7a5a; color: #fff; border-color: #1f7a5a; }
  /* Lignes explicitement blanches (impaires) puis vertes (paires) : sinon, à
     l'impression depuis le mode sombre, le fond sombre du body transparaît. */
  .pt-month-grid tbody tr td { background: #fff; }
  .pt-month-grid tbody tr:nth-child(even) td { background: #eaf5f0; }
  /* Pas de mise en avant du jour / de la prochaine prière à l'impression : la ligne
     du jour suit la même alternance que les autres, sans distinction. */
  .pt-month-grid tr.is-today td { font-weight: normal; }
  .pt-month-grid tr.is-today td.pt-next-cell { background: transparent; color: inherit; font-weight: normal; }
  @page { size: auto; margin: 10mm; }
}

/* Bloc de conversion vers l'app (objectif n°1 : téléchargements) */
/* Invocations (adhkar) : carte arabe + traduction */
.dua-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 14px 0;
}
.dua-ar {
  direction: rtl;
  text-align: right;
  font-size: 1.3rem;
  line-height: 2;
  color: var(--brand-ink);
  margin: 0 0 10px;
}
.dua-tr { margin: 0 0 12px; font-style: italic; color: var(--muted); }
.dua-fr { margin: 0; }
.dua-note { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }

.app-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
  box-shadow: 0 8px 24px rgba(28, 43, 39, 0.08);
}
.app-cta-icon { width: 64px; height: 64px; border-radius: 15px; flex-shrink: 0; }
.app-cta-body strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--brand-ink);
}
.app-cta-body p { margin: 6px 0 14px; color: var(--muted); text-align: left; }

@media (max-width: 560px) {
  .app-cta { flex-direction: column; align-items: flex-start; }
}

.hajj-steps { margin: 12px 0 8px; padding-left: 20px; }
.hajj-steps li { margin-bottom: 10px; color: var(--muted); }
.hajj-steps li strong { color: var(--txt); }

/* ---------- Outil « Convertisseur hégirien » ---------- */

.converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0 28px;
}
.converter-grid .pt-tool { margin: 0; }
.converter-today {
  margin-top: 8px;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.converter-today:hover { text-decoration: underline; }
.converter-result { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.converter-value { font-family: var(--font-heading); font-size: 1.3rem; color: var(--brand-ink); margin: 0; }
.converter-ah { font-size: 0.9rem; color: var(--muted); font-weight: 400; }

@media (max-width: 720px) {
  .converter-grid { grid-template-columns: 1fr; }
}

/* ---------- Outil « Qibla » ---------- */

.qibla-result { margin-top: 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.qibla-compass { flex-shrink: 0; }
.qibla-compass-svg { width: 120px; height: 120px; }
.qibla-compass-ring { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.qibla-compass-n { fill: var(--muted); font-size: 14px; font-weight: 600; }
.qibla-compass-needle { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.qibla-compass-tip { fill: var(--accent); }
.qibla-compass-hub { fill: var(--brand-ink); }
.qibla-bearing { font-family: var(--font-heading); font-size: 1.2rem; color: var(--brand-ink); margin: 0 0 6px; }
.qibla-distance { color: var(--muted); margin: 0; }

/* ---------- Outil « Compteur de Dhikr » ---------- */

.dhikr-tool { text-align: center; }
.dhikr-tool .pt-field { max-width: 420px; margin: 0 auto 24px; text-align: left; }
.dhikr-tap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.dhikr-tap:active { transform: scale(0.96); }
.dhikr-at-target .dhikr-tap { background: var(--icon-bg); }
.dhikr-arabic { font-size: 1.3rem; color: var(--brand-ink); max-width: 180px; line-height: 1.3; }
.dhikr-count-row { display: flex; align-items: baseline; gap: 4px; }
.dhikr-count { font-family: var(--font-heading); font-size: 2.6rem; color: var(--brand-ink); line-height: 1; }
.dhikr-target { font-size: 1.1rem; color: var(--muted); }
.dhikr-meta { max-width: 480px; margin: 22px auto 0; }
.dhikr-translit { font-style: italic; color: var(--txt); margin: 0 0 6px; }
.dhikr-translation { color: var(--muted); margin: 0; }
.dhikr-cycles { margin: 10px 0 0; color: var(--accent); font-weight: 600; min-height: 1.2em; }
.dhikr-reset {
  margin-top: 20px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--txt);
  font: inherit;
  cursor: pointer;
}
.dhikr-reset:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Blog ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.blog-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--txt);
  overflow: hidden;
}
.blog-card:hover { border-color: var(--accent); }

/* Bannière géométrique (SVG inline, voir blog_banner_svg dans generate.py) —
   pleine largeur sur une page article, en bandeau sur une carte de la grille. */
.blog-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  margin: 0 0 24px;
}
.blog-banner svg { display: block; width: 100%; height: auto; }
.blog-card .blog-banner {
  margin: -20px -22px 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.blog-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}
.blog-card h2, .blog-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--brand-ink);
  margin: 0 0 8px;
}
.blog-card p { color: var(--muted); font-size: 0.92rem; margin: 0 0 10px; }
.blog-card-meta { font-size: 0.8rem; color: var(--muted); }

.blog-article-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 24px;
}
.blog-article-meta .blog-card-tag { margin-bottom: 0; }
.blog-article-body h2 { font-size: 1.18rem; margin: 34px 0 10px; color: var(--accent-dark); }
.blog-article-body h3 { font-size: 1rem; margin: 20px 0 6px; }

/* ---------- Outil « Calculateur de Zakat » ---------- */

.zakat-tool .pt-controls { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.zakat-hint-link { font-size: 0.8rem; margin: 4px 0 0; }
.zakat-hint-link a { color: var(--accent); }
.zakat-result { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.zakat-due { font-family: var(--font-heading); font-size: 1.3rem; color: var(--brand-ink); margin: 0 0 6px; }
.zakat-detail, .zakat-hint { color: var(--muted); margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .hero { padding: 48px 0 36px; }
  .app-hero { padding: 44px 0 28px; }
  .app-hero .app-icon { width: 96px; height: 96px; border-radius: 22px; }
}
