:root {
  --red: #E8392A;
  --red-dark: #C4311F;
  --red-light: #FEF0EE;
  --blue-bg: #EAF6F9;
  --text: #1A1A2E;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --bg: #F8FAFC;
  --white: #fff;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ─── NAV ─── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--red);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-link {
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: var(--red-light);
  color: var(--red-dark);
}

.nav-link.btn-nav {
  background: var(--red);
  color: white;
  font-weight: 600;
  border-radius: 20px;
}

.nav-link.btn-nav:hover {
  background: var(--red-dark);
  color: white;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--red);
  color: white;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,57,42,0.35);
}

.btn-secondary {
  background: var(--red-light);
  color: var(--red-dark);
}

.btn-secondary:hover { background: #fad8d4; }

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn-outline:hover { background: var(--red-light); }

.btn-white {
  background: white;
  color: var(--red-dark);
  font-weight: 700;
}

.btn-white:hover {
  background: #fff8f7;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-ghost:hover { background: rgba(255,255,255,0.25); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

.btn-card {
  background: white;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 20px;
}

.btn-card:hover { background: var(--red-light); }

/* ─── HERO ─── */
.hero {
  background: var(--blue-bg);
  color: var(--text);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: rgba(232,57,42,0.06);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: rgba(232,57,42,0.04);
  border-radius: 50%;
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--red);
  background: var(--red-light);
  padding: 2px 10px;
  border-radius: 6px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── PAGE HEADER ─── */
.page-header {
  background: var(--red);
  color: white;
  padding: 48px 24px;
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p { opacity: 0.88; font-size: 1rem; }

/* ─── STATS ─── */
.stats {
  background: white;
  padding: 40px 24px;
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--red);
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── SECTIONS ─── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section-title { font-size: 1.7rem; font-weight: 800; margin-bottom: 8px; }
.section-sub { color: var(--text-muted); margin-bottom: 40px; }

/* ─── CARDS ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ─── MEMBER CARD ─── */
.member-card { display: flex; flex-direction: column; gap: 14px; }

.member-header { display: flex; align-items: center; gap: 14px; }

.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-name { font-weight: 700; font-size: 1rem; }
.member-company { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.sector-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--red-light);
  color: var(--red-dark);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  width: fit-content;
}

.member-info { display: flex; flex-direction: column; gap: 6px; }

.member-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.member-info-row svg { flex-shrink: 0; color: var(--red); }
.member-info-row a { color: var(--red); }
.member-info-row a:hover { text-decoration: underline; }

.member-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* ─── SEARCH ─── */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 0.95rem;
  background: white;
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
}

.search-input:focus { border-color: var(--red); }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select {
  padding: 13px 18px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  outline: none;
  min-width: 200px;
  font-family: inherit;
}

.filter-select:focus { border-color: var(--red); }

.result-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.result-count strong { color: var(--text); }

/* ─── CHIPS ─── */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.chip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: inherit;
}

.chip:hover, .chip.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

/* ─── MEETING CARD ─── */
.meeting-list { display: flex; flex-direction: column; gap: 20px; }

.meeting-card { display: flex; gap: 20px; align-items: flex-start; }

.meeting-date-box {
  min-width: 68px;
  height: 76px;
  background: var(--red);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.meeting-date-day { font-size: 2rem; line-height: 1; }
.meeting-date-month { font-size: 0.72rem; text-transform: uppercase; opacity: 0.85; margin-top: 2px; }

.meeting-body { flex: 1; }
.meeting-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }

