/* Thème coloré, moderne — surcharge app.css */
:root {
  --bg: #eef0fb; --card: rgba(255,255,255,.82); --line: rgba(99,102,241,.12);
  --accent: #5b5bf0; --accent2: #a855f7; --accent-soft: rgba(91,91,240,.11);
  --grad: linear-gradient(135deg, #4f6bff 0%, #8b5cf6 55%, #d946ef 100%);
  --shadow: 0 1px 2px rgba(30,27,75,.05), 0 12px 32px -8px rgba(79,70,229,.16);
  --ok: #059669; --ok-soft: #d1fae5; --warn: #b45309; --warn-soft: #fef3c7; --bad: #dc2626; --bad-soft: #fee2e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c1e; --card: rgba(30,32,64,.62); --line: rgba(148,150,255,.14);
    --accent: #8b8dff; --accent2: #c084fc; --accent-soft: rgba(139,141,255,.16);
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 16px 40px -12px rgba(0,0,0,.6);
    --ok: #34d399; --ok-soft: rgba(52,211,153,.14); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14); --bad: #f87171; --bad-soft: rgba(248,113,113,.15);
  }
}
body {
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(99,102,241,.28), transparent 60%),
    radial-gradient(800px 480px at 95% 5%, rgba(217,70,239,.20), transparent 60%),
    radial-gradient(900px 600px at 60% 105%, rgba(34,211,238,.18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
h1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card, .tile { backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid var(--line); }
.topbar { background: color-mix(in srgb, var(--bg) 65%, transparent); }
.brand { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.05rem; }
.brand svg { color: var(--accent); }
.nav a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -4px rgba(99,102,241,.55); }
.nav a:hover:not(.on) { background: var(--accent-soft); }
.btn { background: var(--grad); box-shadow: 0 8px 20px -6px rgba(99,102,241,.6); }
.btn:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 12px 26px -6px rgba(99,102,241,.7); }
.btn.ghost { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.danger { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
input, select, textarea { background: color-mix(in srgb, var(--accent) 6%, transparent); border: 1px solid var(--line); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card); }
.chip.on { background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px -4px rgba(99,102,241,.5); }
.chip:hover:not(.on) { border-color: var(--accent); }
.seg button.on.yes { background: var(--ok-soft); }
.seg button.on.no { background: var(--bad-soft); }
.seg button.on:not(.yes):not(.no) { background: var(--warn-soft); color: var(--warn); }
.steps li::before { background: var(--grad); color: #fff; box-shadow: 0 6px 14px -4px rgba(99,102,241,.5); }
.stat > div { background: var(--accent-soft); }
.stat b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.verdict { border: 1px solid transparent; box-shadow: var(--shadow); }
.verdict.ok { background: linear-gradient(135deg, var(--ok-soft), transparent 140%); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.verdict.warn { background: linear-gradient(135deg, var(--warn-soft), transparent 140%); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.verdict.bad { background: linear-gradient(135deg, var(--bad-soft), transparent 140%); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.verdict h3 { font-size: 1.35rem; }
.badge { background: linear-gradient(135deg, #fb7185, #f43f5e); box-shadow: 0 2px 8px rgba(244,63,94,.5); }
.pill { background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.list > *:hover { background: var(--accent-soft); border-radius: 12px; }
h2 { display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: var(--grad); }
dialog h2::before { display: none; }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 34px 30px 30px; color: #fff; background: var(--grad); box-shadow: 0 24px 50px -16px rgba(99,102,241,.6); margin-bottom: 26px; animation: rise .35s ease both; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; }
.hero::before { width: 320px; height: 320px; right: -80px; top: -140px; background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%); }
.hero::after { width: 240px; height: 240px; left: 35%; bottom: -150px; background: radial-gradient(circle, rgba(34,211,238,.55), transparent 70%); }
.hero h1 { background: none; color: #fff; -webkit-text-fill-color: #fff; margin: 0; font-size: clamp(1.8rem, 5vw, 2.7rem); position: relative; }
.hero p { color: rgba(255,255,255,.85); margin: 6px 0 22px; position: relative; }
.hero .search { position: relative; }
.hero .search input { box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); background: rgba(255,255,255,.96); color: #1e1b4b; border: 0; }
.hero .search svg { color: #6366f1; }

/* Tuiles colorées */
.tile { --c1: #4f6bff; --c2: #8b5cf6; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: 0; transition: opacity .25s; z-index: 0; }
.tile > * { position: relative; z-index: 1; transition: color .25s; }
.tile .ico { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 10px 20px -6px var(--c1); transition: transform .25s, background .25s; }
.tile:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 22px 40px -12px var(--c1); border-color: transparent; }
.tile:hover::before { opacity: 1; }
.tile:hover, .tile:hover small { color: #fff; }
.tile:hover .ico { background: rgba(255,255,255,.22); transform: rotate(-6deg) scale(1.08); box-shadow: none; }
.tile .badge { z-index: 2; }
.t-blue { --c1: #3b82f6; --c2: #06b6d4; }
.t-violet { --c1: #8b5cf6; --c2: #ec4899; }
.t-green { --c1: #10b981; --c2: #14b8a6; }
.t-orange { --c1: #f97316; --c2: #f59e0b; }
.t-pink { --c1: #ec4899; --c2: #f43f5e; }
.t-slate { --c1: #475569; --c2: #6366f1; }

/* Connexion */
.login { background: radial-gradient(700px 500px at 15% 10%, rgba(99,102,241,.55), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(217,70,239,.45), transparent 60%), radial-gradient(500px 400px at 85% 10%, rgba(34,211,238,.4), transparent 60%); }
.login .card { box-shadow: 0 30px 70px -20px rgba(79,70,229,.5); animation: rise .4s ease both; }

/* Cartes cliquables (Mod'Op, formations) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; border-radius: var(--radius); color: var(--text); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; }
.card-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); opacity: .55; transition: width .25s ease, opacity .25s; }
.card-item:hover { text-decoration: none; transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--card)); box-shadow: 0 18px 36px -14px rgba(99,102,241,.5); }
.card-item:hover::before { width: 100%; opacity: .1; }
.card-item > * { position: relative; }
.card-item b { font-size: 1.05rem; line-height: 1.3; }
.ci-top { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.ci-go { position: absolute; right: 16px; bottom: 12px; color: var(--accent); font-weight: 700; opacity: 0; transform: translateX(-6px); transition: all .2s; }
.card-item:hover .ci-go { opacity: 1; transform: none; }

/* Étapes du simulateur */
.step-h { margin: 28px 0 12px; }
.step-h::before { display: none; }
.step-n { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .95rem; box-shadow: 0 6px 14px -4px rgba(99,102,241,.55); }
.bloc + .bloc { margin-top: 16px; }
.callout { margin: 8px 0; padding: 12px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.seg.wrap { flex-wrap: wrap; }
.tile[disabled] { pointer-events: none; }
