:root {
  --primary:#7c3aed;
  --primary-dark:#5b21b6;
  --secondary:#ec4899;
  --dark:#171522;
  --text:#292638;
  --muted:#777386;
  --light:#f7f5fb;
  --white:#ffffff;
  --border:#e8e4ef;
  --shadow:0 10px 35px rgba(42,24,70,.10);
  --radius:20px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 28px;
  padding-top: 8px;
}

.footer-links button {
  background: transparent;
  border: none;
  color: #c4b5d6;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-links button:hover {
  color: #fff;
}

.footer-content {
  display: none;
  max-width: 700px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #d4cde0;
}

.footer-content p {
  margin-bottom: 12px;
}

.footer-content p:last-child {
  margin-bottom: 0;
}

.footer-content a {
  color: #e9d5ff;
  text-decoration: underline;
}

.footer-content strong {
  color: #fff;
}

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

html {
  scroll-behavior:smooth;
}

body {
  font-family:Arial,Helvetica,sans-serif;
  background:var(--light);
  color:var(--text);
  line-height:1.5;
}

/* =========================
   HEADER
========================= */

header {
  position:sticky;
  top:0;
  z-index:2000;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}

.header-inner {
  max-width:1250px;
  margin:0 auto;
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 20px;
  gap:16px;
}

/* LOGO */

.logo-aupygo {
  position:relative;
  display:inline-flex;
  align-items:center;
  font-size:28px;
  font-weight:900;
  letter-spacing:-2px;
  cursor:pointer;
  user-select:none;
  flex-shrink:0;
}

