/* ==========================================================================
   Design System : PacteNumérique.ca (pactenumerique.ca)
   Souveraineté numérique & Confidentialité zéro-connaissance
   Thème clair (Light Theme)
   ========================================================================== */

:root {
  /* Palette de couleurs en mode clair */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-active: rgba(225, 29, 72, 0.5);

  --text-main: #0f172a;       /* slate-900: texte principal haute lisibilité */
  --text-muted: #475569;      /* slate-600 */
  --text-dim: #64748b;        /* slate-500 */

  --accent-red: #e11d48;      /* rouge érable éclatant */
  --accent-red-hover: #be123c;
  --accent-red-glow: rgba(225, 29, 72, 0.15);
  --accent-red-bg: rgba(225, 29, 72, 0.08);

  --accent-indigo: #4f46e5;   /* indigo moderne */
  --accent-indigo-hover: #4338ca;
  --accent-indigo-glow: rgba(79, 70, 229, 0.15);
  --accent-indigo-bg: rgba(79, 70, 229, 0.08);

  --accent-emerald: #059669;  /* émeraude / succès */
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);
  --accent-emerald-bg: rgba(5, 150, 105, 0.08);

  --gradient-maple: linear-gradient(135deg, #e11d48 0%, #ea580c 100%);
  --gradient-aurora: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);

  /* Typographie & Espacement */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 4px 20px rgba(225, 29, 72, 0.12);
  --shadow-indigo: 0 4px 20px rgba(79, 70, 229, 0.12);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(225, 29, 72, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 55%);
  background-attachment: fixed;
}

/* Liens & Boutons */
a {
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-red);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

/* Barre de navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-emblems {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 1.35rem;
  line-height: 1;
  animation: pulse-emblems 4s ease-in-out infinite;
}

.brand-emblems .emblem-qc {
  filter: drop-shadow(0 1px 2px rgba(30, 64, 175, 0.35));
  transition: transform 0.2s ease;
}

.brand-emblems .emblem-ca {
  filter: drop-shadow(0 1px 2px rgba(225, 29, 72, 0.35));
  transition: transform 0.2s ease;
}

.brand-logo:hover .emblem-qc {
  transform: rotate(-10deg) scale(1.15);
}

.brand-logo:hover .emblem-ca {
  transform: rotate(10deg) scale(1.15);
}

@keyframes pulse-emblems {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.brand-suffix {
  color: var(--accent-red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a {
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--accent-red);
}

.btn-lang {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-sm);
}

.btn-lang:hover {
  border-color: var(--accent-red);
  background: var(--accent-red-bg);
  color: var(--accent-red);
  transform: translateY(-1px);
}

/* Bannière d'invitation privée */
.invite-alert {
  max-width: 850px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(225, 29, 72, 0.05) 100%);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.invite-badge {
  background: var(--accent-indigo);
  color: #fff;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  white-space: nowrap;
}

