/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal container */
.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

/* Close button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #333;
}

/* Modal content */
.modal-content {
    padding: 40px 32px 32px;
    text-align: center;
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 45px;
    height: 45px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 16px;
    line-height: 1.3;
}

.modal-message {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 32px;
    color: #64748b;
}

/* States */
.modal.modal-success .modal-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.modal.modal-success .modal-icon svg {
    color: white;
}

.modal.modal-success .modal-title {
    color: #065f46;
}

.modal.modal-error .modal-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.modal.modal-error .modal-icon svg {
    color: white;
}

.modal.modal-error .modal-title {
    color: #991b1b;
}

.modal.modal-warning .modal-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.modal.modal-warning .modal-icon svg {
    color: white;
}

.modal.modal-warning .modal-title {
    color: #92400e;
}

/* Buttons */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Bouton vert spécifique pour les entraînements */
.btn-training {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

.btn-training:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

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

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 32px 24px 24px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
