/* Lottery Draw - Styles principaux */

.lottery-draw-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.lottery-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: #1e3a5f;
}

/* Section Upload */
.lottery-upload-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.lottery-upload-section h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.1em;
}

.lottery-help {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.lottery-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.lottery-upload-zone:hover,
.lottery-upload-zone.dragover {
    border-color: #4a90d9;
    background: #f0f7ff;
}

.lottery-upload-zone input[type="file"] {
    display: none;
}

.lottery-upload-zone label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lottery-upload-icon {
    font-size: 2.5em;
}

.lottery-upload-text {
    color: #666;
    font-size: 0.95em;
}

.lottery-upload-zone.has-file {
    border-color: #28a745;
    background: #f0fff4;
}

.lottery-upload-zone.has-file .lottery-upload-text {
    color: #28a745;
    font-weight: 600;
}

/* Boutons */
.lottery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lottery-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lottery-btn-primary {
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    color: #fff;
    font-size: 1.2em;
    padding: 15px 35px;
}

.lottery-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #357abd 0%, #2868a6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.4);
}

.lottery-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.lottery-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.lottery-btn-outline {
    background: transparent;
    border: 2px solid #4a90d9;
    color: #4a90d9;
}

.lottery-btn-outline:hover:not(:disabled) {
    background: #4a90d9;
    color: #fff;
}

.lottery-btn-danger {
    background: #dc3545;
    color: #fff;
}

.lottery-btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.lottery-btn-icon {
    font-size: 1.1em;
}

/* Statistiques */
.lottery-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lottery-stat {
    text-align: center;
}

.lottery-stat-value {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #1e3a5f;
}

.lottery-stat-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Tirage */
.lottery-draw-section {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 25px;
}

.lottery-draw-section h3 {
    margin-top: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.lottery-result-display {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 40px 30px;
    margin: 25px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lottery-result-placeholder {
    opacity: 0.7;
    font-style: italic;
}

.lottery-result-winner {
    font-size: 2em;
    font-weight: 700;
    animation: lottery-reveal 0.5s ease-out;
}

@keyframes lottery-reveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.lottery-actions {
    margin-top: 20px;
}

/* Animation de tirage */
.lottery-drawing .lottery-result-display {
    animation: lottery-pulse 0.3s ease-in-out infinite;
}

@keyframes lottery-pulse {
    0%, 100% {
        background: rgba(255, 255, 255, 0.15);
    }
    50% {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* Actions secondaires */
.lottery-secondary-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

/* Historique */
.lottery-history {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lottery-history h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.lottery-history-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

.lottery-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.lottery-history-table thead {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

.lottery-history-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.lottery-history-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.lottery-history-table tbody tr:hover {
    background: #f8f9fa;
}

.lottery-history-table tbody tr:first-child {
    background: #e8f4fd;
    animation: lottery-highlight 2s ease-out;
}

@keyframes lottery-highlight {
    0% {
        background: #cce5ff;
    }
    100% {
        background: #e8f4fd;
    }
}

.lottery-order-badge {
    background: #4a90d9;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
}

.lottery-history-table .col-order {
    width: 50px;
    text-align: center;
}

.lottery-history-table .col-date {
    color: #888;
    font-size: 0.85em;
    white-space: nowrap;
}

/* Messages */
.lottery-messages {
    margin-top: 15px;
}

.lottery-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: lottery-fade-in 0.3s ease;
}

@keyframes lottery-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lottery-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lottery-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lottery-message-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Liste épuisée */
.lottery-exhausted .lottery-draw-section {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.lottery-exhausted .lottery-result-display {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 600px) {
    .lottery-draw-container {
        padding: 15px;
    }

    .lottery-stats {
        gap: 15px;
    }

    .lottery-stat-value {
        font-size: 1.5em;
    }

    .lottery-result-winner {
        font-size: 1.5em;
    }

    .lottery-secondary-actions {
        flex-direction: column;
    }

    .lottery-secondary-actions .lottery-btn {
        width: 100%;
    }

    .lottery-history-list li {
        flex-wrap: wrap;
    }

    .lottery-history-date {
        width: 100%;
        margin-top: 5px;
        margin-left: 40px;
    }
}
