/* ============================================
   TUVINBAR — Page "Цены / Pricing"
   S'appuie sur styles.css (variables, boutons, navbar, footer, modal)
   ============================================ */

.nav-links a.active {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Hero ---------- */
.pr-hero {
    position: relative;
    padding: 170px 0 70px;
    overflow: hidden;
    text-align: center;
}

.pr-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, var(--hero-radial-1), transparent 70%),
        radial-gradient(ellipse 40% 40% at 85% 40%, var(--hero-radial-2), transparent 70%);
    pointer-events: none;
}

.pr-hero .container { position: relative; }

.pr-hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 18px auto 20px;
    max-width: 900px;
}

.pr-hero .lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 760px;
    margin: 0 auto 34px;
}

.pr-hero-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.pr-fact {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: left;
}

.pr-fact strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--blue-light);
}

.pr-fact span {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: block;
    margin-top: 4px;
}

/* ---------- Sticky category nav ---------- */
.pr-chips-wrap {
    position: sticky;
    top: 78px;
    z-index: 50;
    background: var(--navbar-bg-scrolled);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.pr-chips {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.pr-chips::-webkit-scrollbar { display: none; }

.pr-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border-strong);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.pr-chip:hover { color: var(--text); border-color: var(--blue); }

.pr-chip.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* Les ancres ne doivent pas passer sous navbar + barre de catégories */
.pr-anchor { scroll-margin-top: 150px; }

/* ---------- Packages (3 offres phares) ---------- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 28px 28px;
    transition: var(--transition);
}

.plan-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.plan-card.featured {
    border: 1px solid var(--blue);
    box-shadow: 0 30px 70px -30px var(--blue-glow);
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 45%),
        var(--bg-card);
}

.plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    border-radius: 100px;
    background: var(--blue);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.plan-for {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 6px 0 22px;
    min-height: 2.8em;
}

.plan-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.plan-price .from {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.plan-price .amount {
    font-size: clamp(1.9rem, 3.2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.plan-sub {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 22px;
}

.plan-list {
    list-style: none;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-bottom: 26px;
    flex: 1;
}

.plan-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.plan-list li::before,
.price-includes li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 6px;
    width: 11px;
    height: 6px;
    border-left: 2px solid var(--blue-light);
    border-bottom: 2px solid var(--blue-light);
    transform: rotate(-45deg);
}

.plan-list li strong { color: var(--text); font-weight: 600; }

/* ---------- Petites entreprises : pack large en 2 colonnes ---------- */
.plan-card.smb-bundle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 48px;
    align-items: center;
    padding: 40px 40px 36px;
}

.smb-bundle .plan-for { min-height: 0; }
.smb-bundle .plan-sub { margin-bottom: 22px; }

.smb-bundle .plan-list {
    border-top: none;
    border-left: 1px solid var(--border);
    padding: 4px 0 4px 40px;
    margin-bottom: 0;
}

/* ---------- Catégories de tarifs détaillés ---------- */
.price-cat + .price-cat { margin-top: 80px; }

.price-cat-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
}

.price-cat-head .service-icon { margin-bottom: 0; flex-shrink: 0; }

.price-cat-head h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.price-cat-head p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-top: 6px;
    max-width: 760px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}

.price-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px 22px;
    transition: var(--transition);
}

.price-item:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: var(--bg-card-hover);
}

.price-item h3 {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.price-item > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 8px 0 14px;
}

.price-includes {
    list-style: none;
    margin-bottom: 18px;
    flex: 1;
}

.price-includes li {
    position: relative;
    padding-left: 22px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.45;
}

.price-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.price-val {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.price-val small {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

.price-term {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 3px;
}

.price-foot .btn { padding: 9px 18px; font-size: 0.82rem; }

/* Carte en bandeau sur toute la largeur de la grille */
.price-item-wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
    gap: 16px 36px;
}

.price-item-wide .piw-head p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

.price-item-wide .price-includes { margin: 0; }

.price-item-wide .price-foot {
    border-top: none;
    padding-top: 0;
    gap: 24px;
    flex-wrap: nowrap;
}

.price-flag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    background: rgba(37, 99, 235, 0.14);
    color: var(--blue-light);
}

