/* ECK Entretien : configurateur de devis plein écran (assets/devis.js).

   Trois mises en page distinctes, pas un simple empilement :
   - téléphone  < 768 px      : feuille plein écran en 100dvh, une question par
                                écran, CTA collé en bas, retour en flèche dans
                                l'en-tête ;
   - tablette   768 à 1023 px : une colonne centrée de 680 px, récapitulatif
                                repliable en haut, pied collé avec Retour et
                                Continuer, cibles tactiles de 56 px ;
   - PC         >= 1024 px    : deux colonnes, 38 % sombre à gauche avec le
                                récapitulatif live, 62 % claire à droite.

   Les couleurs viennent de :root dans site.css (--red, --ink, --gray…). */

/* ==================== OUVERTURE SANS FLASH ====================
   Un script en tête de page pose html.devis-boot quand l'URL contient
   ?devis= : la page reste invisible jusqu'à ce que la pop-up la recouvre. */
html.devis-boot body{visibility:hidden}
html.devis-boot #eckDevis{visibility:visible}
html.ed-open,html.ed-open body{overflow:hidden}
html.ed-open .ed-sticky{display:none}

/* ==================== RACINE ==================== */
.ed{position:fixed;inset:0;z-index:100000;background:#fff;color:var(--ink);font-family:var(--font-body);
  height:100vh;height:100dvh;display:flex;overscroll-behavior:contain;-webkit-font-smoothing:antialiased;
  --ed-radius:12px;--ed-pad:48px}
.ed[hidden]{display:none}
.ed *,.ed *::before,.ed *::after{box-sizing:border-box}
.ed button{font-family:inherit;cursor:pointer}
.ed :focus-visible{outline:3px solid rgba(211,47,47,.5);outline-offset:2px}
/* Le titre reçoit le focus à chaque écran pour les lecteurs d'écran : pas de
   cadre visible pour autant. */
.ed .ed-title:focus,.ed .ed-title:focus-visible{outline:none}
.ed [hidden]{display:none!important}
.ed-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ed-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Progression */
.ed-progress{position:absolute;top:0;left:0;right:0;height:4px;background:var(--bg-alt);z-index:3}
.ed-progress-bar{display:block;height:100%;width:0;background:var(--red);transition:width .25s ease}

