:root { --bg: #f4f3ff; --card: #fff; --text: #1c1a33; --muted: #5d5a7a; --line: #e3e0f5; --accent: #4f46e5; --accent-2: #ecebff; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --bg: #12111c; --card: #1d1b2b; --text: #eeedf8; --muted: #b0add0; --line: #2e2b44; --accent: #8b85ff; --accent-2: #2a2750; color-scheme: dark; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; padding-bottom: env(safe-area-inset-bottom); }
.top { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left)); background: linear-gradient(120deg, #4f46e5, #9333ea); color: #fff; }
.top h1 { margin: 0; font-size: 20px; }
.top p { margin: 0; opacity: .85; font-size: 14px; }
.top > div:nth-child(2) { flex: 1; min-width: 0; }
.logo { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(255,255,255,.18); border-radius: 14px; }
nav { display: flex; gap: 6px; }
.lien { color: #fff; background: rgba(255,255,255,.18); border: 0; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }
main { max-width: 960px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left)); }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.tuile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 4px 14px rgba(60,40,160,.06); }
.tuile a.ouvrir { display: flex; flex-direction: column; align-items: center; gap: 8px; color: inherit; text-decoration: none; text-align: center; }
.ic { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 34px; background: var(--accent-2); overflow: hidden; }
.ic img { width: 100%; height: 100%; object-fit: cover; }
.tuile b { font-size: 16px; }
.tuile small { color: var(--muted); font-size: 13px; }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 11px 14px; background: var(--accent); color: #fff; cursor: pointer; min-height: 44px; }
.btn.sec { background: var(--accent-2); color: var(--accent); }
.btn.petit { padding: 8px 10px; font-size: 14px; min-height: 38px; }
.carte { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.erreur { background: #fde8e8; color: #8a1c1c; padding: 12px; border-radius: 12px; }
.hidden { display: none !important; }
dialog { border: 0; border-radius: 18px; padding: 18px; max-width: 420px; width: calc(100% - 32px); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog ol { padding-left: 20px; } dialog li { margin: 6px 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: center; }
.table th:first-child, .table td:first-child { text-align: left; }
.defile { overflow-x: auto; }
input, select { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); width: 100%; min-height: 44px; }
.ligne { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.ligne > input { flex: 1 1 160px; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 40px auto; animation: t 1s linear infinite; }
@keyframes t { to { transform: rotate(360deg); } }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
@media (max-width: 420px) { .top h1 { font-size: 17px; } .top p { font-size: 13px; } .logo { width: 40px; height: 40px; font-size: 24px; } .lien { padding: 6px 9px; font-size: 13px; } .top { gap: 8px; } }
.titre-gr { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 10px; }
@media (max-width: 420px) { .tuile { padding: 12px 10px; } .tuile small { font-size: 12px; } .ic { width: 56px; height: 56px; font-size: 30px; } }
