/* ─────────────────────────────────────────────────────────────────────────
   ORC — site vitrine (orc-modules.oliroche.com)
   Charte issue du design system « Studio+ » (voir design_handoff_orc_domotique).
   Thème clair par défaut ; sombre via [data-theme=dark] (posé par site.js,
   partagé avec l'app : clé localStorage `theme`) ou préférence système.
   ───────────────────────────────────────────────────────────────────────── */

/* Polices auto-hébergées (latin, variables) — aucun appel tiers, zéro traceur. */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/manrope-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/space-grotesk-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Public Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/public-sans-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
}

:root {
  --bg: #f5f4ef;
  --card: #ffffff;
  --well: #f6f6f1;
  --border: #e9e8e0;
  --border2: #e6e5dd;
  --ink: #141a13;
  --text2: #6a7165;
  --muted: #969c8e;
  --accent: #1c6b46;
  --accent-ink: #ffffff;
  --online: #28a35f;
  --logo-green: #68a58c;
  --heart: #e08a7a;
  --amber: #8a6a1e;
  --amber-bg: #f7edd0;
  --pool: #3d7fbf;      --pool-tile: #eaf1fa;
  --water: #1c6b46;     --water-tile: #e7f1ea;
  --somfy: #b58a06;     --somfy-tile: #fbf1d6;
  --garage: #7c5cc4;    --garage-tile: #f0ecfa;
  --shadow-card: 0 8px 20px -18px rgba(30, 40, 25, .5);
  --shadow-big: 0 34px 70px -46px rgba(30, 40, 25, .55);
  --hero-tint: rgba(104, 165, 140, .12);
  --grid-line: rgba(20, 26, 19, .045);
}

[data-theme="dark"] {
  --bg: #0f1214;
  --card: #161a1f;
  --well: #0d1013;
  --border: rgba(255, 255, 255, .06);
  --border2: rgba(255, 255, 255, .08);
  --ink: #eef1ea;
  --text2: #a7ad9c;
  --muted: #8a938a;
  --accent: #35d38a;
  --accent-ink: #0f1214;
  --online: #35d38a;
  --amber: #e6b43c;
  --amber-bg: rgba(230, 180, 60, .16);
  --pool: #5aa0e0;      --pool-tile: rgba(90, 160, 224, .14);
  --water: #35d38a;     --water-tile: rgba(53, 211, 138, .14);
  --somfy: #f5cb3f;     --somfy-tile: rgba(234, 179, 8, .16);
  --garage: #b198e6;    --garage-tile: rgba(177, 152, 230, .16);
  --shadow-card: none;
  --shadow-big: 0 40px 80px -46px rgba(0, 0, 0, .7);
  --hero-tint: rgba(53, 211, 138, .06);
  --grid-line: rgba(238, 241, 234, .04);
}

/* Sans JS : suivre la préférence système (mêmes valeurs que [data-theme=dark]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1214; --card: #161a1f; --well: #0d1013;
    --border: rgba(255, 255, 255, .06); --border2: rgba(255, 255, 255, .08);
    --ink: #eef1ea; --text2: #a7ad9c; --muted: #8a938a;
    --accent: #35d38a; --accent-ink: #0f1214; --online: #35d38a;
    --amber: #e6b43c; --amber-bg: rgba(230, 180, 60, .16);
    --pool: #5aa0e0; --pool-tile: rgba(90, 160, 224, .14);
    --water: #35d38a; --water-tile: rgba(53, 211, 138, .14);
    --somfy: #f5cb3f; --somfy-tile: rgba(234, 179, 8, .16);
    --garage: #b198e6; --garage-tile: rgba(177, 152, 230, .16);
    --shadow-card: none; --shadow-big: 0 40px 80px -46px rgba(0, 0, 0, .7);
    --hero-tint: rgba(53, 211, 138, .06); --grid-line: rgba(238, 241, 234, .04);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ── Typo utilitaires ─────────────────────────────────────────────────── */
.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.label {
  font-family: 'Public Sans', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-family: 'Manrope', sans-serif; }
h1 { font-size: clamp(32px, 5.2vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(25px, 3.4vw, 34px); font-weight: 800; line-height: 1.18; letter-spacing: -.015em; margin: 10px 0 14px; }
h3 { font-size: 17px; font-weight: 700; }
.lead { font-size: 17px; color: var(--text2); max-width: 56ch; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Boutons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
  font: 700 14px 'Public Sans', sans-serif; text-decoration: none;
  cursor: pointer; transition: transform .12s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border2); color: var(--ink); background: var(--card); }
[data-theme="dark"] .btn-ghost { background: transparent; }

