@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

:root {
  --ink: #111111;
  --ink-soft: #54474b;
  --paper: #f7f1eb;
  --paper-strong: #f1e4dc;
  --paper-glass: rgba(247, 241, 235, 0.92);
  --line: rgba(17, 17, 17, 0.14);
  --accent: #da5979;
  --accent-soft: #58b7d5;
  --accent-alt: #f4c3d0;
  --button-bg: #111111;
  --button-alt-bg: #da5979;
  --button-text: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  --radius: 28px;
  --pill: 999px;
}

* {
  box-sizing: border-box;
}


body {
  margin: 0;
  font-family: "Poppins", "Avenir Next", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0)),
    #f6f0ea;
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 30px;
  color: white;
  background:
    linear-gradient(180deg, rgba(11, 11, 11, 0.76), rgba(11, 11, 11, 0.46)),
    url("https://images.squarespace-cdn.com/content/v1/609e9b334e21fc304759e644/60060ca6-e739-4f92-b381-97b3cf46ad17/DJ-SET+a%CC%80+la+Friche+Gramont+-+LA+FRICHE+GOURMANDE.webp") center / cover no-repeat;
  box-shadow: var(--shadow);
}

header > div::before {
  content: "";
  display: block;
  width: min(260px, 34vw);
  height: 72px;
  margin-bottom: 16px;
  background: url("https://images.squarespace-cdn.com/content/v1/609e9b334e21fc304759e644/8f29b858-6188-4683-a71c-9021dbbfc50c/LA+FRICHE.png?format=1500w") left center / contain no-repeat;
}

header p {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

a,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--pill);
  color: var(--button-text);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  background: var(--button-alt-bg);
  cursor: pointer;
}

#exportLink,
#resultLink {
  background: var(--button-bg);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  background: white;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

article,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

article {
  padding: 22px;
}

article span {
  display: block;
  font-size: 42px;
  font-weight: 900;
}

article p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.panel {
  margin-top: 18px;
  padding: 20px;
}

.match-tools,
.match-form,
.result-form {
  display: grid;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.match-tools {
  grid-template-columns: 1fr auto auto;
}

.match-form {
  grid-template-columns: repeat(5, 1fr) auto;
}

.result-form {
  grid-template-columns: repeat(2, 160px) auto;
}

.match-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: #f7f1eb;
}

.match-row strong {
  display: block;
}

.match-row span {
  color: var(--ink-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--pill);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--accent);
}

.score-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.score-item {
  display: grid;
  grid-template-columns: 110px 1fr 60px 60px;
  align-items: center;
  gap: 12px;
}

.score-item em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.bar {
  height: 12px;
  border-radius: var(--pill);
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
}

th {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  main {
    padding: 18px;
  }

  header,
  .stats,
  .match-tools,
  .match-form,
  .result-form,
  .match-row {
    grid-template-columns: 1fr;
    display: grid;
  }
}

.admin-help ol {
  margin: 14px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.admin-help li,
.subtle {
  color: var(--ink-soft);
}

.subtle {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.match-form-head {
  grid-column: 1 / -1;
}

.inline-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.admin-message.error {
  color: #b43a3a;
}

.match-tools {
  grid-template-columns: 1fr auto auto;
}

.match-form {
  grid-template-columns: repeat(5, 1fr);
}

.match-row {
  grid-template-columns: 1fr auto;
  gap: 16px;
}

.match-row-main,
.match-row-head,
.match-row-actions {
  display: grid;
  gap: 10px;
}

.match-row-head {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.match-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-row-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--pill);
  background: rgba(0, 0, 0, 0.05);
}

.match-row-actions {
  grid-auto-flow: column;
  align-self: center;
}

.score-chip {
  color: var(--accent);
  font-weight: 800;
}

.is-light {
  color: var(--ink);
  background: white;
}

.is-danger {
  background: #b43a3a;
}

#cancelEditButton {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
}
