:root {
  --bg:        #05080d;
  --bg-2:      #070c14;
  --panel:     #0b131d;
  --panel-2:   #0e1826;
  --border:    rgba(200, 190, 168, 0.12);
  --border-hi: rgba(228, 216, 197, 0.34);
  /* brand cream accent (sampled from the logo) — replaces the old teal */
  --teal:      #e4d8c5;
  --teal-2:    #f2ead9;
  --blue:      #e4d8c5;
  --violet:    #cbb894;
  --teal-dim:  rgba(228, 216, 197, 0.78);
  --text:      #e8f2f6;
  --muted:     rgba(206, 226, 236, 0.62);
  --faint:     rgba(206, 226, 236, 0.34);
  --on-accent:    #1a140a;                 /* ink on the cream accent */
  --header-bg:    rgba(5, 8, 13, 0.72);
  --surface-tint: rgba(255, 255, 255, 0.02);
  --accent-glow:  rgba(228, 216, 197, 0.15);
  --maxw:      1120px;
  --display:   "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* ---- Light theme palette (brand navy accent on warm ivory) ---- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:        #f6f3ec;
  --bg-2:      #eee9dd;
  --panel:     #ffffff;
  --panel-2:   #faf6ee;
  --border:    rgba(31, 49, 63, 0.14);
  --border-hi: rgba(31, 49, 63, 0.30);
  --teal:      #1f313f;
  --teal-2:    #34506a;
  --blue:      #1f313f;
  --violet:    #7a5c34;
  --teal-dim:  rgba(31, 49, 63, 0.74);
  --text:      #17202b;
  --muted:     rgba(31, 49, 63, 0.66);
  --faint:     rgba(31, 49, 63, 0.42);
  --on-accent:    #f6f3ec;
  --header-bg:    rgba(246, 243, 236, 0.80);
  --surface-tint: rgba(31, 49, 63, 0.04);
  --accent-glow:  rgba(31, 49, 63, 0.16);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg:        #f6f3ec;
    --bg-2:      #eee9dd;
    --panel:     #ffffff;
    --panel-2:   #faf6ee;
    --border:    rgba(31, 49, 63, 0.14);
    --border-hi: rgba(31, 49, 63, 0.30);
    --teal:      #1f313f;
    --teal-2:    #34506a;
    --blue:      #1f313f;
    --violet:    #7a5c34;
    --teal-dim:  rgba(31, 49, 63, 0.74);
    --text:      #17202b;
    --muted:     rgba(31, 49, 63, 0.66);
    --faint:     rgba(31, 49, 63, 0.42);
    --on-accent:    #f6f3ec;
    --header-bg:    rgba(246, 243, 236, 0.80);
    --surface-tint: rgba(31, 49, 63, 0.04);
    --accent-glow:  rgba(31, 49, 63, 0.16);
  }
}

/* ---- Logo variant swap by theme ---- */
img.logo-light { display: none; }
:root[data-theme="light"] img.logo-dark  { display: none; }
:root[data-theme="light"] img.logo-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) img.logo-dark  { display: none; }
  :root:not([data-theme="dark"]) img.logo-light { display: block; }
}

/* ---- Hero glow: warm navy tint in light mode ---- */
:root[data-theme="light"] .hero::before {
  background:
    radial-gradient(760px 420px at 22% 8%, rgba(31, 49, 63, 0.08), transparent 60%),
    radial-gradient(680px 420px at 88% 30%, rgba(122, 92, 52, 0.08), transparent 60%),
    radial-gradient(600px 500px at 60% 100%, rgba(31, 49, 63, 0.05), transparent 62%);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero::before {
    background:
      radial-gradient(760px 420px at 22% 8%, rgba(31, 49, 63, 0.08), transparent 60%),
      radial-gradient(680px 420px at 88% 30%, rgba(122, 92, 52, 0.08), transparent 60%),
      radial-gradient(600px 500px at 60% 100%, rgba(31, 49, 63, 0.05), transparent 62%);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, .brand { font-family: var(--display); }

.eyebrow {
  font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal-dim); font-weight: 600; font-family: var(--sans);
}

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand:hover { text-decoration: none; }
.brand-wordmark { height: 22px; width: auto; display: block; }
.brand-symbol { height: 40px; width: auto; display: block; }
.nav { display: flex; gap: 30px; }
.nav a { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.head-right { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: transparent; border: 1px solid var(--border-hi); color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }

.lang-toggle { display: inline-flex; border: 1px solid var(--border-hi); border-radius: 999px; overflow: hidden; }
.lang-toggle button {
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  font: inherit; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.05em; padding: 6px 12px;
}
.lang-toggle button[aria-pressed="true"] { background: var(--teal); color: var(--on-accent); }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border-hi); cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--teal); }
.theme-toggle svg { width: 17px; height: 17px; }
.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; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun  { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

.btn {
  display: inline-block; padding: 12px 24px; border-radius: 10px;
  font-weight: 600; font-size: 0.92rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-2)); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-hi); color: var(--text); background: var(--surface-tint); }
