/* ================================================= */
/* --- VARIABLES ET CONFIGURATION GLOBALE --- */
/* ================================================= */
:root {
  --primary-color: #00a8ff; /* Un bleu électrique */
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --text-color: #e0e0e0;
  --text-muted-color: #a0a0a0;
  --main-font: 'Poppins', sans-serif;
  --border-color: #2a2a2a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--main-font);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
}

body.nav-active {
  overflow: hidden;
}

main {
  position: relative;
  z-index: 0;
  overflow: clip;
}

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

h1, h2, h3 {
  font-weight: 600;
  color: #fff;
}

h1 { font-size: 3.5rem; }
.hero h1 {
  width: 100%;
  text-align: center;
}
h2 { font-size: 2.5rem; margin-bottom: 2rem; text-align: center; }
h3 { font-size: 1.5rem; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #fff;
}

ul {
  list-style: none;
  padding: 0;
}

/* ================================================= */
/* --- HEADER ET NAVIGATION --- */
/* ================================================= */
header {
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}
.logo span {
  color: var(--primary-color);
}

.desktop-nav ul {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--text-muted-color);
  font-weight: 400;
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
.desktop-nav a.active, .desktop-nav a:hover {
  color: #fff;
  border-bottom-color: var(--primary-color);
}

/* ================================================= */
/* --- SECTIONS ET CONTENU --- */
/* ================================================= */
section {
  padding: 6rem 0;
}

.hero {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 0;
}
.hero .container {
  padding-top: 80px;
}
.hero h1 {
  font-weight: 700;
  margin-bottom: 1rem;
  min-height: 100px;
}
.hero h1 .cursor {
  display: inline-block;
  background-color: var(--primary-color);
  width: 3px;
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.cta-button {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 168, 255, 0.2);
  background-color: transparent;
  color: var(--primary-color);
}

/* --- SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--surface-color);
  padding: 2.5rem 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 0 25px rgba(0, 168, 255, 0.3);
}
.service-icon { font-size: 3rem; margin-bottom: 1rem; }
.service-card h3 { margin-bottom: 1rem; }
.service-card p { color: var(--text-muted-color); margin-bottom: 1.5rem; }
.learn-more { font-weight: 600; }

/* --- A PROPOS --- */
.about-section {
  background-color: var(--surface-color);
}
.about-container {
  display: flex;
  align-items: center;
  gap: 3rem;
}
.about-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
}
.about-text {
  flex: 1.5;
}

/* --- TECHNOLOGIES --- */
.tech-section { background-color: var(--background-color); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 2rem; justify-items: center; }
.tech-item { display: flex; flex-direction: column; align-items: center; gap: 1rem; transition: transform 0.3s ease; }
.tech-item img { width: 60px; height: 60px; filter: grayscale(100%); transition: filter 0.3s ease; }
.tech-item:hover img { filter: grayscale(0%); }
.tech-item span { font-size: 0.9rem; color: var(--text-muted-color); }

/* --- FORMULAIRE --- */
.contact-section { text-align: center; } /* Correction centrage titre */
.contact-section p { max-width: 600px; margin: 0 auto 2rem auto; }

