/* =========================================
   STYLE.CSS - MASTER (VERSION FINALE PROPRE & ICONES SVG)
   ========================================= */

/* -----------------------------------------
   1. VARIABLES & THÈMES
   ----------------------------------------- */
:root {
  /* --- DARK MODE (Défaut) --- */
  --bg-body: #030712;
  --bg-card: #0f172a;
  --bg-header: rgba(3, 7, 18, 0.9);
  --border: #1e293b;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --text-main: #f8fafc;
  --text-heading: #ffffff;
  --text-muted: #94a3b8;
  --fixed-bg-gradient: radial-gradient(
    circle at 50% 0%,
    #172554 0%,
    #030712 60%
  );
}

[data-theme="light"] {
  /* --- LIGHT MODE --- */
  --bg-body: #f1f5f9; /* Fond clair */
  --bg-card: #ffffff; /* Cartes blanches */
  --bg-header: #0f172a; /* Header reste SOMBRE (Bleu nuit) */
  --border: #cbd5e1;
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.1);
  --text-main: #334155; /* Texte foncé */
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --fixed-bg-gradient: none;
}

/* -----------------------------------------
   2. RESET & BASE
   ----------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
  color: inherit;
}

/* Force la couleur des titres selon le thème */
h1,
h2,
h3,
.logo {
  color: var(--text-heading) !important;
}

/* -----------------------------------------
   3. LAYOUT & UTILITAIRES
   ----------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--fixed-bg-gradient);
  opacity: 0.6;
  pointer-events: none;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: white; /* Fallback */
}

/* Ajustement gradient en mode clair */
[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.full-width {
  width: 100%;
}

/* -----------------------------------------
   4. HEADER & NAV
   ----------------------------------------- */
header {
  width: 100%;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Ajustements Header en Mode Clair (Garder le look sombre) */
[data-theme="light"] header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  color: white; /* Force le texte en blanc sur le header sombre */
}

/* Force les liens du menu en blanc même en mode clair */
[data-theme="light"] header a,
[data-theme="light"] header .btn-nav {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] header .btn-nav:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.logo-link {
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}
.logo-link:hover {
  opacity: 0.8;
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

/* -----------------------------------------
   5. SWITCH THEME (UPDATE: ICONES BLEU/BLANC)
   ----------------------------------------- */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 44px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #334155; /* Fond Gris (Mode Dark) */
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid var(--border);
}

.slider:before {
  background-color: #fff;
  bottom: 3px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 16px;
  border-radius: 50%;
  z-index: 2; /* Passe devant l'icone */
}

input:checked + .slider {
  background-color: var(--primary); /* Fond Bleu (Mode Light) */
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* --- ICONES SVG --- */

/* 1. LUNE (Mode Dark) : Visible à droite quand le bouton est éteint */
.slider:after {
  content: "";
  position: absolute;
  top: 4px;
  right: 6px;
  width: 14px;
  height: 14px;
  /* SVG Lune couleur Bleu (#3b82f6) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: opacity 0.3s;
}
/* 1. La "pilule" devient BLANCHE en mode jour */
input:checked + .slider {
  background-color: #ffffff; /* Fond blanc */
  border-color: #cbd5e1; /* Petite bordure grise pour le contraste */
}

/* 2. Le bouton rond devient BLEU pour ressortir sur le blanc */
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--primary); /* Knob Bleu */
}
/* 3. Le SOLEIL devient GRIS FONCÉ (#334155) */
input:checked + .slider:after {
  content: "";
  left: 6px;
  right: auto;
  /* SVG Soleil avec stroke='%23334155' (Gris Slate) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
}

/* -----------------------------------------
   6. BOUTONS
   ----------------------------------------- */
.btn-nav,
.btn-back,
.btn-primary,
button {
  font-family: "Inter", sans-serif;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-nav,
.btn-back {
  background: #1e293b;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.btn-nav:hover,
.btn-back:hover {
  background: #334155;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  border: none;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

/* -----------------------------------------
   7. HERO SECTION
   ----------------------------------------- */
.hero {
  text-align: center;
  padding: 60px 0 80px 0;
  position: relative;
}

.hero h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 0 0 24px 0;
  font-weight: 800;
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.2;
  z-index: -1;
}

.hero p {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px auto;
  font-weight: 400;
}

/* -----------------------------------------
   8. BENTO GRID (CARTES)
   ----------------------------------------- */
.bento-section {
  padding: 40px 0 80px 0;
}
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card:hover {
  border-color: #475569;
  transform: translateY(-5px);
}
.card h3 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}
.card p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: #60a5fa;
}

.content-z {
  position: relative;
  z-index: 1;
}
.card-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: luminosity;
  border-radius: inherit;
}

/* Ombres pour les cartes en mode clair */
[data-theme="light"] .card,
[data-theme="light"] .contact-form-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: transparent;
}

