/*
 * Feuille du tunnel de vente newsletter.
 * Chargée après newsletter.css : elle ne définit ni couleur ni police, elle
 * consomme les variables de :root (--main, --text, --ff-title, --ff-text...)
 * et la base html font-size 62.5% (1rem = 10px).
 * Points de rupture : 768px (mobile / ordinateur), 992px (récapitulatif
 * collant), 1200px (largeur maximale de contenu).
 */

/* ------------------------------------------------------------------ shell */

.tunnel-page {
    background-color: var(--light);
    color: var(--text);
    font-family: var(--ff-text), sans-serif;
    font-size: var(--fz-text);
}

.tunnel-shell {
    width: 100%;
    max-width: 114rem;
    margin: 0 auto;
    padding: 0 1.6rem 12rem;
}

.tunnel-layout {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

.tunnel-title {
    font-family: var(--ff-title), sans-serif;
    color: var(--title);
    font-size: 2.2rem;
    line-height: 1.3;
    margin: 0 0 1.6rem;
}

.tunnel-subtitle {
    font-family: var(--ff-title), sans-serif;
    color: var(--accent);
    font-size: 1.8rem;
    margin: 0 0 1.2rem;
}

/* ------------------------------------------------------------------ étapes */

.tunnel-steps {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    margin: 0;
    padding: 2rem 0;
    font-size: 1.4rem;
}

.tunnel-steps__item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-grey);
}

.tunnel-steps__item::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 0.2rem solid currentColor;
    font-weight: bold;
}

.tunnel-steps__item[aria-current="step"] {
    color: var(--main);
    font-weight: bold;
}

.tunnel-steps__item[data-state="done"] {
    color: var(--accent);
}

/* ------------------------------------------------------------------ cartes */

.tunnel-card {
    background-color: var(--white);
    border: 0.1rem solid var(--grey-second);
    border-radius: 0.8rem;
    padding: 2rem 1.6rem;
}

.tunnel-card + .tunnel-card {
    margin-top: 1.6rem;
}

.tunnel-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1.6rem;
}

/* ----------------------------------------------------------- formulaires */

.tunnel-field-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.tunnel-field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
}

.tunnel-field__label {
    font-size: 1.4rem;
    color: var(--text-third);
}

.tunnel-field__control,
.tunnel-input {
    /* 4.4rem : cible tactile minimale de 44px */
    min-height: 4.4rem;
    padding: 1rem 1.2rem;
    border: 0.1rem solid var(--grey);
    border-radius: 0.4rem;
    background-color: var(--white);
    color: var(--text);
    font-family: var(--ff-text), sans-serif;
    font-size: 1.6rem;
}

.tunnel-field__control:focus-visible,
.tunnel-input:focus-visible,
.tunnel-button:focus-visible,
.tunnel-day:focus-visible {
    outline: 0.3rem solid var(--lightblue);
    outline-offset: 0.2rem;
}

.tunnel-field--invalid .tunnel-field__control,
.tunnel-field--invalid .tunnel-input {
    border-color: #c0392b;
}

/* L'état d'erreur est porté par le texte autant que par la couleur. */
.tunnel-field__error {
    display: none;
    font-size: 1.3rem;
    color: #c0392b;
}

.tunnel-field--invalid .tunnel-field__error {
    display: block;
}

.tunnel-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.4rem;
}

.tunnel-checkbox input {
    width: 2rem;
    height: 2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* -------------------------------------------------------------- boutons */

.tunnel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 4.4rem;
    padding: 1.2rem 2.4rem;
    border: 0.2rem solid transparent;
    border-radius: 0.4rem;
    background-color: var(--main);
    color: var(--white);
    font-family: var(--ff-title), sans-serif;
    font-size: 1.6rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tunnel-button:hover {
    background-color: var(--accent);
}

.tunnel-button--secondary {
    background-color: var(--white);
    border-color: var(--main);
    color: var(--accent);
}

.tunnel-button--secondary:hover {
    background-color: var(--third);
}

.tunnel-button--ghost {
    background-color: transparent;
    color: var(--accent);
    text-decoration: underline;
}

.tunnel-button[disabled],
.tunnel-button[aria-disabled="true"] {
    background-color: var(--grey-second);
    border-color: var(--grey-second);
    color: var(--dark-grey);
    cursor: not-allowed;
}

.tunnel-button[data-loading="true"] {
    pointer-events: none;
}

.tunnel-button[data-loading="true"]::after {
    content: "";
    width: 1.6rem;
    height: 1.6rem;
    border: 0.2rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: tunnel-spin 0.8s linear infinite;
}

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

/* ------------------------------------------------------------- compteurs */

.tunnel-counter {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.tunnel-counter__button {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    border: 0.2rem solid var(--main);
    background-color: var(--white);
    color: var(--accent);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.tunnel-counter__button[disabled] {
    border-color: var(--grey-second);
    color: var(--grey);
    cursor: not-allowed;
}

.tunnel-counter__value {
    min-width: 3rem;
    text-align: center;
    font-family: var(--ff-title), sans-serif;
    font-size: 1.8rem;
}

/* ------------------------------------------------------------- calendrier */

.tunnel-panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    flex-direction: column;
    background-color: var(--white);
}

.tunnel-panel[data-open="true"] {
    display: flex;
}

.tunnel-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.6rem;
    border-bottom: 0.1rem solid var(--grey-second);
}

.tunnel-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.6rem;
}

