/*
 * Site vitrine DaaraFlow : prolongement direct du logiciel et de ses maquettes
 * (docs/design/maquette-tableau-de-bord.png, maquettes-ecrans.png). Mêmes valeurs que
 * apps/web/src/styles.css : dégradés de la bannière et de la barre latérale, filet doré,
 * cartes blanches arrondies à 14 px, pastilles d'icônes pleines, titres en Open Sans gras,
 * citations en Lora italique, calligraphie Amiri. Ornements dessinés en SVG (nets à toute taille).
 */
@font-face {
  font-family: "Open Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/open-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/open-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/open-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/lora-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/lora-latin-400-italic.woff2") format("woff2");
}
/* Sous-ensemble d'Amiri (licence OFL) : la citation « طلب العلم فريضة على كل مسلم » et les noms des formules
   (ألف حزب جزء ختمة). Régénérer avec fontTools.subset si un texte arabe change. */
@font-face {
  font-family: "Amiri Citation";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/amiri-citation.woff2") format("woff2");
}

:root {
  --green-950: #012e20;
  --green-900: #013424;
  --green-850: #00432a;
  --green-800: #004c30;
  --green-700: #14593f;
  --green-600: #0b5a38;
  --green-100: #e3efe8;
  --gold-500: #c9a24a;
  --gold-400: #e4c57a;
  --gold-100: #f5ecd6;
  --ground: #faf9f5;
  --ground-subtle: #f2f1ea;
  --surface: #ffffff;
  --line: #eceae1;
  --line-strong: #e2dfd4;
  --ink: #023626;
  --ink-soft: #3f5c55;
  --ink-muted: #6e7a72;
  --danger: #a92e22;
  --r-panel: 14px;
  --shadow-card: 0 2px 10px rgba(2, 54, 38, 0.05), 0 1px 2px rgba(2, 54, 38, 0.04);
  --shadow-lift: 0 30px 60px -24px rgba(1, 46, 32, 0.45), 0 12px 24px -12px rgba(1, 46, 32, 0.3);
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Lora", Georgia, serif;
  --arabic: "Amiri Citation", "Amiri", "Traditional Arabic", serif;
  --gutter: 20px;
  --max: 1200px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
}
img {
  max-width: 100%;
  display: block;
}
/* Un élément masqué le reste, même quand sa classe lui donne un display. */
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}
.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.skip:focus {
  left: 10px;
}

/* ─── Boutons (ceux du logiciel) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 700 0.98rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.92rem;
}
.btn-gold {
  background: var(--gold-400);
  color: #0b2a1e;
  box-shadow: 0 6px 16px -6px rgba(201, 162, 74, 0.6);
}
.btn-gold:hover {
  background: #ecd08e;
}
.btn-outline {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.btn-outline:hover {
  border-color: var(--gold-400);
}
.btn-ghost {
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  font-weight: 600;
}
.btn-ghost:hover {
  color: var(--gold-400);
}
.btn-green {
  background: linear-gradient(180deg, #1c6b45 0%, #0f4f33 100%);
  color: #fff;
  width: 100%;
}
.btn-green:hover {
  background: linear-gradient(180deg, #1f7a4e 0%, #12583a 100%);
}
.btn[disabled] {
  opacity: 0.65;
  cursor: wait;
}

/* ─── En-tête : la barre verte du logiciel ─── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px var(--gutter);
  background: linear-gradient(90deg, var(--green-850) 0%, var(--green-800) 45%, var(--green-600) 100%);
  border-bottom: 2px solid var(--gold-500);
  color: #fff;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}
.brand img {
  width: 40px;
  height: auto;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-text span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
}
.masthead-nav {
  display: none;
  gap: 26px;
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 600;
}
.masthead-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 0;
  white-space: nowrap;
}
.masthead-nav a:hover {
  color: var(--gold-400);
}
.masthead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.masthead-actions .btn-gold {
  display: none;
}
@media (min-width: 1000px) {
  .masthead {
    min-height: 88px;
    padding: 14px clamp(40px, 4.5vw, 80px);
  }
  .masthead .brand img {
    width: 48px;
  }
  .masthead .brand-text strong {
    font-size: 1.45rem;
  }
  .masthead .brand-text span {
    font-size: 0.95rem;
  }
  .masthead-nav {
    gap: 34px;
    font-size: 1.1rem;
  }
  .masthead-actions .btn {
    white-space: nowrap;
  }
  .masthead .btn-ghost {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0 24px;
  }
  .masthead .btn-gold.btn-small {
    min-height: 54px;
    padding: 0 28px;
    font-size: 1.1rem;
    border-radius: 12px;
  }
  .masthead-actions {
    margin-left: auto;
  }
  .masthead-actions .btn-gold {
    display: inline-flex;
  }
}

/* Les liens de navigation n'apparaissent que s'il y a la place pour eux. */
@media (min-width: 1240px) {
  .masthead-nav {
    display: flex;
  }
  .masthead-actions {
    margin-left: 22px;
  }
}

