/* Page contact : questionnaire en étapes + fiche projet qui se remplit */
#next-preview{--ct-ease:cubic-bezier(.23,1,.32,1);--ct-soft:#eef5f9;--ct-tile:#f6f9fb}
#next-preview .ct [hidden]{display:none!important}
#next-preview ::selection{background:#006699;color:#fff}
#next-preview .ct{padding-top:64px;padding-bottom:110px}
#next-preview .ct-intro{max-width:720px;margin-bottom:48px}
#next-preview .ct-intro h1{margin:0 0 20px}
#next-preview .ct-intro h1 em{font-style:normal;color:var(--na-accent)}
#next-preview .ct-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);gap:56px;align-items:start}

/* Formulaire */
#next-preview .ct-form{position:relative;min-width:0}
#next-preview .ct-progress{height:3px;background:var(--na-line);border-radius:3px;overflow:hidden;margin-bottom:14px}
#next-preview .ct-progress-bar{display:block;height:100%;width:100%;background:var(--na-accent);transform-origin:left;transform:scaleX(var(--p,.2));transition:transform .5s var(--ct-ease)}
#next-preview .ct-stepcount{font-size:13px;color:var(--na-muted);font-variant-numeric:tabular-nums;margin:0 0 18px}
#next-preview .ct-step{border:0;margin:0;padding:0;min-width:0}
#next-preview.js .ct-step:not(.is-on){display:none}
#next-preview .ct-step+.ct-step{margin-top:48px}
#next-preview.js .ct-step+.ct-step{margin-top:0}
#next-preview .ct-step legend{font:600 clamp(26px,2.4vw,34px)/1.18 Manrope,sans-serif;letter-spacing:-1px;padding:0;margin-bottom:22px;text-wrap:balance;outline:none}
#next-preview .ct-hint{color:var(--na-muted);font-size:15px;margin:-10px 0 20px;max-width:60ch}
#next-preview .ct-step.is-on{animation:ct-in .42s var(--ct-ease) both}
#next-preview .ct-step.is-on.from-back{animation-name:ct-in-back}
@keyframes ct-in{from{opacity:0;transform:translateX(18px);filter:blur(3px)}to{opacity:1;transform:none;filter:none}}
@keyframes ct-in-back{from{opacity:0;transform:translateX(-18px);filter:blur(3px)}to{opacity:1;transform:none;filter:none}}