.logo-a {color:#7c3aed}
.logo-u {color:#9333ea}
.logo-p {color:#c026d3}
.logo-y {color:#ec4899}
.logo-g {color:#f472b6}
.logo-o {color:#f9a8d4}

.location-pin {
  position:absolute;
  right:-6px;
  top:-4px;
  width:11px;
  height:11px;
  background:linear-gradient(135deg,#7c3aed,#ec4899);
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
}

.location-pin::after {
  content:"";
  position:absolute;
  width:4px;
  height:4px;
  background:#fff;
  border-radius:50%;
  top:3.5px;
  left:3.5px;
}

/* NAVIGATION — ICÔNES UNIQUEMENT */

nav {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:1;
  overflow-x:auto;
}

nav::-webkit-scrollbar {
  display:none;
}

nav button {
  border:0;
  background:transparent;
  width:44px;
  height:44px;
  padding:0;
  border-radius:12px;
  cursor:pointer;
  color:var(--muted);
  font-weight:600;
  font-size:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  transition:.2s;
  flex-shrink:0;
}

nav button:hover {
  background:#f4f0ff;
  color:var(--primary);
  transform:translateY(-1px);
}

nav button.active {
  background:#f0e9ff;
  color:var(--primary);
  box-shadow:inset 0 0 0 1.5px #d8c7ff;
}

nav button .icon {
  font-size:21px;
  line-height:1;
}

/* Badge FREE / STANDARD / PREMIUM */

.plan-badge {
  position:absolute;
  right:-5px;
  top:-5px;
  background:linear-gradient(135deg,#7c3aed,#ec4899);
  color:#fff;
  font-size:8px;
  font-weight:700;
  line-height:1;
  padding:4px 5px;
  border-radius:10px;
  margin:0;
  min-width:28px;
  text-align:center;
}

/* LANGUE */

.lang-select {
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px 8px;
  background:#fff;
  font-size:12px;
  color:var(--text);
  cursor:pointer;
  flex-shrink:0;
  max-width:110px;
}

/* =========================
   MAIN
========================= */

main {
  max-width:1250px;
  margin:0 auto;
  padding:30px 20px 60px;
}

.page {
  display:none;
}

.page.active {
  display:block;
}

/* HERO */

.hero {
  display:grid;
  grid-template-columns:1.1fr .9fr;
  align-items:center;
  gap:40px;
  margin-bottom:30px;
}

.hero h1 {
  font-size:clamp(36px,6vw,68px);
  line-height:.95;
  letter-spacing:-3px;
  margin:12px 0 16px;
}

.gradient {
  background:linear-gradient(135deg,#7c3aed,#ec4899);
  -webkit-background-clip:text;
  color:transparent;
}

.hero p {
  font-size:17px;
  color:var(--muted);
  max-width:520px;
  margin-bottom:12px;
}

.hero-card {
  background:#fff;
  border-radius:24px;
  padding:24px;
  box-shadow:var(--shadow);
  cursor:pointer;
  transition:.2s;
}

.hero-card:hover {
  transform:translateY(-3px);
  box-shadow:0 14px 40px rgba(42,24,70,.15);
}

.hero-visual {
  height:300px;
  border-radius:20px;
  background:
    radial-gradient(circle at 25% 25%,#f0abfc,transparent 25%),
    radial-gradient(circle at 75% 70%,#bae6fd,transparent 28%),
    linear-gradient(135deg,#ede9fe,#fdf2f8);
  display:flex;
  justify-content:center;
  align-items:center;
  position:relative;
  overflow:hidden;
}

.global-aupy {
  width:260px;
  height:260px;
  position:relative;
}

.country-person {
  position:absolute;
  width:52px;
  height:52px;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 5px 14px rgba(42,24,70,.14);
  border:3px solid #fff;
  z-index:2;
}

.face {
  font-size:30px;
  line-height:1;
}

.country-flag {
  position:absolute;
  right:-5px;
  bottom:-4px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:12px;
  box-shadow:0 2px 5px rgba(0,0,0,.15);
}

.person-1 { top:6px; left:50%; transform:translateX(-50%); }
.person-2 { top:38px; right:24px; }
.person-3 { top:100px; right:4px; }
.person-4 { bottom:38px; right:24px; }
.person-5 { bottom:6px; left:50%; transform:translateX(-50%); }
.person-6 { bottom:38px; left:24px; }
.person-7 { top:100px; left:4px; }
.person-8 { top:38px; left:24px; }

.world-symbol {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:78px;
  height:78px;
  background:#fff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px;
  box-shadow:0 8px 24px rgba(42,24,70,.16);
  border:3px solid #fff;
  z-index:5;
}

/* BOUTONS */

.btn {
  border:0;
  padding:12px 18px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
  transition:.2s;
  font-size:14px;
}

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

.btn-primary {
  background:linear-gradient(135deg,#7c3aed,#ec4899);
  color:#fff;
}

.btn-secondary {
  background:#eee9f8;
  color:var(--primary);
}

.btn-locked {
  background:#f3f4f6;
  color:#9ca3af;
  cursor:not-allowed;
  width:100%;
  margin-top:10px;
}

/* CARTES */

.grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:24px;
}

.card {
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
}

.card h3 {
  margin-bottom:8px;
}

.section-title {
  margin-bottom:20px;
}

.section-title h2 {
  font-size:28px;
  margin-bottom:6px;
}

.section-title p {
  color:var(--muted);
  font-size:15px;
}

/* MAP — contrôles TOUJOURS au-dessus de la carte (desktop) */

#map.page {
  position: relative;
  z-index: 1;
}

.map-top-block {
  position: relative;
  z-index: 20;
  background: var(--light);
  padding-bottom: 14px;
  margin-bottom: 4px;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.map-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.map-filter button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  min-height: 42px;
}

.map-filter button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.map-filter button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.map-zoom-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.map-control-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f5fb;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.map-control-btn:hover {
  background: #f3edff;
  color: var(--primary);
}

/* La carte est enfermée : elle ne peut pas passer devant les boutons */
.map-container {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  padding: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate; /* nouveau contexte d’empilement */
}

#mapCanvas {
  height: 420px;
  width: 100%;
  max-height: 55vh;
  border-radius: 14px;
  position: relative;
  z-index: 0;
}

/* Empêche Leaflet de passer au-dessus du reste de la page */
.leaflet-container {
  z-index: 0 !important;
  max-height: 55vh;
}

/* Leaflet panes: ne pas casser le z-index interne (marqueurs sinon invisibles) */
.leaflet-top,
.leaflet-bottom {
  z-index: 500 !important;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
  z-index: 600 !important;
}
.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}

.map-privacy {
  position: relative;
  z-index: 5;
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  box-shadow: var(--shadow);
}

.aupy-marker {
  width:44px;
  height:44px;
  border-radius:50%;
  background:#9ca3af;
  border:3px solid #fff;
  box-shadow:0 3px 12px rgba(0,0,0,.2);
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:24px;
  cursor:pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.aupy-marker:hover {
  transform: scale(1.08);
}
/* Moi — fond bleu */
.aupy-marker.me {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.45);
  border-color: #dbeafe;
  z-index: 5;
}
/* Autres — connectés (vert) */
.aupy-marker.online {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 3px 14px rgba(22, 163, 74, 0.4);
  border-color: #dcfce7;
}
/* Autres — hors ligne (rouge) */
.aupy-marker.offline {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 3px 14px rgba(220, 38, 38, 0.35);
  border-color: #fee2e2;
}
/* Petit point de statut en coin */
.aupy-marker .status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-sizing: border-box;
}
.aupy-marker.me .status-dot { background: #3b82f6; }
.aupy-marker.online .status-dot { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.aupy-marker.offline .status-dot { background: #ef4444; }
.aupy-marker {
  position: relative;
}

/* Modal fiche membre (carte) */
.member-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 21, 34, 0.55);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.member-modal-overlay.open { display: flex; }
.member-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 360px;
  width: 100%;
  padding: 24px 22px 20px;
  box-shadow: 0 20px 50px rgba(42, 24, 70, 0.25);
  position: relative;
  text-align: center;
  animation: memberPop 0.22s ease;
}
@keyframes memberPop {
  from { transform: translateY(12px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.member-modal-close {
  position: absolute; top: 12px; right: 12px;
  border: 0; background: #f3edff; color: var(--primary);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer; font-weight: 700; line-height: 1;
}
.member-modal-close:hover { background: #e9d5ff; }
.member-online {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #166534;
  background: #ecfdf5; border: 1px solid #bbf7d0;
  padding: 4px 10px; border-radius: 16px; margin-bottom: 12px;
}
.member-online .dot {
  width: 8px; height: 8px; background: #22c55e;
  border-radius: 50%; box-shadow: 0 0 6px #22c55e;
}
.member-avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, #ffd54f, #fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.35);
}
.member-modal h3 { font-size: 20px; margin: 0 0 4px; }
.member-badge { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.member-info { text-align: left; font-size: 13px; color: var(--text); margin-bottom: 8px; line-height: 1.45; }
.member-info strong { font-weight: 700; }
.member-hobbies-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.member-hobbies-row .hobby-emoji {
  width: 38px; height: 38px; border-radius: 12px; background: #f4edff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; border: 1px solid #e8e0f5;
}
.member-msg-btn {
  border: 0; background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.member-msg-btn-disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.85;
}
.member-msg-btn-disabled:hover {
  transform: none;
}
.member-friend-btn {
  border: 1px solid #d8c7ff; background: #f3edff; color: var(--primary);
  font-weight: 700; font-size: 13px; padding: 10px 14px; border-radius: 12px;
  cursor: pointer; width: 100%; margin-top: 12px;
}
.member-plan-tag {
  display: inline-block; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 10px; margin-bottom: 8px; letter-spacing: 0.04em;
}
.member-plan-tag.FREE { background: #f3f4f6; color: #6b7280; }
.member-plan-tag.STANDARD { background: #f1eafd; color: #7c3aed; }
.member-plan-tag.PREMIUM { background: linear-gradient(135deg,#7c3aed,#ec4899); color: #fff; }

/* GEO CONSENT MODAL */
.geo-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 21, 34, 0.55);
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.geo-consent-overlay.open { display: flex; }
.geo-consent-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(42, 24, 70, 0.25);
  position: relative;
  text-align: center;
  animation: memberPop 0.22s ease;
}
.geo-consent-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.2);
}
.geo-consent-modal h3 {
  font-size: 20px;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
.geo-consent-modal p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
}
.geo-consent-modal .geo-privacy-box {
  text-align: left;
  background: #f7f5fb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  margin: 14px 0 18px;
  line-height: 1.5;
}
.geo-consent-modal .geo-privacy-box strong {
  color: var(--primary);
}
.geo-consent-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.geo-consent-actions .btn {
  width: 100%;
}
.geo-consent-decline {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}
.geo-consent-decline:hover {
  color: var(--text);
}


/* PROFIL */

.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-card {
  text-align: center;
  padding: 28px 20px;
  position: sticky;
  top: 88px;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #ffd54f, #fbbf24);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 56px;
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.35);
  border: 4px solid #fff;
}

.profile-card h3 {
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.profile-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.4;
}

.profile-form-card {
  padding: 28px 28px 24px;
}

.profile-form-card h3.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 14px;
}

.form-group .hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  outline: none;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

input[readonly],
select:disabled {
  background: #f5f3f8;
  color: var(--muted);
  cursor: not-allowed;
}

select[multiple] {
  min-height: 110px;
  padding: 8px;
}

.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-option {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: 0.15s;
}

.gender-option:hover:not(:disabled) {
  border-color: #d8c7ff;
  background: #faf8ff;
}

.gender-option.selected {
  border: 2px solid var(--primary);
  background: #f4edff;
}

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

.hobby {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 4px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  transition: 0.15s;
}

.hobby:hover {
  border-color: #d8c7ff;
  background: #faf8ff;
}

.hobby .emoji {
  display: block;
  font-size: 20px;
  margin-bottom: 3px;
}

.hobby.selected {
  border: 2px solid var(--primary);
  background: #f4edff;
}

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

.lang-chip {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transition: 0.15s;
  font-family: inherit;
}

.lang-chip:hover {
  border-color: #d8c7ff;
  background: #faf8ff;
}

.lang-chip.selected {
  border: 2px solid var(--primary);
  background: #f4edff;
  color: var(--primary);
}

.profile-card-extras {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.profile-card-line {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.profile-card-line:empty {
  display: none;
}

.profile-card-hobbies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.profile-card-hobbies .hobby-emoji {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f4edff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid #e8e0f5;
}

@media (max-width: 650px) {
  .lang-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bio-counter {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 0;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
  width: 100%;
}

.btn-danger:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

/* PLANS */

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

.plan {
  background:#fff;
  border-radius:18px;
  padding:22px;
  border:1px solid var(--border);
  position:relative;
}

.plan.featured {
  border:2px solid var(--primary);
  transform:translateY(-4px);
}

.plan.active-plan {
  border:2px solid #22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.15);
}

.price {
  font-size:32px;
  font-weight:900;
  margin:10px 0;
}

.plan ul {
  padding-left:18px;
  line-height:1.8;
  color:var(--muted);
  font-size:14px;
  margin-bottom:14px;
}

.active-badge {
  position:absolute;
  top:12px;
  right:12px;
  background:#22c55e;
  color:#fff;
  font-size:10px;
  font-weight:800;
  padding:3px 8px;
  border-radius:12px;
}

/* AUTH (inscription / connexion) */

.auth-card {
  max-width:480px;
  margin-bottom:24px;
}

.auth-tabs {
  display:flex;
  gap:8px;
  margin-bottom:16px;
}

.auth-tabs button {
  flex:1;
}

.auth-status {
  font-size:14px;
}

/* EVENTS */

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

.event {
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

.event-cover {
  height:130px;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:48px;
  background:linear-gradient(135deg,#ddd6fe,#fce7f3);
}

.event-body {
  padding:16px;
}

.event-details {
  font-size:14px;
  color:var(--muted);
  margin:8px 0;
}

.event-details.locked-text {
  color:#9ca3af;
  font-style:italic;
}

.badge {
  display:inline-block;
  padding:4px 8px;
  border-radius:14px;
  background:#f1eafd;
  color:var(--primary);
  font-size:11px;
  font-weight:700;
}

.badge-paid {
  background:#fff3d6;
  color:#a16207;
}

/* CALENDRIER */

.calendar {
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}

.day {
  min-height:80px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px;
}

.day strong {
  display:block;
  margin-bottom:4px;
  font-size:13px;
}

.agenda-event {
  font-size:10px;
  padding:3px 4px;
  border-radius:5px;
  background:#eee9ff;
  color:var(--primary);
}

.locked {
  position:relative;
}

.locked::after {
  content: attr(data-lock-label);
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.88);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:var(--primary);
  border-radius:var(--radius);
  text-align:center;
  padding:16px;
  font-size:14px;
}

/* MESSAGES */

.message-box {
  display:grid;
  grid-template-columns:280px 1fr;
  height:520px;
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

.conversations {
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  background:#faf8ff;
  overflow-y:auto;
}

.conv-sidebar-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  font-weight:700;
  font-size:14px;
  background:#fff;
  position:sticky;
  top:0;
  z-index:2;
}

.btn-create-group {
  border:1px solid #d8c7ff;
  background:#f3edff;
  color:var(--primary);
  font-weight:700;
  font-size:12px;
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
}

.btn-create-group:hover {
  background:#e9d5ff;
}

.conv-section-label {
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:var(--muted);
  padding:10px 14px 4px;
}

.conv-empty {
  font-size:13px;
  color:var(--muted);
  padding:8px 14px 14px;
  margin:0;
  line-height:1.4;
}

.conversation {
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  font-size:14px;
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  transition:background 0.15s;
}

.conversation:hover {
  background:#f4edff;
}

.conversation.active {
  background:#f0e9ff;
  box-shadow:inset 3px 0 0 var(--primary);
}

.conversation .conv-avatar {
  width:40px;
  height:40px;
  border-radius:50%;
  background:linear-gradient(135deg,#ffd54f,#fbbf24);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  flex-shrink:0;
  position:relative;
}

.conversation .conv-avatar.group {
  background:linear-gradient(135deg,#7c3aed,#ec4899);
  color:#fff;
  font-size:16px;
}

.conversation .conv-meta {
  flex:1;
  min-width:0;
}

.conversation .conv-name {
  font-weight:700;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.conversation .conv-preview {
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.conversation .conv-status-dot {
  width:10px;
  height:10px;
  border-radius:50%;
  border:2px solid #fff;
  position:absolute;
  right:-1px;
  bottom:-1px;
}

.conversation .conv-status-dot.online { background:#22c55e; }
.conversation .conv-status-dot.offline { background:#ef4444; }

.chat {
  display:flex;
  flex-direction:column;
  min-height:0;
}

.chat-header {
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  font-weight:700;
  background:#fff;
}

.chat-messages {
  flex:1;
  padding:16px;
  overflow-y:auto;
  background:linear-gradient(180deg,#faf8ff 0%,#fff 40%);
}

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

/* Séparateur de date (style WhatsApp) */
.chat-date-separator {
  display: flex;
  justify-content: center;
  margin: 16px 0 12px;
  position: relative;
}
.chat-date-separator::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.chat-date-separator span {
  position: relative;
  z-index: 1;
  background: #faf8ff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(42,24,70,.06);
}

.bubble {
  max-width: 75%;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(42,24,70,.06);
}

/* Messages des autres — violet clair */
.bubble {
  background: #f3e8ff;
  color: #1e1b2e;
  border-bottom-left-radius: 4px;
  margin-right: auto;
}

/* Mes messages — bleu */
.bubble.me {
  margin-left: auto;
  margin-right: 0;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 16px;
}

.bubble .bubble-sender {
  font-size:11px;
  font-weight:700;
  color:var(--primary);
  margin-bottom:2px;
}

.chat-input {
  display:flex;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--border);
  background:#fff;
}

.chat-input input {
  flex:1;
}

.group-friends-pick {
  max-height:180px;
  overflow-y:auto;
  border:1px solid var(--border);
  border-radius:12px;
  padding:6px;
  background:#faf8ff;
}

.group-pick-item {
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
}

.group-pick-item:hover {
  background:#f0e9ff;
}

.group-pick-item.selected {
  background:#f0e9ff;
  box-shadow:inset 0 0 0 1.5px var(--primary);
}

.group-pick-item input {
  width:auto;
  margin:0;
}

/* NOTICES */

.notice {
  padding:14px;
  border-radius:12px;
  background:#f3edff;
  border:1px solid #ddd0fa;
  margin:16px 0;
  font-size:14px;
}

.notice.warning {
  background:#fff8e7;
  border-color:#fde68a;
}

.notice.security {
  background:#ecfdf5;
  border-color:#bbf7d0;
}

/* TOAST */

.toast-container {
  position:fixed;
  bottom:20px;
  right:20px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.toast {
  background:var(--dark);
  color:#fff;
  padding:12px 16px;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.2);
  font-weight:600;
  font-size:14px;
  animation:slideIn .25s ease;
  max-width:300px;
}

.toast.success {
  background:#166534;
}

.toast.error {
  background:#991b1b;
}

@keyframes slideIn {
  from { transform:translateY(16px); opacity:0; }
  to { transform:translateY(0); opacity:1; }
}

/* FOOTER */

footer {
  background:var(--dark);
  color:#fff;
  padding:36px 20px;
}

.footer-inner {
  max-width:1250px;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  gap:24px;
}

.footer-muted {
  color:#aaa4b5;
  font-size:14px;
  margin-top:6px;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:900px) {

  .hero {
    grid-template-columns:1fr;
  }

  .grid,
  .event-grid,
  .plans {
    grid-template-columns:1fr 1fr;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: static;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hobby-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(max-width:650px) {

  .header-inner {
    flex-wrap:wrap;
  }

  nav {
    order:3;
    width:100%;
    justify-content:space-around;
  }

  nav button {
    width:40px;
    height:40px;
  }

  nav button .icon {
    font-size:20px;
  }

  .plan-badge {
    font-size:7px;
    min-width:25px;
    padding:3px 4px;
  }

  main {
    padding:20px 14px 50px;
  }

  .grid,
  .event-grid,
  .plans {
    grid-template-columns:1fr;
  }

  .plan.featured {
    transform:none;
  }

  .hobby-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-form-card {
    padding: 20px 16px;
  }

  #mapCanvas {
    height: 360px;
  }

  .map-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .map-filter {
    width: 100%;
  }

  .map-filter button {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 10px 8px;
  }

  .map-zoom-btns {
    justify-content: center;
  }

  .message-box {
    grid-template-columns:1fr;
    height: min(70vh, 560px);
  }

  /* Liste visible par défaut — chat masqué jusqu'à sélection */
  .message-box .conversations {
    display: flex;
  }
  .message-box .chat {
    display: none;
  }
  .message-box.chat-open .conversations {
    display: none;
  }
  .message-box.chat-open .chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  .calendar {
    grid-template-columns:repeat(2,1fr);
  }

  .footer-inner {
    flex-direction:column;
  }

  .logo-aupygo {
    font-size:22px;
  }
}


/* =========================
   AupyGo Friend’s — badge + pulse
========================= */
.friends-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed, #ec4899);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.45);
  z-index: 5;
}
.friends-badge.show { display: flex; }

nav button.has-requests {
  animation: friendsPulse 1.8s ease-in-out infinite;
}
nav button.has-requests::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed, #ec4899, #3b82f6);
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0.55;
  animation: gradientShift 2.4s linear infinite;
}
@keyframes friendsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-accept {
  background: #dcfce7;
  color: #166534;
  border: 0;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.btn-accept:hover { background: #bbf7d0; transform: translateY(-1px); }
.btn-refuse {
  background: #fee2e2;
  color: #991b1b;
  border: 0;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.btn-refuse:hover { background: #fecaca; transform: translateY(-1px); }

.friend-request-card .status-confirmed {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
}
.friend-request-card.accepted .request-actions { display: none; }
.friend-request-card.accepted .status-confirmed { display: flex; }
.avatar-gray { filter: grayscale(1); opacity: 0.55; }
.badge-premium {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}


/* Badge messages non lus */
.messages-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
  z-index: 5;
}
.messages-badge.show { display: flex; }

nav button.has-unread-messages {
  animation: messagesPulse 1.6s ease-in-out infinite;
}
nav button.has-unread-messages::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #3b82f6);
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0.55;
  animation: gradientShift 2s linear infinite;
}
@keyframes messagesPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.guest-banner {
  position: sticky;
  top: 0;
  z-index: 1500;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg,#7c3aed,#ec4899);
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.guest-banner .btn-primary {
  background: #fff;
  color: var(--primary);
  padding: 8px 14px;
  font-size: 13px;
}
/* ===== Boutons de la page d'accueil (connecté) ===== */
.home-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}

.home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 130px;
  padding: 20px 12px;
  background: var(--card-bg, #fff);
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.home-btn:hover {
  border-color: var(--primary, #7c3aed);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}

.home-btn-icon {
  font-size: 32px;
  line-height: 1;
}

.home-btn-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1f2937);
  text-align: center;
}

.home-btn-lock {
  position: absolute;
  bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Quand la messagerie est verrouillée */
.home-btn.locked {
  opacity: 0.85;
  border-color: #fbbf24;
}

.home-btn.locked:hover {
  border-color: #f59e0b;
}


/* =========================
   HEADER ACTIONS + PLAN AVATAR
========================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-plan-btn {
  position: relative;
  border: 0;
  background: #f4f0ff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: inset 0 0 0 1.5px #d8c7ff;
  transition: .2s;
}
.header-plan-btn:hover {
  background: #ebe4ff;
  transform: translateY(-1px);
}
.header-plan-avatar {
  font-size: 20px;
  line-height: 1;
}
.header-plan-badge {
  position: absolute;
  right: -6px;
  bottom: -4px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-plan-badge.plan-free { background: #94a3b8; }
.header-plan-badge.plan-standard { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.header-plan-badge.plan-premium { background: linear-gradient(135deg, #7c3aed, #ec4899); }

/* =========================
   BOTTOM NAV (mobile)
========================= */
.bottom-nav {
  display: none; /* desktop: masqué — activé en media query */
}

.bottom-nav-btn {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px 4px;
  color: var(--muted);
  cursor: pointer;
  min-width: 0;
  transition: color .15s;
}
.bottom-nav-btn .bn-icon {
  font-size: 22px;
  line-height: 1;
}
.bottom-nav-btn .bn-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottom-nav-btn.active {
  color: var(--primary);
}
.bottom-nav-btn.active .bn-icon {
  transform: translateY(-1px);
}
.bottom-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 16px;
}
.header-plan-avatar-sm {
  font-size: 20px;
}
.header-plan-badge-sm {
  position: absolute;
  top: 2px;
  right: calc(50% - 24px);
  background: #94a3b8;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 6px;
  line-height: 1;
  text-transform: uppercase;
}
.header-plan-badge-sm.plan-standard { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.header-plan-badge-sm.plan-premium { background: linear-gradient(135deg, #7c3aed, #ec4899); }

/* =========================
   MORE SHEET (menu compte)
========================= */
.more-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(15, 10, 30, 0.45);
  align-items: flex-end;
  justify-content: center;
}
.more-sheet-overlay.open {
  display: flex;
}
.more-sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 8px 16px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0,0,0,.12);
  animation: moreSheetUp .22s ease-out;
}
@keyframes moreSheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.more-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  margin: 4px auto 14px;
}
.more-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.more-sheet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f4f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: inset 0 0 0 1.5px #d8c7ff;
}
.more-sheet-meta { flex: 1; min-width: 0; }
.more-sheet-name {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.more-sheet-plan {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.more-sheet-close {
  border: 0;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.more-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.more-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.more-sheet-item:hover,
.more-sheet-item:active {
  background: #f4f0ff;
  color: var(--primary);
}
.msi-icon { font-size: 20px; width: 28px; text-align: center; }
.more-sheet-item-plan {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  margin-top: 4px;
}
.msi-plan-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  background: #94a3b8;
  color: #fff;
  text-transform: uppercase;
}
.msi-plan-pill.plan-standard { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.msi-plan-pill.plan-premium { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.more-badge {
  margin-left: auto;
  position: static;
}

/* =========================
   RESPONSIVE — mobile first nav
========================= */
@media (max-width: 768px) {
  /* Top nav icons: trop denses → on les cache */
  header nav {
    display: none !important;
  }
  .header-inner {
    min-height: 56px;
    padding: 6px 14px;
    gap: 10px;
  }
  .logo-aupygo { font-size: 22px; }

  /* Bottom bar */
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  }

  /* Place pour la barre basse */
  main {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  body {
    padding-bottom: 0;
  }
}

@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
  /* Sur desktop, le menu "more" reste dispo via l'avatar header */
}


/* =========================
   PASS SÉJOUR (tarifs)
========================= */
.plan-price-note {
  margin: -6px 0 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.plan-pass {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  border: 1px solid #e9d5ff;
  text-align: center;
}
.plan-pass-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.plan-pass-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.plan-pass-price small {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.plan-pass-equiv {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}


/* =========================
   MESSAGERIE MOBILE + back
========================= */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-back-btn {
  display: none;
  border: 0;
  background: #f4f0ff;
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.chat-header-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .chat-back-btn { display: inline-flex; align-items: center; justify-content: center; }

  .conversation {
    padding: 14px 16px;
    min-height: 64px;
  }
  .conversation .conv-avatar {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  .conversation .conv-name {
    font-size: 15px;
  }
  .conversation .conv-preview {
    font-size: 13px;
  }

  /* Masquer les pastilles premium-only si encore en cache ancien */
  .conv-restricted-dot,
  .member-restricted-badge {
    display: none !important;
  }
}
.chat-delete-group-btn {
  border: 0;
  background: #fee2e2;
  color: #991b1b;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.chat-delete-group-btn:hover { background: #fecaca; }


/* Agenda — jour avec activité */
.calendar .day.day-has-activity {
  background: linear-gradient(145deg, #f5f3ff 0%, #fce7f3 100%);
  border: 2px solid #c4b5fd;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15), 0 4px 12px rgba(236, 72, 153, 0.12);
}
.calendar .day.day-has-activity strong {
  color: #7c3aed;
  font-weight: 800;
}
.calendar .day.day-has-activity .agenda-event {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  font-weight: 600;
}

/* Home buttons badges */
.home-btn-badge {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
  z-index: 2;
}
.home-btn-badge.show { display: block; }
.home-btn-online {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  margin-top: 2px;
}
.home-btn.nav-blink {
  animation: homeBtnPulse 1.1s ease-in-out infinite;
}
@keyframes homeBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
}
/* =========================
   MODAL GÉNÉRIQUE (base manquante pour createEventOverlay)
========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 21, 34, 0.6);
  z-index: 10060;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(4px);
}
.modal-sheet {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(42,24,70,.25);
  animation: moreSheetUp .22s ease-out;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-sheet { border-radius: 20px; }
}

/* =========================
   WIZARD SORTIES (étape par étape, mobile-first)
========================= */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px 0;
}
.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e0f3;
  transition: all .2s;
}
.wizard-dot.active {
  background: var(--primary);
  width: 22px;
  border-radius: 5px;
}
.wizard-dot.done {
  background: #c4b5fd;
}

.wizard-step-label {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 0 0;
}

.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 8px;
  -webkit-overflow-scrolling: touch;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wizardFadeIn .25s ease; }
@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-step h4 {
  font-size: 16px;
  margin-bottom: 4px;
}
.wizard-step-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.wizard-nav {
  display: flex;
  gap: 10px;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom,0px));
  border-top: 1px solid var(--border);
  background: #fff;
}
.wizard-nav .btn { flex: 1; }
#wizardBackBtn { flex: 0 0 auto; min-width: 90px; }

/* =========================
   Boutons type de sortie (emoji-pick) — n'existaient pas en CSS
========================= */
.emoji-pick {
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.emoji-pick:hover {
  border-color: #d8c7ff;
  background: #faf8ff;
  transform: translateY(-1px);
}
.emoji-pick.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg,#f4edff,#fdf2f8);
  color: var(--primary);
  box-shadow: 0 3px 10px rgba(124,58,237,.18);
}

/* =========================
   Ergonomie boutons sorties (participer / annuler / supprimer)
========================= */
.event-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: stretch;
}
.event-actions-row .btn { flex: 1; margin-top: 0; }

.btn-icon-delete {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
  width: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  transition: .15s;
}
.btn-icon-delete:hover {
  background: #fecaca;
  transform: translateY(-1px);
}
.btn-icon-delete:active {
  transform: translateY(0);
}

.event-seats {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  margin: 6px 0;
}
.event-seats.full {
  color: #dc2626;
}

/* États génériques des boutons — interactivité plus lisible partout */
.btn {
  transition: transform .15s, box-shadow .15s, background .15s, opacity .15s;
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.events-org-buttons .btn {
  min-height: 44px;
}

@media (max-width: 650px) {
  .events-org-buttons {
    flex-direction: column;
  }
  .events-org-buttons .btn {
    width: 100%;
  }
  .wizard-body {
    padding: 16px;
  }
}

/* AUPYGO — événements plus compacts */
.event-cover { height: 88px !important; font-size: 34px !important; }
.event-body { padding: 12px 14px !important; }
.event-body h3 { font-size: 15px !important; margin-bottom: 4px !important; }
.event-details { font-size: 12.5px !important; margin: 4px 0 !important; }
.event-grid { gap: 12px !important; }
@media (max-width: 900px) {
  .event-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  .event-grid { grid-template-columns: 1fr !important; }
}
.special-event-banner {
  padding: 12px 14px !important;
  border-radius: 14px !important;
  margin-bottom: 10px !important;
}
.special-event-banner h3 { font-size: 16px !important; margin: 4px 0 !important; }
.special-event-banner p { font-size: 12.5px !important; }
.special-invite-stage { width: min(300px, 88vw) !important; }
.special-invite-card { padding: 18px 16px 16px !important; border-radius: 16px !important; }
.special-invite-avatar {
  width: 52px !important; height: 52px !important;
  font-size: 26px !important; margin-bottom: 8px !important;
}
.special-invite-card h3 { font-size: 17px !important; margin: 0 0 6px !important; }
.special-invite-card .si-badge { font-size: 10px !important; margin-bottom: 4px !important; }
.special-invite-card .si-meta { font-size: 12.5px !important; margin: 2px 0 !important; }
.special-invite-card .si-desc {
  font-size: 12px !important; margin: 6px 0 12px !important;
  max-height: 4.5em; overflow: auto;
}
.special-invite-actions { gap: 8px !important; }
.special-invite-actions .btn { padding: 10px 12px !important; font-size: 13px !important; }
.special-invite-close {
  width: 30px !important; height: 30px !important; font-size: 16px !important;
  top: 8px !important; right: 8px !important;
}
.modal-sheet { max-height: 82vh !important; max-width: 420px !important; }
