/* Page d'accueil de VizEA (/welcome). Style sobre : blanc, un bleu d'accent, cartes arrondies. Aucune ressource externe (CSP « self »). */
:root {
  --blue: #1a5fb4; --blue-dark: #14498a; --blue-light: #ebf2fa;
  --text: #1c2430; --grey: #6b7686; --border: #e4e7ec; --border-soft: #eef0f3; --bg: #f5f7fa; --green: #1a7f37;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; color: var(--text); background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Hiragino Sans", "Yu Gothic", "Microsoft YaHei", sans-serif;
}
/* Le contenu attend que la langue soit appliquee : pas de clignotement dans la mauvaise langue. */
body.pending { visibility: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---- barre du haut ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 500; color: var(--grey); }
.nav > a:not(.btn):hover { color: var(--text); }

.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--grey); cursor: pointer; border-radius: 6px; }
.lang-btn:hover { color: var(--text); background: var(--bg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; min-width: 190px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 30, 50, .15); }
.lang-menu[hidden] { display: none; }
.lang-menu li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text); }
.lang-menu li:hover, .lang-menu li:focus { background: var(--bg); outline: none; }
.lang-menu li[aria-selected="true"] { color: var(--blue); font-weight: 600; background: var(--blue-light); }

/* ---- boutons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 16px; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-sm { padding: 7px 16px; font-size: 14px; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(20, 30, 50, .15); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn:focus-visible, .lang-btn:focus-visible, .demo-tools button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- bandeau principal ---- */
.hero { padding: 56px 0 64px; border-bottom: 1px solid var(--border-soft); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 600; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.hero h1 { margin: 18px 0 16px; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.lead { font-size: 18px; color: var(--grey); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--border-soft); font-size: 13px; font-weight: 500; color: var(--grey); }
.checks li { display: inline-flex; align-items: center; gap: 6px; }
.checks svg { color: var(--green); }
.hero-shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 22px 50px rgba(20, 30, 50, .18); background: #fff; }

/* ---- sections ---- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg); }
.section-title { text-align: center; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.01em; }
.section-sub { text-align: center; color: var(--grey); margin: 10px auto 40px; max-width: 640px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }
.card .icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--blue-light); color: var(--blue); margin-bottom: 14px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--grey); }

.db { margin-top: 44px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); text-align: center; }
.db h3 { font-size: 15px; margin-bottom: 14px; }
.db-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; }
.chip .state { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #fff4e0; color: #9a5b00; }
.chip.ok { border-color: #bfe3c8; }
.chip.ok .state { background: #e3f4e8; color: var(--green); }
.note { margin-top: 14px; font-size: 13px; color: var(--grey); }

/* ---- interoperabilite ---- */
.io-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.io-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }
.io-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.io-head h3 { font-size: 16px; }
.io-head code { flex: none; padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); font: 12px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--grey); white-space: nowrap; }
.io-card p { font-size: 14px; color: var(--grey); flex: 1; }
.io-tags { display: flex; gap: 8px; }
.io-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 600; }
.io-tag .ico { display: inline-flex; }
.io-more { text-align: center; margin-top: 22px; }

/* ---- demo ---- */
.demo { position: relative; max-width: 1000px; margin: 0 auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 14px 40px rgba(20, 30, 50, .12); }
.demo-view { position: relative; height: min(560px, 70vh); overflow: hidden; cursor: grab; touch-action: none; background-color: #fff; background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 16px 16px; }
.demo-view.dragging { cursor: grabbing; }
.demo-view img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.demo-tools { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 2px 8px rgba(20, 30, 50, .12); }
.demo-tools button { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.demo-tools button:hover { background: var(--bg); }
.demo-caption { padding: 10px 14px; border-top: 1px solid var(--border); background: var(--bg); text-align: center; font-size: 12px; color: var(--grey); }

/* ---- etapes ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; position: relative; }
.steps li { text-align: center; padding: 0 12px; }
.steps .num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 14px; box-shadow: 0 0 0 6px var(--blue-light); }
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { font-size: 14px; color: var(--grey); }

/* ---- pied de page ---- */
.footer { border-top: 1px solid var(--border); padding: 22px 0; font-size: 13px; color: var(--grey); }
.footer-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; }
.footer a:hover { color: var(--text); }

/* ---- adaptation aux petits ecrans ---- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .cards, .io-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .nav { gap: 12px; }
  .nav > a[href="#demo"] { display: none; }
  .cards, .io-grid { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; }
  .section { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
