/* =================================================================
   HELIXONE - Formation Trading
   ================================================================= */

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

:root {
  --primary: #00d4ff;
  --primary-dark: #0099cc;
  --bg: #0a0e17;
  --bg-alt: #111827;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 212, 255, 0.3);
  --font: 'Space Grotesk', system-ui, sans-serif;
  --max-w: 1200px;
  --radius: 16px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: rgba(10, 14, 23, 0.95);
  border-bottom-color: var(--border-hover);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 700;
}

.logo-helix { color: var(--primary); }
.logo-one { color: #ffffff; }

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

.nav-menu > li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(0, 212, 255, 0.06);
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 180px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  transform: translateX(-50%) translateY(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(8px);
}

.nav-dropdown-link {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-link:hover {
  color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
}

.nav-cta {
  background: var(--primary);
  color: var(--bg);
  border: none;
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: var(--font);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.2s;
}

/* ===== HERO ===== */
@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 85, 247, 0.04), rgba(0, 212, 255, 0.02), rgba(0, 255, 136, 0.03));
  background-size: 300% 300%;
  animation: heroGradient 12s ease infinite;
}

.hero-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50px;
  padding: 6px 18px;
  margin-bottom: 24px;
}

.badge-text {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 24px;
}

.title-line {
  display: block;
  color: var(--text);
}

.title-accent {
  display: block;
  color: var(--primary);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.hero-cta.primary {
  background: var(--primary);
  color: var(--bg);
}

.hero-cta.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.35);
}

.hero-cta.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.hero-cta.secondary:hover {
  border-color: var(--border-hover);
}

.download-info {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  opacity: 0.85;
}

.hero-video {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
}

/* ===== 404 PAGE ===== */
.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 24px;
}

.page-404-container {
  max-width: 500px;
}

.page-404-code {
  display: block;
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  opacity: 0.15;
}

.page-404-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-top: -20px;
  margin-bottom: 12px;
}

.page-404-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ===== ABOUT PAGE ===== */
.about-hero {
  padding: 160px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
}

.about-hero-container {
  max-width: 700px;
  margin: 0 auto;
}

.about-quote {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  font-style: italic;
}

.about-quote-author {
  margin-top: 20px;
  color: var(--primary);
  font-weight: 500;
  font-size: 1.1rem;
}

.about-section {
  padding: 80px 24px;
}

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

.about-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.about-block {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Fondateur */
.about-founder {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 800px;
  margin: 0 auto;
}

.about-founder-photo {
  flex-shrink: 0;
}

.about-photo-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-founder-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.about-founder-name {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Universités */
.about-universities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.about-uni-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.3s, transform 0.3s;
}

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

.about-uni-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.about-uni-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .about-founder {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: 0;
}

.section-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 100px 24px;
}

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

.section-cta {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(168, 85, 247, 0.06), rgba(0, 255, 136, 0.04));
  border-top: 1px solid var(--border);
  padding: 100px 24px;
}

.cta-container {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.cta-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.cta-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
}

.cta-accent {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-info {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s;
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* FAQ Page */
.faq-hero {
  padding: 160px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
}

.faq-hero-container {
  max-width: 600px;
  margin: 0 auto;
}

.faq-hero-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.faq-hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.faq-content {
  padding: 60px 24px 100px;
}

.faq-content-container {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.faq-category-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PARCOURS GRID ===== */
.parcours-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.parcours-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: transform 0.3s, border-color 0.3s;
}

.parcours-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.parcours-level {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.level-1 { background: rgba(0, 212, 255, 0.15); color: #00d4ff; }
.level-2 { background: rgba(0, 255, 136, 0.15); color: #00ff88; }
.level-3 { background: rgba(255, 165, 0, 0.15); color: #ffa500; }
.level-4 { background: rgba(255, 0, 102, 0.15); color: #ff0066; }

.parcours-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.parcours-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.parcours-list {
  list-style: none;
  padding: 0;
}

.parcours-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.parcours-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateY(-50%);
}

/* ===== SCREENSHOTS ===== */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.screen-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s;
}

.screen-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.screen-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.screen-caption {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  background: var(--bg-card);
}

/* ===== INSTALL STEPS ===== */
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.install-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.install-step:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 20px;
}

.install-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.install-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.install-note {
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius);
  padding: 20px 28px;
  text-align: center;
}

.install-note p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== STATS SECTION ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== REVIEWS SECTION ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s, border-color 0.3s;
}

.review-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.review-stars {
  font-size: 1.2rem;
  color: #fbbf24;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.review-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
}

.review-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.review-role {
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

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

  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-tagline {
  color: var(--text-secondary);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.link-group h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.link-group a {
  color: var(--text-secondary);
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.link-group a:hover {
  color: var(--primary);
}

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

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.35s; }
.reveal:nth-child(6) { transition-delay: 0.4s; }

/* ===== WHATSAPP WIDGET ===== */
.whatsapp-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.whatsapp-popup {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 290px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  transform-origin: bottom right;
}

.whatsapp-popup.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.whatsapp-popup-header {
  background: #128C7E;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.whatsapp-popup-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.4;
}

.whatsapp-popup-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s;
}

.whatsapp-popup-close:hover {
  color: #fff;
}

.whatsapp-popup-contacts {
  padding: 8px 0;
}

.whatsapp-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  transition: background 0.15s;
}

.whatsapp-contact:hover {
  background: rgba(255, 255, 255, 0.05);
}

.whatsapp-contact-avatar {
  width: 42px;
  height: 42px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.whatsapp-contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.whatsapp-contact-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.whatsapp-contact-role {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}

.whatsapp-contact-icon {
  color: #25D366;
  flex-shrink: 0;
}

.whatsapp-float {
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .parcours-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 8px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 4px 0 4px 16px;
    min-width: auto;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    transform: none;
  }

  .nav-toggle {
    display: flex;
  }

  .features-grid,
  .screens-grid,
  .install-grid {
    grid-template-columns: 1fr;
  }

  .parcours-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta {
    justify-content: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ===== DEVICE DETECTION ===== */
/* Par défaut (desktop) : bouton mobile caché */
.mobile-only { display: none !important; }

/* Quand JS détecte un mobile : affiche mobile, cache desktop */
body.is-mobile .mobile-only { display: flex !important; }
body.is-mobile .desktop-only { display: none !important; }

/* Fallback CSS pour très petits écrans */
@media (max-width: 480px) {
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

::selection {
  background: rgba(0, 212, 255, 0.3);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
