/*
 * RahmaPoint — style.css v4
 * Design premium avec sections éditoriales + logo officiel
 */

:root {
  /* Couleurs principales tirées du logo */
  --green:        #4A9B6F;   /* vert logo */
  --green-dark:   #2E7A52;
  --green-light:  #A8D5BC;
  --slate:        #3A4A52;   /* gris ardoise logo */
  --red:          #C0392B;   /* accentuation urgence */
  --red-dark:     #962D22;

  /* UI */
  --bg:           #F8FAF9;
  --surface:      #FFFFFF;
  --surface2:     #F0F5F2;
  --text:         #1C2B22;
  --text-muted:   #6B7F74;
  --border:       #D8E5DE;
  --shadow:       rgba(42,90,60,.10);

  --radius:       14px;
  --header-h:     80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body.ar { direction: rtl; font-family: 'Amiri', 'DM Sans', sans-serif; }
body.map-fullscreen-active { overflow: hidden; }

/* ── Header ─────────────────────────────────── */
.header {
  background: var(--slate);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(30,50,40,.22);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  transition: opacity .2s;
}
.logo-img:hover { opacity: .85; }
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-ar {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.logo-fr {
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}

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

/* Slogan */
.tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 24px 8px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.12);
}
.tagline-ar {
  font-family: 'Amiri', serif;
  font-size: .95rem;
  color: var(--green-light);
  font-weight: 700;
  letter-spacing: .02em;
}
.tagline-sep { color: rgba(255,255,255,.3); font-size: .75rem; }
.tagline-fr  { font-size: .78rem; color: rgba(255,255,255,.6); letter-spacing: .04em; }

/* Buttons */
.lang-toggle {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .80rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.lang-toggle:hover { background: rgba(255,255,255,.22); }


.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.btn-secondary:hover { background: var(--border); }

/* ── Hero ────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--slate) 0%, #2E4A3A 60%, var(--green-dark) 100%);
  color: #fff;
  overflow: hidden;
  padding: 80px 24px 90px;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: .06;
  background: #fff;
}
.shape-1 { width: 500px; height: 500px; top: -200px; right: -150px; }
.shape-2 { width: 300px; height: 300px; bottom: -80px; left: -80px; }
.shape-3 { width: 180px; height: 180px; top: 40%; left: 42%; }

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: .80rem;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}
.hero-title { margin-bottom: 20px; }
.hero-title-ar {
  display: block;
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--green-light);
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero-title-sub {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: rgba(255,255,255,.80);
}
.hero-desc {
  font-size: clamp(.90rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.70);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.cta-btn {
  padding: 13px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform .15s, box-shadow .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.cta-primary  { background: var(--green); color: #fff; box-shadow: 0 4px 20px rgba(74,155,111,.45); }
.cta-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(74,155,111,.55); }
.cta-secondary { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.cta-secondary:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.cta-light { background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.cta-light:hover { background: rgba(255,255,255,.25); transform: translateY(-2px); }

/* ── Stats bar ───────────────────────────────── */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat { display: flex; flex-direction: column; align-items: center; padding: 16px 32px; }
.stat-num   { font-size: 1.6rem; font-weight: 700; color: var(--green); }
.stat-label { font-size: .70rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }
.stat-sep   { width: 1px; height: 32px; background: var(--border); }

/* ── Section commons ─────────────────────────── */
.section-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--green);
  margin-bottom: 10px;
}
.section-eyebrow.light { color: var(--green-light); }
.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 52px;
}

