/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: url('../img/fond.png') center center / cover no-repeat fixed,
                linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* En-tête */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.app-title {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7), 0px 0px 20px rgba(255,255,255,0.3);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.app-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Contenu principal */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Container de la roue */
.wheel-container {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas de la roue */
#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    background: url('../img/roue.png') center center / cover no-repeat;
    transition: transform 0.3s ease;
}

#wheelCanvas:hover {
    transform: scale(1.02);
}

/* Flèche indicatrice */
.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #ff4757;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Bouton d'action central */
.action-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid white;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 71, 87, 0.4), inset 0 3px 6px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 25px rgba(255, 71, 87, 0.5), inset 0 2px 4px rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.9);
}

.action-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.action-button:disabled {
    opacity: 0;
    cursor: not-allowed;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.btn-text {
    text-align: center;
    line-height: 1.2;
    padding: 10px;
    word-wrap: break-word;
    hyphens: auto;
}

/* Affichage du résultat sous la roue */
.current-result {
    text-align: center;
    margin: 20px auto;
    animation: slideUp 0.5s ease;
}

.result-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    display: inline-block;
    animation: pulse 2s infinite;
}




/* Panneau de statistiques */
.stats-panel {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.1);
    max-width: 380px;
    min-width: 320px;
    width: auto;
    border: 1px solid rgba(255,255,255,0.3);
    animation: slideUp 0.5s ease;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.stats-title {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.stats-summary {
    display: flex;
    gap: 15px;
}

.stats-counter {
    background: linear-gradient(135deg, #10ac84, #00d2d3);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.stats-content {
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-item:hover {
    transform: translateX(3px);
    background: #f1f3f4;
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-label {
    flex: 0 0 80px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    text-transform: capitalize;
}

.stat-bar-container {
    flex: 1;
    background: #e9ecef;
    border-radius: 8px;
    height: 16px;
    margin: 0 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    min-width: 150px;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    transition: width 0.8s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.stat-bar.highlight {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    animation: statPulse 0.6s ease;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.4);
}

@keyframes statPulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.1); }
}

.stat-percentage {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
    min-width: 55px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-count {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    margin-top: 2px;
}

.reset-stats-btn {
    background: linear-gradient(135deg, #ff9f43, #ff7675);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
}

.reset-stats-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 159, 67, 0.4);
}

/* Historique */
.history-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    max-width: 350px;
    border: 1px solid rgba(255,255,255,0.2);
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideUp 0.5s ease;
}

.history-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.history-item {
    padding: 8px 12px;
    background: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
}

.history-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.new-game-btn {
    background: linear-gradient(135deg, #5f27cd, #341f97);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.new-game-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(95, 39, 205, 0.4);
}

.clear-history-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.clear-history-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ff4757;
}

.modal-body {
    padding: 25px 30px 30px;
}

/* Section d'input */
.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#optionInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#optionInput:focus {
    outline: none;
    border-color: #667eea;
}

.add-btn {
    background: #00d2d3;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-btn:hover {
    background: #01a3a4;
    transform: translateY(-1px);
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Section d'import JSON */
.json-import-section {
    margin-bottom: 25px;
}

.json-toggle-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.json-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.json-import-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.json-import-container h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.json-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.json-description code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #495057;
}

#jsonInput {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

#jsonInput:focus {
    outline: none;
    border-color: #667eea;
}

.json-actions {
    display: flex;
    gap: 10px;
}

.import-json-btn {
    background: linear-gradient(135deg, #10ac84, #00d2d3);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    font-size: 0.9rem;
}

.import-json-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(16, 172, 132, 0.4);
}

.clear-json-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.clear-json-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.json-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Liste des options */
.options-list-container {
    margin-bottom: 25px;
}

.options-list-container h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.options-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    background: #f8f9fa;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.option-text {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    word-wrap: break-word;
}

