/* 
 * Buttons Component - Styles des boutonsde l'application
 */

/* Boutons de base */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Bouton primaire avec gradient */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Bouton danger */
.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

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

/* Bouton success */
.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4a9628 0%, #95ca52 100%);
}

/* Bouton warning */
.btn-warning {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e08939 0%, #e0b838 100%);
}

/* Bouton outline */
.btn-outline-primary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #eb3349;
    color: #eb3349;
}

.btn-outline-danger:hover {
    background: #eb3349;
    color: white;
}

.btn-outline-success {
    background: transparent;
    border: 2px solid #56ab2f;
    color: #56ab2f;
}

.btn-outline-success:hover {
    background: #56ab2f;
    color: white;
}

/* Boutons de taille */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
}

/* Bouton icon only */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn-icon i {
    font-size: 1.2rem;
}

/* Bouton avec icône à gauche */
.btn i:first-child {
    margin-right: 8px;
}

/* Bouton avec icône à droite */
.btn i:last-child {
    margin-left: 8px;
}

/* Groupe de boutons */
.btn-group {
    display: inline-flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
    margin-left: -1px;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
    margin-left: 0;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

/* Bouton loading */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-loading-spinner 0.6s linear infinite;
}

@keyframes btn-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Bouton block (pleine largeur) */
.btn-block {
    display: flex;
    width: 100%;
}
