/* ============================================
   BUTTONS.CSS - Système global de boutons
   Base commune pour tout le site
   ============================================ */

/* ========== BASE BOUTON ========== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 50px; /* ARRONDI PARTOUT */
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
}

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

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

/* ========== BOUTONS PRINCIPAUX ========== */

/* PRIMARY : Fond or + texte blanc */
.btn-primary {
    background: var(--theme-color-1, #B8941F);
    color: white;
    border-color: var(--theme-color-1, #B8941F);
}

.btn-primary:hover {
    background: var(--theme-color-1-hover, #9a7519);
    border-color: var(--theme-color-1-hover, #9a7519);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--theme-color-1-rgb, 184, 148, 31), 0.4);
}

/* SECONDARY : Fond blanc + bordure or */
.btn-secondary {
    background: white;
    color: var(--theme-color-1, #B8941F);  /* Même couleur que primary */
    border-color: var(--theme-color-1, #B8941F);
}

.btn-secondary:hover {
    background: white;
    color: var(--theme-color-1-hover, #9a7519);
    border-color: var(--theme-color-1-hover, #9a7519);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--theme-color-1-rgb, 184, 148, 31), 0.4);
}

/* ACTION : Argenté - Modifier/Éditer */
.btn-action {
    background: var(--theme-color-4, #7f8c8d);
    color: white;
    border-color: var(--theme-color-4, #7f8c8d);
}

.btn-action:hover {
    background: var(--theme-color-4-hover, #6c7a7b);
    border-color: var(--theme-color-4-hover, #6c7a7b);
    transform: translateY(-2px);
}

/* VALIDATE : Blanc + bordure gris - Valider/Terminer */
.btn-validate {
    background: white;
    color: var(--dark-grey, #2c3e50);
    border-color: var(--dark-grey, #2c3e50);
}

.btn-validate:hover {
    background: var(--dark-grey, #2c3e50);
    color: white;
    transform: translateY(-2px);
}

/* DANGER : Gris foncé - Supprimer */
.btn-danger {
    background: var(--dark-grey, #2c3e50);
    color: white;
    border-color: var(--dark-grey, #2c3e50);
}

.btn-danger:hover {
    background: #1a252f;
    border-color: #1a252f;
    transform: translateY(-2px);
}

/* OUTLINE : Blanc + bordure thème */
.btn-outline {
    background: white;
    color: var(--theme-color-1, #B8941F);
    border-color: var(--theme-color-1, #B8941F);
}

.btn-outline:hover {
    background: var(--theme-color-1, #B8941F);
    color: white;
    transform: translateY(-2px);
}

/* BACK : Retour - Gris clair neutre */
.btn-back {
    background: #f5f1e8;
    color: #7f8c8d;
    border-color: #f5f1e8;
}

.btn-back:hover {
    background: #e0e0e0;
    color: #2c3e50;
}

/* INVERSE : Blanc sur fond coloré */
.btn-inverse {
    background: white;
    color: var(--theme-color-1, #B8941F);
    border-color: white;
}

.btn-inverse:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--theme-color-1-hover, #9a7519);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

/* ========== MODIFICATEURS ========== */

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ========== ICÔNES LUCIDE ========== */

/* Icônes dans les boutons */
.btn-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

.btn-icon-small {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    flex-shrink: 0;
}

.btn-icon-mini {
    width: 10px;
    height: 10px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

/* Icônes pour widgets et titres */
.widget-icon-lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
    color: var(--theme-color-1, #B8941F);
}

/* Classe générique pour toutes les icônes Lucide (auto-appliquée par le script) */
.lucide-icon {
    flex-shrink: 0;
}

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

@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-icon {
        width: 14px;
        height: 14px;
    }
    
    .btn-icon-small {
        width: 12px;
        height: 12px;
    }
    
    .btn-icon-mini {
        width: 9px;
        height: 9px;
    }

    .widget-icon-lucide {
        width: 18px;
        height: 18px;
    }
}
