/**
 * TeepTrak Forms - Styles avec couleurs de marque
 * Version 2.0.0
 */

/* ========================================
   VARIABLES CSS - TEEPTRAK BRAND COLORS
   ======================================== */
:root {
    /* Couleurs principales TeepTrak */
    --teeptrak-primary: #eb352b;
    --teeptrak-primary-hover: #ff674c;
    --teeptrak-primary-dark: #c42d25;
    
    /* Neutres */
    --teeptrak-black: #232120;
    --teeptrak-dark: #272222;
    --teeptrak-gray: #4b4846;
    --teeptrak-gray-light: #ebebeb;
    --teeptrak-beige: #d9dbd6;
    
    /* Clairs */
    --teeptrak-white: #ffffff;
    --teeptrak-light: #f4f9fd;
    --teeptrak-light-gray: #f5f6f5;
    
    /* États */
    --teeptrak-success: #28a745;
    --teeptrak-error: #dc3545;
    --teeptrak-warning: #ff674c;
    
    /* Ombres */
    --teeptrak-shadow-sm: 0 2px 4px rgba(35, 33, 32, 0.08);
    --teeptrak-shadow: 0 4px 12px rgba(35, 33, 32, 0.12);
    --teeptrak-shadow-lg: 0 8px 24px rgba(35, 33, 32, 0.16);
    --teeptrak-shadow-xl: 0 16px 48px rgba(35, 33, 32, 0.2);
    
    /* Transitions */
    --teeptrak-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --teeptrak-transition-fast: 0.15s ease;
    
    /* Rayons */
    --teeptrak-radius-sm: 4px;
    --teeptrak-radius: 8px;
    --teeptrak-radius-lg: 12px;
    --teeptrak-radius-xl: 16px;
}

/* ========================================
   BASE CONTAINER
   ======================================== */
.teeptrak-form-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px;
    background: var(--teeptrak-white);
    border-radius: var(--teeptrak-radius-lg);
    box-shadow: var(--teeptrak-shadow);
}

.teeptrak-form-container.style-dark {
    background: var(--teeptrak-black);
    color: var(--teeptrak-white);
}

.teeptrak-form-container.style-minimal {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.teeptrak-form-container.style-card {
    border: 1px solid var(--teeptrak-gray-light);
}

.teeptrak-form-container.style-highlight {
    background: linear-gradient(135deg, var(--teeptrak-light) 0%, var(--teeptrak-white) 100%);
    border: 2px solid var(--teeptrak-primary);
}

/* ========================================
   TITRES & TEXTES
   ======================================== */
.teeptrak-form-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--teeptrak-black);
    line-height: 1.3;
}

.style-dark .teeptrak-form-title {
    color: var(--teeptrak-white);
}

.teeptrak-form-subtitle {
    margin: 0 0 24px;
    font-size: 1rem;
    color: var(--teeptrak-gray);
    line-height: 1.5;
}

.style-dark .teeptrak-form-subtitle {
    color: var(--teeptrak-beige);
}

/* Badge highlight */
.teeptrak-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--teeptrak-primary) 0%, var(--teeptrak-primary-hover) 100%);
    color: var(--teeptrak-white);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 20px;
    animation: teeptrak-pulse 2s infinite;
}

@keyframes teeptrak-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ========================================
   FORMULAIRE - CHAMPS
   ======================================== */
.teeptrak-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.teeptrak-form-row {
    display: flex;
    flex-direction: column;
}

.teeptrak-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.teeptrak-form-row-inline {
    display: flex;
    gap: 12px;
}

.teeptrak-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.teeptrak-form-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--teeptrak-black);
}

.style-dark .teeptrak-form-field label {
    color: var(--teeptrak-light-gray);
}

.teeptrak-form-field label .required {
    color: var(--teeptrak-primary);
    margin-left: 2px;
}

.teeptrak-form-field input,
.teeptrak-form-field select,
.teeptrak-form-field textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--teeptrak-black);
    background: var(--teeptrak-white);
    border: 2px solid var(--teeptrak-gray-light);
    border-radius: var(--teeptrak-radius);
    transition: border-color var(--teeptrak-transition), box-shadow var(--teeptrak-transition);
    -webkit-appearance: none;
}

.teeptrak-form-field input:focus,
.teeptrak-form-field select:focus,
.teeptrak-form-field textarea:focus {
    outline: none;
    border-color: var(--teeptrak-primary);
    box-shadow: 0 0 0 4px rgba(235, 53, 43, 0.12);
}