.btn-ghost:hover { border-color: var(--teal); }
.btn-sm { padding: 9px 18px; font-size: 0.86rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 118px 0 90px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 420px at 22% 8%, rgba(228, 216, 197,0.16), transparent 60%),
    radial-gradient(680px 420px at 88% 30%, rgba(228, 216, 197,0.14), transparent 60%),
    radial-gradient(600px 500px at 60% 100%, rgba(203, 184, 148,0.10), transparent 62%);
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-hi); border-radius: 999px; padding: 6px 14px;
  font-size: 0.78rem; color: var(--teal-dim); margin-bottom: 26px;
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; max-width: 15ch; }
.grad { background: linear-gradient(120deg, var(--teal-2), var(--blue) 60%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 26px; max-width: 620px; font-size: 1.15rem; color: var(--muted); }
.cta-row { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.expertise { margin-top: 58px; display: flex; flex-wrap: wrap; gap: 10px 10px; }
.chip {
  border: 1px solid var(--border); background: var(--panel);
  border-radius: 999px; padding: 8px 16px; font-size: 0.84rem; color: var(--muted);
}

/* ---------- Section frame ---------- */
section { padding: 84px 0; position: relative; }
.sec-head { max-width: 660px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin-top: 12px; }
.sec-head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

/* ---------- Services grid ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 44px; }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-4px); box-shadow: 0 18px 50px -30px rgba(228, 216, 197,0.5); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(228, 216, 197,0.10); border: 1px solid var(--border-hi); color: var(--teal-2);
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: 8px; }
.card-more { display: inline-block; margin-top: 12px; font-size: 0.88rem; font-weight: 600; color: var(--teal); }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- AI & Cloud feature ---------- */
#ai { background: linear-gradient(180deg, transparent, rgba(228, 216, 197,0.05), transparent); }
.split { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 44px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }
.feature {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 20px; padding: 34px;
}
.feature h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 8px; }
.feature > p { color: var(--muted); margin-bottom: 22px; }
.feature ul { list-style: none; display: grid; gap: 14px; }
.feature li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.96rem; }
.feature li .b { flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 6px; display: grid; place-items: center; background: rgba(228, 216, 197,0.12); color: var(--teal-2); }
.feature li .b svg { width: 13px; height: 13px; }
.feature li strong { font-weight: 600; }
.feature li span.d { color: var(--muted); }
.note { margin-top: 26px; padding: 16px 18px; border-left: 2px solid var(--border-hi); background: var(--surface-tint); border-radius: 8px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Method ---------- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 44px; counter-reset: step; }
.step { border: 1px solid var(--border); border-radius: 16px; padding: 26px; background: var(--panel); position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--display); font-size: 1.05rem; font-weight: 700; color: var(--teal-2);
  display: inline-block; margin-bottom: 14px; letter-spacing: 0.05em;
}
.step h4 { font-size: 1.08rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Product ---------- */
.product {
  margin-top: 44px;
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 22px; padding: 38px;
  display: grid; gap: 30px; grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 720px) { .product { grid-template-columns: 1.5fr 1fr; } }
.product .tag {
  display: inline-block; margin-bottom: 14px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-dim); border: 1px solid var(--border-hi); border-radius: 999px; padding: 5px 13px;
}
.product h3 { font-size: 1.7rem; font-weight: 700; }
.product p { color: var(--muted); margin-top: 10px; }
.product .links { margin-top: 20px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.92rem; align-items: center; }
.product-art { justify-self: center; width: 100%; max-width: 320px; border-radius: 16px; border: 1px solid var(--border); }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.appstore-badge { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.28); border-radius: 12px; padding: 9px 16px; font-weight: 600; }
.appstore-badge:hover { text-decoration: none; border-color: #fff; }
.appstore-badge small { display: block; font-size: 0.62rem; opacity: 0.82; }
.appstore-badge b { font-size: 1.0rem; font-weight: 600; }

/* ---------- Contact ---------- */
#contact { background: linear-gradient(180deg, transparent, rgba(228, 216, 197,0.05)); }
.contact-grid { display: grid; gap: 34px; grid-template-columns: 1fr; margin-top: 44px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 0.85fr 1.15fr; } }
.contact-aside h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 12px; }
.contact-aside p { color: var(--muted); margin-bottom: 22px; }
.contact-aside .direct { display: flex; flex-direction: column; gap: 6px; }
.contact-aside .direct a { font-size: 1.08rem; font-weight: 600; }

form.contact {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 20px; padding: 30px;
}
.field { margin-bottom: 18px; }
.row2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea { resize: vertical; min-height: 130px; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.checkgroup { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--border); background: var(--bg-2); border-radius: 10px; padding: 9px 14px; font-size: 0.9rem; color: var(--muted); transition: border-color .15s ease, color .15s ease; }
.check:hover { border-color: var(--border-hi); }
.check input { width: auto; margin: 0; accent-color: var(--teal); }
.check:has(input:checked) { border-color: var(--teal); color: var(--text); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.consent input { width: auto; margin-top: 3px; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: 0.9rem; }
.form-status.ok { color: var(--teal-2); }
.form-status.err { color: #ff8080; }
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 48px 0 40px; margin-top: 20px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; margin-bottom: 30px; }
.foot-brand { max-width: 340px; }
.foot-logo { height: 66px; width: auto; display: block; margin-bottom: 4px; }
.foot-brand p { color: var(--faint); font-size: 0.9rem; margin-top: 12px; }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-cols h4 { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; font-weight: 600; }
.foot-cols a { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 9px; }
.foot-cols a:hover { color: var(--text); text-decoration: none; }
.foot-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--faint); font-size: 0.82rem; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 4px 28px 14px;
  }
  header.nav-open .nav { display: flex; }
  .nav a { padding: 13px 2px; font-size: 1rem; border-top: 1px solid var(--border); }
  .hero { padding-top: 84px; }
}
@media (max-width: 560px) {
  /* !important : bat les règles de thème plus spécifiques
     (:root[data-theme="light"] img.logo-light { display: block }) qui, sinon,
     réaffichaient le wordmark sur mobile en mode clair et poussaient le bouton
     Contact hors écran. Le wordmark doit être masqué sur mobile dans les 2 thèmes. */
  .brand-wordmark { display: none !important; }
  .brand-symbol { height: 36px; }
}
@media (max-width: 400px) {
  .head-cta { display: none; }
}
