/* ==========================================================================
   Webliner Jeux - Admin Dashboard Styles (admin.css)
   ========================================================================== */

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px 80px 16px;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-subtle);
}

.admin-title-wrap h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
}

.admin-title-wrap p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.admin-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.admin-tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-tab-btn.active {
    color: white;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb), 0.4);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grille de stats */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card-info h4 {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-card-info .stat-number {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Boîte de formulaire */
.admin-card-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
}

.section-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.2);
}

/* Sélecteur de Jeu Forcé */
.game-force-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.game-force-option {
    background: var(--bg-glass);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-force-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.game-force-option.active {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), 0.15);
    box-shadow: 0 4px 15px rgba(var(--brand-primary-rgb), 0.3);
}

.game-force-option .game-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.game-force-option span {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    display: block;
}

/* Tableau des Lots */
.prizes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 0.85rem;
}

.prizes-table th, .prizes-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

.prizes-table th {
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
}

.prizes-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.table-responsive {
    overflow-x: auto;
}

/* Validation de Coupon */
.voucher-lookup-box {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin-bottom: 20px;
}

/* Chevalet de Table Print Preview */
.table-tent-preview {
    background: #FFFFFF;
    color: #1E293B;
    border-radius: 16px;
    padding: 30px 24px;
    max-width: 380px;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 3px solid #F59E0B;
}

.table-tent-logo {
    font-size: 2.8rem;
    margin-bottom: 6px;
}

.table-tent-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.table-tent-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: #D97706;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.table-tent-qr {
    width: 170px;
    height: 170px;
    margin: 14px auto;
    padding: 10px;
    background: white;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-tent-qr img, .table-tent-qr canvas {
    max-width: 100%;
    max-height: 100%;
}

.table-tent-footer {
    font-size: 0.8rem;
    color: #6B7280;
    margin-top: 14px;
    line-height: 1.4;
}

/* Media Print pour impression directe du chevalet */
@media print {
    body * {
        visibility: hidden;
    }
    .table-tent-preview, .table-tent-preview * {
        visibility: visible;
    }
    .table-tent-preview {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        box-shadow: none;
        border: 2px solid #000000;
        width: 100%;
        max-width: 120mm;
    }
}