.teeptrak-form-field input::placeholder,
.teeptrak-form-field textarea::placeholder {
    color: var(--teeptrak-gray);
    opacity: 0.6;
}

.style-dark .teeptrak-form-field input,
.style-dark .teeptrak-form-field select,
.style-dark .teeptrak-form-field textarea {
    background: var(--teeptrak-dark);
    border-color: var(--teeptrak-gray);
    color: var(--teeptrak-white);
}

.teeptrak-form-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Select custom arrow */
.teeptrak-form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b4846' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ========================================
   BOUTONS
   ======================================== */
.teeptrak-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--teeptrak-white);
    background: linear-gradient(135deg, var(--teeptrak-primary) 0%, var(--teeptrak-primary-dark) 100%);
    border: none;
    border-radius: var(--teeptrak-radius);
    cursor: pointer;
    transition: all var(--teeptrak-transition);
    box-shadow: var(--teeptrak-shadow-sm);
}

.teeptrak-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--teeptrak-primary-hover) 0%, var(--teeptrak-primary) 100%);
    box-shadow: var(--teeptrak-shadow);
    transform: translateY(-2px);
}

.teeptrak-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--teeptrak-shadow-sm);
}

.teeptrak-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.teeptrak-submit-full {
    width: 100%;
}

.teeptrak-submit-lg {
    padding: 18px 40px;
    font-size: 1.125rem;
}

/* Variantes de boutons */
.teeptrak-submit.style-outline {
    background: transparent;
    color: var(--teeptrak-primary);
    border: 2px solid var(--teeptrak-primary);
    box-shadow: none;
}

.teeptrak-submit.style-outline:hover:not(:disabled) {
    background: var(--teeptrak-primary);
    color: var(--teeptrak-white);
}

.teeptrak-submit.style-dark {
    background: var(--teeptrak-black);
}

.teeptrak-submit.style-dark:hover:not(:disabled) {
    background: var(--teeptrak-dark);
}

/* Icônes boutons */
.teeptrak-submit svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Spinner */
.teeptrak-spinner {
    width: 20px;
    height: 20px;
    animation: teeptrak-spin 1s linear infinite;
}

@keyframes teeptrak-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   MESSAGES
   ======================================== */
.teeptrak-form-message {
    padding: 16px 20px;
    border-radius: var(--teeptrak-radius);
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: center;
}

.teeptrak-form-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #b1dfbb;
}

.teeptrak-form-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   BENEFITS LIST (POC, etc.)
   ======================================== */
.teeptrak-benefits {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.teeptrak-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9375rem;
    color: var(--teeptrak-black);
    border-bottom: 1px solid var(--teeptrak-gray-light);
}

.teeptrak-benefits li:last-child {
    border-bottom: none;
}

.teeptrak-benefits li svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--teeptrak-primary);
    margin-top: 2px;
}

.style-dark .teeptrak-benefits li {
    color: var(--teeptrak-light-gray);
    border-color: var(--teeptrak-gray);
}

/* ========================================
   TRUST INDICATORS
   ======================================== */
.teeptrak-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--teeptrak-gray-light);
}

.teeptrak-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--teeptrak-gray);
}

.teeptrak-trust-item svg {
    width: 18px;
    height: 18px;
    color: var(--teeptrak-success);
}

/* ========================================
   PRIVACY & FOOTER
   ======================================== */
.teeptrak-form-privacy {
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--teeptrak-gray);
    text-align: center;
    line-height: 1.5;
}

.teeptrak-form-privacy a {
    color: var(--teeptrak-primary);
    text-decoration: none;
}

.teeptrak-form-privacy a:hover {
    text-decoration: underline;
}

/* ========================================
   POPUP STYLES
   ======================================== */
.teeptrak-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.teeptrak-popup.active {
    opacity: 1;
    visibility: visible;
}

.teeptrak-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(35, 33, 32, 0.7);
    backdrop-filter: blur(4px);
}

.teeptrak-popup-content {
    position: relative;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    background: var(--teeptrak-white);
    border-radius: var(--teeptrak-radius-xl);
    box-shadow: var(--teeptrak-shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.teeptrak-popup.active .teeptrak-popup-content {
    transform: scale(1) translateY(0);
}

/* Popup themes */
.teeptrak-popup.theme-dark .teeptrak-popup-content {
    background: var(--teeptrak-black);
    color: var(--teeptrak-white);
}

.teeptrak-popup.theme-brand .teeptrak-popup-content {
    background: linear-gradient(135deg, var(--teeptrak-primary) 0%, var(--teeptrak-primary-dark) 100%);
    color: var(--teeptrak-white);
}

.teeptrak-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--teeptrak-light-gray);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--teeptrak-gray);
    transition: all var(--teeptrak-transition);
}

