/* =====================================================================
   Guilde — feuille de style
   Direction : noir et blanc, beaucoup d'air, typographie massive.
   Le calme vient de l'espace, la force vient de la typo. Zero couleur.
   ===================================================================== */

/* ---------- Jetons ---------- */
:root {
  --ink:        #0B0B0B;
  --paper:      #FFFFFF;
  --veil:       #F4F4F2;
  --line:       #DEDEDA;
  --muted:      #77776E;

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --stack:  clamp(56px, 9vw, 128px);
  --rule:   1px solid var(--line);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:   #F5F5F2;
    --paper: #0B0B0B;
    --veil:  #151514;
    --line:  #2A2A27;
    --muted: #8C8C84;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'liga' 1, 'kern' 1;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

p a, .prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
p a:hover, .prose a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.75rem, 11vw, 7.5rem);
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.h1 { font-size: clamp(2.1rem, 6vw, 4rem); }
.h2 { font-size: clamp(1.7rem, 4vw, 2.9rem); }
.h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.lede {
  font-size: clamp(1.0625rem, 1.7vw, 1.3125rem);
  line-height: 1.55;
  max-width: 60ch;
  color: var(--ink);
}

.muted { color: var(--muted); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.1em; }
.prose ul { margin: 0 0 1.3em; padding-left: 0; list-style: none; }
.prose li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.5em;
}
.prose li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 8px; height: 8px;
  background: var(--ink);
}
.prose h3 { margin: 2em 0 0.7em; }

/* ---------- Structure ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--stack); }
.section + .section { border-top: var(--rule); }
.section--veil { background: var(--veil); }

.grid { display: grid; gap: clamp(24px, 4vw, 56px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--aside { grid-template-columns: minmax(0, 1fr) 320px; }

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--aside { grid-template-columns: 1fr; }
}

.stack-sm > * + * { margin-top: 14px; }
.stack-md > * + * { margin-top: 28px; }
.stack-lg > * + * { margin-top: 48px; }

.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.row--between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- En-tete ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }

.nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 9px 13px;
  border: 1px solid transparent;
}
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

.nav__sep { width: 1px; height: 22px; background: var(--line); margin-inline: 8px; }

.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: var(--rule); }
  .nav a:hover { border-color: var(--line); }
  .nav__sep { display: none; }
  .masthead__inner { flex-wrap: wrap; padding-block: 14px; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 26px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--sm { padding: 10px 16px; font-size: 0.6875rem; }
.btn--full { width: 100%; }
.btn[disabled], .btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(64px, 11vw, 150px) var(--stack); }
.hero__title { margin-bottom: 32px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 26px;
  border-bottom: var(--rule);
  margin-bottom: 36px;
}

/* ---------- Signature : le compteur de places ---------- */
.counter {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.counter__pip {
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--ink);
  background: transparent;
  display: block;
}
.counter__pip.is-taken { background: var(--ink); }

.counter--lg .counter__pip { width: 15px; height: 15px; }

/* ---------- Ligne de quota ---------- */
.slots { border-top: var(--rule); }

.slot {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: var(--rule);
}
.slot__role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.slot__note {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 3px;
}
.slot__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--muted);
}
.slot.is-full .slot__count { color: var(--ink); }

@media (max-width: 560px) {
  .slot { grid-template-columns: 1fr auto; }
  .slot__count { grid-column: 1 / -1; }
}

/* ---------- Cartes de sortie ---------- */
.raids { border-top: var(--rule); }

.raid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
  padding: clamp(24px, 3.5vw, 40px) 0;
  border-bottom: var(--rule);
  transition: background .2s var(--ease), padding-inline .2s var(--ease);
}
.raid:hover {
  background: var(--veil);
  padding-inline: 18px;
}

.raid__date {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.9;
  text-align: center;
  border: 1.5px solid var(--ink);
  padding: 12px 6px 10px;
}
.raid__day   { display: block; font-size: 2.25rem; letter-spacing: -0.04em; }
.raid__month {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  margin-top: 4px;
}

.raid__title { font-size: clamp(1.3rem, 2.6vw, 1.9rem); margin-bottom: 10px; }
.raid__title a:hover { text-decoration: underline; text-underline-offset: 4px; }

.raid__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.raid__aside {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: 128px;
}

