/* Claymorphism : surfaces douces et gonflées, grands rayons, double ombre interne + ombre portée. */
:root {
  --bg: #e8eef0; --card: #f6f9f9; --ink: #16202a; --muted: #4f5b66; --line: #d3dcdf;
  --accent: #0b6e78; --accent-2: #0e8591; --on-accent: #fff;
  --ok: #1d6b3a; --ok-bg: #dcefe2; --err: #a3271d; --err-bg: #f7dfdb;
  --radius: 26px; --radius-sm: 16px;
  /* ombres « argile » */
  --hi: rgba(255,255,255,.9); --lo: rgba(40,70,80,.12); --drop: rgba(40,70,80,.16);
  --clay: 10px 12px 24px var(--drop), inset -5px -6px 10px var(--lo), inset 5px 5px 10px var(--hi);
  --clay-sm: 5px 6px 12px var(--drop), inset -3px -3px 6px var(--lo), inset 3px 3px 6px var(--hi);
  --pressed: inset 4px 4px 8px var(--lo), inset -4px -4px 8px var(--hi);
  --btn: 6px 8px 16px rgba(11,110,120,.32), inset -4px -5px 8px rgba(0,0,0,.2), inset 4px 4px 8px rgba(255,255,255,.32);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a20; --card: #1b252d; --ink: #e8edf1; --muted: #a3afba; --line: #2c3842;
    --accent: #5cc6cf; --accent-2: #7fd6dd; --on-accent: #0b1a1d;
    --ok: #6fd39a; --ok-bg: #18301f; --err: #ff8a7d; --err-bg: #3a1c19;
    --hi: rgba(255,255,255,.07); --lo: rgba(0,0,0,.38); --drop: rgba(0,0,0,.5);
    --btn: 6px 8px 16px rgba(0,0,0,.45), inset -4px -5px 8px rgba(0,0,0,.22), inset 4px 4px 8px rgba(255,255,255,.35);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 12%, var(--bg)), transparent 60%),
              radial-gradient(900px 500px at 110% 10%, color-mix(in srgb, #c9a7e8 18%, var(--bg)), transparent 60%),
              var(--bg);
  font: 16px/1.55 "Nunito", "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }

/* En-tête : une barre d'argile flottante */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: 1000px; margin: 16px auto 0; padding: 12px 22px;
  background: var(--card); border-radius: 999px; box-shadow: var(--clay-sm);
}
.brand { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 15px; }
nav > a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; }
nav > a:hover { box-shadow: var(--pressed); }
.who { color: var(--muted); padding: 0 6px; }
main { max-width: 1000px; margin: 0 auto; padding: 36px 24px 64px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 28px 0 10px; font-weight: 750; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.intro { margin-bottom: 30px; }

/* Cartes projets */
.projects { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.project {
  background: var(--card); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column;
  box-shadow: var(--clay); transition: transform .2s ease, box-shadow .2s ease;
}
.project:hover { transform: translateY(-3px); }
.project h2 { margin: 0; font-size: 18px; }
.project h2 a { color: var(--ink); text-decoration: none; }
.project h2 a:hover { color: var(--accent); }
.project p { margin: 6px 0 0; }
.ph { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.org { color: var(--muted); font-size: 14px; }
.pf { margin-top: auto !important; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.go { font-weight: 700; text-decoration: none; padding: 6px 12px; border-radius: 999px; box-shadow: var(--pressed); }
.tag { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 3px 10px; color: var(--muted); white-space: nowrap; background: var(--bg); box-shadow: var(--pressed); }

/* Formulaires et blocs */
.narrow { max-width: 440px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--clay); }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin: 18px 0 26px; }
.row label { flex: 1 1 180px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
label.check { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  padding: 10px 14px; border: 0; border-radius: var(--radius-sm); background: var(--bg); color: var(--ink);
  font-weight: 400; min-height: 44px; box-shadow: var(--pressed);
}
input[type=checkbox] { min-height: 0; width: 20px; height: 20px; accent-color: var(--accent); box-shadow: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button, .btn {
  background: linear-gradient(160deg, var(--accent-2), var(--accent)); color: var(--on-accent); border: 0;
  border-radius: 999px; padding: 11px 22px; min-height: 44px; cursor: pointer; font-weight: 700; text-decoration: none;
  display: inline-block; box-shadow: var(--btn); transition: transform .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(1px); box-shadow: inset 3px 4px 8px rgba(0,0,0,.25); }
button.secondary { background: var(--err-bg); color: var(--err); box-shadow: var(--clay-sm); }
button.link { background: none; color: var(--accent); padding: 0; min-height: 0; font-weight: 600; text-decoration: underline; box-shadow: none; border-radius: 4px; }
button.link:hover, button.link:active { transform: none; box-shadow: none; }
form.inline { display: inline; }
.danger { margin-top: 36px; padding-top: 18px; border-top: 2px dashed var(--line); }
.note { padding: 12px 18px; border-radius: var(--radius-sm); font-weight: 600; box-shadow: var(--clay-sm); }
.note.ok { color: var(--ok); background: var(--ok-bg); }
.note.err { color: var(--err); background: var(--err-bg); }

/* Tableaux */
.table-wrap { overflow-x: auto; padding: 6px 14px 22px 6px; margin: 0 -14px 0 -6px; }
table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card);
  border-radius: var(--radius); overflow: hidden; font-size: 14px; box-shadow: var(--clay);
}
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
td select { min-height: 34px; padding: 4px 10px; border-radius: 12px; }
code { font-size: 13px; padding: 1px 6px; border-radius: 8px; background: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .project:hover, button:hover, .btn:hover, button:active, .btn:active { transform: none; }
}
@media (max-width: 640px) {
  .top { margin: 10px 10px 0; border-radius: var(--radius); }
}
