/* ============================================================
   ioPOS — feuille de style unique
   Palette et règles de forme reprises de l'app Android ioPOS
   et du backoffice ioBOARD (board.iopos.ai).
   ============================================================ */

/* ---------- Polices (auto-hébergées, aucun CDN) ---------- */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-700.woff2') format('woff2');
}

/* ---------- Thèmes ---------- */
:root {
  --bg: #F7F4EB;
  --surface: #FDF9F1;
  --card: #FDF9F1;
  --ink: #000000;
  --ink-soft: #424248;
  --muted: #70707B;
  /* Corail du logo. Réservé au wordmark et aux aplats décoratifs : en petit
     texte sur le fond crème il ne donne que 2,75:1. */
  --brand: #FF5758;
  /* Même famille, assez foncé pour porter du texte (5,2:1 sur le crème). */
  --brand-text: #C22B2C;
  --btn: #C22B2C;
  --btn-hover: #E23A3B;
  --green: #336B42;
  --divider: #E5E5E5;
  --sand: #EDE9DF;
  --sand-strong: #E8E3D8;
  --on-dark: #F9FAFB;

  --statut-libre-bg: #D1FAE5;
  --statut-libre-fg: #065F46;

  --max: 1140px;
  --r-card: 24px;
  --r-input: 12px;
  --gap: 24px;
}

[data-theme='dark'] {
  --bg: #0B0F19;
  --surface: #111827;
  --card: #1F2937;
  --ink: #F9FAFB;
  --ink-soft: #D1D5DB;
  --muted: #9CA3AF;
  --brand: #FF5758;
  --brand-text: #FF5758;   /* sur fond sombre, le corail pur passe à 6,3:1 */
  --btn: #C22B2C;
  --btn-hover: #E23A3B;
  --green: #3E8552;
  --divider: #374151;
  --sand: #374151;
  --sand-strong: #1F2937;

  --statut-libre-bg: #065F46;
  --statut-libre-fg: #D1FAE5;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Signature de la marque : les gros titres restent en regular. */
h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img, svg { max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Utilitaires ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--surface { background: var(--surface); border-block: 1px solid var(--divider); }

.label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.label--brand { color: var(--brand-text); }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 62ch;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.section-head { max-width: 68ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.center { margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.69rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .io { color: var(--brand); }
.wordmark--sm { font-size: 1.1rem; }
/* Emblème du logo. Son intérieur est blanc opaque : il se lit comme la
   pastille de l'icône d'application, sur fond clair comme sur fond sombre. */
.wordmark__embleme {
  width: auto;
  height: 38px;
  flex: none;
}

/* ---------- Boutons (pilule) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--btn); color: #FFFFFF; }
.btn--primary:hover { background: var(--btn-hover); }
.btn--ghost {
  background: var(--sand);
  color: var(--ink);
  border-color: var(--divider);
}
.btn--ghost:hover { border-color: var(--ink-soft); }
.btn--onDark {
  background: #FFFFFF;
  color: #111827;
}
.btn--onDark:hover { background: #E5E7EB; }
.btn--sm { padding: 9px 18px; font-size: .875rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 2px;
}
.link-arrow:hover { border-color: var(--brand-text); }
.link-arrow svg { width: 15px; height: 15px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: 28px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--sand-strong);
  color: var(--brand-text);
  margin-bottom: 18px;
}
.card__icon svg { width: 22px; height: 22px; }

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Liste à puces cochées */
.checks li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0; top: .45em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.checks strong { color: var(--ink); font-weight: 500; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 74px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .92rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav__links a:hover { color: var(--ink); background: var(--sand); }
.nav__links a[aria-current='page'] { color: var(--ink); font-weight: 500; }
.nav__actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--sand); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: block; }
[data-theme='dark'] .theme-toggle .icon-sun { display: none; }

.burger { display: none; }

@media (max-width: 900px) {
  .burger { display: grid; }
  .nav__links {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--divider);
    padding: 16px 24px 24px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 14px; font-size: 1rem; }
  /* Le bouton reste visible : c'est le seul accès à ioBOARD depuis l'en-tête,
     seul son libellé se raccourcit. */
  .btn__long { display: none; }
  .nav .btn--sm { padding: 9px 14px; }
  .nav .wordmark { font-size: 1.44rem; gap: 7px; }
  .nav .wordmark__embleme { height: 33px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(48px, 7vw, 88px);
  border-bottom: 1px solid var(--divider);
}
/* Le titre du hero partage la largeur avec la capture : plus petit que
   les h1 pleine largeur des autres pages, pour tenir en deux lignes. */
.hero h1 { font-size: clamp(2.1rem, 3.9vw, 3.35rem); }
.hero__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 940px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); }
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero__note {
  margin-top: 22px;
  font-size: .875rem;
  color: var(--muted);
}

/* Bandeau de chiffres */
.stats {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  overflow: hidden;
}
.stats > div { background: var(--card); padding: 26px 24px; }
.stats .num {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.1;
  margin-bottom: 6px;
}
.stats .num em { font-style: normal; color: var(--brand-text); }
.stats p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Sections alternées ---------- */
.split {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  grid-template-columns: 1fr;
  padding-block: clamp(44px, 6vw, 76px);
  border-top: 1px solid var(--divider);
}
.split:first-of-type { border-top: 0; }
@media (min-width: 940px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--reverse .split__visual { order: -1; }
}
.split__text h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }

