@import "police.css";

/* ── Reset & Base ── */
* {
	margin: 0;
	border: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Inter', system-ui, sans-serif;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: #12100e;
	color: #ede8e0;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; }
h1 { color: white; }

/* ── Nav ── */
nav {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 2rem;
	background: #1a1814;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none;
	color: #ede8e0;
	margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-logo {
	display: block;
	width: 34px;
	height: 34px;
	background: #c8102e;
	-webkit-mask: url('../franco-suisse/images/logo.svg') center / contain no-repeat;
	mask: url('../franco-suisse/images/logo.svg') center / contain no-repeat;
	flex-shrink: 0;
}
.brand-text {
	font-family: 'Inter', sans-serif;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: #9a9080;
}
.brand-text strong {
	font-weight: 700;
	color: #ede8e0;
}
.nav-links {
	display: flex;
	gap: 0.25rem;
}
.nav-links a {
	padding: 0.5rem 1.25rem;
	border-radius: 9999px;
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 500;
	color: #9a9080;
	transition: all 0.2s;
}
.nav-links a:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-links a.active { color: white; background: #c8102e; }

/* ── Shared components ── */
.empty-state {
	text-align: center;
	padding: 3rem 1rem;
	color: #9a9080;
}
.empty-state a {
	color: #c8102e;
	text-decoration: none;
	font-weight: 600;
}
.empty-state a:hover {
	text-decoration: underline;
}

.toast {
	position: fixed;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	background: #c8102e;
	color: white;
	padding: 0.75rem 1.5rem;
	border-radius: 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	font-family: 'Inter', sans-serif;
	z-index: 100;
	transition: top 0.3s ease;
	box-shadow: 0 8px 30px rgba(200, 16, 46, 0.4);
	white-space: nowrap;
}
.toast.show {
	top: 1rem;
}

#sub {
	margin-top: 1.5rem;
	padding: 0.65rem 2.5rem;
	background: linear-gradient(135deg, #c8102e, #9b0a23);
	color: white;
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
	box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}
#sub:hover {
	box-shadow: 0 6px 25px rgba(200, 16, 46, 0.4);
	transform: translateY(-1px);
}

form {
	width: 100%;
	text-align: center;
}

/* ══════════════════════════════════
   Matches page
   ══════════════════════════════════ */

#affichage {
	width: 100%;
	padding: 2rem;
	background: linear-gradient(180deg, #231f1a 0%, #12100e 100%);
}

#tables {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	max-width: 1200px;
	margin: 0 auto;
}

.table-slot {
	flex: 1;
	min-width: 260px;
	max-width: 400px;
	padding: 1.5rem;
	border-radius: 1.25rem;
	text-align: center;
}
.table-slot.active {
	background: linear-gradient(135deg, #c8102e, #9b0a23);
	color: white;
	box-shadow: 0 12px 40px rgba(200, 16, 46, 0.25);
}
.table-slot.libre {
	background: #231f1a;
	border: 1px dashed rgba(255, 255, 255, 0.1);
}

.table-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.table-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
}
.table-match {
	font-size: 0.7rem;
	font-weight: 600;
	opacity: 0.7;
}
.table-status {
	font-size: 0.7rem;
	font-weight: 600;
	color: #7a7060;
}
.table-teams {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}
.table-team {
	font-size: 1rem;
	font-weight: 700;
}
.table-vs {
	font-size: 0.65rem;
	font-weight: 600;
	opacity: 0.6;
	padding: 0.15rem 0.4rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.25rem;
}
.table-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.table-dash {
	font-size: 1.25rem;
	font-weight: 600;
	opacity: 0.6;
}
.table-btn {
	padding: 0.55rem 2rem;
	background: rgba(0, 0, 0, 0.25);
	color: white;
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 9999px;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	border: 1px solid rgba(255, 255, 255, 0.15);
}
.table-btn:hover {
	background: rgba(0, 0, 0, 0.4);
	transform: translateY(-1px);
}
.table-btn-next {
	width: 100%;
	padding: 1rem;
	background: transparent;
	color: #9a9080;
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 0.75rem;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px dashed rgba(200, 16, 46, 0.3);
	line-height: 1.5;
}
.table-btn-next:hover {
	color: white;
	border-color: #c8102e;
	background: rgba(200, 16, 46, 0.06);
}
.table-btn-next .next-teams {
	font-size: 0.7rem;
	font-weight: 400;
	opacity: 0.7;
}
.table-done {
	color: #7a7060;
	font-size: 0.8rem;
	padding: 1rem 0;
}
.next-hint {
	font-size: 0.65rem;
	color: #7a7060;
	margin-top: 0.5rem;
	font-style: italic;
}

.buts {
	width: 72px;
	height: 56px;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	border-radius: 0.75rem;
	border: 2px solid rgba(255, 255, 255, 0.2);
	background: rgba(0, 0, 0, 0.2);
	color: white;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.buts:focus {
	border-color: rgba(255, 255, 255, 0.6);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.buts::-webkit-outer-spin-button,
.buts::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buts[type=number] { -moz-appearance: textfield; }

/* Match grid */
#lancer {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem;
	padding: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}
.matchs {
	position: relative;
	display: block;
	background: #231f1a;
	padding: 1rem 1.25rem;
	text-decoration: none;
	color: #ede8e0;
	text-align: center;
	border-radius: 0.875rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	transition: all 0.2s ease;
}
.matchs:hover {
	background: #2e2820;
	border-color: #c8102e;
	box-shadow: 0 4px 20px rgba(200, 16, 46, 0.15);
	transform: translateY(-2px);
	cursor: pointer;
}
.matchs strong {
	display: block;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #c8102e;
	margin-bottom: 0.5rem;
}
.cellule {
	color: #9a9080;
	font-weight: 400;
	font-size: 0.8rem;
	line-height: 1.6;
}
.matchs.played {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(34, 197, 94, 0.04);
}
.matchs.played strong { color: #22c55e; }
.matchs.played .score {
	font-size: 0.85rem;
	font-weight: 700;
	color: #22c55e;
	margin-top: 0.35rem;
}
.matchs.selected {
	border-color: #c8102e;
	box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.3);
}
.matchs.dq {
	opacity: 0.35;
	pointer-events: none;
}
.matchs.dq strong { color: #7a7060; }
.dq-badge {
	font-size: 0.6rem;
	font-weight: 700;
	color: #ef4444;
	letter-spacing: 0.08em;
	margin-top: 0.25rem;
}
.live-badge {
	font-size: 0.6rem;
	font-weight: 700;
	color: #f59e0b;
	letter-spacing: 0.06em;
	margin-top: 0.25rem;
}
.matchs.busy { opacity: 0.4; }
.matchs.busy:hover {
	transform: none;
	box-shadow: none;
	cursor: not-allowed;
}
.busy-badge {
	font-size: 0.6rem;
	font-weight: 600;
	color: #7a7060;
	margin-top: 0.25rem;
}
.matchs.priority {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(34, 197, 94, 0.04);
}
.matchs.priority strong { color: #22c55e; }
.matchs.priority::after {
	content: '★';
	position: absolute;
	top: 6px;
	right: 8px;
	font-size: 0.6rem;
	color: #22c55e;
}
.matchs.live {
	border-color: #f59e0b;
	box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3), 0 4px 20px rgba(245, 158, 11, 0.15);
	animation: livePulse 2s ease-in-out infinite;
}
.matchs.live strong { color: #f59e0b; }
.live-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	background: #f59e0b;
	border-radius: 50%;
	vertical-align: middle;
	margin-left: 4px;
	animation: blink 1.2s ease-in-out infinite;
}

/* ══════════════════════════════════
   Ranking page
   ══════════════════════════════════ */

.match.header,
.match:first-child {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	background: linear-gradient(135deg, #c8102e, #9b0a23);
	color: white;
	height: auto;
	padding: 1rem 1.5rem;
	line-height: 1.4;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	position: sticky;
	top: 0;
	z-index: 10;
	margin-top: 0;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.match {
	width: 100%;
	text-align: center;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	padding: 0.85rem 1.5rem;
	margin-top: 0;
	background: #231f1a;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	transition: background 0.15s;
	box-shadow: none;
}
.match:not(:first-child):hover { background: #2e2820; }
.match:nth-child(2) {
	background: rgba(255, 215, 0, 0.07);
	border-left: 3px solid #ffd700;
}
.match:nth-child(2) .nomequipe::before { content: '🥇 '; }
.match:nth-child(3) {
	background: rgba(192, 192, 192, 0.06);
	border-left: 3px solid #c0c0c0;
}
.match:nth-child(3) .nomequipe::before { content: '🥈 '; }
.match:nth-child(4) {
	background: rgba(205, 127, 50, 0.06);
	border-left: 3px solid #cd7f32;
}
.match:nth-child(4) .nomequipe::before { content: '🥉 '; }
.nomequipe {
	font-weight: 600;
	font-size: 0.9rem;
	text-align: left;
}
.bloc {
	font-size: 0.9rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.match:first-child .bloc,
.match:first-child strong.bloc { font-weight: 700; }

/* Live match banner (ranking) */
#liveMatch { order: -999999999999999998; }
.live-banner {
	background: linear-gradient(135deg, #231f1a, #2e2820);
	border: 1px solid rgba(245, 158, 11, 0.3);
	padding: 1.25rem 2rem;
	text-align: center;
	box-shadow: 0 8px 30px rgba(245, 158, 11, 0.1);
	animation: bannerGlow 3s ease-in-out infinite;
}
.live-indicator {
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: #f59e0b;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}
.live-dot-big {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #f59e0b;
	border-radius: 50%;
	animation: blink 1.2s ease-in-out infinite;
}
.live-tables-grid {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}
.live-table-card {
	flex: 1;
	min-width: 200px;
	max-width: 350px;
	padding: 1rem 1.25rem;
	border-radius: 0.75rem;
}
.live-table-card.active {
	background: rgba(245, 158, 11, 0.06);
	border: 1px solid rgba(245, 158, 11, 0.2);
}
.live-table-card.free {
	background: rgba(255, 255, 255, 0.02);
	border: 1px dashed rgba(255, 255, 255, 0.08);
}
.live-table-label {
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #7a7060;
	margin-bottom: 0.5rem;
}
.live-table-card.active .live-table-label { color: #f59e0b; }
.live-free {
	font-size: 0.85rem;
	color: #5a5040;
	padding: 0.5rem 0;
}
.live-teams {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}
.live-team {
	font-size: 1.1rem;
	font-weight: 700;
	color: white;
}
.live-vs {
	font-size: 0.65rem;
	font-weight: 600;
	color: #f59e0b;
	padding: 0.15rem 0.5rem;
	border: 1px solid rgba(245, 158, 11, 0.3);
	border-radius: 0.25rem;
}
.live-match-num {
	font-size: 0.65rem;
	color: #7a7060;
	margin-top: 0.4rem;
}

/* DQ section (ranking) */
.dq-section { margin-top: 1.5rem; }
.dq-label {
	display: block;
	padding: 0.6rem 1.5rem;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #ef4444;
	opacity: 0.7;
}
.match.dq { opacity: 0.35; }
.match.dq .nomequipe { text-decoration: line-through; }

/* ══════════════════════════════════
   Teams page
   ══════════════════════════════════ */

.content {
	flex: 1;
	display: grid;
	place-items: center;
}

#nbe {
	background: #231f1a;
	width: 420px;
	max-width: 90vw;
	padding: 2.5rem;
	border-radius: 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	text-align: center;
}
#nbe h1 {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-bottom: 2rem;
}
#nbe form { text-align: center; }

#nbEquipes {
	width: 80px;
	height: 56px;
	text-align: center;
	font-size: 1.5rem;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.1);
	color: white;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
#nbEquipes:focus {
	border-color: #c8102e;
	box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2);
}
#nbEquipes::-webkit-outer-spin-button,
#nbEquipes::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#nbEquipes[type=number] { -moz-appearance: textfield; }

#names {
	background: #231f1a;
	width: 480px;
	max-width: 90vw;
	padding: 2.5rem;
	border-radius: 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-height: 70vh;
	overflow-y: auto;
}
#names h1 {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-bottom: 1.5rem;
	text-align: center;
}
#names form { text-align: center; }
#names::-webkit-scrollbar { width: 6px; }
#names::-webkit-scrollbar-track { background: transparent; }
#names::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
}

#editPanel {
	background: #231f1a;
	width: 480px;
	max-width: 90vw;
	padding: 2.5rem;
	border-radius: 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-height: 80vh;
	overflow-y: auto;
	text-align: center;
}
#editPanel h1 {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-bottom: 1.5rem;
}
#editPanel form { text-align: center; }

