/* ====================================================================
   MA VILLE — DESIGN SYSTEM OFFICIEL
   Typographie : Fraunces (Serif Luxe) & Work Sans (Sans-serif Moderne)
   Couleurs : Bleu (marque) + Or + Émeraude + Corail — palette enrichie
   pour un rendu plus vivant, avec le bleu qui reste la couleur dominante.
   ==================================================================== */

:root {
  --navy: #123A8C;      /* Bleu principal — couleur de marque */
  --navy-2: #1E4FB8;    /* Bleu principal, variante hover/dégradé */
  --paper: #FFFFFF;
  --paper-card: #FFFFFF;
  --saffron: #F2A93B;   /* Or chaleureux — accents, badges, prix, mise en avant */
  --saffron-dark: #C97D0F;
  --jade: #0F9D6E;      /* Émeraude — CTA, gratuit, succès */
  --jade-light: #34C38F;
  --coral: #DC2626;     /* Rouge — alerte/danger (universel) */
  --purple: #7C3AED;
  --ink: #101828;
  --muted: #64748B;
  --line: rgba(18, 58, 140, 0.15);
  --radius: 14px;
  --radius-lg: 20px;
  font-family: 'Work Sans', -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- SUPPORT RTL (ARABE) ---------- */
body.rtl-mode { direction: rtl; }
body.rtl-mode .tabs-inner,
body.rtl-mode .top-actions,
body.rtl-mode .selectors,
body.rtl-mode .founder-row,
body.rtl-mode .post-head,
body.rtl-mode .artisan-row-card,
body.rtl-mode .mm-icons { flex-direction: row-reverse; }
body.rtl-mode .bottom-bar { direction: rtl; }

/* ---------- SÉLECTEUR DE LANGUE ---------- */
.lang-select {
  border: none;
  font-weight: 700;
  font-size: 13px;
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.lang-select option { color: var(--ink); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, .display-serif {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: var(--navy);
}

button {
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
}

/* ---------- TOPBAR ---------- */
header.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--saffron);
}

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 2px;
}

.logo span { color: var(--saffron); }

.selectors {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  align-items: center;
}

.selectors select {
  background: var(--navy-2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  font-weight: 600;
  flex: 1 1 0;
  min-width: 0;
}

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

.pwa-btn {
  background: var(--jade-light);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
}

.icon-btn {
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- HERO: POULS DE LA VILLE (compact) ---------- */
.pulse-hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 65%, #2A5FC9 100%);
  color: #fff;
  padding: 16px 20px;
}

.pulse-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.pulse-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.pulse-head h1 {
  color: #fff;
  font-size: 19px;
  margin-bottom: 2px;
}

.pulse-head p {
  color: #cfe0ff;
  font-size: 12px;
}

.pulse-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pulse-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 1;
  min-width: 110px;
}

.trending { display: flex; gap: 6px; flex-wrap: wrap; }

/* Photo du maire mise en avant : grande, avec anneau or, bien visible */
.mayor-highlight {
  display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; padding: 10px 16px; margin: 0 0 10px;
}
.mayor-highlight img {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--saffron);
  box-shadow: 0 0 0 4px rgba(242,169,59,0.25);
}
.mayor-highlight-label { font-size: 11px; color: #cfe0ff; text-transform: uppercase; letter-spacing: 0.04em; }
.mayor-highlight-name { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 700; color: #fff; margin-top: 2px; }
.trending span {
  background: rgba(242, 169, 59, 0.18); color: var(--saffron);
  border: 1px solid rgba(242, 169, 59, 0.4);
  padding: 3px 10px; border-radius: 20px; font-size: 11px;
}
.bars { display: none; }

.pulse-card .num {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--saffron);
}

.pulse-card .lbl {
  font-size: 11px;
  color: #cfe0ff;
}

/* ---------- TABS BAR ---------- */
.tabs-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 62px;
  z-index: 90;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.tabs-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  padding: 0 24px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--saffron);
}

/* ---------- LAYOUT CONTENT ---------- */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 24px;
}

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

.panel { display: none; }
.panel.active { display: block; }

