/* =============================================
   CONCOURS BOT MAROC — style.css
   Mobile-first, RTL-ready, modern gradient
   ============================================= */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #667eea;
  --primary-dark: #764ba2;
  --accent: #43e97b;
  --accent-dark: #38f9d7;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --surface: #ffffff;
  --surface-2: #f8f9ff;
  --border: #e5e7f5;
  --shadow-sm: 0 1px 3px rgba(102,126,234,0.12);
  --shadow-md: 0 4px 16px rgba(102,126,234,0.16);
  --shadow-lg: 0 8px 40px rgba(102,126,234,0.24);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(160deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --font-latin: 'Inter', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  --nav-height: 64px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-latin);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: hidden;
}
[dir="rtl"] { font-family: var(--font-arabic); }
[dir="rtl"] body { font-family: var(--font-arabic); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== AOS ANIMATIONS ===== */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}
[data-aos="fade-left"] { transform: translateX(-30px); }
[data-aos="fade-left"].aos-animate { transform: translateX(0); }
[data-aos="fade-right"] { transform: translateX(30px); }
[data-aos="fade-right"].aos-animate { transform: translateX(0); }
[data-aos="zoom-in"] { transform: scale(0.9); }
[data-aos="zoom-in"].aos-animate { transform: scale(1); }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }
p { color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(102,126,234,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102,126,234,0.5);
}
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(67,233,123,0.35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(67,233,123,0.5); }
.btn-ghost { color: white; border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0 20px;
}
.navbar.scrolled {
  background: rgba(15,12,41,0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__brand {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar__menu a {
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.navbar__menu a:hover { color: white; background: rgba(255,255,255,0.1); }
.navbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-switcher {
  display: flex;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  cursor: pointer;
}
.lang-btn.active { background: var(--gradient); color: white; box-shadow: 0 2px 8px rgba(102,126,234,0.4); }
.lang-btn:hover:not(.active) { color: white; background: rgba(255,255,255,0.1); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
  min-height: 100svh;
  background: var(--gradient-hero);
  color: white;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 20px 60px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%; left: -20%;
  width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(102,126,234,0.3) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(118,75,162,0.25) 0%, transparent 70%);
  animation: pulse-glow 6s ease-in-out infinite alternate-reverse;
}

@keyframes pulse-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.1); }
}

.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  width: 100%;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(102,126,234,0.2);
  border: 1px solid rgba(102,126,234,0.4);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(102,126,234,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(102,126,234,0); }
}

