/* ===== Design system OneTechLabs Solutions ===== */
:root {
  --bg: #0A1220;
  --surface: #111C2E;
  --primary: #1B9CD8;
  --accent: #8CC63E;
  --text: #F4F7FB;
  --text-muted: #9FB0C3;
  --border: rgba(255, 255, 255, 0.08);
  --grad: linear-gradient(100deg, #1B9CD8, #8CC63E);
  --grad-text: var(--grad);
  --header-bg: rgba(10, 18, 32, 0.85);
  --card-bg: rgba(255, 255, 255, 0.04);
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Thème clair : préférence système (sans choix mémorisé) ou choix explicite.
   Couleurs de marque assombries pour les usages texte (contraste AA). */
:root[data-theme="light"] {
  --bg: #F7FAFC;
  --surface: #FFFFFF;
  --primary: #147AB0;
  --accent: #5E8F1F;
  --text: #1A2634;
  --text-muted: #5A6B7E;
  --border: rgba(10, 18, 32, 0.12);
  --grad-text: linear-gradient(100deg, #147AB0, #567D1B);
  --header-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #FFFFFF;
  --shadow: 0 8px 32px rgba(15, 35, 60, 0.12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F7FAFC;
    --surface: #FFFFFF;
    --primary: #147AB0;
    --accent: #5E8F1F;
    --text: #1A2634;
    --text-muted: #5A6B7E;
    --border: rgba(10, 18, 32, 0.12);
    --grad-text: linear-gradient(100deg, #147AB0, #567D1B);
    --header-bg: rgba(255, 255, 255, 0.85);
    --card-bg: #FFFFFF;
    --shadow: 0 8px 32px rgba(15, 35, 60, 0.12);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(32px, 6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 600; }
h3 { font-size: 24px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 12px; top: 12px; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-title { text-align: center; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 640px; margin: 0 auto 48px; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 250ms ease-out, border-color 250ms ease-out;
}
.card:hover { transform: translateY(-4px); border-color: var(--primary); }
.card .icon { color: var(--accent); margin-bottom: 16px; }

.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: 16px; padding: 14px 28px; border-radius: 999px;
  cursor: pointer; border: 0; min-height: 48px;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}
.btn:hover { transform: scale(1.04); text-decoration: none; }
.btn-primary { background: var(--grad); color: #08111e; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.site-header .logo img { height: 44px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--text); font-weight: 500; font-size: 16px; }
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
.lang-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-muted); border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; padding: 10px 14px;
  min-width: 44px; min-height: 44px;
}
.lang-switch button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.lang-switch button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--accent);
}

/* Bascule de thème clair/sombre */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  background: transparent; color: var(--text); cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px;
  transition: color 200ms ease-out;
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Logo commuté par thème (fonctionne aussi sans JS via prefers-color-scheme) */
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme]) .logo-dark { display: none; }
  :root:not([data-theme]) .logo-light { display: block; }
}
.nav-toggle { display: none; background: transparent; border: 0; color: var(--text); cursor: pointer; padding: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; color: var(--text-muted); font-size: 16px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; margin-bottom: 32px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .legal { font-size: 14px; text-align: center; border-top: 1px solid var(--border); padding-top: 24px; }

/* Reveal au scroll (activé par main.js) */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.visible { opacity: 1; transform: none; transition: opacity 300ms ease-out, transform 300ms ease-out; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; padding: 24px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.open { display: flex; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: 96px 0 120px;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  display: flex; align-items: center;
}
.hero-wave { position: absolute; inset: auto 0 0 0; width: 100%; height: 45%; }
.hero-wave path { animation: waveShift 9s ease-in-out infinite alternate; }
.hero-wave path:last-child { animation-duration: 13s; }
@keyframes waveShift { from { transform: translateX(0); } to { transform: translateX(-48px); } }
.hero-inner { position: relative; display: flex; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 55%; }
.hero-copy h1 { font-size: clamp(26px, 5vw, 44px); }
.hero-copy h1 > span { display: block; }
.hero-img { flex: 1 1 45%; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 901px) {
  .hero-copy h1 { font-size: clamp(34px, 3.6vw, 50px); }
  .hero-img { flex: 0 1 40%; max-width: min(440px, 38vw); }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
  color: var(--text-muted); font-size: 15px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-sub { color: var(--text-muted); font-size: 20px; max-width: 540px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }
@media (max-width: 900px) {
  .hero { padding: 72px 0 110px; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-img { width: 100%; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Approche */
.steps {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  counter-reset: step;
}
.steps li { text-align: center; padding: 0 12px; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--text-muted); font-size: 16px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad); color: #08111e;
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  margin-bottom: 16px;
}
@media (max-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* À propos */
.about-inner { display: flex; align-items: center; gap: 48px; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow); flex: 1 1 45%; }
.about-copy { flex: 1 1 55%; }
.stats { display: flex; gap: 40px; margin: 32px 0 0; flex-wrap: wrap; }
.stats dt {
  font-family: var(--font-head); font-weight: 700; font-size: 48px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stats dd { margin: 4px 0 0; color: var(--text-muted); font-size: 16px; }
@media (max-width: 900px) { .about-inner { flex-direction: column; } .about-img { width: 100%; } }

/* IOLA */
.iola { display: flex; align-items: center; gap: 40px; padding: 40px; }
.iola:hover { transform: none; }
.iola-copy { flex: 1 1 55%; }
.iola-img { border-radius: var(--radius); flex: 1 1 45%; }
.store-badges { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 24px 0 8px; }
.store-badges img { height: 48px; width: auto; }
.badge-note { color: var(--text-muted); font-size: 14px; }
@media (max-width: 900px) { .iola { flex-direction: column; } .iola-img { width: 100%; } }

/* Contact */
.contact-card { text-align: center; }
.contact-card .icon { display: inline-flex; }
.contact-card a { word-break: break-all; }
.contact-cta { text-align: center; margin-top: 48px; }

/* Pages annexes */
.page-article { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.page-article h1 { font-size: clamp(28px, 4vw, 42px); }
.page-article h2 { font-size: 24px; margin-top: 1.5em; }
.page-article p, .page-article li { color: var(--text-muted); }
.page-article strong { color: var(--text); }
.page-updated { font-size: 14px; color: var(--text-muted); font-style: italic; }
