/* ==========================================================================
   Myrradiel — feuille de style publique
   Thème : fantasy sombre, accents arcanes (violet) et or.
   ========================================================================== */

:root {
  --bg: #0a0912;
  --bg-alt: #0e0c1b;
  --surface: #14112a;
  --surface-2: #1b1738;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ece9f8;
  --muted: #a5a2c0;
  --primary: #8b5cf6;
  --primary-strong: #7440ee;
  --primary-soft: rgba(139, 92, 246, 0.14);
  --gold: #e6c773;
  --teal: #2dd4bf;
  --danger: #f87171;
  --success: #4ade80;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font-title: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 50% -80px, rgba(139, 92, 246, 0.18), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img, svg { max-width: 100%; }
img { display: block; height: auto; }

a { color: #c4b5fd; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ddd6fe; }

h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.2; letter-spacing: 0.01em; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw + 0.5rem, 4rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 0.8rem, 2.5rem); }
.h2 { font-size: clamp(1.5rem, 2vw + 0.8rem, 2.1rem); }
.h3, h3 { font-size: 1.2rem; }
.h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: 0.9em; background: var(--surface-2); padding: 0.15em 0.45em; border-radius: 6px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: #1a1405; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2rem); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.mt { margin-top: 2rem; }
.stack { display: grid; gap: 1.25rem; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.65rem 1.2rem; border-radius: 10px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  --btn-bg: linear-gradient(135deg, #9d73ff, #6d3df0); --btn-fg: #fff; --btn-bd: transparent;
  box-shadow: 0 6px 24px rgba(124, 77, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(124, 77, 255, 0.5); }
.btn-outline { --btn-bg: rgba(255, 255, 255, 0.04); }
.btn-outline:hover { --btn-bg: rgba(255, 255, 255, 0.09); }
.btn-ghost { --btn-bd: transparent; --btn-fg: #d8d3f3; }
.btn-ghost:hover { --btn-bg: var(--primary-soft); }
.btn-discord { --btn-bg: #5865f2; --btn-fg: #fff; --btn-bd: transparent; }
.btn-discord:hover { --btn-bg: #4752d6; }
.btn-danger { --btn-bg: rgba(248, 113, 113, 0.14); --btn-fg: #fecaca; --btn-bd: rgba(248, 113, 113, 0.45); }
.btn-danger:hover { --btn-bg: rgba(248, 113, 113, 0.28); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; border-radius: 9px; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.02rem; border-radius: 12px; }
.btn-icon { padding: 0.55rem; aspect-ratio: 1; --btn-bg: rgba(255, 255, 255, 0.04); }
.btn-icon .icon { width: 1.25rem; height: 1.25rem; }
.block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.center-row { justify-content: center; }

.badge {
  display: inline-block; padding: 0.35rem 0.95rem; border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.4); background: var(--primary-soft); color: #d4c6ff;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.2rem;
}
.badge-warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); color: #fde68a; margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--text); }
.brand:hover { color: #fff; }
.brand-mark { width: 2.1rem; height: 2.1rem; filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.55)); }
.brand-name { font-family: var(--font-title); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.06em; margin: 0; }

.nav-desktop { display: none; align-items: center; gap: 0.2rem; }
.nav-desktop a, .dropdown-menu > a, .dropdown-menu button {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.93rem;
  padding: 0.5rem 0.8rem; border-radius: 8px; transition: color 0.15s, background-color 0.15s;
}
.nav-desktop a:hover, .nav-desktop a[aria-current='page'] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-desktop a[aria-current='page'] { color: #fff; }
.nav-cta { color: var(--gold) !important; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 13rem; z-index: 60;
  display: grid; gap: 0.15rem; padding: 0.4rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow);
}
.dropdown-menu > a, .dropdown-menu button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: 0.93rem; cursor: pointer;
}
.dropdown-menu > a:hover, .dropdown-menu button:hover { background: var(--primary-soft); color: var(--text); }
.dropdown-menu form { margin: 0; }

.user-chip { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.75rem 0.3rem 0.3rem; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.user-chip img, .avatar-fallback { width: 1.75rem; height: 1.75rem; border-radius: 50%; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem; }
.user-name { font-size: 0.88rem; font-weight: 600; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .user-name { display: none; } .user-chip { padding: 0.25rem; } }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .mobile-menu { display: none; }
}

.flashes { display: grid; gap: 0.5rem; margin-top: 1rem; }
.flash {
  margin: 0; padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 0.95rem;
}
.flash-success { border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.flash-error { border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.09); }
.flash-info { border-color: rgba(139, 92, 246, 0.45); background: var(--primary-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; min-height: min(86vh, 760px); display: grid; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(10, 9, 18, 0.35), rgba(10, 9, 18, 0.88)),
    linear-gradient(to bottom, rgba(10, 9, 18, 0.55), transparent 35%, var(--bg) 100%);
}
.motes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-content { text-align: center; padding-block: 6rem 5rem; max-width: 56rem; }
.hero h1 { text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6); background: linear-gradient(180deg, #fff 30%, #d9ccff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.02rem, 0.6vw + 0.95rem, 1.2rem); color: #cfcbe6; max-width: 46rem; margin-inline: auto; text-wrap: balance; }
.hero .btn-row { justify-content: center; }
.connect { margin-top: 1.6rem; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-alt { background: linear-gradient(to bottom, transparent, var(--bg-alt) 12%, var(--bg-alt) 88%, transparent); }
.section-head { max-width: 46rem; margin: 0 auto 2.6rem; text-align: center; }
.section-head-row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; text-align: left; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.6rem; }

.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) 1rem; text-align: center; background: radial-gradient(60% 100% at 50% 0, rgba(139, 92, 246, 0.16), transparent); }
.page-hero h1 { font-size: clamp(2rem, 4vw + 0.5rem, 3.2rem); }
.page-hero .social-list { justify-content: center; margin-top: 1.4rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover { border-color: rgba(139, 92, 246, 0.5); transform: translateY(-3px); box-shadow: 0 14px 40px rgba(88, 50, 180, 0.2); }
.feature h3 { margin-bottom: 0.45rem; }
.feature p { margin: 0; font-size: 0.95rem; }
.feature-icon {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem;
  border-radius: 12px; background: var(--primary-soft); border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 1.4rem; color: #c4b5fd;
}
.feature-icon.big { width: 3.6rem; height: 3.6rem; font-size: 1.7rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); counter-reset: s; }
.steps li { position: relative; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.025); }
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; font-size: 0.93rem; }
.step-n {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: 0.9rem; border-radius: 50%;
  font-family: var(--font-title); font-weight: 700; color: #1a1405; background: linear-gradient(135deg, #f3dc9a, var(--gold));
}

