/* CRR Amiens - Electroacoustique : feuille de styles principale */

*, *::before, *::after { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:root {
  --accent: #7cf7d5;
  --accent-2: #8aa6ff;
  --warn: #ffcf66;
  --danger: #ff6b6b;
  --ok: #6dd6a0;

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;
  --space-10: 40px; --space-12: 48px; --space-14: 56px; --space-16: 64px;
  --space-18: 72px; --space-20: 80px; --space-24: 96px;

  --maxw: 1180px;
  --maxw-narrow: 860px;

  --font-body: "Maven Pro", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --h1: clamp(2.1rem, 1.25rem + 2.8vw, 3.4rem);
  --h2: clamp(1.55rem, 1.15rem + 1.4vw, 2.15rem);
  --h3: clamp(1.2rem, 1.02rem + 0.65vw, 1.45rem);
  --p: 1.03rem;
  --lh: 1.55;
  --grid-gap: 18px;
}

html { color-scheme: dark light; }

html[data-theme="dark"] {
  --page-base: #05070d;
  --bg: #070a10;
  --bg2: #070b14;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-2: rgba(255, 255, 255, 0.2);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.56);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --focus: 0 0 0 3px rgba(124, 247, 213, 0.28), 0 0 0 6px rgba(138, 166, 255, 0.18);
  --glow-purple: rgba(124, 58, 237, 0.2);
  --glow-cyan: rgba(0, 212, 255, 0.14);
  --glow-blue: rgba(37, 99, 235, 0.12);
  --glow-mint: rgba(124, 247, 213, 0.1);
  --grid-line: rgba(124, 58, 237, 0.07);
  --grid-line-2: rgba(0, 212, 255, 0.06);
  --header-border: rgba(124, 58, 237, 0.22);
  --panel-bg-top: rgba(16, 18, 30, 0.88);
  --panel-bg-bot: rgba(8, 10, 18, 0.94);
}

html[data-theme="light"] {
  --page-base: #f0f4fc;
  --bg: #f7f8fc;
  --bg2: #eef1fb;
  --surface: rgba(0, 0, 0, 0.04);
  --surface-2: rgba(0, 0, 0, 0.07);
  --stroke: rgba(0, 0, 0, 0.12);
  --stroke-2: rgba(0, 0, 0, 0.18);
  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.68);
  --faint: rgba(0, 0, 0, 0.54);
  --shadow: 0 16px 46px rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.08);
  --focus: 0 0 0 3px rgba(0, 120, 90, 0.25), 0 0 0 6px rgba(70, 80, 200, 0.15);
  --glow-purple: rgba(124, 58, 237, 0.08);
  --glow-cyan: rgba(0, 150, 180, 0.08);
  --glow-blue: rgba(37, 99, 235, 0.06);
  --glow-mint: rgba(0, 140, 120, 0.06);
  --grid-line: rgba(100, 80, 200, 0.07);
  --grid-line-2: rgba(0, 130, 160, 0.06);
  --header-border: rgba(100, 80, 200, 0.15);
  --panel-bg-top: rgba(255, 255, 255, 0.92);
  --panel-bg-bot: rgba(245, 247, 252, 0.96);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  line-height: var(--lh);
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 72% 58% at 18% 4%, var(--glow-purple) 0%, transparent 50%),
    radial-gradient(ellipse 55% 45% at 88% 28%, var(--glow-cyan) 0%, transparent 42%),
    radial-gradient(ellipse 54% 38% at 72% 88%, var(--glow-blue) 0%, transparent 48%),
    radial-gradient(ellipse 40% 32% at 50% 60%, var(--glow-mint) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-2) 1px, transparent 1px);
  background-size: 72px 72px;
}
html[data-theme="light"] body::after { opacity: 0.35; }

body > * { position: relative; z-index: 1; }

