:root {
  --bg: #0b1020;
  --bg-soft: #121a30;
  --card: #151e38;
  --border: #243055;
  --text: #e7ecf8;
  --muted: #9aa7c7;
  --accent: #6366f1;
  --accent-2: #06b6d4;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 14px;
  --max: 1100px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fd;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --border: #dde3f2;
    --text: #0f172a;
    --muted: #55627f;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

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

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.logo:hover { text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.logo span span { color: var(--accent-2); }

.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer;
}

/* Hero */
.hero {
  padding: 90px 0 70px; text-align: center;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(99,102,241,.25), transparent),
    radial-gradient(600px 300px at 80% 10%, rgba(6,182,212,.2), transparent);
}
.eyebrow { color: var(--accent-2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); line-height: 1.1; margin: 0 0 18px; }
.gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { max-width: 620px; margin: 0 auto 28px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.stats { display: flex; gap: 40px; justify-content: center; margin: 44px 0 0; padding: 0; list-style: none; }
.stats strong { display: block; font-size: 1.8rem; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Buttons */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 10px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-sm { padding: 7px 14px; font-size: .9rem; }

/* Sections */
.section { padding: 70px 0; }
.section.alt { background: var(--bg-soft); }
.section h2 { font-size: 2rem; margin: 0 0 10px; }
.section-sub { color: var(--muted); margin: 0 0 30px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: .95rem;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 1.3rem;
}
.card-icon-img { object-fit: cover; background: none; }
.card { position: relative; }
/* Toute la tuile est cliquable via le premier lien */
.card-linked .card-actions a:first-child::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-title { margin: 6px 0 0; font-size: 1.2rem; }
.card-tagline { margin: 0; font-weight: 500; }
.card-desc { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 6px 0 0; }
.tags li { font-size: .75rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.badge { font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-disponible { background: rgba(34,197,94,.15); color: var(--ok); }
.badge-beta { background: rgba(245,158,11,.15); color: var(--warn); }
.badge-bientot { background: rgba(154,167,199,.18); color: var(--muted); }

.empty { color: var(--muted); text-align: center; }

/* About / contact */
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.skills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li { background: var(--card); border: 1px solid var(--border); padding: 6px 14px; border-radius: 10px; }
.contact-box { text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* 404 */
.center-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.center-page h1 { font-size: 5rem; margin: 0; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 20px; }
  .two-col { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

/* Pages de politique de confidentialité */
.policy { padding-top: 32px; padding-bottom: 64px; max-width: 760px; }
.policy h2 { margin-top: 28px; }
.policy li { margin-bottom: 8px; }
.policy a { color: var(--accent); }
.policy .muted { color: var(--muted); }
