/* ================= Reset ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= Variables thème clair/sombre ================= */
:root {
  --bg: #222222;
  --text: white;
  --accent: #0b3d91;
  --header-bg: rgba(0,0,0,0.5);
  --header-text: white;
}

/* ================= Body et structure flex ================= */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  background-color: #1c1c1c;
  color: white;
  padding-top: 70px; /* pour header fixe */
}

main {
  flex: 1; /* prend tout l'espace restant pour pousser le footer */
}

/* ================= Header ================= */
header {
  background-color: var(--header-bg);
  color: var(--header-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 2em;
  flex-wrap: wrap;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

header h1 {
  font-family: 'Pacifico', cursive;
  font-size: 1.8em;
}

header h1 a {
  color: var(--header-text);
  text-decoration: none;
}

header h1 a:hover {
  color: var(--accent);
}

nav {
  display: flex;
  flex-wrap: wrap;
}

nav a {
  color: var(--header-text);
  margin: 0 1em;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent);
}

/* ================= Vidéo en fond ================= */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.6);
}

body, section, footer {
  position: relative;
  z-index: 1;
}

/* ================= Introduction ================= */
#intro {
  padding: 8em 2em 2em;
  text-align: center;
  max-width: 900px;
  margin: auto;
}

#intro h2 {
  font-size: 2.2em;
  color: #5a9eff;
  margin-bottom: 0.5em;
}

#intro p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 1em;
}

/* ================= Projets ================= */
.presentation, .card-container {
  text-align: center;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 2em;
}

.card {
  background-color: #2a2a2a;
  border-radius: 15px;
  padding: 1.5em;
  width: 360px;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
  text-align: center;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1em;
}

.card-text h3 {
  margin: 0.5em 0;
  font-size: 1.3em;
  color: #5a9eff;
}

.explore-btn {
  background-color: #5a9eff;
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 0.5em;
}

.explore-btn:hover {
  background-color: #327eff;
}

/* ================= Bouton retour ================= */
.back-button-container {
  text-align: center;
  margin-bottom: 4rem;
}

.back-button {
  display: inline-block;
  padding: 0.7em 1.5em;
  background-color: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 40px;
  box-shadow: 0 5px 15px rgba(11, 61, 145, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.back-button:hover {
  background-color: #06407b;
  box-shadow: 0 8px 25px rgba(11, 61, 145, 0.9);
}

/* ================= Footer ================= */
footer {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 2em 1em;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--accent);
}

/* ================= Responsive ================= */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5em;
  }

  .footer-section {
    min-width: auto;
  }

  .card-container {
    flex-direction: column;
    gap: 20px;
  }
}
