/* =============================================================================
   Modale pricing — style SaaS Pro compact (tient sans scroll sur desktop)
   Inspiration: Stripe / Linear / Notion landing
   ============================================================================= */

@import url('https://rsms.me/inter/inter.css');

#mqs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

#mqs-modal-backdrop.mqs-modal-open {
    opacity: 1;
    pointer-events: auto;
}

#mqs-modal-backdrop[hidden] {
    display: none;
}

#mqs-modal {
    background: #f5f5f7;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s ease;
    position: relative;
    color: #0a0a0a;
    padding: 28px 32px 22px;
}

#mqs-modal-backdrop.mqs-modal-open #mqs-modal {
    transform: translateY(0) scale(1);
}

@media (max-width: 600px) {
    #mqs-modal-backdrop {
        padding: 12px;
    }
    #mqs-modal {
        padding: 22px 16px 16px;
        border-radius: 16px;
        max-height: calc(100vh - 24px);
    }
}

#mqs-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 10;
}

#mqs-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0a0a0a;
}

#mqs-modal-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* === Step header — compact === */
.mqs-step-header {
    text-align: center;
    margin-bottom: 22px;
}

.mqs-step-eyebrow {
    font-size: 0.66rem;
    color: #6b7280;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}

.mqs-step-title {
    font-size: clamp(1.4rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: #0a0a0a;
    margin: 4px 0 4px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-family: inherit;
}

.mqs-step-sub {
    font-size: 0.82rem;
    color: #6b7280;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.45;
    letter-spacing: -0.005em;
}

@media (max-width: 600px) {
    .mqs-step-header {
        margin-bottom: 16px;
    }
    .mqs-step-title {
        font-size: 1.3rem;
    }
    .mqs-step-sub {
        font-size: 0.78rem;
    }
}

/* === Plans grid : 3 cards equal width === */
.mqs-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

@media (max-width: 760px) {
    .mqs-plans {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 14px;
    }
}

/* === Plan card — compact === */
.mqs-plan {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 18px 16px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
}

.mqs-plan:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.mqs-plan.mqs-plan-selected {
    border-color: #0a0a0a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* === Plan POPULAR : background lavender === */
.mqs-plan.mqs-plan-popular {
    background: #e8e9ff;
    border-color: transparent;
}

.mqs-plan.mqs-plan-popular.mqs-plan-selected {
    border-color: #0a0a0a;
}

/* === Eyebrow badge (compact pill) === */
.mqs-plan-eyebrow {
    font-size: 0.62rem;
    color: #6b7280;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    background: #f4f4f5;
    padding: 4px 10px;
    border-radius: 999px;
    align-self: flex-start;
    margin-bottom: 12px;
    display: inline-block;
}

.mqs-plan-popular .mqs-plan-eyebrow {
    background: #ffffff;
    color: #0a0a0a;
    font-weight: 700;
}

/* === Prix — gros mais pas geant === */
.mqs-plan-price-line {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: 8px;
    line-height: 1;
}

.mqs-plan-price {
    font-size: 1.85rem;
    font-weight: 700;
    color: #0a0a0a;
    letter-spacing: -0.04em;
    line-height: 1;
    font-family: inherit;
}

.mqs-plan-period {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.mqs-plan-description {
    font-size: 0.76rem;
    color: #6b7280;
    margin: 0 0 14px;
    line-height: 1.4;
    min-height: 2.8em; /* aligne les CTA des 3 cards meme si descriptions longueurs differentes */
}

@media (max-width: 760px) {
    .mqs-plan-description {
        min-height: 0;
    }
}

/* === Bouton CTA dans chaque card : noir pill === */
.mqs-plan-cta {
    background: #0a0a0a;
    color: #ffffff;
    border: 0;
    padding: 10px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    width: 100%;
    margin-bottom: 14px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mqs-plan-cta:hover {
    background: #1a1a1a;
}

/* === Features list — compacte === */
.mqs-plan-features {
    list-style: none;
    padding: 12px 0 0;
    margin: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex: 1;
}

.mqs-plan-popular .mqs-plan-features {
    border-top-color: rgba(0, 0, 0, 0.12);
}

.mqs-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.76rem;
    color: #4b5563;
    line-height: 1.4;
    letter-spacing: -0.005em;
}

.mqs-plan-features li:last-child {
    margin-bottom: 0;
}

.mqs-plan-features li svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    margin-top: 4px;
    stroke: #6b7280;
    stroke-width: 2.5;
    fill: none;
}

.mqs-plan-popular .mqs-plan-features li {
    color: #1a1a1a;
}

.mqs-plan-popular .mqs-plan-features li svg {
    stroke: #0a0a0a;
}

/* === Footer / Trust line — compact === */
.mqs-modal-footer {
    text-align: center;
}

.mqs-trust {
    color: #9ca3af;
    font-size: 0.72rem;
    line-height: 1.4;
    margin: 0;
    letter-spacing: -0.005em;
}

.mqs-trust strong {
    color: #4b5563;
    font-weight: 600;
}

/* =============================================================================
   STEP B — Choix du domaine (suggestions list + custom input + footer)
   ============================================================================= */

.mqs-domain-list {
    /* Fenêtre scrollable interne : ~4 rows visibles max, scroll vertical
       pour le reste. Évite la croissance verticale de la modale (= plus de
       scroll global, le bouton "Continuer" reste visible sans avoir à
       scroller la modale entière). */
    --mqs-domain-row-h: 50px;       /* hauteur approx d'1 row (padding 14×2 + texte) */
    --mqs-domain-list-gap: 6px;
    max-height: calc(var(--mqs-domain-row-h) * 4 + var(--mqs-domain-list-gap) * 3);
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 0 14px 0;
    padding-right: 4px;             /* léger espace pour la scrollbar custom */
    display: flex;
    flex-direction: column;
    gap: var(--mqs-domain-list-gap);
    /* Scrollbar discrète (Chromium/Edge/Safari) */
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.mqs-domain-list::-webkit-scrollbar {
    width: 6px;
}
.mqs-domain-list::-webkit-scrollbar-track {
    background: transparent;
}
.mqs-domain-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}
.mqs-domain-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.mqs-domain-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mqs-domain-row:hover {
    border-color: #c5c7cc;
    background: #fafafa;
}

.mqs-domain-row.mqs-domain-selected {
    border-color: #0a0a0a;
    border-width: 2px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 13px 17px; /* compense la border 2px */
}

.mqs-domain-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0a0a0a;
    letter-spacing: -0.01em;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mqs-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.mqs-badge-offert {
    background: #dcfce7;
    color: #14532d;
}

.mqs-badge-supplement {
    background: #fef3c7;
    color: #92400e;
}

/* Domaine déjà pris (gris, non-cliquable) */
.mqs-badge-pris {
    background: #f3f4f6;
    color: #6b7280;
}

/* Domaine en cours de vérification (spinner + texte) */
.mqs-badge-pending {
    background: #f4f4f5;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mqs-mini-spinner {
    width: 12px;
    height: 12px;
    border: 1.5px solid #d1d5db;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: mqs-spin-mini 0.8s linear infinite;
    display: inline-block;
}

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

/* Row d'un domaine déjà pris : opacité réduite, non-cliquable */
.mqs-domain-row.mqs-domain-taken {
    opacity: 0.5;
    cursor: not-allowed;
    background: #fafafa;
}
.mqs-domain-row.mqs-domain-taken:hover {
    background: #fafafa;
    border-color: var(--mqs-border, #e5e7eb);
    transform: none;
}
.mqs-domain-row.mqs-domain-taken .mqs-domain-name {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Row en attente du check OVH : visuel neutre */
.mqs-domain-row.mqs-domain-pending {
    cursor: progress;
}
.mqs-domain-row.mqs-domain-pending:hover {
    transform: none;
}

/* === Skeleton loading rows === */
.mqs-domain-row.mqs-skeleton {
    pointer-events: none;
    cursor: default;
    background: #f9fafb;
    border-color: #f3f4f6;
}

.mqs-skel-text, .mqs-skel-badge {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: mqs-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 6px;
}
.mqs-skel-text { height: 14px; width: 60%; }
.mqs-skel-badge { height: 22px; width: 70px; border-radius: 999px; }

@keyframes mqs-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === Divider "ou" === */
.mqs-domain-divider {
    text-align: center;
    color: #9ca3af;
    font-size: 0.78rem;
    margin: 16px 0;
    position: relative;
}

.mqs-domain-divider::before,
.mqs-domain-divider::after {
    content: '';
    display: inline-block;
    width: 38%;
    height: 1px;
    background: #e5e7eb;
    vertical-align: middle;
    margin: 0 12px;
}

/* === Custom input block === */
.mqs-custom-block {
    margin-bottom: 18px;
}

.mqs-custom-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}

.mqs-custom-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.mqs-custom-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    color: #0a0a0a;
    letter-spacing: -0.01em;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.mqs-custom-input:focus {
    outline: 0;
    border-color: #0a0a0a;
}

.mqs-custom-tld {
    padding: 12px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    color: #0a0a0a;
    cursor: pointer;
}

.mqs-btn-check {
    background: #ffffff;
    color: #0a0a0a;
    border: 1.5px solid #0a0a0a;
    padding: 12px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.mqs-btn-check:hover {
    background: #f3f4f6;
}

.mqs-btn-check:disabled {
    opacity: 0.6;
    cursor: progress;
}

.mqs-custom-result {
    margin-top: 10px;
}

.mqs-custom-error {
    color: #dc2626;
    font-size: 0.82rem;
    margin: 0;
}

.mqs-empty-state {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    padding: 30px 12px;
    margin: 0;
}

/* === Footer Step B / Step C : back + continue === */
.mqs-footer-stepb,
.mqs-footer-stepc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.mqs-btn-back {
    background: transparent;
    border: 0;
    color: #6b7280;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}

.mqs-btn-back:hover {
    color: #0a0a0a;
    background: rgba(0, 0, 0, 0.04);
}

.mqs-btn-continue {
    background: #0a0a0a;
    color: #ffffff;
    border: 0;
    padding: 13px 28px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.mqs-btn-continue:hover:not(:disabled) {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.mqs-btn-continue:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .mqs-footer-stepb,
    .mqs-footer-stepc {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .mqs-btn-continue {
        width: 100%;
    }
    .mqs-btn-back {
        width: 100%;
    }
    .mqs-custom-input-row {
        flex-wrap: wrap;
    }
    .mqs-custom-input {
        flex-basis: calc(70% - 4px);
    }
    .mqs-custom-tld {
        flex-basis: calc(30% - 4px);
    }
    .mqs-btn-check {
        flex-basis: 100%;
        order: 3;
    }
}

/* =============================================================================
   STEP C — Email + résumé + paiement
   ============================================================================= */

.mqs-summary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
}

.mqs-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
}

.mqs-summary-row + .mqs-summary-row {
    border-top: 1px solid #f3f4f6;
}

.mqs-summary-label {
    font-size: 0.78rem;
    color: #6b7280;
    letter-spacing: -0.005em;
    flex-shrink: 0;
}

.mqs-summary-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0a0a0a;
    text-align: right;
    letter-spacing: -0.01em;
}

.mqs-summary-note {
    border-top: 0 !important;
    padding-top: 0 !important;
}

.mqs-summary-sub {
    font-size: 0.74rem;
    color: #9ca3af;
    text-align: right;
    line-height: 1.4;
}

.mqs-email-block {
    margin-bottom: 14px;
}

.mqs-email-input {
    width: 100%;
}

/* === CGV checkbox block === */
.mqs-cgv-block {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.mqs-cgv-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.mqs-cgv-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 1px 0 0 0;
    cursor: pointer;
    accent-color: #0a0a0a;
}

.mqs-cgv-text {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #4b5563;
    letter-spacing: -0.005em;
}

.mqs-cgv-link {
    color: #0a0a0a;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.mqs-cgv-link:hover {
    color: #1a1a1a;
}