/* ─── Ouverture : la photo de la maquette (une classe, le Coran et le chapelet), le texte à gauche,
   l'ordinateur et le téléphone à droite, aux positions de la maquette (image de 1672 × 851). ─── */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--green-950);
  border-bottom: 3px solid var(--gold-500);
  color: #fff;
  padding: 44px var(--gutter) 0;
}
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  z-index: -2;
}
/* Téléphone : voile vert du haut vers le milieu pour lire le texte, photo libre en bas (le Coran). */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(1, 46, 32, 0.94) 0%, rgba(1, 46, 32, 0.86) 48%, rgba(1, 46, 32, 0.35) 78%, rgba(1, 46, 32, 0.15) 100%);
}
.hero-copy {
  max-width: 640px;
}
.hero-greeting {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-400);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(2.1rem, 8.6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}
.hero-motto {
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}
.hero-motto span {
  white-space: nowrap;
}
.hero-motto i {
  font-style: normal;
  color: var(--gold-400);
  margin: 0 7px;
}
.hero-lead {
  margin-top: 20px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 38rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.hero-actions .btn {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.05rem;
}
.hero-actions .btn-outline {
  background: rgba(1, 46, 32, 0.55);
  border-color: rgba(228, 197, 122, 0.65);
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  font-size: 1rem;
  font-weight: 600;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-point-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-400);
  background: rgba(1, 46, 32, 0.45);
  color: var(--gold-400);
}
.hero-point-icon .i {
  width: 22px;
  height: 22px;
}

/* Appareils : les vrais écrans du logiciel */
.hero-devices {
  position: relative;
  margin: 40px auto 0;
  max-width: 640px;
  padding: 0 0 26px 18%;
}
.laptop {
  margin: 0;
}
.laptop-screen {
  border-radius: 12px 12px 0 0;
  border: 8px solid #141414;
  border-bottom-width: 10px;
  background: #141414;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.laptop-screen img {
  width: 100%;
  height: auto;
}
.laptop-base {
  height: 12px;
  margin: 0 -5%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #e3e1d9 0%, #9d9a90 100%);
  box-shadow: 0 16px 26px -12px rgba(0, 0, 0, 0.7);
}
.phone {
  margin: 0;
  border-radius: 26px;
  border: 6px solid #141414;
  background: #141414;
  overflow: hidden;
  box-shadow: 0 30px 50px -18px rgba(0, 0, 0, 0.75);
}
.phone img {
  width: 100%;
  height: auto;
}
.hero-phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30%;
}

/* Ordinateur : la composition exacte de la maquette, proportionnelle à la largeur. */
@media (min-width: 1000px) {
  .hero {
    min-height: calc(100vw * 851 / 1672);
    padding: 5.6vw 0 4vw 3.7vw;
  }
  .hero-photo img {
    object-position: 50% 50%;
  }
  .hero-shade {
    background: linear-gradient(90deg, rgba(1, 46, 32, 0.55) 0%, rgba(1, 46, 32, 0.25) 38%, rgba(1, 46, 32, 0) 55%);
  }
  .hero-copy {
    width: 44%;
    max-width: none;
  }
  .hero-greeting {
    font-size: clamp(1.1rem, 1.45vw, 1.5rem);
  }
  .hero h1 {
    font-size: clamp(2.3rem, 4.35vw, 5rem);
  }
  .hero-motto {
    font-size: clamp(1rem, 1.25vw, 1.35rem);
  }
  .hero-lead {
    font-size: clamp(1rem, 1.25vw, 1.35rem);
    max-width: none;
  }
  .hero-actions {
    margin-top: 2.2vw;
  }
  .hero-actions .btn {
    min-height: clamp(52px, 3.7vw, 64px);
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    padding: 0 clamp(24px, 2vw, 36px);
  }
  .hero-points {
    margin-top: 2.2vw;
    font-size: clamp(1rem, 1.15vw, 1.25rem);
  }
  .hero-devices {
    position: absolute;
    inset: 0;
    margin: 0;
    max-width: none;
    padding: 0;
    /* Couche décorative posée sur toute l'ouverture : les clics passent aux boutons dessous. */
    pointer-events: none;
  }
  .hero-devices .laptop {
    position: absolute;
    left: 58.1%;
    top: 31.4%;
    width: 38.8%;
  }
  .hero-phone {
    left: 52.3%;
    top: 37.1%;
    bottom: auto;
    width: 11.1%;
    border-width: 5px;
    border-radius: 22px;
  }
}