/* Le défilement de la page est neutralisé pendant l'affichage d'un panneau. */
.tunnel-scroll-locked {
    overflow: hidden;
}

.tunnel-calendar__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.6rem;
    border-bottom: 0.1rem solid var(--grey-second);
}

.tunnel-calendar__month {
    font-family: var(--ff-title), sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--title);
    letter-spacing: 0.02em;
}

.tunnel-calendar__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tunnel-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 8.4rem;
    padding: 0.8rem;
    border: 0.1rem solid var(--grey-second);
    border-radius: 0.6rem;
    background-color: var(--white);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tunnel-day:hover {
    border-color: var(--main);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-0.2rem);
}

.tunnel-day__number {
    font-family: var(--ff-title), sans-serif;
    font-size: 1.7rem;
    font-weight: 600;
}

.tunnel-day__price {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent);
}

.tunnel-day__price-before {
    font-size: 1.2rem;
    color: var(--text-grey);
    text-decoration: line-through;
}

/* Le suffixe "/curiste" n'a pas de classe dédiée dans le balisage existant : on l'atténue par
   position pour que le prix reste l'élément le plus visible de la case. */
.tunnel-day span:not([class]) {
    font-size: 1.1rem;
    color: var(--text-grey);
}

.tunnel-day__promo {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--white);
    background-color: var(--main);
}

/* Indisponible : signalé par le libellé (déjà porté par le contenu de la case), le contraste
   et une texture hachurée, pour rester lisible même sans distinguer les couleurs. */
.tunnel-day[aria-disabled="true"] {
    background-color: var(--light-grey);
    background-image: repeating-linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.04) 0,
        rgba(0, 0, 0, 0.04) 0.2rem,
        transparent 0.2rem,
        transparent 0.6rem
    );
    border-color: var(--grey-second);
    color: var(--dark-grey);
    cursor: not-allowed;
    box-shadow: none;
}

.tunnel-day[aria-disabled="true"]:hover {
    border-color: var(--grey-second);
    box-shadow: none;
    transform: none;
}

.tunnel-day[aria-pressed="true"] {
    position: relative;
    border-color: var(--main);
    border-width: 0.2rem;
    background-color: var(--third);
    font-weight: bold;
    box-shadow: 0 0 0 0.3rem rgba(50, 188, 166, 0.2), 0 4px 12px 0 rgba(0, 0, 0, 0.12);
}

/* Marqueur de sélection indépendant de la couleur (contraste/daltonisme). */
.tunnel-day[aria-pressed="true"]::after {
    content: "✓";
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--main);
}

.tunnel-calendar__empty,
.tunnel-message {
    padding: 1.6rem;
    border-radius: 0.4rem;
    background-color: var(--bgblue);
    font-size: 1.5rem;
}

.tunnel-message--error {
    background-color: #fdecea;
    color: #a5281b;
}

/* ------------------------------------------------------------ récapitulatif */

.tunnel-recap {
    background-color: var(--white);
    border: 0.1rem solid var(--grey-second);
    border-radius: 0.8rem;
    padding: 2rem 1.6rem;
}

.tunnel-recap__line {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.8rem 0;
    font-size: 1.5rem;
}

.tunnel-recap__line--total {
    border-top: 0.1rem solid var(--grey-second);
    margin-top: 0.8rem;
    padding-top: 1.2rem;
    font-family: var(--ff-title), sans-serif;
    font-size: 1.8rem;
    color: var(--title);
}

