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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: #1e1e2e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    border: 1px solid #2d2d44;
}

header h1 {
    color: #8b5cf6;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #b0b0b0;
    font-size: 1.1em;
}

.back-link {
    display: inline-block;
    color: #8b5cf6;
    text-decoration: none;
    margin-bottom: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #a78bfa;
}

/* Formulaires */
.create-bingo, .actions-section {
    background: #1e1e2e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    border: 1px solid #2d2d44;
}

.create-bingo h2, .actions-section h2 {
    color: #8b5cf6;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.bingo-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #3d3d5c;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    background: #2a2a3e;
    color: #e0e0e0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    background: #2f2f45;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #6b6b8a;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.counter-fields {
    background: #2a2a3e;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #3d3d5c;
}

/* Boutons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #9d6df7 0%, #8d4ef0 100%);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Liste des bingos */
.bingos-list {
    background: #1e1e2e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #2d2d44;
}

.year-section {
    margin-bottom: 40px;
}

.year-section h2 {
    color: #8b5cf6;
    font-size: 2em;
    margin-bottom: 20px;
    border-bottom: 3px solid #8b5cf6;
    padding-bottom: 10px;
}

.bingos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.bingo-card {
    background: linear-gradient(135deg, #2a2a3e 0%, #1f1f2e 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #3d3d5c;
}

.bingo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    border-color: #8b5cf6;
}

.bingo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bingo-header h3 {
    color: #e0e0e0;
    font-size: 1.3em;
    flex: 1;
}

.delete-form {
    display: inline;
}

.bingo-stats {
    margin-bottom: 15px;
}

.stat {
    display: block;
    color: #b0b0b0;
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #2a2a3e;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #3d3d5c;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
    transition: width 0.3s;
}

/* Actions */
.actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.action-card {
    background: #1e1e2e;
    border: 2px solid #3d3d5c;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s;
}

.action-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
    background: #242435;
}

.action-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-container {
    position: relative;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #8b5cf6;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
    background: #2a2a3e;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #8b5cf6;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.action-title {
    flex: 1;
    font-size: 1.1em;
    color: #e0e0e0;
    transition: all 0.3s;
}

.action-title.completed {
    text-decoration: line-through;
    color: #888;
}

.action-description {
    color: #b0b0b0;
    margin: 10px 0;
    line-height: 1.5;
}

.action-counter {
    margin: 15px 0;
    padding: 10px;
    background: #2a2a3e;
    border-radius: 8px;
    border: 1px solid #3d3d5c;
}

.action-counter label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-weight: 500;
}

.counter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-counter {
    background: #8b5cf6;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-counter:hover {
    background: #7c3aed;
    transform: scale(1.1);
}

.counter-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #8b5cf6;
    min-width: 80px;
    text-align: center;
}

.action-date {
    margin-top: 10px;
    padding: 8px;
    background: #1a3a2a;
    color: #4ade80;
    border-radius: 5px;
    font-size: 0.9em;
    border: 1px solid #2d5a3d;
}

/* 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);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #1e1e2e;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    animation: slideDown 0.3s;
    border: 1px solid #2d2d44;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #b0b0b0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #e0e0e0;
}

.modal-content h2 {
    color: #8b5cf6;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .bingos-grid,
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .bingo-form {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .actions-header {
        flex-direction: column;
        align-items: stretch;
    }
}