/* ========================================
   ASSISTANCE À DISTANCE
   Compléments à service-detail-template.css :
   points clés, exemples, étapes, tarif et règlement.
======================================== */

/* Bouton secondaire : contour saphir */
.btn-outline-opti {
    background: transparent;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
    border: 2px solid var(--ui-accent-foreground, var(--brand-sapphire));
    padding: 16px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--ui-radius-button);
    cursor: pointer;
    transition: background-color var(--ui-transition), color var(--ui-transition), border-color var(--ui-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 58px;
    text-decoration: none;
}

.btn-outline-opti:hover {
    background: var(--brand-sapphire);
    border-color: var(--brand-sapphire);
    color: #fff;
}

.btn-outline-opti.large,
a.btn-primary-opti.large {
    width: 100%;
    padding-inline: 30px;
    font-size: 1.05rem;
}

a.btn-primary-opti {
    color: #fff;
    text-decoration: none;
}

.btn-outline-opti:disabled {
    opacity: 0.6;
    cursor: progress;
}

body.dark-theme .btn-outline-opti {
    color: var(--brand-blue-circuit);
    border-color: var(--brand-blue-circuit);
}

body.dark-theme .btn-outline-opti:hover {
    background: var(--brand-sapphire);
    border-color: var(--brand-sapphire);
    color: #fff;
}

/* ========================================
   SIMULATEUR
======================================== */
#tarif .price-big {
    white-space: nowrap;
}

.ad-simulator {
    max-width: 640px;
    margin: -10px auto 40px;
    padding: 24px 28px;
    background: #f8f9fa;
    border-radius: 14px;
    text-align: left;
}

body.dark-theme .ad-simulator {
    background: #2a2a2a;
}

.ad-simulator-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 14px;
}

.ad-simulator-head label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

body.dark-theme .ad-simulator-head label {
    color: #cbd5e1;
}

.ad-simulator-head output {
    white-space: nowrap;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
}

body.dark-theme .ad-simulator-head output {
    color: #fff;
}

.ad-simulator input[type="range"] {
    --ad-progress: 17%;
    width: 100%;
    height: 6px;
    margin: 6px 0 18px;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background: linear-gradient(90deg, var(--brand-sapphire) var(--ad-progress), #dfe3ea var(--ad-progress));
}

body.dark-theme .ad-simulator input[type="range"] {
    background: linear-gradient(90deg, var(--brand-blue-circuit) var(--ad-progress), #3a3a3a var(--ad-progress));
}

.ad-simulator input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--brand-sapphire);
    box-shadow: 0 2px 8px rgba(30, 30, 226, 0.35);
}

.ad-simulator input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--brand-sapphire);
}

.ad-simulator input[type="range"]:focus-visible {
    outline: 2px solid var(--brand-sapphire);
    outline-offset: 6px;
}

.ad-simulator-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.95rem;
    color: #666;
}

body.dark-theme .ad-simulator-result {
    border-color: #3a3a3a;
    color: #94a3b8;
}

.ad-simulator-result strong {
    color: #000;
}

body.dark-theme .ad-simulator-result strong {
    color: #fff;
}

.ad-simulator-result .ad-simulator-total {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-simulator-result .ad-simulator-total {
    color: var(--brand-blue-circuit);
}

.ad-simulator-note {
    margin: 14px 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #666;
}

body.dark-theme .ad-simulator-note {
    color: #94a3b8;
}


/* ========================================
   OUVERTURE ET INTERTITRES
======================================== */
.ad-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: -6px 0 30px;
    padding: 0;
    list-style: none;
}

.ad-hero-points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hero-title);
}

.ad-hero-points i {
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-hero-points i {
    color: var(--brand-blue-circuit);
}

.ad-intro {
    margin-top: var(--section-padding-y-compact);
}

.section-intro .ad-intro-text {
    max-width: 720px;
    margin: -6px auto 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #666;
}

body.dark-theme .section-intro .ad-intro-text {
    color: #94a3b8;
}

.ad-section {
    padding: var(--section-padding-y-compact) 0;
}

.ad-footnote {
    margin: 20px auto 0;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.6;
    text-align: center;
    color: #666;
}

body.dark-theme .ad-footnote {
    color: #94a3b8;
}

.ad-benefits {
    row-gap: clamp(24px, 3vw, 36px);
}

/* ========================================
   EXEMPLES CONCRETS
======================================== */
.ad-personas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.ad-persona {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 30px 32px;
    background: var(--background-box);
    border-radius: 16px;
    text-align: center;
}

.ad-persona-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: rgba(30, 30, 226, 0.1);
    color: var(--ui-accent-foreground, var(--brand-sapphire));
    font-size: 1.6rem;
    font-weight: 700;
}

body.dark-theme .ad-persona-avatar {
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-blue-circuit);
}

.ad-persona h3 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-persona h3 {
    color: var(--brand-blue-circuit);
}

.ad-persona-profile {
    margin: 0 0 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
}

body.dark-theme .ad-persona-profile {
    color: #fff;
}

.ad-persona-story {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #666;
}

body.dark-theme .ad-persona-story {
    color: #94a3b8;
}

/* ========================================
   ÉTAPES
======================================== */
.ad-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ad-step {
    padding: 28px 24px;
    background: var(--background-box);
    border-radius: 16px;
    text-align: center;
}

.ad-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--brand-sapphire);
    color: #fff;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.ad-step h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