/* ---------- Bandeau CTA ---------- */
.cta-band {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: clamp(36px, 5vw, 60px);
  text-align: center;
}
.cta-band h2 { margin-bottom: .35em; }
.cta-band .btn { margin-top: 22px; }

/* Card sombre (teaser ioBOARD) — reste sombre dans les deux thèmes */
.dark-card {
  background: #111827;
  color: var(--on-dark);
  border-radius: var(--r-card);
  border: 1px solid #1F2937;
  padding: clamp(32px, 5vw, 56px);
}
.dark-card h2, .dark-card h3 { color: #FFFFFF; }
.dark-card p { color: #9CA3AF; }
.dark-card .label { color: var(--brand); }
.dark-card .checks li { color: #D1D5DB; }
.dark-card .checks strong { color: #FFFFFF; }

/* ---------- Étapes numérotées ---------- */
.steps { counter-reset: step; display: grid; gap: var(--gap); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--divider);
  padding-top: 18px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--brand-text);
  margin-bottom: 8px;
}
.steps h3 { font-size: 1.1rem; margin-bottom: .3em; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ============================================================
   Captures de l'application
   ============================================================ */

/* Cadre de tablette autour d'une vraie capture d'écran */
.shot {
  background: #111827;
  border: 1px solid #1F2937;
  border-radius: 20px;
  padding: 10px;
  line-height: 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 11px;
}
.shot--hero {
  border-radius: 22px;
  padding: 11px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12); /* seule ombre du site */
}
.shot-legende {
  display: block;
  margin-top: 12px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ============================================================
   Maquettes produit — 100 % CSS, suivent le thème
   ============================================================ */

/* Pastilles de choix — dialogue d'accompagnements */
.pv__fams { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid var(--divider);
  font-size: 10px;
  color: var(--ink-soft);
}
.chip--on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Pavé numérique — écran d'identification */
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; max-width: 132px; }
.pad span {
  background: var(--sand-strong);
  border-radius: 7px;
  text-align: center;
  padding: 6px 0;
  font-size: 11px;
  color: var(--ink);
}

/* Schéma réseau multi-caisses */
.lan { display: grid; gap: 14px; justify-items: center; }
.lan__node {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 14px 20px;
  text-align: center;
  min-width: 150px;
}
.lan__node b { display: block; font-size: .95rem; font-weight: 500; }
.lan__node span { font-size: .78rem; color: var(--muted); }
.lan__node--master { border-color: var(--brand); border-width: 2px; }
.lan__pipe { width: 2px; height: 26px; background: var(--divider); }
.lan__row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Formulaire ---------- */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 620px) { .form-grid .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-input);
  border: 1px solid var(--divider);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { border-color: var(--brand-text); }
.field--error input, .field--error textarea { border-color: var(--btn); }
.field__err { display: block; margin-top: 6px; font-size: .8rem; color: var(--btn); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--ink-soft); }
.consent input { margin-top: 4px; accent-color: var(--btn); flex: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-radius: var(--r-input);
  padding: 14px 16px;
  font-size: .9rem;
  margin-bottom: 20px;
  border: 1px solid;
}
.alert--error { border-color: var(--btn); color: var(--btn); background: transparent; }
.alert--ok { border-color: var(--green); color: var(--green); background: transparent; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding-block: clamp(40px, 6vw, 64px) 28px;
}
.footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 36px;
}
.footer__grid h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer__grid li { margin-bottom: 9px; }
.footer__grid a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .92rem;
}
.footer__grid a:hover { color: var(--brand-text); }
.footer__brand p { font-size: .9rem; color: var(--muted); max-width: 30ch; margin-top: 12px; }
.footer__bottom {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted);
}
.footer__bottom a { color: var(--muted); text-decoration: none; }
.footer__bottom a:hover { color: var(--brand-text); }

/* Bouton qui se comporte comme un lien (pied de page) */
.lien-bouton {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--muted);
  cursor: pointer;
}
.lien-bouton:hover { color: var(--brand-text); }

/* ---------- Bandeau cookies ---------- */
.cookies {
  position: fixed;
  z-index: 100;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: 22px 24px;
}
.cookies[hidden] { display: none; }
.cookies__inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.cookies__texte { flex: 1 1 420px; }
.cookies__texte h2 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: .3em;
}
.cookies__texte h2:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; }
.cookies__texte p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cookies__texte a { color: var(--ink); }
/* Refuser et Accepter ont volontairement la même taille : refuser doit être
   aussi simple qu'accepter. */
.cookies__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookies__actions .btn { padding: 11px 24px; font-size: .9rem; }
@media (max-width: 560px) {
  .cookies { left: 10px; right: 10px; bottom: 10px; padding: 20px; }
  .cookies__actions { width: 100%; }
  .cookies__actions .btn { flex: 1; }
}

/* ---------- Apparition au défilement ---------- */
/* Masqué au départ uniquement si JavaScript peut le révéler ensuite :
   sans JS, le contenu s'affiche normalement au lieu de rester invisible. */
.js .reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .45s ease;
}
@media (prefers-reduced-motion: reduce) {
  /* Même spécificité que la règle ci-dessus, sinon elle ne l'emporterait pas. */
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Contenu éditorial (mentions légales) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 2em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1rem; }
.prose li { margin-bottom: .4em; }