/* -----------------------------------------
   9. MARQUEE (PARTENAIRES)
   ----------------------------------------- */
.trust-section {
  padding: 40px 0 80px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-body);
  overflow: hidden;
}

/* Ajustements Partenaires en Mode Clair (Fond sombre forcé) */
[data-theme="light"] .trust-section {
  background-color: #0f172a; /* Bleu nuit sombre */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 40px;
  text-align: center;
}

[data-theme="light"] .trust-title {
  color: #cbd5e1; /* Gris clair sur fond sombre */
}

.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}
.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: scrollText 120s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-logo {
  height: 60px;
  width: auto;
  margin: 0 60px;
  opacity: 0.4;
  filter: grayscale(100%);
  transition: all 0.3s;
  flex-shrink: 0;
}

/* En mode clair : on garde l'opacité sans inverser les couleurs (car fond sombre) */
[data-theme="light"] .marquee-logo {
  filter: grayscale(100%);
  opacity: 0.5;
}

.partner-link:hover .marquee-logo {
  opacity: 1;
  filter: grayscale(0%);
}

/* -----------------------------------------
   10. CONTACT FORM
   ----------------------------------------- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding: 40px 0 80px 0;
}
.contact-info h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 24px;
}
.detail-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: white;
  font-weight: 500;
}

/* Texte détail en mode clair */
[data-theme="light"] .detail-item {
  color: var(--text-main);
}

.detail-item a:hover {
  color: var(--primary);
}
.icon-box-small {
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, 0.2);
  flex-shrink: 0;
}
.icon-box-small svg {
  width: 20px;
  height: 20px;
  stroke: #60a5fa;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}
.form-group {
  margin-bottom: 24px;
}
label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}
input,
select,
textarea {
  width: 100%;
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--border);
  color: white;
  padding: 14px;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  transition: all 0.2s;
}

/* Inputs en mode clair (gris clair sur fond blanc) */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

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

/* -----------------------------------------
   11. TEXTES & LEGAL
   ----------------------------------------- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0 80px 0;
  text-align: left;
}
.legal-content h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: white;
}
.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.legal-content p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.legal-content strong {
  color: var(--text-main);
}
.legal-content span {
  color: var(--primary);
}
.legal-link {
  color: var(--primary);
  text-decoration: none;
}
.legal-link:hover {
  text-decoration: underline;
}

/* -----------------------------------------
   12. FOOTER
   ----------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}

/* Ajustements Footer en Mode Clair (Fond sombre forcé) */
[data-theme="light"] footer {
  background-color: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.footer-legal-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  opacity: 0.7;
  color: inherit;
  text-decoration: underline;
}
.footer-legal-link:hover {
  color: var(--primary);
  opacity: 1;
}

/* Liens footer en blanc même en mode clair */
[data-theme="light"] footer a,
[data-theme="light"] .footer-legal-link {
  color: #f8fafc;
}

/* -----------------------------------------
   13. RESPONSIVE
   ----------------------------------------- */
@media (min-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }
  .span-2 {
    grid-column: span 2;
  }
  .span-3 {
    grid-column: span 3;
  }
}