.contact-form { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; text-align: left; }
.form-group { display: flex; gap: 1.5rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 1rem; background: #2a2a2a; border: 1px solid #444; border-radius: 5px; color: var(--text-color); font-family: var(--main-font); font-size: 1rem; transition: border-color 0.3s ease;}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* --- PAGES INTERNES --- */
.page-banner {
  padding-top: 10rem;
  padding-bottom: 4rem;
  text-align: center;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}
.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted-color);
  max-width: 600px;
  margin: 1rem auto 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.feature-card {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.process-section {
  background-color: var(--surface-color);
}
.process-timeline {
  max-width: 800px;
  margin: 2rem auto 0;
  position: relative;
}
.process-step {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}
.process-number {
  font-family: 'Roboto Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--background-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  min-width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cta-section {
  background-color: var(--background-color);
  text-align: center;
}
.cta-section p {
  color: var(--text-muted-color);
  margin-bottom: 2rem;
}

/* ================================================= */
/* --- FOOTER --- */
/* ================================================= */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.social-links a {
  display: inline-block;
  color: var(--text-muted-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

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

footer p a {
  color: var(--text-muted-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}
footer p a:hover {
  color: var(--primary-color);
}

/* ================================================= */
/* --- BOUTONS ET ANIMATIONS --- */
/* ================================================= */
.submit-button {
  position: relative;
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 1rem auto 0;
  padding: 1rem;
  font-family: var(--main-font);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s ease;
}
.submit-button:hover:not(:disabled) {
  background-color: transparent;
  color: var(--primary-color);
}
.button-text, .button-loader, .button-success-icon {
  display: inline-block;
  transition: opacity 0.3s, transform 0.3s;
}
.button-loader, .button-success-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.submit-button.loading .button-text { opacity: 0; }
.submit-button.loading .button-loader {
  opacity: 1;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.submit-button.success {
  background-color: #28a745;
  border-color: #28a745;
  cursor: default;
}
.submit-button.success .button-text, .submit-button.success .button-loader { opacity: 0; }
.submit-button.success .button-success-icon {
  opacity: 1;
  width: 14px;
  height: 28px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: translate(-50%, -60%) rotate(45deg);
}
#form-status {
  text-align: center;
  margin-top: 1rem;
  min-height: 1.5em;
  font-weight: 600;
  transition: color 0.3s ease;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s, visibility 0.4s, transform 0.4s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* ================================================= */
/* --- MENU MOBILE BURGER --- */
/* ================================================= */
.burger-button { display: none; position: fixed; top: 18px; right: 20px; width: 40px; height: 40px; background: transparent; border: none; cursor: pointer; z-index: 1002; }
.burger-line { position: absolute; left: 5px; width: 30px; height: 3px; background-color: #fff; border-radius: 3px; transition: all 0.4s ease-in-out; }
.burger-line:nth-child(1) { top: 8px; }
.burger-line:nth-child(2) { top: 18px; }
.burger-line:nth-child(3) { top: 28px; }
body.nav-active .burger-line:nth-child(1) { transform: translateY(10px) rotate(45deg); }
body.nav-active .burger-line:nth-child(2) { transform: scaleX(0); }
body.nav-active .burger-line:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
.mobile-menu-container { position: fixed; top: 0; right: 0; width: 100%; height: 100%; background-color: var(--background-color); border-left: 2px solid var(--primary-color); z-index: 1001; transform: translateX(100%); transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1); }
body.nav-active .mobile-menu-container { transform: translateX(0); }
.mobile-menu-nav { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; width: 100%; height: 100%; padding: 0 15%; }
.mobile-menu-nav a { font-family: 'Roboto Mono', monospace; font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 700; color: var(--text-muted-color); text-decoration: none; padding: 1rem 0; display: block; opacity: 0; transform: translateY(30px); transition: color 0.3s, opacity 0.4s, transform 0.4s; }
.mobile-menu-nav a:hover { color: var(--primary-color); }
.mobile-menu-nav a span { font-size: clamp(1rem, 3vw, 1.1rem); color: var(--primary-color); margin-right: 15px; }
body.nav-active .mobile-menu-nav a { opacity: 1; transform: translateY(0); }
body.nav-active .mobile-menu-nav li:nth-child(1) a { transition-delay: 0.3s; }
body.nav-active .mobile-menu-nav li:nth-child(2) a { transition-delay: 0.4s; }
body.nav-active .mobile-menu-nav li:nth-child(3) a { transition-delay: 0.5s; }
body.nav-active .mobile-menu-nav li:nth-child(4) a { transition-delay: 0.6s; }

.transition-fade {
  transition: opacity 0.4s;
  opacity: 1;
}
html.is-animating .transition-fade {
  opacity: 0;
}

/* ================================================= */
/* --- CHECKBOX ANIMÉE (CORRIGÉE) --- */
/* ================================================= */
.form-checkbox-group {
  margin-bottom: 1.5rem;
  text-align: left;
}
.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
  font-size: 0.9rem;
  color: var(--text-muted-color);
  transition: color 0.3s ease;
  gap: 12px;
}
.custom-checkbox:hover { color: #fff; }
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }

.checkmark {
  position: relative;
  height: 22px;
  width: 22px;
  background-color: #2a2a2a;
  border: 2px solid #444;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 168, 255, 0.2);
}
.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 168, 255, 0.5);
  transform: scale(1.05);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;

  left: 50%;
  top: 48%;

  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;

  transform: translate(-50%, -50%) rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
  animation: checkAnim 0.3s ease-in-out forwards;
}

@keyframes checkAnim {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
}

/* ================================================= */
/* --- GESTION COOKIES (TARTEAUCITRON) --- */
/* ================================================= */

#tarteaucitronBack {
  background-color: rgba(0, 0, 0, 0.85) !important;
  z-index: 99990 !important;
}

#tarteaucitron {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 90% !important;
  max-width: 600px !important;
  height: auto !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  background-color: #1e1e1e !important;
  border-radius: 12px !important;
  border: 1px solid #333 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 1) !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 99999 !important;
}

