:root {
  --bg: #101010;
  --bg-soft: #1A1A1A;
  --border: #2a2a2a;
  --text: #EAEAEA;
  --muted: #888888;
  
  /* PALETTE (Bleue) */
  --accent: #00A3FF;
  --accent-gradient: linear-gradient(90deg, #00F0FF, #00A3FF);
  --shadow: 0 0 20px rgba(0, 163, 255, 0.2);

  /* POLICES */
  --font-heading: 'Poppins', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 12px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text);
  font-weight: 700;
}

h1 { font-size: 3.5rem; line-height: 1.2; }
h2 { font-size: 2.5rem; margin-bottom: 24px; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--text); }

a { color: var(--accent); text-decoration: none; transition: all 0.2s ease; }
p { margin: 0 0 16px; max-width: 65ch; }
ul.bullets { margin-left: 20px; padding-left: 0; }
.muted { color: var(--muted); }

/* --- Layout Principal --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(16, 16, 16, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 70px;
  z-index: 100;
}
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}
.navbar .brand {
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
}
.navbar .nav {
  display: flex;
  gap: 30px;
}
.navbar .nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}
.navbar .nav a.active, .navbar .nav a:hover {
  color: var(--text);
}

/* Styles pour le bouton Burger (caché sur desktop) */
.menu-toggle {
  display: none; /* Caché sur desktop */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
  flex-direction: column;
  justify-content: space-around;
  z-index: 101; 
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

main.content {
  padding: 100px 40px 40px; /* Espace pour la navbar fixe */
  max-width: 1200px;
  margin: 0 auto;
}

.footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer .socials {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
}
.footer .socials a {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}
.footer .socials a:hover { color: var(--accent); }
.footer p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* --- Page d'accueil (Hero) --- */
.hero {
  min-height: calc(80vh - 100px); /* 100px = padding de .content */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 0;
}
.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin-bottom: 24px;
}
.hero h1 {
  margin: 0;
}
.hero h1 .highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 16px 0 32px;
  max-width: 50ch;
}
.hero .cta .btn {
  margin: 0 8px;
}

/* --- Éléments UI --- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.btn:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: var(--shadow);
}
.btn.subtle {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn.subtle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* --- Cartes (Homepage & Services) --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Style de base (pour Services) */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
  color: var(--muted); /* Couleur de base pour le paragraphe */
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}
.card h3 {
  color: var(--accent); /* Les titres des services sont en couleur */
}

/* NOUVEAU: Style pour les cartes Projet (Homepage) */
.project-card-home {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  overflow: hidden; /* Pour que le .thumb respecte le border-radius */
}
.project-card-home:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.project-card-home .thumb-link {
  display: block;
  overflow: hidden;
}
.project-card-home .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg);
}
.project-card-home .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card-home .thumb-link:hover img {
  transform: scale(1.05);
}
.project-card-home .project-card-home-content {
  padding: 20px;
}
.project-card-home h3 {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
}
.project-card-home h3 a {
  color: var(--text);
  text-decoration: none;
}
.project-card-home h3 a:hover {
  color: var(--accent);
}

/* --- Section --- */
.section {
  padding: 60px 0;
}
.section:not(:first-child) {
  border-top: 1px solid var(--border);
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  align-items: center;
  justify-content: center;
}
.lightbox-content {
  display: block;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.lightbox-close:hover { color: #bbb; }


/* --- Formulaire de Contact --- */
.form {
  max-width: 650px;
  margin: 32px auto 0;
}
.form-group { margin-bottom: 20px; }
.form label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--muted);
}
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
}
.form input[type="text"]:focus,
.form input[type="email"]:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.form textarea { resize: vertical; min-height: 150px; }
.form .btn { width: 100%; }

/* Messages d'alerte */
.alert {
  padding: 12px 16px;
  margin: 0 auto 24px;
  max-width: 650px;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid;
}
.alert.ok {
  background-color: rgba(57, 255, 20, 0.1);
  border-color: #39FF14;
  color: #39FF14;
}
.alert.err {
  background-color: rgba(255, 0, 0, 0.1);
  border-color: #FF0000;
  color: #FF0000;
}

/* --- Page Projets (Master-Detail) --- */
.project-container {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-height: 70vh;
  overflow: hidden; /* Pour les coins arrondis */
}
.project-nav {
  flex: 0 0 250px; /* Largeur fixe pour la nav */
  border-right: 1px solid var(--border);
  padding: 20px;
}
.project-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--muted);
  font-family: var(--font-heading);
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.project-nav a:hover {
  background: var(--bg);
  color: var(--text);
}
.project-nav a.active {
  background: var(--accent);
  color: #fff;
}
.project-content {
  flex: 1;
  padding: 30px;
}
.project-detail {
  display: none; /* Caché par défaut */
  animation: fadeIn 0.3s ease-in-out;
}
.project-detail.active {
  display: block; /* Montré si actif */
}
.project-detail h3 {
  margin-top: 0;
  color: var(--accent); /* Titre en bleu */
}
.project-detail .thumb.large { /* Garder les styles de la lightbox */
    margin-bottom: 24px;
    cursor: pointer;
}
.project-detail .thumb.large img {
  max-width: 350px;
  height: auto;
  border-radius: 4px;
  display: block;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .navbar { padding: 0 20px; }
  
  /* Afficher le bouton burger */
  .menu-toggle {
    display: flex; 
  }
  
  /* Cacher et styler la nav mobile par défaut */
  .navbar .nav {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 70px; /* Hauteur de la navbar */
    left: 0;
    right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px 0;
  }
  .navbar .nav a {
    padding: 15px 20px;
    text-align: center;
  }
  
  /* Style de la nav quand elle est ouverte */
  .navbar .nav.is-open {
    display: flex;
  }
  
  /* Animation du burger en "X" */
  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  main.content { padding: 80px 20px 20px; }
  .grid { grid-template-columns: 1fr; }
  
  /* Responsive pour la page projet */
  .project-container {
    flex-direction: column;
    min-height: auto;
  }
  .project-nav {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex; /* Sur mobile, on fait défiler horizontalement */
    overflow-x: auto;
    padding: 10px;
  }
  .project-nav a {
    flex: 0 0 auto; /* Empêche les liens de rétrécir */
    margin-bottom: 0;
    margin-right: 8px;
  }
  .project-content {
    padding: 20px;
  }
}