/* ============================================
   MODERN BUTTONS - Design Ultra-Moderne 2024
   ============================================ */

:root {
    /* Couleurs principales */
    --btn-primary: #00C853;
    --btn-primary-dark: #00A344;
    --btn-primary-light: #5CE886;
    --btn-secondary: #6C757D;
    --btn-success: #00C853;
    --btn-danger: #FF4757;
    --btn-warning: #FFA502;
    --btn-info: #1E90FF;
    --btn-dark: #1A1A2E;
    --btn-light: #F8F9FA;
    
    /* Dégradés */
    --gradient-primary: linear-gradient(135deg, #00C853 0%, #00A344 50%, #00C853 100%);
    --gradient-secondary: linear-gradient(135deg, #6C757D 0%, #495057 50%, #6C757D 100%);
    --gradient-success: linear-gradient(135deg, #00C853 0%, #00A344 50%, #00C853 100%);
    --gradient-danger: linear-gradient(135deg, #FF4757 0%, #DC3545 50%, #FF4757 100%);
    --gradient-warning: linear-gradient(135deg, #FFA502 0%, #FF8C00 50%, #FFA502 100%);
    --gradient-info: linear-gradient(135deg, #1E90FF 0%, #0077B6 50%, #1E90FF 100%);
    --gradient-dark: linear-gradient(135deg, #1A1A2E 0%, #0F0F23 50%, #1A1A2E 100%);
    
    /* Ombres */
    --shadow-primary: 0 4px 20px rgba(0, 200, 83, 0.4);
    --shadow-secondary: 0 4px 20px rgba(108, 117, 125, 0.3);
    --shadow-success: 0 4px 20px rgba(0, 200, 83, 0.4);
    --shadow-danger: 0 4px 20px rgba(255, 71, 87, 0.4);
    --shadow-warning: 0 4px 20px rgba(255, 165, 2, 0.4);
    --shadow-info: 0 4px 20px rgba(30, 144, 255, 0.4);
    --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --btn-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --btn-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   BASE BUTTON STYLES
   ============================================ */

.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: var(--btn-transition) !important;
    position: relative !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    letter-spacing: 0.3px !important;
}

/* Effet de ripple au clic */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   PRIMARY BUTTON
   ============================================ */

.btn-primary {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: var(--shadow-primary) !important;
    position: relative !important;
    z-index: 1 !important;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #5CE886 0%, #00C853 50%, #00A344 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(0, 200, 83, 0.5) !important;
    color: white !important;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3) !important;
}

/* ============================================
   SECONDARY BUTTON
   ============================================ */

.btn-secondary {
    background: var(--gradient-secondary) !important;
    color: white !important;
    box-shadow: var(--shadow-secondary) !important;
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(108, 117, 125, 0.4) !important;
    color: white !important;
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   SUCCESS BUTTON
   ============================================ */

.btn-success {
    background: var(--gradient-success) !important;
    color: white !important;
    box-shadow: var(--shadow-success) !important;
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(0, 200, 83, 0.5) !important;
    color: white !important;
}

.btn-success:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   DANGER BUTTON
   ============================================ */

.btn-danger {
    background: var(--gradient-danger) !important;
    color: white !important;
    box-shadow: var(--shadow-danger) !important;
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(255, 71, 87, 0.5) !important;
    color: white !important;
}

.btn-danger:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   WARNING BUTTON
   ============================================ */

.btn-warning {
    background: var(--gradient-warning) !important;
    color: white !important;
    box-shadow: var(--shadow-warning) !important;
}

.btn-warning:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(255, 165, 2, 0.5) !important;
    color: white !important;
}

.btn-warning:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   INFO BUTTON
   ============================================ */

.btn-info {
    background: var(--gradient-info) !important;
    color: white !important;
    box-shadow: var(--shadow-info) !important;
}

.btn-info:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(30, 144, 255, 0.5) !important;
    color: white !important;
}

.btn-info:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   DARK BUTTON
   ============================================ */

.btn-dark {
    background: var(--gradient-dark) !important;
    color: white !important;
    box-shadow: var(--shadow-dark) !important;
}

.btn-dark:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
    color: white !important;
}

.btn-dark:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   LIGHT BUTTON
   ============================================ */

.btn-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    color: #1A1A2E !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.btn-light:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    border-color: #00C853 !important;
    color: #00C853 !important;
}

.btn-light:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* ============================================
   OUTLINE BUTTONS
   ============================================ */

.btn-outline-primary {
    background: transparent !important;
    border: 2px solid var(--btn-primary) !important;
    color: var(--btn-primary) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-primary:hover {
    color: white !important;
    border-color: var(--btn-primary) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-primary) !important;
}

.btn-outline-primary:hover::before {
    left: 0;
}

.btn-outline-secondary {
    background: transparent !important;
    border: 2px solid var(--btn-secondary) !important;
    color: var(--btn-secondary) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.btn-outline-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-secondary:hover {
    color: white !important;
    border-color: var(--btn-secondary) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-secondary) !important;
}

.btn-outline-secondary:hover::before {
    left: 0;
}

.btn-outline-danger {
    background: transparent !important;
    border: 2px solid var(--btn-danger) !important;
    color: var(--btn-danger) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.btn-outline-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-danger);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-danger:hover {
    color: white !important;
    border-color: var(--btn-danger) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-danger) !important;
}

.btn-outline-danger:hover::before {
    left: 0;
}

.btn-outline-success {
    background: transparent !important;
    border: 2px solid var(--btn-success) !important;
    color: var(--btn-success) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.btn-outline-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-success);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-success:hover {
    color: white !important;
    border-color: var(--btn-success) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-success) !important;
}

.btn-outline-success:hover::before {
    left: 0;
}

/* ============================================
   BUTTON SIZES
   ============================================ */

.btn-sm {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    border-radius: 10px !important;
}

.btn-lg {
    padding: 16px 32px !important;
    font-size: 1rem !important;
    border-radius: 14px !important;
}

.btn-xl {
    padding: 20px 40px !important;
    font-size: 1.1rem !important;
    border-radius: 16px !important;
}

/* ============================================
   ICON BUTTONS
   ============================================ */

.btn-icon {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
}

.btn-icon.btn-sm {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.85rem !important;
}

.btn-icon.btn-lg {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.2rem !important;
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */

.btn-floating {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4) !important;
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 1000 !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(0, 200, 83, 0.6);
    }
}

