/* ========================================
   SISTEPS ACADEMY - POPUP LEAD CAPTURE
   Design ultra-moderne et professionnel
   ======================================== */

:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --secondary: #00b4d8;
    --success: #06d6a0;
    --text-dark: #0f172a;
    --text-gray: #64748b;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
}

/* Popup principal */
.sisteps-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sisteps-popup.active {
    display: flex;
    opacity: 1;
}

/* Overlay */
.sisteps-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

/* Container */
.sisteps-popup__container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bouton fermer */
.sisteps-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    color: var(--text-gray);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sisteps-popup__close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

/* Gradient animé */
.sisteps-popup__gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #0066cc 0%, #00b4d8 100%);
    opacity: 0.1;
    border-radius: 20px 20px 0 0;
    animation: gradientMove 8s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(5px) scale(1.02); }
}

/* Contenu */
.sisteps-popup__content {
    position: relative;
    padding: 40px 32px 32px;
}

/* Badge */
.sisteps-popup__badge {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Titre */
.sisteps-popup__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Points clés */
.sisteps-popup__highlights {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
}

.highlight-item:last-child {
    margin-bottom: 0;
}

.highlight-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Message principal */
.sisteps-popup__message {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    border-radius: 12px;
    border-left: 4px solid #ff9800;
}

.sisteps-popup__message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #663c00;
}

/* Formulaire */
.sisteps-form {
    margin-top: 24px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.required {
    color: #ef4444;
}

.sisteps-form input[type="text"],
.sisteps-form input[type="email"],
.sisteps-form input[type="tel"],
.sisteps-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-dark);
    background: white;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}

.sisteps-form input:focus,
.sisteps-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.sisteps-form select {
    cursor: pointer;
    appearance: none;
    background: white url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
}

/* Input téléphone */
.phone-input {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px;
}

.country-code {
    padding: 12px 12px 12px 16px;
}

/* Radio buttons */
.radio-group {
    display: grid;
    gap: 10px;
}

.radio-group--inline {
    grid-template-columns: 1fr 1fr;
}

.radio-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: var(--primary);
    background: rgba(0, 102, 204, 0.02);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-option input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.radio-option input[type="radio"]:checked ~ * {
    border-color: var(--primary);
}

.radio-option span {
    margin-left: 28px;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.2s;
}

.radio-option input[type="radio"]::before {
    content: '';
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: white;
    transition: all 0.2s;
}

.radio-option input[type="radio"]:checked::before {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 3px white;
}

/* Bouton submit */
.sisteps-btn {
    position: relative;
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 8px;
}

.sisteps-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 102, 204, 0.3);
}

.sisteps-btn:active {
    transform: translateY(0);
}

.sisteps-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.sisteps-btn__text {
    position: relative;
    z-index: 1;
}

.sisteps-btn__shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    to { left: 100%; }
}

/* États du bouton */
.sisteps-btn.loading .sisteps-btn__text::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sisteps-btn.success {
    background: var(--success);
}

.sisteps-btn.error {
    background: #ef4444;
}

/* Footer */
.form-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.form-footer p {
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-gray);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Scrollbar */
.sisteps-popup__container::-webkit-scrollbar {
    width: 8px;
}

.sisteps-popup__container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 20px 20px 0;
}

.sisteps-popup__container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Responsive - Tablette */
@media (max-width: 768px) {
    .sisteps-popup__content {
        padding: 32px 24px 24px;
    }
    
    .sisteps-popup__title {
        font-size: 24px;
    }
    
    .sisteps-popup__badge {
        width: 60px;
        height: 60px;
    }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    .sisteps-popup__container {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
    
    .sisteps-popup__content {
        padding: 32px 20px 24px;
    }
    
    .sisteps-popup__title {
        font-size: 22px;
    }
    
    .highlight-item {
        font-size: 13px;
    }
    
    .sisteps-popup__message p {
        font-size: 13px;
    }
    
    .phone-input {
        grid-template-columns: 110px 1fr;
    }
    
    .radio-group--inline {
        grid-template-columns: 1fr;
    }
    
    .sisteps-form input,
    .sisteps-form select {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sisteps-form input:focus-visible,
.sisteps-form select:focus-visible,
.radio-option:focus-visible,
.sisteps-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Print */
@media print {
    .sisteps-popup {
        display: none !important;
    }
}