/* ============================================================================
   Komni Digital — Feuille de style
   Thème sombre moderne · dégradés bleu→indigo · animations au scroll
   ============================================================================ */

:root {
  color-scheme: dark;
  --bg:          #07070f;
  --bg-alt:      #0c0c18;
  --surface:     rgba(255, 255, 255, 0.04);
  --surface-2:   rgba(255, 255, 255, 0.06);
  --border:      rgba(255, 255, 255, 0.09);
  --border-hover:rgba(123, 140, 255, 0.5);
  --text:        #eef0f8;
  --text-dim:    #a4a8be;
  --text-dimmer: #6f7390;

  --blue:        #5b8cff;
  --indigo:      #7b5cff;
  --accent-grad: linear-gradient(120deg, #5b8cff 0%, #7b5cff 100%);
  --accent-soft: linear-gradient(120deg, rgba(91,140,255,.16), rgba(123,92,255,.16));

  --header-bg:     rgba(7, 7, 15, .72);
  --nav-mobile-bg: rgba(10, 10, 22, .96);
  --grid-line:     rgba(255, 255, 255, .035);

  --radius:      18px;
  --radius-sm:   12px;
  --maxw:        1140px;
  --ease:        cubic-bezier(.22, 1, .36, 1);

  --font-body:   'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head:   'Space Grotesk', var(--font-body);

  /* Zones sûres (encoche / barre de statut / geste-barre du bas en PWA standalone) */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── Thème clair ────────────────────────────────────────────────── */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:          #f6f7fb;
  --bg-alt:      #eceffa;
  --surface:     rgba(20, 22, 45, 0.045);
  --surface-2:   rgba(20, 22, 45, 0.075);
  --border:      rgba(20, 22, 45, 0.1);
  --border-hover:rgba(91, 140, 255, 0.55);
  --text:        #14151f;
  --text-dim:    #4b4f66;
  --text-dimmer: #767a92;

  --header-bg:     rgba(255, 255, 255, .78);
  --nav-mobile-bg: rgba(255, 255, 255, .97);
  --grid-line:     rgba(20, 22, 45, .05);
}

:root[data-theme="light"] .blob { opacity: .3; }
:root[data-theme="light"] .blob-3 { opacity: .18; }

/* Transition douce lors du changement de thème (classe posée temporairement par le JS) */
.theme-transition, .theme-transition * {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(90px + var(--safe-t)); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: rgba(123, 92, 255, .35); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Accessibilité ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px;
}

/* ── Barre de progression de scroll ─────────────────────────────── */
.scroll-progress {
  position: fixed; top: var(--safe-t); left: 0; height: 3px; width: 0;
  background: var(--accent-grad); z-index: 300;
  box-shadow: 0 0 12px rgba(123, 92, 255, .6);
  transition: width .1s linear;
}

/* ── En-tête ────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: calc(18px + var(--safe-t)) 0 18px;
  transition: padding .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding: calc(12px + var(--safe-t)) 0 12px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.brand-mark { filter: drop-shadow(0 4px 12px rgba(91, 140, 255, .4)); }
.brand-name { color: var(--text); }
.brand-accent { color: var(--text-dim); font-weight: 500; margin-left: 3px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 9px 14px; border-radius: 10px; color: var(--text-dim); font-weight: 500; font-size: .95rem; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav .nav-cta {
  background: var(--accent-grad); color: #fff; font-weight: 600;
  box-shadow: 0 6px 20px -6px rgba(123, 92, 255, .6);
}
.nav .nav-cta:hover { background: var(--accent-grad); filter: brightness(1.08); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: border-color .2s, background .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--border-hover); background: var(--surface-2); transform: translateY(-2px); }
.theme-toggle .icon { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Boutons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 12px; font-weight: 600; font-size: .98rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  will-change: transform;
}
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(123, 92, 255, .7); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(123, 92, 255, .85); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); backdrop-filter: blur(6px); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--border-hover); background: var(--surface-2); }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: calc(120px + var(--safe-t)) 0 calc(80px + var(--safe-b)); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }

.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: float 18s ease-in-out infinite; }
.blob-1 { width: 520px; height: 520px; background: #2d4cff; top: -120px; left: -100px; }
.blob-2 { width: 460px; height: 460px; background: #7b5cff; bottom: -140px; right: -80px; animation-delay: -6s; }
.blob-3 { width: 360px; height: 360px; background: #0e63ff; top: 40%; left: 55%; animation-delay: -12s; opacity: .35; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 20px) scale(.95); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 35%, transparent 75%);
}

.hero-content {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.hero-text { max-width: 660px; }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; max-width: 560px; height: auto; margin-left: auto; display: block;
  filter: drop-shadow(0 24px 70px rgba(91, 140, 255, .3));
  animation: floatY 7s ease-in-out infinite;
}
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .04em;
  color: var(--text); padding: 7px 16px; border-radius: 100px;
  background: var(--accent-soft); border: 1px solid var(--border); margin-bottom: 28px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; margin-bottom: 24px; }
.hero h1 .gradient-text { display: block; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-dim); max-width: 660px; margin-bottom: 38px; }
.hero-sub strong { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges span {
  font-size: .82rem; font-weight: 500; color: var(--text-dim);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px; background: var(--surface);
}

/* ── Sections génériques ────────────────────────────────────────── */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 660px; margin: 0 auto 64px; text-align: center; }
.section-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 600; color: var(--blue); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 18px; }
.section-lead { color: var(--text-dim); font-size: 1.1rem; }