.tunnel-recap__note {
    font-size: 1.3rem;
    color: var(--text-grey);
}

/* Barre de total fixe sur mobile ; remplacée par le récapitulatif collant
   à partir de 992px. */
.tunnel-total-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.2rem 1.6rem;
    background-color: var(--white);
    border-top: 0.1rem solid var(--grey-second);
    box-shadow: 0 -0.2rem 0.8rem rgba(10, 72, 93, 0.12);
}

.tunnel-total-bar__amount {
    font-family: var(--ff-title), sans-serif;
    font-size: 2rem;
    color: var(--title);
}

.tunnel-total-bar__toggle {
    background: none;
    border: 0;
    color: var(--accent);
    font-size: 1.4rem;
    text-decoration: underline;
    cursor: pointer;
}

/* ------------------------------------------------------------ utilitaires */

.tunnel-visually-hidden {
    position: absolute;
    width: 0.1rem;
    height: 0.1rem;
    margin: -0.1rem;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.tunnel-hidden {
    display: none !important;
}

/* ---------------------------------------------------------- 768px et plus */

@media (min-width: 768px) {
    .tunnel-shell {
        padding: 0 2.4rem 6rem;
    }

    .tunnel-title {
        font-size: 2.8rem;
    }

    .tunnel-card {
        padding: 2.4rem;
    }

    /* Panneau ancré : le titre et le prix de la page restent visibles. */
    .tunnel-panel {
        position: absolute;
        inset: auto;
        width: min(72rem, calc(100vw - 4.8rem));
        max-height: 70vh;
        border: 0.1rem solid var(--grey-second);
        border-radius: 0.8rem;
        box-shadow: 0 0.8rem 2.4rem rgba(10, 72, 93, 0.18);
    }

    .tunnel-scroll-locked {
        overflow: auto;
    }

    .tunnel-total-bar {
        display: none;
    }
}

/* ---------------------------------------------------------- 992px et plus */

@media (min-width: 992px) {
    .tunnel-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 3.2rem;
    }

    .tunnel-layout__main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .tunnel-layout__aside {
        flex: 0 0 34rem;
    }

    .tunnel-recap {
        position: sticky;
        top: 2.4rem;
    }
}

/* --------------------------------------------------------- 1200px et plus */

