:root {
  --bg: #0b0f1a;
  --bg-alt: #121829;
  --card-bg: #161d30;
  --border: #26304a;
  --text: #e7ebf5;
  --text-muted: #97a2bd;
  --accent: #3ddc97;
  --accent-2: #4f8ef7;
  --danger: #ff6b6b;
  --warning: #ffb020;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent-2); text-decoration: none; }

.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 700;
}
.logo span { color: var(--accent); }
.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.site-header nav a {
  margin-left: 24px;
  color: var(--text-muted);
  font-weight: 500;
}
.site-header nav a:hover { color: var(--text); }

.site-header nav a.nav-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.site-header nav a.nav-icon-link svg { width: 15px; height: 15px; }

#lang-switcher {
  margin-left: 20px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Sur écran étroit, le logo + les liens de nav (jusqu'à 3 liens + un bouton
   de déconnexion sur le tableau de bord membre) ne tiennent plus sur une
   seule ligne : le texte d'un lien se coupait au milieu et chevauchait le
   logo. On bascule la nav sur sa propre ligne plutôt que de laisser le
   texte se briser n'importe où. */
@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 14px 16px;
  }
  .logo { font-size: 1.15rem; }
  .site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }
  .site-header nav a,
  .site-header nav button {
    margin-left: 0;
    white-space: nowrap;
    font-size: 0.85rem;
  }
  #lang-switcher { margin-left: 0; }
}

.hero {
  padding: 64px 0 40px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(79, 142, 247, 0.15), transparent 60%);
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.hero-hook {
  margin-top: 20px;
  max-width: 680px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.5;
}

.hero-hook strong { color: var(--accent); }

.hero-stat {
  margin: 28px auto 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hero-stat span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-stat small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.section-title {
  margin: 48px 0 24px;
  font-size: 1.5rem;
}

.status-message {
  color: var(--text-muted);
}

.sectors {
  padding-top: 16px;
}

.sectors-intro {
  color: var(--text-muted);
  margin: -12px 0 24px;
}

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

.sector-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

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

.sector-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(79, 142, 247, 0.12);
  color: var(--accent-2);
}

.sector-card .icon svg {
  width: 24px;
  height: 24px;
}

.sector-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.sector-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-grow: 1;
}

.sector-card .sector-invest-btn {
  margin-top: 4px;
}

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

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card .icon {
  font-size: 2rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.project-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.project-card .category {
  display: inline-block;
  background: rgba(79, 142, 247, 0.15);
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

.project-card .description {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.invested-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.invested-stat strong {
  color: var(--accent);
  font-size: 1.05rem;
}

.funding-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 4px;
}

.funding-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.funding-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

.funding-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.funding-bar-label strong {
  color: var(--accent);
  font-size: 0.85rem;
}

.risk-notice {
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid var(--warning);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 16px;
}

.job-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 24px 0 12px;
}

.job-filters .form-row {
  min-width: 200px;
  margin-bottom: 0;
}

.job-filters select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}

.country-search {
  position: relative;
}

.country-search input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 42px 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}

.country-search-clear {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.country-search-clear:hover,
.country-search-clear:active {
  color: var(--text);
  background: var(--border);
}

.job-currency-notice {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0 20px;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.jobs-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 64px;
}

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.match-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.match-row .team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.match-row .team-crest {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.match-row .team-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.job-card .job-company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
/* Score/heure au centre d'une carte de match (cf. .match-row) : le style
   générique .job-company ci-dessus reste inchangé pour les cartes Emplois,
   qui partagent la même classe pour le nom d'entreprise. */
.match-row .job-company {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  padding-top: 8px;
}
.match-score {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.match-kickoff {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}
.match-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  animation: live-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes live-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

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

.job-badges .badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-country { background: rgba(79, 142, 247, 0.15); color: var(--accent-2); }
.badge-currency { background: rgba(61, 220, 151, 0.15); color: var(--accent); }
.badge-category { background: rgba(255, 176, 32, 0.15); color: var(--warning); }

.job-card .job-date {
  font-size: 0.78rem;
  margin: 0;
}

.job-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.match-analysis {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.match-analysis p { margin: 0 0 8px; }
.match-analysis p:last-child { margin-bottom: 0; }

.match-goals p { margin: 0 0 4px; }
.match-goals ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.match-goals li { margin-bottom: 2px; }

.matches-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 1px solid var(--border);
}
.matches-tabs .tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 4px 10px;
  cursor: pointer;
}
.matches-tabs .tab-btn:hover { color: var(--text); }
.matches-tabs .tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent-2);
}