/* ---------- CARDS STYLING (STYLE ÉLÉGANT HAUT DE GAMME) ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.create-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.create-card textarea {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 60px;
}

.post-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta { flex: 1; }

.post-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.trust-badge {
  background: rgba(30, 140, 125, 0.12);
  color: var(--jade);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.gps-badge-sm {
  background: rgba(242, 169, 59, 0.15);
  color: var(--saffron-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.post-sub { font-size: 12px; color: var(--muted); }

.post-body { font-size: 14px; line-height: 1.55; margin-bottom: 12px; }

.post-img-attached {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  margin: 10px 0;
}

.post-actions-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

/* ALERTES PAYANTES (1000 FCFA / 7j) */
.alert-card { border-left: 5px solid var(--coral); }
.alert-card.warn { border-left-color: var(--saffron); }

.alert-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--coral);
}

.alert-hero-box {
  background: linear-gradient(135deg, var(--navy) 0%, #1c274c 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  border: 2px solid var(--saffron);
}

.alert-hero-box h2 { color: #fff; margin-bottom: 6px; }
.alert-hero-box p { color: #cbd5e1; font-size: 14px; margin-bottom: 14px; }

.btn-pay-alert {
  background: var(--coral);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* VOLETS INSTITUTIONNELS (4 ÉCHELONS) */
.inst-section-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.inst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.inst-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.inst-header-bg {
  height: 54px;
  padding: 8px 12px;
  display: flex;
  justify-content: flex-end;
}

.bg-mairie { background: linear-gradient(135deg, #1E4D3D, #123328); }
.bg-senat { background: linear-gradient(135deg, #581C87, #3B0764); }
.bg-district { background: linear-gradient(135deg, var(--jade), #045C29); }
.bg-region { background: linear-gradient(135deg, #A6472B, #782E19); }

.inst-tag-pill {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  height: max-content;
}

.inst-body {
  padding: 14px;
  margin-top: -26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inst-photo-lg {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 6px 16px rgba(18,58,140,0.22), 0 0 0 4px rgba(242,169,59,0.18);
}

.inst-role { font-size: 11px; font-weight: 700; color: var(--saffron-dark); text-transform: uppercase; }
.inst-name-title { font-family: 'Fraunces', serif; font-size: 17px; margin: 0; }
.inst-subtext { font-size: 12px; color: var(--muted); }

.inst-edit-btn {
  margin-top: 10px; background: var(--paper); border: 1px solid var(--line);
  color: var(--navy); font-size: 11px; font-weight: 700; padding: 6px 12px;
  border-radius: 8px; cursor: pointer;
}
.inst-edit-btn:hover { background: var(--navy); color: #fff; }

.inst-scope-footer {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 11px;
  color: var(--muted);
  background: var(--paper);
}

/* MARKETPLACE GRID */
.market-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.market-item-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.market-thumb {
  height: 140px;
  width: 100%;
  object-fit: cover;
}

.market-info { padding: 12px; }
.market-info h4 { font-size: 14px; margin-bottom: 4px; }
.market-info .m-price { font-weight: 700; color: var(--navy); font-size: 15px; margin: 6px 0; }

.m-btn {
  width: 100%;
  background: var(--jade);
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
}

/* ARTISANS */
.artisan-row-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.artisan-avatar-lg {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
}

.artisan-details h4 { font-size: 15px; margin-bottom: 2px; }
.artisan-details p { font-size: 12.5px; color: var(--muted); }

.btn-unlock-500,
.btn-unlock-free {
  background: var(--jade-light);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  margin-top: 8px;
}

.unlocked-contacts-box {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* --- MONÉTISATION TYPE FACEBOOK : gratuit + options facultatives payées par l'auteur --- */
.badge-pro {
  display: inline-block;
  background: rgba(242, 169, 59, 0.15);
  color: var(--saffron-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
}

.btn-boost-alert,
.m-btn-boost,
.btn-pro-upsell {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--navy);
  border: 1.5px dashed var(--navy);
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11.5px;
  margin-top: 8px;
  cursor: pointer;
}

.boosted-listing {
  border: 1.5px solid var(--saffron);
}

/* --- EMPLACEMENTS PUBLICITAIRES (AdSense web maintenant / AdMob natif plus tard) --- */
.ad-slot-mv {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #F7F9FC;
  padding: 10px 14px;
  margin: 12px 0;
}

.ad-slot-mv .ad-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
  display: block;
}

.btn-call {
  background: #25D366;
  color: #fff;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
}

.btn-wa {
  background: #128C7E;
  color: #fff;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
}

/* SIDEBAR RIGHT WIDGETS */
.side-widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.side-widget h3 { font-size: 16px; margin-bottom: 10px; }

/* --- Widget "Nos Réseaux" (Facebook, TikTok, LinkedIn, WhatsApp, Site web) --- */
.social-links-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.social-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink, #12151C);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.social-link-row:hover { background: #F7F9FC; border-color: var(--navy); }

.social-link-row svg { flex-shrink: 0; }

.social-fb svg { color: #1877F2; }
.social-tiktok svg { color: #12151C; }
.social-linkedin svg { color: #0A66C2; }
.social-whatsapp svg { color: #25D366; }
.social-web svg { color: var(--navy); }

.chat-box-area {
  min-height: 220px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  max-height: 300px;
  overflow-y: auto;
}

.chat-bubble-bot {
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.chat-bubble-user {
  background: var(--navy);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  text-align: right;
}

.chat-input-flex {
  display: flex;
  gap: 6px;
}

.chat-input-flex input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  outline: none;
  font-size: 13px;
}

.chat-input-flex button {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 700;
}

/* MODALES */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(22, 29, 52, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  justify-content: center; align-items: center;
  padding: 16px;
}

.modal-backdrop.active { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted);
}

.form-label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; color: var(--navy); }
.form-input, .form-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  margin-bottom: 12px;
}

.btn-submit-green {
  width: 100%;
  background: var(--jade);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}

/* BOTTOM BAR FOR MOBILE */
.bottom-bar { display: none; }

@media(max-width: 860px) {
  .bottom-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--navy);
    position: sticky;
    bottom: 0;
    padding: 8px 0;
    z-index: 100;
    border-top: 2px solid var(--saffron);
  }

  .b-item {
    background: none; border: none; color: #b9c2d9; display: flex; flex-direction: column; align-items: center; font-size: 16px;
  }
  .b-item span { font-size: 10px; margin-top: 2px; }
  .b-item.active { color: var(--saffron); }
}

/* ==================================================================== */
/* BANDE DÉROULANTE GLOBALE (Annonces Institutionnelles + Alertes) */
/* Visible sur TOUS les onglets, juste sous le header */
/* ==================================================================== */
.global-ticker-wrap {
  background: var(--navy);
  border-bottom: 3px solid var(--saffron);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  position: sticky;
  top: 68px;
  z-index: 90;
  overflow: hidden;
}
.global-ticker-label { font-size: 15px; flex-shrink: 0; }
.global-ticker { flex: 1; overflow: hidden; white-space: nowrap; }
.global-ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 35s linear infinite;
}
.global-ticker-wrap:hover .global-ticker-track { animation-play-state: paused; }
.global-ticker-track .ticker-item.is-alert .ticker-scope { background: var(--coral); color: #fff; }

@media (max-width: 860px) {
  .global-ticker-wrap { top: 0; }
}

/* ==================================================================== */
/* VOISINS CONNECTÉS (Tchat & Rencontres) */
/* ==================================================================== */
.connected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.connected-neighbor-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.connected-neighbor-card:hover { transform: translateY(-2px); border-color: var(--jade); }
.connected-neighbor-card img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; display: block;
}
.connected-neighbor-card .cn-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.connected-neighbor-card .cn-status { font-size: 10px; color: var(--jade); font-weight: 700; }
.connected-neighbor-card .cn-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--jade); margin-right: 4px;
}

/* ==================================================================== */
/* MÉTIERS & ARTISANS — FILTRES + ANNUAIRE */
/* ==================================================================== */
.pro-filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; }

/* ==================================================================== */
/* BANDE DÉROULANTE DES ANNONCES OFFICIELLES */
/* ==================================================================== */
.annonces-ticker {
  background: var(--navy);
  border-bottom: 3px solid var(--saffron);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 10px 0;
  margin-bottom: 16px;
  border-radius: 10px;
}
.ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 32s linear infinite;
}
.annonces-ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-right: 48px;
}
.ticker-item .ticker-scope {
  background: var(--saffron);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}
.ticker-empty { color: #b9c2d9; font-size: 13px; padding: 0 16px; }

/* ==================================================================== */
/* CARTES D'ANNONCES + DIAPORAMA PHOTOS/PDF */
/* ==================================================================== */
.announcement-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.announcement-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.announcement-head h4 { font-family: 'Fraunces', serif; font-size: 16px; margin: 0 0 2px; }
.announcement-scope-badge {
  background: var(--jade); color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 10px; white-space: nowrap;
}
.announcement-text { font-size: 13px; line-height: 1.55; margin-bottom: 10px; }

.slideshow { position: relative; border-radius: 10px; overflow: hidden; background: var(--navy); }
.slideshow-track { display: flex; transition: transform 0.35s ease; }
.slideshow-track img { width: 100%; flex: 0 0 100%; object-fit: cover; max-height: 260px; }
.slideshow-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(11,15,25,0.55); color: #fff; border: none;
  width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer;
}
.slideshow-nav.prev { left: 8px; }
.slideshow-nav.next { right: 8px; }
.slideshow-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.slideshow-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.slideshow-dots span.active { background: #fff; }

.pdf-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  background: var(--paper); border: 1px solid var(--line); color: var(--navy);
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 8px; text-decoration: none;
}

/* ==================================================================== */
/* GRAND ESPACE PUBLICITAIRE (DIAPORAMA D'ANNONCES PAYANTES) */
/* ==================================================================== */
.ad-carousel-wrap { margin-bottom: 16px; }
.ad-carousel-label {
  font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center;
}
.ad-carousel {
  position: relative; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  box-shadow: 0 6px 18px rgba(22,29,52,0.18);
}
/* --- Grande bande déroulante continue (façon bandeau publicitaire défilant) --- */
.ad-slide-track {
  display: flex;
  animation: ad-marquee-scroll linear infinite;
}
.ad-carousel:hover .ad-slide-track,
.ad-slide-track.paused { animation-play-state: paused; }
@keyframes ad-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ad-slide {
  display: block; position: relative; text-decoration: none; flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
}
.ad-slide img { width: 100%; height: 220px; object-fit: contain; display: block; }
.ad-slide .ad-advertiser-tag {
  position: absolute; bottom: 10px; left: 12px; background: rgba(11,15,25,0.6);
  color: #fff; font-size: 11.5px; padding: 4px 12px; border-radius: 8px;
}
.ad-carousel-empty {
  height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #b9c2d9; gap: 8px; text-align: center; padding: 0 16px;
}
.ad-dots { display: none; } /* la bande déroulante continue n'utilise plus d'indicateurs de page */
.ad-arrow { display: none; } /* ni de flèches : le défilement est automatique et continu */
.btn-ad-publish {
  background: var(--saffron); color: var(--navy); border: none; font-weight: 800;
  font-size: 11px; padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}

/* ==================================================================== */
/* BANNIÈRE MODE HORS-LIGNE (SMS) */
/* ==================================================================== */
.sms-banner {
  display: none; background: var(--coral, #E8563F); color: #fff; text-align: center;
  padding: 8px; font-size: 13px; font-weight: 600;
}
.sms-banner.show { display: block; }

/* ==================================================================== */
/* TOGGLE HORS-LIGNE + PORTE-MONNAIE (HEADER) */
/* ==================================================================== */
.offline-toggle { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #cfd6e6; }
.switch {
  width: 34px; height: 18px; background: var(--navy-2); border-radius: 20px;
  position: relative; border: 1px solid rgba(255,255,255,0.2); cursor: pointer; flex: none;
}
.switch::after {
  content: ''; position: absolute; top: 1px; left: 1px; width: 14px; height: 14px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.switch.on { background: var(--jade-light); }
.switch.on::after { transform: translateX(16px); }
.wallet-amt { font-weight: 700; color: var(--saffron); }

/* ==================================================================== */
/* SIDEBAR : PORTE-MONNAIE + RÉPUTATION */
/* ==================================================================== */
.wallet-box { background: var(--navy); color: #fff; border-radius: 10px; padding: 14px; margin-top: 10px; }
.wallet-box .amt { font-family: 'Fraunces', serif; font-size: 24px; color: var(--saffron); }
.mm-icons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mm-icons span { background: var(--navy-2); padding: 4px 8px; border-radius: 6px; font-size: 11px; }

.reputation-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rep-score {
  width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(var(--jade-light) 0% 82%, var(--line) 82% 100%);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  color: var(--navy); position: relative; flex: none;
}
.rep-score::before { content: ''; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.rep-score span { position: relative; }

/* ==================================================================== */
/* CHAT FLOTTANT (FAB) */
/* ==================================================================== */
.chat-fab {
  position: fixed; bottom: 84px; right: 18px; z-index: 60;
  background: var(--saffron); color: var(--navy); border: none;
  width: 56px; height: 56px; border-radius: 50%; font-size: 22px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
@media (min-width: 861px) { .chat-fab { bottom: 24px; } }
.chat-window {
  position: fixed; bottom: 150px; right: 18px; z-index: 60;
  width: 320px; max-width: 88vw; background: #fff; border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25); border: 1px solid var(--line);
  display: none; flex-direction: column; overflow: hidden;
}
@media (min-width: 861px) { .chat-window { bottom: 90px; } }
.chat-window.open { display: flex; }
.chat-fab-head {
  background: var(--navy); color: #fff; padding: 12px 14px; font-weight: 700; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-fab-head button { background: none; border: none; color: #fff; font-size: 16px; }
.chat-fab-body { padding: 12px; height: 260px; overflow-y: auto; font-size: 13px; background: var(--paper); }
.chat-fab-input { display: flex; border-top: 1px solid var(--line); }
.chat-fab-input input { flex: 1; border: none; padding: 10px; font-size: 13px; outline: none; }
.chat-fab-input button { background: var(--saffron); border: none; padding: 0 14px; font-weight: 700; color: var(--navy); }

/* ==================================================================== */
/* PORTEUR DU PROJET (HEADER + SIDEBAR) */
/* ==================================================================== */
.founder-badge { display: flex; align-items: center; gap: 6px; }
.founder-avatar-img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--saffron);
}
.founder-avatar-initials {
  width: 22px; height: 22px; border-radius: 50%; background: var(--saffron); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.founder-row { display: flex; align-items: center; gap: 10px; }
.founder-avatar-lg {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--saffron); flex: none;
}
.founder-avatar-initials-lg {
  width: 48px; height: 48px; border-radius: 50%; background: var(--saffron); color: #fff;
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.founder-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.founder-role { font-size: 11px; color: var(--muted); }

/* ====================================================================
   8 NOUVELLES FONCTIONNALITÉS — styles regroupés
   ==================================================================== */

/* --- 1. Confirmation communautaire des alertes --- */
.confirm-row { display: flex; gap: 8px; margin-top: 8px; }
.confirm-row button {
  flex: 1; background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 6px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.confirm-row button:hover { background: var(--jade); color: #fff; border-color: var(--jade); }

/* --- 2. SOS Voisinage --- */
.btn-sos {
  background: var(--coral); color: #fff; border: none; font-weight: 800; font-size: 13px;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; animation: sos-pulse 1.8s infinite;
}
@keyframes sos-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}
.sos-card { border-left-color: var(--coral); background: #FFF5F5; }

/* --- 3. Score de fiabilité artisans --- */
.rating-row { margin: 3px 0 6px; }
.rate-row {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px;
  font-size: 11px; color: var(--muted);
}
.star-btn {
  background: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px;
  font-size: 11px; cursor: pointer;
}
.star-btn:hover { background: var(--saffron); border-color: var(--saffron); }

/* --- 5. Mode Absence / Vigilance --- */
.vigilance-card { border-left-color: var(--purple); background: #FAF7FF; }

/* --- 6. Bons Plans --- */
.goodplan-card { border-left: 5px solid var(--jade); }

/* --- 7. Traduction des posts --- */
.translate-link {
  cursor: pointer; color: var(--navy); font-weight: 700;
}
.translate-link:hover { text-decoration: underline; }

/* --- 8. Doléances Mairie (suivi de statut) --- */
.doleance-stepper { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.doleance-step {
  flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); position: relative;
}
.doleance-step .dot {
  display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--line);
  margin: 0 auto 4px;
}
.doleance-step.done { color: var(--jade); font-weight: 700; }
.doleance-step.done .dot { background: var(--jade); }

/* ==================== ÉCRAN DE DÉMARRAGE (SPLASH SCREEN) ==================== */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#splash-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); margin-bottom: 18px; }
.splash-title {
  font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700; color: #fff; letter-spacing: 0.02em;
}
.splash-title span { color: var(--saffron); }
.splash-tagline { font-size: 13px; color: #cfe0ff; margin-top: 6px; }
.splash-spinner {
  width: 28px; height: 28px; border: 3px solid rgba(255,255,255,0.25); border-top-color: var(--saffron);
  border-radius: 50%; margin-top: 28px; animation: splash-spin 0.8s linear infinite;
}
@keyframes splash-spin { to { transform: rotate(360deg); } }
