/* ============================================================
   LEAGUE OF SINS — style global
   Palette : encre prune, or hextech, cramoisi, parchemin
   Typo : Cinzel (display) / Inter (texte)
   ============================================================ */

:root {
  --ink: #0e0a0c;
  --panel: #171014;
  --panel-2: #1f151a;
  --line: #2e2129;
  --bone: #ede4d3;
  --muted: #9a8c7e;
  --gold: #c9a24b;
  --gold-bright: #e5c877;
  --blood: #a31621;
  --blood-soft: #c0303c;

  /* Les sept péchés */
  --superbia: #8a5bb8;  /* Orgueil */
  --invidia:  #4e8c5a;  /* Envie */
  --ira:      #b32430;  /* Colère */
  --acedia:   #6e93b0;  /* Paresse */
  --avaritia: #c9a24b;  /* Avarice */
  --gula:     #c96f2e;  /* Gourmandise */
  --luxuria:  #c34a6b;  /* Luxure */

  --radius: 6px;
  --font-display: "Cinzel", serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(163, 22, 33, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(201, 162, 75, 0.06), transparent 60%);
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.nav {
  border-bottom: 1px solid var(--line);
  background: rgba(14, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--bone);
}
.nav-logo em {
  font-style: normal;
  color: var(--blood-soft);
}
.nav-links { display: flex; gap: 28px; font-size: 0.9rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); }

/* ---------- Hero (accueil) ---------- */
.hero {
  text-align: center;
  padding: 96px 24px 64px;
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  letter-spacing: 0.1em;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(163, 22, 33, 0.35);
}
.hero h1 .sins { color: var(--blood-soft); }
.hero .tagline {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero .cta-row {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Bandeau des sept péchés (signature) ---------- */
.sins-band {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.sin-cell {
  padding: 22px 8px 18px;
  text-align: center;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.25s;
}
.sin-cell:last-child { border-right: none; }
.sin-cell::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--sin-color, var(--gold));
  opacity: 0.85;
}
.sin-cell:hover { background: var(--panel-2); }
.sin-latin {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--sin-color, var(--bone));
  display: block;
}
.sin-fr {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section h2 { font-size: 1.7rem; margin: 8px 0 20px; }
.section p.lead { color: var(--muted); max-width: 640px; }

.cards {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 1.05rem; color: var(--gold-bright); margin-bottom: 8px; }
.card p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
}
.btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, var(--blood-soft), var(--blood));
  color: var(--bone);
}
.btn-primary:hover { filter: brightness(1.15); color: #fff; }
.btn-gold {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-gold:hover { background: rgba(201, 162, 75, 0.12); color: var(--gold-bright); }
.btn-ghost { border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--bone); border-color: var(--muted); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-danger { border-color: var(--blood-soft); color: var(--blood-soft); }
.btn-danger:hover { background: rgba(163, 22, 33, 0.15); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input[type="text"], select {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--bone);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}
.field { margin-bottom: 18px; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }

.radio-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-card {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: var(--panel);
  transition: border-color 0.2s;
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card.selected { border-color: var(--gold); background: var(--panel-2); }
.radio-card .big { font-family: var(--font-display); font-size: 1.4rem; color: var(--gold-bright); display: block; }
.radio-card .small { font-size: 0.75rem; color: var(--muted); }

/* ---------- Panneaux appli ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--bone);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.t-list { display: grid; gap: 14px; }
.t-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.t-item .t-name { font-family: var(--font-display); font-size: 1.05rem; }
.t-item .t-meta { font-size: 0.8rem; color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
}
.badge-open { color: var(--acedia); border-color: var(--acedia); }
.badge-live { color: var(--gula); border-color: var(--gula); }
.badge-done { color: var(--invidia); border-color: var(--invidia); }

/* ---------- Équipes ---------- */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.team-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.team-card h4 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--gold-bright);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.team-card ul { list-style: none; margin-top: 10px; }
.team-card li {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(46, 33, 41, 0.6);
}
.team-card li .role { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.08em; }

/* ---------- Bracket ---------- */
.bracket-scroll { overflow-x: auto; padding-bottom: 12px; }
.bracket {
  display: flex;
  gap: 42px;
  min-width: max-content;
  padding: 10px 4px;
}
.round { display: flex; flex-direction: column; min-width: 220px; }
.round-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 14px;
}
.round-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  gap: 18px;
}
.match {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.match.decided { border-color: rgba(201, 162, 75, 0.45); }
.match-side {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.88rem;
}
.match-side + .match-side { border-top: 1px solid var(--line); }
.match-side .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-side.winner { background: rgba(201, 162, 75, 0.1); }
.match-side.winner .name { color: var(--gold-bright); font-weight: 600; }
.match-side.loser .name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(163,22,33,.7); }
.match-side .tbd { color: var(--line); font-style: italic; }
.score-input {
  width: 44px;
  text-align: center;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--bone);
  padding: 3px 0;
  font-size: 0.85rem;
}
.score-static { font-family: var(--font-display); color: var(--gold-bright); min-width: 24px; text-align: center; }
.match-actions { padding: 6px 10px; border-top: 1px solid var(--line); text-align: right; background: var(--panel); }

.champion-box {
  margin-top: 28px;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px;
  background:
    radial-gradient(ellipse at top, rgba(201, 162, 75, 0.12), transparent 70%),
    var(--panel);
}
.champion-box .eyebrow { color: var(--gold-bright); }
.champion-box .name {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-bright);
  text-shadow: 0 0 30px rgba(201, 162, 75, 0.4);
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
}
.tab.active { color: var(--gold-bright); border-bottom-color: var(--blood-soft); }

.hint { font-size: 0.82rem; color: var(--muted); }
.hidden { display: none !important; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
footer .sep { color: var(--blood-soft); margin: 0 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .sins-band { grid-template-columns: repeat(4, 1fr); }
  .sin-cell:nth-child(n+5) { border-top: 1px solid var(--line); }
  .nav-links { gap: 16px; }
  .panel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