.teeptrak-popup-close:hover {
    background: var(--teeptrak-gray-light);
    color: var(--teeptrak-black);
    transform: rotate(90deg);
}

.theme-dark .teeptrak-popup-close,
.theme-brand .teeptrak-popup-close {
    background: rgba(255, 255, 255, 0.1);
    color: var(--teeptrak-white);
}

.teeptrak-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--teeptrak-primary) 0%, var(--teeptrak-primary-hover) 100%);
    border-radius: 50%;
    color: var(--teeptrak-white);
}

.teeptrak-popup-icon svg {
    width: 40px;
    height: 40px;
}

.theme-brand .teeptrak-popup-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Popup positions */
.teeptrak-popup.position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

.teeptrak-popup.position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.teeptrak-popup.position-bottom-right .teeptrak-popup-content,
.teeptrak-popup.position-bottom-left .teeptrak-popup-content {
    margin: 20px;
    max-width: 400px;
}

/* ========================================
   STICKY CTA BAR
   ======================================== */
.teeptrak-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 24px;
    background: var(--teeptrak-black);
    color: var(--teeptrak-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.teeptrak-sticky-cta.active {
    transform: translateY(0);
}

.teeptrak-sticky-cta.theme-brand {
    background: linear-gradient(135deg, var(--teeptrak-primary) 0%, var(--teeptrak-primary-dark) 100%);
}

.teeptrak-sticky-cta.theme-light {
    background: var(--teeptrak-white);
    color: var(--teeptrak-black);
    border-top: 1px solid var(--teeptrak-gray-light);
}

.teeptrak-sticky-text {
    font-size: 1rem;
    font-weight: 500;
}

.teeptrak-sticky-cta .teeptrak-submit {
    padding: 12px 24px;
    background: var(--teeptrak-white);
    color: var(--teeptrak-primary);
}

.teeptrak-sticky-cta.theme-brand .teeptrak-submit {
    background: var(--teeptrak-white);
    color: var(--teeptrak-primary);
}

.teeptrak-sticky-cta.theme-light .teeptrak-submit {
    background: var(--teeptrak-primary);
    color: var(--teeptrak-white);
}

.teeptrak-sticky-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity var(--teeptrak-transition);
}

.teeptrak-sticky-close:hover {
    opacity: 1;
}

/* ========================================
   CALENDLY EMBED
   ======================================== */
.teeptrak-calendly-container {
    width: 100%;
    min-height: 700px;
    border-radius: var(--teeptrak-radius-lg);
    overflow: hidden;
    box-shadow: var(--teeptrak-shadow);
}

.teeptrak-calendly-container iframe {
    width: 100%;
    height: 100%;
    min-height: 700px;
    border: none;
}

/* ========================================
   FREE POC SPECIAL STYLES
   ======================================== */
.teeptrak-poc-container {
    position: relative;
    overflow: hidden;
}

.teeptrak-poc-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(235, 53, 43, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.teeptrak-poc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--teeptrak-primary);
    color: var(--teeptrak-white);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.teeptrak-poc-badge svg {
    width: 16px;
    height: 16px;
    animation: teeptrak-bounce 1s infinite;
}

@keyframes teeptrak-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ========================================
   WAITING LIST STYLES
   ======================================== */
.teeptrak-waitlist-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: var(--teeptrak-light);
    border-radius: var(--teeptrak-radius);
    font-size: 0.875rem;
    color: var(--teeptrak-gray);
}

.teeptrak-waitlist-counter strong {
    color: var(--teeptrak-primary);
    font-size: 1.25rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .teeptrak-form-container {
        padding: 24px;
        margin: 0 16px;
    }
    
    .teeptrak-form-title {
        font-size: 1.5rem;
    }
    
    .teeptrak-form-row-half {
        grid-template-columns: 1fr;
    }
    
    .teeptrak-form-row-inline {
        flex-direction: column;
    }
    
    .teeptrak-popup-content {
        padding: 28px;
        margin: 16px;
    }
    
    .teeptrak-sticky-cta {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .teeptrak-sticky-cta .teeptrak-submit {
        width: 100%;
    }
    
    .teeptrak-trust {
        flex-direction: column;
        align-items: center;
    }
}

/* Hide on mobile if needed */
@media (max-width: 640px) {
    .teeptrak-sticky-cta.hide-mobile {
        display: none;
    }
}
