@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #ffd700;
  --secondary-color: #ffb700;
  --dark-bg: #0f0f1e;
  --darker-bg: #0a0a14;
  --card-bg: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --accent: #ffed4e;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img {
  height: 32px;
  width: 32px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.4));
}
.logo span {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

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

/* Hamburger button — caché sur desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 8px;
  cursor: pointer;
  padding: 0 9px;
  z-index: 1100;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
  width: 100%;
}
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

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

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

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 150px 0 100px;
  text-align: center;
  background-image: url(/images/ouri02.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 20, 0.88);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

/* Plans Section */
.plans-section {
  padding: 80px 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.plan-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.plan-card.featured {
  border: 2px solid var(--primary-color);
}

.plan-card .badge {
  background: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  position: absolute;
  top: 20px;
  right: 20px;
}

.plan-price {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 1rem 0;
}

.plan-features {
  list-style: none;
  margin: 2rem 0;
  text-align: left;
}

.plan-features li {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.plan-features li:before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
  margin-right: 10px;
}

/* Forms */
.form-container {
  max-width: 500px;
  margin: 120px auto 50px;
  padding: 20px;
}

.form-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 3rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

/* Champ mot de passe avec bouton afficher/cacher */
.input-password-wrap {
  position: relative;
}
.input-password-wrap input {
  padding-right: 46px !important;
}
.btn-toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.2s;
}
.btn-toggle-pass:hover { color: var(--primary-color); }

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  background: var(--dark-bg);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffd700' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 35px;
}

/* Dashboard */
.dashboard {
  padding: 100px 0 50px;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 1rem 0;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Referral Link */
.referral-box {
  background: var(--dark-bg);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
}

.referral-link {
  color: var(--primary-color);
  word-break: break-all;
  flex: 1;
}

.copy-btn {
  padding: 8px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 1rem;
  transition: background 0.3s;
  font-weight: 600;
}

.copy-btn:hover {
  background: var(--secondary-color);
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

table th {
  color: var(--primary-color);
  font-weight: 600;
}

table tr:hover {
  background: rgba(255, 215, 0, 0.05);
}

/* Status badges */
.status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.status.completed {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* Alert */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--error);
  color: var(--error);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Mobile nav */
  .nav-burger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(18, 18, 30, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,215,0,0.15);
    border-bottom: 1px solid rgba(255,215,0,0.15);
    padding: 0.5rem 0;
    z-index: 1050;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 1rem;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .plans-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 2rem 1.5rem;
  }

  .referral-box {
    flex-direction: column;
    gap: 1rem;
  }

  .copy-btn {
    margin-left: 0;
    width: 100%;
  }

  table {
    font-size: 0.85rem;
  }

  table th,
  table td {
    padding: 0.5rem;
  }
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Countries Grid */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 3rem 2rem;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  perspective: 1000px;
  animation: hexAppear 0.6s ease-out forwards;
}

/* Hexagon Shape */
.country-card::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 160px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 179, 0, 0.05));
  border: 2px solid rgba(255, 215, 0, 0.3);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  z-index: 1;
}

.country-card:hover::before {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 179, 0, 0.15));
  border-color: var(--primary-color);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.1);
  transform: scale(1.08) rotateZ(2deg);
}

.flag-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2);
  border: 3px solid rgba(255, 215, 0, 0.3);
}

.country-card:hover .flag-image {
  transform: scale(1.15) translateY(-10px);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.35),
              0 0 30px rgba(255, 215, 0, 0.2);
  border-color: var(--primary-color);
}

.country-card h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  text-align: center;
  transition: all 0.4s ease;
  letter-spacing: 0.5px;
}

.country-card:hover h4 {
  color: var(--primary-color);
  transform: translateY(-5px);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Stagger animation on load */
.country-card:nth-child(1) { animation-delay: 0s; }
.country-card:nth-child(2) { animation-delay: 0.05s; }
.country-card:nth-child(3) { animation-delay: 0.1s; }
.country-card:nth-child(4) { animation-delay: 0.15s; }
.country-card:nth-child(5) { animation-delay: 0.2s; }
.country-card:nth-child(6) { animation-delay: 0.25s; }
.country-card:nth-child(7) { animation-delay: 0.3s; }
.country-card:nth-child(8) { animation-delay: 0.35s; }
.country-card:nth-child(9) { animation-delay: 0.4s; }
.country-card:nth-child(10) { animation-delay: 0.45s; }

@keyframes hexAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Footer professionnel ────────────────────── */
  position: relative;
  width: 100%;
}

.select-header {
  width: 100%;
  padding: 12px 15px;
  background: var(--dark-bg);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: all 0.3s;
  font-size: 1rem;
}

.select-header:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.arrow {
  color: var(--primary-color);
  font-size: 0.8rem;
  transition: transform 0.3s;
  display: inline-block;
}

.custom-select.active .arrow {
  transform: rotateZ(180deg);
}

.select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  margin-top: 5px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  display: none;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.custom-select.active .select-dropdown {
  max-height: 320px;
  overflow-y: auto;
  opacity: 1;
  display: block;
}

.select-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.select-option:last-child {
  border-bottom: none;
}

.select-option:hover {
  background: rgba(255, 215, 0, 0.15);
  padding-left: 20px;
}

.select-option.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 600;
}

/* Scrollbar styling */
.select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.select-dropdown::-webkit-scrollbar-track {
  background: rgba(255, 215, 0, 0.05);
}

.select-dropdown::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ── Footer professionnel ────────────────────── */
.site-footer {
  background: #0d0d1a;
  border-top: 1px solid rgba(255,215,0,0.15);
  margin-top: 5rem;
}
.site-footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.sf-brand .sf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 1rem;
}
.sf-brand .sf-logo img {
  height: 32px;
  width: 32px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 6px rgba(255,215,0,0.35));
}
.sf-brand .sf-logo span {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .5px;
}
.sf-tagline {
  color: rgba(255,255,255,.55);
  font-size: .85rem;
  line-height: 1.65;
  margin-bottom: .9rem;
  max-width: 280px;
}
.sf-countries {
  font-size: .75rem;
  color: rgba(255,215,0,.5);
  line-height: 1.6;
}
.sf-col h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.sf-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.sf-col ul li a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .875rem;
  transition: color .2s;
}
.sf-col ul li a:hover { color: var(--accent); }
.sf-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.2rem 1.5rem;
}
.sf-bottom > div {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  font-size: .8rem;
  color: rgba(255,255,255,.3);
}
.sf-bottom-links {
  display: flex;
  gap: 1.5rem;
}
.sf-bottom-links a {
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: color .2s;
  font-size: .8rem;
}
.sf-bottom-links a:hover { color: var(--accent); }

/* ── Footer compact (pages app avec sidebar) ─ */
.app-footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .78rem;
  color: rgba(255,255,255,.25);
}
.app-footer a {
  color: rgba(255,215,0,.45);
  text-decoration: none;
  margin: 0 .5rem;
}
.app-footer a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.2rem 2rem;
    gap: 1.8rem;
  }
  .sf-bottom > div {
    flex-direction: column;
    text-align: center;
  }
  .sf-bottom-links { justify-content: center; }
}