@media (min-width: 1200px) {
    .tunnel-shell {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ---------------------------------------------------- popup assurance */

.modal-mahii-header.modal-header-m8t6y {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--text);
}

.modal-mahii-header-title.modal-title-b1n4v {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    color: #fff;
}

.close-icon.close-icon-l7h2s {
    font-size: 2.4rem;
    cursor: pointer;
}

.modal-mahii-header.modal-header-m8t6y .close-icon::before,
.modal-mahii-header.modal-header-m8t6y .close-icon::after {
    background-color: #fff;
}

.modal-mahii-content-inner.modal-inner-j5k9d {
    padding: 2rem;
}

.insurance-options.insurance-options-f2w8x {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.insurance-plan.insurance-plan-z6y3u,
.no-insurance-option.no-insurance-option-t1s9w {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
}

.assurance-logo {
    flex-shrink: 0;
    width: 7.5rem;
    height: 6.5rem;
    object-fit: contain;
}

.insurance-label-q9c7m,
.no-insurance-label-k3d6f {
    font-size: 1.4rem;
    position: initial !important;
    min-height: unset !important;
}

.no-insurance-label-k3d6f {
    margin-left: 3rem;
    color: var(--text);
}

.insurance-label-q9c7m::after,
.no-insurance-label-k3d6f::after {
    left: 2rem !important;
}

.insurance-label-q9c7m::before,
.no-insurance-label-k3d6f::before {
    left: 2.3rem !important;
}

.assurance-links {
    margin-top: 1.2rem;
    color: var(--text);
    font-size: 1.3rem;
}

.validate-button.button-container-g7m2n,
.insurance-buttons.button-container-g7m2n {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.submit-btn.validate-button-x5v8r,
.choose-insurance.choose-insurance-a9f3d,
.no-insurance.no-insurance-button-w7r1v {
    display: block;
    width: 100%;
    padding: 1.4rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--ff-title), sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.submit-btn.validate-button-x5v8r,
.choose-insurance.choose-insurance-a9f3d {
    background-color: var(--main);
    color: var(--white);
}

.submit-btn.validate-button-x5v8r:hover,
.choose-insurance.choose-insurance-a9f3d:hover {
    background-color: var(--accent);
}

.no-insurance.no-insurance-button-w7r1v {
    background-color: var(--third);
    color: var(--text);
    border: 1px solid var(--text);
}

.no-insurance.no-insurance-button-w7r1v:hover {
    background-color: var(--light-grey);
}

.insurance-message.warning-message-y2u4i {
    margin-bottom: 2rem;
    color: var(--text);
}

.warning-text-e8w1c {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    line-height: 1.5;
}

.warning-text-first {
    font-size: 1.8rem !important;
}

.blue-background {
    background-color: var(--main);
    color: var(--white);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.with {
    display: inline;
}

.amount-desc-mah {
    color: var(--text);
    margin-top: 1rem;
    font-size: 1.4rem;
    line-height: 1.5;
}

.modal-content-p3q2r {
    width: 56rem;
    max-width: 100%;
}

#insurance-price-wr {
    font-weight: 400;
}

@media (max-width: 480px) {
    .modal-mahii-header-title.modal-title-b1n4v {
        font-size: 1.6rem;
    }

    .insurance-plan.insurance-plan-z6y3u {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .assurance-logo {
        margin-left: 0;
    }

    .insurance-label-q9c7m,
    .no-insurance-label-k3d6f,
    .warning-text-e8w1c,
    .submit-btn.validate-button-x5v8r,
    .no-insurance.no-insurance-button-w7r1v,
    .choose-insurance.choose-insurance-a9f3d {
        font-size: 1.3rem;
    }

    .no-insurance-label-k3d6f {
        margin-left: 0;
    }
}

/* CGV — tunnel-info : libellé et lien sur une seule ligne */
.tunnel-cgv.filters-list-checkbox {
    border-bottom: none;
}

.tunnel-cgv.filters-list-checkbox label {
    padding-right: 3.6rem;
}

.tunnel-cgv .cgv-link {
    display: inline;
    position: static;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    text-decoration: underline;
}

/* Google Places — suggestions au-dessus du récap / loader */
.pac-container {
    z-index: 100010 !important;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}

.paiement-tunnel-info {
    margin: auto;
    width: 800px;
    max-width: 100%;
}

.paiement-tunnel-info #adresse {
    background-color: #fff;
    opacity: 1;
}

/* Pas de scroll horizontal parasite sur les pages tunnel */
body.tunnel-page {
    overflow-x: clip;
}

/* ---------------------------------------------------- barre prix mobile (devis) */

@media (max-width: 767px) {
    /* Trustpilot : margin-left négatif hérité de newsletter.css → déborde en X */
    body.tunnel-page .simple-header .header-trustpilot {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .tunnel-price.mobile {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        margin-left: 0;
        width: 100%;
        height: 5rem;
        padding: 0 1.6rem;
        gap: 1.2rem;
        box-shadow: 0 -0.2rem 0.8rem rgba(10, 72, 93, 0.2);
    }

    .tunnel-price__label {
        flex-shrink: 0;
        font-size: 1.3rem;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    .tunnel-price__amount {
        flex-shrink: 0;
        margin-left: auto;
        font-family: var(--ff-title), sans-serif;
        font-size: 2rem;
        font-weight: bold;
        white-space: nowrap;
    }

    .tunnel-price__amount .price-marker {
        font-size: inherit;
    }

    .tunnel-price-spacer.mobile {
        height: 5rem;
    }

    /* Le spacer réserve déjà l'espace pour la barre fixe */
    body.has-tunnel-price-bar .tunnel-form {
        padding-bottom: 0;
    }

    /*
     * Widgets flottants : au-dessus de la barre prix (géré aussi en JS
     * car Axeptio utilise #axeptio_main_button dans .ax-website-overlay).
     */
    body.has-tunnel-price-bar #axeptio_overlay .ax-website-overlay.is-collapsed {
        bottom: var(--tunnel-floating-offset, calc(5rem + 1.2rem + env(safe-area-inset-bottom, 0px))) !important;
        z-index: 80;
    }

    body.has-tunnel-price-bar .crisp-client .tunnel-crisp-launcher {
        bottom: var(--tunnel-floating-offset, calc(5rem + 1.2rem + env(safe-area-inset-bottom, 0px))) !important;
        z-index: 80;
    }
}
