:root {
  --bg: #ffffff;
  --surface: #f6f6f8;
  --surface-2: #ebebef;
  --text: #111111;
  --muted: #55555e;
  --accent: #c8102e;
  --accent-text: #ffffff;
  --border: #e2e2e8;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: .06em; white-space: nowrap; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: .95rem; }
nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 16px; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 28px; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.badge {
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px; font-size: .9rem; color: var(--muted);
}
.badge strong { color: var(--text); }

/* ---------- Recherche ---------- */
.search { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; flex-wrap: wrap; }
.search input {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 1rem; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.card[hidden] { display: none; }
.vide { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.vide p { margin: 0 0 10px; color: var(--muted); }
.vide p strong { color: var(--text); }
.vide .btn { display: inline-block; margin-top: 8px; text-decoration: none; }

/* ---------- Grille ---------- */
.grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  padding: 24px 0 72px;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: #c4c4cc; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.media { position: relative; aspect-ratio: 9/16; background: #000; }
.media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .wm {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; font-weight: 800; letter-spacing: .2em;
  font-size: clamp(1rem, 4.5vw, 1.4rem); color: rgba(255,255,255,.28); white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,.4); transform: rotate(-12deg);
}
.media .tag {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0,0,0,.65); padding: 3px 10px; border-radius: 6px; font-size: .8rem;
}
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.1rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-body .meta { font-size: .85rem; color: var(--accent); white-space: pre-wrap; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.specs span { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-size: .78rem; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.price { font-size: 1.4rem; font-weight: 800; }
.price small { font-size: .75rem; font-weight: 400; color: var(--muted); display: block; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-text);
  font-weight: 700; font-size: .95rem; padding: 11px 18px;
  border-radius: 10px; text-decoration: none; font-family: inherit;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* ---------- Sections ---------- */
section.info { padding: 56px 0; border-top: 1px solid var(--border); }
section.info h2 { margin-top: 0; }
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step b { color: var(--accent); font-size: 1.4rem; }
.step p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Page texte (licence) ---------- */
.doc { max-width: 780px; padding: 48px 16px 80px; }
.doc h1 { margin-top: 0; }
.doc h2 { margin-top: 36px; font-size: 1.2rem; color: var(--accent); }
.doc li { margin-bottom: 6px; }
.yes, .no { list-style: none; padding: 0; }
.yes li::before { content: "✓ "; color: #1a8a4a; font-weight: 700; }
.no li::before  { content: "✕ "; color: #c8102e; font-weight: 700; }
.note { background: var(--surface); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 8px; color: var(--muted); }

/* ---------- Modale ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  max-width: 520px; width: 100%; padding: 24px; max-height: 90vh; overflow: auto;
}
.modal h3 { margin: 0 0 4px; }
.modal .sub { color: var(--muted); margin: 0 0 16px; font-size: .93rem; }
.modal ul { padding-left: 18px; color: var(--muted); font-size: .93rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 12px 0; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .88rem; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }

@media (max-width: 600px) {
  nav a { margin-left: 12px; font-size: .85rem; }
  nav a[href="#fonctionnement"] { display: none; }
  .logo { font-size: 1.05rem; }
  .hero { padding: 48px 0 24px; }
}