.name-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}
.name-row label {
	font-size: 0.8rem;
	font-weight: 600;
	color: #c8102e;
	white-space: nowrap;
	min-width: 90px;
	text-align: right;
}
.name-row input[type="text"] {
	flex: 1;
	height: 40px;
	padding: 0 0.75rem;
	font-size: 0.85rem;
	font-family: 'Inter', sans-serif;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: white;
	outline: none;
	transition: border-color 0.2s;
}
.name-row input[type="text"]:focus { border-color: #c8102e; }

.separator {
	height: 1px;
	background: rgba(255, 255, 255, 0.08);
	margin: 1.5rem 0;
}
.btn-new {
	padding: 0.65rem 2.5rem;
	background: transparent;
	color: #9a9080;
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 500;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-new:hover {
	color: white;
	border-color: rgba(255, 255, 255, 0.25);
}
.btn-back {
	padding: 0.5rem 1.5rem;
	background: transparent;
	color: #9a9080;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-back:hover { color: white; }
.btn-add {
	display: block;
	width: 100%;
	padding: 0.6rem;
	margin: 1rem 0 0.5rem;
	background: transparent;
	color: #c8102e;
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 0.625rem;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px dashed rgba(200, 16, 46, 0.3);
}
.btn-add:hover {
	background: rgba(200, 16, 46, 0.06);
	border-color: rgba(200, 16, 46, 0.5);
}

.tables-config {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}
.tables-config label {
	font-size: 0.8rem;
	font-weight: 500;
	color: #9a9080;
}
.tables-config input {
	width: 56px;
	height: 40px;
	text-align: center;
	font-size: 1.1rem;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: white;
	outline: none;
}
.tables-config input:focus { border-color: #c8102e; }
.tables-config input::-webkit-outer-spin-button,
.tables-config input::-webkit-inner-spin-button { -webkit-appearance: none; }
.tables-config input[type=number] { -moz-appearance: textfield; }

.name-row.new-team label { color: #22c55e; }
.name-row.new-team input[type="text"] { border-color: rgba(34, 197, 94, 0.3); }

.btn-dq {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 0.5rem;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #7a7060;
	font-size: 0.85rem;
	cursor: pointer;
	transition: all 0.2s;
	font-family: 'Inter', sans-serif;
}
.btn-dq:hover {
	border-color: #ef4444;
	color: #ef4444;
	background: rgba(239, 68, 68, 0.08);
}
.btn-dq.is-dq {
	border-color: #22c55e;
	color: #22c55e;
}
.btn-dq.is-dq:hover { background: rgba(34, 197, 94, 0.08); }

.name-row.dq-team label {
	color: #7a7060;
	text-decoration: line-through;
}
.name-row.dq-team input[type="text"] {
	opacity: 0.4;
	text-decoration: line-through;
}

/* ══════════════════════════════════
   Finals page
   ══════════════════════════════════ */

#content {
	padding: 2.5rem 2rem 4rem;
	max-width: 1400px;
	margin: 0 auto;
}

.finals-config {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}
.finals-config h1 {
	font-size: 1.75rem;
	font-weight: 700;
	margin-bottom: 1.25rem;
	letter-spacing: -0.01em;
}
.config-info {
	color: #9a9080;
	font-size: 0.9rem;
	margin-bottom: 2rem;
}
.config-warning {
	background: rgba(245, 158, 11, 0.08);
	border: 1px solid rgba(245, 158, 11, 0.3);
	border-radius: 1rem;
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
	color: #fcd34d;
}
.config-warning p {
	font-size: 0.9rem;
	line-height: 1.5;
}
.warning-count {
	margin-top: 0.5rem;
	font-size: 0.8rem !important;
	color: #f59e0b;
}
.warning-count strong {
	color: #fbbf24;
	font-size: 1rem;
}

.format-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.85rem;
}
.format-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 1.5rem 1rem;
	background: #231f1a;
	color: #ede8e0;
	font-family: 'Inter', sans-serif;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 1rem;
	cursor: pointer;
	transition: all 0.2s ease;
}
.format-btn:hover:not(:disabled) {
	border-color: #c8102e;
	background: #2e2820;
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(200, 16, 46, 0.15);
}
.format-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.format-label { font-size: 0.95rem; font-weight: 700; }
.format-desc { font-size: 0.75rem; color: #9a9080; font-weight: 500; }
.format-note {
	margin-top: 0.4rem;
	font-size: 0.65rem;
	color: #7a7060;
	font-style: italic;
}

.finals-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	gap: 1rem;
	flex-wrap: wrap;
}
.finals-header h1 {
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.btn-reset {
	padding: 0.5rem 1.25rem;
	background: transparent;
	color: #9a9080;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 9999px;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: all 0.2s;
}
.btn-reset:hover {
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.5);
}

.bracket-wrap {
	overflow-x: auto;
	padding-bottom: 1rem;
}
.bracket {
	display: flex;
	gap: 2rem;
	min-width: min-content;
	align-items: stretch;
}
.bracket-round {
	display: flex;
	flex-direction: column;
	min-width: 220px;
	flex: 1;
}
.round-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #7a7060;
	text-align: center;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.round-matches {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	flex: 1;
	gap: 1rem;
}
.bracket-match {
	background: #231f1a;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 0.875rem;
	padding: 0.65rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	transition: all 0.2s;
}
.bracket-match.played {
	border-color: rgba(34, 197, 94, 0.25);
	background: rgba(34, 197, 94, 0.04);
}
.bracket-match.playable {
	border-color: rgba(200, 16, 46, 0.3);
	box-shadow: 0 0 0 1px rgba(200, 16, 46, 0.1), 0 4px 20px rgba(200, 16, 46, 0.08);
}
.bracket-team {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.75rem;
	background: rgba(255, 255, 255, 0.025);
	border-radius: 0.5rem;
	font-size: 0.85rem;
	min-height: 38px;
}
.bracket-team.empty { opacity: 0.4; font-style: italic; }
.bracket-team.winner {
	background: rgba(34, 197, 94, 0.12);
	color: #4ade80;
	font-weight: 700;
}
.bracket-team.loser { opacity: 0.5; }
.team-seed {
	font-size: 0.6rem;
	font-weight: 700;
	color: #7a7060;
	background: rgba(255, 255, 255, 0.05);
	padding: 0.15rem 0.4rem;
	border-radius: 0.35rem;
	letter-spacing: 0.04em;
}
.bracket-team.winner .team-seed {
	color: #4ade80;
	background: rgba(34, 197, 94, 0.15);
}
.team-name { flex: 1; font-weight: 600; }
.team-score {
	font-size: 1rem;
	font-weight: 800;
	color: #ede8e0;
	min-width: 1.5rem;
	text-align: right;
}
.bracket-team.winner .team-score { color: #4ade80; }

.bracket-form {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.4rem;
	padding-top: 0.55rem;
	border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.bf-input {
	width: 42px;
	height: 36px;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	border-radius: 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(0, 0, 0, 0.25);
	color: white;
	outline: none;
	transition: all 0.2s;
}
.bf-input:focus {
	border-color: #c8102e;
	box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.2);
}
.bf-input::-webkit-outer-spin-button,
.bf-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bf-input[type=number] { -moz-appearance: textfield; }
.bf-dash { color: #7a7060; font-weight: 600; }
.bf-validate {
	flex: 1;
	height: 36px;
	padding: 0 0.85rem;
	background: #c8102e;
	color: white;
	font-family: 'Inter', sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 0.5rem;
	cursor: pointer;
	border: 0;
	transition: all 0.2s;
}
.bf-validate:hover {
	background: #9b0a23;
	transform: translateY(-1px);
}

.champion-banner {
	margin: 3rem auto 0;
	max-width: 480px;
	padding: 2rem 2.5rem;
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(200, 16, 46, 0.15));
	border: 1px solid rgba(245, 158, 11, 0.4);
	border-radius: 1.25rem;
	text-align: center;
	box-shadow: 0 20px 60px rgba(245, 158, 11, 0.15);
	animation: championPulse 2.5s ease-in-out infinite;
}
.champion-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: #fbbf24;
	margin-bottom: 0.5rem;
}
.champion-name {
	font-size: 2rem;
	font-weight: 800;
	color: #fcd34d;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

/* ── Animations ── */
@keyframes livePulse {
	0%, 100% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3), 0 4px 20px rgba(245, 158, 11, 0.15); }
	50% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15), 0 4px 20px rgba(245, 158, 11, 0.05); }
}
@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.2; }
}
@keyframes bannerGlow {
	0%, 100% { border-color: rgba(245, 158, 11, 0.3); }
	50% { border-color: rgba(245, 158, 11, 0.12); }
}
@keyframes championPulse {
	0%, 100% { box-shadow: 0 20px 60px rgba(245, 158, 11, 0.15); }
	50% { box-shadow: 0 20px 80px rgba(245, 158, 11, 0.3); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
	nav {
		flex-wrap: wrap;
		padding: 0.65rem 1rem;
		gap: 0.5rem;
	}
	.nav-links {
		width: 100%;
		justify-content: center;
		gap: 0.15rem;
	}
	.nav-links a {
		padding: 0.4rem 0.75rem;
		font-size: 0.72rem;
	}
	#affichage { padding: 1rem; }
	#lancer { padding: 1rem; gap: 0.5rem; }
	#content { padding: 1.5rem 1rem 3rem; }
	.bracket-round { min-width: 200px; }
	.finals-config h1 { font-size: 1.4rem; }
	.champion-name { font-size: 1.5rem; }
	.content { display: block; }
	#editPanel, #names, #nbe {
		max-width: 100%;
		width: 100%;
		padding: 1.25rem;
		border-radius: 0;
		border: none;
		box-shadow: none;
		background: transparent;
		max-height: none;
		overflow-y: visible;
	}
	.name-row { flex-wrap: wrap; }
	.name-row label {
		min-width: unset;
		width: 100%;
		text-align: left;
		font-size: 0.72rem;
	}
	.name-row input[type="text"] { min-width: 0; }
}
