/* Variables mode clair*/
:root {
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --bg-primary: #F9FAFB;
  --bg-secondary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;

  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --accent-deep: #0B2B4A;
  --accent-cta: #F39C12;
  --accent-cta-hover: #E67E22;
  --accent-tech: #3B82F6;

  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --success-bg: #DCFCE7;
  --success-text: #166534;
  --error-bg: #FEE2E2;
  --error-text: #991B1B;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* Mode sombre */
body.dark {
  --bg-primary: #0A0F1A;
  --bg-secondary: #111827;
  --bg-card: #1E293B;
  --bg-elevated: #2D3A4A;

  --text-primary: #F1F5F9;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-inverse: #0F172A;

  --accent-deep:   #495060;
  --accent-cta: #F59E0B;
  --accent-cta-hover: #D97706;
  --accent-tech: #60A5FA;

  --border-light: #1F2937;
  --border-medium: #374151;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);

  --success-bg: #064E3B;
  --success-text: #A7F3D0;
  --error-bg: #7F1D1D;
  --error-text: #FECACA;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.2s ease;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}


/* Selection de texte */
::selection {
  background-color: var(--accent-cta);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-cta);
  border-radius: 3px;
}

/* Loader */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--accent-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-inner {
  text-align: center;
}
.loader-logo {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-cta);
  letter-spacing: 0.12em;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}
.loader-line {
  width: 0;
  height: 2px;
  background: var(--accent-cta);
  margin: 1rem auto 0;
  animation: expandLine 1.2s ease 0.6s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes expandLine {
  from { width: 0; }
  to { width: 120px; }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
}
nav.scrolled {
  background: rgba(249, 250, 251, 0.95);
  backdrop-filter: blur(12px);
  padding: 0.8rem 3rem;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
body.dark nav.scrolled {
  background: rgba(10, 15, 26, 0.95);
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
nav.scrolled .nav-logo {
  color: var(--accent-deep);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s;
}
nav.scrolled .nav-links a {
  color: var(--text-secondary);
}
nav.scrolled .nav-links a:hover,
nav.scrolled .nav-links a.active,
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cta);
}
.nav-cta {
  font-family: var(--font-heading);
  background: var(--accent-cta) !important;
  color: var(--accent-deep) !important;
  padding: 0.55rem 1.3rem;
  border-radius: 40px;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
}
.nav-cta:hover {
  background: var(--accent-cta-hover) !important;
  transform: translateY(-1px);
}
.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-inverse);
  transition: 0.2s;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}
nav.scrolled #theme-toggle {
  color: var(--accent-deep);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-inverse);
  transition: 0.3s;
}
nav.scrolled .hamburger span {
  background: var(--accent-deep);
}

.hamburger-close {
  display: none;
  font-size: 24px;
  color: var(--text-inverse);
  transition: 0.3s;
}

nav.scrolled .hamburger-close {
  color: var(--accent-deep);
}

.hamburger.open span {
  display: none;
}

.hamburger.open .hamburger-close {
  display: block;
}

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--accent-deep);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--bg-primary);
  text-decoration: none;
  transition: color 0.3s;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent-cta);
}

/* Hero */
#hero {
  min-height: 100vh;
  padding-bottom: 160px;
  background: linear-gradient(135deg, rgba(11, 43, 74, 0.88), rgba(8, 35, 60, 0.92)),
    url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content {
  max-width: 900px;
  padding: 0 3rem;
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-cta);
  margin-bottom: -10rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}
/* .hero-eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent-cta);
} */
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  color: white;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.4s forwards;
}
.hero-title em {
  font-style: normal;
  color: var(--accent-cta);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.6s forwards;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.8s forwards;
}
.btn-primary, .btn-ghost {
  font-family: var(--font-heading);
  padding: 0.8rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent-cta);
  color: var(--accent-deep);
  border: none;
}
.btn-primary:hover {
  background: var(--accent-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(243, 156, 18, 0.3);
}
.btn-ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(249, 250, 251, 0.96);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-light);
}
body.dark .hero-stats {
  background: rgba(17, 24, 39, 0.96);
}
.hero-stat {
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-stat:last-child {
  border-right: none;
}
.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-deep);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* Les sections communes */
section {
  padding: 6rem 2rem;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-cta);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