/* ==================== COLONNE SOMBRE (PC) ==================== */
.ed-aside{display:none}
.ed-aside-in{height:100%;overflow-y:auto;padding:56px 44px 32px;display:flex;flex-direction:column;gap:18px}
.ed-logo{line-height:0}
.ed-logo img{height:62px;width:auto;max-width:100%;display:block}
.ed-aside-step{margin-top:22px;font-size:.75rem;text-transform:uppercase;letter-spacing:1.6px;color:#9ca3af;font-weight:700}
.ed-aside-title{font-family:var(--font-display);font-size:3.2rem;line-height:.95;letter-spacing:1px;color:#fff;margin-top:-10px}
.ed-badge{display:inline-flex;align-items:center;align-self:flex-start;gap:.4rem;background:var(--red-soft);color:var(--red);border:1px solid var(--red-line);
  font-size:.72rem;font-weight:700;letter-spacing:.6px;text-transform:uppercase;padding:.38rem .8rem;border-radius:50px;white-space:nowrap}
.ed-badge-dark{background:var(--red);color:#fff;border-color:var(--red)}
.ed-rating{display:flex;align-items:center;gap:.5rem;color:#e5e7eb;font-size:.88rem}
.ed-stars{color:#f59e0b;letter-spacing:1px}
.ed-live{margin-top:10px;border-top:1px solid rgba(255,255,255,.12);padding-top:22px;flex:1}
.ed-live h3{font-size:.75rem;text-transform:uppercase;letter-spacing:1.6px;color:#9ca3af;font-weight:700;margin:0 0 14px}
.ed-live h4{font-size:.75rem;text-transform:uppercase;letter-spacing:1.6px;color:#9ca3af;font-weight:700;margin:20px 0 10px}
.ed-live dl{margin:0;display:grid;gap:12px}
.ed-live dl div{display:grid;grid-template-columns:96px 1fr;gap:10px}
.ed-live dt{font-size:.8rem;color:#9ca3af}
.ed-live dd{margin:0;font-size:.92rem;color:#fff;font-weight:600}
.ed-live ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.ed-live li{display:flex;align-items:center;gap:.55rem;color:#fff;font-weight:600;font-size:.95rem}
.ed-live li svg{color:#fca5a5;flex:none}
.ed-dot{width:7px;height:7px;border-radius:50%;background:var(--red);flex:none;margin:0 4px}
.ed-live-vide{color:#9ca3af;font-size:.9rem;line-height:1.6}
.ed-aside-foot{font-size:.85rem;color:#9ca3af}
.ed-aside-foot a{color:#fff;font-weight:700;text-decoration:none}

/* ==================== COLONNE PRINCIPALE ==================== */
.ed-main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative;background:#fff}
.ed-head{display:flex;align-items:center;gap:12px;padding:18px 24px 12px;flex:none}
.ed-head-brand{line-height:0}
.ed-head-brand img{height:28px;width:auto;display:block}
.ed-icon-btn{width:44px;height:44px;border-radius:50%;border:none;background:var(--bg-alt);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;flex:none;transition:background .2s,color .2s}
.ed-close{margin-left:auto}
.ed-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;padding:8px 24px 24px}
.ed-screen{width:100%;max-width:680px;margin:auto}
.ed-foot{flex:none;padding:12px 24px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--border)}
.ed-foot-btns{display:flex;gap:12px;justify-content:flex-end;max-width:680px;margin:0 auto}
.ed-foot-err{max-width:680px;margin:0 auto 8px;color:var(--red);font-size:.86rem;font-weight:600;min-height:0}
.ed-foot-err:empty{display:none}
.ed-foot-err a{color:var(--red)}

/* Titres */
.ed-title{font-family:var(--font-display);font-weight:400;font-size:2.4rem;line-height:1;letter-spacing:1px;margin:0 0 .5rem;color:var(--ink);outline:none}
.ed-sub{font-size:1rem;color:var(--gray-light);line-height:1.6;margin:0 0 1.6rem}
.ed-title + .ed-group,.ed-title + .ed-field{margin-top:1.6rem}
.ed-texte{font-size:1rem;line-height:1.7;color:var(--gray-light);margin:0 0 1.2rem}
.ed-micro{font-size:.82rem;color:var(--gray);line-height:1.6;margin:.9rem 0 0}
.ed-sep{height:1px;background:var(--border);margin:1.8rem 0}
.ed-micro + .ed-group,.ed-group + .ed-note{margin-top:1.3rem}

/* ==================== OPTIONS ==================== */
.ed-group{margin:0 0 1.6rem}
.ed-group:last-child{margin-bottom:0}
.ed-group-title{font-size:1rem;font-weight:700;margin:0 0 .75rem;color:var(--ink);font-family:var(--font-body)}
.ed-group-sub{font-size:.9rem;color:var(--gray);margin:-.4rem 0 .8rem}
.ed-grid{display:grid;gap:10px}
.ed-cols-1{grid-template-columns:1fr}
.ed-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ed-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}

.ed-opt{position:relative;display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px 16px;min-height:64px;
  border:1.5px solid var(--border-strong);border-radius:var(--ed-radius);background:#fff;color:var(--ink);
  transition:border-color .15s,background .15s,box-shadow .15s,transform .1s}
.ed-opt.is-on{border-color:var(--red);background:#fff7f7;box-shadow:inset 0 0 0 1px var(--red)}
.ed-opt[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
.ed-opt-txt{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.ed-opt-label{font-weight:700;font-size:1rem;line-height:1.3}
.ed-opt-sub{font-size:.85rem;color:var(--gray);line-height:1.45}
.ed-opt-badge{align-self:flex-start;margin-top:4px;font-size:.66rem;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--green);background:rgba(21,128,61,.08);border:1px solid rgba(21,128,61,.3);padding:.15rem .5rem;border-radius:50px}
.ed-opt-check{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--border-strong);display:flex;align-items:center;justify-content:center;transition:all .15s}
.ed-opt[role="checkbox"] .ed-opt-check{border-radius:6px}
.ed-opt.is-on .ed-opt-check{background:var(--red);border-color:var(--red)}
.ed-opt.is-on .ed-opt-check::after{content:'';width:10px;height:6px;border-left:2.5px solid #fff;border-bottom:2.5px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.ed-opt-vis{flex:none;width:64px;color:var(--ink);display:flex;align-items:center;justify-content:center}
.ed-opt-vis svg{width:100%;height:auto;max-height:44px}
.ed-opt.is-on .ed-opt-vis{color:var(--red)}
.ed-opt-photo{position:relative;flex:none;width:72px;aspect-ratio:4/5;border-radius:8px;overflow:hidden;background:var(--bg-alt)}
.ed-opt-photo img{width:100%;height:100%;object-fit:cover;object-position:center 62%;display:block}
.ed-opt-photo.is-aa img{object-position:center}
.ed-aa{position:absolute;left:4px;font-size:.58rem;font-weight:700;letter-spacing:.5px;text-transform:uppercase;background:rgba(17,18,20,.72);color:#fff;padding:.1rem .35rem;border-radius:4px}
.ed-aa-1{top:4px}
.ed-aa-2{top:calc(50% + 4px)}
.ed-kbd{display:none}

/* ==================== CHAMPS ==================== */
.ed-field{margin:0 0 1.1rem}
.ed-label{display:block;font-weight:700;font-size:.92rem;margin:0 0 .45rem}
.ed-opt-tag{font-weight:500;color:var(--gray);font-size:.8rem;margin-left:.3rem}
.ed-input{width:100%;font-family:inherit;font-size:16px;color:var(--ink);background:#fff;border:1.5px solid var(--border-strong);border-radius:10px;padding:0 14px;height:52px;transition:border-color .15s,box-shadow .15s}
textarea.ed-input{height:auto;padding:12px 14px;resize:vertical;min-height:88px;line-height:1.5}
.ed-input:focus{outline:none;border-color:var(--red);box-shadow:0 0 0 3px var(--red-soft)}
.ed-input-cp{max-width:220px;font-size:1.6rem;font-weight:700;letter-spacing:4px;height:60px}
.ed-pill{display:inline-flex;align-items:center;gap:.4rem;margin:.75rem 0 0;font-size:.9rem;font-weight:700;color:var(--green);min-height:1.4em}
.ed-pill.is-ok::before{content:'';width:18px;height:18px;border-radius:50%;background:var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat}
.ed-form{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.ed-form .ed-full{grid-column:1/-1}
.ed-inline{display:flex;gap:10px}
.ed-inline .ed-input{flex:1}
.ed-consent{display:flex;gap:12px;align-items:flex-start;margin:1.4rem 0 0;font-size:.92rem;line-height:1.5;cursor:pointer;min-height:44px}
.ed-consent input{width:22px;height:22px;flex:none;margin:1px 0 0;accent-color:var(--red)}
.ed-envoi-mention{font-size:.8rem;color:var(--gray);line-height:1.6;margin:1.2rem 0 0}
.ed-erreur-envoi{color:var(--red);font-size:.9rem;font-weight:600;margin-top:.6rem}
.ed-erreur-envoi:empty{display:none}
.ed-erreur-envoi a{color:var(--red)}

/* ==================== BOUTONS ==================== */
.ed-btn,.ed-btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;min-height:50px;padding:0 1.6rem;border-radius:8px;
  font-size:.86rem;font-weight:700;letter-spacing:.8px;text-transform:uppercase;text-decoration:none;transition:background .15s,border-color .15s,color .15s,opacity .15s;cursor:pointer;-webkit-user-select:none;user-select:none}
.ed-btn{background:var(--red);color:#fff;border:1.5px solid var(--red)}
.ed-btn-ghost{background:#fff;color:var(--ink);border:1.5px solid var(--border-strong)}
.ed-btn-sm{min-height:52px;padding:0 1.1rem;white-space:nowrap}
.ed-btn.is-disabled,.ed-btn-ghost.is-disabled{opacity:.45}
.ed-next.is-skip{background:#fff;color:var(--ink);border-color:var(--border-strong)}
.ed-link{background:none;border:none;padding:.4rem 0;color:var(--red);font-weight:700;font-size:.9rem;text-decoration:underline;text-underline-offset:3px;cursor:pointer;font-family:inherit}
.ed-actions-col{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:1.6rem}
.ed-spin{width:16px;height:16px;border-radius:50%;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;animation:edSpin .7s linear infinite}

/* ==================== NOTES ==================== */
.ed-note{border-radius:10px;padding:12px 14px;font-size:.9rem;line-height:1.6;margin:1rem 0 0}
.ed-note-info{background:var(--bg-alt);color:var(--gray-light)}
.ed-note-important{background:#fff7ed;color:#7c2d12;border:1px solid #fed7aa}
.ed-note-alerte{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}

/* ==================== PHOTOS ==================== */
.ed-photo-btns{display:grid;gap:10px}
.ed-photo-btns label{width:100%}
.ed-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;text-align:center;padding:2.2rem 1.5rem;border:2px dashed var(--border-strong);border-radius:var(--ed-radius);background:var(--bg-alt);cursor:pointer;color:var(--gray-light);transition:border-color .15s,background .15s}
.ed-drop svg{width:30px;height:30px;color:var(--red)}
.ed-drop strong{color:var(--ink)}
.ed-drop.is-over{border-color:var(--red);background:var(--red-soft)}
.is-disabled[data-file]{pointer-events:none;opacity:.45}
.ed-photos{list-style:none;margin:1rem 0 0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.ed-photo{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--bg-alt);border:1px solid var(--border)}
.ed-photo img{width:100%;height:100%;object-fit:cover;display:block}
.ed-photo.is-envoi img{opacity:.55}
.ed-photo.is-echec{border-color:#fecaca}
.ed-photo.is-echec img{opacity:.35}
.ed-photo-statut{position:absolute;left:6px;bottom:6px;font-size:.68rem;font-weight:700;background:rgba(17,18,20,.75);color:#fff;padding:.12rem .4rem;border-radius:4px}
.ed-photo-statut:empty{display:none}
.ed-photo-x{position:absolute;top:4px;right:4px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(17,18,20,.72);color:#fff;display:flex;align-items:center;justify-content:center}
.ed-photo-x svg{width:16px;height:16px}

/* ==================== RÉCAPITULATIF E8 ==================== */
.ed-lignes{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.ed-ligne{border:1.5px solid var(--border-strong);border-radius:var(--ed-radius);padding:14px 16px;background:#fff;transition:opacity .15s,border-color .15s}
.ed-ligne.is-locked{border-color:var(--red-line);background:#fff7f7}
.ed-ligne.is-off{opacity:.62;border-style:dashed}
.ed-ligne-head{display:flex;align-items:center;gap:12px}
.ed-ligne-nom{flex:1;font-weight:700;font-size:1.02rem;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
/* Vignette de la réalisation, entre la case et le nom (2026-11-03). */
.ed-ligne-photo{flex:none;width:56px;height:56px;border-radius:8px;overflow:hidden;background:var(--bg-alt);border:1px solid var(--border)}
.ed-ligne-photo img{width:100%;height:100%;object-fit:cover;display:block}
.ed-ligne.is-off .ed-ligne-photo{filter:grayscale(1)}
.ed-tag{font-size:.64rem;font-weight:700;letter-spacing:.6px;text-transform:uppercase;padding:.15rem .5rem;border-radius:50px;background:var(--bg-alt);color:var(--gray-light);border:1px solid var(--border-strong)}
.ed-tag-lock{background:var(--red);color:#fff;border-color:var(--red)}
.ed-check{flex:none;width:26px;height:26px;border-radius:7px;border:2px solid var(--border-strong);background:#fff;display:flex;align-items:center;justify-content:center;padding:0}
.ed-check.is-on{background:var(--red);border-color:var(--red)}
.ed-check.is-on::after{content:'';width:11px;height:6px;border-left:2.5px solid #fff;border-bottom:2.5px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.ed-lock{flex:none;width:26px;height:26px;border-radius:7px;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center}
.ed-lock svg{width:15px;height:15px}
.ed-ligne-corps{padding-left:38px}
.ed-ligne-raison{margin:.5rem 0 0;font-size:.92rem;line-height:1.6;color:var(--gray-light)}
.ed-ligne-avert{margin:.5rem 0 0;font-size:.86rem;line-height:1.55;color:#7c2d12;background:#fff7ed;border-radius:8px;padding:8px 10px}
.ed-ligne-note{margin:.5rem 0 0;font-size:.84rem;font-weight:700;color:var(--orange)}
.ed-ligne-toggle{flex:none;width:40px;height:40px;border:none;background:none;color:var(--gray);display:flex;align-items:center;justify-content:center;transition:transform .2s}
.ed-ligne.is-open .ed-ligne-toggle{transform:rotate(180deg)}
.ed-notes{margin:1rem 0 0;padding-left:1.1rem;font-size:.88rem;color:var(--gray-light);line-height:1.6}
.ed-lieu-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:1.1rem 0 0;padding:12px 16px;background:var(--bg-alt);border-radius:10px;font-size:.92rem}
.ed-alt{margin:1.2rem 0 0;padding:16px 18px;border-radius:var(--ed-radius);border:1.5px dashed var(--border-strong);background:#fff}
.ed-alt h3{font-size:1rem;font-weight:700;margin:0 0 .4rem;font-family:var(--font-body)}
.ed-alt p{font-size:.9rem;color:var(--gray-light);line-height:1.6;margin:0 0 .8rem}
.ed-alt-light{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px}
.ed-alt-light p{margin:0}
.ed-btn-alt{background:#fff;border:1.5px solid var(--ink);color:var(--ink);border-radius:8px;min-height:44px;padding:0 1rem;font-weight:700;font-size:.88rem}
/* Question du garage, posée seulement quand la céramique est retenue. */
.ed-lieu-row+.ed-group{margin-top:1.2rem}
.ed-group[data-g="garage"]+.ed-note+.ed-btn-alt{margin-top:.8rem}
.ed-rappel{margin:1.3rem 0 0;font-size:.86rem;color:var(--gray);line-height:1.6;padding-left:14px;border-left:3px solid var(--red)}

/* ==================== CONFIRMATION ==================== */
.ed-merci{text-align:center;max-width:560px;margin:0 auto}
.ed-merci .ed-actions-col{align-items:center}
.ed-merci-ico{width:68px;height:68px;border-radius:50%;background:rgba(21,128,61,.1);color:var(--green);display:flex;align-items:center;justify-content:center;margin:0 auto 1.2rem}
.ed-dossier{display:inline-block;font-size:1rem;background:var(--bg-alt);border-radius:8px;padding:.6rem 1rem;margin:0 0 1rem}
.ed-dossier strong{letter-spacing:.5px}
/* Appel de 5 minutes proposé après l'envoi (lien d'agenda, ou téléphone tant
   que le lien n'est pas renseigné dans devis-regles.js). */
.ed-appel{margin:1.6rem 0 0;padding:18px 20px;border-radius:var(--ed-radius);background:var(--bg-alt);border:1px solid var(--border)}
.ed-appel h3{font-family:var(--font-body);font-size:1.05rem;font-weight:700;margin:0 0 .35rem}
.ed-appel p{font-size:.92rem;color:var(--gray-light);line-height:1.6;margin:0 0 1rem}
.ed-appel .ed-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:none}
.ed-avis{margin:2.2rem 0 0;padding-top:1.6rem;border-top:1px solid var(--border);text-align:left;display:grid;gap:12px}
.ed-avis-note{font-size:.95rem;text-align:center}
.ed-avis blockquote{margin:0;font-size:.9rem;line-height:1.6;color:var(--gray-light);background:var(--bg-alt);border-radius:10px;padding:12px 14px}
.ed-avis cite{display:block;margin-top:.35rem;font-style:normal;font-weight:700;color:var(--ink);font-size:.82rem}
.ed-avis .ed-link{justify-self:center}

/* Fermeture */
.ed-confirm{position:absolute;inset:0;z-index:10;background:rgba(17,18,20,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.ed-confirm-box{background:#fff;border-radius:14px;max-width:420px;width:100%;padding:24px;box-shadow:var(--shadow-lg)}
.ed-confirm-box h2{font-family:var(--font-display);font-weight:400;font-size:1.9rem;letter-spacing:1px;margin:0 0 .5rem}
.ed-confirm-box p{font-size:.95rem;color:var(--gray-light);line-height:1.6;margin:0 0 1.2rem}
.ed-confirm-btns{display:grid;gap:10px}

/* Récapitulatif repliable (tablette) */
.ed-recap{display:none}

/* Spéciaux : pas de pied, contenu centré */
.ed.is-special .ed-foot{display:none}

/* ==================== ANIMATIONS ==================== */
.ed-in-next{animation:edNext .2s ease-out}
.ed-in-prev{animation:edPrev .2s ease-out}
.ed-in-fade{animation:edFade .14s ease-out}
.ed-shake{animation:edShake .3s}
@keyframes edNext{from{opacity:0;transform:translateX(28px)}to{opacity:1;transform:none}}
@keyframes edPrev{from{opacity:0;transform:translateX(-28px)}to{opacity:1;transform:none}}
@keyframes edFade{from{opacity:0}to{opacity:1}}
@keyframes edShake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@keyframes edSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  .ed-in-next,.ed-in-prev,.ed-in-fade,.ed-shake{animation:none}
  .ed-progress-bar,.ed-opt,.ed-ligne-toggle{transition:none}
}

/* =====================================================================
   PC : >= 1024 px
   ===================================================================== */
@media (min-width:1024px){
  .ed-aside{display:block;flex:0 0 38%;max-width:38%;background:var(--ink);color:#fff;position:relative}
  .ed-head{justify-content:flex-end;padding:22px var(--ed-pad) 0}
  .ed-head-brand,.ed-back-top{display:none}
  .ed-close{margin-left:0}
  .ed-scroll{padding:24px var(--ed-pad) 32px}
  .ed-screen{max-width:640px}
  .ed-foot{border-top:none;padding:16px var(--ed-pad) 28px}
  .ed-foot-btns{max-width:none;justify-content:flex-end}
  .ed-foot-err{max-width:none;text-align:right}
  .ed-title{font-size:2.9rem}
  .ed-opt{min-height:68px}
  .ed-opt-photo{width:84px}
  .ed-cols-3 .ed-opt{flex-direction:column;align-items:flex-start;gap:8px;padding:16px}
  .ed-cols-3 .ed-opt-check{position:absolute;top:14px;right:14px}
  .ed-cols-3 .ed-opt-txt{padding-right:26px}
  .ed-photos{grid-template-columns:repeat(6,1fr)}
  .ed-btn,.ed-btn-ghost{min-height:52px}
}
@media (min-width:1024px) and (hover:hover){
  .ed-opt:hover{border-color:var(--ink)}
  .ed-opt.is-on:hover{border-color:var(--red)}
  .ed-btn:hover{background:var(--red-hover);border-color:var(--red-hover)}
  .ed-btn-ghost:hover,.ed-next.is-skip:hover{border-color:var(--ink)}
  .ed-icon-btn:hover{background:var(--ink);color:#fff}
  .ed-btn-alt:hover{background:var(--ink);color:#fff}
  .ed-drop:hover{border-color:var(--red)}
  /* Raccourcis clavier : 1 à 9 sélectionne l'option correspondante. Le
     chiffre se loge dans le coin bas droit, seul coin libre dans les deux
     dispositions de carte. */
  .ed-kbd{display:inline-flex;position:absolute;right:8px;bottom:6px;font-family:var(--font-body);font-size:.62rem;font-weight:700;color:var(--gray);background:var(--bg-alt);border-radius:4px;padding:0 .3rem;line-height:1.5}
}
@media (min-width:1280px){ .ed{--ed-pad:64px} .ed-aside-in{padding:64px 56px 36px} }

/* =====================================================================
   TABLETTE : 768 à 1023 px
   ===================================================================== */
@media (min-width:768px) and (max-width:1023.98px){
  /* En-tête sur deux lignes : marque et fermeture, puis la mention centrée
     sous la barre de progression. Le ::after force le retour à la ligne. */
  .ed-head{flex-wrap:wrap;padding:20px 32px 0;row-gap:10px}
  .ed-head::after{content:'';flex-basis:100%;order:2}
  .ed-back-top{display:none}
  .ed-head-brand{order:0}
  .ed-close{order:1;margin-left:auto}
  .ed-head .ed-badge{order:3;margin:0 auto}
  .ed-recap h3{display:none}
  .ed-recap:not([hidden]){display:block;padding:12px 32px 0;max-width:744px;width:100%;margin:0 auto}
  .ed-recap-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;padding:0 16px;border:1.5px solid var(--border-strong);border-radius:10px;background:var(--bg-alt);font-weight:700;font-size:.95rem;color:var(--ink)}
  .ed-recap-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
  .ed-recap-panel{margin-top:8px;padding:16px;border:1px solid var(--border);border-radius:10px;background:#fff}
  .ed-recap .ed-live{margin:0;padding:0;border:none}
  .ed-recap h3,.ed-recap h4{font-size:.72rem;text-transform:uppercase;letter-spacing:1.4px;color:var(--gray);font-weight:700;margin:0 0 10px}
  .ed-recap h4{margin-top:14px}
  .ed-recap dl{margin:0;display:grid;gap:8px}
  .ed-recap dl div{display:grid;grid-template-columns:110px 1fr;gap:10px}
  .ed-recap dt{font-size:.85rem;color:var(--gray)}
  .ed-recap dd{margin:0;font-weight:600;font-size:.92rem}
  .ed-recap ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
  .ed-recap li{display:flex;align-items:center;gap:.5rem;font-weight:600}
  .ed-recap li svg{color:var(--red)}
  .ed-scroll{padding:24px 32px 28px}
  /* Contenu calé en haut, juste sous l'en-tête : centré verticalement, il
     laissait un vide d'un tiers d'écran sur une tablette en portrait. */
  .ed-screen{max-width:680px;margin:0 auto}
  .ed-foot{padding:14px 32px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px rgba(16,24,40,.06)}
  .ed-foot-btns .ed-btn,.ed-foot-btns .ed-btn-ghost{min-height:56px;flex:1}
  .ed-foot-btns .ed-back-bottom{flex:0 0 32%}
  .ed-cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ed-opt{min-height:64px}
  .ed-opt,.ed-btn,.ed-btn-ghost,.ed-icon-btn,.ed-check{-webkit-tap-highlight-color:transparent}
  /* Pas de survol au doigt : un retour franc au toucher à la place. */
  .ed-opt:active{transform:scale(.985);background:var(--bg-alt)}
  .ed-btn:active{background:var(--red-hover)}
  .ed-btn-ghost:active{background:var(--bg-alt)}
  .ed-title{font-size:2.5rem}
  .ed-photos{grid-template-columns:repeat(4,1fr)}
  .ed-photo-btns{grid-template-columns:1fr 1fr}
  .ed-ligne-corps{padding-left:38px}
}
/* Tablette à l'horizontale : moins de marges, visuels réduits, pour que la
   question et le CTA tiennent sans défilement. */
@media (min-width:768px) and (max-width:1023.98px) and (orientation:landscape){
  .ed-head{padding-top:12px}
  .ed-scroll{padding-top:10px;padding-bottom:14px}
  .ed-title{font-size:2.1rem}
  .ed-sub{margin-bottom:1rem}
  .ed-opt{min-height:56px;padding-top:10px;padding-bottom:10px}
  .ed-opt-photo{width:52px}
  .ed-opt-vis{width:48px}
  .ed-opt-vis svg{max-height:32px}
  .ed-foot{padding-top:10px}
  .ed-foot-btns .ed-btn,.ed-foot-btns .ed-btn-ghost{min-height:52px}
}

/* =====================================================================
   TÉLÉPHONE : < 768 px (la version prioritaire, 90 % du trafic)
   ===================================================================== */
@media (max-width:767.98px){
  .ed-progress{height:3px}
  .ed-head{padding:10px 8px 6px;gap:4px;padding-top:calc(10px + env(safe-area-inset-top))}
  .ed-head-brand{display:none}
  .ed-head .ed-badge{flex:1;justify-content:center;font-size:.64rem;letter-spacing:.3px;padding:.32rem .55rem;border:none;background:none;white-space:normal;text-align:center;line-height:1.25}
  .ed-icon-btn{background:none}
  .ed.is-first .ed-back-top{visibility:hidden}
  .ed-back-top[hidden]{display:inline-flex!important;visibility:hidden}
  .ed-close{margin-left:0}
  .ed-scroll{padding:6px 16px 20px;display:block}
  .ed-screen{margin:0 auto}
  .ed-title{font-size:2.05rem}
  .ed-sub{font-size:.95rem;margin-bottom:1.2rem}
  .ed-title + .ed-group,.ed-title + .ed-field{margin-top:1.2rem}
  .ed-grid,.ed-cols-2,.ed-cols-3{grid-template-columns:1fr}
  .ed-opt{min-height:64px;padding:12px 14px;-webkit-tap-highlight-color:transparent}
  .ed-opt:active{background:var(--bg-alt)}
  .ed-opt-photo{width:64px}
  .ed-opt-vis{width:56px}
  .ed-foot{border-top:1px solid var(--border);padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
  .ed-back-bottom{display:none!important}
  .ed-foot-btns .ed-next{width:100%;min-height:56px;font-size:.92rem}
  .ed-form{grid-template-columns:1fr}
  .ed-ligne-corps{padding-left:0}
  .ed-ligne-photo{width:46px;height:46px}
  .ed-ligne:not(.is-open) .ed-ligne-corps{display:none}
  .ed-ligne-raison{margin-top:.7rem}
  .ed-photo-btns .ed-btn,.ed-photo-btns .ed-btn-ghost{min-height:56px}
  .ed-inline{flex-direction:column}
  .ed-actions-col .ed-btn,.ed-actions-col .ed-btn-ghost{width:100%;min-height:56px}
  .ed-confirm{align-items:flex-end;padding:0}
  .ed-confirm-box{border-radius:16px 16px 0 0;padding:22px 16px calc(18px + env(safe-area-inset-bottom))}
  .ed-confirm-btns .ed-btn,.ed-confirm-btns .ed-btn-ghost{min-height:56px}
}

/* =====================================================================
   BARRE COLLÉE DE LA PAGE (téléphone uniquement)
   ===================================================================== */
.ed-sticky{display:none}
@media (max-width:767.98px){
  .ed-sticky{display:flex;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:950;background:#fff;padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow:0 -6px 24px rgba(16,24,40,.12);transform:translateY(110%);transition:transform .25s ease}
  .ed-sticky.is-visible{transform:none}
  .ed-sticky a,.ed-sticky button{display:flex;align-items:center;justify-content:center;gap:.45rem;min-height:52px;border-radius:8px;font-family:var(--font-body);font-weight:700;font-size:.85rem;letter-spacing:.5px;text-transform:uppercase;text-decoration:none;-webkit-tap-highlight-color:transparent}
  .ed-sticky-call{flex:0 0 calc(35% - 4px);background:#fff;color:var(--ink);border:1.5px solid var(--border-strong)}
  .ed-sticky-devis{flex:1;background:var(--red);color:#fff;border:none;cursor:pointer}
  /* La barre remplace les boutons flottants sur téléphone. */
  .floating-cta,.devis-fab{display:none!important}
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){.ed-sticky{transition:none}}