@media (max-width: 900px) {
  .hero h1 {
    font-size: 3rem;
  }
  .hero {
    padding: 60px 0;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-info h1 {
    font-size: 2.5rem;
  }
  .contact-form-card {
    padding: 24px;
  }
  .legal-content h1 {
    font-size: 2rem;
  }
}
/* =========================================
   PAGE À PROPOS
   ========================================= */

.about-hero {
  padding: 60px 0 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Moitié texte / Moitié image */
  gap: 60px;
  align-items: center;
}

.about-content h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Container de l'image */
.about-image-wrapper {
  position: relative;
  /* On met une petite bordure ou un fond pour structurer */
}

.profile-img {
  width: 100%;
  max-width: 450px;
  height: auto;
  border-radius: 24px;
  /* Une ombre sympa pour le relief */
  box-shadow: 20px 20px 0px rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

/* Petit badge flottant sur la photo */
.floating-badge {
  position: absolute;
  bottom: 30px;
  left: -20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- RESPONSIVE MOBILE À PROPOS --- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr; /* Empile le contenu */
    gap: 40px;
  }
  .about-content {
    order: 2; /* Texte en dessous sur mobile */
  }
  .about-image-wrapper {
    order: 1; /* Image au dessus */
    text-align: center;
  }
  .profile-img {
    box-shadow: 10px 10px 0px rgba(59, 130, 246, 0.1);
  }
  .floating-badge {
    left: 50%;
    transform: translateX(-50%);
    bottom: -20px;
    width: max-content;
  }
}

/* Ajustement Badge Flottant en mode clair */
[data-theme="light"] .floating-badge {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .floating-badge strong {
  color: var(--text-heading) !important;
}
/* =========================================
   PAGE SERVICES
   ========================================= */

.service-row {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 24px; /* Espace entre les cartes */
}

.service-icon-large {
  width: 80px;
  height: 80px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, 0.2);
  flex-shrink: 0; /* Empêche l'icône de s'écraser */
}

.service-icon-large svg {
  width: 40px;
  height: 40px;
  stroke: #60a5fa;
}

.service-content h3 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* Liste à puces stylisée */
.service-details {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}

.service-details li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.service-details li::before {
  content: "✓"; /* Checkmark */
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Responsive Mobile */
@media (max-width: 768px) {
  .service-row {
    flex-direction: column; /* Empile icône et texte */
    text-align: center;
  }
  .service-icon-large {
    margin: 0 auto; /* Centre l'icône */
  }
  .service-details li {
    text-align: left; /* Garde la liste alignée à gauche pour la lisibilité */
    display: inline-block;
  }
}
/* =========================================
   MENU MOBILE & BURGER
   ========================================= */

/* Par défaut (Desktop), on cache le burger et le menu mobile */
.burger-btn {
  display: none; /* Caché sur PC */
}
.mobile-menu-overlay {
  display: none; /* Caché par défaut */
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- RESPONSIVE : TABLETTE ET MOBILE (< 900px) --- */
@media (max-width: 900px) {
  /* 1. On cache le menu desktop */
  .desktop-nav {
    display: none;
  }

  /* 2. On affiche le bouton Burger */
  .burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 200; /* Au dessus de tout */
    padding: 0;
  }

  .burger-btn span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  /* Couleur du burger en mode clair */
  [data-theme="light"] .burger-btn span {
    background-color: white; /* Car ton header reste sombre */
  }

  /* Animation du burger quand il est ouvert (devient une croix) */
  .burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
  }

  /* 3. Le Menu Mobile Déroulant */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Tout l'écran */
    background: rgba(3, 7, 18, 0.98); /* Fond très sombre quasi opaque */
    backdrop-filter: blur(10px);
    z-index: 150; /* Juste sous le bouton burger */
    padding-top: 100px;
    text-align: center;

    /* Animation d'ouverture */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
  }

  /* Quand on ajoute la classe .open via JS */
  .mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
  }

  .mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
  }

  .mobile-nav-links a:hover {
    color: var(--primary);
  }
}