.wrap { width: min(var(--maxw), calc(100% - 2 * var(--space-6))); margin-inline: auto; }
.wrap.narrow { width: min(var(--maxw-narrow), calc(100% - 2 * var(--space-6))); }
.skip-link { position: absolute; top: var(--space-4); left: var(--space-4); z-index: 50; padding: 10px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text); transform: translateY(-200%); transition: transform 160ms ease; }
.skip-link:focus { transform: translateY(0); outline: none; box-shadow: var(--focus); }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.header-inner { display: flex; flex-direction: column; gap: var(--space-3); padding: 14px 0; }
.header-brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; flex: 1 1 240px; min-width: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 14px; box-shadow: 0 0 0 1px var(--stroke-2), var(--shadow-soft); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; line-height: 1.2; }
.brand-subtitle { font-size: 0.85rem; color: var(--muted); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 1 auto; justify-content: flex-end; }
.header-tools--inline { margin-left: auto; }
@media (max-width: 640px) {
  .header-tools { width: 100%; justify-content: flex-start; }
  .header-tools--inline { margin-left: 0; }
  .brand-title { font-size: 0.95rem; }
  .brand-subtitle { font-size: 0.78rem; }
}
.nav {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
  padding-top: var(--space-3);
  margin-top: 2px;
  border-top: 1px solid var(--stroke);
}
.nav-link {
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 160ms ease;
}
.nav-link:hover, .nav-link.active { background: var(--surface-2); border-color: var(--stroke); color: var(--text); }
.theme-switch { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface); }
.theme-switch button { appearance: none; border: none; background: transparent; padding: 6px 12px; border-radius: 999px; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.theme-switch button.active { background: var(--surface-2); color: var(--text); }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface); color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 0.84rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: all 160ms ease; }
.btn:hover { border-color: var(--stroke-2); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121e; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255,107,107,0.4); }
.btn.danger:hover { background: rgba(255,107,107,0.08); }
.btn.btn-sm { padding: 7px 12px; font-size: 0.74rem; }
.btn.block { width: 100%; }
.btn.ghost.active { background: var(--surface-2); border-color: var(--stroke); color: var(--text); box-shadow: inset 0 0 0 1px var(--stroke-2); }
.btn.primary.active { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav .btn.btn-sm { white-space: nowrap; }

/* ---------- FLASH ---------- */
.flash { padding: 12px 0; font-size: 0.95rem; border-bottom: 1px solid var(--stroke); }
.flash-success { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--text); }
.flash-error { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--text); }

/* ---------- HERO ---------- */
.hero { padding: var(--space-18) 0 var(--space-12); }
.hero-compact { padding: var(--space-14) 0 var(--space-10); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-10); align-items: center; }
.kicker { display: inline-block; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface); color: var(--muted); margin-bottom: var(--space-4); }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: var(--h1); line-height: 1.08; margin: 0 0 var(--space-5); letter-spacing: -0.01em; }
.hero-gradient { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 var(--space-6); }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-3); }
.stat { padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: linear-gradient(180deg, var(--panel-bg-top), var(--panel-bg-bot)); text-align: center; box-shadow: var(--shadow-soft); }
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-stats { grid-template-columns: 1fr 1fr 1fr; } }

/* Espacement entre le hero et la grille projets sur l'accueil */
.hero + .section { padding-top: var(--space-6); }
.section + .legacy-portfolio { padding-top: var(--space-4); }
section[id="projets"] { scroll-margin-top: 110px; }

/* ---------- SECTIONS ---------- */
.section { padding: var(--space-12) 0; }
section[id] { scroll-margin-top: 90px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--h2); margin: 0 0 var(--space-5); }
h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--h3); margin: 0 0 var(--space-3); }

/* ---------- FILTERS ---------- */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: var(--space-3); align-items: end; padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: linear-gradient(180deg, var(--panel-bg-top), var(--panel-bg-bot)); margin-bottom: var(--space-8); box-shadow: var(--shadow-soft); }
.filters .field.actions { display: flex; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--stroke); background: var(--surface); color: var(--text); transition: border-color 160ms ease, box-shadow 160ms ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--stroke-2); box-shadow: var(--focus); }
@media (max-width: 880px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .filters { grid-template-columns: 1fr; } }

