/* Le Waqf – site web. Charte reprise de l'appli mobile (lewaqf-android/lib). */

/* ---------- Polices hébergées sur le site (licence OFL, voir /polices) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/polices/poppins-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/polices/poppins-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/polices/poppins-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/polices/poppins-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/polices/poppins-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/polices/poppins-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/polices/poppins-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/polices/poppins-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alexandria"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/polices/alexandria-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alexandria"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/polices/alexandria-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Bases ---------- */
:root {
  --bleu: #013593;
  --bleu-clair: #3879af;
  --violet: #9360d5;
  --degrade: linear-gradient(to bottom right, var(--bleu), var(--bleu-clair));
  --degrade-special: linear-gradient(to bottom right, var(--bleu), var(--violet));
  --fond: #f5f5f5;
  --texte: #1f2933;
  --discret: #5f6368;
  --ombre: 0 3px 6px rgb(0 0 0 / 12%);
  --poppins: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --alexandria: "Alexandria", "Poppins", system-ui, sans-serif;
  --hauteur-barre: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #e6ebf3;
  color: var(--texte);
  font: 16px/1.45 var(--poppins);
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--bleu); }
svg { fill: currentColor; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }

.reserve { position: absolute; width: 0; height: 0; overflow: hidden; }

.masque {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Colonne de l'appli : pleine largeur sur mobile, centrée sur ordinateur. */
.appli {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--fond);
  box-shadow: 0 0 40px rgb(1 53 147 / 12%);
}

.appli > main, #vue-mosquee { flex: 1; }

.chargement { margin: auto; padding: 48px 16px; color: var(--discret); text-align: center; }

.contenu { padding: 20px 16px; }

/* ---------- En-tête en dégradé ---------- */
.entete {
  position: relative;
  overflow: hidden;
  padding: max(20px, env(safe-area-inset-top)) 16px 16px;
  border-radius: 0 0 50px 50px;
  background: var(--degrade);
  color: #fff;
  text-align: center;
}

/* Motif de l'appli à 10 % d'opacité */
.entete::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/pattern.webp") center / cover;
  opacity: 0.1;
  pointer-events: none;
}

.entete > * { position: relative; }

.entete__haut {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  text-align: left;
}

.entete__date { font-weight: 600; }

.entete__changer {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  color: var(--bleu);
}

.entete__changer svg { width: 24px; height: 24px; }

.entete__logo { display: block; width: 60px; height: 60px; margin: 0 auto 8px; }

