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

:root {
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --whatsapp: #25d366;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 5%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s ease;
}

header h1.logo {
  font-size: 24px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -1px;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: var(--text-muted);
  transition: 0.3s;
  font-weight: 500;
}

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

/* BOUTONS */
.btn {
  padding: 12px 28px;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: var(--bg-dark);
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
  background: var(--bg-card)
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-small {
  padding: 8px 16px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

/* HERO */
.hero {
  padding: 140px 10% 100px;
  display: flex;
  align-items: center;
  min-height: 85vh;
}

.hero-text {
  max-width: 700px;
}

.hero h2 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.hero p {
  margin-bottom: 40px;
  line-height: 1.8;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* FEATURES */
.features {
  padding: 100px 10%;
  text-align: center;
}

.features h2 {
  margin-bottom: 50px;
  font-size: 32px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.feature {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
}

.feature h3 {
  margin-bottom: 15px;
  color: #38bdf8;
}

.feature .icon { font-size: 40px; margin-bottom: 20px; display: block; }

/* PRICING */
.pricing {
  padding: 100px 10%;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.price-card {
  background: var(--bg-card);
  padding: 50px 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.price-card h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #38bdf8;
}

.price-card.popular {
  border: 2px solid var(--primary);
  transform: scale(1.05);
}

.price-features {
  list-style: none;
  margin: 30px 0;
  color: var(--text-muted);
}

/* CTA */
.cta {
  padding: 80px 10%;
  text-align: center;
  background: #38bdf8;
  color: #0f172a;
}

.cta h2 {
  margin-bottom: 20px;
}

/* FOOTER */
footer {
  padding: 60px 10%;
  background: #020617;
  text-align: center;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* MODAL OVERLAY */
.modal {
  display: none; 
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100%; height: 100%;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

/* MODAL CONTENT */
.modal-content {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 28px;
  width: 95%;
  max-width: 450px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* LOGO DESIGN DANS LE POPUP */
.modal-logo {
  margin-bottom: 20px;
}
.logo-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  margin: 0 auto 10px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}
.logo-icon::after {
  content: '';
  position: absolute;
  top: 15px; left: 15px;
  width: 20px; height: 20px;
  border: 3px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 2s linear infinite;
}

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

/* BOUTONS D'AUTH */
.auth-btn {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: 0.2s;
}

/* WHATSAPP PRO AUTH STYLES */
.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.5);
  padding: 5px;
  border-radius: 12px;
  margin: 25px 0;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  border-radius: 8px;
  transition: 0.3s;
}

.tab-btn.active {
  background: var(--primary);
  color: var(--bg-dark);
}

.qr-frame {
  background: white;
  padding: 20px;
  border-radius: 16px;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode i { font-size: 140px; color: #0f172a; }

.pairing-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.pairing-box input {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.5);
  color: white;
  text-align: center;
  font-size: 16px;
}

.pairing-display {
  font-family: 'Courier New', monospace;
  font-size: 24px;
  letter-spacing: 5px;
  color: var(--primary);
  font-weight: 700;
  padding: 15px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 10px;
}

/* UTILS */
.auth-btn {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.auth-btn img, .auth-btn i { font-size: 20px; width: 20px; }

.google { background: white; color: #1e293b; }
.whatsapp { background: #25d366; color: white; }

.auth-btn:hover { transform: scale(1.02); filter: brightness(1.1); }

.divider { margin: 25px 0; border-bottom: 1px solid rgba(255,255,255,0.1); position: relative; }
.divider span { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--bg-card); padding: 0 15px; color: var(--text-muted); font-size: 0.85rem; }

.btn-link { background: none; border: none; color: var(--text-muted); cursor: pointer; text-decoration: underline; margin-top: 20px; }

.fade-in { opacity: 0; transform: translateY(20px); transition: 0.8s ease-out; }
.fade-in.show { opacity: 1; transform: translateY(0); }

.close-modal { position: absolute; right: 25px; top: 20px; font-size: 28px; color: var(--text-muted); cursor: pointer; }

/* PROFILE DROPDOWN */
.auth-wrapper { position: relative; }
.profile-icon-btn {
    width: 45px; height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
}
.profile-icon-btn img { width: 100%; height: 100%; object-fit: cover; }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background: var(--bg-card);
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1001;
    padding: 10px 0;
}
.dropdown-content.show { display: block; animation: fadeIn 0.2s ease; }

.dropdown-content a, .dropdown-item {
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: 0.2s;
}
.dropdown-content a:hover { background: rgba(56, 189, 248, 0.1); color: var(--primary); }

.dropdown-item select {
    background: transparent;
    color: var(--primary);
    border: none;
    font-size: 13px;
    cursor: pointer;
}

/* THEMES */
body.light-theme {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
}
body.light-theme header { background: rgba(248, 250, 252, 0.8); border-bottom: 1px solid #e2e8f0; }
