/* L'atelier des traces (atelier/traces.html, lot 8, étape 5 ; décision 040) : la mise en forme de la maquette validée
   (sorties/atelier-des-traces/maquette/atelier.css), reprise telle quelle, elle-même tirée de celle de l'atelier de quartier
   (atelier/atelier.html) : les couleurs, les rayons, les ombres, l'en-tête, les cartes de choix, la barre du bas, la page 6.
   Les polices sont déclarées dans la page par l'atelier (moteur/carte/polices.py) : aucune requête vers Internet.
   À la fin, ce que la vraie page ajoute à la maquette : le petit dessin de la trace déposée, la recherche des étapes, les
   avertissements, l'attente et les refus du serveur. */
/* ====================== repris de atelier/atelier.html ====================== */
:root { --fond: #FFFFFF; --bloc: #FFFFFF; --papier: #F6F4EF; --encre: #14213D; --encre-claire: #24365F; --douce: #5B647A; --filet: #E7E3DA;
  --vif: #FF5A1F; --vif-texte: #B8400F; --vif-chiffre: #E84A10; --pale: #FFEDE2; --gris: #9AA0AA; --ok: #2E6B4A;
  --entete: 64px; --barre: 0px; }
* { box-sizing: border-box; margin: 0; }
*, *::before, *::after { font-variant-numeric: lining-nums !important; }   /* aussi sous les « font » qui la remettraient à zéro */
[hidden] { display: none !important; }   /* un bloc caché le reste, quelle que soit sa mise en page */
.lu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* lu par un lecteur d'écran, pas vu */
html { scroll-padding-top: calc(var(--entete) + 16px); scroll-padding-bottom: calc(var(--barre) + 16px); }
body { background: var(--fond); color: var(--encre); font: 17px/1.5 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
input, select, textarea { font: inherit; color: inherit; }
.douce { color: var(--douce); }
.petit { font-size: 14px; }

/* ---------- l'en-tête : la marque, la langue de la page, les six étapes (faites : cochées et cliquables ; à venir : grisées) ---------- */
.entete { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--filet); }
.entete .dedans { max-width: 1360px; margin: 0 auto; min-height: var(--entete); display: flex; align-items: center; gap: 28px; padding: 0 32px; }
.marque { display: flex; align-items: center; gap: 12px; flex: none; text-decoration: none; color: inherit; }
.marque img { height: 40px; width: auto; display: block; }
.marque span { font: 500 12px 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--douce); border-left: 1px solid var(--filet); padding-left: 12px; }
/* la langue de la page : deux boutons dans une pastille, à côté de la marque ; sur un téléphone, dans le menu des étapes */
.langue { flex: none; font-size: 12px; color: var(--douce); background: rgba(255,255,255,.92); border: 1px solid var(--filet); border-radius: 999px; padding: 3px 4px 3px 10px; display: flex; align-items: center; gap: 6px; }
.langue button { margin: 0; width: auto; font: 12px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; border: 0; background: none; padding: 3px 8px; border-radius: 999px; color: var(--douce); }
.langue button[aria-pressed=true] { background: var(--encre); color: #fff; }
.entete nav { margin-left: auto; }
.etapes { display: flex; gap: 4px; list-style: none; padding: 0; }
.etapes button { display: flex; align-items: center; gap: 8px; width: auto; margin: 0; padding: 8px 12px; background: none; border-radius: 999px;
  font: 400 15px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--douce); white-space: nowrap; }
.etapes .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--filet); font-size: 13px; font-weight: 600; }
.etapes button:disabled { opacity: .55; }
.etapes button.fait .n { background: #fff; border-color: var(--filet); color: var(--encre); }
.etapes button.fait .n::before { content: "✓"; }
.etapes button.fait .n b { display: none; }
.etapes button:not(:disabled):not([aria-current]):hover { background: var(--papier); color: var(--encre); }
.etapes button[aria-current] { color: var(--encre); font-weight: 600; background: var(--pale); }
.etapes button[aria-current] .n { background: var(--encre); border-color: var(--encre); color: #fff; }
.etape-mobile, .jauge-etapes, .entete nav .langue { display: none; }
.etape-mobile .sep { white-space: pre; }   /* « Étape 1 sur 6 · Composer », sur une ligne */

/* ---------- les écrans : un seul se voit à la fois ---------- */
main { max-width: 1360px; margin: 0 auto; padding: 32px 32px calc(var(--barre) + 40px); }
.ecran:not(.actif) { display: none; }
.ecran.actif { animation: entrer .35s cubic-bezier(.16,1,.3,1); }
@keyframes entrer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.surtitre { font: 500 12px 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--vif-texte); margin-bottom: 10px; }
h1 { font: 600 39px/1.06 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; text-wrap: balance; letter-spacing: -.015em; }
h1[tabindex]:focus { outline: none; }   /* le titre de la page reçoit la main à chaque changement de page, pour les lecteurs d'écran */
h2 { font: 600 20px/1.15 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--filet); letter-spacing: -.015em; }
h3 { font: 600 15px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; margin: 14px 0 6px; }
.titre-ecran { margin-bottom: 26px; }
.titre-ecran > p:not(.surtitre) { color: var(--douce); margin-top: 8px; max-width: 46em; }
.titre-ecran.compact { margin-bottom: 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: baseline; }
.titre-ecran.compact .surtitre { grid-column: 1 / -1; margin-bottom: 4px; }
.titre-ecran.compact h1 { font-size: 34px; }
.titre-ecran.compact > p:not(.surtitre) { margin-top: 0; }
.deux { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 48px; align-items: start; }
.colle { position: sticky; top: calc(var(--entete) + 20px); }
.intro { color: var(--douce); }