/* ─── Bandeau des valeurs : le pied du tableau de bord ─── */
.values {
  display: grid;
  gap: 22px;
  padding: 28px var(--gutter);
  background: var(--ground-subtle);
  border-bottom: 1px solid var(--line-strong);
}
.values-brand {
  display: none;
}
.values-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.values-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}
.values-list li > span:last-child,
.values-brand > span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.values-list strong {
  font-size: 0.92rem;
  font-weight: 700;
}
.values-list li > span:last-child span,
.values-brand > span span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.value-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(1, 52, 36, 0.08);
}
.values-sign {
  width: 200px;
  height: auto;
  justify-self: center;
}
@media (min-width: 720px) {
  .values-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .values-list {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1440px) {
  .values {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 20px 40px;
  }
  .values-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 24px;
    border-right: 1px solid var(--line-strong);
  }
  .values-brand img {
    width: 34px;
    height: auto;
  }
  .values-brand strong {
    font-size: 0.95rem;
  }
  .values-list {
    display: flex;
    flex: 1;
  }
  .values-list li {
    flex: 1 1 0;
    padding: 0 22px;
    border-right: 1px solid var(--line-strong);
  }
  .values-sign {
    margin-left: auto;
    width: 220px;
  }
}

/* ─── Sections ─── */
.section {
  padding: 72px var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}
.section-tint {
  max-width: none;
  background: var(--ground-subtle);
}
.section-tint > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}
.section-head h2 {
  font-size: clamp(1.65rem, 4vw, 2.3rem);
}
.section-head p {
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 16px auto 0;
  background: var(--gold-500);
}
@media (min-width: 1000px) {
  .section {
    padding: 96px 40px;
  }
}

/* Cartes blanches du logiciel */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
}

/* Pastilles d'icônes pleines (cartes de chiffres du tableau de bord) */
.disc {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: var(--disc);
  box-shadow: 0 0 0 5px var(--disc-halo);
}
.disc .i {
  width: 24px;
  height: 24px;
}
.disc[data-tone="green"] {
  --disc: var(--green-700);
  --disc-halo: #d9eadf;
}
.disc[data-tone="teal"] {
  --disc: #1e7070;
  --disc-halo: #d8ecec;
}
.disc[data-tone="gold"] {
  --disc: #b9892c;
  --disc-halo: #f4e6c4;
}
.disc[data-tone="amber"] {
  --disc: #c2861c;
  --disc-halo: #f6e9cf;
}
.disc[data-tone="clay"] {
  --disc: #b45a38;
  --disc-halo: #f4e0d7;
}
.disc-small {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 0 4px var(--disc-halo);
}
.disc-small .i {
  width: 22px;
  height: 22px;
}

/* ─── Fonctionnalités ─── */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.feature {
  padding: 26px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(2, 54, 38, 0.35);
}
.feature h3 {
  margin-top: 20px;
  font-size: 1.12rem;
}
.feature p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

