/* ========================================
   Smart Protect - Formulaires Modernes
   Style unifié pour tous les formulaires
   ======================================== */

/* Variables héritées de common.css */

/* Container principal */
.form-page-container {
    max-width: 550px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Carte du formulaire */
.form-card {
    background: white;
    border-radius: var(--radius-lg, 16px);
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Header du formulaire */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark, #1e293b);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray, #64748b);
    font-size: 1rem;
    line-height: 1.6;
}

/* Encart avantages */
.form-benefits {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius, 12px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #bae6fd;
}

.form-benefits.purple {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #e9d5ff;
}

.form-benefits-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-benefits.purple .form-benefits-title {
    color: #7c3aed;
}

.form-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #0c4a6e;
}

.form-benefits.purple .form-benefits-list li {
    color: #6b21a8;
}

.form-benefits-list li::before {
    content: "✓";
    color: #22c55e;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Grille avantages */
.form-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.form-benefits-grid .benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #0c4a6e;
}

.form-benefits.purple .form-benefits-grid .benefit-item {
    color: #6b21a8;
}

/* Formulaire */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Section de formulaire */
.form-section {
    margin-bottom: 0.5rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark, #1e293b);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Groupe de champs */
.modern-form .form-group {
    margin-bottom: 0;
}

.modern-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark, #1e293b);
    font-size: 0.9375rem;
}

.modern-form .label-icon {
    font-size: 1rem;
}

.modern-form .label-optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.8125rem;
}

.modern-form .form-group input,
.modern-form .form-group select,
.modern-form .form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius, 10px);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.modern-form .form-group input:focus,
.modern-form .form-group select:focus,
.modern-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modern-form.purple .form-group input:focus,
.modern-form.purple .form-group select:focus,
.modern-form.purple .form-group textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.modern-form .form-group input::placeholder,
.modern-form .form-group textarea::placeholder {
    color: #9ca3af;
}

/* Ligne de champs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox */
.modern-form .form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modern-form .form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary, #2563eb);
}

.modern-form.purple .form-checkbox input[type="checkbox"] {
    accent-color: #7c3aed;
}

.modern-form .form-checkbox label {
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray, #64748b);
    cursor: pointer;
    line-height: 1.5;
    font-weight: 400;
}

.modern-form .form-checkbox label a {
    color: var(--primary, #2563eb);
    text-decoration: none;
}

.modern-form.purple .form-checkbox label a {
    color: #7c3aed;
}

.modern-form .form-checkbox label a:hover {
    text-decoration: underline;
}

/* Bouton submit */
.modern-form .btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary, #2563eb) 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: var(--radius, 12px);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.modern-form.purple .btn-submit {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.modern-form .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.modern-form.purple .btn-submit:hover {
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.modern-form .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modern-form .btn-icon {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.modern-form .btn-submit:hover .btn-icon {
    transform: translateX(4px);
}

.modern-form .btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Trust items */
.form-trust {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray, #64748b);
    font-size: 0.875rem;
}

.trust-icon {
    font-size: 1rem;
}

/* Récapitulatif quiz */
.quiz-recap {
    background: #eff6ff;
    border-radius: var(--radius, 10px);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #bfdbfe;
}

.quiz-recap.purple {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.quiz-recap-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-recap.purple .quiz-recap-title {
    color: #5b21b6;
}

.quiz-recap-content {
    font-size: 0.875rem;
    color: #3b82f6;
}

.quiz-recap.purple .quiz-recap-content {
    color: #7c3aed;
}

/* Message de succès */
.success-section {
    text-align: center;
    padding: 2rem;
    display: none;
}

.success-section.show {
    display: block;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark, #1e293b);
    margin-bottom: 0.5rem;
}

.success-text {
    color: var(--gray, #64748b);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: var(--radius, 10px);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-home:hover {
    background: #e2e8f0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .form-page-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .form-card {
        padding: 1.75rem 1.5rem;
    }

    .form-header-icon {
        font-size: 3rem;
    }

    .form-header h1 {
        font-size: 1.5rem;
    }

    .form-header p {
        font-size: 0.9375rem;
    }

    .form-benefits {
        padding: 1rem;
    }

    .form-benefits-grid {
        grid-template-columns: 1fr;
    }

    .form-trust {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .trust-item {
        font-size: 0.8125rem;
    }

    .success-icon-wrapper {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .success-title {
        font-size: 1.375rem;
    }
}

@media (max-width: 480px) {
    .form-page-container {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }

    .form-card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .form-header-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .form-header h1 {
        font-size: 1.375rem;
    }

    .form-header p {
        font-size: 0.875rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modern-form .form-group label {
        font-size: 0.875rem;
    }

    .modern-form .form-group input,
    .modern-form .form-group select,
    .modern-form .form-group textarea {
        padding: 0.75rem;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .modern-form .form-checkbox label {
        font-size: 0.8125rem;
    }

    .modern-form .btn-submit {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .form-trust {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .success-icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    .success-title {
        font-size: 1.25rem;
    }

    .success-text {
        font-size: 0.875rem;
    }

    .btn-home {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .modern-form .btn-submit,
    .btn-home {
        min-height: 48px;
    }

    .modern-form .form-group input,
    .modern-form .form-group select,
    .modern-form .form-group textarea {
        min-height: 48px;
    }

    .modern-form .form-checkbox input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}