/* ── Liseré tricolore ─────────────────────────────────────────────────── */
.tricolore { display: flex; height: 4px; border-radius: 3px; overflow: hidden; width: 34px; }
.tricolore i { flex: 1; }
.tricolore i:nth-child(1) { background: #2f6fd6; }
.tricolore i:nth-child(2) { background: #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .07); }
.tricolore i:nth-child(3) { background: #e63b2e; }
[data-theme="dark"] .tricolore i:nth-child(2) { box-shadow: none; }

/* ── Header ───────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  max-width: 1080px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-logo { display: flex; flex-direction: column; align-items: center; }
.brand-logo img { width: 46px; height: 46px; object-fit: contain; }
.brand-logo .tricolore { width: 28px; margin-top: -10px; }
.brand-name {
  font: 800 21px 'Manrope', sans-serif; color: var(--ink);
  margin-top: 8px; letter-spacing: -.01em;
}
.brand-name em { font-style: normal; color: var(--accent); }
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 8px 12px; border-radius: 10px; text-decoration: none;
  font: 600 13.5px 'Public Sans', sans-serif; color: var(--text2);
}
.topnav a:hover { color: var(--ink); background: var(--well); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.lang-switch {
  font: 700 12px 'JetBrains Mono', monospace; letter-spacing: .06em;
  text-decoration: none; color: var(--text2);
  padding: 8px 10px; border: 1px solid var(--border2); border-radius: 10px;
}
.lang-switch:hover { color: var(--ink); }
.theme-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border2);
  background: var(--card); color: var(--ink); font-size: 15px; cursor: pointer;
}
[data-theme="dark"] .theme-btn { background: transparent; }
.btn-login { padding: 10px 18px; }
.burger {
  display: none; width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--border2); background: var(--card);
  color: var(--ink); font-size: 17px; cursor: pointer;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(820px 420px at 78% -10%, var(--hero-tint), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  border-bottom: 1px solid var(--border);
}
.hero-in {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px;
  align-items: center; padding: 72px 0 64px;
}
.hero h1 { margin: 14px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-cta { display: flex; gap: 12px; margin: 26px 0 30px; flex-wrap: wrap; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border2);
  font: 600 12.5px 'Public Sans', sans-serif; color: var(--text2);
  box-shadow: var(--shadow-card);
}
.chip b { color: var(--ink); font-weight: 700; }

.screen-frame {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-big);
}
.screen-frame .frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border2); }
.frame-bar .frame-url {
  margin-left: 8px; font: 500 11px 'JetBrains Mono', monospace; color: var(--muted);
}
.screen-frame img { width: 100%; }
.img-dark { display: none; }
[data-theme="dark"] .img-light { display: none; }
[data-theme="dark"] .img-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .img-light { display: none; }
  :root:not([data-theme]) .img-dark { display: block; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
section { padding: 74px 0; }
.section-head { max-width: 640px; margin-bottom: 38px; }
.section-head p { color: var(--text2); }

/* ── Modules ──────────────────────────────────────────────────────────── */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.module-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.module-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--mc, var(--accent));
}
.module-card .tile {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--mct, var(--well)); margin-bottom: 14px;
}
.module-card h3 { margin-bottom: 6px; }
.module-card p { color: var(--text2); font-size: 14px; }
.module-card .specline {
  margin-top: 14px; font: 500 11.5px 'JetBrains Mono', monospace; color: var(--muted);
}
.mc-pool   { --mc: var(--pool);   --mct: var(--pool-tile); }
.mc-water  { --mc: var(--water);  --mct: var(--water-tile); }
.mc-somfy  { --mc: var(--somfy);  --mct: var(--somfy-tile); }
.mc-garage { --mc: var(--garage); --mct: var(--garage-tile); }
.module-note {
  margin-top: 18px; padding: 16px 20px; border-radius: 14px;
  background: var(--well); border: 1px dashed var(--border2);
  color: var(--text2); font-size: 13.5px;
}

/* ── Local d'abord ────────────────────────────────────────────────────── */
.local { background: var(--well); border-block: 1px solid var(--border); }
.local-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.feature-list { display: grid; gap: 14px; }
.feature {
  display: flex; gap: 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.feature .f-ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--water-tile); font-size: 18px;
}
.feature h3 { font-size: 15px; margin-bottom: 3px; }
.feature p { font-size: 13.5px; color: var(--text2); }

.net-diagram {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 0; align-items: center;
  position: sticky; top: 92px;
}
.net-node {
  width: 100%; max-width: 330px; border: 1px solid var(--border2); border-radius: 13px;
  padding: 13px 16px; display: flex; align-items: center; gap: 12px; background: var(--bg);
}
.net-node .tile {
  width: 36px; height: 36px; border-radius: 10px; font-size: 17px; flex: none;
  display: flex; align-items: center; justify-content: center; background: var(--water-tile);
}
.net-node b { font: 700 14px 'Manrope', sans-serif; display: block; }
.net-node span { font: 500 11px 'JetBrains Mono', monospace; color: var(--muted); }
.net-link {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0;
  font: 600 10.5px 'JetBrains Mono', monospace; color: var(--muted); letter-spacing: .08em;
}
.net-link .wire { width: 2px; height: 16px; background: var(--border2); border-radius: 2px; }
.net-link.optional .wire { background: repeating-linear-gradient(var(--muted) 0 3px, transparent 3px 7px); width: 2px; height: 22px; opacity: .55; }
.net-badge {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 7px;
  font: 600 12px 'Public Sans', sans-serif; color: var(--accent);
}
.net-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--online);
  box-shadow: 0 0 0 3px rgba(40, 163, 95, .15);
}
[data-theme="dark"] .net-badge .dot { box-shadow: none; }