.cta-band {
  text-align: center; padding: clamp(2rem, 5vw, 3.5rem) 1.5rem; border-radius: 22px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: radial-gradient(80% 140% at 50% 0, rgba(139, 92, 246, 0.25), transparent), var(--surface);
}
.cta-band .muted { max-width: 34rem; margin-inline: auto; }

/* ---------- Publications ---------- */
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-card:hover { border-color: rgba(139, 92, 246, 0.5); transform: translateY(-3px); }
.post-thumb { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--primary-soft), var(--surface-2)); color: #8f86b8; }
.post-thumb-fallback .icon { width: 3.4rem; height: 3.4rem; }
.platform-badge {
  position: absolute; left: 0.7rem; top: 0.7rem; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; color: #fff;
  background: rgba(10, 9, 18, 0.72); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.platform-badge .icon { width: 0.95rem; height: 0.95rem; }
.pin-badge { position: absolute; right: 0.7rem; top: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; color: #1a1405; background: var(--gold); }
.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center;
  width: 3.4rem; height: 3.4rem; border-radius: 50%; color: #fff; background: rgba(10, 9, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: scale 0.25s ease;
}
.post-card:hover .play { scale: 1.12; }
.card-body { padding: 1rem 1.15rem 1.2rem; }
.card-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0 0 0.35rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--muted); }
.card-body p.muted { font-size: 0.88rem; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; justify-content: center; }
.chip { padding: 0.4rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.chip:hover { color: var(--text); border-color: var(--primary); }
.chip[aria-current] { background: var(--primary-soft); border-color: var(--primary); color: #fff; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2.2rem; }
.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

.social-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1rem 0 0; }

/* ---------- Galerie ---------- */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.gallery-grid-lg { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.shot { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; aspect-ratio: 16 / 9; color: #fff; font: inherit; text-align: left; text-decoration: none; }
a.shot { cursor: pointer; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.shot:hover img { transform: scale(1.06); }
.shot-caption {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem 0.9rem 0.7rem; font-size: 0.88rem; font-weight: 500;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s;
}
.shot:hover .shot-caption, .shot:focus-visible .shot-caption { opacity: 1; transform: none; }
.shot-caption small { color: #cfc8ee; }
@media (hover: none) { .shot-caption { opacity: 1; transform: none; } }

.lightbox { padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--text); max-width: min(96vw, 1200px); max-height: 94vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(5, 4, 12, 0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; }
.lightbox img { max-width: 100%; max-height: 80vh; margin: 0 auto; object-fit: contain; }
.lightbox figcaption { padding: 0.8rem 1.2rem; }
.lightbox form { position: absolute; right: 0.6rem; top: 0.6rem; margin: 0; }

.my-shots { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.my-shots li { display: flex; align-items: center; gap: 0.8rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 10px; }
.my-shots img { border-radius: 6px; width: 96px; height: 54px; object-fit: cover; }
.my-shots li > span:nth-of-type(1) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--line-strong); }
.status-approved, .status-accepted { color: #bbf7d0; border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.1); }
.status-pending { color: #fde68a; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); }
.status-rejected, .status-refused { color: #fecaca; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.1); }

/* ---------- Prose, FAQ, règlement ---------- */
.prose p { font-size: 1.06rem; color: #d3cfe8; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose-wrap { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .prose-wrap { grid-template-columns: 1fr 20rem; gap: 3rem; } .aside-card { position: sticky; top: 6rem; } }
.checklist { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 0.6rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: baseline; }
.checklist .icon { color: var(--success); }

.accordion { display: grid; gap: 0.7rem; }
.acc { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.025); overflow: hidden; }
.acc summary { list-style: none; cursor: pointer; padding: 1rem 3rem 1rem 1.2rem; font-weight: 600; position: relative; transition: background-color 0.2s; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: rgba(255, 255, 255, 0.04); }
.acc summary::after { content: '+'; position: absolute; right: 1.2rem; top: 50%; translate: 0 -50%; font-size: 1.4rem; color: var(--muted); transition: rotate 0.25s; }
.acc[open] summary::after { rotate: 45deg; }
.acc[open] { border-color: rgba(139, 92, 246, 0.4); }
.acc > :not(summary) { margin: 0; padding: 0 1.2rem 1.1rem; }
.acc > p + p { padding-top: 0; }

.rules-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .rules-layout { grid-template-columns: 15rem 1fr; } .rules-nav { position: sticky; top: 6rem; } }
.rules-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.rules-nav a { display: block; padding: 0.4rem 0.6rem; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.rules-nav a:hover { background: var(--primary-soft); color: var(--text); }
.rules-group + .rules-group { margin-top: 2.2rem; }
.footer-title { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 0.8rem; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 1.2rem; }
.form-row { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row:has(#age) { grid-template-columns: 1fr 10rem; } }
.field { display: grid; gap: 0.4rem; position: relative; }
.field label, .field > .label { font-weight: 600; font-size: 0.92rem; }
.hint { font-size: 0.82rem; color: var(--muted); }
input[type='text'], input[type='number'], input[type='url'], input[type='date'], input[type='file'], select, textarea {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(8, 7, 18, 0.6); color: var(--text); font: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; min-height: 6rem; }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.28); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25); }
input[type='file'] { padding: 0.55rem; }
input[type='file']::file-selector-button { margin-right: 0.8rem; padding: 0.4rem 0.9rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }

/* Validation affichée seulement après interaction (:user-invalid) */
input:user-invalid, textarea:user-invalid, select:user-invalid, [aria-invalid='true'] { border-color: var(--danger); background-color: rgba(248, 113, 113, 0.07); }
input:user-valid:not([type='checkbox']):not([type='radio']):not([type='file']), textarea:user-valid { border-color: rgba(74, 222, 128, 0.5); }
.field-error { margin: 0; color: #fca5a5; font-size: 0.85rem; }
.field-error::before { content: '⚠ '; }
.counter { position: absolute; right: 0.2rem; top: 0.1rem; font-size: 0.75rem; color: var(--muted); }
.counter.is-low { color: var(--warn); }

.check { display: flex !important; gap: 0.7rem; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--primary); width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; }

/* ---------- Auth / notices ---------- */
.auth-card { text-align: center; display: grid; gap: 1rem; justify-items: center; padding: 2.2rem 1.6rem; }
.auth-card p { margin: 0; }
.dev-login { width: 100%; text-align: left; border-top: 1px dashed var(--line-strong); padding-top: 1.2rem; margin-top: 0.4rem; }
.center-card { text-align: center; display: grid; gap: 1rem; justify-items: center; }
.notice { display: grid; gap: 0.9rem; justify-items: start; }
.notice > * { margin: 0; }
.notice-success { border-color: rgba(74, 222, 128, 0.4); background: linear-gradient(180deg, rgba(74, 222, 128, 0.08), rgba(255, 255, 255, 0.02)); }
.notice-warn { border-color: rgba(251, 191, 36, 0.35); }
.staff-comment { margin: 0; padding: 0.8rem 1rem; border-left: 3px solid var(--gold); background: rgba(230, 199, 115, 0.07); border-radius: 0 10px 10px 0; color: #e8e3f8; white-space: pre-wrap; }
.summary-list { display: grid; gap: 0.3rem; margin: 0; padding: 0 1.2rem 1rem; }
.summary-list dt { font-weight: 600; color: var(--gold); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.8rem; }
.summary-list dd { margin: 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin: 0 0 2rem; padding: 0; counter-reset: st; }
.stepper-item { position: relative; display: grid; justify-items: center; gap: 0.45rem; text-align: center; font-size: 0.82rem; color: var(--muted); }
.stepper-item::before { content: ''; position: absolute; top: 1.1rem; left: calc(-50% + 1.4rem); right: calc(50% + 1.4rem); height: 2px; background: var(--line-strong); }
.stepper-item:first-child::before { display: none; }
.stepper-item.is-done::before, .stepper-item.is-current::before { background: var(--primary); }
.stepper-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg); font-weight: 700; font-size: 0.9rem; }
.stepper-dot .icon { width: 1.05rem; height: 1.05rem; }
.is-done .stepper-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.is-current .stepper-dot { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px rgba(230, 199, 115, 0.15); }
.is-current .stepper-label { color: var(--text); font-weight: 600; }

/* ---------- QCM ---------- */
.qcm-head { margin-bottom: 1.6rem; text-align: center; }
.qcm { display: grid; gap: 1.2rem; }
.qcm-q { margin: 0; min-width: 0; display: grid; gap: 1rem; padding: 1.5rem; }
.qcm-legend { display: flex; justify-content: space-between; gap: 1rem; width: 100%; padding: 0; float: left; margin-bottom: 0.2rem; }
.qcm-legend + * { clear: both; }
.qcm-num { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.qcm-cat { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.6rem; margin-left: auto; }
.qcm-text { font-size: 1.15rem; font-weight: 600; margin: 0; }
.options { display: grid; gap: 0.6rem; }
.option { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; background: rgba(8, 7, 18, 0.4); transition: border-color 0.15s, background-color 0.15s; }
.option:hover { border-color: rgba(139, 92, 246, 0.6); background: var(--primary-soft); }
.option:has(input:checked) { border-color: var(--primary); background: rgba(139, 92, 246, 0.2); }
.option:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.qcm-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.qcm-progress-track { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.qcm-progress-bar { height: 100%; width: calc(var(--p) * 1%); background: linear-gradient(90deg, var(--primary), var(--gold)); transition: width 0.3s ease; }
.qcm.is-stepper .qcm-q:not(.is-active) { display: none; }
.qcm.is-stepper [data-submit] { display: none; }
.qcm.is-stepper.on-last [data-submit] { display: inline-flex; }
.qcm.is-stepper.on-last [data-next] { display: none; }
.qcm-nav [hidden] { display: none !important; }

.score-ring {
  --size: 8rem; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring, var(--primary)) calc(var(--p) * 1%), var(--line) 0);
}
.score-ring::before { content: ''; position: absolute; inset: 0.55rem; border-radius: 50%; background: var(--surface); }
.score-ring span { position: relative; font-family: var(--font-title); font-weight: 700; font-size: 2.2rem; }
.score-ring small { font-size: 1rem; color: var(--muted); }
.notice-success .score-ring { --ring: var(--success); }
.notice-warn .score-ring { --ring: var(--warn); }
.missed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.missed-list p { margin: 0 0 0.4rem; }
.missed-list p:last-child { margin: 0; }

.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.plain-list li { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.danger-zone { border-color: rgba(248, 113, 113, 0.3); }

.error-section { padding-block: 6rem; }
.error-code { font-family: var(--font-title); font-size: clamp(5rem, 14vw, 9rem); line-height: 1; margin: 0; background: linear-gradient(180deg, #c4b5fd, #5b3bb0); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-grid { display: grid; gap: 2rem; padding-block: 3rem 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid li a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.footer-grid li a:hover { color: var(--text); }
.footer-grid .social-list { flex-direction: row; display: flex; gap: 0.5rem; }
.footer-brand .muted { max-width: 22rem; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.2rem 2rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.footer-legal p { margin: 0; }

/* ---------- Animations d'apparition (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    @keyframes reveal { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0; } }
  }
  .hero-content > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-content > :nth-child(2) { animation-delay: 0.08s; }
  .hero-content > :nth-child(3) { animation-delay: 0.16s; }
  .hero-content > :nth-child(4) { animation-delay: 0.24s; }
  .hero-content > :nth-child(5) { animation-delay: 0.32s; }
  @keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0; } }
}