/* ── Scroll reveal ───────────────────────────── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-child {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease calc(var(--i,0) * .10s),
              transform .55s ease calc(var(--i,0) * .10s);
}
.reveal-child.visible { opacity: 1; transform: none; }

/* ── Comment aider (steps) ───────────────────── */
.how-section {
  padding: 100px 0;
  background: var(--bg);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 48px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 2px;
  background: linear-gradient(to right, var(--green-light), var(--green));
  z-index: 0;
}
.step-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 32px 22px 28px;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px var(--shadow);
  border-color: var(--green-light);
}
.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 50px;
}
.step-icon { font-size: 2.4rem; margin: 10px 0 16px; display: block; }
.step-title { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.step-desc  { font-size: .82rem; color: var(--text-muted); line-height: 1.6; }

/* ── Filtres ─────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 54px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 0; /* sous le header, dans le flux normal */
  z-index: 50;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: 24px auto 0;
  max-width: 1200px;
  border: 1px solid var(--border);
  border-bottom: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: .80rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-btn:hover  { border-color: var(--green); color: var(--green); }
.filter-btn.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

/* ── Carte ───────────────────────────────────── */
.map-section { padding-top: 6px; }

.map-wrapper {
  position: relative;
  width: 100%;
  height: 560px;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  margin: 0 auto;
  max-width: 1200px;
  border: 1px solid var(--border);
  border-top: none;
}
#map { height: 100%; width: 100%; z-index: 1; }

/* Plein écran */
.map-wrapper.fullscreen {
  position: fixed; inset: 0; z-index: 3000;
  width: 100vw; height: 100vh; height: 100dvh;
  border-radius: 0; margin: 0; max-width: none;
}

/* Actions rapides (Ma position / Actualiser / Plein écran) */
.map-quick-actions {
  position: absolute; bottom: 14px; right: 12px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
}
body.ar .map-quick-actions { right: auto; left: 12px; }
.map-action-btn {
  width: 42px; height: 42px; border: none; border-radius: 50%;
  background: #fff; color: var(--text); font-size: 1.15rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.map-action-btn:hover { background: var(--green); color: #fff; transform: scale(1.06); }
.map-action-btn:active { transform: scale(.94); }

/* Barre de recherche */
.map-search-wrapper {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: min(440px, calc(100% - 120px));
}
body.ar .map-search-wrapper { direction: rtl; }
.map-search-inner {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.16);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.map-search-inner:focus-within {
  border-color: var(--green);
  box-shadow: 0 4px 24px rgba(74,155,111,.22);
}
.map-search-icon { padding: 0 10px 0 14px; color: var(--text-muted); flex-shrink: 0; }
#mapSearchInput {
  flex: 1; border: none; outline: none;
  padding: 11px 6px; font-size: .88rem;
  font-family: inherit; color: var(--text); background: transparent;
}
#mapSearchInput::placeholder { color: var(--text-muted); }
#mapSearchClear {
  display: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-right: 8px;
  border: none; border-radius: 50%;
  background: var(--surface2); color: var(--text-muted);
  font-size: .72rem; cursor: pointer;
}
#mapSearchClear:hover { background: var(--border); }
.map-search-results {
  display: none; flex-direction: column;
  background: #fff; border-radius: 12px; margin-top: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  border: 1.5px solid var(--border); overflow: hidden;
}
.map-search-results.open { display: flex; }
.search-result-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface2); }
.search-pin  { flex-shrink: 0; font-size: .88rem; margin-top: 1px; }
.search-name { font-size: .82rem; color: var(--text); line-height: 1.4; }
.search-no-result { padding: 14px; font-size: .82rem; color: var(--text-muted); text-align: center; }

/* Style switcher */
.map-style-switcher {
  position: absolute; top: 12px; right: 12px; z-index: 500;
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(255,255,255,.95); border-radius: 12px;
  padding: 8px 6px; box-shadow: 0 4px 18px rgba(0,0,0,.16);
}
body.ar .map-style-switcher { right: auto; left: 12px; }
.style-btn {
  width: 36px; height: 36px; border: 2px solid transparent;
  border-radius: 8px; background: var(--surface2);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.style-btn:hover  { background: var(--border); transform: scale(1.08); }
.style-btn.active { border-color: var(--green); background: var(--green); }

/* Style « Dark » : tuiles OpenStreetMap assombries par filtre (aucune clé API) */
.tiles-dark {
  filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.7);
}

/* Hint */
.map-click-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 500; background: rgba(30,43,34,.76); color: #fff;
  padding: 7px 18px; border-radius: 50px; font-size: .78rem;
  pointer-events: none; white-space: nowrap; backdrop-filter: blur(4px);
  animation: hintPulse 4s ease-in-out infinite; transition: opacity .4s;
}
body.ar .map-click-hint { font-family: 'Amiri', serif; font-size: .90rem; }
@keyframes hintPulse { 0%,100% { opacity: .85; } 50% { opacity: .45; } }
.map-click-hint.hidden { opacity: 0; }