/* ---------- CARDS ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-5); }
.project-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: linear-gradient(180deg, var(--panel-bg-top), var(--panel-bg-bot)); box-shadow: var(--shadow-soft); transition: all 200ms ease; }
.project-card:hover { transform: translateY(-3px); border-color: var(--stroke-2); box-shadow: var(--shadow); }
.project-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 0; line-height: 1.25; }
.project-card-desc { color: var(--muted); margin: 0; font-size: 0.95rem; }
.project-card-bot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: var(--space-3); border-top: 1px dashed var(--stroke); }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface); font-size: 0.74rem; font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tag-electroacoustique { color: #7cf7d5; border-color: rgba(124,247,213,0.35); background: rgba(124,247,213,0.08); }
.tag-video { color: #ff9bd0; border-color: rgba(255,155,208,0.35); background: rgba(255,155,208,0.08); }
.tag-ecrits { color: #ffcf66; border-color: rgba(255,207,102,0.35); background: rgba(255,207,102,0.08); }
.tag-mixte { color: #8aa6ff; border-color: rgba(138,166,255,0.35); background: rgba(138,166,255,0.08); }
.tag-temps_reel { color: #c4b5fd; border-color: rgba(196,181,253,0.35); background: rgba(196,181,253,0.08); }
.tag-link-out { color: #8dd4ff; border-color: rgba(141,212,255,0.4); background: rgba(141,212,255,0.1); }
.tag-embed { color: #b8a0ff; border-color: rgba(184,160,255,0.4); background: rgba(184,160,255,0.1); }

.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-family: var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--stroke); background: var(--surface); color: var(--muted); }
.status-published { color: var(--ok); border-color: rgba(109,214,160,0.4); background: rgba(109,214,160,0.08); }
.status-draft { color: var(--warn); border-color: rgba(255,207,102,0.4); background: rgba(255,207,102,0.08); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

.empty { padding: var(--space-12); text-align: center; border-radius: var(--radius-lg); border: 1px dashed var(--stroke); background: var(--surface); }

.group-title { margin-top: var(--space-10); margin-bottom: var(--space-4); font-family: var(--font-display); }

/* ---------- PROJECT PAGE ---------- */
.back-link { color: var(--muted); font-size: 0.9rem; display: inline-block; margin-bottom: var(--space-4); }
.back-link:hover { color: var(--text); }
.project-header { padding-bottom: var(--space-6); margin-bottom: var(--space-8); border-bottom: 1px solid var(--stroke); }
.project-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.project-title { font-family: var(--font-display); font-size: var(--h1); margin: 0 0 var(--space-3); line-height: 1.1; }
.prose { color: var(--text); font-size: 1.04rem; line-height: 1.7; }
.prose h2 { margin-top: var(--space-8); }
.prose h3 { margin-top: var(--space-6); }
.prose p { margin: 0 0 var(--space-4); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 var(--space-4); }
.prose blockquote { border-left: 3px solid var(--stroke-2); padding-left: var(--space-4); color: var(--muted); margin: var(--space-4) 0; }

.portfolio-embed-shell {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--surface);
  overflow: auto;
  max-width: 100%;
}
.portfolio-embed-shell img { max-width: 100%; height: auto; }
.file-list.compact { gap: var(--space-2); }
.file-item { padding: var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--stroke); background: var(--surface); display: flex; flex-direction: column; gap: var(--space-2); }
.file-item audio, .file-item video, .file-item img { width: 100%; border-radius: var(--radius-sm); }
.file-list.compact .file-item { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-3); }
.file-name { font-weight: 500; }