.hero__title {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.75);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero__stat {
  text-align: center;
}
.hero__stat-value {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.hero__stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* Telegram mockup */
.hero__mockup {
  display: flex;
  justify-content: center;
  align-items: center;
}
.tg-mockup {
  width: min(300px, 85vw);
  background: #17212b;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.tg-header {
  background: #232e3c;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tg-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.tg-name { font-size: 0.9rem; font-weight: 600; color: white; }
.tg-status { font-size: 0.75rem; color: var(--accent); }
.tg-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tg-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.tg-msg--bot {
  background: #232e3c;
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.tg-msg--user {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.tg-btn-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tg-inline-btn {
  flex: 1;
  min-width: 80px;
  padding: 7px 10px;
  background: rgba(102,126,234,0.2);
  border: 1px solid rgba(102,126,234,0.4);
  border-radius: 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

/* ===== SECTION BASES ===== */
.section { padding: 80px 20px; }
.section--alt { background: var(--surface-2); }
.section__header { text-align: center; margin-bottom: 56px; }
.section__header h2 { margin-bottom: 12px; }
.section__header p { font-size: 1.1rem; max-width: 560px; margin: 0 auto; }
.container { max-width: 1200px; margin: 0 auto; }

/* ===== HOW IT WORKS ===== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.step-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
}
.step-number {
  width: 44px; height: 44px;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin: 0 auto 16px;
}
.step-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}
.step-card h3 { margin-bottom: 10px; color: var(--text); }
.step-card p { font-size: 0.95rem; }

/* ===== CONCOURS CARDS ===== */
.concours-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.concours-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.concours-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.concours-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-color, #667eea)08, transparent);
  pointer-events: none;
}
.concours-card__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.concours-card__body { flex: 1; }
.concours-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.concours-card__org {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.concours-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.concours-meta-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.btn-subscribe {
  width: 100%;
  padding: 12px;
}

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 2px solid var(--border);
  position: relative;
  transition: all var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card--featured {
  background: var(--gradient-hero);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}
.pricing-card--featured p, .pricing-card--featured .pricing-feature { color: rgba(255,255,255,0.8); }
.pricing-card--featured h3 { color: white; }
.pricing-card--featured .pricing-price__main { color: white; }
.pricing-card--featured .pricing-cta { background: white; color: var(--primary); font-weight: 700; }
.pricing-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: white;
  padding: 5px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}
.pricing-name {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text);
}
.pricing-price { margin-bottom: 24px; }
.pricing-price__main {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.pricing-price__currency { font-size: 1.2rem; }
.pricing-price__period { display: block; font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }
.pricing-price__eur { display: block; font-size: 0.8rem; color: var(--text-light); }
.pricing-features { margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; }
.pricing-feature { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--text-muted); }
.pricing-check { color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.pricing-cta { width: 100%; padding: 14px; }

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.testimonial-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px; left: 24px;
  font-size: 4rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
  font-family: Georgia, serif;
}
[dir="rtl"] .testimonial-card::before { left: auto; right: 24px; }
.testimonial-text { font-size: 1rem; color: var(--text); margin-bottom: 20px; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.testimonial-city { font-size: 0.8rem; color: var(--text-muted); }
.testimonial-stars { color: #fbbf24; font-size: 0.85rem; margin-top: 2px; }

/* ===== FAQ ===== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.faq-item:hover { border-color: var(--primary); }
.faq-item.open { border-color: var(--primary); box-shadow: var(--shadow-md); }
.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  background: none;
  cursor: pointer;
  text-align: start;
  transition: color var(--transition);
}
.faq-item.open .faq-question { color: var(--primary); }
.faq-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--transition);
}
.faq-item.open .faq-icon { background: var(--gradient); color: white; border-color: transparent; transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}
.faq-answer p { font-size: 0.95rem; line-height: 1.7; color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  background: var(--gradient-hero);
  color: rgba(255,255,255,0.8);
  padding: 60px 20px 24px;
}
.footer__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand h3 {
  font-size: 1.4rem;
  color: white;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer__brand p { font-size: 0.9rem; max-width: 280px; }
.footer__col h4 { color: white; margin-bottom: 14px; font-size: 1rem; }
.footer__col a {
  display: block;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  padding: 5px 0;
  transition: color var(--transition);
}
.footer__col a:hover { color: white; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,8,20,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
@media (min-width: 640px) {
  .payment-modal { align-items: center; }
}
.modal-sheet {
  background: white;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92svh;
  overflow-y: auto;
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
@media (min-width: 640px) {
  .modal-sheet { border-radius: 24px; max-height: 85vh; transform: scale(0.9) translateY(20px); opacity: 0; }
}
.payment-modal.open .modal-sheet {
  transform: translateY(0);
  pointer-events: auto;
}
@media (min-width: 640px) {
  .payment-modal.open .modal-sheet { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
@media (min-width: 640px) { .modal-handle { display: none; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.modal-header h2 {
  font-size: 1.2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 24px; }

/* Modal steps */
.modal-step { display: none; }
.modal-step.active { display: block; }

/* Summary */
.modal-summary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}
.modal-summary h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.summary-item:last-child { border-bottom: none; }
.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 600; color: var(--text); }
.summary-price { color: var(--primary); font-size: 1.1rem; }

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus { border-color: var(--primary); }
.form-group input::placeholder { color: var(--text-light); }

.form-error {
  display: none;
  color: #ef4444;
  font-size: 0.875rem;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

/* Pay methods */
.pay-section { margin-bottom: 24px; }
.pay-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-btn {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: start;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-btn:hover { border-color: var(--primary); background: #f5f3ff; }
.pay-btn.selected { border-color: var(--primary); background: linear-gradient(135deg, #f0f0ff, #f5f0ff); color: var(--primary-dark); }

.rib-info {
  display: none;
  background: #fffbf0;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #92400e;
  margin-top: 10px;
  word-break: break-all;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success step */
.success-animation {
  text-align: center;
  padding: 8px 0 24px;
}
.success-emoji { font-size: 4rem; margin-bottom: 16px; animation: success-bounce 0.6s ease; }
@keyframes success-bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.success-animation h3 { font-size: 1.5rem; margin-bottom: 8px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.success-animation p { color: var(--text-muted); margin-bottom: 24px; }
.code-display {
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.code-display p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-bottom: 8px; }
.activation-code {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: white;
  font-family: monospace;
}
.code-display .instruction { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 8px; margin-bottom: 0; }
.code-display .bot-link { color: var(--accent); font-weight: 700; }

/* Plan/concours selectors */
.plan-selector-grid, .concours-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.plan-selector-btn, .concours-selector-btn {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.plan-selector-btn:hover, .concours-selector-btn:hover { border-color: var(--primary); background: #f5f3ff; }
.plan-selector-btn.featured { border-color: var(--primary); background: #f5f3ff; }
.psb-name { font-weight: 600; color: var(--text); }
.psb-price { color: var(--primary); font-weight: 700; }
.csb-icon { font-size: 1.4rem; }
.csb-name { font-weight: 600; color: var(--text); flex: 1; text-align: start; margin-inline-start: 10px; }

/* ===== CONFETTI CANVAS ===== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--gradient);
  padding: 80px 20px;
  text-align: center;
  color: white;
}
.cta-section h2 { color: white; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.8); max-width: 480px; margin: 0 auto 32px; font-size: 1.1rem; }
.cta-section .btn { background: white; color: var(--primary-dark); font-weight: 700; }
.cta-section .btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .concours-grid { grid-template-columns: repeat(2, 1fr); }
  .concours-card { flex-direction: row; align-items: center; }
  .btn-subscribe { width: auto; min-width: 120px; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr 1fr; }
  .hero__subtitle { max-width: 100%; }
  .hero__stats { gap: 48px; }
  .concours-grid { grid-template-columns: repeat(3, 1fr); }
  .concours-card { flex-direction: column; }
  .btn-subscribe { width: 100%; }
  .pricing-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .navbar__menu { display: none; }
  .navbar__menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(15,12,41,0.98);
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .navbar__menu.open a { padding: 12px 16px; border-radius: 8px; }
  .menu-toggle { display: flex; }
  .navbar__cta { display: none; }
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
}

/* RTL adjustments */
[dir="rtl"] .concours-card__meta { flex-direction: row-reverse; }
[dir="rtl"] .summary-item { flex-direction: row-reverse; }
[dir="rtl"] .pricing-feature { flex-direction: row-reverse; }
[dir="rtl"] .testimonial-author { flex-direction: row-reverse; }
[dir="rtl"] .hero__ctas { flex-direction: row-reverse; }
[dir="rtl"] .navbar__inner { flex-direction: row-reverse; }
[dir="rtl"] .faq-question { flex-direction: row-reverse; }

/* ===================================================
   AUTH MODALS
=================================================== */
.auth-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.auth-modal-overlay.open { opacity: 1; pointer-events: all; }

.auth-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  width: min(480px, calc(100vw - 32px));
  background: white;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  z-index: 1101;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-height: 90vh;
  overflow-y: auto;
}
.auth-modal.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%);
}
.auth-modal--wide { width: min(600px, calc(100vw - 32px)); }

.auth-modal__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 0;
}
.auth-modal__header h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.auth-modal__body { padding: 16px 24px 24px; }

.auth-switch { text-align: center; margin-top: 16px; font-size: 0.88rem; color: var(--text-muted); }
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-forgot { text-align: center; margin-top: 8px; font-size: 0.82rem; }
.auth-forgot a { color: var(--text-muted); }

/* Nav auth buttons */
#nav-auth-area { display: flex; gap: 8px; align-items: center; }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: white; }

/* ===================================================
   DASHBOARD
=================================================== */
.dashboard-subs-list { display: flex; flex-direction: column; gap: 12px; }

.dashboard-sub-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.sub-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: #f8f7ff;
  border-bottom: 1px solid var(--border);
}
.sub-concours { font-weight: 600; font-size: 0.92rem; }
.sub-status { font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.status-active { background: #dcfce7; color: #166534; }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-expired { background: #fee2e2; color: #991b1b; }

.sub-card-body {
  display: flex; gap: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.sub-info { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; }
.sub-info span { color: var(--text-muted); }
.sub-info strong { font-weight: 600; color: var(--text); }

.sub-code-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sub-code {
  font-family: monospace; font-size: 1.05rem; font-weight: 700;
  background: #f0edff; padding: 3px 10px; border-radius: 6px;
  color: var(--primary-dark); letter-spacing: 0.1em;
}
.dashboard-empty { text-align: center; color: var(--text-muted); padding: 24px 0; }

/* ===================================================
   PAYMENT TABS
=================================================== */
.pay-tabs-section { margin-top: 16px; }
.pay-tabs-section > h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }

.pay-tabs {
  display: flex; gap: 0;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.pay-tab {
  flex: 1; padding: 10px 8px;
  background: white; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s;
  border-right: 1px solid var(--border);
}
.pay-tab:last-child { border-right: none; }
.pay-tab.active { background: var(--primary); color: white; }
.pay-tab:not(.active):hover { background: #f5f3ff; color: var(--primary); }
.pay-tab-icon { font-size: 1.3rem; }

.pay-tab-content { display: none; }
.pay-tab-content.active { display: block; }

/* ===== CMI ===== */
.cmi-coming-soon {
  text-align: center; padding: 24px 16px;
  background: #f8f7ff; border-radius: 12px;
  border: 1px dashed var(--border);
}
.cmi-icon { font-size: 2.5rem; margin-bottom: 8px; }
.cmi-msg { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cmi-sub { color: var(--text-muted); font-size: 0.88rem; }

/* ===== PayPal ===== */
.paypal-info { margin-bottom: 12px; }
.paypal-note { font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.paypal-error { color: var(--error, #e53e3e); font-size: 0.85rem; margin-top: 8px; text-align: center; min-height: 20px; }
.pay-loading { text-align: center; color: var(--text-muted); padding: 20px; font-size: 0.9rem; }
.pay-error { color: var(--error, #e53e3e); text-align: center; padding: 12px; font-size: 0.88rem; }

/* ===== CashPlus ===== */
.cashplus-qr-img {
  display: block; margin: 0 auto 12px;
  width: 180px; height: 180px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.qr-wrapper { text-align: center; }

.cashplus-ref-box {
  background: #f8f7ff; border-radius: 12px;
  padding: 14px; text-align: center; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.cashplus-ref-box p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.cashplus-ref-code {
  font-family: monospace; font-size: 1.5rem; font-weight: 800;
  color: var(--primary-dark); letter-spacing: 0.15em;
  background: white; border: 2px solid var(--primary);
  border-radius: 8px; padding: 6px 16px; display: inline-block;
}
.cashplus-amount { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-top: 6px; }

.cashplus-instructions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cashplus-step {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.85rem; color: var(--text);
}
.cp-step-num {
  min-width: 22px; height: 22px;
  background: var(--primary); color: white;
  border-radius: 50%; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

.cashplus-pending-notice {
  background: #fef9c3; border: 1px solid #fbbf24;
  border-radius: 10px; padding: 10px 14px;
  font-size: 0.85rem; color: #92400e; text-align: center;
}

/* RTL tabs */
[dir="rtl"] .pay-tab { border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .pay-tab:last-child { border-left: none; }
[dir="rtl"] .cashplus-step { flex-direction: row-reverse; }
[dir="rtl"] .sub-card-header { flex-direction: row-reverse; }
[dir="rtl"] .sub-code-row { flex-direction: row-reverse; }

/* Responsive */
@media (max-width: 480px) {
  .auth-modal { border-radius: 20px 20px 0 0; top: auto; bottom: 0; left: 0; transform: none; width: 100%; }
  .auth-modal.open { transform: none; }
  .auth-modal--wide { width: 100%; }
}

/* ===== Dashboard Tabs ===== */
.dashboard-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface, #f0f4ff);
  padding: 3px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.dashboard-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary, #666);
  font-family: inherit;
  transition: all 0.2s;
}
.dashboard-tab.active {
  background: white;
  color: var(--primary, #667eea);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* OTP hidden */
.hidden { display: none !important; }