/* les boutons et les liens */
button { margin-top: 22px; width: 100%; padding: 13px; font: 600 17px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--encre); background: var(--vif); border: 0; border-radius: 999px; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: auto; margin: 0; background: var(--encre); color: #fff; font: 600 17px/1.2 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  padding: 14px 26px; border-radius: 999px; min-height: 48px; transition: background-color .18s ease-out, transform .18s ease-out, box-shadow .18s ease-out; }
.bouton:hover { background: var(--encre-claire); transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(20,33,61,.7); }
.bouton.clair { background: #fff; color: var(--encre); box-shadow: inset 0 0 0 1px var(--filet); }
.bouton.clair:hover { background: var(--papier); }
button.lien { margin: 0; width: auto; padding: 0; font: inherit; color: var(--vif-texte); background: none; border-radius: 4px; text-decoration: underline; cursor: pointer; }
button.lien.discret, .barre button.lien { color: var(--encre); text-underline-offset: 4px; text-decoration-thickness: 1px; }
button.lien.discret { color: var(--douce); }
input:focus-visible, textarea:focus-visible, .puce input:focus-visible + span, button:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

/* les champs */
.champ { display: block; margin-bottom: 22px; position: relative; }
.champ > span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; }   /* l'aide du titre aussi, comme dans la maquette */
.champ > label { display: block; margin-bottom: 2px; }
.champ input { width: 100%; min-height: 52px; border: 1px solid #D6D2C8; border-radius: 10px; padding: 12px 14px; font-size: 18px; background: #fff; }
.champ input:focus-visible { outline: 2px solid var(--encre); outline-offset: 0; border-color: var(--encre); }
.aide, .champ .aide { display: block; color: var(--douce); font-size: 14px; margin-top: 6px; }
input[type=text], input[type=email], textarea { width: 100%; padding: 10px 12px; background: #fff; border: 1px solid var(--filet); border-radius: 8px; }
.adresse { position: relative; }
.suggestions { position: absolute; z-index: 5; left: 0; right: 0; margin-top: 4px; padding: 6px; list-style: none; background: #fff;
  border: 1px solid var(--filet); border-radius: 10px; box-shadow: 0 16px 30px -18px rgba(20,33,61,.4); }
.suggestions li { padding: 10px 12px; border-radius: 7px; cursor: pointer; }
.suggestions li[aria-selected=true], .suggestions li:hover { background: var(--pale); }
.suggestions li[aria-disabled=true] { color: var(--gris); cursor: default; background: none; }
.suggestions li small { display: block; font-size: 14px; }
.suggestions li.vide { color: var(--douce); cursor: default; background: none; }
.suggestions li em { float: right; font-style: normal; color: var(--douce); font-size: 14px; }
/* sous l'adresse : la consigne, puis « Adresse retenue », dans un bloc vert ; l'adresse à confirmer, en orange */
#retenue { display: block; color: var(--douce); font-size: 14px; margin-top: 6px; }
#retenue.ok { background: #EEF5F0; color: var(--ok); border-radius: 10px; padding: 10px 14px; font-size: 16px; margin-top: 10px; }
#retenue.ok b { font-weight: 600; }
#retenue.ok::before { content: "✓ "; content: "✓ " / ""; }
#retenue.a-confirmer { color: var(--vif-texte); font-weight: 600; font-size: 15px; }
.choix-confirmer { background: var(--pale); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; font-size: 15px; }
.choix-confirmer p { margin-bottom: 10px; }
.choix-confirmer .boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.choix-confirmer .bouton { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px; }
.radios input { accent-color: var(--encre); width: 17px; height: 17px; margin: 0; }

/* ---------- 1. composer : le titre et l'adresse à gauche, trois affiches en éventail à droite ---------- */
.accueil { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; min-height: calc(100vh - var(--entete) - 120px); }
.carte-saisie { max-width: 520px; }
.carte-saisie h1 { font-size: 54px; margin-bottom: 30px; }
.carte-saisie .effacer { color: var(--douce); font-size: 19px; margin-bottom: 30px; }
.langue-affiche { border: 0; padding: 0; margin: 0 0 22px; }
.langue-affiche legend { font-weight: 600; font-size: 15px; margin-bottom: 7px; padding: 0; }
.langue-affiche .aide { display: inline; margin: 0; }   /* dans la ligne de la page, comme dans la maquette */
.carte-saisie .actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
#generer { gap: 0; }
#generer::after { content: "\00a0→"; content: "\00a0→" / ""; }   /* la flèche se voit, elle ne se lit pas */
#generer.souris:focus-visible { outline: none; }   /* l'adresse choisie à la souris : le bouton prend la main sans paraître enfoncé */
#attente { color: var(--douce); font-size: 15px; display: flex; gap: 8px; align-items: center; min-height: 0; margin: 0; flex: 1; min-width: 12em; }
#attente.erreur { color: #B42318; }
#attente:empty { flex: 0 0 0; min-width: 0; }   /* rien à dire : le bouton reste seul sur sa ligne (la zone reste là, pour être lue quand elle parle) */
.carte-saisie .effacer { margin-top: 18px; }
#confirmer-effacer { margin-top: 12px; }
.eventail { position: relative; height: 560px; }
.eventail img { position: absolute; width: 46%; top: 50%; left: 50%; box-shadow: 0 30px 50px -24px rgba(20,33,61,.45), 0 0 0 1px rgba(20,33,61,.06); background: #fff; }
.eventail img:nth-child(1) { transform: translate(-108%, -46%) rotate(-7deg); }
.eventail img:nth-child(2) { transform: translate(8%, -46%) rotate(7deg); }
.eventail img:nth-child(3) { transform: translate(-50%, -54%); width: 54%; z-index: 2; }

/* ---------- 2. le style : l'affiche d'exemple et son coin en vraie taille à gauche, les quatre palettes à droite ---------- */
.scene-style { position: relative; background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 16px; padding: 34px 34px 30px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 30px; align-items: center; }
.scene-style .feuille { width: 100%; aspect-ratio: 848 / 1200; background: #fff center / cover no-repeat; box-shadow: 0 30px 50px -26px rgba(20,33,61,.5), 0 0 0 1px rgba(20,33,61,.06); }
.scene-style .pres { display: flex; flex-direction: column; gap: 12px; }
.scene-style .coin { width: 100%; aspect-ratio: 780 / 450; border-radius: 12px; background: #fff center / cover no-repeat; box-shadow: 0 18px 34px -22px rgba(20,33,61,.55), 0 0 0 1px rgba(20,33,61,.08); }
.scene-style h2 { font-size: 34px; line-height: 1.06; margin: 0; padding: 0; border: 0; }
.scene-style .exemple b { font-weight: 600; }
.nuancier { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nuancier i { display: block; height: 30px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.nuancier span { display: block; font-size: 13px; color: var(--douce); margin-top: 4px; line-height: 1.2; }
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choix-style { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; align-items: start; background: #fff; border: 1px solid var(--filet);
  border-radius: 14px; padding: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choix-style input { position: absolute; opacity: 0; }
.choix-style .image { display: block; }
.choix-style img, .choix-style .image canvas { width: 74px; height: auto; display: block; box-shadow: 0 0 0 1px rgba(20,33,61,.08); }
.choix-style .bande { display: flex; height: 104px; overflow: hidden; border-radius: 3px; }   /* un style sans vignette : ses couleurs */
.choix-style .bande b { flex: 1; }
.choix-style strong { display: block; font: 600 20px/1.05 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; margin: 2px 0 4px; letter-spacing: -.015em; }
.choix-style small { display: block; color: var(--douce); font-size: 14px; line-height: 1.35; }
.choix-style small.brouillon { color: var(--vif-texte); margin-top: 4px; }
.choix-style .pastilles { display: flex; gap: 4px; margin-top: 8px; }
.choix-style .pastilles i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.choix-style:hover { border-color: #CFCABD; }
.choix-style:has(input:checked) { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); }
.choix-style:has(input:focus-visible) { outline: 2px solid var(--encre); outline-offset: 3px; }
.note-encadree { background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 12px; padding: 14px 16px; color: var(--douce); font-size: 15px; margin-top: 16px; }
.retour-1 { margin-top: 16px; }
.note-encadree .lien { color: var(--encre); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.retour-1 .lien::before { content: "←"; content: "←" / ""; margin-right: .35em; }
.note-encadree #nouvelle-collection { display: block; margin-top: 8px; text-align: left; }

/* ---------- 3. la création : l'hirondelle qui fait le tour du nom, la création en quatre temps (ceux que le serveur annonce), le temps écoulé ---------- */
#ecran-3 { max-width: 760px; margin: 30px auto 0; text-align: center; }
#ecran-3 .surtitre { margin: 20px 0 0; }
#ecran-3 h1 { font-size: 46px; margin: 18px 0 8px; }
#ecran-3 .sous { color: var(--douce); font-size: 18px; }
.hirondelle { width: 300px; max-width: 80%; height: auto; display: block; margin: 0 auto; overflow: visible; }
.hirondelle path { fill: var(--encre); }
.hirondelle .gorge { fill: var(--vif); }
.avancement { height: 6px; border-radius: 3px; background: var(--filet); margin: 26px auto 10px; max-width: 520px; overflow: hidden; }
.avancement i { display: block; height: 100%; width: 0; background: var(--vif); border-radius: 3px; transition: width .5s ease-out; }
.chrono { color: var(--douce); font-size: 15px; font-variant-numeric: tabular-nums; }
.temps-creation { list-style: none; padding: 0; margin: 34px auto 0; max-width: 520px; text-align: left; }
.temps-creation li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--filet); color: var(--gris); transition: color .3s; }
.temps-creation li:last-child { border-bottom: 1px solid var(--filet); }
.temps-creation .m { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 13px; }
.temps-creation li.en-cours { color: var(--encre); font-weight: 600; }
.temps-creation li.en-cours .m { border-color: var(--vif); border-top-color: transparent; animation: tourne .9s linear infinite; }
.temps-creation li.fait { color: var(--encre); }
.temps-creation li.fait .m { background: var(--encre); border-color: var(--encre); color: #fff; }
.temps-creation li.fait .m::before { content: "✓"; content: "✓" / ""; }   /* le dessin ne se lit pas : l'état est dit à part */
.temps-creation li.erreur { color: #B42318; font-weight: 600; }
.temps-creation li.erreur .m::before { content: "!"; content: "!" / ""; font-weight: 700; }
.probleme { max-width: 520px; margin: 22px auto 0; padding: 14px 16px; background: var(--pale); border-radius: 12px; }
#creation-message { display: block; min-height: 0; margin: 0; color: var(--encre); }
#creation-message.erreur { color: #B42318; }
.probleme button { width: auto; min-height: 44px; margin: 12px 5px 0; padding: 10px 22px; font-size: 16px; }
#reessayer { background: var(--encre); color: #fff; }
#reessayer:hover { background: var(--encre-claire); }
#revenir-au-style { background: #fff; color: var(--encre); box-shadow: inset 0 0 0 1px var(--filet); }

/* ---------- l'aperçu protégé : une image dessinée dans une zone de dessin, sous une couche transparente ---------- */
.protege { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protege canvas { display: block; }
.protege .couche { position: absolute; inset: 0; }
.feuille-ombre { box-shadow: 0 26px 46px -24px rgba(20,33,61,.45), 0 0 0 1px rgba(20,33,61,.07); background: #fff; }
.mention-protege { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--douce); }
.mention-protege::before { content: ""; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V8a6 6 0 1 1 12 0v2h1v12H5V10zm2 0h8V8a4 4 0 0 0-8 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V8a6 6 0 1 1 12 0v2h1v12H5V10zm2 0h8V8a4 4 0 0 0-8 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.toast { position: fixed; left: 50%; bottom: calc(var(--barre) + 20px); transform: translate(-50%, 20px); background: var(--encre); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; max-width: min(92vw, 520px); text-align: center; }
.toast.vu { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 4. le format : l'affiche dans une pièce, à l'échelle, à gauche ; la taille et la durée à droite ---------- */
.onglets { display: inline-flex; gap: 4px; background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.onglets button { margin: 0; width: auto; border: 0; background: none; border-radius: 999px; padding: 8px 16px; font: 400 15px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; min-height: 40px; color: var(--douce); }
.onglets button[aria-selected=true], .onglets button[aria-checked=true] { background: #fff; color: var(--encre); font-weight: 600; box-shadow: 0 1px 3px rgba(20,33,61,.15); }
.tete-4 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tete-4 .etat { margin: 0 0 12px; }
.piece { position: relative; border-radius: 16px; overflow: hidden; background: #EDE6DC; }
.piece canvas { width: 100%; height: auto; }
.pieces { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--douce); margin-top: 8px; }
.pieces button { margin: 0; width: auto; border: 1px solid var(--filet); background: #fff; border-radius: 999px; padding: 6px 14px; font: 400 14px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; min-height: 36px; color: var(--encre); }
.pieces button[aria-pressed=true] { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); font-weight: 600; }
.pieces button:disabled { opacity: 1; color: var(--gris); border-style: dashed; cursor: not-allowed; }
.legende-piece { display: flex; justify-content: space-between; gap: 18px; align-items: baseline; margin-top: 12px; font-size: 14px; color: var(--douce); flex-wrap: wrap; }
.legende-piece strong { color: var(--encre); font-weight: 600; }
.legende-piece .droite { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bascule { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--douce); cursor: pointer; }
.bascule input { width: 18px; height: 18px; accent-color: var(--encre); margin: 0; }
.seule { background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 16px; padding: 28px; display: flex; justify-content: center; }
.seule canvas { max-width: 100%; height: auto; }
#legende-seule { margin-top: 10px; }
.bloc-choix { margin-bottom: 30px; }
.bloc-choix h2 { font-size: 28px; line-height: 1.06; margin: 0 0 4px; padding: 0; border: 0; }
.bloc-choix > p { color: var(--douce); font-size: 15px; margin-bottom: 14px; }
.formats, .durees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.format, .duree { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 1px solid var(--filet);
  border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.format input, .duree input { position: absolute; opacity: 0; }
.format { padding: 14px 16px 16px; min-height: 150px; }
.format .dessin { height: 46px; display: flex; align-items: flex-end; margin-bottom: 8px; }
.format .dessin i { display: block; border: 1.5px solid var(--encre); border-radius: 2px; background: #fff; }
.format strong { font: 600 26px/1 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: -.015em; }
.format .dim { font-size: 14px; color: var(--douce); }
.format .prix { font-size: 22px; font-weight: 600; margin-top: auto; padding-top: 8px; }
.format .supplement { font-size: 13px; color: var(--douce); line-height: 1.3; margin-top: 2px; }
.format:hover, .duree:hover { border-color: #CFCABD; }
.format:has(input:checked), .duree:has(input:checked) { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); background: #FCFBF8; }
.format:has(input:checked)::after { content: "✓"; content: "✓" / ""; position: absolute; top: 12px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--encre); color: #fff;
  display: grid; place-items: center; font-size: 13px; }
.format:has(input:focus-visible), .duree:has(input:focus-visible) { outline: 2px solid var(--encre); outline-offset: 3px; }
.duree { padding: 12px 16px 14px; }
.duree strong { font: 600 23px/1.05 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: -.015em; }
.duree small { font-size: 14px; color: var(--douce); line-height: 1.3; }
.duree .raison { display: none; }
.duree:has(input:disabled) { background: #F7F6F3; border-style: dashed; cursor: not-allowed; color: var(--gris); }
.duree:has(input:disabled) strong { color: var(--gris); }
.duree:has(input:disabled) .raison { display: block; font-size: 13px; color: var(--vif-texte); margin-top: 4px; }
.duree:has(input:disabled) .terrain { display: none; }
#duree-changee { background: var(--pale); border-radius: 10px; padding: 10px 14px; font-size: 15px; margin-top: 12px; color: var(--encre); }
.a-savoir { border: 1px solid var(--filet); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; }
.a-savoir strong { font-weight: 600; }
.a-savoir ul { margin: 6px 0 0; padding-left: 18px; }
.a-savoir li + li { margin-top: 4px; }
.a-savoir li span { display: block; color: var(--douce); }
.a-savoir p { color: var(--douce); font-size: 14px; margin-top: 6px; }
.miniature { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 14px; padding: 14px; }
.miniature canvas { width: 120px; height: auto; }
.miniature p { font-size: 15px; color: var(--douce); }
.miniature p strong { color: var(--encre); }

/* ---------- ce qui sert à plusieurs pages ---------- */
.note.haut { margin: 0 0 10px; }
label.case { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 5px 12px 5px 42px; cursor: pointer; }   /* trop étroite : la case du nom écrit passe à la ligne */
label.case:last-child { padding-bottom: 12px; }
label.case.accord { align-items: flex-start; padding: 12px 0; } label.case.accord input { margin-top: 3px; }
label.case input { width: 17px; height: 17px; accent-color: var(--encre); flex: none; }
label.case span { flex: 1; }
input:disabled { background: var(--papier); color: var(--douce); }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce input { position: absolute; opacity: 0; }
.puce span { display: block; padding: 6px 12px; background: #fff; border: 1px solid var(--filet); border-radius: 999px; cursor: pointer; font-size: 15px; }
.puce input:checked + span { background: var(--encre); border-color: var(--encre); color: #fff; }
.note { color: var(--douce); font-size: 14px; margin-top: 8px; }
.etat { min-height: 26px; margin-bottom: 8px; color: var(--douce); display: flex; gap: 8px; align-items: center; }
.etat.erreur { color: #B42318; }
.etat.calcul::before { content: ""; flex: none; width: 14px; height: 14px; border: 2px solid var(--filet); border-top-color: var(--vif); border-radius: 50%; animation: tourne .8s linear infinite; }
#etat-4 { min-height: 0; font-size: 14px; }
#etat-4:empty { display: none; }
@keyframes tourne { to { transform: rotate(360deg); } }
.merci a { color: var(--vif-texte); font-weight: 600; }
.merci { background: var(--pale); border-radius: 12px; padding: 18px; margin-top: 18px; }


/* (page 6, barre du bas, impression, téléphone : repris tels quels) */
/* ---------- 6. la finition, comme la maquette du lot 5, avec la suspension en plus : l'affiche au mur, seule, encadrée ou suspendue ;
   à droite, le cadre ou la suspension et la couleur du bois, le fichier, le récapitulatif ; le devis complet dans la barre du bas ---------- */
.mur { background: #fff; box-shadow: inset 0 0 0 1px var(--filet); border-radius: 16px; padding: 34px 30px 20px; display: flex; flex-direction: column; align-items: center; min-height: 0; justify-content: center; position: relative; overflow: hidden; }
.encadre { position: relative; display: block; border: 0 solid transparent; transition: border-color .25s, border-width .25s, box-shadow .25s; }
.encadre canvas { display: block; }
.encadre.sans, .encadre.suspension { box-shadow: -3px 6px 14px rgba(40,30,20,.22), 0 0 0 .5px rgba(0,0,0,.08); }
.encadre.cadre.bois { border-color: #CDA16D #B4824E #A97646 #C4955F; box-shadow: -5px 9px 18px rgba(40,30,20,.32); }
.encadre.cadre.noir { border-color: #2B2B2E #1D1D1F #141416 #242427; box-shadow: -5px 9px 18px rgba(40,30,20,.34); }
.encadre.cadre.blanc { border-color: #FAFAF8 #F1F0EC #E9E8E3 #F5F4F0; box-shadow: -5px 9px 18px rgba(40,30,20,.26), 0 0 0 .5px rgba(0,0,0,.08); }
/* la suspension : deux baguettes qui pincent l'affiche en haut et en bas et dépassent un peu de chaque côté ; celle du haut porte la
   cordelette, jusqu'au clou. Leurs mesures, à l'échelle de l'affiche, sont posées par ajusterFinition : --bag, la hauteur d'une
   baguette ; --deb, ce qui dépasse de chaque côté ; --corde, la hauteur de la cordelette */
.encadre.suspension::before, .encadre.suspension::after { content: ""; position: absolute; left: calc(-1 * var(--deb, 6px)); right: calc(-1 * var(--deb, 6px)); z-index: 2; pointer-events: none;
  filter: drop-shadow(-2px 4px 3px rgba(40,30,20,.28)); }
.encadre.suspension::after { bottom: 0; height: var(--bag, 10px); background: var(--baguette); border-radius: 1px; }
.encadre.suspension::before { top: calc(-1 * var(--corde, 40px)); height: calc(var(--corde, 40px) + var(--bag, 10px));
  background: radial-gradient(circle at 50% 3px, #6E6A64 0 2.5px, transparent 3px) top / 100% var(--corde, 40px) no-repeat,
    var(--cordelette) top / 100% var(--corde, 40px) no-repeat, var(--baguette) bottom / 100% var(--bag, 10px) no-repeat; }
.encadre.suspension.bois { --baguette: linear-gradient(#DDBB8C, #CFA672 55%, #B98B57); --cordelette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolyline points='2,100 50,1 98,100' fill='none' stroke='%23BFA780' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.encadre.suspension.noir { --baguette: linear-gradient(#3A3A3D, #232325 55%, #141416); --cordelette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolyline points='2,100 50,1 98,100' fill='none' stroke='%232B2B2B' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.encadre.suspension.blanc { --baguette: linear-gradient(#E6E4DE, #FFFFFF 18%, #F2F1ED 60%, #D8D6CF); --cordelette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolyline points='2,100 50,1 98,100' fill='none' stroke='%23CFCBC2' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.encadre.cadre::after { content: ""; position: absolute; inset: 0; box-shadow: inset 2px 3px 6px rgba(0,0,0,.26); background: linear-gradient(118deg, rgba(255,255,255,.18) 0 26%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 70%, rgba(255,255,255,.08) 82%, rgba(255,255,255,0) 92%); pointer-events: none; }
.mur .tube { margin-top: 18px; font-size: 14px; color: var(--douce); }
#etat-6 { margin: 8px 0 0; min-height: 0; font-size: 14px; }
#etat-6:empty { display: none; }
.sous-mur { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 14px; }
.encart { border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--filet); }
.encart canvas { width: 100%; height: auto; display: block; }
/* seule, suspendue ou encadrée : trois cartes côte à côte, dessinées comme les formats de la page 4 (un dessin au trait, le nom en
   grand, le prix en gras, l'écart en petit) */
.cadres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cadre-choix { position: relative; margin: 0; width: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff;
  border: 1px solid var(--filet); border-radius: 14px; padding: 14px 16px 16px; min-height: 150px; transition: border-color .15s, box-shadow .15s;
  font: 400 15px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--encre); cursor: pointer; }
.cadre-choix:hover { border-color: #CFCABD; }
.cadre-choix .dessin { position: relative; height: 46px; display: flex; align-items: flex-end; margin-bottom: 8px; padding: 0 4px; }
.cadre-choix .dessin i { position: relative; display: block; width: 22px; height: 31px; border: 1.5px solid var(--encre); border-radius: 2px; background: #fff; }
.cadre-choix .dessin.cadre i { width: 28px; height: 37px; border-width: 4px; border-radius: 1px; }
.cadre-choix .dessin.cadre i::before { content: ""; position: absolute; inset: 2px; border: 1px solid var(--encre); opacity: .45; }
.cadre-choix .dessin.suspension i::before, .cadre-choix .dessin.suspension i::after { content: ""; position: absolute; left: -5px; right: -5px; height: 3.5px; background: var(--encre); border-radius: 1px; }
.cadre-choix .dessin.suspension i::before { top: -1.5px; } .cadre-choix .dessin.suspension i::after { bottom: -1.5px; }
.cadre-choix .dessin.suspension::before { content: ""; position: absolute; left: 1px; width: 30px; bottom: 31px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolyline points='2,100 50,1 98,100' fill='none' stroke='%2314213D' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.cadre-choix strong { font: 600 23px/1.05 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: -.015em; }
.cadre-choix small { font-size: 13px; color: var(--douce); line-height: 1.3; }
.cadre-choix .prix { font-size: 22px; font-weight: 600; font-variant-numeric: lining-nums; white-space: nowrap; margin-top: auto; padding-top: 8px; }
.cadre-choix .supplement { font-size: 13px; color: var(--douce); line-height: 1.3; margin-top: 2px; }
.cadre-choix[aria-checked="true"] { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); background: #FCFBF8; }
.cadre-choix[aria-checked="true"]::after { content: "✓"; content: "✓" / ""; position: absolute; top: 12px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--encre); color: #fff;
  display: grid; place-items: center; font-size: 13px; }
.cadre-choix:disabled { opacity: 1; background: #F7F6F3; border-style: dashed; cursor: not-allowed; color: var(--gris); }
.cadre-choix:disabled .dessin { opacity: .45; }
.cadre-choix:disabled strong { color: var(--gris); }
.cadre-choix .raison-cadre { display: block; font-size: 13px; color: var(--vif-texte); margin-top: auto; padding-top: 8px; }
/* la couleur du cadre ou des baguettes : trois pastilles de bois, sous les trois choix */
.couleurs { margin-top: 14px; }
.couleurs p { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.couleurs-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.couleur-choix { margin: 0; width: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px 6px 8px; background: #fff; border: 1px solid var(--filet); border-radius: 999px;
  font: 400 15px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--encre); cursor: pointer; }
.couleur-choix .pastille { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.couleur-choix .pastille.bois { background: linear-gradient(135deg, #DDBB8C, #B98B57); } .couleur-choix .pastille.noir { background: #1D1D1F; } .couleur-choix .pastille.blanc { background: #F4F3EF; }
.couleur-choix[aria-checked="true"] { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); background: #FCFBF8; font-weight: 600; }
.livraison-cadre { font-size: 15px; color: var(--douce); margin-top: 12px; }
.livraison-cadre strong { color: var(--encre); font-weight: 600; }
.option-pdf { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; background: #fff; border: 1px solid var(--filet); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.option-pdf input { width: 22px; height: 22px; accent-color: var(--encre); margin: 2px 0 0; }
.option-pdf strong { display: block; font-weight: 600; }
.option-pdf small { color: var(--douce); font-size: 14px; }
.option-pdf .prix { font-weight: 600; white-space: nowrap; }
.option-pdf.coche { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); background: #FCFBF8; }
#ecran-6 .recap { background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 14px; padding: 16px 18px; font-size: 15px; margin: 0; border: 0; }
#ecran-6 .recap dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; }
#ecran-6 .recap dt { color: var(--douce); }
#ecran-6 .recap dd { margin: 0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
#ecran-6 .recap button.modifier { font-size: 14px; color: var(--douce); flex: none; }
#ecran-6 .recap .alerte { background: var(--pale); color: var(--vif-texte); border-radius: 10px; padding: 10px 14px; font-size: 15px; margin-top: 12px; }
#ecran-6 .recap .alerte button.lien { color: var(--vif-texte); display: block; margin-top: 4px; font-weight: 600; text-underline-offset: 3px; }   /* le chemin pour le faire, sur sa ligne */
#ecran-6 .accord { display: flex; gap: 12px; align-items: flex-start; background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 12px; padding: 14px; margin-top: 18px; font-size: 16px; cursor: pointer; }
#ecran-6 .accord input { width: 22px; height: 22px; accent-color: var(--encre); margin-top: 1px; flex: none; }
/* sous la case d'accord, hors de son libellé (un clic sur le lien ne coche rien) : lire les conditions générales de vente */
.lire-conditions { margin: 8px 0 0 48px; font-size: 14px; }
.lire-conditions a { color: var(--douce); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lire-conditions a:hover { color: var(--encre); }
#ecran-6 .note-fin { margin-top: 12px; color: var(--douce); font-size: 14px; }
#ecran-6 .note-fin:empty { display: none; }
#ecran-6 .note-fin a { color: var(--vif-texte); font-weight: 600; }
/* la commande de plusieurs affiches (étape 8) : celles déjà mises de côté, en petites lignes ; de quoi en ajouter une */
.panier { list-style: none; margin: 0 0 14px; padding: 0; }
.panier[hidden] { display: none; }
.panier li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "v q p" "v q r"; gap: 2px 12px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--filet); }
.panier li:last-child { border-bottom: 1px solid var(--filet); }
.panier .vignette { grid-area: v; width: 48px; aspect-ratio: 420 / 594; background: var(--papier); box-shadow: 0 1px 3px rgba(20,33,61,.25); overflow: hidden; }
.panier .vignette img { display: block; width: 100%; height: 100%; object-fit: cover; }
.panier .quoi { grid-area: q; min-width: 0; }
.panier strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.panier small { display: block; color: var(--douce); font-size: 14px; }
.panier .prix { grid-area: p; font-weight: 600; white-space: nowrap; text-align: right; }
.panier button.lien { grid-area: r; justify-self: end; font-size: 14px; }
.ajouter-affiche { width: 100%; }
.ajouter-affiche::before { content: "+"; content: "+" / ""; font-weight: 400; font-size: 20px; line-height: 1; }
.ajouter-affiche:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: inset 0 0 0 1px var(--filet); }
.panier-note { margin-top: 18px; background: var(--pale); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.panier-note p { margin: 0 0 4px; }
.fenetre .panier { margin-top: 6px; }
.fenetre .boite:has([data-commande]) { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }   /* (six affiches, sur un téléphone : elle défile) */
.fenetre .accord { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--encre); margin: 0 0 16px; cursor: pointer; }
.fenetre .accord input { width: 20px; height: 20px; accent-color: var(--encre); margin-top: 1px; flex: none; }
.fenetre .lire-conditions { margin: -8px 0 16px 32px; font-size: 14px; }
.fenetre .bouton { width: 100%; margin-bottom: 10px; }
.fenetre .erreur { color: #B42318; }
/* le pied de page, sous les six pages et au-dessus de la barre du bas : les trois pages légales de la boutique, discrètes. Il
   prend sa place dans le blanc du bas de la page (la marge négative), pour ne presque rien ajouter à sa hauteur. */
.pied-legal { display: flex; flex-wrap: wrap; justify-content: center; margin: 16px 0 -16px; font-size: 13px; color: var(--douce); }
.pied-legal a { color: inherit; text-decoration: none; }
.pied-legal a:hover { text-decoration: underline; }
.pied-legal a + a::before { content: "·"; content: "·" / ""; display: inline-block; margin: 0 10px; }

/* ---------- la barre du bas, des pages 2 à 6 : « Précédent », ce qui compte à cette page (le devis en pages 4 à 6), le bouton qui fait avancer ---------- */
.barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--filet); box-shadow: 0 -10px 30px -22px rgba(20,33,61,.4); }
.barre .dedans { max-width: 1360px; margin: 0 auto; padding: 12px 32px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.barre button { margin: 0; width: auto; }
#precedent { font-size: 17px; white-space: nowrap; }
#precedent::before { content: "← "; content: "← " / ""; }
#continuer { grid-column: 3; display: inline-flex; align-items: center; min-height: 48px; padding: 14px 26px; background: var(--encre); color: #fff; font-size: 17px; line-height: 1.2; white-space: nowrap;
  transition: background-color .18s ease-out, transform .18s ease-out, box-shadow .18s ease-out; }
#continuer:hover { background: var(--encre-claire); transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(20,33,61,.7); }
#continuer::after { content: " →"; content: " →" / ""; white-space: pre; }
.barre.fin #continuer::after { content: none; }   /* « Terminer ma carte », « Commander » : pas de flèche */
.devis { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; color: var(--douce); text-align: center; }
.devis .ligne-devis { white-space: nowrap; }
.devis .ligne-devis b { color: var(--encre); font-weight: 600; }
.devis .total { color: var(--encre); white-space: nowrap; }
.devis .total b { font: 600 26px/1 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--vif-chiffre); margin-left: 2px; letter-spacing: -.015em; }
.devis .livraison { width: 100%; font-size: 13px; }
.devis .erreur { color: #B42318; }
.devis .detail { display: none; }
.devis:empty { display: none; }   /* en ligne, pas encore de devis d'affiche (étape 5) */
/* la fenêtre du détail du devis */
.fenetre { position: fixed; inset: 0; z-index: 90; background: rgba(20,33,61,.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.fenetre .boite { background: #fff; border-radius: 16px; max-width: 520px; width: 100%; padding: 28px 30px; }
.fenetre h2 { font-size: 32px; margin: 0 0 10px; padding: 0; border: 0; }
.fenetre dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 15px; }
.fenetre dt { color: var(--douce); }
.fenetre dd { margin: 0; text-align: right; }
.fenetre .detail-devis { box-shadow: inset 0 0 0 1px var(--filet); border-radius: 14px; }
.fenetre .detail-devis dl { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin: 8px 0 0; }
.fenetre .detail-devis dd { text-align: right; font-variant-numeric: lining-nums tabular-nums !important; white-space: nowrap; }
.fenetre p { color: var(--douce); margin: 12px 0 18px; font-size: 15px; }

@media print {   /* l'aperçu ne s'imprime pas : une phrase à sa place */
  .protege canvas { visibility: hidden; }
  .protege::after { content: attr(data-impression); position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; color: #14213D; }
  .barre, .entete { position: static; }
}
/* le client a demandé moins d'animations : l'hirondelle reste posée sur son tour (c'est son programme qui l'arrête) */
@media (prefers-reduced-motion: reduce) {
  .etat.calcul::before, .temps-creation li.en-cours .m, .ecran.actif { animation: none; }
}

/* ---------- tablette ---------- */
@media (max-width: 1100px) {
  .etapes button .t { display: none; }
  .etapes button[aria-current] .t { display: inline; }
}
/* ---------- téléphone (moins de 900 points) : une seule colonne ; dans l'en-tête, « Étape n sur 6 · la page », qui ouvre les six
   étapes en menu sous l'en-tête, avec la langue de la page ; la barre du bas sur deux lignes ; tout ce qui se touche fait au moins
   44 × 44 points ---------- */
@media (max-width: 900px) {
  :root { --entete: 56px; }
  .entete .dedans { padding: 0 16px; gap: 12px; }
  .marque img { height: 32px; }
  .marque span, .entete .dedans > .langue { display: none; }
  .entete nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 8px 16px 14px; background: #fff;
    border-bottom: 1px solid var(--filet); box-shadow: 0 18px 30px -20px rgba(20,33,61,.4); }
  .entete.menu-ouvert nav { display: block; }
  .entete nav .langue { display: flex; width: max-content; margin: 8px 0 0 auto; font-size: 14px; }
  .entete nav .langue button { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 14px; }
  .etapes { flex-direction: column; gap: 2px; max-width: 520px; margin-left: auto; }
  .etapes button { width: 100%; min-height: 48px; padding: 8px 12px; font-size: 16px; border-radius: 12px; }
  .etapes button .t { display: inline; }
  .etape-mobile { display: flex; align-items: center; gap: 0; min-height: 44px; width: auto; margin: 0 0 0 auto; padding: 2px 4px 2px 8px; background: none; border-radius: 10px;
    color: var(--encre); font: 400 15px/1.25 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; white-space: nowrap; }
  .etape-mobile b { font-weight: 600; }
  .etape-mobile::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--douce); border-bottom: 1.5px solid var(--douce); transform: translateY(-2px) rotate(45deg); margin-left: 9px; }
  .etape-mobile[aria-expanded=true]::after { transform: translateY(2px) rotate(-135deg); }
  .etape-mobile:hover { background: var(--papier); }
  .jauge-etapes { display: flex; gap: 3px; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
  .jauge-etapes i { flex: 1; background: var(--filet); }
  .jauge-etapes i.fait { background: var(--encre); }
  .jauge-etapes i.ici { background: var(--vif); }
  main { padding: 20px 16px calc(var(--barre) + 30px); }
  h1 { font-size: 34px; }
  .deux, .accueil { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .colle { position: static; }
  .accueil { min-height: 0; }
  .eventail { height: 250px; order: 2; }
  .carte-saisie h1 { font-size: 40px; }
  .scene-style { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 12px; }
  .scene-style .feuille { display: none; }
  .scene-style h2 { font-size: 26px; }
  .styles { grid-template-columns: 1fr; }
  .titre-ecran.compact { display: block; }
  .titre-ecran.compact h1 { font-size: 30px; }
  .titre-ecran.compact > p:not(.surtitre) { margin-top: 6px; }
  .formats, .durees { gap: 8px; }
  .format { padding: 12px; min-height: 132px; }
  .format strong { font-size: 26px; }
  .format .prix { font-size: 19px; }
  .cadres { gap: 8px; }
  .cadre-choix { padding: 12px; min-height: 132px; }
  .cadre-choix strong { font-size: 22px; }
  .cadre-choix .prix { font-size: 19px; }
  .cadre-choix[aria-checked="true"]::after { top: 10px; right: 10px; width: 22px; height: 22px; font-size: 12px; }
  .duree { padding: 10px 12px; }
  .onglets button, .pieces button { min-height: 44px; }
  .bascule, .lien { min-height: 44px; }
  .retour-1 .lien, .effacer .lien { display: inline-flex; align-items: center; }
  .lire-conditions a, .pied-legal a { display: inline-flex; align-items: center; min-height: 44px; }
  .lire-conditions { margin-top: 0; }
  .fenetre .lire-conditions { margin-top: -16px; margin-bottom: 4px; }
  .pied-legal { margin: 8px 0 -8px; }
  /* les pages 5 et 6 : le titre de la page d'abord, puis l'aperçu, réduit, puis les réglages.
     L'écran actif s'efface (display: contents) : son surtitre et son titre se rangent avant l'aperçu, le reste après. */
  /* la page 6 : le mur, puis les choix ; les cadres l'un sous l'autre */
  .mur { padding: 28px 16px 20px; }
  .sous-mur { grid-template-columns: 130px minmax(0, 1fr); }
  #ecran-6 .recap button.modifier { min-height: 44px; display: inline-flex; align-items: center; }
  #ecran-6 .recap .alerte button.lien { display: flex; align-items: center; margin-top: 0; }
  #ecran-6 .recap dl { grid-template-columns: 90px minmax(0, 1fr); }
  /* la barre sur deux lignes : ce qui compte à cette page (le total et la livraison ; l'affiche choisie se lit dans la page),
     puis « Précédent » et le bouton qui fait avancer */
  .barre .dedans { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "devis devis" "retour suite"; gap: 6px 10px; padding: 8px 16px 10px; }
  .devis { grid-area: devis; flex-wrap: nowrap; justify-content: flex-start; gap: 0 10px; min-height: 44px; text-align: left; }
  .devis .ligne-devis { display: none; }
  .devis .ligne-devis.garder { display: inline; }   /* en page 2, le style choisi */
  .devis .total { flex: none; }
  .devis .livraison { width: auto; flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
  .devis .detail { display: inline-flex; align-items: center; min-height: 44px; flex: none; font-size: 14px; }
  .devis .total b { font-size: 26px; }
  #precedent { grid-area: retour; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--filet); text-decoration: none; }
  #continuer { grid-area: suite; justify-self: stretch; justify-content: center; min-height: 48px; padding: 12px 16px; font-size: 16px; }
  .barre.sans-suite .dedans { grid-template-areas: "devis devis" "retour retour"; }
  .barre.sans-suite #precedent { justify-self: start; }
}

/* ====================== propre à l'atelier des traces ====================== */

/* les boutons de la maquette qui ne sont pas « le » bouton orange : rien de la règle générale des boutons */
.nu { margin: 0; width: auto; padding: 0; background: none; border: 0; border-radius: 0; font: inherit; color: inherit; cursor: pointer; }

/* ---------- l'en-tête : le logo dessiné de Mes Parages, puis « Atelier » ---------- */
.marque .etiquette { font: 500 12px 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--douce); border-left: 1px solid var(--filet); padding-left: 12px; white-space: nowrap; }
.etapes button { margin: 0; }

/* ---------- 1. votre trace ---------- */
.accueil { align-items: start; min-height: 0; }
.carte-saisie { max-width: 560px; }
#creer { gap: 0; }
#creer::after { content: "\00a0→"; content: "\00a0→" / ""; }   /* la flèche se voit, elle ne se lit pas (comme « Créer ma carte ») */
.accueil .eventail { position: sticky; top: calc(var(--entete) + 60px); }
.eventail canvas { position: absolute; width: 46%; height: auto; top: 50%; left: 50%; box-shadow: 0 30px 50px -24px rgba(20,33,61,.45), 0 0 0 1px rgba(20,33,61,.06); background: #fff;
  transition: opacity .3s; }
.eventail canvas:nth-child(1) { transform: translate(-108%, -46%) rotate(-7deg); }
.eventail canvas:nth-child(2) { transform: translate(8%, -46%) rotate(7deg); }
.eventail canvas:nth-child(3) { transform: translate(-50%, -54%); width: 54%; z-index: 2; }
.eventail .couche { z-index: 3; }
.groupe { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.groupe > legend, .etiquette-champ { display: block; font-weight: 600; font-size: 15px; margin-bottom: 9px; padding: 0; }
/* les quatre produits : des cartes comme celles des formats (le dessin au trait, le nom en grand, sa ligne) */
.produits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.produit { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 1px solid var(--filet); border-radius: 14px;
  padding: 13px 16px 15px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.produit input { position: absolute; opacity: 0; }
.produit svg { width: 60px; height: 40px; margin-bottom: 6px; overflow: visible; }
.produit strong { font: 600 20px/1.08 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; padding-right: 26px; letter-spacing: -.015em; }
.produit small { font-size: 14px; line-height: 1.35; color: var(--douce); }
.produit:hover { border-color: #CFCABD; }
.produit:has(input:checked) { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); background: #FCFBF8; }
.produit:has(input:checked)::after { content: "✓"; content: "✓" / ""; position: absolute; top: 12px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--encre); color: #fff;
  display: grid; place-items: center; font-size: 13px; }
.produit:has(input:focus-visible) { outline: 2px solid var(--encre); outline-offset: 3px; }
.trait { fill: none; stroke: var(--encre); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trait-vif { fill: none; stroke: var(--vif); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plein { fill: var(--encre); }
.plein-vif { fill: var(--vif); }
.blanc-plein { fill: #fff; stroke: var(--encre); stroke-width: 1.6; }
/* la source : le fichier déposé, les étapes, l'itinéraire */
.bloc-source { margin-bottom: 26px; }
.bloc-source > .aide { margin-top: 8px; }
.depot { position: relative; border: 1px solid var(--filet); border-radius: 14px; background: #fff; padding: 14px 16px; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.depot.vide { border: 1.5px dashed #CFCABD; text-align: center; padding: 26px 18px 22px; }
.depot.survol { border-color: var(--encre); border-style: solid; background: var(--papier); box-shadow: 0 0 0 1px var(--encre); }
.depot .fichier { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.depot .icone-fichier { width: 44px; height: 52px; display: grid; place-items: end center; padding-bottom: 8px; border: 1.5px solid var(--encre); border-radius: 3px 12px 3px 3px; position: relative;
  font: 700 10px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: .08em; color: var(--encre); background: #fff; }
.depot .icone-fichier::before { content: ""; position: absolute; left: 8px; right: 8px; top: 12px; height: 14px; border-top: 2px solid var(--vif); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: rotate(-8deg); }
.depot .nom-fichier { display: block; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; line-height: 1.3; }
.depot .etat-trace { display: block; font-size: 14px; color: var(--ok); margin-top: 2px; }
.depot .etat-trace::before { content: "✓ "; content: "✓ " / ""; }
.depot .etat-trace.attente { color: var(--douce); }
.depot .etat-trace.attente::before { content: none; }
.depot .etat-trace.erreur { color: #B42318; }
.depot .etat-trace.erreur::before { content: "! "; content: "! " / ""; font-weight: 700; }
.depot .deposer { font: 600 19px/1.1 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; margin-bottom: 4px; letter-spacing: -.015em; }
.depot .deposer-aide { font-size: 14px; color: var(--douce); text-wrap: balance; }
.depot .choisir { margin-top: 12px; min-height: 42px; padding: 9px 18px; font-size: 15px; }
.depot .remplacer { font-size: 15px; color: var(--encre); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; white-space: nowrap; }
.note-maquette { background: var(--papier); border-radius: 10px; padding: 9px 12px; font-size: 14px; color: var(--douce); margin-top: 10px; line-height: 1.4; }
label.case-simple { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; cursor: pointer; line-height: 1.4; }
label.case-simple input { width: 18px; height: 18px; accent-color: var(--encre); margin: 2px 0 0; flex: none; }
label.case-simple small { display: block; color: var(--douce); font-size: 14px; }
/* les étapes d'un road trip (ou d'une itinérance) : une liste qui se modifie */
.liste-etapes { list-style: none; margin: 0; padding: 4px 6px; border: 1px solid var(--filet); border-radius: 14px; background: #fff; max-height: 404px; overflow: auto; overscroll-behavior: contain; }
.liste-etapes li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; }
.liste-etapes li + li { border-top: 1px solid #F0EDE6; }
.liste-etapes .n { width: 24px; height: 24px; border-radius: 50%; background: var(--encre); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.liste-etapes input { width: 100%; min-height: 38px; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; font-size: 16px; background: transparent; }
.liste-etapes input:hover { border-color: var(--filet); }
.liste-etapes input:focus { border-color: var(--encre); background: #fff; outline: none; }
.liste-etapes .outils { display: flex; gap: 0; }
.icone-bouton { margin: 0; width: 34px; height: 34px; padding: 0; border: 0; background: none; border-radius: 50%; color: var(--douce); display: grid; place-items: center;
  font: 400 16px/1 'Helvetica Neue', Arial, sans-serif; }
.icone-bouton:hover:not(:disabled) { background: var(--papier); color: var(--encre); }
.icone-bouton:disabled { opacity: .28; cursor: default; }
.sous-liste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 15px; }
.sous-liste .compte { color: var(--douce); font-size: 14px; }
button.lien.ajouter-etape { font-weight: 600; color: var(--encre); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ajouter-etape::before { content: "+ "; content: "+ " / ""; }
.transports { margin-top: 18px; }
.lien-bas { margin-top: 14px; font-size: 15px; color: var(--douce); }
.lien-bas .lien { color: var(--encre); }
/* le choix entre plusieurs sources (itinérance) : les onglets de la page 4, en choix */
.onglets.choix-source { margin-bottom: 14px; flex-wrap: wrap; }
/* une liste de choix, une ligne chacun (les itinéraires connus, la collection) */
.choix-liste { display: grid; gap: 10px; }
.choix-ligne { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; background: #fff; border: 1px solid var(--filet); border-radius: 14px;
  padding: 13px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choix-ligne > input { width: 18px; height: 18px; accent-color: var(--encre); margin: 3px 0 0; }
.choix-ligne strong { display: block; font-weight: 600; font-size: 16px; line-height: 1.35; }
.choix-ligne small { display: block; color: var(--douce); font-size: 14px; line-height: 1.4; margin-top: 1px; }
.choix-ligne:hover { border-color: #CFCABD; }
.choix-ligne:has(> input:checked) { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); background: #FCFBF8; }
.choix-ligne .suite-choix { grid-column: 2; }
.choix-ligne .suite-choix > .code-collection:first-child { margin-top: 0; }   /* (l'écart de la grille suffit : le champ du code, comme la maquette) */
.choix-ligne > label { cursor: pointer; }
/* un choix qui n'est pas possible : visible, grisé, avec sa raison */
.choix-ligne.fermee { background: #F7F6F3; border-style: dashed; cursor: not-allowed; }
.choix-ligne.fermee:hover { border-color: var(--filet); }
.choix-ligne.fermee strong { color: var(--gris); }
.choix-ligne.fermee small.raison { color: var(--vif-texte); font-size: 13px; }
.choix-liste.compacte { gap: 8px; }
.choix-liste.compacte .choix-ligne { padding: 9px 14px 10px; border-radius: 12px; }
.choix-liste.compacte .choix-ligne strong { font-size: 15px; }

/* ---------- 2. le style : une palette impossible (la collection a la sienne) reste visible, grisée, avec sa raison ---------- */
.scene-style .feuille { background: #fff; position: relative; }
.scene-style .feuille canvas { width: 100%; height: 100%; }
.scene-style .coin { overflow: hidden; }
.scene-style .coin canvas { width: 100%; height: 100%; display: block; }
.choix-style .raison { display: none; }
.choix-style:has(input:disabled) { background: #F7F6F3; border-style: dashed; cursor: not-allowed; }
.choix-style:has(input:disabled) .image canvas { opacity: .45; }
.choix-style:has(input:disabled) strong { color: var(--gris); }
.choix-style:has(input:disabled) small:not(.raison) { color: var(--gris); }
.choix-style:has(input:disabled) .pastilles { opacity: .45; }
.choix-style:has(input:disabled) .raison { display: block; font-size: 13px; color: var(--vif-texte); margin-top: 6px; line-height: 1.3; }

/* ---------- 3. la création ---------- */
#ecran-3 .sous { text-wrap: balance; }

/* ---------- 4. le format, la collection, l'échelle ---------- */
.seule canvas { width: auto; max-width: 100%; height: min(640px, calc(100vh - var(--entete) - var(--barre) - 250px)); min-height: 360px; }
.format .raison { display: none; }
.format:has(input:disabled) { background: #F7F6F3; border-style: dashed; cursor: not-allowed; color: var(--gris); }
.format:has(input:disabled) strong, .format:has(input:disabled) .prix { color: var(--gris); }
.format:has(input:disabled) .dessin i { border-color: var(--gris); background: transparent; }
.formats.avec-raison .format .raison { display: block; min-height: 2.6em; font-size: 13px; color: var(--vif-texte); margin-top: 2px; line-height: 1.3; }   /* vide sous le format permis : les prix restent alignés */
span.code { white-space: nowrap; }   /* un code de collection ne se coupe jamais à son trait d'union : il se recopie */
.code-collection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.code-collection label { font-size: 14px; font-weight: 600; }
.code-collection input { width: 150px; min-height: 44px; border: 1px solid #D6D2C8; border-radius: 10px; padding: 8px 12px; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; background: #fff; }
.code-collection input:focus-visible { outline: 2px solid var(--encre); outline-offset: 0; border-color: var(--encre); }
.reponse-code { margin-top: 10px; border-radius: 10px; padding: 9px 12px; font-size: 15px; line-height: 1.4; }
.reponse-code.trouvee { background: #EEF5F0; color: var(--ok); }
.reponse-code.trouvee b { font-weight: 600; }
.reponse-code.trouvee::before { content: "✓ "; content: "✓ " / ""; }
.reponse-code.inconnue { background: var(--pale); color: var(--vif-texte); }
.reponse-code span { display: block; color: var(--encre); font-size: 14px; margin-top: 2px; }
.reponse-code:not(.trouvee):not(.inconnue) { background: var(--bloc); color: var(--douce); }   /* la recherche en cours */
/* le style d'une collection retrouvée : dit sur sa carte ; en choisir un autre est dit dans la note, avec le chemin pour y revenir */
.choix-style .de-la-collection { display: block; font-size: 13px; color: var(--ok); margin-top: 6px; line-height: 1.3; }
.note-encadree.hors-collection { background: var(--pale); color: var(--vif-texte); box-shadow: none; }
.note-encadree #style-de-la-collection { display: block; margin-top: 8px; text-align: left; color: var(--encre); }
.echelle { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px; align-items: center; background: var(--bloc); box-shadow: inset 0 0 0 1px var(--filet); border-radius: 14px;
  padding: 14px 18px; margin-top: 14px; }
.echelle .valeur { border-right: 1px solid var(--filet); padding-right: 20px; min-width: 128px; }
.echelle .valeur span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--douce); }
.echelle .valeur strong { display: block; font: 600 26px/1.1 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; white-space: nowrap; letter-spacing: -.015em; }
.echelle .valeur small { display: block; font-size: 13px; color: var(--douce); }
.echelle p { font-size: 15px; color: var(--douce); line-height: 1.45; }
.echelle p + p { margin-top: 4px; }
.echelle p b { color: var(--encre); font-weight: 600; }
.legende-mur { margin-top: 12px; font-size: 14px; color: var(--douce); }
.legende-mur strong { color: var(--encre); font-weight: 600; }

/* ---------- 5. les détails : l'aperçu à gauche, qui reste à l'écran ; les réglages à droite ---------- */
.ecran-details { display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); gap: 40px; align-items: start; }
.cote-apercu { position: sticky; top: calc(var(--entete) + 16px); }
.barre-apercu { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
#ecran-5 .etat { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 12px 5px 10px; border-radius: 999px; background: #EEF5F0; color: var(--ok); min-height: 0; margin: 0; }
#ecran-5 .etat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
#ecran-5 .etat.calcul { background: var(--pale); color: var(--vif-texte); }
#ecran-5 .etat.calcul::before { animation: battre 1s ease-in-out infinite; }
@keyframes battre { 50% { opacity: .25; } }
.barre-apercu .outils { margin-left: auto; display: flex; gap: 8px; }
.petit-bouton { margin: 0; width: auto; background: #fff; border: 1px solid var(--filet); border-radius: 999px; padding: 6px 14px; font: 400 14px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--encre); min-height: 34px; white-space: nowrap; }
.petit-bouton:hover:not(:disabled) { background: var(--papier); }
.cadre-apercu { display: flex; justify-content: center; align-items: flex-start; }
#apercu5 { width: 100%; max-width: max(300px, calc((100vh - var(--entete) - var(--barre) - 112px) * 0.7073)); }
#toile5 { display: block; width: 100%; height: auto; }
.cote-apercu .mention-protege { margin-top: 10px; }
.cote-apercu .pied-apercu { display: flex; justify-content: center; }
#ecran-5 .titre-ecran > p:not(.surtitre) { font-size: 16px; }
#ecran-5 .section { padding: 22px 0; border-bottom: 1px solid var(--filet); }
#ecran-5 .section:last-of-type { border-bottom: 0; }
#ecran-5 .section > h3 { font: 600 22px/1.06 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; margin: 0 0 4px; letter-spacing: -.015em; }
#ecran-5 .section > .consigne { margin-bottom: 14px; font-size: 15px; color: var(--douce); }
#ecran-5 .champ { margin-bottom: 16px; }
#ecran-5 .champ:last-child { margin-bottom: 0; }
#ecran-5 .champ > span { margin-bottom: 6px; }
#ecran-5 .champ input, #ecran-5 .champ select, #ecran-5 textarea { width: 100%; min-height: 48px; border: 1px solid #D6D2C8; border-radius: 10px; padding: 10px 12px; font-size: 17px; background: #fff; }
#ecran-5 .champ input:focus-visible, #ecran-5 .champ select:focus-visible, #ecran-5 textarea:focus-visible { outline: 2px solid var(--encre); outline-offset: 0; border-color: var(--encre); }
#ecran-5 .champ .aide { font-weight: 400; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px !important; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2314213D' stroke-width='1.6'/%3E%3C/svg%3E") right 14px center / 12px no-repeat !important; }
.temps-ligne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.mesure { margin-top: 12px; }
.mesure > span { display: block; font-size: 14px; color: var(--douce); margin-bottom: 7px; }
.chiffres-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chiffre > label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--douce); margin-bottom: 6px; }
.chiffre > label i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--filet); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--encre); }
.chiffre .libre { display: block; margin-top: 8px; }
.chiffre .libre span { display: block; font-size: 13px; color: var(--douce); margin-bottom: 4px; }
#ecran-5 .chiffre .libre input { width: 100%; min-height: 40px; border: 1px solid #D6D2C8; border-radius: 10px; padding: 7px 12px; font-size: 16px; background: #fff; }
#ecran-5 .chiffre .libre input:focus-visible { outline: 2px solid var(--encre); outline-offset: 0; border-color: var(--encre); }
.chiffres-choix select { width: 100%; min-height: 46px; border: 1px solid #D6D2C8; border-radius: 10px; padding: 8px 12px; font-size: 16px; }
.chiffres-choix .valeur-chiffre { display: block; font: 600 17px/1.2 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; margin-top: 6px; color: var(--encre); letter-spacing: -.015em; }
.chiffres-choix .valeur-chiffre.a-venir { font: 400 13px/1.3 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--douce); }
.ligne-reglage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ligne-reglage + .ligne-reglage { margin-top: 14px; }
.ligne-reglage > span { font-size: 14px; color: var(--douce); min-width: 9.5em; }
/* le carnet, jour par jour ; les moments ; les étapes */
.carnet { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.carnet li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 12px; align-items: start; background: #fff; border: 1px solid var(--filet); border-radius: 12px; padding: 10px 12px 10px 12px; }
.carnet li[hidden] { display: none; }
.carnet .n { width: 26px; height: 26px; border-radius: 50%; background: var(--encre); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 7px; }
.carnet .phrase { position: relative; }
.carnet .champs { display: grid; gap: 6px; min-width: 0; }
#ecran-5 .carnet input { min-height: 40px; padding: 7px 10px; font-size: 16px; font-weight: 600; }
#ecran-5 .carnet textarea { min-height: 0; padding: 7px 10px 18px; font-size: 15px; line-height: 1.4; resize: none; display: block; }
.carnet .compteur { position: absolute; right: 10px; bottom: 6px; font-size: 12px; color: var(--douce); pointer-events: none; background: rgba(255,255,255,.9); padding-left: 4px; }
.carnet .compteur.plein { color: var(--vif-texte); font-weight: 600; }
.carnet .jour { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--douce); }
.voir-tout { margin-top: 12px; font-size: 15px; }
.voir-tout .lien { color: var(--encre); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.km-jours { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 96px; margin-top: 12px; padding-bottom: 2px; border-bottom: 1px solid var(--encre); }
.km-jours i { display: block; border-radius: 2px 2px 0 0; position: relative; min-height: 2px; }
.km-jours i span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font: 600 10px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: var(--douce); margin-bottom: 2px; white-space: nowrap; font-style: normal; }
.km-axe { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; font-size: 11px; color: var(--douce); text-align: center; margin-top: 3px; }
.km-total { font-size: 14px; color: var(--douce); margin-top: 8px; }
.km-total b { color: var(--encre); font-weight: 600; }
.km-jours.masque { opacity: .3; }
.etapes-itin { list-style: none; margin: 0; padding: 4px 8px; border: 1px solid var(--filet); border-radius: 12px; background: #fff; max-height: 430px; overflow: auto; overscroll-behavior: contain; }
.etapes-itin li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 56px; gap: 8px; align-items: center; padding: 3px 0; }
.etapes-itin li + li { border-top: 1px solid #F0EDE6; }
.etapes-itin .n { font-size: 13px; font-weight: 700; color: var(--vif-texte); }
#ecran-5 .etapes-itin input { min-height: 36px; padding: 5px 8px; font-size: 15px; border-color: transparent; }
#ecran-5 .etapes-itin input:hover { border-color: var(--filet); }
#ecran-5 .etapes-itin input:focus { border-color: var(--encre); }
.etapes-itin .km { font-size: 14px; color: var(--douce); text-align: right; white-space: nowrap; }
.etapes-itin .depart-itin { grid-template-columns: 30px minmax(0, 1fr) 56px; }
.etapes-itin .depart-itin .n { color: var(--douce); font-weight: 600; font-size: 12px; }
.relire { display: flex; gap: 12px; align-items: flex-start; background: var(--pale); color: var(--encre); border-radius: 12px; padding: 13px 16px; font-size: 15px; margin-top: 22px; }
.relire::before { content: "!"; content: "!" / ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--vif-texte); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-top: 1px; }
.relire b { font-weight: 600; }
.bande { display: none; }
/* « Voir de près » : l'affiche à sa taille d'image, dans la fenêtre, qui défile */
.fenetre.grande { padding: 20px; }
.fenetre.grande .boite { max-width: min(1460px, 100%); max-height: 100%; width: auto; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.fenetre .tete { display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; padding: 10px 14px; border-bottom: 1px solid var(--filet); flex-wrap: wrap; }
.fenetre .tete strong { font-weight: 600; font-size: 17px; color: var(--encre); }
.fenetre .tete .boutons-tete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fenetre .aide-loupe { margin: 0; padding: 8px 14px; font-size: 14px; color: var(--douce); text-align: center; border-bottom: 1px solid var(--filet); }
.fenetre .defile.entiere .protege { width: max-content; }
.fenetre .defile { overflow: auto; padding: 16px; background: var(--papier); overscroll-behavior: contain; }
.fenetre .defile .protege { width: max-content; margin: 0 auto; }
.fenetre .defile canvas { display: block; box-shadow: 0 0 0 1px var(--filet); background: #fff; }
.fermer { margin: 0; width: 40px; height: 40px; padding: 0; background: none; border: 0; font: 400 24px/1 'Helvetica Neue', Arial, sans-serif; border-radius: 50%; color: var(--douce); }
.fermer:hover { background: var(--papier); color: var(--encre); }
.fenetre .reference { font-family: ui-monospace, Menlo, monospace; font-size: 14px; background: var(--papier); border-radius: 5px; padding: 0 4px; color: var(--encre); white-space: nowrap; }
.fenetre .boite > .bouton { margin-top: 4px; }
.mobile-seul { display: none; }
.tel-inline { display: none; }

/* ---------- 6. la finition ---------- */
#ecran-6 .recap > strong { font-weight: 600; }
#ecran-6 .recap dd span { min-width: 0; }

/* ---------- la barre du bas ---------- */
.barre button.lien { color: var(--encre); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.barre #continuer { margin: 0; }

/* ---------- téléphone (moins de 900 points) ---------- */
@media (max-width: 900px) {
  .entete .dedans { min-width: 0; }
  .etape-mobile { min-width: 0; flex-shrink: 1; }
  .etape-mobile .sur { overflow: hidden; text-overflow: ellipsis; }
  .marque .etiquette { display: none; }
  .accueil { padding-top: 0; }
  .accueil .eventail { position: relative; top: 0; height: 280px; }
  .produits { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .produit { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 14px; row-gap: 0; align-items: center; min-height: 0; padding: 12px 14px; }
  .produit svg { grid-row: span 2; width: 58px; height: 40px; margin: 0; }
  .produit strong { font-size: 22px; align-self: end; }
  .produit small { align-self: start; }
  .depot .fichier { grid-template-columns: 40px minmax(0, 1fr); }
  .depot .remplacer { grid-column: 2; justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
  .liste-etapes { max-height: 360px; }
  .icone-bouton { width: 40px; height: 44px; }
  .liste-etapes li { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .liste-etapes input { min-height: 44px; }
  .choix-ligne { padding: 12px 14px; }
  .ecran-details { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cote-apercu { display: none; }
  .mobile-seul { display: block; } .bureau-seul { display: none; }
  .tel-inline { display: inline; } .bureau-inline { display: none; }
  .onglets button { padding: 8px 14px; }
  #ecran-5 .titre-ecran.mobile-seul { margin-bottom: 4px; } #ecran-5 .titre-ecran.mobile-seul h1 { font-size: 30px; }
  /* la bande du haut : la ligne du titre sur toute la largeur de l'écran, puis l'état de l'aperçu et « Voir l'affiche » */
  .bande { display: grid; position: sticky; top: var(--entete); z-index: 7; grid-template-columns: minmax(0, 1fr); gap: 6px; background: #fff;
    border-bottom: 1px solid var(--filet); margin: -20px -16px 16px; padding: 8px 16px 6px; }
  .bande .protege { margin: 0; width: auto; border: 0; padding: 0; background: #fff; border-radius: 6px; display: block; }
  .bande canvas { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 0 0 1px var(--filet); }
  .bande .sous-bande { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  #ecran-5 .bande .etat { font-size: 13px; padding: 3px 10px 3px 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bande .petit-bouton { min-height: 44px; flex: none; }
  /* les trois sources d'une itinérance, sur une ligne */
  .onglets.choix-source { display: flex; width: 100%; }
  .onglets.choix-source button { flex: 1 1 auto; padding: 8px 6px; min-height: 44px; white-space: nowrap; }
  .note-encadree #nouvelle-collection, .note-encadree #style-de-la-collection { min-height: 44px; display: flex; align-items: center; margin-top: 4px; }
  .chiffres-choix { grid-template-columns: minmax(0, 1fr); }
  .ligne-reglage > span { min-width: 0; width: 100%; }
  .puce span { min-height: 44px; display: flex; align-items: center; }
  .echelle { grid-template-columns: minmax(0, 1fr); }
  .echelle .valeur { border-right: 0; border-bottom: 1px solid var(--filet); padding: 0 0 8px; }
  .code-collection input { flex: 1; min-width: 0; }
  .fenetre.grande { padding: 16px; }
  .fenetre.plein { padding: 0; }
  .fenetre.plein .boite { border-radius: 0; height: 100%; width: 100%; }
  .fenetre .tete .petit-bouton { min-height: 44px; }
  .fenetre .defile { padding: 12px; }
  .km-jours i span { display: none; }
  .liste-etapes, .etapes-itin { max-height: none; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .marque .etiquette { display: none; }
}

/* ====================== ce que la vraie page ajoute à la maquette ====================== */
/* la trace déposée : son petit dessin dans l'icône du fichier (des points sans coordonnée, envoyés par le serveur), le format dessous ;
   la case cochée, ce qui sera caché au départ et à l'arrivée s'efface */
.depot .icone-fichier b { font: inherit; }
.depot .icone-fichier.avec-trace { padding-bottom: 5px; }
.depot .icone-fichier.avec-trace::before { content: none; }
.petite-trace { position: absolute; left: 5px; right: 5px; top: 5px; height: 30px; width: calc(100% - 10px); }
.petite-trace polyline { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.petite-trace .gardee { stroke: var(--vif); }
.petite-trace .cachee { stroke: #CFCABD; stroke-dasharray: 2 2; }
/* ce que le serveur remarque sur la trace (une autre sorte de sortie, pas d'heure, une trace qui sort de la carte) */
.avertissement { background: var(--pale); color: var(--vif-texte); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-top: 10px; line-height: 1.4; }
label.case-simple small.raison { color: var(--vif-texte); }
label.case-simple:has(input:disabled) { cursor: default; color: var(--douce); }
/* la recherche d'une étape : les lieux proposés, sous le champ ; une étape tapée mais pas choisie dans la liste */
.liste-etapes li.propositions { display: block; padding: 0 0 6px 34px; border-top: 0; }
.liste-etapes li.propositions .suggestions { position: static; margin: 0; box-shadow: 0 10px 24px -16px rgba(20,33,61,.45); }
.liste-etapes li.propositions li { display: block; padding: 10px 12px; border-top: 0; }   /* pas la grille des étapes */
.liste-etapes input.a-choisir { border-color: var(--vif-texte); border-style: dashed; }
.liste-etapes .note, .bloc-source > .note { margin-top: 8px; }
/* la page 1 : ce que l'atelier répond sous le bouton (« Création de votre affiche… », un refus) */
#attente { min-height: 0; margin: 0; }
/* la page 5 : un réglage que la collection fixe (le relief d'un trail, les kilomètres d'un road trip) */
#ecran-5 .case-simple:has(input:disabled) span { color: var(--douce); }
#ecran-5 .puce input:disabled + span { color: var(--gris); border-style: dashed; cursor: not-allowed; }
#ecran-5 .section > .note { margin-top: 12px; }
#ecran-5 input[aria-invalid=true] { border-color: #B42318; }
/* « Voir de près » : un clic sur l'affiche en montre le morceau en vraie grandeur */
.fenetre .defile .couche[data-viser] { cursor: zoom-in; }
/* ---------- l'étape 7 : la page 5 complète ---------- */
/* ce que le dernier aperçu dit de l'affiche (la trace sort de la carte, les textes ne tiennent plus dans la feuille) */
.alertes-5 { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; background: var(--pale); color: var(--vif-texte); font-size: 14px; line-height: 1.4; }
.alertes-5 strong { font-weight: 600; }
.bande .alertes-5 { margin: 0; padding: 6px 10px; font-size: 13px; }
/* « Voir de près » : l'affiche montrée se redessine */
.fenetre .etat-fenetre { margin: 0; padding: 6px 14px; font-size: 14px; color: var(--vif-texte); background: var(--pale); text-align: center; }
/* ce que mesure le temps ; ce que le client écrit dans une case (son dossard) */
.mesure .note { margin-top: 8px; }
.chiffre .libre small { display: block; font-size: 12px; color: var(--douce); margin-top: 4px; }
/* les moments : où est chacun, le retirer ; en ajouter un, à une étape */
.ou-moment { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--douce); min-height: 30px; }
.ou-moment > span:first-child { flex: 1 1 auto; min-width: 0; }
.ou-moment label { flex: none; }
#ecran-5 .ou-moment select { flex: 1 1 160px; min-width: 0; min-height: 36px; padding: 4px 10px; font-size: 15px; border: 1px solid #D6D2C8; border-radius: 8px; background: #fff; color: var(--encre); }
.ou-moment .retirer-moment { margin-left: auto; font-size: 14px; color: var(--douce); text-underline-offset: 3px; }
.ajout-moment { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; font-size: 15px; color: var(--douce); }
.ajout-moment .petit-bouton { min-height: 40px; font-size: 15px; }
.ajout-moment .petit-bouton:disabled { color: var(--gris); border-style: dashed; cursor: not-allowed; }
#ecran-5 .ajout-moment select { flex: 1 1 180px; min-width: 0; min-height: 40px; padding: 6px 10px; font-size: 15px; border: 1px solid #D6D2C8; border-radius: 10px; background: #fff; color: var(--encre); }
#ecran-5 .ajout-moment select:disabled { color: var(--gris); }
.ajout-moment + .note { margin-top: 8px; }
/* une ville-étape au nom trop long pour sa ligne */
.etapes-itin .court-long { grid-column: 2 / -1; font-size: 13px; color: var(--vif-texte); line-height: 1.35; padding-bottom: 4px; }
.etapes-itin .court-long[hidden] { display: none; }
#ecran-5 .etapes-itin input[aria-invalid=true] { border-color: #B42318; }
@media (max-width: 900px) {
  .ou-moment .retirer-moment, .ajout-moment .petit-bouton { min-height: 44px; }
  #ecran-5 .ou-moment select, #ecran-5 .ajout-moment select { min-height: 44px; }
}
/* ---------- l'étape 7, après la relecture ---------- */
/* les champs à longueur limitée (le titre, le sous-titre, le lieu d'un jour, le nom d'un moment) : leur compteur dans le champ, à droite,
   comme celui des phrases */
.saisie { position: relative; display: block; }
.saisie .compteur, .carnet .saisie .compteur { position: absolute; right: 10px; top: 50%; bottom: auto; transform: translateY(-50%); font-size: 12px; color: var(--douce);
  pointer-events: none; background: rgba(255,255,255,.9); padding-left: 4px; }
.saisie .compteur.plein { color: var(--vif-texte); font-weight: 600; }
#ecran-5 .champ .saisie input { padding-right: 64px; }
#ecran-5 .carnet .saisie input { padding-right: 58px; }
/* une phrase plus longue que sa ligne (des jours ajoutés depuis) : dite, et elle ne s'imprime pas */
.carnet .trop-long { font-size: 13px; color: var(--vif-texte); line-height: 1.35; }
.carnet .trop-long[hidden] { display: none; }
#ecran-5 textarea[aria-invalid=true] { border-color: #B42318; }
/* ce qui a été mis de côté (un lieu retiré à l'étape 1) : à recopier, ou à oublier */
#ecran-5 .note-encadree.de-cote { margin: 0 0 14px; }
.de-cote p { margin: 0 0 6px; }
.de-cote ul { margin: 0 0 6px; padding-left: 18px; color: var(--encre); }
.de-cote li { overflow-wrap: anywhere; }
.de-cote b { font-weight: 600; }
@media (max-width: 900px) {
  .de-cote .lien { min-height: 44px; display: inline-flex; align-items: center; }
}
/* la colonne des champs d'un jour ou d'un moment ne s'élargit jamais d'après son contenu (une liste d'étapes aux noms longs, sur un
   téléphone) : elle prend la place qu'elle a */
.carnet .champs { grid-template-columns: minmax(0, 1fr); }
/* Polices C (décision 051) : les boutons en IBM Plex Mono, en capitales ; les autres boutons gardent leur police */
#continuer, #terminer, #pdf-essai, #reessayer, #revenir-au-style, .bouton { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
