@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg: #0b0f14;
  --card: #121a24;
  --card-2: #0f151d;
  --border: #1e2833;
  --text: #e7ecef;
  --muted: #7c8894;
  --green: #00d97e;
  --green-dim: #0a3d2c;
  --amber: #f2b705;
  --amber-dim: #4a3a06;
  --danger: #ff5c5c;
  --danger-dim: #4a1616;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px 64px;
}

.wrap {
  width: 100%;
  max-width: 440px;
  flex: 1 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.brand .mark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--green);
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.brand .sub {
  color: var(--muted);
  font-size: 13px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
}

.tabs {
  display: flex;
  gap: 4px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.tabs button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.tabs button.active {
  background: var(--green);
  color: #04120c;
}

label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 6px;
}

label.first { margin-top: 0; }

select, input {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

select:focus, input:focus {
  border-color: var(--green);
}

input::placeholder { color: #4a5560; font-family: 'Inter', sans-serif; }

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.rate-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  margin: 18px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

.methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.methods label.method {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
}

.methods input[type="radio"] { display: none; }

.method-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

input[type="radio"]:checked + .method-box {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(242, 183, 5, 0.08);
}

.btn {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #04120c;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  display: none;
}

/* ---- Ecran d'attente / confirmation ---- */

.pending-card {
  display: none;
}

.send-info {
  margin-bottom: 14px;
  background: var(--amber-dim);
  border: 1px solid var(--amber);
  border-radius: 10px;
  padding: 4px 14px;
}

.send-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.send-info-row + .send-info-row {
  border-top: 1px dashed rgba(242, 183, 5, 0.35);
}

.send-info-label {
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 600;
}

.send-info-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
  text-align: right;
}

.value-with-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.contact-row:last-child { border-bottom: none; }

.contact-row .k { color: var(--muted); }
.contact-row .v { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.amounts {
  margin: 18px 0;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.amounts .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.amounts .row .label { color: var(--muted); font-size: 13px; }
.amounts .row .value { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 16px; }
.amounts .row .value.usdt { color: var(--green); }
.amounts .row .value.mga { color: var(--amber); }

.amounts .row.payment-row { padding-bottom: 2px; }

.payment-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 6px;
}

.payment-table td {
  padding: 8px 4px;
  font-size: 13.5px;
  border-bottom: 1px dashed var(--border);
}

.payment-table tr:last-child td { border-bottom: none; }

.payment-table td:first-child {
  color: var(--muted);
  font-weight: 600;
  width: 38%;
}

.payment-table td:last-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.countdown-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 28px 0 10px;
}

.ring {
  position: relative;
  width: 140px;
  height: 140px;
}

.ring svg { transform: rotate(-90deg); width: 140px; height: 140px; }

.ring circle {
  fill: none;
  stroke-width: 8;
}

.ring .track { stroke: var(--border); }

.ring .progress {
  stroke: var(--green);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.ring .center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 30px;
}

.ring .center.symbol {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
}

.status-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.status-text.pending { color: var(--muted); }
.status-text.ok { color: var(--green); }
.status-text.cancelled { color: var(--danger); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pill.pending { background: var(--card-2); color: var(--muted); border: 1px solid var(--border); }
.pill.accepted { background: var(--green-dim); color: var(--green); }
.pill.rejected, .pill.expired { background: var(--danger-dim); color: var(--danger); }

/* ---- Admin panel ---- */

.admin-wrap { max-width: 760px; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-contact {
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}

.req-list { display: flex; flex-direction: column; gap: 12px; }

.req-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.req-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.req-name { font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.req-time { color: var(--muted); font-size: 11px; margin-top: 2px; }

.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13px;
  margin-bottom: 14px;
}

.req-grid .k { color: var(--muted); }
.req-grid .v { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.req-actions { display: flex; gap: 10px; }

.req-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.req-actions .accept { background: var(--green); color: #04120c; }
.req-actions .reject { background: var(--danger); color: #2a0808; }

.empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
  font-size: 14px;
}

/* ---- Onglets de formulaire (client) : afficher/masquer les panneaux ---- */

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

/* ---- Bouton déconnexion (admin) ---- */

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0 0;
  font-family: 'Inter', sans-serif;
}

.link-btn:hover { color: var(--text); }

/* ---- Rangée d'onglets + bouton effacer historique (admin) ---- */

.admin-tabs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-tabs {
  margin-bottom: 0;
  flex: 1;
}

.btn.danger-outline {
  width: auto;
  margin-top: 0;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.btn.danger-outline:hover {
  background: rgba(255, 92, 92, 0.08);
}

.btn.secondary.cancel-btn {
  border-color: var(--danger);
  color: var(--danger);
}

.btn.secondary.cancel-btn:hover {
  background: rgba(255, 92, 92, 0.08);
}

/* ---- Page d'accueil (landing) ---- */

.landing-card {
  text-align: center;
}

.landing-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}

a.btn {
  display: block;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

a.btn.secondary { margin-top: 12px; }

/* ---- Upload de documents (inscription / KYC) ---- */

.upload-box {
  background: var(--card-2);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.upload-box:hover { border-color: var(--green); }

.upload-box.filled { border-style: solid; border-color: var(--green); }

.upload-text {
  color: var(--muted);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.upload-preview {
  display: block;
  max-width: 100%;
  max-height: 160px;
  margin: 10px auto 0;
  border-radius: 8px;
  object-fit: cover;
}

/* ---- Navigation des pages de service (Binance / PayPal) ---- */

.service-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

/* ---- Grille des services (tableau de bord client) ---- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

.service-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.service-card:hover { border-color: var(--green); transform: translateY(-2px); }

.service-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.service-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}

.service-desc {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
  min-height: 32px;
}

/* ---- Onglets principaux de l'admin (Demandes / Inscriptions) ---- */

.admin-main-tabs { margin-bottom: 20px; }

.badge {
  display: inline-block;
  background: var(--danger);
  color: #2a0808;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 6px;
}

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

/* ---- Badge de service sur les cartes de demandes (admin) ---- */

.svc-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---- Photos KYC dans le panneau admin ---- */

.kyc-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kyc-image-item .k {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.kyc-image-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* ---- Bouton "Historique" (client) dans l'en-tête ---- */

.history-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-btn .dot {
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(242, 183, 5, 0.25);
}

.history-btn.has-pending .dot { display: inline-block; }

/* ---- Modale "Historique de mes opérations" (client) ---- */

.history-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  align-items: flex-start;
  justify-content: center;
  padding: 70px 16px 24px;
  overflow-y: auto;
}

.history-modal.open { display: flex; }

.history-panel {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.history-header h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
}

.history-close {
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.history-close:hover { color: var(--text); }

.history-actions {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 14px;
}

.history-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.history-clear-btn:hover {
  color: #f87171;
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

.history-clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 70vh;
  overflow-y: auto;
}

.history-item {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.history-item:hover { border-color: var(--green); }

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.history-item-type {
  font-weight: 700;
  font-size: 13px;
}

.history-item-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

.history-item-date {
  font-size: 11px;
  color: var(--muted);
}

.pill.pending.live {
  color: var(--amber);
  border-color: var(--amber);
  animation: historyPulse 1.4s ease-in-out infinite;
}

@keyframes historyPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---- Modale d'agrandissement des photos KYC ---- */

.img-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.img-modal.open {
  display: flex;
}

.img-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.img-modal-close {
  position: absolute;
  top: 18px;
  right: 28px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

/* ---- Animation de l'anneau pendant la vérification KYC ---- */

@keyframes spin-ring {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

.ring .progress.spin {
  animation: spin-ring 2s linear infinite;
  stroke-dasharray: 90 190;
  transform-origin: 70px 70px;
}

@media (max-width: 480px) {
  .service-grid { grid-template-columns: 1fr; }
  .kyc-images { grid-template-columns: repeat(3, 1fr); }
  /* #ratesGridWithdraw/#ratesGridDeposit ont un style inline
     (grid-template-columns: repeat(3, 1fr)) plus prioritaire que
     n'importe quelle règle .req-grid classique : on doit forcer
     avec !important pour que ça passe bien sur mobile/tablette étroite. */
  #ratesGridWithdraw, #ratesGridDeposit { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 360px) {
  #ratesGridWithdraw, #ratesGridDeposit { grid-template-columns: 1fr !important; }
}

/* ---- Sous-titres des sections de taux (retrait / dépôt) ---- */

.rates-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.rates-subtitle .hint {
  display: inline;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  text-transform: none;
  margin-left: 4px;
}

/* ==========================================================================
   Fond d'arrière-plan — Logo MadaPayExchange (assets/madapay-bg.png)
   Image officielle rognée : seul le bloc logo + "MadaPay Exchange" est
   conservé (bandeaux services/badges retirés), bords fondus en transparence.
   Ajouté sur toutes les pages client (index, login, register, services,
   binance, paypal, wise, payoneer, redopay). Le panneau admin
   (admin.html / admin-login.html) n'est volontairement PAS concerné.
   ========================================================================== */

body.money-bg {
  position: relative;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 650px at 6% -8%, rgba(0, 217, 126, 0.14), transparent 55%),
    radial-gradient(ellipse 820px 780px at 102% 12%, rgba(242, 183, 5, 0.12), transparent 52%),
    url("assets/madapay-bg.png");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
  background-position: top left, top right, center 130px;
  background-size: auto, auto, min(880px, 96vw) auto;
}

/* Voile léger : le logo est déjà atténué dans l'image elle-même
   (filigrane), donc ce voile sert juste à unifier les couleurs. */
body.money-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,15,20,0.25) 0%, rgba(11,15,20,0.30) 40%, rgba(11,15,20,0.55) 75%, rgba(11,15,20,0.70) 100%);
  pointer-events: none;
  z-index: 0;
}

body.money-bg .wrap {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Compatibilité mobile / tablette / bureau
   ========================================================================== */

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

body {
  overflow-x: hidden;
}

.wrap,
.admin-wrap {
  width: 100%;
}

@media (max-width: 380px) {
  body { padding: 20px 12px 48px; }
  .card { padding: 18px; }
  .methods { grid-template-columns: 1fr 1fr; }
  .req-grid { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
  .wrap { max-width: 460px; }
  .admin-wrap { max-width: 820px; }
}

@media (min-width: 1200px) {
  body { padding-top: 56px; }
}

/* ==========================================================================
   En-tête fixe du site — logo MadaPayExchange à gauche,
   navigation / onglets dynamiques à droite.
   Présent sur toutes les pages client. Absent du panneau admin.
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(11, 15, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-header-logo {
  height: 34px;
  width: auto;
  display: block;
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-height: 22px;
}

.site-header-nav .link-btn {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

.site-header-nav .hint {
  margin: 0;
  white-space: nowrap;
}

body.has-site-header {
  padding-top: 84px;
  padding-bottom: 0;
}

@media (max-width: 480px) {
  .site-header { padding: 8px 14px; gap: 10px; }
  .site-header-logo { height: 26px; }
  .site-header-nav { gap: 10px; }
  body.has-site-header { padding-top: 66px; padding-bottom: 0; }
}

/* ---- Avatar client (photo de profil ronde) dans l'en-tête du site ---- */

.client-avatar-wrap {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.client-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--text);
}

.client-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--green);
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.client-avatar-initial {
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}

.client-avatar-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .client-avatar-name { display: none; }
}

/* ---- Modale : changer la photo de profil / mot de passe oublié ---- */

.simple-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.simple-modal.open {
  display: flex;
}

.simple-modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
}

.simple-modal-box h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.avatar-modal-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 2px solid var(--green);
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.avatar-modal-preview .client-avatar-initial {
  font-size: 32px;
}

.simple-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.simple-modal-actions .btn,
.simple-modal-actions .btn.secondary {
  flex: 1;
  margin-top: 0;
}

/* ==========================================================================
   Pied de page du site — à propos, contact / support, crédit développeur.
   Présent sur toutes les pages client. Absent du panneau admin.
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 20px;
  padding: 18px 20px 14px;
  background: none;
}

.site-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.site-footer-about {
  flex: 0 1 auto;
  width: 100%;
}

.site-footer-about h4 {
  text-align: center;
}

.site-footer-contact {
  flex: 0 1 auto;
  width: 100%;
  text-align: center;
}

.site-footer-contact ul {
  align-items: center;
}

.site-footer-contact li {
  flex-direction: row;
  justify-content: center;
}

.site-footer-credit {
  flex-basis: 100%;
  width: 100%;
}

.site-footer-inner h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 10px;
}

.site-footer-about p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  margin: 0;
}

.site-footer-contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}

.site-footer-contact li a {
  color: var(--text);
  text-decoration: none;
}

.site-footer-contact li a:hover {
  color: var(--green);
}

.site-footer-contact .ficon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green-dim);
  color: var(--green);
}

.site-footer-contact .ficon svg {
  width: 16px;
  height: 16px;
}

.site-footer-credit {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  letter-spacing: 0.01em;
}

.footer-legal-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11.5px;
}

.footer-legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: var(--green);
  text-decoration: underline;
}

.footer-legal-links .sep {
  color: var(--border);
}

/* ---- Pages légales (confidentialité, cookies) ---- */

.legal-updated {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

.legal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 26px 0 10px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-content ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal-content li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.legal-content strong {
  color: var(--text);
}

.legal-content a {
  color: var(--green);
}

.site-footer-credit b {
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}

/* Marque d'auteur intégrée au code source (non affichée visuellement,
   ne pas supprimer : voir le commentaire en tête de chaque fichier HTML). */
.credit-mark {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 700px) {
  .site-footer-inner {
    max-width: 720px;
  }
}

/* Bascule afficher / masquer le mot de passe */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0;
}

.password-toggle:hover {
  color: var(--green);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

/* ==========================================================================
   Bouton "copier" (email / numéro) — footer, pages légales, écran d'envoi
   lors d'un dépôt/retrait. Voir copy-utils.js pour la logique JS.
   ========================================================================== */

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-2);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.copy-btn:hover { color: var(--green); border-color: var(--green); }

.copy-btn svg { width: 13px; height: 13px; display: block; }

.copy-btn .mp-icon-check { display: none; }

.copy-btn.mp-copied {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dim);
}

.copy-btn.mp-copied .mp-icon-copy { display: none; }
.copy-btn.mp-copied .mp-icon-check { display: block; }

.send-info-value .copy-btn,
.copy-inline-wrap .copy-btn {
  margin-left: 8px;
}

/* ===========================================================
   Bandeau de présentation MadaPayExchange — affiché à côté
   des modales de dépôt / retrait sur les pages de service.
   (Ajout — n'affecte aucun style existant ci-dessus.)
   =========================================================== */

.mp-page-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 36px;
  width: 100%;
  max-width: 980px;
  flex: 1 0 auto;
  flex-wrap: wrap-reverse;
}

.mp-page-layout > .wrap {
  max-width: 440px;
  flex: 1 1 380px;
}

.mp-promo {
  flex: 1 1 420px;
  max-width: 460px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 34px 32px;
  position: sticky;
  top: 28px;
}

.mp-promo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 14px;
}

.mp-promo-title .mp-promo-highlight {
  color: var(--green);
}

.mp-promo-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.mp-promo-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

/* ---- Bloc confiance : moyens acceptés / disponibilité / avis Trustpilot ---- */

.mp-promo-trust {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 22px;
  margin-bottom: 28px;
  border-top: 1px dashed var(--border);
}

.mp-promo-accept-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
}

.mp-promo-accept-logos {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.accept-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.accept-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.accept-badge .brand-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.accept-orange { color: #ff7a1a; }
.accept-orange .dot { background: #ff7a1a; }

.accept-mvola { color: #17c964; }
.accept-mvola .light { font-weight: 500; color: var(--muted); }

.accept-airtel { color: #ed1c24; }
.accept-airtel .dot { background: #ed1c24; }

.mp-promo-sla {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mp-promo-sla-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  color: var(--text);
}

.mp-promo-sla-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.mp-promo-trustpilot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mp-promo-trustpilot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-promo-trustpilot-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}

.mp-promo-trustpilot-label .star-icon {
  color: var(--green);
}

.mp-promo-trustpilot-score {
  font-size: 12px;
  color: var(--muted);
}

.mp-promo-stars {
  display: flex;
  gap: 4px;
  color: var(--green);
  font-size: 22px;
  line-height: 1;
}

/* ---- Formulaire d'avis client (étoiles cliquables) ---- */

.mp-promo-rate-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.mp-promo-rate-label {
  font-size: 12.5px;
  color: var(--muted);
}

.mp-promo-rate-stars {
  display: flex;
  gap: 4px;
}

.rate-star {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--border);
  cursor: pointer;
  transition: color .1s ease, transform .1s ease;
}

.rate-star:hover,
.rate-star:focus-visible {
  transform: translateY(-1px);
}

.rate-star.hovered,
.rate-star.selected {
  color: var(--green);
}

.mp-promo-rate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-promo-rate-form textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
}

.mp-promo-rate-form textarea::placeholder {
  color: var(--muted);
}

.mp-promo-btn.small {
  padding: 8px 16px;
  font-size: 12.5px;
  align-self: flex-start;
}

.mp-promo-rate-msg {
  font-size: 12.5px;
  color: var(--green);
}

.mp-promo-rate-msg.error {
  color: #ff5d6c;
}

.mp-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.mp-promo-btn.primary {
  background: var(--green);
  color: #04120c;
}

.mp-promo-btn.primary:hover { transform: translateY(-1px); }

.mp-promo-btn.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.mp-promo-btn.secondary:hover { border-color: var(--green); color: var(--green); }

.mp-promo-visual {
  position: relative;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-promo-core {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 45px -15px rgba(0, 217, 126, 0.35);
  z-index: 2;
}

.mp-promo-core img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.mp-promo-icon {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fff;
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.mp-promo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mp-promo-icon.pos-tl { top: 4px; left: 10%; }
.mp-promo-icon.pos-tr { top: 0; right: 8%; }
.mp-promo-icon.pos-br { bottom: 10px; right: 0; }
.mp-promo-icon.pos-bl { bottom: 18px; left: 2%; }

@media (max-width: 900px) {
  .mp-page-layout { gap: 24px; }
  .mp-promo { position: static; }
}

@media (max-width: 560px) {
  .mp-promo { padding: 26px 22px; }
  .mp-promo-title { font-size: 22px; }
}
