/**
 * Style Laser Game - Thème Dragon Ball Z
 * Version améliorée avec toutes les fonctionnalités
 */

:root {
    --orange: #ff6b00;
    --orange-dark: #e65c00;
    --blue: #0066cc;
    --blue-dark: #0052a3;
    --white: #ffffff;
    --gray: #2a2a2a;
    --dark: #1a1a1a;
    --darker: #0d0d0d;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
}

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

body {
    font-family: 'Arial', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a0f00 100%);
    color: var(--white);
    min-height: 100vh;
    padding: 20px;
}

/* === CONTENEURS === */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.login-container {
    max-width: 450px;
    margin: 50px auto;
}

/* === HEADER === */
.header {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
    flex-wrap: wrap;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 900;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    flex: 1;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
    width: 100%;
    margin-top: 10px;
}

/* === CARDS === */
.card {
    background: var(--gray);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 107, 0, 0.1);
}

.card h2 {
    color: var(--orange);
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 10px;
}

.card h3 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--gray) 0%, var(--dark) 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid var(--orange);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.4);
}

.stat-card h3 {
    font-size: 3em;
    color: var(--orange);
    margin-bottom: 10px;
    font-weight: 900;
}

.stat-card p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* === BOUTONS === */
.btn {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #229954 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #2980b9 100%);
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

/* === FORMULAIRES === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--orange);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid var(--dark);
    background: var(--dark);
    color: var(--white);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
}

/* === TABS === */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--dark);
}

.tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--orange);
}

.tab.active {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    border-left: 5px solid;
}

.alert-success {
    background: rgba(39, 174, 96, 0.2);
    border-color: var(--success);
    color: #2ecc71;
}

.alert-error {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--danger);
    color: #e74c3c;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.2);
    border-color: var(--warning);
    color: #f39c12;
}

.alert-info {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--info);
    color: #3498db;
}

/* === LISTE UTILISATEURS === */
.search-bar input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--dark);
    background: var(--dark);
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
}

.user-list {
    max-height: 600px;
    overflow-y: auto;
}

.user-item {
    background: var(--dark);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.user-item:hover {
    border-color: var(--orange);
    transform: translateX(5px);
}

.user-info h3 {
    margin-bottom: 5px;
    color: var(--white);
}

.user-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

/* === BADGES === */
.points-badge {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 1.1em;
}

.points-badge.max {
    background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
    animation: pulse 2s infinite;
}

.level-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9em;
    margin-left: 10px;
}

.level-bronze { background: #cd7f32; }
.level-silver { background: #c0c0c0; color: #000; }
.level-gold { background: #ffd700; color: #000; }
.level-platinum { background: #e5e4e2; color: #000; }
.level-diamond { background: linear-gradient(135deg, #b9f2ff 0%, #00d4ff 100%); color: #000; }

/* === RÉCOMPENSES === */
.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.reward-card {
    background: var(--dark);
    border: 3px solid var(--orange);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.reward-card:hover:not(.disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.4);
}

.reward-card.disabled {
    opacity: 0.5;
    border-color: #555;
}

.reward-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.reward-card .price {
    font-size: 2em;
    color: var(--orange);
    font-weight: 900;
    margin: 15px 0;
}

.reward-card .stock-info {
    font-size: 0.85em;
    color: var(--warning);
    margin-top: 10px;
}

/* === HISTORIQUE === */
.history-item {
    background: var(--dark);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--orange);
}

.history-item.retrait {
    border-left-color: var(--danger);
}

.history-item.expiration {
    border-left-color: var(--warning);
}

.history-item.annulation {
    border-left-color: var(--info);
    opacity: 0.7;
}

.history-item.cancelled {
    opacity: 0.5;
    text-decoration: line-through;
}

/* === QR CODE === */
.qr-code {
    text-align: center;
    padding: 30px;
}

.qr-code img {
    max-width: 250px;
    border: 5px solid var(--orange);
    border-radius: 15px;
    padding: 10px;
    background: var(--white);
}

/* === TICKET CODE === */
.ticket-code {
    text-align: center;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    padding: 40px;
}

.ticket-code h2 {
    font-size: 4em;
    font-weight: 900;
    letter-spacing: 5px;
    margin: 20px 0;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    background: var(--gray);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    max-width: 600px;
    border: 2px solid var(--orange);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: var(--orange);
    padding: 20px;
    border-radius: 13px 13px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--white);
    border: none;
}

.modal-content > form,
.modal-content > div:not(.modal-header) {
    padding: 25px;
}

.close {
    color: var(--white);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--darker);
}

/* === TABLES === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th {
    background: var(--dark);
    padding: 15px;
    text-align: left;
    color: var(--orange);
    font-weight: 700;
    border-bottom: 2px solid var(--orange);
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--dark);
}

table tr:hover {
    background: rgba(255, 107, 0, 0.1);
}

/* === NOTIFICATIONS === */
.notification-box {
    background: var(--info);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.notification-box.birthday {
    background: var(--warning);
}

.notification-box.warning {
    background: var(--danger);
}

.notification-box .icon {
    font-size: 2em;
}

.notification-box .content {
    flex: 1;
}

.notification-box h4 {
    margin-bottom: 5px;
}

/* === PROGRESS BAR === */
.progress-bar {
    background: var(--dark);
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    margin: 15px 0;
    border: 2px solid var(--orange);
}

.progress-fill {
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange-dark) 100%);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9em;
}

/* === ANIMATIONS === */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-grid {
        grid-template-columns: 1fr;
    }
    
    .user-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        margin: 10% 10px;
    }
}

/* === SCROLLBAR CUSTOM === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--orange-dark);
}