/* clan.deadland.org : charte « Patine » (docs/charte-graphique.md). Pensé téléphone d'abord (360 px), une colonne ;
   cibles tactiles >= 44 px ; textes de saisie en 16 px (pas de zoom iOS). */
@font-face { font-family: "Barlow Condensed"; src: url("/static/fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Arimo; src: url("/static/fonts/Arimo.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
:root { --charbon: #1C2021; --panneau: #292E30; --kaki: #343E2D; --olive: #56604B; --acier: #667075; --ivoire: #E5DFCE;
  --orange: #D66B2B; --sable: #C4AE8A; --rouge: #A8432F; --display: "Barlow Condensed", Impact, sans-serif;
  --body: Arimo, Arial, sans-serif; --tap: 44px; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--charbon); color: var(--ivoire); font: 16px/1.5 var(--body);
  overflow-x: hidden; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--panneau); }
.logo { height: auto; width: 130px; }
main { max-width: 760px; margin: 0 auto; padding: 16px 12px 48px; display: flex; flex-direction: column; gap: 22px; }
h1 { font: 700 34px/1 var(--display); letter-spacing: .03em; margin: 0; text-transform: uppercase; overflow-wrap: anywhere; }
h2 { font: 700 24px/1 var(--display); letter-spacing: .05em; margin: 0 0 10px; text-transform: uppercase; color: var(--sable); }
h2 small { color: var(--acier); font-size: 18px; margin-left: 6px; }
section { scroll-margin-top: 60px; }
section.center { display: flex; flex-direction: column; gap: 18px; text-align: center; max-width: 420px; margin: 32px auto 0; width: 100%; }
section.head { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--panneau); border-left: 3px solid var(--orange); padding: 8px 14px; display: flex; flex-direction: column; text-align: left; }
.card span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--acier); overflow-wrap: anywhere; }
.card b { font: 700 22px/1.2 var(--display); color: var(--sable); }

/* raccourcis de section, collés en haut au défilement */
.jump { position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; margin: 0 -12px; padding: 8px 12px;
  background: var(--charbon); border-bottom: 1px solid var(--panneau); }
.jump a { flex: 1; min-height: var(--tap); display: flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--ivoire); background: var(--panneau); font: 700 16px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }

/* cartes empilées : un membre, un rôle */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card-item { background: var(--panneau); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-item.me { border-left: 3px solid var(--orange); }
.top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name { font: 700 21px/1.2 var(--display); letter-spacing: .03em; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.top input { flex: 1; min-width: 0; }
.count { color: var(--acier); font: 700 18px/1 var(--display); min-width: 2ch; text-align: right; }
.tag { background: var(--kaki); color: var(--ivoire); padding: 4px 8px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* champs et boutons : pleine largeur et 44 px au doigt */
input, select { width: 100%; min-height: var(--tap); background: var(--charbon); color: var(--ivoire);
  border: 1px solid var(--acier); padding: 8px 10px; font: 16px var(--body); border-radius: 0; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sable) 50%),
  linear-gradient(135deg, var(--sable) 50%, transparent 50%); background-position: right 16px center, right 10px center;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, button:focus-visible, .toggle:focus-within { outline: 2px solid var(--orange); outline-offset: 1px; }
button, .btn { cursor: pointer; border: 0; min-height: var(--tap); padding: 10px 16px; font: 700 17px/1 var(--display);
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; background: var(--orange); color: var(--charbon); }
button.wide { width: 100%; }
.btn { display: flex; align-items: center; justify-content: center; padding: 14px; font-size: 20px; }
.btn.discord { background: #5865F2; color: #fff; }
button.ghost { background: transparent; color: var(--ivoire); border: 1px solid var(--acier); }
button.red { background: var(--rouge); color: var(--ivoire); }
.pick { display: flex; gap: 8px; }
.pick select { flex: 1; min-width: 0; }

/* droits : interrupteurs larges, une ligne chacun */
.perms { display: grid; grid-template-columns: 1fr; gap: 6px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap);
  padding: 6px 10px; background: var(--charbon); cursor: pointer; }
.toggle span { color: var(--ivoire); font-size: 15px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.toggle i { flex: none; position: relative; width: 48px; height: 28px; background: var(--acier); border-radius: 14px; transition: background .15s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ivoire); transition: transform .15s; }
.toggle input:checked + i { background: var(--orange); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle.locked { cursor: not-allowed; opacity: .55; }

/* enregistrer reste visible sous le pouce tant que la carte est à l'écran */
.save { position: sticky; bottom: 0; padding: 8px 0 2px; background: var(--panneau); }
.role-form { display: flex; flex-direction: column; gap: 10px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tools form { flex: 1; }
.tools button { width: 100%; }
details.danger { width: 100%; }
details.danger summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: #E08A7A;
  font: 700 16px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; list-style: none; }
details.danger summary::-webkit-details-marker { display: none; }
details.danger[open] summary { margin-bottom: 6px; }
.flash { margin: 0; padding: 12px 14px; background: var(--kaki); border-left: 3px solid var(--olive); }
.flash.err { background: #3A2622; border-left-color: var(--rouge); }

/* ordinateur : même charte, plus d'air, droits sur deux colonnes */
@media (min-width: 700px) {
  header { padding: 14px 24px; }
  .logo { width: 160px; }
  main { padding: 28px 16px 64px; gap: 28px; }
  h1 { font-size: 42px; }
  section.head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .jump { margin: 0; padding: 8px 0; }
  .perms { grid-template-columns: 1fr 1fr; }
  .card-item { padding: 14px 16px; }
  .tools form { flex: none; }
  .tools button { width: auto; }
  details.danger { width: auto; }
  .save { position: static; display: flex; justify-content: flex-end; }
  .save button.wide { width: auto; min-width: 180px; }
}