#tarteaucitron .tarteaucitronContent {
  background-color: #1e1e1e !important;
  color: #fff !important;
  padding: 30px 20px 20px 20px !important;
  margin: 0 !important;
  box-shadow: none !important;
}

#tarteaucitronClosePanel {
  position: absolute !important;
  top: 15px !important;
  right: 15px !important;
  width: 36px !important;
  height: 36px !important;
  background-color: #333 !important;
  color: #fff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  text-decoration: none !important;
  z-index: 1000 !important;
  cursor: pointer !important;
}

#tarteaucitronClosePanel:hover {
  background-color: var(--primary-color) !important;
}

#tarteaucitronAlertBig {
  background-color: #1e1e1e !important;
  border-top: 2px solid var(--primary-color) !important;
  color: #fff !important;
  bottom: 0 !important;
  box-shadow: 0 -10px 20px rgba(0,0,0,0.5) !important;
  padding: 15px !important;
  z-index: 99995 !important;
}

#tarteaucitronPersonalize2,
#tarteaucitronCloseAlert2,
.tarteaucitronAllow,
.tarteaucitronDeny,
#tarteaucitronAllAllowed,
#tarteaucitronAllDenied {
  border: none !important;
  border-radius: 6px !important;
  padding: 10px 15px !important;
  font-family: var(--main-font) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  color: white !important;
  height: auto !important;
  line-height: normal !important;
  margin: 5px !important;
  display: inline-block !important;
}

#tarteaucitronPersonalize2, #tarteaucitronCloseAlert2 {
  background-color: var(--primary-color) !important;
}

.tarteaucitronAllow, #tarteaucitronAllAllowed {
  background-color: #28a745 !important;
}

.tarteaucitronDeny, #tarteaucitronAllDenied {
  background-color: #dc3545 !important;
}

#tarteaucitron .tarteaucitronTitle,
#tarteaucitron .tarteaucitronH2,
#tarteaucitron .tarteaucitronH3 {
  color: #fff !important;
  text-shadow: none !important;
  margin-bottom: 10px !important;
  font-family: var(--main-font) !important;
}

#tarteaucitron .tarteaucitronBorder {
  border-bottom: 1px solid #333 !important;
  background: none !important;
  margin: 15px 0 !important;
}

#tarteaucitron .tarteaucitronName {
  color: var(--primary-color) !important;
  font-weight: bold !important;
  font-size: 1rem !important;
}

#tarteaucitron ul li {
  color: #aaa !important;
}

/* ================================================= */
/* --- MEDIA QUERIES (RESPONSIVE MOBILE) --- */
/* ================================================= */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .desktop-nav { display: none; }
  .burger-button { display: block; }

  .form-group { flex-direction: column; }

  .about-container { flex-direction: column; text-align: center; }
  .process-step { flex-direction: column; text-align: center; }

  #tarteaucitronAlertBig {
    padding: 20px !important;
    text-align: center !important;
    flex-direction: column !important;
    align-items: center !important;
    height: auto !important;
  }

  #tarteaucitronPersonalize2, #tarteaucitronCloseAlert2 {
    display: block !important;
    width: 100% !important;
    margin: 10px 0 !important;
    box-sizing: border-box !important;
  }

  #tarteaucitron {
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
  }

  #tarteaucitron .tarteaucitronContent {
    height: 100% !important;
    overflow-y: auto !important;
    padding-top: 60px !important;
  }

  #tarteaucitronClosePanel {
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
  }
}
