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

:root {
  --primary: #0C2B4E;
  /* #2563eb */
  --secondary: #1A3D64;
  /* #1e293b */
  --accent: #1D546C;
  /* #0ea5e9 */
  --text: #3D546C;
  /* #34155 */
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --border: #e2e8f0;

  --space-xs: 0.25rem;
  --space-xm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background-image: url("../img/background.jpeg");
  background-position: center;
}

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

/* Header */
.header {
  /* background: var(--bg); */
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(var(--space-lg));
  background-image: inherit;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-lg);
}

.logo span {
  font-size: var(--space-lg);
  font-weight: 700;
  color: var(--secondary);
}

/* Menu principal et icônes de contact */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-icon {
  width: 20px;
  height: 20px;
  filter: invert(0.3);
  transition: filter 0.3s;
}

.nav-social a:hover .nav-icon {
  filter: invert(0.6);
}

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-image: var(--secondary);
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  transition: 0.3s;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 2rem;
    transition: left 0.3s;
  }

  .nav.open {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .nav-list {
    margin-bottom: 1.5rem;
  }
}

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

a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

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

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

/* HERO */
.hero {
  padding: 8rem 0 6rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.hero-inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* SERVICES */
.services {
  padding: 6rem 0;
}

.services h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.service-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* CTA */
.cta {
  padding: 6rem 0;
  background: var(--secondary);
  color: white;
}

.cta-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* RÉALISATIONS */
.realisations {
  padding: 6rem 0;
}

.realisations h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--secondary);
}

.realisations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Style des cartes 3D */
.card-container {
  perspective: 1000px;
  width: 100%;
  height: 350px;
  margin: 0 auto;
}

.card {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  transform: rotateX(55deg) rotateY(0deg) rotateZ(-5deg);
  position: relative;
}

.card-container:hover .card {
  transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}

.card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.card-front h3 {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.card-front p {
  color: var(--text-light);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .realisations-grid {
    grid-template-columns: 1fr;
  }

  .card-container {
    height: 350px;
  }
}

/* FOOTER */
.footer {
  background: var(--secondary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: white;
}

.footer-copy {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    background: white;
    transition: left 0.3s;
    border-bottom: 1px solid var(--border);
  }

  .nav.open {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .services h2,
  .cta h2,
  .contact h2 {
    font-size: 2rem;
  }
}