/* .section-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent-cta);
} */
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent-deep);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
body.dark .section-title {
  color: var(--text-primary);
}
.section-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* About */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-img-main {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--accent-deep) 0%, var(--accent-tech) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.about-img-main.img-container {
  position: relative;
  padding-bottom: 100%;
  height: 0;
  background: var(--cream-light);
}

.about-img-main.img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-img-main i {
  font-size: 6rem;
  color: white;
  opacity: 0.8;
}

.about-badge {
  position: absolute;
  top: 2rem;
  left: -2rem;
  background: var(--accent-deep);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.about-badge-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  display: block;
}
.about-badge-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.about-text p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Services */
#services {
  background: var(--bg-secondary);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.service-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  border: 1px solid var(--border-light);
  text-align: center;
}
.service-card i {
  font-size: 2.8rem;
  color: var(--accent-cta);
  margin-bottom: 1rem;
}
.service-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: var(--accent-deep);
}
body.dark .service-card h3 {
  color: var(--text-primary);
}
.service-card p {
  color: var(--text-secondary);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-cta);
}

/* Method */
.method-bg {
  background: var(--bg-primary);
}
.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 2rem;
}
.step-item {
  flex: 1;
  min-width: 160px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--border-light);
  transition: 0.2s;
}
.step-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cta);
}
.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent-deep);
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step-item strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.step-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Why us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.why-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: 0.2s;
}
.why-card i {
  font-size: 2.2rem;
  color: var(--accent-cta);
  margin-bottom: 1rem;
}
.why-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--accent-deep);
}
body.dark .why-card h3 {
  color: var(--text-primary);
}
.why-card p {
  color: var(--text-secondary);
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-tech);
}

/* Contact */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent-deep);
}
.contact-info p {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-secondary);
}
.contact-info i {
  width: 28px;
  color: var(--accent-cta);
  font-size: 1.2rem;
}
.info-note {
  margin-top: 2rem;
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.form-group {
  margin-bottom: 1.2rem;
}
input, textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 40px;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: 0.2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-cta);
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}
#formFeedback {
  margin-top: 1rem;
}
.form-success {
  background: var(--success-bg);
  color: var(--success-text);
  padding: 0.8rem;
  border-radius: 40px;
  text-align: center;
  font-weight: 500;
}
.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 0.8rem;
  border-radius: 40px;
  text-align: center;
}

/* Footer */
footer {
  background: 
    linear-gradient(rgba(58, 67, 81, 0.7), rgba(58, 67, 81, 0.7)), 
    url('https://images.unsplash.com/photo-1536859355448-76f92ebdc33d?q=80&w=869&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') 
    center/cover no-repeat;
  color: var(--accent-cta);
  padding: 4rem 2rem 2rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--accent-cta);
}
.footer-brand p {
  font-size: 0.85rem;
  opacity: 0.8;
  max-width: 280px;
}
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: 0.2s;
}
.social-link:hover {
  background: var(--accent-cta);
  color: var(--accent-deep);
}
.footer-col h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
  opacity: 0.7;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 0.5rem;
}
.footer-col a, .footer-col li {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--accent-cta);
}
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Back to top */
#back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-cta);
  color: var(--accent-deep);
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 50;
  box-shadow: var(--shadow-md);
}
#back-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-top:hover {
  background: var(--accent-cta-hover);
  transform: translateY(-2px);
}

/* animation de reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Responsivité */
@media (max-width: 1024px) {
  #about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }
  nav.scrolled {
    padding: 0.8rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .btn-ghost{
    margin-bottom: 25px;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    display: flex;
  }
  .hero-stat {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .hero-scroll {
    display: none;
  }
  .steps {
    flex-direction: column;
  }
  .section-title {
    font-size: 1.8rem;
  }
  section {
    padding: 4rem 1.5rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand p {
    margin: 0 auto;
  }
  .footer-social {
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .about-badge {
    left: 1rem;
    top: 1rem;
  }
}