/**
 * Modern Buttons CSS - Version 1.0
 * Boutons modernes, esthétiques et 100% cliquables
 * Améliore l'expérience utilisateur sur la page d'accueil
 */

/* ===================================
   VARIABLES CSS
   =================================== */
:root {
    --button-primary-bg: #D71234;
    --button-primary-hover: #E21313;
    --button-primary-text: #FFFFFF;
    --button-primary-shadow: 0 4px 15px rgba(215, 18, 52, 0.3);
    --button-primary-shadow-hover: 0 6px 25px rgba(215, 18, 52, 0.5);
    
    --button-secondary-bg: transparent;
    --button-secondary-hover: #D71234;
    --button-secondary-text: #D71234;
    --button-secondary-border: #D71234;
    --button-secondary-shadow: 0 4px 15px rgba(215, 18, 52, 0.2);
    
    --button-success-bg: #28a745;
    --button-success-hover: #218838;
    --button-success-text: #FFFFFF;
    --button-success-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    
    --button-info-bg: #17a2b8;
    --button-info-hover: #138496;
    --button-info-text: #FFFFFF;
    --button-info-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    
    --button-radius: 50px;
    --button-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --button-font: 'Lato', sans-serif;
}

/* ===================================
   BOUTONS PRINCIPAUX
   =================================== */
.template-component-button {
    display: inline-block !important;
    background: var(--button-primary-bg) !important;
    color: var(--button-primary-text) !important;
    padding: 15px 35px !important;
    border-radius: var(--button-radius) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: var(--button-transition) !important;
    border: 3px solid var(--button-primary-bg) !important;
    font-family: var(--button-font) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    box-shadow: var(--button-primary-shadow) !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
    min-width: 200px !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.template-component-button:hover {
    background: var(--button-primary-hover) !important;
    color: var(--button-primary-text) !important;
    border-color: var(--button-primary-hover) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--button-primary-shadow-hover) !important;
    text-decoration: none !important;
}

.template-component-button:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 10px rgba(215, 18, 52, 0.4) !important;
}

.template-component-button:focus {
    outline: 3px solid rgba(215, 18, 52, 0.5) !important;
    outline-offset: 3px !important;
    border-radius: var(--button-radius) !important;
}

/* ===================================
   BOUTON RENDEZ-VOUS CENTRÉ
   =================================== */
.rdv-button-centered {
    font-size: 20px !important;
    padding: 18px 40px !important;
    min-width: 280px !important;
    background: linear-gradient(135deg, var(--button-primary-bg), var(--button-primary-hover)) !important;
    border: none !important;
    position: relative !important;
    z-index: 1 !important;
}

.rdv-button-centered::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, var(--button-primary-hover), var(--button-primary-bg)) !important;
    border-radius: var(--button-radius) !important;
    opacity: 0 !important;
    transition: var(--button-transition) !important;
    z-index: -1 !important;
}

.rdv-button-centered:hover::before {
    opacity: 1 !important;
}

.rdv-button-centered:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(215, 18, 52, 0.6) !important;
}

/* ===================================
   BOUTONS SECONDAIRES
   =================================== */
.template-component-button.button-secondary {
    background: var(--button-secondary-bg) !important;
    color: var(--button-secondary-text) !important;
    border-color: var(--button-secondary-border) !important;
    box-shadow: var(--button-secondary-shadow) !important;
}

.template-component-button.button-secondary:hover {
    background: var(--button-secondary-hover) !important;
    color: var(--button-primary-text) !important;
    border-color: var(--button-secondary-hover) !important;
    box-shadow: var(--button-primary-shadow-hover) !important;
}

/* ===================================
   BOUTONS SUCCESS
   =================================== */
.template-component-button.button-success {
    background: var(--button-success-bg) !important;
    color: var(--button-success-text) !important;
    border-color: var(--button-success-bg) !important;
    box-shadow: var(--button-success-shadow) !important;
}

.template-component-button.button-success:hover {
    background: var(--button-success-hover) !important;
    border-color: var(--button-success-hover) !important;
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5) !important;
}

/* ===================================
   BOUTONS INFO
   =================================== */