.meeting-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.meeting-meta span { display: flex; align-items: center; gap: 5px; }
.meeting-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 14px; }
.meeting-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.spots-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.spots-ok { background: #DCFCE7; color: #166534; }
.spots-few { background: #FEF3C7; color: #92400E; }
.spots-full { background: #FEE2E2; color: #991B1B; }

/* ─── FORM ─── */
.form-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  max-width: 720px;
  margin: 0 auto;
}

.form-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
label .req { color: var(--red); }

.form-input, .form-select {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  width: 100%;
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,57,42,0.10);
}

.error-msg { font-size: 0.78rem; color: #EF4444; display: none; }
.form-group.has-error .error-msg { display: block; }
.form-group.has-error .form-input,
.form-group.has-error .form-select { border-color: #EF4444; }

/* ─── SUCCESS ─── */
.success-box {
  background: #F0FDF4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  display: none;
}

.success-box.visible { display: block; }

.success-icon {
  width: 64px;
  height: 64px;
  background: #16A34A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 1.8rem;
}

.success-box h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.success-box p { color: var(--text-muted); }

/* ─── CARTE ADHÉRENT (visuelle) ─── */
.member-card-visual {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.card-top {
  background: var(--red);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.card-top-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
}

.card-top-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: white;
  color: var(--red);
  border-radius: 6px;
  font-size: 0.9rem;
}

.card-network-label {
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: 500;
}

.card-body {
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.card-info { flex: 1; min-width: 0; }

.card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.card-name { font-size: 1.15rem; font-weight: 800; margin-bottom: 2px; word-break: break-word; }
.card-company { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.card-sector { margin-bottom: 14px; }

.card-contacts { display: flex; flex-direction: column; gap: 6px; }

.card-contact-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
}

.card-contact-row svg { color: var(--red); flex-shrink: 0; }

.card-qr {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.card-qr canvas, .card-qr img { border-radius: 6px; display: block; }

.card-qr-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 90px;
  line-height: 1.3;
}

.card-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 10px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-footer span { color: var(--red); font-weight: 600; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  transform: translateY(24px);
  transition: transform 0.25s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-wide {
  max-width: 520px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
  margin-top: -4px;
}

.modal-close:hover { background: var(--border); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ─── QR ─── */
.qr-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.qr-card-title { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }

.qr-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

#qrcode {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

#qrcode canvas, #qrcode img { border-radius: 8px; }

.qr-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  background: var(--bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.info-tip {
  display: flex;
  gap: 10px;
  background: var(--blue-bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.85rem;
  color: #0e7490;
  margin-top: 16px;
  text-align: left;
}

.info-tip svg { flex-shrink: 0; margin-top: 2px; }

/* ─── HOW IT WORKS ─── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.how-card { text-align: center; padding: 32px 24px; }

.how-icon {
  width: 56px;
  height: 56px;
  background: var(--red-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.how-card h3 { font-weight: 700; margin-bottom: 8px; }
.how-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 320px;
  box-shadow: var(--shadow);
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #16A34A; }
.toast.error { background: #DC2626; }

/* ─── FEATURE CARDS ─── */
.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}

.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--red-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.feature-card h3 { font-size: 1rem; font-weight: 700; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); }
.feature-card a {
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

.feature-card a:hover { text-decoration: underline; }

/* ─── CTA BAND ─── */
.cta-band {
  background: var(--red);
  color: white;
  text-align: center;
  padding: 64px 24px;
}

.cta-band h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-band p { opacity: 0.9; margin-bottom: 28px; font-size: 1.05rem; }

/* ─── FOOTER ─── */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 40px 24px;
  margin-top: 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo { display: flex; align-items: center; gap: 10px; color: white; font-weight: 700; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--red); }
.footer-copy { font-size: 0.82rem; margin-top: 24px; text-align: center; }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }

/* ─── PRINT ─── */
@media print {
  nav, footer, .modal-actions, .modal-close, .page-header, .section { display: none !important; }
  .modal-overlay { position: static !important; opacity: 1 !important; pointer-events: all !important; background: none !important; padding: 0 !important; }
  .modal { box-shadow: none !important; transform: none !important; max-width: 100% !important; padding: 0 !important; }
  .member-card-visual { max-width: 380px; box-shadow: none !important; }
}

/* ─── PAGE LAYOUT (inscription) ─── */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 24px;
  align-items: start;
}

.qr-sticky { position: sticky; top: 84px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .stats-inner { grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
  .stat-value { font-size: 1.6rem; }

  .meeting-card { flex-direction: column; gap: 12px; }
  .meeting-date-box { width: 100%; height: 48px; flex-direction: row; gap: 10px; padding: 0 16px; }
  .meeting-date-day { font-size: 1.4rem; }

  .form-card { padding: 24px; }
  .hero { padding: 48px 24px; }

  .page-layout { grid-template-columns: 1fr; padding: 32px 20px; }
  .qr-sticky { position: static; }

  .card-body { flex-direction: column; }
  .card-qr { flex-direction: row; align-items: center; gap: 12px; }
  .card-qr-label { max-width: 140px; }
}

@media (max-width: 520px) {
  .stats-inner { grid-template-columns: 1fr; gap: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; justify-content: center; }
}