/* ---------- Tableaux (taux horaires, marché) ---------- */
.pr-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.pr-table th,
.pr-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.pr-table thead th {
    background: var(--bg-2);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pr-table tbody tr:last-child td { border-bottom: none; }
.pr-table tbody tr:hover td { background: var(--bg-card-hover); }

.pr-table td.num,
.pr-table th.num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.pr-table td.ours {
    color: var(--blue-light);
    font-weight: 700;
}

.pr-table td small {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.pr-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.55;
}

/* ---------- Modèles de tarification & conditions ---------- */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
}

.model-card .model-ic {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 14px;
}

.model-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.model-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.model-card p + p { margin-top: 8px; }

.pay-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pay-step {
    padding: 24px;
    border-right: 1px solid var(--border);
}

.pay-step:last-child { border-right: none; }

.pay-step strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pay-step span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---------- Ce qui fait varier le prix ---------- */
.factors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.factor-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.factor-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.factor-box ul { list-style: none; }

.factor-box li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.factor-box li .feature-check { margin-top: 1px; }

.factor-box.minus .feature-check {
    background: rgba(107, 114, 128, 0.18);
    color: var(--gray);
}

/* ---------- FAQ ---------- */
.faq {
    max-width: 860px;
    margin: 0 auto;
}

.faq details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: var(--transition);
}

.faq details[open] { border-color: rgba(37, 99, 235, 0.4); }

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 56px 20px 24px;
    font-weight: 600;
    font-size: 0.98rem;
    position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--blue-light);
    transition: transform 0.25s ease;
}

.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq details > div {
    padding: 0 24px 20px;
    color: var(--text-muted);
    font-size: 0.93rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .plans-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
    .plan-card.featured { order: -1; }
    .pr-hero-facts { grid-template-columns: repeat(2, 1fr); }
    .plan-card.smb-bundle { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; padding: 34px 28px 28px; }
    .smb-bundle .plan-list { border-left: none; border-top: 1px solid var(--border); padding: 20px 0 0; }
    .smb-bundle .btn { width: 100%; }
    .price-item-wide { grid-template-columns: 1fr; gap: 14px; }
    .price-item-wide .price-foot { border-top: 1px solid var(--border); padding-top: 16px; flex-wrap: wrap; }
    /* Sur une colonne, le bouton passe sous la liste comme les autres packs */
    .plan-card.smb-bundle { gap: 0; }
    .smb-bundle .smb-bundle-main { display: contents; }
    .smb-bundle .plan-list { order: 1; margin-bottom: 26px; }
    .smb-bundle .smb-bundle-main .btn { order: 2; }
}

@media (max-width: 768px) {
    .pr-hero { padding: 130px 0 50px; }
    .pr-chips-wrap { top: 70px; }
    .pr-anchor { scroll-margin-top: 130px; }
    .price-grid { grid-template-columns: 1fr; }
    .factors { grid-template-columns: 1fr; }
    .pay-steps { grid-template-columns: 1fr; }
    .pay-step { border-right: none; border-bottom: 1px solid var(--border); }
    .pay-step:last-child { border-bottom: none; }
    .price-cat + .price-cat { margin-top: 60px; }

    /* Tableaux -> cartes empilées */
    .pr-table thead { display: none; }
    .pr-table, .pr-table tbody, .pr-table tr, .pr-table td { display: block; width: 100%; }
    .pr-table tr { padding: 14px 18px; border-bottom: 1px solid var(--border); }
    .pr-table tbody tr:last-child { border-bottom: none; }
    .pr-table td { padding: 5px 0; border: none; }
    .pr-table td.num { white-space: normal; }
    /* Libellé à gauche, valeur à droite */
    .pr-table td[data-label] {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: baseline;
        gap: 2px 12px;
        text-align: right;
    }
    .pr-table td[data-label]::before {
        content: attr(data-label);
        flex: 1 1 auto;
        text-align: left;
        color: var(--text-dim);
        font-size: 0.74rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .pr-table td[data-label] small { flex-basis: 100%; }
    .pr-table td:first-child { font-weight: 700; color: var(--text); padding-bottom: 8px; }
    .pr-table tbody tr:hover td { background: none; }
}

@media (max-width: 480px) {
    .pr-hero-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
    .pr-fact { padding: 14px 12px; }
    .pr-fact strong { font-size: 1.1rem; }
    .price-cat-head { flex-direction: column; gap: 12px; }
    .price-item { padding: 22px 18px 18px; }
    .price-foot { flex-direction: column; align-items: stretch; }
    .price-foot .btn { width: 100%; }
    .plan-card { padding: 30px 22px 24px; }
}