.entete__titre { margin-bottom: 16px; font-size: 22px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.entete__titre--seul { margin-bottom: 36px; }
.entete__sous-titre { font-size: 16px; font-weight: 600; }
.entete__libelle { margin-bottom: 8px; font-size: 18px; font-weight: 700; }
.entete__texte { margin-bottom: 16px; }
.entete__texte--gras { font-family: var(--alexandria); font-weight: 700; }

.entete--court { padding-bottom: 28px; }
.entete--court .entete__titre { margin-bottom: 4px; }

.entete--plein {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}

.entete--plein .entete__titre { font-family: var(--alexandria); }

.progression { margin-top: 4px; padding: 4px; border-radius: 10px; background: #fff; }
.progression__fond { height: 10px; overflow: hidden; border-radius: 6px; background: #e0e0e0; }
.progression__barre { width: 0; height: 100%; background: var(--bleu); transition: width 0.6s ease; }

.entete__dons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 8px 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Boutons ---------- */
.bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  text-align: center;
  text-decoration: none;
}

.bouton--blanc {
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 10px 16px;
  border-radius: 40px;
  background: #fff;
  color: var(--bleu);
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

.bouton--degrade {
  padding: 15px;
  border-radius: 12px;
  background: var(--degrade);
  color: #fff;
  font-size: 20px;
}

.bouton--degrade:disabled { background: #9e9e9e; opacity: 0.6; cursor: not-allowed; }

.bouton--gris {
  padding: 18px;
  border-radius: 8px;
  background: #eee;
  color: #616161;
  font-size: 18px;
  font-weight: 700;
}

.bouton--bleu, .bouton--bleu-clair {
  padding: 16px 8px;
  border-radius: 10px;
  color: #fff;
  font-family: var(--alexandria);
  font-size: 18px;
  font-weight: 700;
}

.bouton--bleu { background: var(--bleu); }
.bouton--bleu-clair { background: #2f6a9b; }

.bouton--contour {
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--bleu);
  font-family: var(--alexandria);
  font-weight: 700;
  box-shadow: 0 1px 4px rgb(0 0 0 / 30%);
}

.bouton--contour svg { width: 20px; height: 20px; }

.contenu--boutons { display: grid; gap: 16px; padding-top: 32px; }

/* ---------- Liste des mosquées ---------- */
.derniere {
  display: block;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--degrade);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--ombre);
}

.derniere__libelle { display: block; font-size: 13px; opacity: 0.9; }
.derniere__titre { display: block; font-family: var(--alexandria); font-weight: 700; }

.recherche {
  width: 100%;
  padding: 12px;
  border: 1px solid #c4c9d1;
  border-radius: 8px;
  background: #fff;
}

.liste {
  margin-top: 12px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ombre);
}

.liste:empty { display: none; }

.liste li + li { border-top: 1px solid #e3e6ea; }

.liste a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  color: var(--bleu);
  font-family: var(--alexandria);
  font-weight: 700;
  text-decoration: none;
}

.liste a:hover { background: #f1f5fb; }

.pastille { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #d32f2f; }
.pastille--partenaire { background: #2e9e45; }

.message-vide { padding: 4px 0 12px; }

/* ---------- Accueil ---------- */
.titre-section { margin-bottom: 16px; color: var(--bleu); font-size: 20px; font-weight: 700; line-height: 1.3; }
.titre-section--centre { margin: 4px 0 20px; text-align: center; }

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Bloc spécial : contour en dégradé qui tourne, comme dans l'appli */
.bloc-special {
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 20px;
  background: conic-gradient(from var(--angle), var(--bleu), var(--violet));
  animation: tourner 5s linear infinite;
}

@keyframes tourner {
  to { --angle: 360deg; }
}

.bloc-special__carte {
  display: block;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: #000;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--ombre);
}

.bloc-special__titre {
  display: block;
  margin-bottom: 4px;
  background: var(--degrade-special);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.bloc-special__texte { display: block; font-size: 14px; white-space: pre-line; }

.actualites { display: grid; gap: 16px; }

.actualite {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  margin: 0 3%;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--ombre);
  transition: margin 0.25s ease;
}

.actualite--ouverte { margin: 0; }
.actualite--depliable { cursor: pointer; }

.actualite__titre { margin-bottom: 4px; color: var(--bleu); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

.actualite__texte {
  display: -webkit-box;
  overflow: hidden;
  color: var(--discret);
  font-size: 14px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.actualite--ouverte .actualite__texte { display: block; -webkit-line-clamp: none; line-clamp: none; }

.actualite__pied {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.actualite__suite {
  padding: 0;
  border: 0;
  background: none;
  color: var(--bleu);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

.actualite__date { margin-left: auto; color: #6b6b6b; font-size: 12px; font-weight: 600; text-align: right; }

/* ---------- Ma mosquée ---------- */
.pilules { display: flex; gap: 8px; padding: 20px 16px 10px; }

.pilule {
  flex: 1;
  padding: 12px;
  border: 1.3px solid rgb(1 53 147 / 40%);
  border-radius: 10px;
  background: transparent;
  color: var(--bleu);
  font-size: 14.5px;
  font-weight: 700;
}

.pilule[aria-selected="true"] { background: var(--degrade); color: #fff; }

.anneau { position: relative; max-width: 260px; margin: 0 auto; }
.anneau svg { display: block; width: 100%; fill: none; }

.anneau__total {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.financier .titre-section { margin-top: 24px; }

.besoin {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
}

.besoin__puce { flex: none; width: 20px; height: 20px; border-radius: 50%; background: currentColor; }
.besoin--entretien { color: var(--bleu); }
/* Texte un peu plus foncé que le bleu clair de la charte, pour rester lisible sur fond blanc. */
.besoin--energie { color: #2f6a9b; }
.besoin--energie .besoin__puce { background: var(--bleu-clair); }

.services { display: grid; gap: 12px; }

.service {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 150px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
}

.service__titre { margin-bottom: 6px; color: var(--bleu); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.service__mission { color: rgb(0 0 0 / 87%); font-size: 15px; font-weight: 500; white-space: pre-line; overflow-wrap: anywhere; }
.service__infos { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.service__info { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.service__info svg { flex: none; width: 18px; height: 18px; color: var(--bleu); }
.service__info--contact svg { color: var(--bleu-clair); }

.services-vide {
  padding: 30px 0 40px;
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
  text-align: center;
}

/* ---------- Barre du bas ---------- */
/* La barre est fixe : on lui réserve sa place sous le pied de page. */
.avec-barre .appli { padding-bottom: calc(var(--hauteur-barre) + env(safe-area-inset-bottom)); }

.barre {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  display: flex;
  width: 100%;
  max-width: 600px;
  height: calc(var(--hauteur-barre) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  box-shadow: 0 -2px 8px rgb(0 0 0 / 8%);
  transform: translateX(-50%);
}

.barre__lien {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: none;
  color: #424242;
  font-family: var(--alexandria);
  font-size: 12px;
  text-decoration: none;
}

.barre__lien svg { width: 24px; height: 24px; }
.barre__lien[aria-current="page"] { color: var(--bleu); font-weight: 600; }
.barre__lien[aria-current="page"] svg { fill: url("#degrade"); }
.barre__lien--don { color: #000; }
.barre__lien--don svg { width: 44px; height: 44px; fill: url("#degrade"); }

/* ---------- Pied de page ---------- */
.pied {
  display: grid;
  gap: 8px;
  padding: 24px 16px 28px;
  color: var(--discret);
  font-size: 13px;
  text-align: center;
}

.pied__liens { display: flex; justify-content: center; gap: 12px; }

.pied__liens a {
  padding: 8px 16px;
  border: 1.3px solid rgb(1 53 147 / 40%);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.erreur-texte { font-size: 17px; font-weight: 600; text-align: center; }

/* ---------- Volet du don et fenêtres ---------- */
dialog { border: 0; padding: 0; color: var(--texte); }
dialog::backdrop { background: rgb(0 0 0 / 45%); }

.volet {
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  margin: auto auto 0;
  overflow-y: auto;
  border-radius: 50px 50px 0 0;
  background: #fff;
}

.volet__contenu {
  display: grid;
  gap: 16px;
  padding: 28px 30px calc(28px + env(safe-area-inset-bottom));
}

.volet__titre { color: var(--bleu); font-size: 22px; font-weight: 700; text-align: center; }
.volet__titre:focus { outline: none; }
.volet__sous-titre { margin-top: -10px; color: var(--discret); font-size: 18px; text-align: center; }

.montant { position: relative; }

.montant__euro {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--bleu-clair);
  font-size: 22px;
  font-weight: 600;
  transform: translateY(-50%);
}

.montant__champ {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: 1px solid #8a8f98;
  border-radius: 8px;
  color: var(--bleu);
  font-size: 18px;
}

.montant__champ::placeholder { color: #767676; }

.suggestions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.suggestion {
  padding: 15px 0;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  color: var(--bleu);
  white-space: nowrap;
}

.suggestion[aria-pressed="true"] { border-color: var(--bleu); background: #eef3fb; }

.volet__erreur { min-height: 1.45em; margin: -6px 0; color: #b3261e; font-size: 14px; font-weight: 600; text-align: center; }
.volet__erreur:empty { display: none; }

.volet__mention { color: var(--discret); font-size: 14px; text-align: center; }
.volet__mention a { font-weight: 600; }

.fenetre {
  width: calc(100% - 32px);
  max-width: 420px;
  padding: 24px;
  border-radius: 20px;
  font-family: var(--alexandria);
}

.fenetre__titre { margin-bottom: 16px; color: var(--bleu); font-size: 22px; font-weight: 700; text-align: center; }
.fenetre__texte { margin-bottom: 20px; white-space: pre-line; }
.fenetre__actions { display: grid; gap: 12px; }

/* Message bref en bas de l'écran (« Message copié ») */
.annonce {
  position: fixed;
  z-index: 30;
  right: 16px;
  bottom: 24px;
  left: 16px;
  max-width: 568px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 8px;
  background: #2e7d32;
  color: #fff;
  font-family: var(--alexandria);
  text-align: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
}

/* ---------- Pages de retour du paiement (merci, annulé) ---------- */
.bandeau {
  padding: max(18px, env(safe-area-inset-top)) 16px 18px;
  background: var(--degrade);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.retour {
  display: grid;
  flex: 1;
  align-content: center;
  justify-items: center;
  gap: 20px;
  padding: 32px 16px;
  background: #fff;
  text-align: center;
}

.retour__texte, .retour__montant {
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.retour__texte { font-size: 20px; }
.retour__montant { margin-top: -10px; font-size: 30px; font-weight: 700; }

.retour__rond {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bleu);
  color: #fff;
}

.retour__rond svg { width: 50px; height: 50px; }
.retour__rond--annule { background: #8a8f98; }

.retour__boutons { display: grid; gap: 12px; width: 100%; max-width: 420px; margin-top: 10px; }
.retour .bouton--degrade { border-radius: 8px; font-weight: 700; }
.retour .pied { padding-bottom: 0; }

/* ---------- Ordinateur ---------- */
@media (min-width: 640px) {
  .volet { max-width: 480px; margin: auto; border-radius: 28px; }
  .volet__contenu { padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .bloc-special { animation: none; }
  .progression__barre, .actualite { transition: none; }
}