.history-day { margin-bottom: 32px; }
.history-day-title {
  font-size: 0.95rem;
  text-transform: capitalize;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #071018;
}

.btn-closed {
  background: rgba(61, 220, 151, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  text-align: center;
  cursor: default;
}

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

.btn-block { width: 100%; }

.link-simulate {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}
.link-simulate:hover { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.75);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.invest-as {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.invest-as strong { color: var(--text); }

.form-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="password"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row input[type="datetime-local"],
.form-row select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent-2);
}

.form-row small { color: var(--text-muted); font-size: 0.78rem; }

.password-field {
  position: relative;
  display: flex;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  flex: 1;
  padding-right: 40px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}

.password-toggle-btn:hover { color: var(--text); }
.password-toggle-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }

.btn-generate-password {
  display: inline-block;
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0 0;
  text-align: left;
}
.btn-generate-password:hover { text-decoration: underline; }

.network-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.network-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 400;
  cursor: pointer;
}

.tier-choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 400;
  cursor: pointer;
  flex: 1 1 auto;
}

.wallet-box { background: rgba(61, 220, 151, 0.06); border: 1px dashed var(--border); border-radius: 8px; padding: 12px; }

.wallet-address-row {
  display: flex;
  gap: 8px;
}
.wallet-address-row input { flex-grow: 1; font-family: 'Consolas', monospace; }

.qr-pay {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.qr-pay-code {
  flex: 0 0 auto;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.qr-pay-code img { width: 100%; height: 100%; }

.qr-pay-placeholder {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.qr-pay-details {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Sans ça, un input flex-grow ne rétrécit pas sous sa largeur de contenu et
   pousse le bouton "Copier" hors du cadre de la modale (largeur max 480px). */
.qr-pay-details .wallet-address-row { min-width: 0; }
.qr-pay-details .wallet-address-row input { min-width: 0; }

.qr-pay-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-pay-field-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.qr-pay-hint {
  display: block;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .qr-pay { flex-direction: column; align-items: center; }
  .qr-pay-details { width: 100%; }
}

.wallet-help-list { margin-top: 10px; }

.wallet-help-intro {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.wallet-help-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wallet-help-links .btn {
  flex: 1 1 auto;
  min-width: 100px;
  text-align: center;
}

/* Guide pas-à-pas propre à chaque moyen de paiement (Trust Wallet / Binance /
   Volet) : une seule étape "active" scintille à la fois, les suivantes
   restent verrouillées tant que l'utilisateur n'a pas confirmé l'étape en
   cours lui-même (auto-déclaratif, indépendant du verrouillage réel du
   montant plus bas). */
#pay-guide-box {
  --guide-accent: var(--accent);
  --guide-accent-soft: rgba(61, 220, 151, 0.1);
  margin-bottom: 16px;
}

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

.pay-guide-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-right: 8px;
}

.pay-guide-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}

#pay-guide-box .pay-guide-video-link {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.pay-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-guide-step {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: opacity 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.pay-guide-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--border);
  color: var(--text-muted);
}

.pay-guide-step-body { flex: 1; min-width: 0; }

.pay-guide-step-title {
  margin: 0 0 2px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
}

.pay-guide-step-detail {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.pay-guide-advance {
  margin-top: 8px;
  border: none;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: #071018;
  background: var(--guide-accent);
}

.pay-guide-step.is-locked {
  opacity: 0.4;
  filter: grayscale(0.35);
}

.pay-guide-step.is-done {
  opacity: 0.55;
}
.pay-guide-step.is-done .pay-guide-step-num { background: var(--guide-accent); color: #071018; }
.pay-guide-step.is-done .pay-guide-step-title { text-decoration: line-through; text-decoration-color: var(--text-muted); }

.pay-guide-step.is-active {
  border-color: var(--guide-accent);
  background: linear-gradient(180deg, var(--guide-accent-soft), var(--card-bg) 65%);
  box-shadow: 0 0 0 1px var(--guide-accent) inset;
  animation: payGuideGlow 2.2s ease-in-out infinite;
}
.pay-guide-step.is-active .pay-guide-step-num { background: var(--guide-accent); color: #071018; }

@keyframes payGuideGlow {
  0%, 100% { box-shadow: 0 0 0 1px var(--guide-accent) inset, 0 0 0 0 rgba(61, 220, 151, 0); }
  50% { box-shadow: 0 0 0 1px var(--guide-accent) inset, 0 0 16px 1px var(--guide-accent-soft); }
}

@media (prefers-reduced-motion: reduce) {
  .pay-guide-step.is-active { animation: none; }
}

#invest-prewatch { margin-bottom: 16px; }

/* Reste visible en haut de la modale pendant que l'investisseur fait défiler
   les étapes en dessous, pour qu'il garde toujours son QR/montant sous les yeux.
   Fond opaque + ombre portée : sans ça, le fond légèrement transparent de
   .wallet-box laisse deviner le contenu qui défile dessous, ce qui brouille
   l'effet de calque ; l'ombre en bas renforce l'impression que la bande qui
   défile "passe sous" le bloc QR figé. */
.qr-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 16px;
  background-image: linear-gradient(rgba(61, 220, 151, 0.06), rgba(61, 220, 151, 0.06));
  background-color: var(--card-bg);
  box-shadow: 0 10px 14px -10px rgba(0, 0, 0, 0.55);
}

.invest-step { margin-bottom: 18px; }
.invest-step:last-of-type { margin-bottom: 0; }

.step-title {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.payment-warning {
  background: rgba(255, 176, 32, 0.1);
  border: 1px solid var(--warning);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 10px;
}

/* Quelques pulsations après la fermeture du popup d'avertissement, puis ça
   s'arrête : un clignotement permanent serait fatigant et nuirait à
   l'accessibilité (contenu clignotant en continu déconseillé). */
@keyframes attention-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 176, 32, 0.35); }
}
.payment-warning.pulse-attention {
  animation: attention-pulse 0.6s ease-in-out 3;
}

.warning-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 14, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: var(--radius);
  z-index: 20;
}