body.dark-theme .ad-step h3 {
    color: #fff;
}

.ad-step p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
}

body.dark-theme .ad-step p {
    color: #94a3b8;
}

/* ========================================
   TARIF ET RÈGLEMENT
======================================== */
#tarif .price-big {
    white-space: nowrap;
}

.ad-rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 34px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.ad-rules li {
    display: flex;
    gap: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #666;
}

body.dark-theme .ad-rules li {
    color: #94a3b8;
}

.ad-rules i {
    flex: 0 0 auto;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-rules i {
    color: var(--brand-blue-circuit);
}

.ad-rules strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.98rem;
    color: #000;
}

body.dark-theme .ad-rules strong {
    color: #fff;
}

.ad-pay {
    max-width: 640px;
    margin: 0 auto;
    scroll-margin-top: 140px;
}

.ad-pay .sfait-cart-interract-container {
    margin-bottom: 20px;
}

.ad-pay > .btn-primary-opti.large {
    justify-content: center;
}

.ad-pay-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 0.88rem;
    color: #666;
}

body.dark-theme .ad-pay-hint {
    color: #94a3b8;
}

.ad-pay-hint + .ad-pay-hint {
    margin-top: 6px;
}

.ad-pay-hint a {
    font-weight: 600;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
    text-underline-offset: 3px;
}

body.dark-theme .ad-pay-hint a {
    color: var(--brand-blue-circuit);
}

.ad-pay-hint i {
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-pay-hint i {
    color: var(--brand-blue-circuit);
}

.ad-pay-active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #12744c;
}

body.dark-theme .ad-pay-active {
    color: #78dca6;
}

.ad-prepay-details {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

body.dark-theme .ad-prepay-details {
    border-color: #3a3a3a;
}

.ad-prepay-details summary {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 6px;
    font-size: 0.92rem;
    color: #666;
    cursor: pointer;
    list-style: none;
}

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

body.dark-theme .ad-prepay-details summary {
    color: #94a3b8;
}

.ad-prepay-details summary span {
    font-weight: 700;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.dark-theme .ad-prepay-details summary span {
    color: var(--brand-blue-circuit);
}

.ad-prepay-details summary:focus-visible {
    outline: 2px solid var(--brand-sapphire);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Prépaiement */
.ad-prepay {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
    margin: 20px auto 0;
}

.ad-prepay .btn-outline-opti.large {
    padding: 14px 20px;
    min-height: 52px;
    font-size: 0.98rem;
}

.ad-stepper {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 10px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 12px;
}

body.dark-theme .ad-stepper {
    background: #2a2a2a;
}

.ad-stepper-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: transparent;
    color: #000;
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color var(--ui-transition), color var(--ui-transition);
}

body.dark-theme .ad-stepper-button {
    border-color: #3a3a3a;
    color: #fff;
}

.ad-stepper-button:hover {
    border-color: var(--brand-sapphire);
    color: var(--brand-sapphire);
}

body.dark-theme .ad-stepper-button:hover {
    border-color: var(--brand-blue-circuit);
    color: var(--brand-blue-circuit);
}

.ad-stepper-value {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
}

.ad-stepper-value strong {
    font-size: 1.05rem;
    color: #000;
}

body.dark-theme .ad-stepper-value strong {
    color: #fff;
}

.ad-stepper-value span {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-stepper-value span {
    color: var(--brand-blue-circuit);
}

/* ========================================
   SUR PLACE
======================================== */
.ad-more {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.ad-more-card {
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    background: var(--background-box);
    border: 1px solid transparent;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: border-color var(--ui-transition), transform var(--ui-transition);
}

.ad-more-card:hover {
    border-color: var(--brand-sapphire);
    transform: translateY(-2px);
    color: inherit;
}

body.dark-theme .ad-more-card:hover {
    border-color: var(--brand-blue-circuit);
}

.ad-more-card > i {
    margin-bottom: 14px;
    font-size: 1.8rem;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-more-card > i {
    color: var(--brand-blue-circuit);
}

.ad-more-card h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #000;
}

body.dark-theme .ad-more-card h3 {
    color: #fff;
}

.ad-more-card p {
    margin-bottom: 18px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #666;
}

body.dark-theme .ad-more-card p {
    color: #94a3b8;
}

.ad-more-card span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ui-accent-foreground, var(--brand-sapphire));
}

body.dark-theme .ad-more-card span {
    color: var(--brand-blue-circuit);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1200px) {
    .ad-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .ad-more,
    .ad-personas {
        grid-template-columns: 1fr;
    }

    .ad-personas {
        max-width: 560px;
        margin-inline: auto;
    }
}

@media (max-width: 768px) {
    .ad-simulator {
        margin-bottom: 30px;
        padding: 20px;
    }

    .ad-rules {
        grid-template-columns: 1fr;
        gap: 14px;
    }

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

@media (max-width: 576px) {
    .ad-steps {
        grid-template-columns: 1fr;
    }

    .ad-simulator-result {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-opti-actions .btn-primary-opti,
    .hero-opti-actions .btn-outline-opti {
        width: 100%;
    }

    #tarif.pricing-section,
    #tarif > .page-container {
        padding-inline: 0;
    }

    #tarif .pricing-card {
        padding-inline: 18px;
    }

    .ad-simulator {
        padding: 18px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ad-more-card {
        transition: none;
    }

    .ad-more-card:hover {
        transform: none;
    }
}
