/* ============================================================
   PAN Estimation travaux — /estimation-travaux-test/
   Boutons + logique de champs repris du formulaire de prise de RDV
   Fond blanc pleine largeur, texte noir.
   ============================================================ */

.pan-estim {
    --pe-yellow: #fbcb07;
    --pe-dark:   #111;
    --pe-gray:   #555;
    --pe-line:   #e2e0d8;

    background: aliceblue;
    border-radius: 20px;
    box-sizing: border-box;
    color: var(--pe-dark);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Bloc dans le flux : s'adapte à la largeur du conteneur de contenu */
    margin: 32px 0;
    overflow-x: hidden;
    padding: 52px clamp(20px, 4vw, 56px);
    position: relative;
    width: 100%;
}

@media (max-width: 600px) {
    .pan-estim {
        border-radius: 14px;
        margin: 20px 0;
        padding: 32px 20px;
    }
}

.pan-estim *, .pan-estim *::before, .pan-estim *::after { box-sizing: border-box; }

.pan-estim__wrap {
    align-items: flex-start;
    display: flex;
    gap: 56px;
    margin: 0 auto;
    max-width: 1180px;
    width: 100%;
}

/* ── Colonne gauche : accroche ────────────────────────────── */
/* align-items:flex-start sur le wrap → l'accroche ne bouge pas
   quand la hauteur du panneau de droite change d'une étape à l'autre. */

.pan-estim__intro {
    flex: 1 1 50%;
    min-width: 0;
    padding-top: 4px;
}

.pan-estim__intro-title {
    color: var(--pe-dark);
    font-size: clamp(30px, 3.6vw, 50px);
    font-weight: 800;
    line-height: 1.12;
    margin: 0;
}

.pan-estim__intro-title mark {
    background: var(--pe-yellow);
    border-radius: 3px;
    color: var(--pe-dark);
    display: inline-block;
    padding: 2px 10px;
    position: relative;
    transform: rotate(-2deg);
}

/* ── Animation du titre ──────────────────────────────────── */

.pan-estim__word {
    display: inline-block;
    white-space: nowrap;
}

.pan-estim__ltr {
    display: inline-block;
    will-change: transform, opacity;
}

.pan-estim__intro-title.is-animated .pan-estim__ltr {
    animation: pan-estim-ltr 300ms cubic-bezier(.2, .7, .3, 1) both;
    animation-delay: calc(var(--i) * 22ms);
}

@keyframes pan-estim-ltr {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: none; }
}

/* Le tampon « fourchette ! » s'abat sur la page */
.pan-estim__intro-title.is-animated .pan-estim__stamp {
    animation: pan-estim-stamp 460ms cubic-bezier(.2, 1.35, .35, 1) both;
    animation-delay: var(--stamp-delay, 0ms);
    transform-origin: 50% 60%;
}