.warning-popup {
  background: var(--card-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.warning-popup p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.btn-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  padding: 10px 0 0;
}
.btn-link:hover { text-decoration: underline; }

#invest-watching {
  background: rgba(61, 220, 151, 0.06);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.watch-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.watch-status p { margin: 0; font-weight: 600; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex: 0 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.watch-hint {
  display: block;
  margin-top: 8px;
  line-height: 1.4;
}

.watch-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.watch-actions .btn-link { padding-top: 0; }

#invest-manual { margin-bottom: 16px; }

.form-error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.form-success {
  background: rgba(61, 220, 151, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.hidden { display: none !important; }

/* Bandeau d'alerte "Phase de développement actif" */
.alert-banner {
  background: rgba(255, 176, 32, 0.12);
  border-top: 1px solid var(--warning);
  border-bottom: 1px solid var(--warning);
  color: var(--text);
  padding: 14px 24px;
  font-size: 0.92rem;
  text-align: center;
  line-height: 1.5;
}

.alert-banner strong { color: var(--warning); }

.container-wide {
  max-width: 100%;
}

/* Page "Comment ça marche" */
.how-it-works { padding: 48px 0 64px; }

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  counter-increment: step-counter;
}

.step::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #071018;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-list { counter-reset: step-counter; }

.step-content h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.step-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.notice-box {
  margin-top: 32px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid #ffc107;
  color: var(--text);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.9rem;
}

/* Simulateur de revenus */
.calc-page {
  padding: 8px 0 64px;
  display: flex;
  justify-content: center;
}

.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 720px;
}

.amount-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.amount-input-wrap input {
  flex-grow: 1;
  padding-right: 68px;
  font-size: 1.15rem;
  font-weight: 600;
}

.amount-suffix {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}

.perf-chart-block {
  margin: 4px 0 24px;
}

.perf-chart-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.perf-chart {
  width: 100%;
  overflow-x: auto;
}

.perf-chart svg {
  width: 100%;
  height: auto;
  min-width: 480px;
  display: block;
}

.perf-chart-zero-line {
  stroke: var(--border);
  stroke-width: 1;
}

.perf-chart-value {
  font-size: 10px;
  fill: var(--text-muted);
}

.perf-chart-label {
  font-size: 10px;
  fill: var(--text-muted);
}

.perf-chart-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-alt, rgba(255, 255, 255, 0.03));
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.palier-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.palier-badge.secure {
  background: rgba(255, 176, 32, 0.15);
  color: var(--warning);
}

.tiers-grid-label {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.tier-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
}

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

.tier-card.active {
  border-color: var(--accent);
  background: rgba(61, 220, 151, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}

.tier-card .tier-duration {
  font-weight: 700;
  font-size: 0.95rem;
}

.tier-card .tier-rate {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 1.1rem;
}

.tier-detail {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tier-detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tier-total,
.tier-gain {
  font-size: 0.88rem;
  font-weight: 600;
}

.calc-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.calc-summary-title {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.calc-summary-title strong {
  color: var(--text);
}

.calc-summary-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.result-figure {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.result-figure.highlight {
  background: linear-gradient(135deg, rgba(61, 220, 151, 0.15), rgba(79, 142, 247, 0.1));
  border-color: var(--accent);
}

.result-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.result-figure.highlight .result-value {
  color: var(--accent);
}

.calc-disclaimer {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.calc-partner-intro {
  margin-bottom: 20px;
}

.calc-partner-intro h3 {
  margin: 4px 0 10px;
  font-size: 1.2rem;
}

.calc-partner-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.calc-partner-or {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 20px 0;
}

.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}

@media (max-width: 480px) {
  .calc-card { padding: 24px 18px; }
}

/* Crypto */
.crypto-page-inner {
  width: 100%;
  max-width: 960px;
}
.crypto-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
}
.crypto-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.crypto-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.crypto-pair-name {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.crypto-price {
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.crypto-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.95rem;
}
.crypto-change.up { color: var(--accent); }
.crypto-change.down { color: var(--danger); }
.crypto-change-arrow { font-size: 0.8em; }

.crypto-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.crypto-symbol-row,
.crypto-interval-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.interval-btn,
.symbol-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.interval-btn:hover,
.symbol-btn:hover { color: var(--text); }
.interval-btn.is-active,
.symbol-btn.is-active {
  color: var(--bg);
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.crypto-chart-wrap {
  position: relative;
  min-height: 200px;
}
#crypto-chart {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 320;
  display: block;
  touch-action: none;
}
.crypto-gridline {
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.crypto-axis-label {
  fill: var(--text-muted);
  font-size: 11px;
}
.crypto-wick {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.crypto-wick.up { stroke: var(--accent); }
.crypto-wick.down { stroke: var(--danger); }
.crypto-candle-body.up {
  fill: var(--card-bg);
  stroke: var(--accent);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.crypto-candle-body.down {
  fill: var(--danger);
  stroke: var(--danger);
}
.crypto-crosshair {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.crypto-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.crypto-tooltip-time {
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.crypto-tooltip-rows {
  display: flex;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.crypto-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.legend-swatch.up { background: var(--card-bg); border: 1.5px solid var(--accent); }
.legend-swatch.down { background: var(--danger); }

.crypto-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 20px 0 0;
  text-align: center;
}

@media (max-width: 480px) {
  .crypto-card { padding: 16px; }
  #crypto-chart { aspect-ratio: 900 / 420; }
}

/* Pages légales (CGU, confidentialité, cookies) */
.legal-content { padding: 48px 0 64px; max-width: 820px; margin: 0 auto; }

.legal-updated { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 32px; }

.legal-content h2 { margin: 36px 0 12px; font-size: 1.25rem; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content h3 { margin: 20px 0 8px; font-size: 1.02rem; color: var(--text); }

.legal-content p,
.legal-content li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }

.legal-content ul,
.legal-content ol { padding-left: 22px; margin: 8px 0; }

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

.legal-nav {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin: 0 0 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.legal-nav a { color: var(--text-muted); font-size: 0.9rem; }
.legal-nav a.active { color: var(--accent); font-weight: 600; }

#cookie-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

#cookie-consent-banner p {
  margin: 0;
  flex: 1 1 320px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

#cookie-consent-banner a { color: var(--accent-2); }

.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-consent-actions .btn {
  padding: 10px 16px;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  #cookie-consent-banner { flex-direction: column; align-items: stretch; }
  /* flex-basis (le "320px" de la règle desktop) s'applique à la hauteur une
     fois le conteneur passé en colonne, pas à la largeur : sans ce reset, le
     texte est étiré verticalement et laisse un grand vide avant les boutons. */
  #cookie-consent-banner p { flex: none; }
  .cookie-consent-actions { justify-content: flex-end; }
}

#version-update-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 16px;
  z-index: 2000;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
#version-update-banner p {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}
.version-update-actions { display: flex; gap: 8px; flex-shrink: 0; }
.version-update-actions .btn { padding: 8px 14px; font-size: 0.85rem; }
@media (max-width: 600px) {
  #version-update-banner { flex-direction: column; align-items: stretch; }
  #version-update-banner p { flex: none; }
  .version-update-actions { justify-content: flex-end; }
}

/* ===== App shell : sidebar persistante (desktop) / rail d'icônes (tablette)
   / bottom-nav fixe (mobile). Même disposition que l'espace membre (voir
   member.css), reprise ici pour les pages publiques qui ne chargent pas
   member.css. Remplace l'ancienne nav en liste de liens horizontale. */
:root { --app-topbar-h: 56px; }

.app-shell { min-height: 100vh; }

.app-topbar { height: var(--app-topbar-h); display: flex; align-items: center; }
.app-topbar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.app-body { display: flex; align-items: flex-start; }

.app-sidebar {
  flex-shrink: 0;
  width: 208px;
  position: sticky;
  top: var(--app-topbar-h);
  height: calc(100vh - var(--app-topbar-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.app-nav-item:hover { background: var(--card-bg); color: var(--text); }
.app-nav-item.active { background: rgba(61, 220, 151, 0.12); color: var(--accent); font-weight: 600; }
.app-nav-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; }
.app-nav-icon svg { width: 20px; height: 20px; }
.app-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar-spacer { flex: 1; }

/* Bulle de notification (menu "Mon espace" du site public — même style que
   .duels-nav-badge de l'espace membre, dupliqué ici car cette page ne charge
   pas member.css). */
.duels-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 1; vertical-align: top;
}
.duels-nav-badge-pulse { animation: duels-badge-pulse 1.2s ease-in-out infinite; }
@keyframes duels-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .duels-nav-badge-pulse { animation: none; }
}

.app-content { flex: 1; min-width: 0; }

.app-bottomnav { display: none; }
.app-topnav { display: none; }

/* Puces scintillantes de la barre du haut (mobile) : même halo que
   .duels-nav-badge-pulse, mais en continu (attire l'œil vers des onglets
   qui n'ont sinon aucun accès sur mobile). */
@keyframes app-tnav-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.22); }
  50% { box-shadow: 0 0 0 5px rgba(61, 220, 151, 0.16); }
}
@media (prefers-reduced-motion: reduce) {
  .app-tnav-item { animation: none !important; }
}

/* Tablette : la sidebar garde ses icônes mais perd les libellés. */
@media (max-width: 1024px) {
  .app-sidebar { width: 68px; padding: 16px 8px; align-items: center; }
  .app-nav-item { justify-content: center; padding: 12px 8px; }
  .app-nav-label { display: none; }
}

/* Mobile : sidebar remplacée par une barre de navigation fixe en bas d'écran. */
@media (max-width: 767px) {
  .app-sidebar { display: none; }
  .app-content { padding-bottom: 76px; padding-top: 54px; }
  .app-topnav {
    display: flex;
    position: fixed;
    left: 0; right: 0; top: var(--app-topbar-h);
    z-index: 15;
    gap: 8px;
    padding: 9px 12px;
    overflow-x: auto;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .app-topnav::-webkit-scrollbar { display: none; }
  .app-tnav-item {
    flex: none;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid rgba(61, 220, 151, 0.5);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    animation: app-tnav-pulse 2.6s ease-in-out infinite;
  }
  .app-bottomnav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .app-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 4px 2px;
  }
  .app-bnav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
  .app-bnav-icon svg { width: 20px; height: 20px; }
  .app-bnav-item.active { color: var(--accent); }
}
