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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

section {
  padding: 80px 0;
  position: relative;
}

/* Base Typo */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-main);
}

h2 {
  font-size: 2.2rem;
  margin-bottom: var(--spacing-sm);
  text-align: center;
  color: var(--text-main); /* Sombre par defaut */
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-color);
  border-bottom: 2px solid var(--surface-border); /* Thicker border for instit look */
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
}

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

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  background: linear-gradient(90deg, #000091 33.33%, #fff 33.33%, #fff 66.66%, #e1000f 66.66%);
  border: 1px solid #ccc;
  border-radius: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

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

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

/* Navbar Mobile Toggle Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  z-index: 2001; /* Above mobile menu overlay */
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text-main);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* Burger Animation to X */
.menu-toggle.active span { background: var(--primary-color); }
.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 991px) {
  .menu-toggle { display: flex; }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
    opacity: 0;
    transform: translateY(20px);
  }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger links fade-in */
  .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }
  .nav-links.active a:nth-child(5) { transition-delay: 0.5s; }
  
  /* Select in mobile menu */
  .nav-links select {
    font-size: 1.2rem;
    margin-top: 20px;
    border: 1px solid var(--surface-border);
    padding: 8px 16px;
    border-radius: 8px;
  }
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* Footer */
.footer {
  background-color: var(--surface-color);
  border-top: 4px solid var(--primary-color); /* Strong top border */
  padding: 60px 0 30px;
}

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

.footer-col h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  section { padding: 50px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
