/* ============================================================
   ASED ACADÉMIE TOURNOIS - PWA MOBILE FIRST
   assets/css/app.css
   ============================================================ */

:root {
    --bg: #f4f6f8;
    --dark: #050505;
    --dark-2: #111827;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --gold: #d4af37;
    --gold-dark: #a77d18;
    --blue: #5bbcff;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #f97316;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 82px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
}

.page-header {
    background: linear-gradient(135deg, #050505 0%, #111827 60%, #1f2937 100%);
    color: #ffffff;
    padding: 22px 16px 28px;
    border-radius: 0 0 26px 26px;
    box-shadow: var(--shadow);
}

.page-header-inner {
    max-width: 980px;
    margin: 0 auto;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--gold);
    color: #050505;
    display: grid;
    place-items: center;
    font-weight: 900;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.logo-text {
    line-height: 1.1;
}

.logo-text strong {
    display: block;
    font-size: 17px;
    color: var(--gold);
}

.logo-text span {
    font-size: 12px;
    color: #d1d5db;
}

.hero-title {
    margin: 22px 0 8px;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.hero-subtitle {
    margin: 0;
    color: #d1d5db;
    font-size: 15px;
    line-height: 1.5;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}

.card-dark {
    background: linear-gradient(135deg, #050505, #111827);
    color: #ffffff;
    border-color: #1f2937;
}

.card-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 850;
}

.card-subtitle {
    margin: -6px 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.card-dark .card-subtitle {
    color: #d1d5db;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 900;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #f3f4f6;
    color: #374151;
}

.badge-gold {
    background: rgba(212, 175, 55, 0.15);
    color: #7c5c10;
}

.badge-green {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.badge-red {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.badge-blue {
    background: rgba(91, 188, 255, 0.14);
    color: #075985;
}

.badge-orange {
    background: rgba(249, 115, 22, 0.14);
    color: #9a3412;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gold);
    color: #111827;
}

.btn-dark {
    background: #111827;
    color: #ffffff;
}

.btn-outline {
    background: #ffffff;
    color: #111827;
    border: 1px solid var(--line);
}

.btn-danger {
    background: var(--red);
    color: #ffffff;
}

.btn-success {
    background: var(--green);
    color: #ffffff;
}

.btn-full {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 800;
}

.input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    padding: 11px 12px;
    font-size: 15px;
    color: var(--text);
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.help-text {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.form-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.45;
}

.form-check input {
    margin-top: 3px;
}

.alert {
    border-radius: 14px;
    padding: 13px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-success {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.25);
    color: #166534;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #991b1b;
}

.alert-warning {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.25);
    color: #9a3412;
}

.alert-info {
    background: rgba(91, 188, 255, 0.12);
    border: 1px solid rgba(91, 188, 255, 0.3);
    color: #075985;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #374151;
    background: #f9fafb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:last-child td {
    border-bottom: 0;
}

.team-logo {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #f3f4f6;
}

.event-card {
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), transparent 40%);
    pointer-events: none;
}

.event-card > * {
    position: relative;
}

.event-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 14px 0;
}

.meta-item {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    color: #374151;
    font-size: 14px;
}

.meta-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.18);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.match-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.match-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    font-weight: 850;
}

.match-team-right {
    text-align: right;
}

.match-score {
    min-width: 54px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    font-weight: 900;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #050505;
    border-top: 1px solid #1f2937;
    z-index: 50;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-inner {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.nav-item {
    color: #d1d5db;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    padding: 8px 4px;
    border-radius: 12px;
}

.nav-item span:first-child {
    font-size: 18px;
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.16);
    color: var(--gold);
}

.admin-layout {
    min-height: 100vh;
}

.admin-topbar {
    background: #050505;
    color: #ffffff;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid #1f2937;
}

.admin-topbar-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.admin-title {
    font-weight: 900;
    color: var(--gold);
}

.admin-user {
    font-size: 12px;
    color: #d1d5db;
}

.login-page {
    min-height: 100vh;
    padding: 24px 16px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top, rgba(212, 175, 55, 0.18), transparent 34%),
        linear-gradient(135deg, #050505 0%, #111827 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0,0,0,0.28);
    padding: 22px;
}

.login-brand {
    text-align: center;
    margin-bottom: 18px;
}

.login-brand .logo-mark {
    margin: 0 auto 10px;
}

.login-brand h1 {
    margin: 0;
    font-size: 24px;
}

.login-brand p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 26px 16px;
    color: var(--muted);
}

.empty-state strong {
    display: block;
    color: var(--text);
    font-size: 18px;
    margin-bottom: 6px;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f9fafb;
}

.file-preview img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
}

.small {
    font-size: 12px;
    color: var(--muted);
}

.text-muted {
    color: var(--muted);
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

@media (min-width: 720px) {
    body {
        padding-bottom: 0;
    }

    .container {
        padding: 24px;
    }

    .hero-title {
        font-size: 44px;
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn-row {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .btn-row .btn {
        width: auto;
    }

    .event-meta {
        grid-template-columns: repeat(2, 1fr);
    }

    .bottom-nav {
        display: none;
    }
}
.site-logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: #0f172a;
    padding: 3px;
    flex-shrink: 0;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text strong {
    color: #d4af37;
    font-size: 16px;
    font-weight: 800;
}

.logo-text span {
    color: #ffffff;
    font-size: 13px;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .site-logo-img {
        width: 46px;
        height: 46px;
    }

    .logo-text strong {
        font-size: 15px;
    }

    .logo-text span {
        font-size: 12px;
    }
}