/* ============================================================
   PAN RDV — tiroir de contact SEUL (extrait de pan-rdv.css)
   Chargé sur les pages qui portent [pan_estim_banner], hors
   /prise-de-rdv/ (qui charge pan-rdv.css en entier).
   Le composant .ib-btn est limité à .ltpn-contact-layer pour
   ne pas masquer les autres boutons de la page (opacity:0).
   ============================================================ */

:root { --pan-yellow:#fbcb07; --pan-dark:#111; --pan-gray:#555; --pan-white:#fff; --goodland:'Montserrat',sans-serif; }
.ltpn-contact-layer, .ltpn-contact-layer *, .ltpn-contact-layer *::before, .ltpn-contact-layer *::after { box-sizing: border-box; }

/* ── Contact drawer (repris de LTPN stack.css) ───────────── */

.ltpn-contact-layer {
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 9998;
}

.ltpn-contact-layer.is-open {
    pointer-events: auto;
}

.ltpn-contact-layer__backdrop {
    /* Blur fixe — c'est l'opacité seule qui fait le fondu */
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    background:
        radial-gradient(circle at 20% 18%, rgba(248, 248, 245, .42), transparent 34%),
        linear-gradient(115deg, rgba(27, 38, 47, .72), rgba(27, 38, 47, .42) 48%, rgba(248, 248, 245, .30));
    border: 0;
    cursor: pointer;
    inset: 0;
    margin: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    transition: opacity 500ms ease;
}

.ltpn-contact-layer.is-open .ltpn-contact-layer__backdrop {
    opacity: 1;
}

.ltpn-contact-drawer {
    background: linear-gradient(180deg, #05083a 0%, #1d274f 30%, #6f8794 72%, #adcfd1 100%);

    border-radius: 18px;
    box-shadow: 0 34px 86px rgba(0, 0, 0, .28);
    color: #fff;
    font-family: var(--goodland);
    height: min(86vh, 790px);
    max-width: min(496px, calc(100vw - 56px));
    overflow: hidden;
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%) translateX(30px);
    transition:
        opacity 600ms cubic-bezier(.16, .72, .18, 1),
        transform 600ms cubic-bezier(.16, .72, .18, 1);
    width: 100%;
    z-index: 1;
    opacity: 0;
}

.ltpn-contact-layer.is-open .ltpn-contact-drawer {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

h2#pan-contact-title {
    color: #fff;
}

.ltpn-contact-drawer__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .6);
    cursor: pointer;
    font-size: 18px;
    padding: 16px 20px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    transition: color 200ms;
}

.ltpn-contact-drawer__close:hover {
    color: #fff;
}

.ltpn-contact-drawer__inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    overflow-y: auto;
    padding: 36px 32px 32px;
    scrollbar-width: none;
}

.ltpn-contact-drawer__inner::-webkit-scrollbar { display: none; }

.ltpn-contact-drawer__section {
    padding: 12px 0;
}

.ltpn-contact-drawer__section--details {
    flex-shrink: 0;
}

.ltpn-contact-drawer__section--form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.ltpn-contact-drawer__rule {
    background: rgba(255, 255, 255, .16);
    border: none;
    height: 1px;
    margin: 14px 0;
}

/* Mask animation */
.ltpn-contact-mask {
    display: block;
    overflow: hidden;
}

.ltpn-contact-mask > span {
    display: block;
}

/* Titles */
#pan-contact-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.ltpn-contact-drawer__phone {
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .04em;
    text-decoration: none;
}

/* ── Form slider ─────────────────────────────────────────── */