/* ─── Citation : la carte verte du tableau de bord, en grand ─── */
.quote-band {
  padding: 0 var(--gutter);
}
.quote-card {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  max-width: 760px;
  padding: 118px 32px 128px;
  border-radius: 18px;
  border: 1px solid rgba(201, 162, 74, 0.45);
  background: linear-gradient(155deg, #0d4735 0%, #082c21 100%);
  color: #f7f5ee;
  text-align: center;
  box-shadow: var(--shadow-lift);
}
.quote-arch {
  position: absolute;
  inset: 18px 18px 0;
  width: calc(100% - 36px);
  height: calc(100% - 18px);
}
.quote-card blockquote {
  position: relative;
  margin: 0;
}
.quote-fr {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.45;
  max-width: 22ch;
  margin: 0 auto;
}
.quote-rule {
  display: block;
  width: 64px;
  height: 2px;
  margin: 24px auto;
  background: var(--gold-400);
  opacity: 0.9;
}
.quote-ar {
  position: relative;
  font-family: var(--arabic);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.6;
  color: var(--gold-400);
}
.skyline {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.28;
}
.quote-card .skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
}

/* ─── Aperçu du logiciel ─── */
.showcase {
  display: grid;
  gap: 24px;
}
.show {
  display: grid;
  gap: 36px;
  align-items: center;
  padding: 40px 0;
}
.show + .show {
  border-top: 1px solid var(--line-strong);
}
.show-copy h2 {
  margin-top: 20px;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
}
.show-copy > p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.03rem;
  max-width: 34rem;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
  font-weight: 600;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.checks .i {
  color: var(--gold-500);
  width: 22px;
  height: 22px;
}
.browser {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}
.browser-bar {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  background: var(--ground-subtle);
  border-bottom: 1px solid var(--line);
}
.browser-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d8d3c3;
}
.browser img {
  width: 100%;
  height: auto;
}
.show-phone {
  width: min(280px, 76vw);
  justify-self: center;
}
@media (min-width: 1000px) {
  .show {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 64px;
    padding: 64px 0;
  }
  .show-flip {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  .show-flip .show-copy {
    order: 2;
  }
  .show-flip .show-phone {
    order: 1;
  }
}

/* ─── Tarifs : le parcours du Coran (Alif, Hizb, Juz', Khatma), lus en direct ─── */
.plans {
  display: grid;
  gap: 20px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  border-radius: 18px;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
.plan:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -26px rgba(2, 54, 38, 0.45);
}
.plan-head {
  min-height: 124px;
}
.plan-ar {
  font-family: var(--arabic);
  font-size: 2.6rem;
  line-height: 1.1;
  color: var(--gold-500);
}
.plan-name {
  margin-top: 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: 0;
}
.plan-meaning {
  margin-top: 2px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}
/* Barre du parcours : se remplit quand la carte apparaît. */
.plan-track {
  height: 4px;
  margin: 18px 0 20px;
  border-radius: 4px;
  background: var(--ground-subtle);
  overflow: hidden;
}
.plan-track-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), var(--gold-500));
  transform-origin: left center;
}
.plan-track-fill.step-1 {
  width: 25%;
}
.plan-track-fill.step-2 {
  width: 50%;
}
.plan-track-fill.step-3 {
  width: 75%;
}
.plan-track-fill.step-4 {
  width: 100%;
}
.plan-who {
  font-weight: 600;
  color: var(--ink-soft);
}
.plan-price {
  margin-top: 10px;
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green-700);
  line-height: 1.1;
}
.plan-price small {
  margin-left: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-muted);
}
.plan-year {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.plan-list {
  list-style: none;
  margin: 22px 0 26px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
}
.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.plan-list .i {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--green-700);
}
.plan .btn {
  margin-top: auto;
  width: 100%;
}
.btn-plan {
  border-color: var(--green-700);
  color: var(--green-700);
  background: transparent;
}
.btn-plan:hover {
  background: var(--green-700);
  color: #fff;
}
/* Khatma : l'aboutissement du parcours, en vert profond et or. */
.plan-summit {
  background: linear-gradient(160deg, #0d4735 0%, #082c21 100%);
  border-color: rgba(201, 162, 74, 0.55);
  color: #fff;
}
.plan-summit .plan-ar {
  color: var(--gold-400);
}
.plan-summit .plan-meaning,
.plan-summit .plan-who,
.plan-summit .plan-year,
.plan-summit .plan-price small {
  color: rgba(255, 255, 255, 0.75);
}
.plan-summit .plan-price {
  color: var(--gold-400);
}
.plan-summit .plan-track {
  background: rgba(255, 255, 255, 0.12);
}
.plan-summit .plan-list {
  border-top-color: rgba(255, 255, 255, 0.14);
}
.plan-summit .plan-list .i {
  color: var(--gold-400);
}
.plans-wait {
  text-align: center;
  color: var(--ink-soft);
}
.plans-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px !important;
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.95rem;
}
.plans-note .i {
  color: var(--gold-500);
}
@media (min-width: 720px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1160px) {
  .plans {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ─── Étapes ─── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.steps li {
  padding: 28px 24px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  color: var(--green-700);
  font-family: var(--serif);
  font-size: 1.35rem;
}
.steps h3 {
  margin-top: 18px;
  font-size: 1.1rem;
}
.steps p {
  margin-top: 8px;
  color: var(--ink-soft);
}
@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

/* ─── Questions ─── */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px !important;
}
.faq details {
  padding: 0 22px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  font-weight: 700;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .i {
  color: var(--gold-500);
  transition: transform 0.2s ease;
}
.faq details[open] summary .i {
  transform: rotate(180deg);
}
.faq details p {
  padding-bottom: 20px;
  color: var(--ink-soft);
}

/* ─── Créer mon Daara : la mise en scène de l'écran de connexion ─── */
.signup {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 80px var(--gutter) 0;
  background: linear-gradient(160deg, var(--green-850) 0%, #013a27 60%, var(--green-950) 100%);
  border-top: 3px solid var(--gold-500);
  text-align: center;
}
.signup-arabesque {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.signup-card {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 34px 26px 30px;
  text-align: left;
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
}
.signup-head {
  text-align: center;
  margin-bottom: 24px;
}
.signup-head img {
  width: 48px;
  height: auto;
  margin: 0 auto 12px;
}
.signup-head h2 {
  font-size: 1.7rem;
}
.signup-head p {
  margin-top: 8px;
  color: var(--ink-soft);
}
.signup form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}
.field-row {
  display: grid;
  gap: 14px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fbfbf8;
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: #1f7045;
  box-shadow: 0 0 0 3px rgba(31, 112, 69, 0.15);
}
.signup .btn-green {
  margin-top: 6px;
}
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-error {
  color: var(--danger);
  font-weight: 600;
}
.form-done {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--ink);
  font-weight: 600;
}
.form-done .i {
  color: var(--green-700);
  margin-top: 2px;
}
.signup-foot {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}
.signup-skyline {
  max-width: 720px;
  margin: 28px auto 0;
  opacity: 0.3;
}
@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* ─── Pied de page : la barre latérale du logiciel ─── */
.footer {
  position: relative;
  overflow: hidden;
  padding: 56px var(--gutter) 0;
  background: linear-gradient(180deg, var(--green-900) 0%, var(--green-950) 55%, #003323 100%);
  color: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 36px;
  justify-items: center;
  text-align: center;
}
.footer-quote {
  position: relative;
  width: 272px;
  padding: 84px 22px 34px;
  text-align: center;
}
.footer-arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.footer-quote p {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.5;
  color: #fff;
}
.footer-quote .quote-rule {
  margin: 18px auto 0;
  width: 48px;
}
.footer-main {
  display: grid;
  gap: 18px;
  justify-items: center;
}
.footer-main nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
}
.footer-main nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.footer-main nav a:hover {
  color: var(--gold-400);
}
.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-skyline {
  width: min(100%, 640px);
  opacity: 0.18;
}
@media (min-width: 1000px) {
  .footer {
    grid-template-columns: 290px 1fr;
    align-items: end;
    text-align: left;
    padding: 56px 40px 0;
    justify-items: stretch;
  }
  .footer-main {
    justify-items: start;
    padding-bottom: 36px;
  }
  .footer-main nav {
    justify-content: flex-start;
  }
  .footer-skyline {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* ─── Pages de texte (confidentialité, page introuvable) ─── */
.text-page {
  max-width: calc(760px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 56px var(--gutter) 80px;
}
.text-page h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}
.text-page .lead {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.text-page h2 {
  margin-top: 36px;
  font-size: 1.25rem;
}
.text-page p {
  margin-top: 10px;
  color: var(--ink-soft);
}
.text-page .btn {
  margin-top: 24px;
}

/* Planche de symboles SVG de la page (silhouette de la ville) */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mouvement. Une seule courbe pour tout le site (départ vif, arrivée douce),
   des durées courtes, rien en boucle. « Réduire les animations » coupe tout.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* En-tête : plus compact et ombré une fois la page défilée. */
.masthead {
  transition: min-height 0.3s var(--ease), padding 0.3s var(--ease), box-shadow 0.3s ease;
}
.masthead.is-scrolled {
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.55);
}
@media (min-width: 1000px) {
  .masthead.is-scrolled {
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Ouverture : la photo recule doucement, le texte monte ligne à ligne, puis les appareils. */
@keyframes hero-photo {
  from {
    transform: scale(1.04);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes rise-right {
  from {
    opacity: 0;
    transform: translate(40px, 24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-photo img {
  animation: hero-photo 1.8s var(--ease) both;
}
.hero-copy > * {
  animation: rise 0.9s var(--ease) both;
}
.hero-copy > :nth-child(1) {
  animation-delay: 0.15s;
}
.hero-copy > :nth-child(2) {
  animation-delay: 0.25s;
}
.hero-copy > :nth-child(3) {
  animation-delay: 0.4s;
}
.hero-copy > :nth-child(4) {
  animation-delay: 0.5s;
}
.hero-copy > :nth-child(5) {
  animation-delay: 0.62s;
}
.hero-copy > :nth-child(6) {
  animation-delay: 0.74s;
}
.hero-devices .laptop {
  animation: rise-right 1.1s var(--ease) 0.45s both;
}
.hero-devices .hero-phone {
  animation: pop 1s var(--ease) 0.85s both;
}

/* Boutons : la flèche avance, le bouton doré s'éclaire. */
.btn .i {
  transition: transform 0.25s var(--ease);
}
.btn:hover .i {
  transform: translateX(4px);
}
.btn-gold {
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.btn-gold:hover {
  box-shadow: 0 10px 24px -8px rgba(201, 162, 74, 0.75);
  transform: translateY(-1px);
}

/* Pastilles d'icônes : un léger mouvement au survol de la carte. */
.disc {
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}
.feature:hover .disc {
  transform: scale(1.08) rotate(-4deg);
}
.value-icon {
  transition: transform 0.3s var(--ease), background-color 0.3s ease;
}
.values-list li:hover .value-icon {
  transform: translateY(-3px);
  background: var(--green-700);
}

/* Captures du logiciel : elles se soulèvent un peu au survol. */
.browser,
.show-phone {
  transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
}
.show:hover .browser,
.show:hover .show-phone {
  transform: translateY(-6px);
}

/* Questions : la réponse glisse à l'ouverture. */
.faq details[open] p {
  animation: rise 0.45s var(--ease) both;
}

/* Apparitions au défilement (seulement si le script a pu s'exécuter : classe .motion). */
.motion [data-reveal]:not([data-stagger]),
.motion [data-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.motion [data-reveal].is-visible:not([data-stagger]),
.motion [data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}
/* Cascade : chaque carte arrive un peu après la précédente. */
.motion [data-stagger].is-visible > :nth-child(2) {
  transition-delay: 0.08s;
}
.motion [data-stagger].is-visible > :nth-child(3) {
  transition-delay: 0.16s;
}
.motion [data-stagger].is-visible > :nth-child(4) {
  transition-delay: 0.24s;
}
.motion [data-stagger].is-visible > :nth-child(5) {
  transition-delay: 0.32s;
}
.motion [data-stagger].is-visible > :nth-child(6) {
  transition-delay: 0.4s;
}
/* Une fois arrivée, une carte réagit tout de suite au survol (sans le délai de la cascade). */
.motion [data-stagger].is-visible > :hover {
  transition-delay: 0s;
  transition-duration: 0.35s;
}
/* Aperçus : le texte vient de côté, la capture de l'autre. */
.motion .show[data-reveal] {
  transform: none;
}
.motion .show[data-reveal] .show-copy {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.motion .show[data-reveal] > figure {
  opacity: 0;
  transform: translateX(40px) scale(0.98);
  transition: opacity 1s var(--ease) 0.12s, transform 1s var(--ease) 0.12s;
}
.motion .show-flip[data-reveal] .show-copy {
  transform: translateX(30px);
}
.motion .show-flip[data-reveal] > figure {
  transform: translateX(-40px) scale(0.98);
}
.motion .show.is-visible .show-copy,
.motion .show.is-visible > figure {
  opacity: 1;
  transform: none;
}
/* Le filet doré sous les titres s'étire. */
.motion .section-head h2::after {
  transform: scaleX(0);
  transition: transform 0.9s var(--ease) 0.25s;
}
.motion .section-head.is-visible h2::after {
  transform: scaleX(1);
}
/* L'arc de la citation se dessine. */
.motion .quote-card .quote-arch path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 2.2s var(--ease) 0.2s;
}
.motion .quote-card.is-visible .quote-arch path {
  stroke-dashoffset: 0;
}
/* Tarifs : la barre du parcours se remplit, de l'Alif à la Khatma. */
.motion .plans .plan-track-fill {
  transform: scaleX(0);
  transition: transform 1.2s var(--ease) 0.35s;
}
.motion .plans.is-visible .plan-track-fill {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ─── Annuaire « Trouver un Daara » et fiche d'un Daara ─── */
.masthead-nav a[aria-current="page"] {
  color: var(--gold-400);
}
.dir-page {
  min-height: 60vh;
}
.dir-search {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 18px;
}
@media (min-width: 640px) {
  .dir-search {
    grid-template-columns: 220px 1fr;
  }
}
.dir-search select,
.dir-search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.dir-status {
  text-align: center;
  color: var(--ink-soft);
  margin: 6px auto 22px;
}
.dir-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.dir-card {
  padding: 0;
}
.dir-card-link {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}
.dir-card-link:hover,
.dir-card-link:focus-visible {
  box-shadow: inset 0 0 0 2px var(--gold-500);
}
.dir-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dir-card-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}
.dir-card-disc {
  flex-shrink: 0;
}
.dir-card-title h3 {
  margin: 0;
  font-size: 1.12rem;
  color: var(--ink);
}
.dir-card-place {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}
.dir-card-place .i {
  width: 16px;
  height: 16px;
  color: var(--gold-500);
}
.dir-card-motto {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}
.dir-card-programs {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-700);
}
.dir-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-weight: 700;
  color: var(--green-700);
}
.dir-card-more .i {
  width: 16px;
  height: 16px;
}

.fiche {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 0 56px;
}
.fiche-cover {
  position: relative;
  isolation: isolate;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 28px var(--gutter);
  background: linear-gradient(160deg, var(--green-850) 0%, #013a27 60%, var(--green-950) 100%);
  border-bottom: 3px solid var(--gold-500);
  overflow: hidden;
}
.fiche-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.fiche-cover:has(.fiche-cover-img)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(1, 46, 32, 0.92) 0%, rgba(1, 46, 32, 0.45) 60%, rgba(1, 46, 32, 0.2) 100%);
}
.fiche-ident {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}
.fiche-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
}
.fiche-ident h1 {
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  line-height: 1.15;
}
.fiche-place {
  margin: 6px 0 0;
  color: var(--gold-400);
  font-weight: 600;
}
.fiche-body {
  display: grid;
  gap: 28px;
  padding: 28px var(--gutter) 0;
}
@media (min-width: 960px) {
  .fiche-body {
    grid-template-columns: 1fr 460px;
    align-items: start;
  }
}
.fiche-main {
  display: grid;
  gap: 16px;
}
.fiche-motto {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--green-700);
}
.fiche-programs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fiche-programs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 600;
  font-size: 0.93rem;
}
.fiche-programs .i {
  width: 16px;
  height: 16px;
}
.fiche-text p {
  margin: 0 0 12px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 68ch;
}
.fiche-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fiche-actions .btn-outline {
  border-color: var(--green-700);
  color: var(--green-850);
  background: transparent;
}
.fiche-actions .btn-outline:hover {
  border-color: var(--gold-500);
}
.fiche-form {
  margin: 0;
  max-width: none;
}
.fiche-back {
  padding: 24px var(--gutter) 0;
}
.fiche-back a {
  color: var(--green-700);
  font-weight: 600;
}

/* ─── Bibliothèque publique ─── */
.lib-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 10px;
}
.lib-filters button {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font: 600 0.93rem var(--sans);
  cursor: pointer;
}
.lib-filters button.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.lib-site-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  align-content: start;
}
.lib-site-audio {
  width: 100%;
}
