/* === RESET & VARIABLES === */
:root {
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --secondary: #10b981;
  --dark: #111827;
  --light: #f9fafb;
  --grey: #6b7280;
  --grey-light: #e5e7eb;
  --accent: #8b5cf6;
  --danger: #ef4444;
  --success: #10b981;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --header-height: 70px;
  --section-padding: 5rem 2rem;
}

/* Mode sombre par défaut */
:root {
  --bg-primary: var(--dark);
  --bg-secondary: #1f2937;
  --text-primary: var(--light);
  --text-secondary: #d1d5db;
  --border: #374151;
}

/* Mode clair (quand .light-mode est appliqué) */
.light-mode {
  --bg-primary: var(--light);
  --bg-secondary: #ffffff;
  --text-primary: var(--dark);
  --text-secondary: var(--grey);
  --border: var(--grey-light);
}

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

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

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
  overflow-x: hidden;
}

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

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

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

button,
.btn {
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.5);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
}

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

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1.5rem;
}

.text-center {
  text-align: center;
}

.section-title {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 3px;
  background: var(--primary);
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* === HEADER & NAVIGATION === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode header {
  background: rgba(249, 250, 251, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  max-width: 280px;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

nav ul {
  display: flex;
  list-style: none;
}

nav li {
  margin-left: 2rem;
}

nav a {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* === SHARED COMPONENTS === */
section {
  padding: var(--section-padding);
}

.about-hero {
  padding: 8rem 0 3rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

/* === COMMON COMPONENTS & LAYOUTS === */
.grid {
  display: grid;
  gap: 2rem;
}

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

.card {
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  border-radius: 0.5rem 0.5rem 0 0;
  margin-bottom: 1rem;
}

.card-body {
  padding: 1rem 0;
}

.card-title {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* === FORM ELEMENTS === */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

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

/* === FOOTER === */
footer {
  background-color: var(--bg-secondary);
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-heading {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

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

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

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 50%;
  transition: transform 0.8s, background-color 0.3s, color 0.3s;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: rotateY(360deg);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.6s ease forwards;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* === UTILITY CLASSES === */
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.mt-5 {
  margin-top: 3rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mb-5 {
  margin-bottom: 3rem;
}

.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.d-flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.flex-column {
  flex-direction: column;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}

/* === RESPONSIVE STYLES === */
@media (max-width: 992px) {
  :root {
    --header-height: 60px;
    --section-padding: 4rem 1.5rem;
  }
  h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 1.25rem;
  }
  
  .hero-container {
    flex-direction: column;
  }
  
  nav ul {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border);
  }
  
  nav.open ul {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  nav li {
    margin: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  :root {
    --section-padding: 2.5rem 1rem;
  }
  
  .grid {
    gap: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* === LANGUAGE SELECTOR === */
.language-selector {
  display: flex;
  margin-right: 1rem;
}

.language-button {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin: 0 0.2rem;
}

.language-button.active {
  background-color: var(--primary);
  color: white;
}

.language-button:not(.active):hover {
  background-color: var(--bg-secondary);
}

/* Ajustement responsive du sélecteur de langue */
@media (max-width: 768px) {
  .language-selector {
    margin-right: 0.5rem;
  }
  
  .language-button {
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
  }
}

/* Logo en mode clair */
body.light-mode .logo img {
  filter: invert(0.8);
}