/* Marqueur temp */
.temp-marker-anim {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red); border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(192,57,43,.5);
  animation: markerDrop .35s cubic-bezier(.25,1.4,.5,1) both;
}
@keyframes markerDrop { from { transform: translateY(-40px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* Marqueur Leaflet */
.rahma-marker {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
}
.rahma-marker-inner { transform: rotate(45deg); font-size: 1rem; }

/* Leaflet popup */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,.14) !important;
  font-family: 'DM Sans', sans-serif !important;
  padding: 0 !important; overflow: hidden;
}
.leaflet-popup-content { margin: 0 !important; }
.popup-inner   { padding: 14px 18px; }
.popup-type    { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.popup-desc    { font-weight: 600; margin: 4px 0 8px; font-size: .90rem; }
.popup-confirms { font-size: .74rem; color: var(--green); font-weight: 700; margin-bottom: 8px; }
.popup-resolved { font-size: .75rem; color: var(--green); font-weight: 700; }
.popup-btn {
  background: var(--green); color: #fff; border: none;
  padding: 6px 14px; border-radius: 50px; font-size: .78rem;
  cursor: pointer; margin-right: 6px; font-family: inherit;
}
.popup-btn.green { background: var(--green-dark); }

/* ── Situations ──────────────────────────────── */
.situations-section { max-width: 1100px; margin: 0 auto; padding: 40px 24px 60px; }
.section-title {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 22px;
  border-left: 4px solid var(--green); padding-left: 14px; color: var(--text);
}
body.ar .section-title { border-left: none; border-right: 4px solid var(--green); padding-left: 0; padding-right: 14px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon  { font-size: 3.5rem; margin-bottom: 12px; }

/* Card */
.card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  animation: fadeUp .4s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px var(--shadow); }
.card.resolved { opacity: .65; }
.card-header {
  background: var(--green); color: #fff; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-type  { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.card-badge { font-size: .68rem; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 50px; }
.card-badge.resolved-badge { background: rgba(255,255,255,.35); }
.card-body    { padding: 14px 16px; }
.card-desc    { font-size: .92rem; margin-bottom: 10px; line-height: 1.5; }
.card-meta    { font-size: .75rem; color: var(--text-muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-btn {
  flex: 1; min-width: 90px; padding: 7px 10px; border-radius: 50px;
  font-size: .76rem; font-weight: 600; border: none;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: opacity .15s, transform .1s;
}
.card-btn:hover { opacity: .85; transform: scale(.98); }
.card-btn.primary { background: var(--green);   color: #fff; }
.card-btn.green   { background: var(--green-dark); color: #fff; }
.card-btn.gray    { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }

/* Confirmer */
.btn-confirm {
  display: block; width: 100%; margin-top: 10px; padding: 9px 16px;
  border: 2px solid var(--green); border-radius: 50px;
  background: transparent; color: var(--green);
  font-size: .82rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-align: center;
  transition: background .2s, color .2s, transform .1s;
}
.btn-confirm:hover:not(:disabled) { background: var(--green); color: #fff; transform: translateY(-1px); }
.btn-confirm.confirmed,
.btn-confirm:disabled {
  border-color: var(--green-light); color: var(--green);
  background: rgba(74,155,111,.08); cursor: not-allowed; opacity: .7;
}
.btn-confirm-detail {
  display: block; width: 100%; margin: 14px 0 0; padding: 12px;
  border: 2px solid var(--green); border-radius: 12px;
  background: transparent; color: var(--green);
  font-size: .92rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-align: center;
  transition: background .2s, color .2s, transform .1s;
}
.btn-confirm-detail:hover:not(:disabled) { background: var(--green); color: #fff; transform: translateY(-1px); }
.btn-confirm-detail.confirmed,
.btn-confirm-detail:disabled {
  border-color: var(--green-light); color: var(--green);
  background: rgba(74,155,111,.08); cursor: not-allowed; opacity: .7;
}

/* Badges */
.confirm-count {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .76rem; font-weight: 700; color: var(--green);
  background: rgba(74,155,111,.10); border: 1px solid var(--green-light);
  border-radius: 50px; padding: 3px 10px; margin: 6px 0 4px;
}
.confirm-count-detail { font-size: .88rem; font-weight: 600; color: var(--green); }
.expiry-badge {
  font-size: .72rem; font-weight: 600; color: #D35400;
  background: rgba(211,84,0,.08); border: 1px solid rgba(211,84,0,.22);
  border-radius: 50px; padding: 2px 8px;
}
.report-count { color: var(--red); }

/* ── À propos ────────────────────────────────── */
.about-section {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}
.about-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(74,155,111,.07);
  border: 1.5px solid var(--green-light);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 24px;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.notice-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.about-notice strong { color: var(--text); }

/* Illustration */
.about-visual { display: flex; justify-content: center; align-items: center; }
.about-illustration {
  position: relative;
  width: 320px;
  height: 320px;
}
.illu-bg-circle {
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(74,155,111,.12) 0%, transparent 70%);
  border-radius: 50%;
}
.illu-logo-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(74,155,111,.3));
}
.illu-card {
  position: absolute;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 4px 18px var(--shadow);
  white-space: nowrap;
}
.illu-icon { font-size: 1.2rem; }
.illu-c1 { top: 10px;  left: -10px; }
.illu-c2 { top: 10px;  right: -10px; }
.illu-c3 { bottom: 10px; left: -10px; }
.illu-c4 { bottom: 10px; right: -10px; }

/* ── Mission ─────────────────────────────────── */
.mission-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--slate) 0%, #2E4A3A 100%);
  color: #fff;
  text-align: center;
}
.mission-inner { max-width: 680px; margin: 0 auto; }
.mission-logo-wrap { margin-bottom: 28px; }
.mission-logo {
  height: 60px; width: auto; object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .85;
}
.mission-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700; color: #fff;
  margin-bottom: 20px;
}
.mission-text {
  font-size: 1.05rem; color: rgba(255,255,255,.75);
  line-height: 1.8; margin-bottom: 24px;
}
.mission-ar {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--green-light);
  margin-bottom: 36px;
  font-weight: 700;
}

/* ── Pourquoi RahmaPoint ─────────────────────── */
.why-section {
  padding: 100px 0;
  background: var(--bg);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
  overflow: hidden;
}
.why-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  opacity: 0;
  transition: opacity .3s;
}
.why-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px var(--shadow); border-color: var(--green-light); }
.why-card:hover::after { opacity: 1; }
.why-icon { font-size: 2.2rem; margin-bottom: 16px; display: block; }
.why-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.why-card p  { font-size: .85rem; color: var(--text-muted); line-height: 1.65; }

