/* Même identité que corentin-wolff.com, version utilitaire */
:root{
  --bg:#f6f8f8; --surface:#ffffff; --fg:#1b2427; --muted:#5b6a70; --line:#dbe3e5;
  --accent:#17607a; --accent-soft:#e3eff3; --ok:#2f7d4f; --err:#b3261e; --err-soft:#fbeaea;
  --display:"Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --body:"Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono:"JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark){:root{
  --bg:#101618; --surface:#162024; --fg:#e4ecee; --muted:#93a4aa; --line:#26343a;
  --accent:#6fbcd6; --accent-soft:#1a2e36; --ok:#6cc391; --err:#f2b8b5; --err-soft:#3a1f1e;
  color-scheme:dark}}

*{box-sizing:border-box}
body{margin:0; background:var(--bg); color:var(--fg); font:400 1rem/1.6 var(--body);
  padding-left:max(16px, env(safe-area-inset-left,0px)); padding-right:max(16px, env(safe-area-inset-right,0px))}
a{color:var(--accent); text-underline-offset:3px}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

.top{max-width:40rem; margin:0 auto; padding-block:1rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; border-bottom:1px solid var(--line)}
.brand{display:flex; align-items:center; gap:.6rem; font:600 1rem var(--display); color:var(--fg); text-decoration:none}
.mark{width:28px; height:28px; border-radius:6px; background:var(--accent); color:var(--bg); display:grid; place-items:center; font:700 .8rem var(--mono)}
.top small{color:var(--muted); font-family:var(--mono); font-size:.8rem}

main{max-width:40rem; margin:0 auto; padding-block:2.5rem 3rem; display:flex; flex-direction:column; gap:1.5rem}
h1{font:600 1.9rem/1.2 var(--display); margin:0}
p{margin:0}
.muted{color:var(--muted)}

.panel{background:var(--surface); border:1px solid var(--line); border-radius:6px}
.panel > header{padding:.8rem 1.2rem; border-bottom:1px solid var(--line); font:600 1rem var(--display); color:var(--accent); background:var(--accent-soft); border-radius:6px 6px 0 0}
form{padding:1.2rem; display:flex; flex-direction:column; gap:1rem}
label{display:flex; flex-direction:column; gap:.3rem; font-size:.9rem; font-weight:700}
input{font:inherit; font-weight:400; padding:.6rem .7rem; border:1px solid var(--line); border-radius:4px; background:var(--bg); color:var(--fg); width:100%}
input.code{font-family:var(--mono); letter-spacing:.08em; text-transform:uppercase}
.row{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem}
.links{display:flex; flex-direction:column; gap:.2rem; font-size:.95rem}
button{font:600 1rem var(--display); padding:.6rem 1.3rem; border:0; border-radius:4px; background:var(--accent); color:var(--bg); cursor:pointer}
button:disabled{opacity:.6; cursor:wait}
button.ghost{background:transparent; color:var(--accent); border:1px solid var(--accent)}

.msg{padding:.7rem .9rem; border-radius:4px; font-size:.95rem}
.msg.err{background:var(--err-soft); color:var(--err)}
.msg.ok{background:var(--accent-soft); color:var(--ok)}

.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.intro{display:flex; flex-direction:column; gap:.3rem}

/* Liste des ressources */
.tools{display:flex; flex-direction:column; gap:.8rem}
.chips{display:flex; flex-wrap:wrap; gap:.4rem}
.chip{font:500 .8rem var(--mono); padding:.3rem .65rem; border:1px solid var(--line); border-radius:4px; background:var(--surface); color:var(--muted); cursor:pointer}
.chip[aria-pressed="true"]{background:var(--accent-soft); color:var(--accent); border-color:var(--accent)}
.list{display:flex; flex-direction:column; gap:2rem}
.group{display:flex; flex-direction:column; gap:.6rem}
.group h2{font:600 1.15rem var(--display); margin:0; padding-bottom:.4rem; border-bottom:1px solid var(--line)}
.items{list-style:none; margin:0; padding:0; display:flex; flex-direction:column}
.item{display:flex; flex-direction:column; gap:.15rem; padding:.75rem 0; border-bottom:1px solid var(--line); text-decoration:none; color:var(--fg)}
.items li:last-child .item{border-bottom:0}
.item:hover .item-title{color:var(--accent); text-decoration:underline; text-underline-offset:3px}
.item-title{font-weight:700}
.item-sum{color:var(--muted); font-size:.95rem}
.item-date{font:400 .75rem var(--mono); color:var(--muted)}

/* Lecture d'un article */
.meta{font:500 .8rem var(--mono); color:var(--muted); text-transform:uppercase; letter-spacing:.05em}
.lede{font-size:1.1rem; color:var(--muted)}
article{display:flex; flex-direction:column; gap:.8rem; min-width:0}
.prose{min-width:0; overflow-wrap:anywhere}
.prose > * + *{margin-top:1rem}
.prose h2{font:600 1.4rem/1.25 var(--display); margin-top:2rem}
.prose h3{font:600 1.15rem/1.3 var(--display); margin-top:1.5rem}
.prose p, .prose ul, .prose ol{margin-bottom:0}
.prose li + li{margin-top:.3rem}
.prose code{font:.88em var(--mono); background:var(--accent-soft); padding:.1em .35em; border-radius:3px}
.prose pre{font:.85rem/1.55 var(--mono); background:var(--surface); border:1px solid var(--line); border-radius:6px; padding:1rem; overflow-x:auto}
.prose pre code{background:none; padding:0; font-size:inherit}
.prose blockquote{margin-left:0; padding-left:1rem; border-left:3px solid var(--accent); color:var(--muted)}
.prose img{max-width:100%; height:auto; border-radius:4px; border:1px solid var(--line)}
.prose table{border-collapse:collapse; display:block; overflow-x:auto; font-size:.95rem}
.prose th, .prose td{border:1px solid var(--line); padding:.4rem .6rem; text-align:left}
.prose hr{border:0; border-top:1px solid var(--line)}

footer{max-width:40rem; margin:0 auto; border-top:1px solid var(--line); padding-block:1.2rem; color:var(--muted); font-size:.85rem; text-align:center}
