/* ========================================
   BASE.CSS - Styles génériques et communs
   ======================================== */

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

:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #151932;
  --bg-card: #1e2442;
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --text-primary: #ffffff;
  --text-secondary: #a5b4fc;
  --text-muted: #64748b;
}

html,
body {
  min-width: 320px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== NAVIGATION ========== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 1rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 1001;
  text-decoration: none;
  cursor: pointer;
}

/* Navigation principale */
.nav-main-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  visibility: visible;
  opacity: 1;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-links a.active::after {
  width: 100%;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.social-icon:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.social-icon svg {
  transition: transform 0.3s ease;
}

.social-icon:hover svg {
  transform: scale(1.1);
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--accent-gradient);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
  white-space: nowrap;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

.contact-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.contact-btn svg {
  transition: transform 0.3s ease;
}

.contact-btn:hover svg {
  transform: scale(1.1);
}

/* Menu Burger */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  padding: 0.5rem;
}

.burger-menu span {
  width: 28px;
  height: 3px;
  background: var(--accent-1);
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid rgba(99, 102, 241, 0.2);
  transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  padding: 6rem 2rem 2rem;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.mobile-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  display: block;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-1);
  padding-left: 0.5rem;
}

.mobile-social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  justify-content: center;
}

.mobile-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--accent-gradient);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.mobile-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.mobile-contact-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== BUTTONS ========== */
.btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
  border-color: var(--accent-1);
  background: rgba(99, 102, 241, 0.1);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ========== SECTIONS ========== */
section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
  margin-top: 3rem;
}

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

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

/* ========== RESPONSIVE - TABLETTES ========== */
@media (max-width: 968px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
    margin-right: 1rem;
  }

  .contact-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .social-icon {
    width: 36px;
    height: 36px;
  }

  h2 {
    font-size: 2rem;
  }

  .logo {
    font-size: 1.25rem;
  }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
  .nav-main-links {
    display: none;
  }

  .burger-menu {
    display: flex;
  }

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

@media (max-width: 640px) {
  .btn {
    width: 100%;
    justify-content: center;
  }

  section {
    padding: 2rem 1.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
