/* ========================================
   NYTOTIK - DESIGN TECH MODERNE (SOMBRE AMÉLIORÉ)
   ======================================== */

/* === VARIABLES === */
:root {
  /* Palette sombre harmonieuse */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-elevated: #252b35;
  
  /* Accents tech - Bleu/Cyan/Violet harmonieusement répartis */
  --accent-primary: #58a6ff;
  --accent-secondary: #3fb950;
  --accent-tertiary: #a371f7;
  --accent-warning: #f0883e;
  
  /* Couleurs de texte avec meilleur contraste */
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  
  /* Bordures subtiles */
  --border-subtle: rgba(240, 246, 252, 0.1);
  --border-accent: rgba(88, 166, 255, 0.3);
  
  /* Ombres */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(88, 166, 255, 0.15);
  
  /* Transitions fluides */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  
  /* Espacements */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 6%;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

.logo-container {
  z-index: 2;
}

.logo {
  width: 170px;
  height: auto;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.04);
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.navbar a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-base);
}

.navbar a:hover {
  color: var(--text-primary);
}

.navbar a:hover::after {
  width: 100%;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: '▾';
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 220px;
  padding: 0.5rem;
  box-shadow: var(--shadow-md);
  
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-base);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent-primary);
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 6% 6rem;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(163, 113, 247, 0.06) 0%, transparent 50%),
    var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Grid tech en arrière-plan */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(88, 166, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 166, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 850px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 50%, var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Bouton principal */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-primary) 0%, #79c0ff 100%);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(88, 166, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.4), 0 0 30px rgba(88, 166, 255, 0.2);
}

.btn svg {
  margin-left: 8px;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active, .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delayed animations for staggered effects */
.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }

.pricing-card:nth-child(1) { transition-delay: 0s; }
.pricing-card:nth-child(2) { transition-delay: 0.1s; }
.pricing-card:nth-child(3) { transition-delay: 0.2s; }
.pricing-card:nth-child(4) { transition-delay: 0.3s; }

.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.3s; }
.process-step:nth-child(4) { transition-delay: 0.45s; }

/* Animation des cartes au survol */
.service-card {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.service-card:hover::after {
  opacity: 1;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.services h2 {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

.service-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.service-card {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--spacing-md);
  background: rgba(88, 166, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.service-icon svg {
  color: var(--accent-primary);
  width: 32px;
  height: 32px;
}

.service-card:hover .service-icon {
  background: rgba(88, 166, 255, 0.2);
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

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

/* === ABOUT SECTION === */
.about {
  background: var(--bg-primary);
  padding: var(--spacing-xl) 6%;
  text-align: center;
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.about h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

/* === EFFET MACHINE À ÉCRIRE (GRAND) === */
.typing-container {
  min-height: 3.5rem;
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.typing-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-align: center;
  line-height: 1.3;
}

.typing-cursor {
  display: inline-block;
  color: var(--accent-primary);
  font-size: 2rem;
  font-weight: 700;
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

.about p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* === CONTACT SECTION === */
.contact {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #1a2332 100%);
  padding: var(--spacing-xl) 6%;
  text-align: center;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.contact h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.contact-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: left;
}

input, textarea, select {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-base);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.15);
  background: var(--bg-elevated);
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  display: block;
}

input, textarea {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-base);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: var(--spacing-xl) 6%;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .navbar nav {
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero {
    min-height: auto;
    padding: 8rem 5% 4rem;
  }
  
  .service-grid {
    grid-template-columns: 1fr;
  }
  
  form {
    padding: 0 1rem;
  }
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* === FOOTER ENRICHI === */
footer {
  padding: var(--spacing-xl) 6%;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: .88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto 2.5rem;
}

.footer-col h4 {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: .9rem; transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--accent-primary); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal a { color: var(--text-muted); text-decoration: none; font-size: .85rem; transition: color var(--transition-fast); }
.footer-legal a:hover { color: var(--accent-primary); }

/* === BTN SECONDARY === */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* === MOBILE MENU (caché sur desktop) === */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.3rem;
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.mobile-menu-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .navbar { flex-wrap: wrap; gap: .75rem; }
  .navbar nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: .25rem;
  }
  .navbar nav.active { display: flex; }
  .navbar nav a { padding: .6rem 0; font-size: 1rem; }
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 0 0 0 1rem;
  }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; gap: .5rem; }
}