.ltpn-contact-form-slider {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.ltpn-contact-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.ltpn-contact-form__track {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.ltpn-contact-form__slide {
    border: none;
    margin: 0;
    padding: 0;
    display: none;
}

[data-contact-form-step="1"] .ltpn-contact-form__slide[data-contact-form-slide="1"],
[data-contact-form-step="2"] .ltpn-contact-form__slide[data-contact-form-slide="2"],
[data-contact-form-step="3"] .ltpn-contact-form__slide[data-contact-form-slide="3"] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Step 1 — Question */
.ltpn-contact-form__question {
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

/* Radio choices */
.ltpn-contact-choice {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    user-select: none;
}

.ltpn-contact-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ltpn-contact-choice__mark {
    border: 1.5px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    height: 18px;
    position: relative;
    transition: border-color 200ms;
    width: 18px;
}

.ltpn-contact-choice__mark::after {
    background: var(--pan-yellow);
    border-radius: 50%;
    content: '';
    height: 8px;
    left: 50%;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) scale(.5);
    transition: opacity 200ms, transform 200ms;
    width: 8px;
}

.ltpn-contact-choice input:checked ~ .ltpn-contact-choice__mark {
    border-color: var(--pan-yellow);
}

.ltpn-contact-choice input:checked ~ .ltpn-contact-choice__mark::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ltpn-contact-choice .ltpn-contact-mask > span {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

/* Next button */
.ltpn-contact-form__next {
    margin-top: 0;
}

/* Step 2 — Fields */
.ltpn-contact-field {
    display: block;
    margin-bottom: 32px;
    position: relative;
}

.ltpn-contact-field input,
.ltpn-contact-field textarea {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    color: #fff;
    display: block;
    font-family: var(--goodland);
    font-size: 14px;
    outline: none;
    padding: 14px 14px 6px;
    transition: border-color 200ms;
    width: 100%;
}

.ltpn-contact-field textarea {
    height: 88px;
    resize: none;
}

.ltpn-contact-field input:focus,
.ltpn-contact-field textarea:focus {
    border-color: rgba(255, 255, 255, .6);
}

.ltpn-contact-field input::placeholder,
.ltpn-contact-field textarea::placeholder { opacity: 0; }

/* Label 1 — dans le champ, #333, disparaît au focus */
.ltpn-contact-field__label-in {
    color: #333;
    font-family: var(--goodland);
    font-size: 13px;
    left: 14px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 160ms ease;
    white-space: nowrap;
}

.ltpn-contact-field--message .ltpn-contact-field__label-in {
    color: #333;
    top: 14px;
    transform: none;
}

.ltpn-contact-field--message textarea {
    background: #fff;
    border-color: rgba(0, 0, 0, .15);
    color: #333;
}

.ltpn-contact-field--message textarea:focus {
    border-color: rgba(0, 0, 0, .4);
}

.ltpn-contact-field.is-focused .ltpn-contact-field__label-in,
.ltpn-contact-field.has-value .ltpn-contact-field__label-in {
    opacity: 0;
}

/* Label 2 — sous le champ, #fff, slide du haut vers le bas au focus */
.ltpn-contact-field__label-out {
    color: #fff;
    font-family: var(--goodland);
    font-size: 11px;
    left: 14px;
    position: absolute;
    top: 100%;
    height: 16px;
    overflow: hidden;
    white-space: nowrap;
}

.ltpn-contact-field__label-out > span {
    display: block;
    transform: translateY(-100%);
    transition: transform 260ms cubic-bezier(.16, .72, .18, 1);
}

.ltpn-contact-field.is-focused .ltpn-contact-field__label-out > span,
.ltpn-contact-field.has-value .ltpn-contact-field__label-out > span {
    transform: translateY(0);
}

.ltpn-contact-field__hint { display: none; }

/* Footer — poussé en bas de chaque slide */
.ltpn-contact-form__footer {
    margin-top: auto;
}

/* Actions */
.ltpn-contact-form__actions {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* Retour — juste la flèche : même blob jaune que « Suivant », en miroir
   horizontal → pointe à gauche. Pas de label, pas de contour blanc. */
.ltpn-contact-form__prev .ib-btn__blob svg,
.ltpn-contact-form__prev .ib-btn__blob::before {
    transform: scaleX(-1);
}

.ltpn-contact-form__send:disabled {
    opacity: .5;
    pointer-events: none;
}

/* ── Animation titre lettre par lettre ───────────────────── */

@keyframes pan-title-letter {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes pan-rule-expand {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes pan-subtitle-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

@keyframes pan-field-in {
    from { opacity: 0; transform: translateX(-36px); }
    to   { opacity: 1; transform: none; }
}

@keyframes pan-btn-exit-right {
    from { transform: translateX(0); }
    to   { transform: translateX(80px); }
}

@keyframes pan-btn-enter {
    0%   { opacity: 0; transform: translateX(-50px); }
    8%   { opacity: 1; }
    100% { opacity: 1; transform: none; }
}

.ltpn-contact-form__slide .ltpn-contact-drawer__rule {
    transform-origin: left;
}

#pan-contact-title {
    overflow: visible;
}

#pan-contact-title .pan-title-letter {
    display: inline-block;
}

.ltpn-contact-drawer__section--details .ltpn-contact-drawer__rule {
    transform-origin: left;
}

/* Status */
.ltpn-contact-form__status {
    font-size: 13px;
    margin: 8px 0 0;
    min-height: 18px;
}

.ltpn-contact-form__status:empty { display: none; }

.ltpn-contact-form__status[data-state="error"]   { color: #ff8a8a; }
.ltpn-contact-form__status[data-state="loading"] { color: rgba(255,255,255,.6); }
.ltpn-contact-form__status[data-state="success"] { color: #a8e6b0; }

/* Thanks message */
.ltpn-contact-form-slider.is-sent .ltpn-contact-form { display: none; }

.ltpn-contact-thanks {
    padding: 32px 0;
    text-align: center;
}

.ltpn-contact-thanks[aria-hidden="true"] { display: none; }
.ltpn-contact-thanks[aria-hidden="false"] { display: block; }

.ltpn-contact-thanks p {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}

/* ── Body lock when drawer open ──────────────────────────── */

.pan-contact-open { overflow: hidden; }

/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 600px) {
    .ltpn-contact-drawer {
        border-radius: 18px 18px 0 0;
        bottom: 0;
        height: min(92vh, 680px);
        left: 0;
        max-width: 100%;
        right: 0;
        top: auto;
        transform: translateY(40px);
        width: 100%;
    }

    .ltpn-contact-layer.is-open .ltpn-contact-drawer {
        transform: translateY(0);
    }

    .ltpn-contact-drawer__inner {
        padding: 28px 24px 24px;
    }
}

/* ── Bouton .ib-btn — limité au tiroir ─────────────────────── */
.ltpn-contact-layer .ib-btn {
    --ib-dark:  #111;
    --ib-light: #fbcb07;
    --ib-dur:   .55s;
    --ib-ease:  cubic-bezier(.25, 1, .5, 1);
    --ib-arrow-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' viewBox='0 0 10 10'%3E%3Cpath fill='%23ffffff' d='M7.703 5.8H.398V4.6h7.305l-3.36-3.36.855-.84 4.8 4.8-4.8 4.8-.855-.84 3.36-3.36Z'/%3E%3C/svg%3E");
    --ib-arrow-in:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' viewBox='0 0 10 10'%3E%3Cpath fill='%23111111' d='M7.703 5.8H.398V4.6h7.305l-3.36-3.36.855-.84 4.8 4.8-4.8 4.8-.855-.84 3.36-3.36Z'/%3E%3C/svg%3E");

    -webkit-appearance: none;
    appearance: none;
    align-items: stretch;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--goodland);
    height: 48px;
    opacity: 0;
    padding: 0;
    position: relative;
    transform: translateY(20px);
    transition: opacity .8s ease, transform .8s ease;
    width: fit-content;
}

.ltpn-contact-layer .ib-btn.is-inview {
    opacity: 1;
    transform: none;
}

.ltpn-contact-layer .ib-btn__label {
    align-items: center;
    background: var(--ib-dark);
    border-radius: 12px 0 0 12px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1;
    margin-right: 16px;
    overflow: visible;
    padding: 8px 8px 8px 20px;
    position: relative;
    text-transform: uppercase;
    transition:
        background-color var(--ib-dur) var(--ib-ease),
        color            var(--ib-dur) var(--ib-ease),
        margin-right     var(--ib-dur) var(--ib-ease),
        padding-right    var(--ib-dur) var(--ib-ease);
}

.ltpn-contact-layer .ib-btn__corner {
    bottom: 0;
    display: block;
    height: 100%;
    position: absolute;
    right: -16px;
    top: 0;
    width: 18px;
}

.ltpn-contact-layer .ib-btn__corner svg {
    display: block;
    height: 100%;
    width: 100%;
}

.ltpn-contact-layer .ib-btn__corner path {
    fill: var(--ib-dark);
    transition: fill var(--ib-dur) var(--ib-ease);
}

.ltpn-contact-layer .ib-btn__blob {
    display: inline-flex;
    height: 100%;
    overflow: hidden;
    padding: 10px;
    position: relative;
    transform: scale(1);
    transform-origin: center right;
    transition: transform var(--ib-dur) var(--ib-ease);
    width: 51px;
}

.ltpn-contact-layer .ib-btn__blob svg {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
}

.ltpn-contact-layer .ib-btn__blob svg path {
    fill: var(--ib-light);
    transition: fill var(--ib-dur) var(--ib-ease);
}

.ltpn-contact-layer .ib-btn__blob::before {
    background-image: var(--ib-arrow-out), var(--ib-arrow-in);
    background-position: center left -150%, center left 50%;
    background-repeat: no-repeat, no-repeat;
    background-size: 10px 10px, 10px 10px;
    content: "";
    height: 100%;
    left: 4px;
    position: absolute;
    top: 0;
    transition: background-position var(--ib-dur) var(--ib-ease);
    width: calc(100% - 4px);
    z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
    .ltpn-contact-layer .ib-btn:hover .ib-btn__label {
        background-color: var(--ib-light);
        color: var(--ib-dark);
        margin-right: 12px;
        padding-right: 14px;
    }

    .ltpn-contact-layer .ib-btn:hover .ib-btn__corner path {
        fill: var(--ib-light);
    }

    .ltpn-contact-layer .ib-btn:hover .ib-btn__blob {
        transform: scale(.875);
    }

    .ltpn-contact-layer .ib-btn:hover .ib-btn__blob svg path {
        fill: var(--ib-dark);
    }

    .ltpn-contact-layer .ib-btn:hover .ib-btn__blob::before {
        background-position: center left 50%, center left 150%;
    }
}

/* ── Auto-complétion d'adresse (tiroir hors /prise-de-rdv/) ─────────────── */
.ltpn-address-wrap { position: relative; }

.ltpn-address-list {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
    left: 0;
    list-style: none;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1200;
}

.ltpn-address-list[hidden] { display: none; }

.ltpn-address-list li {
    clip-path: inset(0 0 0 0);
    color: #222;
    cursor: pointer;
    font-family: var(--goodland);
    font-size: 13px;
    line-height: 1.3;
    padding: 10px 14px;
    transition:
        background 120ms,
        opacity .3s ease,
        clip-path .44s cubic-bezier(.16, .84, .44, 1),
        transform .44s cubic-bezier(.16, .84, .44, 1);
}

/* État initial de chaque ligne : masquée par un volet à gauche.
   Le JS retire « is-enter » ligne par ligne → révélation « from left »
   en cascade. Balayage par clip-path (aucune translation hors du cadre,
   donc jamais rogné par overflow:hidden du tiroir). */
.ltpn-address-list li.is-enter {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transform: translateX(-8px);
}

.ltpn-address-list li:hover,
.ltpn-address-list li[aria-selected="true"] {
    background: rgba(251, 203, 7, .22);
}

@media (prefers-reduced-motion: reduce) {
    .ltpn-address-list li.is-enter { clip-path: none; transform: none; }
}