/* ── Footer ──────────────────────────────────── */
.footer {
  background: var(--slate);
  color: rgba(255,255,255,.6);
  padding: 48px 24px;
}
.footer-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}
.footer-logo-img {
  height: 40px; width: auto; object-fit: contain;
  filter: brightness(0) invert(1); opacity: .8;
}
.footer-name   { font-size: 1rem; font-weight: 700; color: #fff; }
.footer-slogan { font-family: 'Amiri', serif; font-size: .95rem; color: var(--green-light); margin-top: 3px; }
.footer-copy   { font-size: .80rem; margin-top: 10px; }

/* ── Modals ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,35,25,.60);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  backdrop-filter: blur(5px);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: 20px;
  padding: 28px 28px 24px;
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow-y: auto; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  animation: slideUp .3s ease both;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: .85rem; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
body.ar .modal-close { right: auto; left: 16px; }
body.ar .cta-arrow { display: inline-block; transform: scaleX(-1); }
.modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 22px; color: var(--green-dark); }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: .80rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: .90rem; color: var(--text);
  background: var(--bg); outline: none; resize: vertical;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green); }
.form-group small { display: block; margin-top: 5px; font-size: .74rem; color: var(--text-muted); }
.location-row       { display: flex; gap: 8px; }
.location-row input { flex: 1; }
.btn-locate { background: var(--green); color: #fff; border: none; width: 42px; height: 42px; border-radius: 10px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-btn {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 8px; cursor: pointer;
  font-size: .80rem; font-family: inherit; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .2s;
}
.type-btn.selected { background: var(--green); border-color: var(--green); color: #fff; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn-primary,
.modal-actions .btn-secondary { flex: 1; justify-content: center; padding: 11px; border-radius: 10px; font-size: .90rem; }
.modal-actions .btn-primary { background: var(--green); color: #fff; box-shadow: none; }
.modal-actions .btn-primary:hover { background: var(--green-dark); }

/* Modal détail */
.modal-detail { max-width: 520px; }
.detail-header { background: var(--green); color: #fff; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.detail-type   { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.detail-title  { font-size: 1.05rem; font-weight: 700; margin-top: 4px; }
.detail-section { margin-bottom: 14px; }
.detail-label  { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.detail-value  { font-size: .92rem; color: var(--text); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.detail-actions .card-btn { flex: 1; min-width: 120px; padding: 10px; font-size: .82rem; }

/* Commentaires */
.comments-section { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.comments-title   { font-size: .82rem; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
.no-comments      { font-size: .80rem; color: #999; }
.comment-item     { background: var(--surface2); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: .83rem; }
.comment-item p   { margin: 0; }
.comment-time     { font-size: .68rem; color: var(--text-muted); margin-top: 4px; }
.comment-input-row { display: flex; gap: 8px; margin-top: 10px; }
.comment-input-row input {
  flex: 1; padding: 8px 12px; border-radius: 8px;
  border: 1.5px solid var(--border); font-family: inherit;
  font-size: .82rem; background: var(--bg); color: var(--text); outline: none;
}
.comment-input-row input:focus { border-color: var(--green); }
.comment-input-row button {
  background: var(--green); color: #fff; border: none;
  border-radius: 8px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: .82rem;
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--slate); color: #fff;
  padding: 12px 24px; border-radius: 50px;
  font-size: .85rem; font-weight: 500;
  z-index: 9999; opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none; white-space: nowrap; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Auth zone */
.auth-zone { display: flex; align-items: center; gap: .5rem; }
.auth-skeleton {
  width: 140px; height: 36px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.07) 25%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.07) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.btn-google-login {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .45rem 1rem; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.10); color: #fff;
  font-size: .82rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .15s; font-family: inherit;
}
.btn-google-login:hover { background: rgba(255,255,255,.20); border-color: rgba(255,255,255,.55); transform: translateY(-1px); }
.btn-google-login--large {
  padding: .75rem 1.6rem; font-size: 1rem;
  border: 1.5px solid #dadce0; background: #fff; color: #3c4043;
  border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); margin: .5rem 0;
}
.btn-google-login--large:hover { background: #f8f9fa; box-shadow: 0 2px 6px rgba(0,0,0,.15); transform: translateY(-1px); }
.user-info   { display: flex; align-items: center; gap: .5rem; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4); }
.user-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2); color: #fff; font-weight: 700; font-size: .9rem;
}
.user-name { color: #fff; font-size: .82rem; font-weight: 500; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
  padding: .35rem .8rem; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.3);
  background: transparent; color: rgba(255,255,255,.75);
  font-size: .75rem; cursor: pointer; font-family: inherit;
  transition: background .2s;
}
.btn-logout:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Login required modal */
.modal-login-required { max-width: 400px; text-align: center; }
.login-required-body  { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: .5rem 0 1rem; }
.login-required-icon  { font-size: 3rem; }
.login-required-msg   { color: #555; font-size: .95rem; line-height: 1.55; max-width: 300px; }
.login-required-note  { color: #999; font-size: .78rem; }

/* Privacy modal */
.modal-privacy {
  max-width: 560px; padding: 0;
  overflow: hidden; display: flex; flex-direction: column; max-height: 92vh;
}
.privacy-header { background: var(--slate); color: #fff; padding: 24px 28px 20px; text-align: center; flex-shrink: 0; }
.privacy-logo   { margin-bottom: 10px; }
.privacy-title  { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.privacy-subtitle { font-size: .78rem; opacity: .7; }
.privacy-body   { overflow-y: auto; flex: 1; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.privacy-article {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; background: var(--surface2);
  border-radius: 10px; border-left: 3px solid var(--green);
}
body.ar .privacy-article { border-left: none; border-right: 3px solid var(--green); }
.art-num {
  background: var(--green); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.art-title { font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.art-text  { font-size: .78rem; color: var(--text-muted); line-height: 1.55; }
body.ar .art-title { font-family: 'Amiri', serif; font-size: .95rem; }
body.ar .art-text  { font-family: 'Amiri', serif; font-size: .90rem; }
.privacy-footer { padding: 18px 24px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; margin-bottom: 14px;
  font-size: .83rem; color: var(--text); line-height: 1.45;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkmark {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-radius: 5px; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.checkbox-label input:checked + .checkmark { background: var(--green); border-color: var(--green); }
.checkbox-label input:checked + .checkmark::after { content: '✓'; color: #fff; font-size: .75rem; font-weight: 700; }
.btn-accept {
  width: 100%; padding: 13px; background: var(--green); color: #fff;
  border: none; border-radius: 10px; font-size: 1rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background .2s, opacity .2s, transform .1s;
}
.btn-accept:disabled { opacity: .35; cursor: not-allowed; }
.btn-accept:not(:disabled):hover { background: var(--green-dark); transform: translateY(-1px); }

/* ── Responsive (mobile first — testé à 320/375/390/414/768/desktop) ── */

/* Tablette et petit desktop */
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .why-grid   { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { display: none; }
  .map-wrapper { height: 62vh; }
}

/* Téléphones (≤ 600px) — la carte est le cœur, ~72vh de hauteur */
@media (max-width: 600px) {
  :root { --header-h: 60px; }
  .logo-img { height: 30px; }
  .logo-ar  { font-size: .92rem; }
  .logo-fr  { display: none; }
  .tagline-fr { display: none; }
  .tagline-sep { display: none; }
  .header-actions { gap: 8px; }
  .btn-primary span:not(.btn-icon) { font-size: .8rem; }

  .hero { padding: 28px 18px 22px; }
  .hero-title-ar  { font-size: 1.9rem; }
  .hero-title-sub { font-size: .95rem; }
  .hero-desc { font-size: .85rem; }
  .hero-cta { gap: 10px; }
  .cta-btn { flex: 1 1 auto; justify-content: center; padding: 12px 16px; font-size: .85rem; }

  .filter-bar { margin: 0; border-radius: 0; height: 48px; padding: 0 12px; }
  .map-wrapper { height: 72vh; border-radius: 0; border-left: none; border-right: none; }
  .map-search-wrapper { width: calc(100% - 88px); top: 10px; }
  .map-style-switcher { top: 10px; padding: 6px 5px; gap: 5px; }
  .style-btn { width: 32px; height: 32px; font-size: 1rem; }
  .map-quick-actions { bottom: 10px; gap: 7px; }
  .map-action-btn { width: 40px; height: 40px; font-size: 1.05rem; }

  .how-section,
  .about-section,
  .mission-section,
  .why-section { padding: 48px 0; }
  .section-container { padding: 0 18px; }
  .steps-grid { grid-template-columns: 1fr; gap: 14px; }
  .why-grid   { grid-template-columns: 1fr; gap: 14px; }

  .cards-grid { grid-template-columns: 1fr; }
  .situations-section { padding: 32px 16px 48px; }
  .type-grid  { grid-template-columns: repeat(2, 1fr); }
  .modal      { padding: 20px 16px 16px; max-height: 88vh; }
  .user-name  { display: none; }
  .stat       { padding: 12px 16px; }
  .stat-num   { font-size: 1.3rem; }

  .card-actions { gap: 6px; }
  .card-btn { flex: 1 1 auto; font-size: .78rem; padding: 8px 10px; text-align: center; }
  .modal-actions button,
  .btn-confirm, .btn-confirm-detail { min-height: 44px; } /* cibles tactiles confortables */
}

/* Très petits écrans (320–374px) */
@media (max-width: 374px) {
  .hero-title-ar  { font-size: 1.6rem; }
  .hero-badge span { font-size: .72rem; }
  .map-wrapper { height: 70vh; }
  .map-search-wrapper { width: calc(100% - 76px); }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .stat-label { font-size: .62rem; }
}

/* Grands mobiles / phablettes (391–430px, ex: Pro Max) */
@media (min-width: 391px) and (max-width: 600px) {
  .map-wrapper { height: 74vh; }
}

/* Tablette portrait (601–768px) */
@media (min-width: 601px) and (max-width: 768px) {
  .map-wrapper { height: 58vh; }
  .steps-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
}
