/* ============================================================
   SEO Pilot - Pages publiques
   ============================================================ */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- Layout ---- */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1rem;
}

.page-header .logo,
.page-header .logo:visited,
.page-header .logo:hover,
.page-header .logo:active {
    display: inline-block;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.page-header .logo img {
    height: 40px;
    width: auto;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

.container-wide {
    max-width: 960px;
}

.page-footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
}

.page-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.page-footer a:hover {
    color: white;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.card-highlight {
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.4rem;
}

.form-group label .required {
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

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

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.3rem;
}

/* ---- Toggle Particulier / Pro ---- */
.toggle-group {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    border: none;
    background: transparent;
}

.toggle-option.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-option:hover:not(.active) {
    color: #1e293b;
}

/* ---- Payment Choice ---- */
/* ---- Plan Selector ---- */
.plan-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.plan-option {
    flex: 1;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
    position: relative;
}

.plan-option:hover {
    border-color: #93c5fd;
}

.plan-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.plan-option-pro.selected {
    border-color: #d97706;
    background: #fffbeb;
}

.plan-option input[type="radio"] {
    display: none;
}

.plan-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.plan-badge-standard {
    background: #dbeafe;
    color: #1e40af;
}

.plan-badge-pro {
    background: #fef3c7;
    color: #92400e;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    display: block;
    margin-bottom: 0.75rem;
}

.plan-price small {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
}

.plan-features {
    list-style: none;
    text-align: left;
    font-size: 0.85rem;
    color: #4b5563;
}

.plan-features li {
    padding: 0.2rem 0;
}

.plan-features li::before {
    content: '\2713';
    color: #059669;
    font-weight: 700;
    margin-right: 0.5rem;
}

.payment-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    flex: 1;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
}

.payment-option:hover {
    border-color: #93c5fd;
}

.payment-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    display: block;
}

.payment-option .price-detail {
    font-size: 0.8rem;
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}

.payment-option .label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
}

/* ---- Promo Code ---- */
.promo-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.promo-row .form-input {
    flex: 1;
    text-transform: uppercase;
}

.promo-result {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.promo-result.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.promo-result.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ---- Price Summary ---- */
.price-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.price-line.discount {
    color: #16a34a;
}

.price-line.total {
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.price-strikethrough {
    text-decoration: line-through;
    color: #94a3b8;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.4;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-outline {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Alerts ---- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ---- Licence Key Display ---- */
.licence-key-display {
    text-align: center;
    margin: 2rem 0;
}

.licence-key-display code {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    background: #f1f5f9;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 2px dashed #3b82f6;
    letter-spacing: 0.08em;
    color: #1e40af;
    cursor: pointer;
    transition: background 0.15s;
}

.licence-key-display code:hover {
    background: #e0f2fe;
}

.licence-key-display .copy-hint {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ---- Steps ---- */
.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.steps li {
    counter-increment: step;
    padding: 0.5rem 0 0.5rem 2.5rem;
    position: relative;
    font-size: 0.95rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---- Trial Banner ---- */
.trial-banner {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.trial-banner h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.trial-banner p {
    opacity: 0.9;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.trial-banner .btn {
    background: white;
    color: #059669;
    font-weight: 600;
}

.trial-banner .btn:hover {
    background: #f0fdf4;
}

/* ---- Legal Pages ---- */
.legal-content {
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    font-size: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    margin-bottom: 0.75rem;
    color: #475569;
}

.legal-content ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.25rem;
    color: #475569;
}

/* ---- Radio Group (Profil) ---- */
.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    accent-color: #3b82f6;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* ---- Spinner ---- */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* ---- PayPal Container ---- */
#paypal-button-container {
    min-height: 55px;
    margin-top: 1rem;
}

/* ---- Hidden ---- */
.hidden {
    display: none !important;
}

/* ---- Separator ---- */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.separator:not(:empty)::before {
    margin-right: 1rem;
}

.separator:not(:empty)::after {
    margin-left: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .page-header h1 {
        font-size: 1.35rem;
    }

    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

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

    .plan-options,
    .payment-options {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .licence-key-display code {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }

    .toggle-group {
        flex-direction: column;
    }
}