/* ---------- AUTH ---------- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 280px);
  padding: var(--space-12) var(--space-4);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--panel-bg-top), var(--panel-bg-bot));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(124, 247, 213, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(138, 166, 255, 0.10), transparent 60%);
}
.auth-card > * { position: relative; }
.auth-card h1 {
  font-family: var(--font-display);
  margin: 0 0 var(--space-3);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem);
  letter-spacing: -0.01em;
}
.auth-card .muted { margin: 0; }
.form { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-6); }
.form .field span { font-size: 0.78rem; }
.form .btn.primary.block { margin-top: var(--space-2); padding-top: 13px; padding-bottom: 13px; }
.form textarea { resize: vertical; min-height: 90px; }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.center.small { margin-top: var(--space-5); }
.center.small a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; }
.center.small a:hover { color: var(--accent-2); }

/* ---------- PANELS ---------- */
.panel-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-6); padding: var(--space-6) var(--space-4); max-width: var(--maxw); margin: 0 auto; }
@media (max-width: 880px) { .panel-layout { grid-template-columns: 1fr; } }
.panel-nav { padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: linear-gradient(180deg, var(--panel-bg-top), var(--panel-bg-bot)); display: flex; flex-direction: column; gap: 4px; height: fit-content; position: sticky; top: 100px; box-shadow: var(--shadow-soft); }
.panel-nav-title { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-3); }
.panel-nav a { padding: 9px 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-nav a:hover { background: var(--surface); color: var(--text); }
.panel-nav a.active { background: var(--surface-2); color: var(--text); }
.panel-nav-user { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--stroke); }
.user-name { font-weight: 600; }
.pill { background: var(--accent); color: #06121e; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.panel-content { padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: linear-gradient(180deg, var(--panel-bg-top), var(--panel-bg-bot)); box-shadow: var(--shadow-soft); }
.panel-content h1 { font-family: var(--font-display); margin: 0 0 var(--space-5); font-size: 1.7rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head h1.inline { display: inline; margin-left: var(--space-3); }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: var(--space-4); }
.kpi { padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: var(--surface); text-align: center; transition: all 160ms ease; }
.kpi:hover { border-color: var(--stroke-2); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.kpi-value { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi-label { color: var(--muted); margin-top: 4px; font-size: 0.9rem; }

.card-list { display: flex; flex-direction: column; gap: var(--space-3); }
.request-card { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--stroke); background: var(--surface); flex-wrap: wrap; }
.request-name { font-weight: 600; font-size: 1.05rem; }
.request-message { margin: var(--space-2) 0 0; color: var(--muted); font-style: italic; max-width: 60ch; }
.request-actions { display: flex; gap: 8px; }
.inline-form { display: inline; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--stroke); }
.data-table th { font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.data-table tr:hover td { background: var(--surface); }

/* ---------- EDIT PROJECT ---------- */
.edit-grid { display: grid; grid-template-columns: 1fr 380px; gap: var(--space-6); }
@media (max-width: 1080px) { .edit-grid { grid-template-columns: 1fr; } }
.mode-fieldset { border: 1px solid var(--stroke); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); margin: var(--space-5) 0; background: var(--surface); }
.mode-fieldset legend { padding: 0 8px; font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.radio-line { display: flex; gap: 10px; align-items: flex-start; margin: var(--space-3) 0; cursor: pointer; }
.radio-line input { margin-top: 4px; }
.radio-line span { flex: 1; }
.edit-side { padding: var(--space-5); border-radius: var(--radius-lg); border: 1px solid var(--stroke); background: var(--surface); display: flex; flex-direction: column; gap: var(--space-3); position: sticky; top: 100px; height: fit-content; max-height: calc(100vh - 120px); }
.chat { flex: 1 1 auto; overflow-y: auto; padding: var(--space-3); border-radius: var(--radius-md); background: rgba(0,0,0,0.18); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 8px; min-height: 300px; max-height: 50vh; }
html[data-theme="light"] .chat { background: rgba(0,0,0,0.04); }
.chat-msg { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.92rem; line-height: 1.5; max-width: 92%; word-wrap: break-word; white-space: pre-wrap; }
.chat-user { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121e; }
.chat-assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text); }
.chat-form { display: flex; flex-direction: column; gap: 8px; }
.chat-form textarea { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--stroke); background: var(--surface); color: var(--text); resize: vertical; }

.ai-hint { display: block; margin-top: 4px; }

/* ---------- FOOTER ---------- */
.site-footer { border-top: 1px solid var(--stroke); padding: var(--space-8) 0; margin-top: var(--space-16); color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.footer-row a { color: var(--muted); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-row a:hover { color: var(--text); }

::selection { background: rgba(124, 247, 213, 0.22); }
*:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

@media print {
  body { background: #fff !important; color: #000 !important; }
  body::before, body::after { display: none !important; }
  .site-header, .site-footer, .panel-nav, .skip-link { display: none !important; }
}