.pan-estim__intro-title.is-animated .pan-estim__stamp::after {
    animation: pan-estim-stamp-ring 520ms ease-out both;
    animation-delay: var(--stamp-delay, 0ms);
    border: 3px solid var(--pe-yellow);
    border-radius: 5px;
    content: "";
    inset: -7px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

@keyframes pan-estim-stamp {
    0%   { opacity: 0; transform: scale(1.9) rotate(-12deg); filter: blur(4px); }
    55%  { opacity: 1; transform: scale(.9) rotate(-2deg);   filter: blur(0); }
    75%  { transform: scale(1.05) rotate(-2deg); }
    100% { transform: scale(1) rotate(-2deg); }
}

@keyframes pan-estim-stamp-ring {
    0%   { opacity: 0;  transform: scale(.75); }
    45%  { opacity: .65; }
    100% { opacity: 0;  transform: scale(1.7); }
}

/* Avant l'animation : lettres et tampon masqués (posés par JS au scroll) */
.pan-estim__intro-title .pan-estim__ltr,
.pan-estim__intro-title .pan-estim__stamp { opacity: 0; }

.pan-estim__intro-title.is-animated .pan-estim__ltr,
.pan-estim__intro-title.is-animated .pan-estim__stamp { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .pan-estim__intro-title .pan-estim__ltr,
    .pan-estim__intro-title .pan-estim__stamp { opacity: 1; }
    .pan-estim__intro-title .pan-estim__ltr,
    .pan-estim__intro-title .pan-estim__stamp,
    .pan-estim__intro-title .pan-estim__stamp::after { animation: none !important; }
}

/* ── Colonne droite : formulaire ──────────────────────────── */

.pan-estim__panel {
    flex: 1 1 50%;
    min-width: 0;
    transition: transform 640ms cubic-bezier(.22, .7, .2, 1), opacity 480ms ease;
}

/* ══ Séquence d'entrée ══════════════════════════════════════
   1. is-centered      → l'accroche est seule, centrée dans la page
   2. (retrait via JS)  → l'accroche glisse (FLIP) vers sa colonne gauche
   3. is-form-hidden retiré → le formulaire slide de la gauche vers sa place
   ═════════════════════════════════════════════════════════ */

.pan-estim.is-centered .pan-estim__wrap {
    align-items: flex-start;   /* centrage horizontal seulement, pas vertical */
    justify-content: center;
    min-height: 420px;         /* réserve la hauteur → le pied de page ne saute pas */
}

/* largeur figée par JS (= largeur finale) pour que les lignes ne se
   recassent pas pendant le glissement */
.pan-estim.is-centered .pan-estim__intro { flex: 0 0 auto; }

.pan-estim.is-centered .pan-estim__panel {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.pan-estim.is-form-hidden .pan-estim__panel {
    opacity: 0;
    transform: translateX(-72px);
}

/* Réponses de l'étape 1 masquées jusqu'à l'entrée du formulaire (pas de flash) */
.pan-estim.is-form-hidden .pan-estim__step[data-step="1"] > * { opacity: 0; }

/* Animation des réponses quand une étape s'affiche (repris du formulaire RDV) */
@keyframes pan-estim-in-up {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

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

@media (prefers-reduced-motion: reduce) {
    .pan-estim.is-form-hidden .pan-estim__step[data-step="1"] > * { opacity: 1; }
}

.pan-estim__form {
    display: flex;
    flex-direction: column;
}

/* ── Barre de progression ─────────────────────────────────── */

.pan-estim__progress {
    background: #ececec;
    border-radius: 99px;
    height: 3px;
    margin-bottom: 26px;
    overflow: hidden;
}

.pan-estim__progress-bar {
    background: var(--pe-yellow);
    border-radius: 99px;
    display: block;
    height: 100%;
    transition: width 360ms ease;
    width: 0;
}

/* ── Slider ───────────────────────────────────────────────── */

/* Hauteur FIXE = celle de l'étape la plus haute (align-items:stretch par
   défaut) → rien ne bouge sous le formulaire quand on change d'étape. */
.pan-estim__viewport {
    overflow: hidden;
}

.pan-estim__track {
    display: flex;
    position: relative;
    transition: transform 380ms cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.pan-estim__step {
    flex: 0 0 100%;
    padding: 2px 1px 4px;
}

.pan-estim__kicker {
    color: var(--pe-gray);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.pan-estim__q {
    border-bottom: 1px solid var(--pe-line);
    color: var(--pe-dark);
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
    margin: 0 0 22px;
    padding-bottom: 14px;
}

.pan-estim__hint {
    color: var(--pe-gray);
    font-size: 12.5px;
    line-height: 1.5;
    margin: 12px 0 0;
}

.pan-estim__error {
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0 0;
    min-height: 1em;
}

/* ── Champs ───────────────────────────────────────────────── */

label.pan-estim__field {
    align-items: baseline;
    background: #cde8ff;
    border-radius: 10px;
    display: flex;
    gap: 10px;
}

/* Champs — on force le style (The7 impose une bordure haute sombre par défaut) */
.pan-estim .pan-estim__field input {
    background: #fff !important;
    border: 1px solid #c3d4e6 !important;
    border-radius: 6px !important;
    box-shadow: inset 0 2px 5px rgba(20, 55, 100, .16) !important;   /* profondeur */
    color: var(--pe-dark) !important;
    flex: 1;
    font-family: inherit;
    font-size: 15px;
    margin: 0 !important;
    outline: none;
    padding: 14px !important;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    width: 100%;
}

.pan-estim .pan-estim__field input:focus {
    border-color: #7aa8d4 !important;                                 /* bleu, pas de noir */
    box-shadow: inset 0 2px 6px rgba(20, 55, 100, .22) !important;
}
.pan-estim .pan-estim__field input::placeholder { color: #b0aea3; }

/* ── Étape 1 : la surface, saisie « à remplir » en très grand ──
   Le nombre affiché est un <span> (baseline fiable, y compris iOS) ; le
   <input> réel est un calque invisible par-dessus, il ne sert qu'à saisir. */

.pan-estim__step[data-step="1"] .pan-estim__q { margin-bottom: 10px; }

.pan-estim__step[data-step="1"] .pan-estim__field {
    align-items: baseline;
    box-shadow: inset 5px -2px 5px rgba(20, 55, 100, .16) !important;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: flex-start;
    padding: 10px;
}

.pan-estim__step[data-step="1"] .pan-estim__slot {
    display: inline-block;
    line-height: 1;
    position: relative;
}

/* Le chiffre affiché */
.pan-estim__step[data-step="1"] .pan-estim__num {
    color: #fbcb07;
    display: inline-block;
    font-size: clamp(64px, 14vw, 136px);
    font-weight: 700;
    line-height: 1;
    white-space: pre;
}

.pan-estim__step[data-step="1"] .pan-estim__field.is-empty .pan-estim__num {
    color: #fbcb076e;   /* « 0 » pâle tant qu'aucun chiffre n'est saisi */
}

/* L'input : calque invisible sur toute la zone du nombre, capte le tap/clavier */
.pan-estim .pan-estim__step[data-step="1"] .pan-estim__field input {
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    bottom: 0;
    box-shadow: none !important;
    caret-color: transparent;
    color: transparent !important;
    font-size: 16px;   /* ≥16px : évite le zoom au focus sur iOS */
    height: auto;
    left: 0;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
}

/* « m² » à la même taille que les chiffres, juste après le curseur */
.pan-estim__step[data-step="1"] .pan-estim__unit {
    color: var(--pe-dark);
    font-size: clamp(64px, 14vw, 136px);
    font-weight: 700;
    line-height: 1;
    margin-left: 30px;   /* laisse la place au curseur qui vit dans cet espace */
    vertical-align: baseline;
}

/* 4 chiffres (jusqu'à 2000) : on réduit pour que « m² » tienne sur la ligne */
.pan-estim__step[data-step="1"] .pan-estim__field[data-len="4"] .pan-estim__num,
.pan-estim__step[data-step="1"] .pan-estim__field[data-len="4"] .pan-estim__unit {
    font-size: clamp(48px, 9vw, 90px);
}

/* Curseur : barre verticale, juste après le dernier chiffre, sur la ligne
   de base du <span> (donc parfaitement aligné avec le nombre). */
.pan-estim__step[data-step="1"] .pan-estim__caret {
    background: var(--pe-yellow);
    border-radius: 2px;
    bottom: .12em;
    display: none;
    font-size: clamp(64px, 14vw, 136px);
    height: .72em;
    left: 100%;
    margin-left: 6px;
    position: absolute;
    width: 12px;
    z-index: 1;
}

.pan-estim__step[data-step="1"] .pan-estim__field[data-len="4"] .pan-estim__caret {
    font-size: clamp(48px, 9vw, 90px);
    width: 9px;
}

.pan-estim__step[data-step="1"] .pan-estim__field:focus-within .pan-estim__caret {
    animation: pan-estim-blink 1.1s step-end infinite;
    display: block;
}

@keyframes pan-estim-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

.pan-estim__unit {
    color: var(--pe-gray);
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 600;
}

.pan-estim__field--text + .pan-estim__field--text { margin-top: 14px; }

/* ── Choix radio / checkbox ───────────────────────────────── */

.pan-estim__choices {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pan-estim__choice {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 11px 0;
    position: relative;
    user-select: none;
}

.pan-estim__choice input {
    height: 0;
    opacity: 0;
    position: absolute;
    width: 0;
}

.pan-estim__choice-box {
    border: 1.5px solid #bdbbb0;
    border-radius: 50%;
    flex-shrink: 0;
    height: 18px;
    position: relative;
    transition: border-color 200ms ease;
    width: 18px;
}

.pan-estim__choice-box--check { border-radius: 5px; }

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

.pan-estim__choice-box--check::after { height: 10px; width: 10px; }

.pan-estim__choice input:checked ~ .pan-estim__choice-box { border-color: var(--pe-yellow); }
.pan-estim__choice input:checked ~ .pan-estim__choice-box::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.pan-estim__choice input:focus-visible ~ .pan-estim__choice-box {
    box-shadow: 0 0 0 3px rgba(251, 203, 7, .35);
}

.pan-estim__choice-label { color: var(--pe-dark); font-size: 15px; font-weight: 500; }

/* ── Autocomplete adresse ─────────────────────────────────── */
/* La liste est posée sur <body> (JS) → position:fixed, hors flux :
   pas de décalage de la rangée, jamais rognée par le slider. */

.pan-estim__addr-list {
    background: #fff;
    border: 1px solid #d9d7cd;
    border-radius: 6px;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .3);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    list-style: none;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    position: fixed;
    z-index: 10000;
}

.pan-estim__addr-list[hidden] { display: none; }

.pan-estim__addr-list li {
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 13.5px;
    padding: 9px 11px;
}

.pan-estim__addr-list li:hover,
.pan-estim__addr-list li.is-active { background: #f5f3ec; }

/* ── Écran résultat ───────────────────────────────────────── */

.pan-estim__range {
    color: var(--pe-dark);
    font-size: clamp(23px, 4.4vw, 32px);
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 4px 0 12px;
}

.pan-estim__disclaimer {
    background: #f5f3ec;
    border-radius: 8px;
    color: var(--pe-dark);
    font-size: 13.5px;
    line-height: 1.55;
    margin: 4px 0 0;
    padding: 14px 16px;
}

.pan-estim__disclaimer-kicker {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.pan-estim__step--thanks p {
    color: #fbcb07;
    font-size: 35px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

/* ── Navigation ───────────────────────────────────────────── */

.pan-estim__nav {
    align-items: center;
    display: flex;
    margin-top: 26px;
}

.pan-estim__nav [data-next],
.pan-estim__nav [data-send] { margin-left: auto; }

/* ── Boutons — composant .ib-btn repris de ltpn-contact-drawer ── */

.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;
    height: 48px;
    opacity: 1;
    padding: 0;
    position: relative;
    width: fit-content;
}

.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.15;
    margin-right: 16px;
    position: relative;
    padding: 8px 8px 8px 20px;
    text-align: left;   /* label long (« Être contacté… ») aligné à gauche s'il passe sur 2 lignes */
    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);
}

.pan-estim .ib-btn__label,
.pan-estim .pan-estim__btn-text { text-align: left; }

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

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

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

.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;
}

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

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

.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;
}

.ib-btn:disabled { cursor: default; opacity: .5; pointer-events: none; }
.ib-btn[hidden] { display: none; }

@media (hover: hover) and (pointer: fine) {
    .ib-btn:hover .ib-btn__label {
        background-color: var(--ib-light);
        color: var(--ib-dark);
        margin-right: 12px;
        padding-right: 14px;
    }
    .ib-btn:hover .ib-btn__corner path { fill: var(--ib-light); }
    .ib-btn:hover .ib-btn__blob { transform: scale(.875); }
    .ib-btn:hover .ib-btn__blob svg path { fill: var(--ib-dark); }
    .ib-btn:hover .ib-btn__blob::before { background-position: center left 50%, center left 150%; }
}

/* Précédent — pastille noire, flèche blanche vers la gauche.
   Rendu 100 % autonome : on n'utilise PAS le mécanisme de flèche coulissante
   des autres boutons (2 calques + background-position qui glisse) — trop
   fragile ici, la flèche restait invisible. Une seule image, toujours centrée. */

.pan-estim__prev { gap: 8px; }

.pan-estim__prev .ib-btn__label { display: none; }

.pan-estim__prev .ib-btn__blob {
    overflow: visible;
    transform-origin: center left;
}

.pan-estim__prev .ib-btn__blob svg { transform: scaleX(-1); }
.pan-estim__prev .ib-btn__blob svg path { fill: #111; }

.pan-estim__prev .ib-btn__blob::before,
.pan-estim__prev:hover .ib-btn__blob::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' d='M11 6.5H2.5m4-4-4 4 4 4'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 13px 13px;
    left: 0;
    transform: none;
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .pan-estim__prev:hover .ib-btn__blob { transform: scale(.875); }
    .pan-estim__prev:hover .ib-btn__blob svg path { fill: #111; }
}

/* ── Status ───────────────────────────────────────────────── */

.pan-estim__status {
    font-size: 13px;
    margin: 10px 0 0;
    min-height: 18px;
    text-align: right;
}

.pan-estim__status:empty { display: none; }
.pan-estim__status[data-state="error"]   { color: #c0392b; font-weight: 600; }
.pan-estim__status[data-state="loading"] { color: #888; }
.pan-estim__status[data-state="success"] { color: #2e7d32; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
    .pan-estim__wrap {
        flex-direction: column;
        gap: 28px;
    }
    .pan-estim__intro,
    .pan-estim__panel { flex: 1 1 auto; width: 100%; }
    .pan-estim__intro-title { text-align: left; }

    /* Séquence mobile : le texte reste en place (en haut, calé à gauche).
       Pas de glissement latéral, pas de montée — juste l'écriture + le tampon,
       puis le formulaire qui slide. Le panneau reste dans le flux (invisible)
       → aucun saut de pied de page. */
    .pan-estim.is-centered .pan-estim__wrap {
        align-items: stretch;
        justify-content: flex-start;
        min-height: 0;
    }
    .pan-estim.is-centered .pan-estim__intro {
        flex: 1 1 auto;
        width: 100%;
    }
    .pan-estim.is-centered .pan-estim__panel { position: static; }
}

@media (max-width: 768px) {
    /* Accroche animée */
    .pan-estim .pan-estim__intro-title {
        font-size: 29px !important;
        line-height: 1.1em !important;
    }
    /* Intitulés de questions / résultat / merci */
    .pan-estim .pan-estim__q {
        font-size: 18px !important;
        line-height: 1.1em !important;
    }
}

/* ============================================================
   Bandeau « Comment ça marche !? »  (sous le wizard)
   Desktop : 5 pictos en ligne, reliés par un pointillé
   Mobile  : slider scroll-snap + puces (pan-estimation.js)
   Police du titre : Caveat (placeholder — à arbitrer plus tard)
   ============================================================ */

.pan-howto {
    background: aliceblue;
    border-radius: 20px;
    box-sizing: border-box;
    color: var(--pe-dark, #111);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 24px 0 0;
    padding: 40px clamp(20px, 4vw, 56px) 44px;
    width: 100%;
}

.pan-howto *, .pan-howto *::before, .pan-howto *::after { box-sizing: border-box; }

.pan-howto__eyebrow {
    background: var(--pe-yellow, #fbcb07);
    border-radius: 3px;
    color: var(--pe-dark, #111);
    display: table;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(15px, 1.7vw, 21px);
    font-weight: 700;
    letter-spacing: .01em;
    margin: 0 auto -8px;
    padding: 3px 13px 4px;
    position: relative;
    transform: rotate(-2deg);
    z-index: 1;
}

.pan-howto__title {
    color: var(--pe-dark, #111);
    font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 36px;
    text-align: center;
    text-transform: none;
}

.pan-howto__viewport { margin: 0 auto; max-width: 1180px; }

.pan-howto__track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Pointillé qui relie les pictos (centré sur les ronds) */
.pan-howto__track::before {
    border-top: 2px dashed #d9d7cd;
    content: "";
    left: 12%;
    position: absolute;
    right: 12%;
    top: 47px;              /* = hauteur du rond (94) / 2 */
    z-index: 0;
}

.pan-howto__step {
    align-items: center;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 14px;
    padding: 0 10px;
    position: relative;
    text-align: center;
    z-index: 1;
}

.pan-howto__pic {
    align-items: center;
    background: #fff;
    border: 1px solid var(--pe-line, #e2e0d8);
    border-radius: 50%;
    display: flex;
    flex: 0 0 auto;
    height: 94px;
    justify-content: center;
    position: relative;
    width: 94px;
}

/* Le SVG est recoloré via un masque (fill d'origine = gris clair figé) */
.pan-howto__pic::after {
    -webkit-mask: var(--pic) center / contain no-repeat;
    background-color: var(--pe-dark, #111);
    content: "";
    height: 52px;
    mask: var(--pic) center / contain no-repeat;
    width: 52px;
}

.pan-howto__num {
    align-items: center;
    background: var(--pe-yellow, #fbcb07);
    border: 2px solid #fff;
    border-radius: 50%;
    color: var(--pe-dark, #111);
    display: flex;
    font-size: 12px;
    font-weight: 700;
    height: 26px;
    justify-content: center;
    position: absolute;
    right: -4px;
    top: -4px;
    width: 26px;
}

.pan-howto__label {
    color: var(--pe-dark, #111);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    max-width: 16ch;
}

.pan-howto__dots { display: none; }

/* ── Mobile : slider ──────────────────────────────────────── */

@media (max-width: 768px) {
    .pan-howto {
        border-radius: 14px;
        margin: 16px 0 0;
        padding: 30px 0 26px;
    }
    /* #page pour battre la règle custom du site : #page h2{font-size:18px} */
    #page .pan-howto__title,
    .pan-howto__title {
        font-size: 36px;
        line-height: .6em;
        margin-bottom: 24px;
        padding: 0 20px;
        position: relative;
        z-index: 2;               /* « Comment ça marche » passe devant « pointArtisans » */
    }

    .pan-howto__viewport {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .pan-howto__viewport::-webkit-scrollbar { display: none; }

    /* Espaceurs réels en vw (les marges % / de fin ne comptent pas dans
       scrollWidth → dernière carte non centrée ou trop de vide). */
    .pan-howto__track {
        gap: 0;
        padding: 4px 0;
        width: max-content;
    }
    .pan-howto__track::before,
    .pan-howto__track::after {
        border: 0;
        content: "";
        display: block;
        flex: 0 0 14vw;
        position: static;
    }

    .pan-howto__step {
        flex: 0 0 72vw;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .pan-howto__dots {
        display: flex;
        gap: 8px;
        justify-content: center;
        margin-top: 24px;
    }
    .pan-howto__dot {
        background: #d9d7cd;
        border: 0;
        border-radius: 50%;
        cursor: pointer;
        height: 8px;
        padding: 0;
        transition: background-color 200ms ease, transform 200ms ease;
        width: 8px;
    }
    .pan-howto__dot.is-active { background: var(--pe-yellow, #fbcb07); transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
    .pan-howto__viewport { scroll-behavior: auto; }
}
