/* ────────────────────────────────────────────────────────────
   Rally — Site public
   Design system identique à l'app mobile
──────────────────────────────────────────────────────────── */

:root {
  --rb:  #0F0F14;
  --rs:  #1A1A24;
  --rs2: #22222E;
  --rp:  #1D9E75;
  --rpl: #5DCAA5;
  --ra:  #D4A843;
  --ral: #F0C866;
  --rt:  #F0EFF8;
  --rm:  rgba(240,239,248,0.65);
  --rh:  rgba(240,239,248,0.42);
  --rbr: rgba(240,239,248,0.08);
  --rbr2: rgba(240,239,248,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--rb);
  color: var(--rt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rpl); text-decoration: none; }
a:hover { color: var(--rt); }

/* ── NAVIGATION ───────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--rbr2);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rt);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--rm);
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--rt); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--rp);
  color: #fff !important;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, opacity .15s;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--rpl); color: #fff !important; }

/* ── FOOTER ───────────────────────────────────────────────── */

.site-footer {
  background: var(--rs);
  border-top: 0.5px solid var(--rbr2);
  padding: 40px 24px 32px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rt);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--rh);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--rt); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 0.5px solid var(--rbr);
}

.footer-copy {
  font-size: 12px;
  color: var(--rh);
}

.footer-tagline {
  font-size: 12px;
  color: var(--rh);
  text-align: right;
}

/* ── HERO ─────────────────────────────────────────────────── */

.hero {
  padding: 80px 24px 72px;
  text-align: center;
  max-width: 740px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(29,158,117,0.15);
  border: 0.5px solid rgba(93,202,165,0.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rpl);
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rp);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--rt);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--rm);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--rp);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .1s;
  box-shadow: 0 4px 24px rgba(29,158,117,0.3);
}
.hero-cta:hover { background: var(--rpl); color: #fff; transform: translateY(-1px); }

.hero-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--rh);
}

/* ── SECTIONS ─────────────────────────────────────────────── */

.section {
  padding: 64px 24px;
}

.section-alt {
  background: var(--rs);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--rt);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--rm);
  margin-bottom: 40px;
}

/* ── FEATURE CARDS ────────────────────────────────────────── */

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

.feature-card {
  background: var(--rs);
  border: 0.5px solid var(--rbr2);
  border-radius: 14px;
  padding: 24px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(29,158,117,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--rt);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--rm);
  line-height: 1.55;
}

/* ── COMMUNITY SECTION ────────────────────────────────────── */

.community-text {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  font-size: 15px;
  color: var(--rm);
  line-height: 1.7;
}

.community-text p + p { margin-top: 14px; }

/* ── UNIVERSE CHIPS ───────────────────────────────────────── */

.universe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.chip {
  background: var(--rs);
  border: 0.5px solid var(--rbr2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--rm);
  white-space: nowrap;
}

.chip-green {
  background: rgba(29,158,117,0.12);
  border-color: rgba(93,202,165,0.25);
  color: var(--rpl);
}

/* ── LEGAL PAGES ──────────────────────────────────────────── */

.page-layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  gap: 48px;
  min-height: calc(100vh - 200px);
}

.toc-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rh);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  font-size: 12.5px;
  color: var(--rh);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all .15s;
  line-height: 1.4;
}
.toc-list a:hover { color: var(--rt); background: var(--rs); }
.toc-list a.active { color: var(--rpl); background: rgba(29,158,117,0.1); }

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

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: var(--rt);
  margin-bottom: 8px;
}

.page-date {
  font-size: 12px;
  color: var(--rh);
}

.legal-section {
  margin-bottom: 40px;
  scroll-margin-top: 80px;
}

.legal-section h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--rt);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--rbr);
}

.legal-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--rm);
  margin: 14px 0 8px;
}

.legal-section p {
  font-size: 14px;
  color: var(--rm);
  line-height: 1.7;
  margin-bottom: 10px;
}

.legal-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.legal-section ul li {
  font-size: 14px;
  color: var(--rm);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.legal-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--rh);
}

.legal-section a { color: var(--rpl); }

/* Mobile ToC collapsible */
.toc-mobile {
  display: none;
  margin-bottom: 28px;
}

.toc-mobile summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--rm);
  cursor: pointer;
  padding: 10px 14px;
  background: var(--rs);
  border-radius: 8px;
  border: 0.5px solid var(--rbr2);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.toc-mobile[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: none; }

.toc-mobile-list {
  background: var(--rs);
  border: 0.5px solid var(--rbr2);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 8px;
  list-style: none;
}

.toc-mobile-list a {
  display: block;
  font-size: 13px;
  color: var(--rh);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
}
.toc-mobile-list a:hover { color: var(--rt); background: var(--rs2); }

/* ── CONTACT PAGE ─────────────────────────────────────────── */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.contact-info h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  color: var(--rt);
  margin-bottom: 10px;
}

.contact-info .sub {
  font-size: 15px;
  color: var(--rm);
  margin-bottom: 28px;
  line-height: 1.6;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rpl);
  text-decoration: none;
  margin-bottom: 32px;
}
.contact-email-link:hover { color: var(--rt); }

/* FAQ Accordion */
.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 0.5px solid var(--rbr2);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rt);
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--rs);
  transition: background .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--rs2); }
.faq-item[open] summary { background: var(--rs2); }

.faq-item .faq-chevron {
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  font-size: 13px;
  color: var(--rm);
  line-height: 1.65;
  padding: 12px 16px;
  background: var(--rs);
  border-top: 0.5px solid var(--rbr);
}

/* Contact form */
.contact-form {
  background: var(--rs);
  border: 0.5px solid var(--rbr2);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rm);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--rs2);
  border: 0.5px solid var(--rbr2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--rt);
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--rp);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--rh);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='rgba(240,239,248,0.42)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--rs);
  color: var(--rt);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--rp);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  width: 100%;
}
.btn-submit:hover { background: var(--rpl); }
.btn-submit:disabled { opacity: 0.5; cursor: default; }

.form-feedback {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}
.form-feedback.success {
  background: rgba(29,158,117,0.15);
  color: var(--rpl);
  border: 0.5px solid rgba(93,202,165,0.25);
  display: block;
}
.form-feedback.error {
  background: rgba(226,75,74,0.1);
  color: #F09595;
  border: 0.5px solid rgba(226,75,74,0.2);
  display: block;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links { display: none; }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-layout {
    flex-direction: column;
    padding: 32px 16px 60px;
    gap: 0;
  }

  .toc-sidebar { display: none; }
  .toc-mobile { display: block; }

  .contact-layout {
    grid-template-columns: 1fr;
    padding: 32px 16px 60px;
    gap: 32px;
  }

  .hero {
    padding: 52px 16px 48px;
  }

  .section {
    padding: 44px 16px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-tagline {
    text-align: left;
  }
}

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

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