@media (max-width: 760px) {
  .raid { grid-template-columns: 68px minmax(0, 1fr); }
  .raid__aside { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .raid__day { font-size: 1.6rem; }
}

/* ---------- Etiquettes ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.tag--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Cartes generiques ---------- */
.card {
  border: 1px solid var(--line);
  padding: clamp(22px, 3vw, 32px);
  background: var(--paper);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--ink); }
a.card:hover { transform: translateY(-3px); }

.card__title { font-size: 1.1875rem; margin-bottom: 10px; }

/* ---------- Membres ---------- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.member {
  background: var(--paper);
  padding: 24px 22px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.member:hover { background: var(--ink); color: var(--paper); }
.member:hover .member__meta { color: var(--paper); }

.member__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  word-break: break-word;
}
.member__lvl {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.member__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}
.member__crown {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 10px;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Formulaires ---------- */
.form { max-width: 640px; }
.form--wide { max-width: 100%; }

.field { margin-bottom: 26px; }

.field label,
.legend {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}

.field .hint {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-top: 7px;
}

input[type="text"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 11px 2px;
  transition: background .15s var(--ease);
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 10px center, right 4px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  background: var(--veil);
  border-bottom-width: 2.5px;
}

.checks { display: flex; flex-wrap: wrap; gap: 8px; }

.check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 9px 15px;
  cursor: pointer;
  font-size: 0.875rem;
  user-select: none;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 12px; height: 12px;
  border: 1.5px solid var(--ink);
  flex: none;
}
.check input:checked ~ .check__box { background: var(--ink); }
.check:has(input:checked) { border-color: var(--ink); }
.check input:focus-visible ~ .check__box { outline: 2px solid var(--ink); outline-offset: 2px; }

.form__actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: var(--rule);
  margin-top: 34px;
}

/* ---------- Messages ---------- */
.notes { margin-bottom: 32px; }
.note {
  border-left: 4px solid var(--ink);
  background: var(--veil);
  padding: 15px 20px;
  font-size: 0.9375rem;
}
.note + .note { margin-top: 10px; }
.note--error { border-left-style: double; border-left-width: 6px; }

.empty {
  border: 1px dashed var(--line);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
}
.empty__title { font-size: 1.25rem; margin-bottom: 10px; }

/* ---------- Tableaux (admin) ---------- */
.table-scroll { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  padding: 0 16px 12px 0;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}
table.data td {
  padding: 14px 16px 14px 0;
  border-bottom: var(--rule);
  vertical-align: top;
}
table.data tbody tr:hover { background: var(--veil); }
table.data td:last-child, table.data th:last-child { padding-right: 0; }

.inline-form { display: inline; }

/* ---------- Chiffres cles ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1.5px solid var(--ink);
}
.figure { padding: 26px 0 0; }
.figure + .figure { border-left: var(--rule); padding-left: 26px; }
.figure__n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.figure__l {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
@media (max-width: 620px) {
  .figure + .figure { border-left: 0; padding-left: 0; border-top: var(--rule); }
}

/* ---------- Filtres ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding-bottom: 26px;
  border-bottom: var(--rule);
  margin-bottom: 8px;
}
.filters .field { margin: 0; min-width: 160px; flex: 1 1 160px; }
.filters .btn { flex: none; }

/* ---------- Pied de page ---------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(48px, 7vw, 88px);
  margin-top: var(--stack);
}
.foot a { color: var(--paper); }
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
}
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr; } }

.foot__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 0.95;
}
.foot__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 14px;
}
.foot__links { display: flex; flex-direction: column; gap: 9px; font-size: 0.9375rem; }
.foot__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot__bottom {
  margin-top: clamp(36px, 6vw, 64px);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.18);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ---------- Bandeau admin ---------- */
.adminbar {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.adminbar__inner { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; padding-block: 9px; }
.adminbar a { padding: 5px 10px; opacity: 0.6; }
.adminbar a:hover, .adminbar a[aria-current="page"] { opacity: 1; background: rgba(255,255,255,.14); }
.adminbar__brand { font-weight: 700; opacity: 1; margin-right: 12px; }

/* ---------- Animation d'entree ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .7s var(--ease) forwards;
}
.reveal:nth-child(2) { animation-delay: .07s; }
.reveal:nth-child(3) { animation-delay: .14s; }
.reveal:nth-child(4) { animation-delay: .21s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Divers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
