@font-face { font-family: "Inter"; src: url("polices/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --rouge: #be1a1d; --rouge-h: #a01518; --rouge-pale: #f7e6e5;
  --encre: #1d1d1f; --douce: #6e6e73; --pale: #86868b; --fond: #f5f5f7; --carte: #fff; --trait: #e3e3e8; --voile: rgba(255,255,255,.78);
  --rayon: 14px; --ombre: 0 10px 30px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --panneau: 408px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.vignette .app { grid-template-columns: 1fr; grid-template-rows: 1fr; }
body.vignette .btn-tele, body.vignette .barre, body.vignette .panneau, body.vignette .vues, body.vignette .alertes, body.vignette .aide-geste, body.vignette .toast { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--fond); color: var(--encre); font: 15px/1.45 var(--police); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid rgba(190,26,29,.45); outline-offset: 2px; }

.app { display: grid; grid-template-columns: minmax(0, 1fr) var(--panneau); grid-template-rows: 60px 1fr; height: 100dvh; overflow: hidden; }
.barre { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-bottom: 1px solid var(--trait); z-index: 5; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.marque img { border-radius: 8px; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.marque-texte b { font-size: 15px; letter-spacing: -.01em; }
.marque-texte span { font-size: 12.5px; color: var(--douce); white-space: nowrap; }
.ambiances { margin: 0 auto; display: flex; background: #ececf0; border-radius: 999px; padding: 3px; gap: 2px; }
.ambiances button { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--douce); transition: background .2s, color .2s; }
.ambiances button[aria-checked="true"] { background: #fff; color: var(--encre); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.actions { display: flex; gap: 8px; align-items: center; }
.icone { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--trait); background: #fff; display: grid; place-items: center; }
.icone:disabled { opacity: .35; cursor: default; }
.bouton-photo, .bouton-projet, .principal, .secondaire { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; padding: 0 16px; height: 38px; font-weight: 600; font-size: 14px; border: 1px solid transparent; white-space: nowrap; }
.bouton-photo { background: var(--encre); color: #fff; }
.bouton-photo:hover { background: #000; }
.bouton-projet, .principal { background: var(--rouge); color: #fff; }
.bouton-projet:hover, .principal:hover { background: var(--rouge-h); }
.secondaire { background: #fff; border-color: var(--trait); color: var(--encre); }
.lien { background: none; border: 0; color: var(--rouge); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }

.scene-zone { position: relative; overflow: hidden; background: #d9d6d0; }
.vue3d { position: absolute; inset: 0; }
.vue3d canvas { display: block; touch-action: none; }
.vues { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: var(--voile); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 999px; box-shadow: var(--ombre); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.vues button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--douce); white-space: nowrap; }
.vues button[aria-pressed="true"] { background: var(--encre); color: #fff; }
.alertes { position: absolute; top: 14px; left: 14px; max-width: min(440px, calc(100% - 28px)); text-align: left; border: 0; border-radius: 12px; padding: 10px 14px; background: var(--voile); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--ombre); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.alertes .pastille { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #b25e00; color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.btn-tele { position: absolute; right: 14px; bottom: 18px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: 13px; background: var(--voile); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--ombre); }
.btn-tele[aria-pressed="true"] { background: var(--encre); color: #fff; }
.app-picto { display: grid !important; place-items: center; background: linear-gradient(180deg, #f3f1ec, #e6e1d8) !important; }
.app-picto img { width: 70%; height: 70%; object-fit: contain; }
.aide-geste { position: absolute; top: 14px; right: 14px; margin: 0; font-size: 12.5px; color: #fff; background: rgba(0,0,0,.42); padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .6s; }
.chargement { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: #efece6; transition: opacity .6s; z-index: 3; }
.chargement p { margin: 0; color: var(--douce); font-weight: 500; }
.chargement.fini { opacity: 0; pointer-events: none; }
.rond { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #d8d3ca; border-top-color: var(--rouge); animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.photo-calque { position: absolute; inset: 0; display: grid; place-items: end center; padding: 22px; pointer-events: none; z-index: 4; }
.photo-carte { pointer-events: auto; width: min(420px, 100%); background: rgba(20,20,22,.82); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 16px; padding: 16px 18px; box-shadow: var(--ombre); }
.photo-carte p { margin: 0 0 10px; font-weight: 600; }
.photo-carte .photo-aide { font-weight: 400; font-size: 12.5px; opacity: .75; margin: 10px 0 0; }
.photo-carte .lien { color: #fff; padding: 6px 0 0; }
.jauge { height: 6px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; }
.jauge span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb46b, #fff); transition: width .25s; }

.panneau { background: var(--carte); border-left: 1px solid var(--trait); display: grid; grid-template-rows: auto 1fr auto; min-height: 0; z-index: 2; }
.etapes { display: flex; gap: 4px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid var(--trait); scrollbar-width: thin; }
.etapes button { flex: none; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--douce); white-space: nowrap; }
.etapes button .n { width: 20px; height: 20px; border-radius: 50%; background: #ececf0; display: grid; place-items: center; font-size: 11px; }
.etapes button[aria-selected="true"] { background: var(--rouge-pale); color: var(--rouge); }
.etapes button[aria-selected="true"] .n { background: var(--rouge); color: #fff; }
.contenu { overflow-y: auto; padding: 18px 18px 28px; min-height: 0; overscroll-behavior: contain; }
.contenu:focus { outline: none; }
.contenu h2 { font-size: 21px; letter-spacing: -.015em; margin: 0 0 4px; }
.contenu .chapeau { color: var(--douce); margin: 0 0 16px; }
.contenu h3 { font-size: 14px; text-transform: none; margin: 22px 0 10px; color: var(--encre); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.contenu h3 small { font-weight: 500; color: var(--pale); font-size: 12.5px; }
.note { font-size: 13px; color: var(--douce); background: var(--fond); border-radius: 10px; padding: 9px 12px; margin: 10px 0 0; }
.note.attention { background: #fff4e5; color: #7a4300; }
.pied { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--trait); background: #fff; }
.pied button { flex: 1; }

/* Galeries */
.galerie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.galerie.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.carte-choix { position: relative; border: 1.5px solid var(--trait); background: #fff; border-radius: 12px; padding: 0; text-align: left; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.carte-choix:hover { border-color: #c9c9cf; transform: translateY(-1px); }
.carte-choix[aria-pressed="true"] { border-color: var(--rouge); box-shadow: 0 0 0 3px rgba(190,26,29,.14); }
.carte-choix .img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: linear-gradient(135deg, #ece8e1, #d9d3c9); }
.carte-choix .txt { display: block; padding: 8px 10px 10px; }
.carte-choix .txt b { display: block; font-size: 13.5px; }
.carte-choix .txt span { display: block; font-size: 12px; color: var(--douce); line-height: 1.35; margin-top: 2px; }
.carte-choix .coche { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--rouge); color: #fff; display: none; place-items: center; }
.carte-choix[aria-pressed="true"] .coche { display: grid; }
.carte-choix .coche svg { width: 14px; height: 14px; stroke-width: 3; }
.tele-carte .silhouette { display: grid; place-items: center; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #efece6, #e2ddd4); }
.tele-carte .silhouette i { display: block; background: #1d1d1f; border-radius: 2px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

.pastilles { display: flex; flex-wrap: wrap; gap: 10px; }
.pastille-couleur { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pastille-couleur[aria-pressed="true"]::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--rouge); }
.pastille-couleur.aucune { background: repeating-linear-gradient(45deg, #fff 0 6px, #eee 6px 12px); }
.nom-couleur { font-size: 12.5px; color: var(--douce); margin: 8px 0 0; min-height: 1.2em; }

.segments { display: flex; flex-wrap: wrap; gap: 6px; }
.segments button { border: 1.5px solid var(--trait); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; }
.segments button[aria-pressed="true"] { border-color: var(--rouge); background: var(--rouge-pale); color: var(--rouge); }

.reglage { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid #f0f0f3; }
.reglage:first-of-type { border-top: 0; }
.reglage label { font-weight: 600; font-size: 14px; }
.reglage .aide { grid-column: 1 / -1; font-size: 12.5px; color: var(--douce); margin: -2px 0 0; }
.reglage input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--rouge); height: 28px; }
.nombre { display: flex; align-items: center; border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; background: #fff; }
.nombre button { width: 34px; height: 36px; border: 0; background: #f7f7f9; font-size: 18px; font-weight: 600; color: var(--encre); }
.nombre input { width: 62px; height: 36px; border: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; padding: 0 2px; }
.nombre input::-webkit-outer-spin-button, .nombre input::-webkit-inner-spin-button { -webkit-appearance: none; }
.nombre .u { padding: 0 8px 0 2px; color: var(--douce); font-size: 13px; }
.interrupteur { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #f0f0f3; }
.interrupteur:first-of-type { border-top: 0; }
.interrupteur span b { display: block; font-size: 14px; }
.interrupteur span small { color: var(--douce); font-size: 12.5px; }
.bascule { flex: none; width: 46px; height: 28px; border-radius: 999px; border: 0; background: #d6d6db; position: relative; transition: background .2s; }
.bascule::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.bascule[aria-checked="true"] { background: #34c759; }
.bascule[aria-checked="true"]::after { transform: translateX(18px); }
.sous-bloc { background: var(--fond); border-radius: 12px; padding: 4px 12px; margin: 6px 0 4px; }
.posee { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f0f0f3; }
.posee img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: #eee; }
.posee b { flex: 1; font-size: 13.5px; }
.posee button { border: 1px solid var(--trait); background: #fff; border-radius: 8px; padding: 5px 9px; font-size: 12.5px; font-weight: 600; }

/* Dialogue (récapitulatif, devis) */
.dialogue { border: 0; padding: 0; border-radius: 18px; width: min(980px, calc(100% - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.dialogue::backdrop { background: rgba(20,20,22,.45); backdrop-filter: blur(4px); }
.dialogue-corps { padding: 22px; overflow: auto; max-height: calc(100dvh - 24px); }
.dialogue-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.dialogue-tete h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.dialogue-tete p { margin: 4px 0 0; color: var(--douce); }
.fermer { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f0f0f3; display: grid; place-items: center; flex: none; }
.recap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.recap img.rendu { width: 100%; border-radius: 12px; display: block; background: #ddd; }
.recap .cote { width: 100%; height: auto; background: #fff; border: 1px solid var(--trait); border-radius: 12px; margin-top: 12px; }
.recap dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.recap dt { color: var(--douce); }
.recap dd { margin: 0; font-weight: 500; }
.recap .boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.legende-cote { font-size: 12px; color: var(--douce); margin: 6px 0 0; }
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formulaire label { display: grid; gap: 5px; font-weight: 600; font-size: 13.5px; }
.formulaire label.large { grid-column: 1 / -1; }
.formulaire input, .formulaire textarea { border: 1px solid #cfcfd6; border-radius: 10px; padding: 10px 12px; font-weight: 400; background: #fff; }
.formulaire textarea { min-height: 90px; resize: vertical; }
.formulaire .case { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--douce); }
.formulaire .erreur { grid-column: 1 / -1; color: var(--rouge); font-weight: 600; margin: 0; }
.toast { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); max-width: calc(100% - 24px); text-align: center; background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 20; box-shadow: var(--ombre); }

/* Téléphone */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 54px minmax(0, 46dvh) minmax(0, 1fr); }
  .barre { padding: 0 10px; gap: 8px; }
  .marque-texte span, .bouton-photo span { display: none; }
  .marque-texte b { font-size: 14px; }
  .ambiances button { padding: 6px 9px; }
  .ambiances button span { display: none; }
  .bouton-photo { width: 38px; padding: 0; }
  .bouton-projet { padding: 0 10px; gap: 2px; }
  .icone { width: 34px; height: 34px; }
  .actions { gap: 5px; }
  .panneau { border-left: 0; border-top: 1px solid var(--trait); }
  .vues { bottom: 10px; left: 10px; transform: none; max-width: calc(100% - 64px); }
  .btn-tele { bottom: 10px; right: 10px; padding: 9px; }
  .btn-tele span { display: none; }
  .vues button { padding: 7px 10px; font-size: 12.5px; }
  .aide-geste { display: none; }
  .alertes { top: 10px; left: 10px; font-size: 12.5px; padding: 8px 10px; }
  .recap { grid-template-columns: 1fr; }
  .formulaire { grid-template-columns: 1fr; }
  .dialogue-corps { padding: 16px; }
}
@media (max-width: 560px) { .marque-texte { display: none; } }
.marque-texte b { white-space: nowrap; }

/* Téléphone tenu à l'horizontale : la 3D et les réglages côte à côte */
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .app { grid-template-columns: minmax(0, 1fr) minmax(300px, 42%); grid-template-rows: 46px minmax(0, 1fr); }
  .barre { padding: 0 10px; }
  .panneau { border-top: 0; border-left: 1px solid var(--trait); }
  .etapes { padding: 6px 8px; }
  .contenu { padding: 10px 12px 18px; }
  .contenu h2 { font-size: 17px; }
  .contenu .chapeau { margin-bottom: 10px; font-size: 13px; }
  .pied { padding: 8px 10px; }
  .pied button { height: 34px; }
  .vues { bottom: 8px; left: 8px; }
  .vues button { padding: 6px 9px; font-size: 12px; }
  .btn-tele { bottom: 8px; right: 8px; }
}
@media print {
  body * { visibility: hidden; }
  .dialogue, .dialogue * { visibility: visible; }
  .dialogue { position: absolute; inset: 0; width: 100%; max-height: none; box-shadow: none; }
  .dialogue-corps { max-height: none; overflow: visible; }
  .recap .boutons, .fermer, .ne-pas-imprimer { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- v2 (refonte du 26/11/2026) */
.outils-vue { position: absolute; left: 14px; bottom: 18px; display: flex; gap: 4px; padding: 4px; background: var(--voile); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 999px; box-shadow: var(--ombre); }
.outils-vue button { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--encre); white-space: nowrap; }
.outils-vue button:hover { background: rgba(0,0,0,.06); }
.outils-vue button[aria-pressed="true"] { background: var(--encre); color: #fff; }
body.grand .app { grid-template-columns: minmax(0, 1fr); }
body.grand .panneau { display: none; }
.galerie.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.galerie.quatre .carte-choix .txt { padding: 6px 7px 8px; }
.galerie.quatre .carte-choix .txt b { font-size: 13px; }
.galerie.quatre .carte-choix .txt span { font-size: 11.5px; }
.ligne-choix { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #f0f0f3; }
.ligne-choix > span { font-weight: 600; font-size: 13.5px; }
.ligne-choix .segments button { padding: 7px 11px; font-size: 13px; }
.sous-bloc .reglage:first-child, .sous-bloc .ligne-choix:first-child { border-top: 0; }
.point-couleur { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.etape-n { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--rouge); letter-spacing: .01em; }
.carte-choix svg.img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; stroke: none; }
.feu-carte .silhouette i { background: linear-gradient(180deg, #161616 0 40%, #3a1a0c 70%, #ff8a3c 100%); }
.tele-carte .silhouette em { font-style: normal; font-weight: 700; font-size: 22px; color: var(--pale); }
.alertes .pastille.info { background: #3a6ea5; }
/* réponse immédiate au doigt : le bouton s'enfonce dès l'appui, avant même la 3D */
.carte-choix:active, .segments button:active, .nombre button:active, .outils-vue button:active, .pied button:active, .etapes button:active { transform: scale(.97); transition: transform .05s; }
.bascule:active::after { width: 26px; }
.app-carte .txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .outils-vue { bottom: 10px; left: 10px; }
  .outils-vue button { padding: 7px 10px; font-size: 12.5px; }
  .outils-vue button span { display: none; }
  body.grand .app { grid-template-rows: 54px 1fr; }
  .galerie.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  /* au téléphone : le message apparaît en bas de la vue 3D, sans cacher les réglages */
  .toast { top: calc(54px + 46dvh - 62px); bottom: auto; transform: translate(-50%, -100%); font-size: 13px; line-height: 1.35; padding: 8px 12px; max-width: calc(100% - 32px); width: max-content; }
  body.grand .toast { top: auto; bottom: 70px; transform: translateX(-50%); }
}
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .outils-vue { bottom: 8px; left: 8px; }
  body.grand .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 46px minmax(0, 1fr); }
}

/* ---- « Ma pièce » (ui-piece.js) : dans la feuille de style, pas injecté par le script (politique de sécurité du site) */
.pp-depart { margin: 0 0 12px; }
.pp-gros { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; border: 0; border-radius: 14px; padding: 12px 14px; background: linear-gradient(135deg, #be1a1d, #8f1214); color: #fff; box-shadow: 0 6px 18px rgba(190,26,29,.25); }
.pp-gros svg { width: 54px; height: 36px; stroke-width: 1.7; flex: none; }
.pp-gros b { display: block; font-size: 15px; }
.pp-gros small { display: block; opacity: .85; font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.pp-plan { margin: 0 0 12px; padding: 8px 8px 6px; background: #f7f6f3; border: 1px solid var(--trait); border-radius: 14px; }
.pp-svg { display: block; width: 100%; height: auto; max-height: 330px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: visible; }
.pp-svg .pp-m, .pp-svg .pp-o { cursor: grab; }
.pp-svg .pp-poignee { cursor: grab; }
.pp-svg .pp-txt { font-family: var(--police); }
.pp-svg .pp-cote { fill: var(--douce); font-weight: 600; }
.pp-legende { display: flex; justify-content: space-between; gap: 8px; margin: 6px 2px 0; font-size: 12px; color: var(--douce); }
.pp-legende span:first-child { white-space: nowrap; }
.pp-legende span:last-child { text-align: right; }
.pp-choix { border: 1.5px solid var(--rouge); border-radius: 14px; padding: 10px 12px 12px; margin: 0 0 12px; background: #fff; box-shadow: 0 0 0 3px rgba(190,26,29,.08); }
.pp-choix-tete { display: flex; align-items: center; gap: 8px; }
.pp-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pp-titre b { font-size: 15px; }
.pp-titre small { color: var(--douce); font-size: 12.5px; }
.pp-mini { width: 34px; height: 22px; color: var(--rouge); }
.pp-fermer { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #f0f0f3; display: grid; place-items: center; flex: none; }
.pp-choix h4 { margin: 12px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--douce); }
.pp-choix .segments button { padding: 7px 12px; font-size: 13px; }
.pp-choix .reglage:first-of-type { border-top: 1px solid #f0f0f3; }
.pp-pastilles .pastille-couleur, .pp-choix .pastille-couleur { width: 34px; height: 34px; }
.pp-choix .pastilles { gap: 8px; }
.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.pp-actions > button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--trait); background: #fff; border-radius: 10px; font-weight: 600; font-size: 13px; }
.pp-actions > button:disabled { opacity: .4; cursor: default; }
.pp-actions .pp-retirer { color: var(--rouge); margin-left: auto; }
.pp-fleches { display: inline-flex; gap: 3px; }
.pp-fleches button { width: 34px; height: 36px; border: 1px solid var(--trait); background: #fff; border-radius: 9px; display: grid; place-items: center; padding: 0; }
.pp-onglets { position: sticky; top: -18px; z-index: 1; flex-wrap: wrap; margin: 0 -18px 4px; padding: 8px 18px; background: rgba(255,255,255,.96); border-bottom: 1px solid #f0f0f3; }
.pp-onglets button { flex: none; padding: 7px 12px; font-size: 13px; }
.pp-corps { padding-top: 8px; }
.pp-galerie .carte-choix .txt span { font-variant-numeric: tabular-nums; }
.pp-ico { display: grid !important; place-items: center; position: relative; color: #3a3a3d; background: linear-gradient(180deg, #f4f2ee, #e8e4dc) !important; aspect-ratio: 16 / 10 !important; }
.pp-ico svg { width: 66%; height: 66%; stroke-width: 1.7; }
.carte-choix:disabled { opacity: .45; cursor: default; transform: none; }
.pp-compte { position: absolute; top: 6px; left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--rouge); color: #fff; font: 700 11px/20px var(--police); font-style: normal; text-align: center; }
.pp-liste .posee b { display: flex; flex-direction: column; font-size: 13.5px; }
.pp-liste .posee b small { font-weight: 400; color: var(--douce); font-size: 12px; }
.pp-liste .posee button[aria-pressed="true"] { border-color: var(--rouge); color: var(--rouge); }
.pp-puce { width: 42px; height: 30px; border-radius: 8px; background: #f2f0ec; display: grid; place-items: center; flex: none; color: #3a3a3d; }
.pp-puce svg { width: 34px; height: 22px; stroke-width: 1.8; }
@media (max-width: 860px) {
  .pp-svg { max-height: 240px; }
  .pp-onglets { top: -18px; }
}
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) { .pp-svg { max-height: 190px; } .pp-onglets { top: -10px; margin: 0 -12px 4px; padding: 6px 12px; } }

/* ---- corrections après les essais du 26/11 (testeurs ordinateur et téléphone) */
/* onglets d'étapes : le numéro seul, le nom de l'étape en cours ; tout tient sur une ligne */
.etapes { gap: 2px; padding: 8px 10px; scrollbar-width: none; }
.etapes::-webkit-scrollbar { display: none; }
.etapes button { min-height: 40px; padding: 6px 6px; }
.etapes button .n { width: 24px; height: 24px; font-size: 12px; }
.etapes button:not([aria-selected="true"]) .nom { display: none; }
.etapes .onglet-projet { margin-left: auto; color: var(--rouge); }
.etapes .onglet-projet .n { background: var(--rouge-pale); color: var(--rouge); }
/* bandeau d'alerte : deux lignes au plus ; de simples conseils en petite pastille ; effacé pendant un petit message */
.alertes .texte { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alertes.conseils { padding: 6px 12px 6px 8px; align-items: center; }
body.message .alertes { opacity: 0; pointer-events: none; }
.alertes { transition: opacity .2s; }
/* petit message : au-dessus de la 3D, centré sur elle */
.toast { left: calc((100% - var(--panneau)) / 2); }
body.grand .toast { left: 50%; }
/* boutons désactivés visibles comme tels */
.secondaire:disabled, .principal:disabled { opacity: .4; cursor: default; }
.carte-choix:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.galerie.quatre .carte-choix .txt span { font-size: 12.5px; }
.app-carte .txt span { white-space: normal; overflow: visible; }
@media (max-width: 860px) {
  .toast { left: 50%; top: 64px; transform: translateX(-50%); }
  .icone { width: 40px; height: 40px; }
  .ambiances button { min-height: 40px; padding: 6px 11px; }
  .outils-vue button, .btn-tele { min-height: 40px; min-width: 40px; justify-content: center; }
  #btn-grand[aria-pressed="true"] span { display: inline; }
  .pied button { height: 44px; }
  .nombre button { width: 40px; height: 40px; }
  .nombre input { height: 40px; }
  .segments button { min-height: 40px; }
  .bascule { width: 50px; height: 30px; }
  .bascule::after { width: 24px; height: 24px; }
  .bascule[aria-checked="true"]::after { transform: translateX(20px); }
  .formulaire input, .formulaire textarea { font-size: 16px; }
  .alertes { max-width: calc(100% - 20px); }
}
@media (max-width: 400px) {
  #retablir { display: none; }
  .barre { gap: 6px; }
  .bouton-projet { padding: 0 10px; }
  .ambiances button { padding: 6px 8px; }
}
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .pied button { height: 40px; }
  .toast { left: calc((100% - max(300px, 42%)) / 2); top: 54px; }
}

/* ---- « Ma pièce » : onglets sur une ligne au doigt, cibles de 40 px (essais du 26/11) */
.pp-onglets { position: sticky; top: -18px; z-index: 3; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -18px 4px; padding: 8px 18px; background: #fff; border-bottom: 1px solid #f0f0f3; box-shadow: 0 6px 10px -8px rgba(0,0,0,.18); }
.pp-onglets::-webkit-scrollbar { display: none; }
.pp-onglets button { flex: none; min-height: 40px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .pp-onglets { flex-wrap: wrap; overflow: visible; } }
.pp-fermer { width: 40px; height: 40px; }
.pp-actions > button { height: 40px; }
.pp-fleches button { width: 40px; height: 40px; }
.pp-pastilles .pastille-couleur, .pp-choix .pastille-couleur { width: 40px; height: 40px; }
.pp .posee button { min-height: 40px; padding: 0 12px; }
@media (max-width: 860px) { .pp-onglets { top: -18px; } }
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) { .pp-onglets { top: -10px; margin: 0 -12px 4px; padding: 6px 12px; } }
/* grandes tablettes tactiles : mêmes cibles de 40 px qu'au téléphone */
@media (pointer: coarse) {
  .segments button, .pp-choix .segments button { min-height: 40px; }
  .nombre button { width: 40px; height: 40px; }
  .nombre input { height: 40px; }
  .icone { width: 40px; height: 40px; }
  .ambiances button, .outils-vue button, .btn-tele { min-height: 40px; }
}

/* ---- démarrage : la vue de départ s'affiche tout de suite en image, pendant que la 3D se prépare (première visite) */
.chargement { background: #efece6 url("apercu-depart.webp") center / cover no-repeat; place-content: end center; padding-bottom: 76px; }
.chargement .rond { display: none; }
.chargement p { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 999px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--ombre); color: var(--encre); font-size: 13.5px; font-weight: 600; }
.chargement p::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #d8d3ca; border-top-color: var(--rouge); animation: tourne 1s linear infinite; }
@media (max-width: 860px) { .chargement { background-image: url("apercu-depart-carre.webp"); padding-bottom: 64px; } }

/* liens légaux, discrets sous les boutons du panneau */
.panneau { grid-template-rows: auto 1fr auto auto; }
.legal { margin: 0; padding: 0 16px 8px; text-align: center; font-size: 11.5px; color: var(--pale); background: #fff; }
.legal a { color: var(--douce); }
@media (max-width: 860px) { .legal { padding-bottom: calc(6px + env(safe-area-inset-bottom)); font-size: 11px; } .pied { padding-bottom: 6px; } }