/* ── Cartes prestations ─────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  position: relative; padding: 36px 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .4s, background .4s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--accent-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--border); margin-bottom: 22px;
}
.card-icon img { width: 46px; height: 46px; display: block; }
.card h3 { font-size: 1.35rem; margin-bottom: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.card p { color: var(--text-dim); margin-bottom: 20px; }
.card ul { display: flex; flex-direction: column; gap: 10px; }
.card li { position: relative; padding-left: 26px; color: var(--text-dim); font-size: .96rem; }
.card li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 8px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.tag { font-family: var(--font-body); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 6px; background: var(--accent-grad); color: #fff; }

/* ── Étapes (approche) ──────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 30px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .4s var(--ease), border-color .4s; }
.step:hover { transform: translateY(-5px); border-color: var(--border-hover); }
.step-num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 14px; }
.step h3 { font-size: 1.18rem; margin-bottom: 10px; }
.step p { color: var(--text-dim); font-size: .95rem; }

/* ── Bandeau défilant ───────────────────────────────────────────── */
.marquee-section { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scroll-x 32s linear infinite; }
.marquee-track span { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--text-dimmer); white-space: nowrap; transition: color .3s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span:hover { color: var(--blue); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ── À propos ───────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.about-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); margin: 14px 0 22px; }
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 1.05rem; }
.about-text .btn { margin-top: 12px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-stats li { padding: 26px 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); text-align: center; transition: transform .4s var(--ease), border-color .4s; }
.about-stats li:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.about-stats strong { display: block; font-family: var(--font-head); font-size: 2rem; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-stats span { color: var(--text-dim); font-size: .9rem; }

/* ── Contact ────────────────────────────────────────────────────── */
.section-contact { text-align: center; position: relative; overflow: hidden; }
.section-contact::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(123, 92, 255, .22), transparent 70%);
}
.contact-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.contact-inner h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 14px 0 18px; }
.contact-actions { margin: 34px 0 16px; }
.contact-note { color: var(--text-dimmer); font-size: .92rem; }

/* ── Pied de page ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 calc(28px + var(--safe-b)); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.footer-brand p { color: var(--text-dim); margin-top: 12px; max-width: 320px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-start; }
.footer-nav a { color: var(--text-dim); transition: color .2s; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; color: var(--text-dimmer); font-size: .88rem; }

/* ── Animations au scroll (reveal) ──────────────────────────────── */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .28s; }
.reveal[data-delay="4"] { transition-delay: .38s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .marquee-track, .hero-visual img { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    flex-direction: column; align-items: stretch; justify-content: center; gap: 12px;
    background: var(--nav-mobile-bg); backdrop-filter: blur(18px);
    padding: calc(40px + var(--safe-t)) 28px calc(40px + var(--safe-b));
    transform: translateX(100%); transition: transform .35s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav.open { transform: translateX(0); }
  .nav a { padding: 14px 16px; font-size: 1.05rem; }
  .nav-toggle { display: flex; z-index: 110; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}