.invite-text h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.invite-text p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Section Héro */
.hero-section {
  max-width: 1000px;
  margin: 3.5rem auto 2.5rem;
  padding: 0 1.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.gradient-text {
  background: var(--gradient-maple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* Compteurs en temps réel */
.hero-counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 560px;
  margin: 0 auto 3rem;
}

.counter-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.counter-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

.counter-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.counter-label {
  font-size: 0.825rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Formulaire d'engagement */
.form-section {
  max-width: 760px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.pact-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.card-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group-block {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group-block:focus-within {
  border-color: rgba(225, 29, 72, 0.4);
  background: #ffffff;
}

.block-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.input-field {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
  outline: none;
}

.input-field::placeholder {
  color: #94a3b8;
}

.input-help {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.45rem;
}

.geo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: #047857;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.geo-badge.mtl {
  background: rgba(234, 29, 45, 0.08);
  border: 1px solid rgba(234, 29, 45, 0.3);
  color: #c81e2b;
}

.geo-badge.qc {
  background: rgba(30, 64, 175, 0.08);
  border: 1px solid rgba(30, 64, 175, 0.3);
  color: #1e40af;
}

.geo-badge.ca {
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #be123c;
}

/* Choix de seuil de cercle */
.threshold-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.threshold-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 1rem 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.threshold-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.threshold-btn.active {
  background: rgba(225, 29, 72, 0.08);
  border-color: var(--accent-red);
  color: var(--accent-red);
  box-shadow: 0 0 0 2px var(--accent-red-glow);
}

.threshold-btn span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.threshold-btn.active span {
  color: var(--accent-red-hover);
  font-weight: 500;
}

/* Bloc Push */
.push-toggle-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.push-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e1b4b;
}

.push-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.btn-toggle-push {
  background: var(--accent-indigo);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-toggle-push:hover {
  background: var(--accent-indigo-hover);
  box-shadow: 0 2px 10px var(--accent-indigo-glow);
}

.btn-toggle-push.active {
  background: var(--accent-emerald);
  color: #fff;
}

.btn-toggle-push.active:hover {
  background: #047857;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.btn-toggle-push.blocked,
.btn-toggle-push:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Bouton principal de soumission */
.btn-submit {
  width: 100%;
  background: var(--gradient-maple);
  color: #fff;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 15px var(--accent-red-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.35);
}

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

.legal-notice {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1.25rem;
}

/* Modal de succès (Lien d'invitation privé) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(15, 23, 42, 0.12);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-backdrop.show .modal-dialog {
  transform: scale(1);
}

.modal-dialog h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--text-main);
}

.modal-dialog p {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.invite-link-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.invite-input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0369a1;
  font-family: monospace;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.btn-copy {
  background: var(--accent-red);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--accent-red-hover);
}

.circle-progress-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-maple);
  width: 20%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-privacy-callout {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-indigo);
  margin-bottom: 1.5rem;
}

.btn-modal-close {
  width: 100%;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-modal-close:hover {
  background: #e2e8f0;
}

/* Dashboard Territorial */
.dashboard-section {
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.section-title p {
  color: var(--text-muted);
  font-size: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.dash-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.dash-panel h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.province-list, .fsa-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.stat-bar-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--gradient-aurora);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Écosystème Souverain */
.ecosystem-section {
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.eco-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.eco-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: var(--shadow-indigo);
}

.eco-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.eco-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.eco-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Puces de sélection Big Tech */
.networks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.network-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.network-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.network-chip.active {
  background: rgba(225, 29, 72, 0.08);
  border-color: var(--accent-red);
  color: var(--accent-red);
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--accent-red-glow);
}

.network-chip-icon {
  font-size: 1.15rem;
}

/* Boîte de recommandation souveraine dans le formulaire */
.recommendations-box {
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

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

.recom-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #312e81;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.recom-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recom-qc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(30, 64, 175, 0.09);
  color: #1e40af;
  border: 1px solid rgba(30, 64, 175, 0.25);
}

.recom-qc-badge.mtl {
  background: rgba(234, 29, 45, 0.09);
  color: #c81e2b;
  border: 1px solid rgba(234, 29, 45, 0.25);
}

.recom-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.recom-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.recom-card.mtl-card {
  border-left: 3px solid #ea1d2d;
}

.recom-card.qc-card {
  border-left: 3px solid #1e40af;
}

.recom-card.ca-card {
  border-left: 3px solid #be123c;
}

.recom-card:hover {
  border-color: var(--accent-indigo);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.recom-card.selected {
  border-color: var(--accent-emerald);
  background: rgba(5, 150, 105, 0.05);
  box-shadow: 0 0 0 2px var(--accent-emerald-glow);
}

.recom-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.recom-name {
  font-weight: 700;
}

.recom-badges-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.recom-host-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
}

.recom-host-pill.mtl {
  background: rgba(234, 29, 45, 0.09);
  color: #c81e2b;
  border: 1px solid rgba(234, 29, 45, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.recom-host-pill.qc {
  background: rgba(30, 64, 175, 0.09);
  color: #1e40af;
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.recom-host-pill.ca {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.recom-lang-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-full);
}

.recom-lang-badge.fr {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.recom-lang-badge.bilingual {
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.recom-lang-badge.en {
  background: rgba(100, 116, 139, 0.1);
  color: #334155;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.recom-card-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.recom-card-host {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recom-card-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-indigo);
  font-weight: 600;
}

/* Répertoire interactif des réseaux souverains */
.directory-section {
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.directory-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-bar-wrap {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0.9rem 1.25rem 0.9rem 2.85rem;
  color: var(--text-main);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px var(--accent-indigo-glow);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
  pointer-events: none;
}

.filter-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-pill {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.filter-pill:hover {
  color: var(--text-main);
  border-color: #cbd5e1;
}

.filter-pill.active {
  background: var(--accent-indigo);
  color: #fff;
  border-color: var(--accent-indigo);
  box-shadow: 0 2px 8px var(--accent-indigo-glow);
}

/* Rosace officielle de la Ville de Montréal */
.mtl-rosette-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.svg-mtl-rosette {
  width: 1em;
  height: 1em;
  fill: #ea1d2d;
  display: inline-block;
  vertical-align: -0.125em;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-pill:hover .svg-mtl-rosette {
  transform: rotate(45deg);
}

.filter-pill.active .svg-mtl-rosette {
  fill: #ffffff;
}

.instances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.instance-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.instance-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

.instance-card.mtl-card {
  border-top: 3px solid #ea1d2d;
}

.instance-card.qc-card {
  border-top: 3px solid #1e40af;
}

.instance-card.ca-card {
  border-top: 3px solid #be123c;
}

.instance-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.instance-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.instance-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge-tag {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-tag.mtl {
  background: rgba(234, 29, 45, 0.08);
  color: #c81e2b;
  border: 1px solid rgba(234, 29, 45, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-tag.qc {
  background: rgba(30, 64, 175, 0.09);
  color: #1e40af;
  border: 1px solid rgba(30, 64, 175, 0.25);
}

.badge-tag.ca {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.badge-tag.mtl-host {
  background: #fff1f2;
  color: #c81e2b;
  border: 1px solid #fecdd3;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-tag.qc-host {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-tag.ca-host {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.badge-tag.proto {
  background: #f8fafc;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.badge-tag.longevity {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-full);
}

.badge-lang.fr {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-lang.bilingual {
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-lang.en {
  background: rgba(100, 116, 139, 0.1);
  color: #334155;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.lang-check {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0f172a;
  margin-left: 0.35rem;
}

.instance-replaces {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
  font-weight: 600;
}

.instance-replaces span {
  color: var(--accent-red);
}

.instance-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.instance-meta {
  font-size: 0.775rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meta-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.meta-link-badge.open {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.meta-link-badge.open:hover {
  background: #047857;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25);
}

.meta-link-badge.source {
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.meta-link-badge.source:hover {
  background: #4338ca;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(67, 56, 202, 0.25);
}

.meta-text-muted {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

.instance-actions {
  display: flex;
  gap: 0.65rem;
}

.btn-instance-visit {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-instance-visit:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-instance-choose {
  background: var(--accent-indigo);
  color: #fff;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-instance-choose:hover {
  background: var(--accent-indigo-hover);
  box-shadow: 0 2px 10px var(--accent-indigo-glow);
}

/* Pied de page */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: #ffffff;
}

.footer p {
  margin-bottom: 0.5rem;
}

.footer-sovereign-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.35rem;
  margin-bottom: 1rem;
}

.footer-sovereign-badge p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-whc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Toast de notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slide-toast 0.3s ease;
}

@keyframes slide-toast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Widget de progression du cercle sauvegardé localement */
.my-circle-widget {
  background: var(--bg-card);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
  animation: slide-toast 0.4s ease;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.my-circle-widget.celebrate {
  border-color: #059669;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  animation: pulse-celebrate 2.5s ease-in-out infinite alternate;
}

@keyframes pulse-celebrate {
  0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
  100% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.45); }
}

.my-circle-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.my-circle-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.my-circle-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.my-circle-badge.unlocked {
  background: var(--accent-emerald);
  color: #fff;
}

.my-circle-subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.my-circle-progress-box {
  margin: 1.25rem 0;
}

.my-circle-progress-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.5rem 0;
}

.my-circle-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.my-circle-invite-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
}

.my-circle-invite-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.my-circle-invite-input {
  flex: 1;
  font-size: 0.85rem;
  font-family: monospace;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  color: var(--text-main);
}

.my-circle-btn-copy {
  background: var(--accent-indigo);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.my-circle-btn-copy:hover {
  background: var(--accent-indigo-hover);
}

.my-circle-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.my-circle-btn-text {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.my-circle-btn-text:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 860px) {
  .hero-counters {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .threshold-options {
    grid-template-columns: 1fr;
  }
  .networks-grid {
    grid-template-columns: 1fr 1fr;
  }
  .instances-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* ==========================================================================
   Composants UX Simplifiés : Attribution automatique, Jauge intuitive, Partage SMS
   ========================================================================== */

/* Carte d'attribution automatique du serveur */
.auto-server-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(6, 182, 212, 0.04) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auto-server-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.auto-server-icon {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.35rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.auto-server-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.auto-server-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auto-server-picked {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.badge-auto-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(5, 150, 105, 0.1);
  color: #065f46;
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.auto-server-toggle {
  border-top: 1px solid rgba(79, 70, 229, 0.12);
  padding-top: 0.65rem;
}

.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-indigo);
  cursor: pointer;
}

.custom-checkbox-label:hover {
  color: var(--text-main);
}

/* Jauge Visuelle de Masse Critique Intuitive */
.critical-gauge-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.critical-gauge-container.unlocked {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.06) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}

.critical-gauge-headline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.critical-gauge-icon {
  font-size: 1.4rem;
}

.critical-gauge-avatars {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.gauge-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 52px;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  user-select: none;
}

.gauge-avatar.joined {
  background: linear-gradient(135deg, #e11d48 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
  transform: translateY(-2px);
}

.gauge-avatar.joined.is-me {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.gauge-avatar.pending {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  color: var(--text-dim);
  opacity: 0.8;
}

.gauge-avatar-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.gauge-avatar-num {
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0.15rem;
  letter-spacing: -0.01em;
}

.critical-gauge-track {
  height: 10px;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.critical-gauge-fill {
  height: 100%;
  background: var(--gradient-maple);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.critical-gauge-container.unlocked .critical-gauge-fill {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

/* Boîte de message tout prêt pour SMS & WhatsApp */
.ready-share-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin: 1.2rem 0;
}

.ready-share-header {
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.ready-share-bubble {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px 12px 12px 3px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #1e293b;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.85rem;
  word-break: break-word;
}

.ready-share-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn-share-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-share-social.whatsapp {
  background: #25D366;
  color: #ffffff;
}

.btn-share-social.whatsapp:hover {
  background: #1ebc59;
  transform: translateY(-1px);
}

.btn-share-social.sms {
  background: #0284c7;
  color: #ffffff;
}

.btn-share-social.sms:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-share-social.copy {
  background: var(--accent-indigo);
  color: #ffffff;
}

.btn-share-social.copy:hover {
  background: var(--accent-indigo-hover);
  transform: translateY(-1px);
}

.btn-share-social.link-only {
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-share-social.link-only:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* Détails techniques repliables (Accordeon HTML5 details) */
.technical-details {
  margin-top: 0.85rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.65rem;
}

.technical-summary {
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: color 0.2s ease;
  list-style: none; /* Supprime le triangle par défaut */
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.technical-summary::-webkit-details-marker {
  display: none;
}

.technical-summary:hover {
  color: var(--accent-indigo);
}

.technical-summary::after {
  content: '▼';
  font-size: 0.65rem;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.technical-details[open] .technical-summary::after {
  transform: rotate(180deg);
}

.technical-content {
  background: rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.technical-intro {
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.technical-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  color: var(--text-main);
}

/* Cartes de Découverte sur la page d'accueil */
.discovery-section {
  padding: 3.5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.discovery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.discovery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.discovery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 70, 229, 0.3);
}

.discovery-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.discovery-icon {
  font-size: 2.2rem;
  line-height: 1;
  background: rgba(79, 70, 229, 0.08);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.discovery-card.stats .discovery-icon {
  background: rgba(225, 29, 72, 0.08);
}

.discovery-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.discovery-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-discovery {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--accent-indigo);
  border: 1.5px solid var(--accent-indigo);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.btn-discovery:hover {
  background: var(--accent-indigo);
  color: #ffffff;
}

.discovery-card.stats .btn-discovery {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.discovery-card.stats .btn-discovery:hover {
  background: var(--accent-red);
  color: #ffffff;
}

/* Page Héro pour /repertoire et /statistiques */
.subpage-hero {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.subpage-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.subpage-hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.subpage-cta-box {
  margin-top: 1.5rem;
}

.btn-subpage-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-maple);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-glow);
}

.btn-subpage-cta:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

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

/* ==========================================================================
   Grille de Sélection de Plateforme d'Origine (Étape 1 simplifiée)
   ========================================================================== */
.origin-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}

.origin-platform-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.origin-platform-card .platform-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.origin-platform-card:hover {
  border-color: var(--accent-red);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.origin-platform-card.active {
  border-color: var(--accent-red);
  background: var(--accent-red-bg);
  color: var(--accent-red);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

/* Puces de sélection rapide de la RTA (FSA) */
.fsa-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.fsa-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fsa-pill:hover {
  background: #ffffff;
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.fsa-pill.active {
  background: var(--accent-indigo-bg);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

/* ==========================================================================
   Boutons de Partage Ciblé sur la Plateforme d'Origine
   ========================================================================== */
.btn-share-social.twitter {
  background: #0f1419;
  color: #ffffff;
}

.btn-share-social.twitter:hover {
  background: #272c30;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 20, 25, 0.25);
}

.btn-share-social.facebook {
  background: #1877f2;
  color: #ffffff;
}

.btn-share-social.facebook:hover {
  background: #166fe5;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}

.btn-share-social.linkedin {
  background: #0a66c2;
  color: #ffffff;
}

.btn-share-social.linkedin:hover {
  background: #084e96;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.25);
}

/* ==========================================================================
   Boîte Morte Chiffrée (Zero-Knowledge Relay Chat)
   ========================================================================== */
.relay-chat-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-sm);
}

.relay-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.relay-chat-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.relay-chat-icon {
  font-size: 1.3rem;
}

.relay-chat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.relay-chat-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.btn-refresh-relay {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.btn-refresh-relay.spinning {
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.relay-messages-stream {
  min-height: 120px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.5rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.relay-loading-placeholder,
.relay-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1.5rem 0.5rem;
  gap: 0.35rem;
}

.relay-empty-state .empty-icon {
  font-size: 1.5rem;
}

.relay-msg-bubble {
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  max-width: 85%;
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.relay-msg-bubble.is-me {
  align-self: flex-end;
  background: var(--accent-indigo);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.relay-msg-bubble.is-friend {
  align-self: flex-start;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 2px;
}

.relay-msg-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  opacity: 0.85;
}

.relay-msg-bubble.is-me .relay-msg-header {
  color: rgba(255, 255, 255, 0.9);
}

.relay-msg-bubble.is-friend .relay-msg-header {
  color: var(--text-muted);
}

.relay-handle-tag {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.05);
}

.relay-source-profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-indigo);
  background: var(--accent-indigo-bg);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.15s ease;
}

.relay-source-profile-tag:hover {
  background: #ffffff;
  color: var(--accent-indigo-hover);
  text-decoration: underline;
}

.relay-msg-bubble.is-me .relay-source-profile-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.relay-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.btn-quick-prompt {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-prompt:hover {
  background: var(--accent-indigo-bg);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.relay-input-form {
  display: flex;
  gap: 0.45rem;
}

.relay-pseudo-field {
  width: 90px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  color: var(--text-main);
}

.relay-text-field {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-main);
}

.relay-text-field:focus,
.relay-pseudo-field:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px var(--accent-indigo-glow);
}

.btn-relay-send {
  background: var(--accent-indigo);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-relay-send:hover {
  background: var(--accent-indigo-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Guide de Migration Coordonnée (Déverrouillage au Seuil)
   ========================================================================== */
.migration-guide-container {
  background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: 0 8px 24px var(--accent-emerald-glow);
}

.migration-guide-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.migration-icon {
  font-size: 2rem;
  line-height: 1;
}

.migration-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 0.25rem;
}

.migration-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.migration-steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.migration-step-item {
  display: flex;
  gap: 0.85rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.migration-step-item .step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--accent-emerald);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.migration-step-item .step-content {
  flex: 1;
}

.migration-step-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.migration-step-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.btn-step-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-step-action:hover {
  background: #ffffff;
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: translateY(-1px);
}

.migration-alternatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.migration-alt-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.migration-alt-card .alt-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.migration-alt-card .alt-name {
  font-size: 0.92rem;
  color: var(--text-main);
}

.migration-alt-card .alt-badge-loc {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
}

.migration-alt-card .alt-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.migration-alt-card .alt-badges-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.migration-alt-card .alt-longevity-badge,
.migration-alt-card .alt-privacy-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.btn-create-account {
  display: block;
  text-align: center;
  background: var(--accent-emerald);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-create-account:hover {
  background: #047857;
  color: #ffffff;
}

/* ==========================================================================
   Carte d'Invitation pour Invité (Arrivée par fragment #cercle=...&k=...)
   ========================================================================== */
.guest-invite-card {
  background: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);
  border: 2px solid var(--accent-indigo);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px var(--accent-indigo-glow);
}

.guest-badge {
  display: inline-block;
  background: var(--accent-indigo-bg);
  color: var(--accent-indigo);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.guest-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.guest-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Jauge de Masse Critique & Avatars
   ========================================================================== */
.critical-gauge-container {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1rem 0;
}

.critical-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

.gauge-bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.gauge-bar-fill {
  height: 100%;
  background: var(--gradient-maple);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-avatars-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0.85rem 0;
  flex-wrap: wrap;
}

.gauge-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1.5px dashed var(--border-color);
  transition: all 0.2s ease;
}

.gauge-avatar.joined {
  border-style: solid;
  border-color: var(--accent-indigo);
  background: var(--accent-indigo-bg);
  box-shadow: var(--shadow-sm);
}

.gauge-avatar.is-me {
  border-color: var(--accent-red);
  background: var(--accent-red-bg);
}

.gauge-avatar .avatar-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.gauge-avatar .avatar-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

.gauge-status-text {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-main);
  margin-top: 0.65rem;
}

.gauge-status-text.unlocked {
  color: #065f46;
}

/* ==========================================================================
   Onglets Cercle Privé vs Groupe de Quartier Géolocalisé
   ========================================================================== */
.circle-view-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-body, #f8fafc);
  padding: 0.35rem;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border-color, #e2e8f0);
  margin: 1rem 0 1.25rem 0;
}

.circle-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.circle-tab:hover {
  color: var(--text-main, #0f172a);
  background: rgba(255, 255, 255, 0.6);
}

.circle-tab.active {
  background: #ffffff;
  color: var(--accent-red, #dc2626);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.circle-tab .tab-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full, 9999px);
  background: var(--border-color, #e2e8f0);
  color: var(--text-main, #0f172a);
  font-weight: 700;
}

.circle-tab.active .tab-badge {
  background: var(--accent-red-bg, #fef2f2);
  color: var(--accent-red, #dc2626);
}

/* Option d'adhésion au groupe de quartier dans le formulaire */
.neighborhood-optin-box {
  background: var(--accent-indigo-bg, #f5f3ff);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md, 10px);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.neighborhood-optin-box:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.custom-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--accent-indigo, #6366f1);
  cursor: pointer;
}

.custom-checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-main, #0f172a);
}

.neighborhood-help-text {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}

/* ==========================================================================
   Groupe de Quartier Géolocalisé (Zero-Knowledge)
   ========================================================================== */
.neighborhood-group-card {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-lg, 14px);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.neighborhood-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.neighborhood-title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.neighborhood-header-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.neighborhood-badge-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.fsa-badge {
  background: var(--accent-red, #dc2626);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
  letter-spacing: 0.03em;
}

.city-badge {
  background: var(--accent-indigo-bg, #e0e7ff);
  color: var(--accent-indigo, #4338ca);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
}

.zk-badge {
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid #a7f3d0;
}

.neighborhood-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.neighborhood-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

/* Annuaire des identifiants partagés */
.neighborhood-handles-box {
  background: #fafaf9;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 1rem;
}

.handles-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.handles-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.handles-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-indigo, #6366f1);
  background: var(--accent-indigo-bg, #e0e7ff);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
}

.neighborhood-handles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.handles-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.neighborhood-handle-card {
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.handle-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.platform-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.platform-pill.mastodon {
  background: #eef2ff;
  color: #4338ca;
}

.platform-pill.matrix {
  background: #ecfdf5;
  color: #065f46;
}

.platform-pill.pixelfed {
  background: #fdf2f8;
  color: #be185d;
}

.platform-pill.lemmy {
  background: #eff6ff;
  color: #1d4ed8;
}

.platform-pill.autre {
  background: #f1f5f9;
  color: #334155;
}

.handle-date {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
}

.handle-card-address {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  word-break: break-all;
}

.handle-card-address .handle-link {
  color: var(--accent-red, #dc2626);
  text-decoration: none;
}

.handle-card-address .handle-link:hover {
  text-decoration: underline;
}

.handle-note {
  margin: 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}

.handle-card-author {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

/* Accordéon de partage */
.share-handle-accordion {
  border-top: 1px dashed var(--border-color, #e2e8f0);
  padding-top: 0.75rem;
}

.btn-open-share-handle {
  font-size: 0.84rem;
  color: var(--accent-red, #dc2626);
  cursor: pointer;
  user-select: none;
}

.share-handle-form {
  margin-top: 0.75rem;
}

.share-handle-desc {
  margin: 0 0 0.5rem 0;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

.share-handle-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-share-handle-submit {
  background: var(--gradient-maple);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm, 6px);
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.btn-share-handle-submit:hover {
  opacity: 0.92;
}

/* Section discussion locale */
.neighborhood-chat-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.neighborhood-chat-heading {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.btn-neighborhood-prompt {
  background: #f1f5f9;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-full, 9999px);
  padding: 0.25rem 0.65rem;
  font-size: 0.74rem;
  color: var(--text-muted, #475569);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-neighborhood-prompt:hover {
  background: #e2e8f0;
  color: var(--text-main, #0f172a);
}

/* Ajustements jauge pour 21 avatars */
.gauge-avatars-row.compact-avatars {
  gap: 0.45rem;
}

.gauge-avatars-row.compact-avatars .gauge-avatar {
  width: 34px;
  height: 34px;
}

.gauge-avatars-row.compact-avatars .gauge-avatar .avatar-icon {
  font-size: 0.95rem;
}

.gauge-avatars-row.compact-avatars .gauge-avatar .avatar-label {
  display: none;
}

/* Formulaire simplifié & Options facultatives (<details>) */
.identity-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.field-sub-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.location-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.location-input-row .input-field {
  flex: 1;
  min-width: 220px;
}

.location-input-row .geo-badge {
  margin-top: 0;
  white-space: nowrap;
}

.pact-optional-details {
  margin-bottom: 1.25rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: #f8fafc;
  overflow: hidden;
}

.pact-optional-summary {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pact-optional-summary::-webkit-details-marker {
  display: none;
}

.pact-optional-summary::after {
  content: '▼';
  font-size: 0.65rem;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.pact-optional-details[open] .pact-optional-summary::after {
  transform: rotate(180deg);
}

.pact-optional-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  background: #ffffff;
}

/* Énoncé solennel de l'engagement conditionnel au-dessus du bouton Signer */
.pact-pledge-statement {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.05) 0%, rgba(79, 70, 229, 0.05) 100%);
  border: 1.5px solid rgba(225, 29, 72, 0.28);
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0 0.75rem;
}

.pledge-statement-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-red);
  margin-bottom: 0.35rem;
}

.pledge-statement-text {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text-main);
  margin: 0;
}

.pledge-statement-text strong {
  color: var(--accent-red);
  font-weight: 800;
}

/* Barre d'alerte appareil et accordéons post-signature */
.circle-push-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-main);
  margin: 0.85rem 0;
}

.circle-accordions-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.circle-section-details {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #f8fafc;
  overflow: hidden;
}

.circle-section-summary {
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.circle-section-summary::-webkit-details-marker {
  display: none;
}

.circle-section-summary .summary-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: 0.5rem;
}

.circle-section-summary::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.circle-section-details[open] .circle-section-summary {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.circle-section-details[open] .circle-section-summary::after {
  transform: rotate(180deg);
}

.circle-section-body {
  padding: 0.85rem;
  background: #ffffff;
}

.circle-section-body .relay-chat-card,
.circle-section-body .neighborhood-group-card {
  margin-top: 0;
  border: none;
  box-shadow: none;
  padding: 0.25rem;
}

@media (max-width: 640px) {
  .gauge-avatars-row {
    gap: 0.45rem;
  }
  .gauge-avatar {
    width: 38px;
    height: 38px;
  }
  .gauge-avatar .avatar-icon {
    font-size: 1rem;
  }
  .circle-tab {
    font-size: 0.78rem;
    padding: 0.5rem 0.65rem;
  }
  .circle-section-summary .summary-hint {
    display: none;
  }
}



