/* Funnel layer re-based to the shared site styling system (CSS/global.css).
   Only funnel-specific layout/overlay/scheduler rules remain here. */
:root {
    --sst-blue: var(--bleu, #1E3A5F);
    --sst-blue-soft: var(--bleu-clair, #2b577a);
    --sst-orange: var(--orange, #DC5014);
    --sst-orange-logo: var(--orange-logo, #F08C14);
    --sst-sky: var(--bleu-ciel, #00B4F0);
    --sst-grey: var(--gris, #F0F0F0);
    --sst-dark: var(--noir, #282828);
    --sst-white: #ffffff;
    --sst-radius-xl: 12px;
    --sst-radius-lg: 8px;
    --sst-radius-md: 6px;
    --sst-shadow-soft: 0 10px 26px rgba(30, 58, 95, 0.12);
    --sst-shadow-card: 0 18px 40px rgba(30, 58, 95, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.funnel-page {
    margin: 0;
    font-family: var(--font);
    color: var(--sst-dark);
    background: var(--sst-grey);
    min-height: 100vh;
}
body.funnel-page.overlay-open { overflow: hidden; }
img,iframe,video { display:block; width:100%; border:0; }
.funnel-page,
.funnel-page button,
.funnel-page input,
.funnel-page select,
.funnel-page textarea,
.funnel-page optgroup,
.funnel-page a {
    font-family: var(--font);
}
button,input,select,textarea,optgroup,a { font: inherit; }

.funnel-main { position: relative; z-index: 1; }
.funnel-shell, .funnel-page .wrap.funnel-shell {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto;
}

.funnel-hero { padding: 48px 0 24px; }
.funnel-hero__container { text-align:center; max-width: 900px; }
.funnel-hero__title {
    margin:0;
    color: var(--sst-blue);
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
}
.funnel-hero__text {
    margin: 16px auto 0;
    max-width: 760px;
    font-size: clamp(1rem, 2vw, 1.14rem);
    line-height: 1.52;
    color: var(--sst-dark);
}
.funnel-hero__ctaWrap { margin-top: 20px; }

/* Keep funnel buttons aligned with the website CTA treatment: square, orange, bold, and consistent. */
.funnel-btn {
    appearance: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 20px;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    transition: transform .18s ease, opacity .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.funnel-btn:not(:disabled):not([aria-disabled="true"]):hover { transform: none; }
.funnel-btn:disabled,
.funnel-btn[aria-disabled="true"] {
    cursor: default;
    opacity: 1;
    transform: none;
}
.funnel-page .btn.funnel-btn {
    min-width: 220px;
    border-radius: var(--sst-radius-md);
    border: 2px solid var(--sst-orange);
    background: var(--sst-orange);
    color: var(--sst-white);
    box-shadow: 0 8px 18px rgba(30, 58, 95, 0.12);
}

.funnel-page .btn.funnel-btn:disabled,
.funnel-page .btn.funnel-btn[aria-disabled="true"] {
    background: #8d99a6;
    border-color: #8d99a6;
    color: var(--sst-white);
    box-shadow: none;
    filter: none;
}

.funnel-page .btn.funnel-btn:not(:disabled):not([aria-disabled="true"]):hover,
.funnel-page .btn.funnel-btn:not(:disabled):not([aria-disabled="true"]):focus-visible {
    background: var(--sst-orange);
    border-color: var(--sst-orange);
    color: var(--sst-white);
    filter: brightness(0.92);
    box-shadow: 0 10px 22px rgba(30, 58, 95, 0.16);
}
.funnel-page .btn.funnel-btn:not(:disabled):not([aria-disabled="true"]):focus-visible {
    outline: none;
}
.funnel-btn--secondary,
.funnel-btn--ghost {
    background: transparent;
    border: 2px solid var(--sst-orange);
    color: var(--sst-orange);
    box-shadow: none;
}
.funnel-btn--secondary:not(:disabled):not([aria-disabled="true"]):hover,
.funnel-btn--secondary:not(:disabled):not([aria-disabled="true"]):focus-visible,
.funnel-btn--ghost:not(:disabled):not([aria-disabled="true"]):hover,
.funnel-btn--ghost:not(:disabled):not([aria-disabled="true"]):focus-visible {
    background: var(--sst-orange);
    border-color: var(--sst-orange);
    color: var(--sst-white);
}
.funnel-btn--full { width: 100%; }

.funnel-protected { padding: 16px 0; }
.funnel-protected__container { display:grid; gap:20px; }
.funnel-campaign-intro {
    padding: 22px;
    border-radius: var(--sst-radius-xl);
    border-top: 4px solid var(--sst-orange);
    background: var(--sst-white);
    color: var(--sst-blue);
    text-align: left;
    box-shadow: var(--sst-shadow-card);
}
.funnel-campaign-intro__title {
    margin: 0;
    max-width: 980px;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.3;
    font-weight: 700;
    color: var(--sst-blue);
}
.funnel-campaign-intro__body {
    margin: 14px 0 0;
    max-width: 980px;
    font-size: clamp(1.125rem, 1.7vw, 1.375rem);
    line-height: 1.45;
    font-weight: 500;
    color: var(--sst-blue);
}
.funnel-video,
.funnel-booking {
    padding: 22px;
    border-radius: var(--sst-radius-xl);
    border-top: 4px solid var(--sst-orange);
    background: var(--sst-white);
    color: var(--sst-dark);
    box-shadow: var(--sst-shadow-card);
}
.funnel-sectionHeading { margin-bottom: 14px; }
.funnel-sectionHeading__title {
    margin:0;
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.15;
    color: var(--sst-blue);
}
.funnel-sectionHeading__text {
    margin: 8px 0 0;
    font-size: 1rem;
    line-height: 1.48;
    color: var(--sst-dark);
}
.funnel-video__playerWrap,
.funnel-booking__embedWrap {
    overflow:hidden;
    border-radius: var(--sst-radius-lg);
    background: var(--sst-grey);
    border: 1px solid rgba(30,58,95,.12);
}
.funnel-video__playerWrap iframe,
.funnel-video__playerWrap video {
    aspect-ratio: 16 / 9;
    min-height: 280px;
}
.funnel-booking__embedWrap { padding: 16px; }
.funnel-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.funnel-scheduler {
    display:grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(260px, .85fr);
    gap: 16px;
}
.funnel-scheduler.is-confirmed {
    grid-template-columns: 1fr;
}
.funnel-scheduler__panel,
.funnel-scheduler__summary {
    border-radius: var(--sst-radius-lg);
    background: var(--sst-white);
    padding: 16px;
    border: 1px solid rgba(30,58,95,.12);
    box-shadow: var(--sst-shadow-soft);
}
.funnel-scheduler__summary {
    border-top: 4px solid var(--sst-orange);
}
.funnel-scheduler__label {
    display:block; margin-bottom:4px; font-size:.88rem; font-weight:700; color: var(--sst-blue);
}
.funnel-scheduler__dateInput,
.form-row input {
    width:100%;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: var(--sst-radius-md);
    border: 1px solid rgba(30,58,95,.18);
    background: var(--sst-white);
    color: var(--sst-dark);
    font-size: .95rem;
    line-height: 1.25;
    outline:none;
    box-shadow:none;
}
.form-row input { padding: 8px 12px; }
.funnel-scheduler__dateInput::-webkit-calendar-picker-indicator { cursor:pointer; }
.funnel-scheduler__dateInput:focus,
.form-row input:focus {
    border-color: var(--sst-orange);
    box-shadow: 0 0 0 3px rgba(220,80,20,.16);
}
.funnel-scheduler__slotsTitle {
    margin:12px 0 8px; font-size:.96rem; font-weight:700; color: var(--sst-blue);
}
.funnel-scheduler__slots { display:flex; flex-wrap:wrap; gap:8px; }
.funnel-slot {
    appearance:none;
    min-height: 38px;
    border: 1px solid rgba(30,58,95,.18);
    border-radius: var(--sst-radius-md);
    background: var(--sst-white);
    color: var(--sst-blue);
    padding: 7px 11px;
    cursor:pointer;
    font-size: .92rem;
    font-weight:700;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.funnel-slot:disabled,
.funnel-slot[aria-disabled="true"] {
    cursor: default;
    background: #8d99a6;
    border-color: #8d99a6;
    color: var(--sst-white);
}
.funnel-slot:not(:disabled):not([aria-disabled="true"]):hover {
    transform: none;
    border-color: var(--sst-orange);
}
.funnel-slot.is-selected {
    background: var(--sst-orange);
    color: var(--sst-white);
    border-color: var(--sst-orange);
}
.funnel-scheduler.is-submitting .funnel-slot:disabled {
    opacity: .72;
}
.funnel-scheduler.is-submitting .funnel-slot.is-selected:disabled {
    background: rgba(220,80,20,.72);
    border-color: rgba(220,80,20,.72);
    color: var(--sst-white);
    opacity: 1;
}
.funnel-scheduler__empty,
.funnel-booking__hint,
.funnel-legal__text,
.overlay__text,
.overlay__legal { color: var(--sst-dark); line-height:1.6; }
.funnel-scheduler__empty { margin:0; }
.funnel-scheduler__summaryTitle { margin:0 0 8px; font-size:1rem; color: var(--sst-blue); }
.funnel-scheduler__summaryList { display:grid; gap:8px; margin:0; }
.funnel-scheduler.is-confirmed .funnel-scheduler__panel,
.funnel-scheduler.is-confirmed .funnel-scheduler__summary {
    display: none;
}
.funnel-scheduler__summaryRow { display:grid; gap:3px; }
.funnel-scheduler__summaryRow dt {
    margin:0; font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color: var(--sst-blue);
}
.funnel-scheduler__summaryRow dd { margin:0; line-height:1.45; color: var(--sst-dark); }
.funnel-scheduler__actions { margin-top:12px; }
.funnel-scheduler__lockedMessage {
    margin: 0;
    padding: 4px 0;
    color: var(--sst-blue);
    font-weight: 700;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.funnel-scheduler__lockedMessage[hidden] {
    display: none;
}
.funnel-scheduler__lockedText {
    margin: 0;
}
.funnel-scheduler__lockedAction {
    width: auto;
    min-width: 260px;
    max-width: 100%;
}
.funnel-scheduler__feedback,
.form-feedback {
    min-height:22px; margin-top:8px; font-size:.94rem; line-height:1.4; color: var(--sst-dark);
}
.funnel-scheduler__feedback.is-error,
.form-feedback.is-error { color: var(--sst-orange); }
.funnel-scheduler__feedback.is-success,
.form-feedback.is-success { color: var(--sst-blue); }
.funnel-booking__hint { margin:10px 0 0; font-size:.94rem; }
.funnel-booking__fallbackWrap { margin-top: 14px; }

.funnel-legal { padding: 10px 0 36px; }
.funnel-legal__container { text-align:center; }
.funnel-legal__text { margin:0; font-size:.88rem; color: var(--sst-dark); }

.overlay {
    position:fixed; inset:0; z-index:1000; display:none;
    overflow-y: auto;
    padding: min(7vh,56px) 16px calc(24px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
}
.overlay.is-open { display:block; }
.overlay__backdrop {
    position:fixed; inset:0; background: rgba(30,58,95,.42); backdrop-filter: blur(6px);
}
.overlay__card {
    position:relative; z-index:1;
    width:min(100%, 560px);
    margin:0 auto;
    max-height: calc(100vh - min(7vh,56px) - 24px - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    border-radius: var(--sst-radius-xl);
    border-top: 4px solid var(--sst-orange);
    background: var(--sst-white);
    color: var(--sst-dark);
    box-shadow: var(--sst-shadow-card);
}
@supports (height: 100dvh) {
    .overlay__card {
        max-height: calc(100dvh - min(7vh,56px) - 24px - env(safe-area-inset-bottom));
    }
}
.overlay__close {
    position:absolute; top:12px; right:12px;
    width:40px; height:40px; border-radius: var(--sst-radius-md);
    border: 1px solid rgba(30,58,95,.12);
    background: var(--sst-white); color: var(--sst-blue);
    font-size:1.5rem; line-height:1; cursor:pointer;
}
.overlay__close:hover,
.overlay__close:focus-visible {
    color: var(--sst-orange);
}
.overlay__header { padding-right:44px; }
.overlay__title { margin:0; font-size: clamp(1.45rem, 2vw, 2rem); line-height:1.15; color: var(--sst-blue); }
.overlay__text { margin: 8px 0 0; }
.overlay__form { margin-top:12px; }
#leadGateForm,
#bookingGateForm {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
.form-row { margin-bottom:7px; }
.form-row label { display:block; margin-bottom:3px; font-size:.88rem; font-weight:700; color: var(--sst-blue); }
.form-actions { margin-top:10px; }
#leadGateForm .form-actions,
#bookingGateForm .form-actions {
    display: flex;
    justify-content: center;
}
#leadGateForm .form-actions .funnel-btn,
#bookingGateForm .form-actions .funnel-btn {
    width: auto;
    min-width: 280px;
    max-width: 100%;
}
.form-feedback:empty { min-height:0; margin-top:0; }
.overlay__actions { margin-top:18px; }
.overlay__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.overlay__detailRow {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(30,58,95,.12);
    background: var(--sst-grey);
    border-radius: var(--sst-radius-md);
}
.overlay__detailLabel {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sst-blue);
}
.overlay__detailValue {
    font-size: 1rem;
    line-height: 1.35;
    color: var(--sst-dark);
    font-weight: 700;
}
.overlay__followup {
    margin-top: 14px;
    color: var(--sst-dark);
}
.overlay__card--success .overlay__text {
    max-width: 60ch;
}

.state-intro .funnel-protected {
    opacity:.24; pointer-events:none; filter: blur(5px); transform: translateY(10px);
    transition: opacity .3s ease, filter .3s ease, transform .3s ease;
}
.state-intro .funnel-protected::before {
    content: "La vidéo et la prise de rendez-vous apparaîtront ici après votre confirmation.";
    display:flex; align-items:center; justify-content:center;
    width:min(1140px, calc(100% - 32px)); margin:0 auto 20px; padding:18px 22px;
    border-radius: var(--sst-radius-lg);
    border-left: 4px solid var(--sst-orange);
    background: var(--sst-white); color: var(--sst-blue);
    font-weight:700; text-align:center; filter:none; box-shadow: var(--sst-shadow-soft);
}
.state-access-granted .funnel-protected { opacity:1; pointer-events:auto; filter:none; transform:none; }
.state-access-granted .funnel-hero {
    padding: 22px 0 0;
}
.state-access-granted .funnel-hero__title,
.state-access-granted .funnel-hero__text,
.state-access-granted .funnel-hero__ctaWrap {
    display: none;
}
.state-access-granted .funnel-brand {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .funnel-hero { padding-top:44px; }
    .funnel-campaign-intro,
    .funnel-video,
    .funnel-booking,
    .overlay__card { padding:18px; }
    .funnel-scheduler { grid-template-columns: 1fr; }
    .funnel-btn,
    .funnel-page .btn.funnel-btn,
    .funnel-scheduler__dateInput,
    .form-row input,
    .funnel-slot {
        min-height: 44px;
    }
    .funnel-btn {
        padding: 12px 22px;
    }
    .funnel-scheduler__dateInput,
    .form-row input {
        padding: 11px 14px;
    }
    .funnel-slot {
        padding: 9px 12px;
    }
}
@media (max-width: 640px) {
    .overlay__details { grid-template-columns: 1fr; }
    .funnel-hero { padding-top:40px; }
    .funnel-shell, .funnel-page .wrap.funnel-shell { width:min(100% - 20px, 1140px); }
    .funnel-campaign-intro__title {
        font-size: clamp(1.35rem, 6vw, 1.65rem);
        line-height: 1.34;
    }
    .funnel-campaign-intro__body {
        font-size: clamp(1rem, 4.6vw, 1.18rem);
        line-height: 1.45;
    }
    .funnel-video__playerWrap iframe,
    .funnel-video__playerWrap video { min-height: 220px; }
    .overlay {
        padding: 24px 10px calc(18px + env(safe-area-inset-bottom));
    }
    .overlay__card {
        width: 100%;
        max-height: calc(100vh - 42px - env(safe-area-inset-bottom));
    }
    @supports (height: 100dvh) {
        .overlay__card {
            max-height: calc(100dvh - 42px - env(safe-area-inset-bottom));
        }
    }
    .funnel-btn, .funnel-page .btn.funnel-btn { width:100%; min-width:0; }
    #leadGateForm .form-actions .funnel-btn,
    #bookingGateForm .form-actions .funnel-btn {
        width: 100%;
        min-width: 0;
    }
}


.funnel-brand {
    display: flex;
    justify-content: center;
    margin: 0 auto 14px;
}
.funnel-brand__logo {
    width: min(360px, 72vw);
    max-width: 100%;
    height: auto;
}
