/**
 * WP Ebook Leads - Frontend Styles
 */

/* Variables */
:root {
    --wpel-primary: #6366f1;
    --wpel-primary-dark: #4f46e5;
    --wpel-success: #22c55e;
    --wpel-text: #1f2937;
    --wpel-text-light: #6b7280;
    --wpel-border: #e5e7eb;
    --wpel-bg: #ffffff;
    --wpel-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --wpel-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --wpel-radius: 12px;
}

/* Grid Layout */
.wpel-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.wpel-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wpel-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wpel-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .wpel-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wpel-columns-3,
    .wpel-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wpel-columns-2,
    .wpel-columns-3,
    .wpel-columns-4 {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.wpel-card {
    gap: 15px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.wpel-card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: linear-gradient(90deg, #7814CF 0%, #1020B4 100%);
}

.wpel-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2s ease;
}

.wpel-card:hover .wpel-card-image img {
    transform: scale(1.35);
}

.wpel-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wpel-card-title {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin: 0 0 8px;
    line-height: 1.4;
    font-family: 'Lexend';
    margin-bottom: 5px;
}

.wpel-card-description {
    font-size: 12px;
    color: #595959;
    margin: 0 0 20px;
    flex-grow: 1;
    font-family: 'Lexend';
    font-weight: 300;
    line-height: 18px;
}

/* Download Button */
.wpel-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, #7814CF 0%, #1020B4 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s 
ease;
    text-decoration: none;
    width: 100%;
    font-family: 'Vinila Test';
}

.wpel-download-btn:hover {
    background: linear-gradient(90deg, #1020B4 0%, #7814CF 100%);
}

.wpel-download-btn svg {
    flex-shrink: 0;
}

/* Modal */
.wpel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wpel-modal.active {
    display: flex;
}

.wpel-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.wpel-modal-content {
    position: relative;
    background: var(--wpel-bg);
    border-radius: 20px;
    box-shadow: var(--wpel-shadow-lg);
    
    padding: 35px 35px 30px;
    animation: wpel-modal-in 0.3s 
ease;
font-family: 'Lexend';
}

.wpel-form-container {
    min-width: 850px;
    max-width: 100%;
}



@keyframes wpel-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wpel-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--wpel-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wpel-modal-close:hover {
    background: var(--wpel-border);
    color: var(--wpel-text);
}

/* Form Styles */
.wpel-form-container {
    /* Container styles */
}

.wpel-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpel-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 480px) {
    .wpel-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.wpel-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpel-form-group label {
    font-size: 14px;
    font-weight: 300;
    color: #1A1A1A;
    font-family: 'Lexend';
}

.wpel-form-group input {
        padding: 12px 16px;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    font-size: 14px;
    color: var(--wpel-text);
    transition: all 0.2s 
ease;
}

.wpel-form-group input:focus {
    outline: none;
    border-color: var(--wpel-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--wpel-bg);
}

.wpel-form-group input::placeholder {
    color: #9ca3af;
}

.wpel-form-group input.error {
    border-color: #ef4444;
}

.wpel-form-group .error-message {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

/* Submit Button */
.wpel-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, #7814CF 0%, #1020B4 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s 
ease;
    width: 100%;
    margin-top: 10px;
    font-family: 'Vinila Test';
    font-weight: 300;
}

.wpel-submit-btn:hover {
    background: linear-gradient(90deg, #1020B4 0%, #7814CF 100%);
}

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

.wpel-submit-btn.loading {
    position: relative;
    color: transparent;
}

.wpel-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wpel-spin 0.8s linear infinite;
}

@keyframes wpel-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success State */
.wpel-success-container {
    text-align: center;
    min-width: 550px;
    max-width: 550px;
}

.wpel-success-icon {
    width: 80px;
    height: 80px;
    background: #00A85B;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: wpel-success-pop 0.4s ease;
}

@keyframes wpel-success-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.wpel-success-icon svg {
    color: #ffffff;
}

.wpel-success-message {
    font-size: 30px;
    font-weight: 400;
    color: #000;
    margin: 0 40px 24px;
    line-height: 1.4;
    font-family: 'Vinila Test';
}

.wpel-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #7814CF 0%, #1020B4 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 13px 48px;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s 
ease;
    font-family: 'Vinila Test';
    font-weight: 300;
}

.wpel-close-btn:hover {
    background: linear-gradient(90deg, #1020B4 0%, #7814CF 100%);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wpel-card,
    .wpel-modal-content {
        /* Keep light mode for consistency */
    }
}


.wpel-grid {
   gap: 44px;
}

.wpel-card {
   position: relative !important;
   border-radius: 12px !important;
   padding: 18px 18px 15px;
   box-shadow: unset;
   border: 0;
}

.wpel-card:before {
   content: '' !important;
   position: absolute !important;
   inset: 0;
   padding: 1px; /* épaisseur de ta bordure */
   background: linear-gradient(180deg, #1020B4 0%, #7814CF 77%, #FFF 97%);
   -webkit-mask: 
   linear-gradient(#fff 0 0) content-box, 
   linear-gradient(#fff 0 0);
   -webkit-mask-composite: xor;
   mask-composite: exclude;
   border-radius: inherit;
   pointer-events: none;
   border-radius: 12px !important;
}

.wpel-card-image {
   padding: 0 !important;
   height: 125px !important;
   border-radius: 12px !important;
}

.wpel-card-image img {
   position: unset !important;
   width: 100% !important;
   height: 100% !important;   
   object-fit: cover !important;
}

