/* ========================================
   UI — Boutons (Design System)
   ----------------------------------------
   Rôle : regrouper tous les styles de boutons
   réutilisables (CTA marketing, actions globales).
   
   Contrainte clean-code :
   - Une seule source de vérité pour .btn/.cta-btn
   - Les exceptions doivent être des modificateurs (ex: .btn--secondary)
   
   Dépendances :
   - styles.css (tokens : couleurs, spacing, transitions, shadows)
   ======================================== */

/* ----------------------------------------
   PRIMAIRE : fond orange + shine
   ---------------------------------------- */
.btn,
.cta-btn,
.ff-btn,
button[type="submit"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: capitalize;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 
        background-color var(--transition-normal),
        transform var(--transition-normal),
        box-shadow var(--transition-normal);
}

/* Effet Shine au survol */
.btn::before,
.cta-btn::before,
.ff-btn::before,
button[type="submit"]::before,
input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
    z-index: 1;
}

.btn:hover::before,
.cta-btn:hover::before,
.ff-btn:hover::before,
button[type="submit"]:hover::before,
input[type="submit"]:hover::before {
    left: 100%;
}

.btn:hover,
.cta-btn:hover,
.ff-btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ----------------------------------------
   MODIFICATEUR SÉMANTIQUE : PRIMARY
   Note : la base `.btn` est déjà le style primaire.
   ---------------------------------------- */
.btn--primary {
    /* alias sémantique — valeurs explicites pour éviter les rulesets vides */
    background: var(--color-primary);
    color: var(--white);
}

.btn svg, .cta-btn svg,
.ff-btn svg, button[type="submit"] svg, input[type="submit"] svg,
.btn .btn__icon,
.btn .elementor-button-icon, .cta-btn .elementor-button-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: currentColor;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.btn:hover svg, .cta-btn:hover svg,
.ff-btn:hover svg, button[type="submit"]:hover svg, input[type="submit"]:hover svg,
.btn:hover .btn__icon,
.btn:hover .elementor-button-icon, .cta-btn:hover .elementor-button-icon {
    transform: translateX(3px);
}

.btn span, .cta-btn span,
.ff-btn span, button[type="submit"] span, input[type="submit"] span,
.button-text, .elementor-button-text {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.btn--secondary {
    background: transparent;
    color: var(--white);
}

.btn--secondary::before {
    background: var(--gradient-primary-hover);
    z-index: -1;
}

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

.btn--secondary:hover {
    background: transparent;
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-glow);
}

.btn--tertiary {
    background: transparent;
    box-shadow: none;
}

.btn--tertiary::before {
    content: none;
}

.btn--tertiary:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.btn--tertiary span,
.btn--tertiary .button-text,
.btn--tertiary .elementor-button-text {
    color: currentColor;
}

.link-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-normal), gap var(--transition-normal);
}

.link-cta:hover {
    color: var(--color-primary-light);
    gap: var(--spacing-md);
}

.link-cta svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-normal);
}

.link-cta:hover svg {
    transform: translateX(4px);
}

.btn--carbon {
    background: var(--carbon-300);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ----------------------------------------
   MODIFICATEUR : ICÔNE LARGE (ex: projets CTA)
   ---------------------------------------- */
.btn--icon-lg svg {
    width: 18px;
    height: 18px;
}

.btn--pill {
    border-radius: var(--border-radius-pill);
}

.btn--service {
    background: var(--black);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
}

.btn--service:hover {
    background: var(--color-primary-light);
    transform: translateY(-3px);
}