/* Tuiles de choix */
#next-preview .ct-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#next-preview .ct-tiles-2{grid-template-columns:repeat(2,minmax(0,1fr))}
#next-preview .ct-tiles-3{grid-template-columns:repeat(3,minmax(0,1fr))}
#next-preview .ct-tile{position:relative;display:flex;flex-direction:column;gap:4px;padding:20px 20px 18px;background:var(--ct-tile);border:1px solid var(--na-line);border-radius:12px;cursor:pointer;min-height:96px;transition:border-color .2s ease,background-color .2s ease,box-shadow .25s ease,transform .16s ease-out}
#next-preview .ct-tile input{position:absolute;opacity:0;pointer-events:none}
#next-preview .ct-tile svg{width:30px;height:30px;fill:none;stroke:#2f5d78;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin-bottom:10px;transition:stroke .2s ease,transform .3s var(--ct-ease)}
#next-preview .ct-tile b{font:600 17px/1.3 Manrope,sans-serif;letter-spacing:-.2px;color:var(--na-ink)}
#next-preview .ct-tile small{font-size:14px;line-height:1.45;color:var(--na-muted)}
#next-preview .ct-tile:after{content:'';position:absolute;top:16px;right:16px;width:18px;height:18px;border-radius:50%;border:1.5px solid #b7c9d5;background:#fff;transition:border-color .2s ease,background-color .2s ease,box-shadow .2s ease}
#next-preview .ct-check:after{border-radius:5px}
#next-preview .ct-tile:active{transform:scale(.98)}
#next-preview .ct-tile:has(input:checked){background:#fff;border-color:var(--na-accent);box-shadow:0 0 0 1px var(--na-accent),0 12px 28px -14px #0f1a2440}
#next-preview .ct-tile:has(input:checked):after{background:var(--na-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;border-color:var(--na-accent)}
#next-preview .ct-tile:has(input:checked) svg{stroke:var(--na-accent);transform:translateY(-2px)}
#next-preview .ct-tile:has(input:focus-visible){outline:3px solid var(--na-accent);outline-offset:3px}
@media (hover:hover) and (pointer:fine){#next-preview .ct-tile:hover{border-color:#9fbccd;background:#fff}}

/* Offre une page */
#next-preview .ct-offer{display:inline-flex;align-items:baseline;gap:6px;margin-top:12px;align-self:flex-start;padding:6px 10px;border-radius:6px;background:#e3f0f7;color:#00527a;font-size:13px;font-weight:600}
#next-preview .ct-offer strong{font:700 17px/1 Manrope,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:-.3px}

/* Pastilles « ce que vous avez » */
#next-preview .ct-chips{display:flex;flex-wrap:wrap;gap:10px}
#next-preview .ct-chip{position:relative;cursor:pointer}
#next-preview .ct-chip input{position:absolute;opacity:0;pointer-events:none}
#next-preview .ct-chip span{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:10px 18px;border:1px solid var(--na-line);border-radius:999px;background:var(--ct-tile);font-size:15px;transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .16s ease-out}
#next-preview .ct-chip span:before{content:'+';font-weight:600;color:var(--na-accent);width:10px;text-align:center}
#next-preview .ct-chip:active span{transform:scale(.97)}
#next-preview .ct-chip input:checked+span{background:var(--na-ink);border-color:var(--na-ink);color:#fff}
#next-preview .ct-chip input:checked+span:before{content:'✓';color:#7cc6ea}
#next-preview .ct-chip input:focus-visible+span{outline:3px solid var(--na-accent);outline-offset:3px}
@media (hover:hover) and (pointer:fine){#next-preview .ct-chip span:hover{border-color:#9fbccd}}

/* Champs */
#next-preview .ct-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px 16px}
#next-preview .ct-field{display:flex;flex-direction:column;gap:7px;min-width:0}
#next-preview .ct-field-wide{grid-column:1/-1}
#next-preview .ct-field-url{margin-top:22px;max-width:420px}
#next-preview .ct-field label{font-size:14px;font-weight:600;color:var(--na-ink)}
#next-preview .ct-field label i{font-style:normal;font-weight:400;color:var(--na-muted);margin-left:4px}
#next-preview .ct-field input,#next-preview .ct-field textarea{font:inherit;font-size:16px;color:var(--na-ink);background:#fff;border:1px solid #c5d4de;border-radius:8px;padding:12px 14px;min-height:48px;caret-color:var(--na-accent);transition:border-color .2s ease,box-shadow .2s ease}
#next-preview .ct-field textarea{resize:vertical;min-height:110px;line-height:1.55}
#next-preview .ct-field input::placeholder,#next-preview .ct-field textarea::placeholder{color:#5c6b76}
#next-preview .ct-field input:focus,#next-preview .ct-field textarea:focus{outline:none;border-color:var(--na-accent);box-shadow:0 0 0 3px #00669926}
#next-preview .ct-field input[aria-invalid=true]{border-color:#b3261e;box-shadow:0 0 0 3px #b3261e1f}
#next-preview .ct-err{font-size:13px;color:#b3261e;min-height:0}
#next-preview .ct-err:empty{display:none}
#next-preview .ct-legal{font-size:13px;color:var(--na-muted);margin-top:20px;max-width:62ch}
#next-preview .ct-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Boutons */
#next-preview .ct-nav{display:flex;align-items:center;gap:18px;margin-top:34px}
#next-preview .ct-nav .na-cta{margin-left:auto;font-size:15px;min-height:52px;padding:14px 26px;transition:background-color .2s ease,transform .16s ease-out,opacity .2s ease}
#next-preview .ct-nav .na-cta:active{transform:scale(.97)}
#next-preview .ct-nav .na-cta[disabled]{opacity:.45;cursor:not-allowed}
#next-preview .ct-nav .na-cta[aria-busy=true]{opacity:.7;cursor:progress}
#next-preview.js .ct-send{display:none}
#next-preview.js .is-last .ct-send{display:inline-flex}
#next-preview.js .is-last .ct-next{display:none}
#next-preview .ct-back{background:none;border:0;padding:12px 4px;min-height:44px;font-size:15px;color:var(--na-muted);border-radius:6px}
#next-preview .ct-back:hover{color:var(--na-ink)}
#next-preview .ct-formerr{margin-top:16px;color:#b3261e;font-size:14px}
#next-preview .ct-formerr:empty{display:none}

/* Fiche projet (récapitulatif) */
#next-preview .ct-recap{position:sticky;top:24px}
#next-preview .ct-sheet{background:var(--ct-soft);border-radius:16px;padding:26px 26px 22px;position:relative;isolation:isolate}
#next-preview .ct-sheet:before{content:'';position:absolute;inset:0;border-radius:inherit;background-image:radial-gradient(#b9ccd8 1px,transparent 1px);background-size:16px 16px;opacity:.55;z-index:-1}
#next-preview .ct-sheet-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding-bottom:14px;border-bottom:1px solid #c9dbe6;font:600 15px/1.2 Manrope,sans-serif}
#next-preview .ct-sheet-ref{font:500 12px/1 Manrope,sans-serif;color:#4e6a7c;font-variant-numeric:tabular-nums;letter-spacing:.3px}
#next-preview .ct-lines{list-style:none;margin:0;padding:6px 0 0}
#next-preview .ct-line{display:grid;grid-template-columns:96px 1fr;gap:12px;padding:12px 0;border-bottom:1px dashed #c9dbe6;font-size:14px;line-height:1.45}
#next-preview .ct-line span{color:#4e6a7c}
#next-preview .ct-line b{font-weight:600;color:var(--na-ink);overflow-wrap:anywhere}
#next-preview .ct-line.is-new{animation:ct-write .5s var(--ct-ease) both}
@keyframes ct-write{from{clip-path:inset(0 100% 0 0);opacity:.2}to{clip-path:inset(0 0 0 0);opacity:1}}
#next-preview .ct-empty{display:block;color:#4e6a7c;border-bottom:0}
#next-preview .ct-price{margin-top:18px;padding:16px 18px;background:#fff;border-radius:10px;box-shadow:0 10px 24px -16px #0b3a5566;animation:ct-write .5s var(--ct-ease) both}
#next-preview .ct-price p{margin:0;font-size:13px;color:var(--na-muted)}
#next-preview .ct-price strong{display:block;font:700 30px/1.1 Manrope,sans-serif;letter-spacing:-1px;color:var(--na-ink);font-variant-numeric:tabular-nums;margin:4px 0 6px}
#next-preview .ct-price .ct-setup{color:var(--na-ink);font-weight:600;margin-bottom:4px}
#next-preview .ct-price strong small{font-size:15px;font-weight:500;letter-spacing:0;color:var(--na-muted)}
#next-preview .ct-direct{font-size:14px;color:var(--na-muted);margin-top:16px}
#next-preview .ct-direct a{color:var(--na-ink);text-decoration:underline;text-underline-offset:4px;text-decoration-color:#9fbccd}

/* Merci */
#next-preview .ct-done{max-width:560px;min-height:55vh;padding:20px 0 40px;outline:none}
#next-preview .ct-done svg{width:64px;height:64px;fill:none;stroke:var(--na-accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;margin-bottom:22px}
#next-preview .ct-done circle{stroke-dasharray:132;stroke-dashoffset:132;animation:ct-draw .7s var(--ct-ease) .05s forwards}
#next-preview .ct-done path{stroke-dasharray:30;stroke-dashoffset:30;animation:ct-draw .45s var(--ct-ease) .5s forwards}
@keyframes ct-draw{to{stroke-dashoffset:0}}
#next-preview .ct-done h2{margin:0 0 12px}
#next-preview .ct-done p{color:var(--na-muted);font-size:17px;margin-bottom:22px}

/* Tablette et téléphone */
@media(max-width:980px){
#next-preview .ct-layout{grid-template-columns:1fr;gap:36px}
#next-preview .ct-recap{position:static;order:-1}
#next-preview .ct-sheet{padding:18px 20px 14px}
#next-preview .ct-lines{display:flex;flex-wrap:wrap;gap:6px 8px;padding-top:12px}
#next-preview .ct-line{display:inline-flex;gap:6px;padding:6px 10px;border:0;background:#fff;border-radius:6px;font-size:13px}
#next-preview .ct-line span{display:none}
#next-preview .ct-empty{background:none;padding:0}
#next-preview .ct-price{margin-top:12px;padding:12px 14px}
#next-preview .ct-price strong{font-size:24px}
#next-preview .ct-direct{display:none}
#next-preview .ct-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
#next-preview .ct{padding-top:36px;padding-bottom:70px}
#next-preview .ct-intro{margin-bottom:28px}
#next-preview .ct-tiles,#next-preview .ct-tiles-2,#next-preview .ct-tiles-3,#next-preview .ct-fields{grid-template-columns:1fr}
#next-preview .ct-tile{min-height:0;padding:16px 50px 15px 16px}
#next-preview .ct-tile svg{display:none}
#next-preview .ct-tile:after{top:50%;transform:translateY(-50%)}
#next-preview .ct-nav{position:sticky;bottom:0;background:linear-gradient(#fff0,#fff 30%);padding:22px 0 14px;margin-top:22px;z-index:2}
#next-preview .ct-nav .na-cta{flex:1}
}
@media (prefers-reduced-motion:reduce){
#next-preview .ct-step.is-on,#next-preview .ct-line.is-new,#next-preview .ct-price{animation:ct-fade .2s ease both}
#next-preview .ct-progress-bar{transition:none}
#next-preview .ct-done circle,#next-preview .ct-done path{animation:none;stroke-dashoffset:0}
@keyframes ct-fade{from{opacity:0}to{opacity:1}}
}