.template-component-button.button-info {
    background: var(--button-info-bg) !important;
    color: var(--button-info-text) !important;
    border-color: var(--button-info-bg) !important;
    box-shadow: var(--button-info-shadow) !important;
}

.template-component-button.button-info:hover {
    background: var(--button-info-hover) !important;
    border-color: var(--button-info-hover) !important;
    box-shadow: 0 6px 25px rgba(23, 162, 184, 0.5) !important;
}

/* ===================================
   BOUTONS PETITS
   =================================== */
.template-component-button.button-small {
    padding: 10px 25px !important;
    font-size: 14px !important;
    min-width: 150px !important;
}

/* ===================================
   BOUTONS LARGES
   =================================== */
.template-component-button.button-large {
    padding: 20px 50px !important;
    font-size: 18px !important;
    min-width: 300px !important;
}

/* ===================================
   BOUTONS ICÔNES
   =================================== */
.template-component-button.button-icon {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.template-component-button.button-icon::before {
    font-size: 18px !important;
    line-height: 1 !important;
}

/* ===================================
   BOUTONS AVEC EFFETS
   =================================== */
.template-component-button.button-glow {
    box-shadow: 0 0 20px rgba(215, 18, 52, 0.4) !important;
}

.template-component-button.button-glow:hover {
    box-shadow: 0 0 30px rgba(215, 18, 52, 0.8) !important;
}

.template-component-button.button-pulse {
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(215, 18, 52, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(215, 18, 52, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(215, 18, 52, 0);
    }
}

/* ===================================
   BOUTONS RESPONSIFS
   =================================== */
@media (max-width: 768px) {
    .template-component-button {
        padding: 12px 25px !important;
        font-size: 14px !important;
        min-width: 180px !important;
    }
    
    .rdv-button-centered {
        font-size: 16px !important;
        padding: 15px 30px !important;
        min-width: 240px !important;
    }
    
    .template-component-button.button-large {
        padding: 16px 35px !important;
        font-size: 16px !important;
        min-width: 250px !important;
    }
}

@media (max-width: 480px) {
    .template-component-button {
        padding: 10px 20px !important;
        font-size: 13px !important;
        min-width: 160px !important;
    }
    
    .rdv-button-centered {
        font-size: 15px !important;
        padding: 12px 25px !important;
        min-width: 200px !important;
    }
}

/* ===================================
   BOUTONS DANS LES SECTIONS
   =================================== */
.template-section .template-component-button {
    margin: 10px 5px !important;
}

.template-align-center .template-component-button {
    margin: 20px auto !important;
    display: block !important;
}

/* ===================================
   BOUTONS DANS LES CALLS-TO-ACTION
   =================================== */
.template-component-call-to-action .template-component-button {
    margin-top: 20px !important;
    font-size: 18px !important;
    padding: 18px 40px !important;
    min-width: 300px !important;
}

/* ===================================
   BOUTONS DANS LES GALERIES
   =================================== */
.template-section .template-align-center .template-component-button {
    margin: 30px auto 20px auto !important;
}

/* ===================================
   CORRECTIONS SPÉCIFIQUES
   =================================== */
/* S'assurer que tous les boutons sont cliquables */
.template-component-button,
a.template-component-button,
button.template-component-button {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Correction pour les liens dans les boutons */
.template-component-button a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Correction pour les boutons dans les formulaires */
form .template-component-button {
    border: none !important;
    outline: none !important;
}

/* Correction pour les boutons avec des icônes */
.template-component-button .template-icon-meta,
.template-component-button .template-icon-feature {
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* ===================================
   ANIMATIONS ET TRANSITIONS
   =================================== */
.template-component-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.template-component-button:hover {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */
.template-component-button:focus-visible {
    outline: 3px solid rgba(215, 18, 52, 0.8) !important;
    outline-offset: 3px !important;
}

/* Support pour les lecteurs d'écran */
.template-component-button[aria-label]::before {
    content: attr(aria-label) !important;
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ===================================
   ÉTATS SPÉCIAUX
   =================================== */
.template-component-button:disabled,
.template-component-button.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.template-component-button.loading {
    position: relative !important;
    color: transparent !important;
}

.template-component-button.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid currentColor !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