/* ── Simplicité ───────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 22px; box-shadow: var(--shadow-card);
}
.step .num {
  font: 700 26px 'Space Grotesk', monospace; color: var(--accent);
  display: block; margin-bottom: 10px;
}
.step h3 { margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--text2); }
.simple-punch {
  margin-top: 28px; text-align: center;
  font: 700 17px 'Manrope', sans-serif; color: var(--text2);
}
.simple-punch b { color: var(--ink); }

/* ── Bandeau France ───────────────────────────────────────────────────── */
.france-band { padding: 0; }
.france-in {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border2); border-radius: 22px;
  padding: 26px 30px; box-shadow: var(--shadow-card);
}
.france-in .tricolore { width: 64px; height: 6px; flex: none; }
.france-in p { color: var(--text2); font-size: 14px; max-width: 62ch; }
.france-in b { color: var(--ink); }

/* ── Technologie ──────────────────────────────────────────────────────── */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.spec {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; box-shadow: var(--shadow-card);
}
.spec .spec-k {
  font: 700 15px 'Space Grotesk', monospace; color: var(--accent);
  display: block; margin-bottom: 4px;
}
.spec p { font-size: 13px; color: var(--text2); }

/* ── Services ─────────────────────────────────────────────────────────── */
.services { background: var(--well); border-block: 1px solid var(--border); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.svc {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 22px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 8px;
}
.svc .tile {
  width: 44px; height: 44px; border-radius: 12px; font-size: 20px;
  display: flex; align-items: center; justify-content: center; background: var(--water-tile);
}
.svc p { font-size: 13.5px; color: var(--text2); }
.svc ul { margin: 4px 0 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.svc li {
  font-size: 13px; color: var(--text2); padding-left: 18px; position: relative;
}
.svc li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.svc-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.svc-cta .mono-note { font: 500 12px 'JetBrains Mono', monospace; color: var(--muted); }

/* ── Newsletter ───────────────────────────────────────────────────────── */
.newsletter-card {
  background: var(--card); border: 1px solid var(--border2); border-radius: 22px;
  padding: 40px; box-shadow: var(--shadow-big);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center;
}
.nl-form { display: flex; gap: 10px; }
.nl-form input {
  flex: 1; min-width: 0; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--border2); background: var(--bg); color: var(--ink);
  font: 500 14px 'Public Sans', sans-serif; outline: none;
}
.nl-form input:focus { border-color: var(--accent); }
.nl-hp { position: absolute; left: -9999px; opacity: 0; }
.nl-msg { margin-top: 12px; font-size: 13.5px; min-height: 20px; }
.nl-msg.ok { color: var(--online); font-weight: 600; }
.nl-msg.err { color: #c0503f; font-weight: 600; }
[data-theme="dark"] .nl-msg.err { color: #e0705e; }
.nl-note { margin-top: 6px; font: 500 11.5px 'JetBrains Mono', monospace; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 44px 0 34px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand .brand-name { font-size: 19px; }
.foot-brand .fullname {
  margin-top: 8px; font: 700 10.5px 'Space Grotesk', monospace;
  letter-spacing: .16em; color: var(--logo-green);
}
.foot-links { display: grid; gap: 7px; }
.foot-links a { font-size: 13.5px; color: var(--text2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 12.5px;
}
.orc-heart { font: 700 13px 'Space Grotesk', monospace; letter-spacing: .2em; color: var(--text2); }
.orc-heart .heart { color: var(--heart); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .topnav { display: none; }
  .burger { display: block; }
  .topbar.nav-open .topnav {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 10px 22px 16px;
  }
  .hero-in { grid-template-columns: 1fr; padding: 48px 0 46px; gap: 34px; }
  .local-grid { grid-template-columns: 1fr; }
  .net-diagram { position: static; }
  .steps, .spec-grid, .svc-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter-card { grid-template-columns: 1fr; padding: 30px 24px; }
  section { padding: 54px 0; }
}
@media (max-width: 560px) {
  .module-grid, .spec-grid { grid-template-columns: 1fr; }
  .btn-login { padding: 10px 13px; }
  .lang-switch { display: none; }
  .topbar.nav-open .topnav .lang-inline { display: block; }
  .nl-form { flex-direction: column; }
}
.lang-inline { display: none; }