.btn-floating:hover {
    transform: scale(1.1) !important;
    animation: none !important;
}

/* ============================================
   GROUPED BUTTONS
   ============================================ */

.btn-group {
    display: inline-flex;
    gap: 8px;
}

.btn-group .btn {
    border-radius: 12px !important;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */

/* Shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: none;
}

.btn-shine:hover::after {
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Glow effect */
.btn-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
    }
    to {
        box-shadow: 0 4px 30px rgba(0, 200, 83, 0.6), 0 0 40px rgba(0, 200, 83, 0.2);
    }
}

/* 3D Button */
.btn-3d {
    box-shadow: 0 6px 0 #00A344, 0 6px 20px rgba(0, 200, 83, 0.3) !important;
    transform: translateY(0) !important;
}

.btn-3d:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 0 #00A344, 0 8px 25px rgba(0, 200, 83, 0.4) !important;
}

.btn-3d:active {
    transform: translateY(4px) !important;
    box-shadow: 0 2px 0 #00A344, 0 2px 10px rgba(0, 200, 83, 0.3) !important;
}

/* ============================================
   DISABLED STATE
   ============================================ */

.btn:disabled,
.btn.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(0.5);
}

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   LOADING STATE
   ============================================ */

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ROUNDED BUTTONS
   ============================================ */

.btn-rounded {
    border-radius: 50px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.btn-rounded.btn-sm {
    border-radius: 25px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.btn-rounded.btn-lg {
    border-radius: 35px !important;
    padding-left: 36px !important;
    padding-right: 36px !important;
}

/* ============================================
   GRADIENT TEXT BUTTON (Outline style)
   ============================================ */

.btn-gradient-text {
    background: transparent !important;
    border: 2px solid transparent !important;
    position: relative !important;
}

.btn-gradient-text::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.btn-gradient-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn-gradient-text:hover {
    background: var(--gradient-primary) !important;
}

.btn-gradient-text:hover span {
    color: white !important;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .btn {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
    }
    
    .btn-lg {
        padding: 14px 28px !important;
        font-size: 0.95rem !important;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
}
