/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* ========== LARGE DESKTOP (1400px+) ========== */
@media (min-width: 1400px) {
  .container {
    max-width: 1600px;
  }

  .hero-title {
    font-size: 7rem;
  }

  .section-title {
    font-size: 3.5rem;
  }
}

/* ========== DESKTOP (1200px - 1399px) ========== */
@media (max-width: 1399px) {
  .solutions-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* ========== LAPTOP (992px - 1199px) ========== */
@media (max-width: 1199px) {
  .hero-title {
    font-size: 5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .solutions-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
  }

  .contact-wrapper {
    gap: 3rem;
  }
}

/* ========== TABLET (768px - 991px) ========== */
@media (max-width: 991px) {
  /* Navigation */
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    gap: 0;
    transition: left 0.4s ease;
    z-index: 9999;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    width: 100%;
    margin-bottom: 1rem;
  }

  .nav-links li a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.3rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* Hero Section */
  .hero-title {
    font-size: 4rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stat-mini {
    min-width: 100%;
  }

  /* Sections */
  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-description {
    font-size: 1.1rem;
  }

  /* Solutions Grid */
  .solutions-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .solution-card {
    padding: 2rem;
  }

  /* Impact Stats */
  .impact-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Tech Stack */
  .tech-stack-visual {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Contact */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Floating Circuits */
  .floating-circuit {
    width: 100px;
    height: 100px;
  }
}

/* ========== MOBILE LARGE (576px - 767px) ========== */
@media (max-width: 767px) {
  /* Typography */
  :root {
    --font-size-hero: 3rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.5rem;
    --font-size-body: 1rem;
  }

  /* Container */
  .container,
  .container-fluid {
    padding: 0 1.5rem;
  }

  /* Navigation */
  .nav-container {
    padding: 0 1.5rem;
  }

  .nav-logo {
    height: 50px;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .nav-cta-group {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-cta {
    padding: 10px 20px;
    font-size: 0.95rem;
    width: 100%;
    text-align: center;
  }

  /* Hero Section */
  .hero-title {
    font-size: 3rem;
    letter-spacing: 2px;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-logo {
    height: 100px;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 16px 30px;
    font-size: 1rem;
    justify-content: center;
  }

  /* Stats */
  .hero-stats {
    gap: 1rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: var(--spacing-lg);
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .section-description {
    font-size: 1rem;
  }

  /* Solution Cards */
  .solution-card {
    padding: 1.5rem;
  }

  .card-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .card-description {
    font-size: 0.95rem;
  }

  .card-impact {
    padding: 1rem;
  }

  .impact-icon {
    font-size: 1.5rem;
  }

  /* Impact Stats Grid */
  .impact-stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stat-visualization {
    width: 180px;
    height: 180px;
  }

  .stat-number-large {
    font-size: 3rem;
  }

  .stat-label-large {
    font-size: 1.2rem;
  }

  /* Tech Categories */
  .tech-category {
    padding: 2rem;
  }

  .tech-category-title {
    font-size: 1.5rem;
  }

  .tech-icon-large {
    font-size: 2.5rem;
  }

  /* Contact Form */
  .contact-form-container {
    padding: 2rem;
  }

  .contact-info-panel {
    padding: 2rem;
  }

  .contact-logo {
    height: 80px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .form-submit-btn {
    padding: 16px 30px;
    font-size: 1.1rem;
  }

  /* Floating Circuits */
  .floating-circuit {
    width: 80px;
    height: 80px;
  }

  .circuit-1 {
    top: 15%;
    left: 5%;
  }

  .circuit-2 {
    top: 25%;
    right: 5%;
  }

  .circuit-3 {
    bottom: 30%;
    left: 8%;
  }

  .circuit-4 {
    bottom: 20%;
    right: 8%;
  }

  /* Scroll Indicator */
  .scroll-indicator {
    bottom: 20px;
  }

  .scroll-indicator span {
    font-size: 0.75rem;
  }

  .scroll-arrow {
    width: 20px;
    height: 20px;
  }
}

/* ========== MOBILE SMALL (320px - 575px) ========== */
@media (max-width: 575px) {
  /* Typography */
  :root {
    --font-size-hero: 2.5rem;
    --font-size-h2: 1.8rem;
    --font-size-h3: 1.3rem;
    --font-size-body: 0.95rem;
  }

  /* Container */
  .container,
  .container-fluid {
    padding: 0 1rem;
  }

  /* Navigation */
  .nav-container {
    padding: 0 1rem;
  }

  .nav-logo {
    height: 45px;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .nav-cta-group {
    display: none; /* Cache sur très petits écrans pour économiser l'espace */
  }

  /* Hero */
  .hero {
    padding: 100px 1rem 60px;
  }

  .hero-title {
    font-size: 2.5rem;
    letter-spacing: 1px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .hero-logo {
    height: 80px;
  }

  .stat-mini {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  /* Sections */
  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-description {
    font-size: 0.95rem;
  }

  /* Cards */
  .solution-card {
    padding: 1.25rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .card-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  .card-tech-stack {
    gap: 0.4rem;
  }

  .tech-tag {
    font-size: 0.65rem;
    padding: 4px 10px;
  }

  /* Forms */
  .form-label {
    font-size: 1rem;
  }

  .contact-info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1.2rem;
  }

  .info-icon {
    font-size: 1.5rem;
  }

  .info-content h4 {
    font-size: 1.1rem;
  }

  .info-content p {
    font-size: 0.9rem;
  }

  /* Hide some decorative elements on very small screens */
  .floating-circuit {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 120px 2rem 60px;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .floating-circuit {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .main-nav,
  .scroll-indicator,
  .floating-circuit,
  .hyperdrive-background,
  .mobile-menu-toggle {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    page-break-inside: avoid;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hyperdrive-background,
  .warp-star,
  .hyper-line,
  .energy-particle,
  .floating-circuit {
    animation: none !important;
  }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
  :root {
    --primary-cyan: #00FFFF;
    --accent-lime: #FFFF00;
    --text-gray: #FFFFFF;
  }

  .solution-card,
  .contact-form-container,
  .contact-info-panel {
    border-width: 2px;
  }
}

/* ========== DARK MODE (Si supporté par le navigateur) ========== */
@media (prefers-color-scheme: dark) {
  /* Déjà en mode sombre par défaut */
}

/* ========== LIGHT MODE (Pour futur toggle) ========== */
body.light-mode {
  --background-dark: #F5F7FA;
  --background-darker: #FFFFFF;
  --text-white: #0A0E27;
  --text-gray: #4A5568;
  --space-navy: #E2E8F0;
}
