:root {
  --primary: #00d4ff;
  --primary-dark: #00a3cc;
  --dark: #0d1117;
  --gray: #c9d1d9;
  --light: #f0f6fc;
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--dark);
  color: var(--gray);
  line-height: 1.6;
}

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

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(to bottom, #0d1117, #161b22);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #30363d;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--gray);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: white;
  text-decoration: none;
}


/* ===== MENU AVEC SOUS-MENU ===== */

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

.nav-links li {
  position: relative;
}

.nav-links > li > a {
  display: inline-flex;
  align-items: center;
}

.nav-links .dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 0;
  min-width: 240px;
  padding: 0.7rem;
  margin: 0;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 300;
}

.nav-links .dropdown-menu li {
  width: 100%;
}

.nav-links .dropdown-menu a {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: var(--gray);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links .dropdown-menu a:hover {
  background: #0d1117;
  color: white;
  text-decoration: none;
}

.nav-links li:hover > .dropdown-menu,
.nav-links li:focus-within > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero {
  text-align: center;
  padding: 9rem 0 7rem;
  background: linear-gradient(135deg, #0d1117 0%, #0f1a2e 100%);
}

.hero h1 {
  font-size: 3.8rem;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.35rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  color: #a5b4c2;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: black;
  font-weight: 600;
  padding: 0.95rem 2.1rem;
  border-radius: 50px;
  margin: 0 0.6rem 1rem;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
  text-decoration: none;
}

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

.btn-outline:hover {
  background: var(--primary);
  color: black;
}

.btn-full {
  width: 100%;
  margin-top: 1rem;
}

section {
  padding: 6rem 0;
}

h2 {
  text-align: center;
  font-size: 2.8rem;
  color: white;
  margin-bottom: 3.5rem;
}

h2 span {
  color: var(--primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.2rem;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #30363d;
}

.card-content {
  padding: 1.8rem;
}

.card h3 {
  color: white;
  margin-bottom: 0.8rem;
}

#about,
#contact {
  background: #0a0e14;
}

.about-text {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 1.18rem;
}

.about-equipment {
  text-align: center;
  font-size: 1.18rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-subtitle {
  color: white;
  margin-bottom: 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

input,
textarea {
  padding: 0.95rem 1.3rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: white;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

footer {
  background: #0a0e14;
  text-align: center;
  padding: 3rem 0 2rem;
  border-top: 1px solid #30363d;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .hero {
    padding: 6rem 0 5rem;
  }

  .nav-links {
    gap: 1.1rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
  }

  .nav-links .dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: 0.75rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
  }

  .nav-links li:hover > .dropdown-menu,
  .nav-links li:focus-within > .dropdown-menu {
    display: flex;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SECTION TUTORIEL ===== */

#instructable {
  background: #11161d;
}

.tutorial-intro {
  max-width: 820px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.08rem;
  color: #aeb8c4;
}

.steps-menu {
  max-width: 900px;
  margin: 0 auto 3rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1.5rem;
}

.steps-menu h3 {
  color: white;
  margin-bottom: 1rem;
}

.steps-menu ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem 1.2rem;
  list-style: decimal inside;
}

.steps-menu a {
  display: inline-block;
  color: var(--gray);
  transition: 0.2s;
}

.steps-menu a:hover {
  color: white;
  text-decoration: none;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  padding: 1.8rem;
}

.step-number {
  min-width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: black;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  color: white;
  margin-bottom: 0.8rem;
}

.step-content p {
  margin-bottom: 1rem;
}

.step-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.2rem 0 1.4rem;
}

.step-media {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
}

.step-media img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.step-media figcaption {
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: #aeb8c4;
}

.code-block {
  margin-top: 1rem;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
  background: #0b0f14;
}

.code-title {
  padding: 0.8rem 1rem;
  background: #10161d;
  border-bottom: 1px solid #30363d;
  color: white;
  font-weight: 600;
}

.code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.code-block code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.95rem;
  color: #dbe7f3;
  white-space: pre;
}

.tip-box {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--primary);
  background: rgba(0, 212, 255, 0.08);
  border-radius: 8px;
  color: var(--light);
}

/* scroll doux vers les étapes */
html {
  scroll-behavior: smooth;
}

/* offset pour header sticky */
.step,
#instructable {
  scroll-margin-top: 110px;
}

@media (max-width: 768px) {
  .step {
    flex-direction: column;
  }

  .step-media-grid {
    grid-template-columns: 1fr;
  }

  .step-media img {
    height: 210px;
  }

  .steps-menu ol {
    grid-template-columns: 1fr;
  }
}


/* ===== LIGHTBOX ===== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.step-media img {
  cursor: zoom-in;
}

.card {
    min-height: 700px; 
}

.card img {
    height: 500px;    /* Force la hauteur de l'image */
    object-fit: cover; /* Évite que l'image ne soit déformée */
}

.planche-contact-full {
  grid-column: 1 / -1;
}

.planche-contact-full img {
  width: 100%;
  height: auto;
  display: block;
}