/* ===================================================================
   assets/css/style.css
   Styles personnalisés — complète Tailwind CSS
=================================================================== */

/* ---------- Variables globales ---------- */
:root {
  --color-primary:   #6366f1;
  --color-secondary: #8b5cf6;
  --color-dark-900:  #16202e;  /* fond principal */
  --color-dark-800:  #202c40;  /* sections alternées, cartes */
  --color-dark-700:  #293652;  /* inputs, profondeur */
  --color-dark-600:  #354462;  /* borders */
  --color-muted:     #a8b3c5;
  --transition:      0.3s ease;
  --radius-card:     1.25rem;
}

/* ---------- Réinitialisation de base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--color-dark-900);
  color: #cbd5e1;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
}

/* ---------- Texte dégradé ---------- */
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #a78bfa 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================================
   HEADER
=========================================== */
#header {
  background: transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

#header.scrolled {
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
}

/* ---------- Lien de navigation ---------- */
.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.nav-link:hover::after { width: 100%; }

/* ===========================================
   BOUTONS
=========================================== */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.38);
}

.btn-outline {
  display: inline-block;
  color: #e2e8f0;
  border: 1px solid rgba(99, 102, 241, 0.38);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  background: transparent;
}

.btn-outline:hover {
  border-color: rgba(99, 102, 241, 0.75);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

/* ===========================================
   SECTION HERO
=========================================== */
#hero {
  background: var(--color-dark-900);
}

/* Halo lumineux en arrière-plan */
.hero-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 8%, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

/* Grille de points discrets */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Indicateur de scroll */
.scroll-indicator {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(99, 102, 241, 0.35);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: scroll-bounce 2.2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0);    opacity: 1;   }
  50%       { transform: translateY(10px); opacity: 0.3; }
}

/* ===========================================
   HELPERS DE SECTION
=========================================== */
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.08);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: #f8fafc;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ===========================================
   CARTES SERVICES
=========================================== */
.service-card {
  background: var(--color-dark-800);
  border: 1px solid var(--color-dark-600);
  border-radius: var(--radius-card);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(99, 102, 241, 0.1);
}

.service-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background var(--transition), border-color var(--transition);
}

.service-card:hover .service-icon-wrapper {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
}

/* ===========================================
   APPROCHE
=========================================== */
.approach-item {
  padding: 1.5rem 1.75rem;
  border-left: 2px solid rgba(99, 102, 241, 0.18);
  transition: border-left-color var(--transition);
}

.approach-item:hover {
  border-left-color: var(--color-primary);
}

.approach-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: #818cf8;
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
  transition: color var(--transition);
}

.approach-item:hover .approach-number {
  color: #a5b4fc;
}

/* ===========================================
   FORMULAIRE DE CONTACT
=========================================== */
.contact-form-wrapper {
  background: var(--color-dark-800);
  border: 1px solid var(--color-dark-600);
  border-radius: var(--radius-card);
  padding: 2rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.form-input {
  width: 100%;
  background: var(--color-dark-700);
  border: 1px solid var(--color-dark-600);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #f8fafc;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder { color: #475569; }

.form-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-icon-wrapper {
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Liens réseaux sociaux */
.social-link {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--color-dark-800);
  border: 1px solid var(--color-dark-600);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.social-link:hover {
  color: var(--color-primary);
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

/* ===========================================
   ANIMATIONS AU SCROLL
=========================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Délais en cascade pour les cartes */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }

/* Animation d'entrée du héros */
.fade-in-up {
  animation: fadeInUp 0.85s ease forwards;
}

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

/* ===========================================
   PAGES LÉGALES
=========================================== */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.legal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: #e2e8f0;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.14);
}

.legal-content p,
.legal-content li {
  color: #94a3b8;
  line-height: 1.85;
  margin-bottom: 0.65rem;
  font-size: 0.9375rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #a5b4fc;
}

.placeholder {
  background: rgba(99, 102, 241, 0.12);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-style: italic;
  font-size: 0.875em;
}

/* ===========================================
   VALIDATION FORMULAIRE
=========================================== */
.field-error {
  display: block;
  font-size: 0.75rem;
  color: #f87171;
  margin-top: 0.35rem;
  min-height: 1.1rem;
  transition: opacity 0.2s ease;
}

.form-input.is-invalid {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-input.is-valid {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.06);
}

/* Bouton : état chargement */
#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ===========================================
   MODAL DE SUCCÈS
=========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  z-index: 1;
  background: var(--color-dark-800);
  border: 1px solid var(--color-dark-600);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.modal-check-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  border: 2px solid rgba(129, 140, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.modal-check-icon {
  color: #818cf8;
  font-size: 1.75rem;
  animation: checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes checkPop {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1);   }
}

/* ===========================================
   RESPONSIVE
=========================================== */
@media (max-width: 768px) {
  .section-subtitle { max-width: 100%; }
  .contact-form-wrapper { padding: 1.5rem; }
}
