/**
 * Styles public Lead Capture Pro
 */

/* Variables */
:root {
    --lcp-primary: #2D5F3F;
    --lcp-primary-dark: #1e4d2b;
    --lcp-secondary: #FFD700;
    --lcp-secondary-dark: #FFA500;
    --lcp-success: #4CAF50;
    --lcp-error: #f44336;
    --lcp-whatsapp: #25D366;
    --lcp-white: #ffffff;
    --lcp-gray: #666666;
    --lcp-light-gray: #f5f5f5;
    --lcp-border-radius: 8px;
    --lcp-transition: all 0.3s ease;
}

/* Container */
.lcp-container {
    width: 100%;
    max-width: 420px;
    margin: 20px auto;
    animation: lcpSlideInUp 0.6s ease-out;
}

.lcp-align-left {
    margin-left: 0;
}

.lcp-align-right {
    margin-right: 0;
}

.lcp-align-center {
    margin-left: auto;
    margin-right: auto;
}

/* Formulaire principal */
.lcp-form {
    background: linear-gradient(135deg, var(--lcp-primary) 0%, var(--lcp-primary-dark) 100%);
    border-radius: 16px;
    padding: 40px 35px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.lcp-form::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    transform: rotate(45deg);
    pointer-events: none;
}

/* Header */
.lcp-form-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.lcp-form-title {
    color: var(--lcp-white);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.lcp-form-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Bannière info */
.lcp-info-banner {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.lcp-info-banner-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lcp-info-banner-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--lcp-secondary);
}

.lcp-info-banner-content {
    flex: 1;
}

.lcp-info-banner-title {
    color: var(--lcp-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lcp-info-banner-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.4;
}

/* Formulaire */
.lcp-capture-form {
    position: relative;
    z-index: 1;
}

.lcp-form-group {
    position: relative;
    margin-bottom: 20px;
}

.lcp-form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: var(--lcp-border-radius);
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    transition: var(--lcp-transition);
    font-family: inherit;
    box-sizing: border-box;
}

.lcp-form-input:focus {
    outline: none;
    border-color: var(--lcp-secondary);
    background: var(--lcp-white);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.lcp-form-input.error {
    border-color: var(--lcp-error);
    animation: lcpShake 0.5s ease-in-out;
}

/* Honeypot */
.lcp-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}

/* Messages d'erreur */
.lcp-error-message {
    color: var(--lcp-secondary);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.lcp-form-input.error + .lcp-error-message,
.lcp-gdpr-checkbox.error + .lcp-error-message {
    display: block;
    animation: lcpFadeIn 0.3s ease;
}

/* GDPR */
.lcp-gdpr-container {
    margin-bottom: 25px;
}

.lcp-gdpr-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.lcp-gdpr-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--lcp-secondary);
}

.lcp-gdpr-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.lcp-gdpr-label a {
    color: var(--lcp-secondary);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.lcp-gdpr-label a:hover {
    opacity: 0.8;
}

/* Bouton submit */
.lcp-submit-button {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--lcp-secondary) 0%, var(--lcp-secondary-dark) 100%);
    color: var(--lcp-primary);
    border: none;
    border-radius: var(--lcp-border-radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--lcp-transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.lcp-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.lcp-submit-button:active {
    transform: translateY(0);
}

.lcp-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.lcp-submit-button.loading .lcp-button-text {
    visibility: hidden;
}

.lcp-submit-button.loading .lcp-button-loader {
    display: block;
}

.lcp-button-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid var(--lcp-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: lcpSpinner 0.8s linear infinite;
    display: none;
}

/* Message de succès */
.lcp-success-message {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--lcp-secondary);
    border-radius: var(--lcp-border-radius);
    padding: 20px;
    text-align: center;
    color: var(--lcp-white);
    animation: lcpFadeIn 0.5s ease;
}

.lcp-success-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.lcp-success-message h3 {
    color: var(--lcp-secondary);
    margin: 0 0 10px;
    font-size: 20px;
}

.lcp-success-message p {
    margin: 0 0 15px;
}

.lcp-whatsapp-redirect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lcp-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.lcp-whatsapp-redirect:hover {
    opacity: 0.8;
}

.lcp-whatsapp-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Section WhatsApp */
.lcp-whatsapp-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lcp-whatsapp-section-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.lcp-whatsapp-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.lcp-whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lcp-whatsapp);
    color: var(--lcp-white);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--lcp-transition);
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.lcp-whatsapp-button:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.lcp-whatsapp-group {
    background: #128C7E;
}

/* Widget WhatsApp flottant */
.lcp-whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--lcp-whatsapp);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--lcp-transition);
    z-index: 1000;
    animation: lcpPulse 2s infinite;
}

.lcp-whatsapp-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

.lcp-whatsapp-floating svg {
    width: 30px;
    height: 30px;
    fill: var(--lcp-white);
}

.lcp-whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: var(--lcp-white);
    padding: 8px 15px;
    border-radius: var(--lcp-border-radius);
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lcp-whatsapp-floating:hover .lcp-whatsapp-tooltip {
    opacity: 1;
}

/* Chat widget */
.lcp-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background: var(--lcp-white);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(120%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.lcp-chat-widget.open {
    transform: translateY(0);
}

.lcp-chat-header {
    background: var(--lcp-whatsapp);
    color: var(--lcp-white);
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lcp-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lcp-chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--lcp-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--lcp-whatsapp);
}

.lcp-chat-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.lcp-chat-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.lcp-chat-close {
    background: none;
    border: none;
    color: var(--lcp-white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.lcp-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lcp-chat-body {
    padding: 20px;
    height: 200px;
    overflow-y: auto;
}

.lcp-chat-message {
    background: #f0f0f0;
    padding: 12px 16px;
    border-radius: 15px 15px 15px 0;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.lcp-chat-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.lcp-chat-cta {
    display: block;
    width: 100%;
    background: var(--lcp-whatsapp);
    color: var(--lcp-white);
    text-align: center;
    padding: 12px;
    border-radius: var(--lcp-border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.lcp-chat-cta:hover {
    background: #128C7E;
}

/* Animations */
@keyframes lcpSlideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lcpShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes lcpSpinner {
    to { transform: rotate(360deg); }
}

@keyframes lcpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lcpPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Responsive */
@media (max-width: 480px) {
    .lcp-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .lcp-form {
        padding: 30px 25px;
    }
    
    .lcp-form-title {
        font-size: 24px;
    }
    
    .lcp-form-description {
        font-size: 15px;
    }
    
    .lcp-submit-button {
        font-size: 16px;
        padding: 16px 25px;
    }
    
    .lcp-whatsapp-floating {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .lcp-chat-widget {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 10px;
    }
    
    .lcp-whatsapp-tooltip {
        display: none;
    }
}

/* Print */
@media print {
    .lcp-whatsapp-floating,
    .lcp-chat-widget {
        display: none !important;
    }
}

/* Accessibility */
.lcp-form-input:focus,
.lcp-submit-button:focus,
.lcp-gdpr-checkbox input:focus {
    outline: 2px solid var(--lcp-secondary);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lcp-form-input {
        background: rgba(255, 255, 255, 0.9);
        color: #333;
    }
}