.remove-option-btn {
    background: #ff4757;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.remove-option-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* Option d'élimination */
.elimination-option {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.elimination-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.elimination-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.elimination-checkbox:hover .checkmark {
    border-color: #ff8c00;
}

.elimination-checkbox input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #ff8c00, #ff7700);
    border-color: #ff8c00;
}

.elimination-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.elimination-text {
    flex-grow: 1;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.elimination-description {
    margin-top: 8px;
    margin-left: 32px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    line-height: 1.3;
}

/* Option de rotation automatique */
.auto-spin-option {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.auto-spin-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    margin-bottom: 15px;
}

.auto-spin-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark-spin {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.auto-spin-checkbox:hover .checkmark-spin {
    border-color: #667eea;
}

.auto-spin-checkbox input[type="checkbox"]:checked + .checkmark-spin {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.auto-spin-checkbox input[type="checkbox"]:checked + .checkmark-spin::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auto-spin-text {
    flex-grow: 1;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.auto-spin-controls {
    margin-left: 32px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.auto-spin-controls.enabled,
.auto-spin-checkbox input[type="checkbox"]:checked ~ .auto-spin-controls {
    opacity: 1;
    pointer-events: all;
}

.auto-spin-controls.enabled *,
.auto-spin-checkbox input[type="checkbox"]:checked ~ .auto-spin-controls * {
    pointer-events: all;
}

.slider-container {
    margin-bottom: 15px;
}

.slider-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

#countDisplay {
    color: #667eea;
    font-weight: 700;
}

.count-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.custom-slider {
    position: relative;
    height: 40px;
    flex: 1;
}

.count-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.count-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.count-input::-webkit-outer-spin-button,
.count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.count-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.slider {
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 2;
}

.slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.slider-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 5.17%; /* (5-2)/(60-2) * 100 = valeur initiale */
    transition: width 0.3s ease;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    left: 5.17%; /* Position initiale */
    transition: left 0.3s ease;
    cursor: pointer;
}

.slider-thumb:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
}

.infinite-btn {
    background: linear-gradient(135deg, #ff9f43, #ff7675);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
}

.infinite-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 159, 67, 0.4);
}

.infinite-btn.active {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    animation: infinitePulse 2s infinite;
}

@keyframes infinitePulse {
    0%, 100% { transform: translateY(-1px) scale(1); }
    50% { transform: translateY(-1px) scale(1.02); }
}

.auto-spin-description {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    line-height: 1.3;
}

/* Checkbox des statistiques */
.stats-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
    margin-top: 12px;
    padding: 8px;
    background: rgba(16, 172, 132, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(16, 172, 132, 0.2);
    transition: all 0.3s ease;
}

.stats-checkbox:hover {
    background: rgba(16, 172, 132, 0.15);
}

.stats-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark-stats {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stats-checkbox:hover .checkmark-stats {
    border-color: #10ac84;
}

.stats-checkbox input[type="checkbox"]:checked + .checkmark-stats {
    background: linear-gradient(135deg, #10ac84, #00d2d3);
    border-color: #10ac84;
}

.stats-checkbox input[type="checkbox"]:checked + .checkmark-stats::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.stats-text {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

/* Actions du modal */
.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.clear-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.clear-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

.validate-btn {
    background: linear-gradient(135deg, #00d2d3, #01a3a4);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 2;
}

.validate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 210, 211, 0.4);
}

.validate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Spinner de chargement */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .app-title {
        font-size: 2.5rem;
    }
    
    .app-subtitle {
        font-size: 1rem;
    }
    
    #wheelCanvas {
        width: 300px !important;
        height: 300px !important;
    }
    
    .action-button {
        width: 150px;
        height: 150px;
        font-size: 1rem;
        border-width: 6px;
    }
    
    .result-text {
        font-size: 1.5rem;
    }
    
    .modal {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    .add-btn {
        align-self: stretch;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .stats-panel {
        bottom: 10px;
        left: 10px;
        max-width: 300px;
        padding: 15px;
    }
    
    .history-container {
        bottom: 10px;
        right: 10px;
        max-width: 300px;
        padding: 15px;
    }
    
    .result-display {
        font-size: 1.3rem;
        padding: 12px 20px;
    }
    
    .elimination-option {
        padding: 15px;
    }
    
    .elimination-text {
        font-size: 0.9rem;
    }
    
    .elimination-description {
        font-size: 0.8rem;
        margin-left: 28px;
    }
    
    .json-import-container {
        padding: 15px;
    }
    
    .json-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    #jsonInput {
        font-size: 0.85rem;
    }
    
    .auto-spin-option {
        padding: 15px;
    }
    
    .auto-spin-controls {
        margin-left: 20px;
    }
    
    .custom-slider {
        height: 35px;
    }
    
    .slider-thumb {
        width: 18px;
        height: 18px;
    }
    
    .count-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .count-input {
        width: 100%;
        font-size: 1rem;
    }
    
    .stats-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .stats-summary {
        flex-direction: column;
        gap: 8px;
        align-self: stretch;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    
    .stat-label {
        flex: none;
        text-align: center;
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .stat-bar-container {
        margin: 0;
        height: 20px;
    }
    
    .stat-percentage {
        text-align: center;
        align-items: center;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 2rem;
    }
    
    #wheelCanvas {
        width: 250px !important;
        height: 250px !important;
    }
    
    .action-button {
        width: 120px;
        height: 120px;
        font-size: 0.9rem;
        border-width: 4px;
    }
    

    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .stats-panel {
        bottom: 5px;
        left: 5px;
        right: 5px;
        max-width: none;
        min-width: auto;
        padding: 16px;
        font-size: 0.85rem;
    }
    
    .stats-header {
        font-size: 0.9rem;
    }
    
    .stat-item {
        margin-bottom: 12px;
        padding: 14px;
    }
    
    .history-container {
        bottom: 5px;
        right: 5px;
        max-width: 250px;
        padding: 12px;
        font-size: 0.8rem;
    }
    
    .history-title {
        font-size: 1rem;
    }
    
    .history-actions {
        gap: 8px;
        margin-top: 12px;
    }
    
    .new-game-btn,
    .clear-history-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .result-display {
        font-size: 1.1rem;
        padding: 10px 16px;
    }
}
