/* Le plan en 3D, dans la page du plan (plan.php, assets/trois-d.js) : « Plan | 3D » au-dessus du dessin; en 3D, la salle
   prend la place du dessin et de ses outils, le reste du plan (personnes, disposition, salle, bilan, demande) ne change pas. */
.cg-plan .affichage { display: inline-flex; gap: 4px; width: max-content; max-width: 100%; box-sizing: border-box; padding: 4px; border-radius: 999px; background: var(--blanc); border: 1px solid var(--ligne); align-self: flex-start; justify-self: start; }
.cg-plan .affichage button { appearance: none; border: 0; background: none; color: var(--encre); font: 700 .95rem/1 var(--police, inherit); padding: 10px 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.cg-plan .affichage button[aria-pressed="true"] { background: var(--encre); color: #fff; }
.cg-plan .affichage button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cg-plan .affichage small { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--accent); color: var(--encre); }
.cg-plan--3d .toile, .cg-plan--3d .ajouter, .cg-plan--3d .barre { display: none; }
.cg-plan:not(.cg-plan--3d) .toile3d { display: none; }

.toile3d { position: relative; height: min(72vh, 680px); min-height: 380px; border: 1px solid var(--ligne); border-radius: 20px; overflow: hidden; background: #e9e4da; }
.cg3d-toile { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.cg3d-toile:active { cursor: grabbing; }
.cg3d-etiquette { position: absolute; top: 12px; left: 12px; margin: 0; padding: 7px 12px; border-radius: 999px; background: var(--blanc); border: 1px solid var(--ligne); font-size: .8rem; font-weight: 700; color: var(--encre); }
.cg3d-photo { position: absolute; top: 12px; right: 12px; appearance: none; display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border: 1px solid var(--ligne); border-radius: 12px; background: var(--blanc); color: var(--encre); font: 700 .85rem var(--police, inherit); cursor: pointer; }
.cg3d-photo img { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; display: block; }
.cg3d-photo:focus-visible, .cg3d-fermer:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cg3d-astuce { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(21, 44, 56, .78); color: #fff; font-size: .8rem; text-align: center; pointer-events: none; }
.cg3d-note { position: absolute; left: 12px; bottom: 12px; max-width: 220px; margin: 0; font-size: .72rem; line-height: 1.35; color: var(--doux); }
.cg3d-chargement { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; margin: 0; background: #e9e4da; color: var(--encre); font-weight: 700; text-align: center; }
.cg3d-chargement[hidden] { display: none; }
.cg3d-voile { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(21, 44, 56, .55); padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.cg3d-voile[hidden] { display: none; }
.cg3d-voile figure { margin: 0; max-width: 960px; width: 100%; background: var(--blanc); border-radius: 14px; padding: 10px; display: grid; gap: 8px; }
.cg3d-voile img { width: 100%; height: auto; border-radius: 8px; display: block; }
.cg3d-voile figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--encre); font-weight: 500; padding: 0 4px 2px; }
.cg3d-fermer { appearance: none; border: 1px solid var(--ligne); background: var(--blanc); color: var(--encre); font: 700 .9rem var(--police, inherit); padding: 8px 14px; border-radius: 999px; cursor: pointer; }

@media (max-width: 760px) {
	.toile3d { height: 62vh; min-height: 340px; border-radius: 14px; }
	.cg3d-note { display: none; }
	.cg3d-photo span { display: none; }
	.cg3d-photo { padding: 4px; }
	.cg3d-astuce { bottom: 12px; font-size: .75rem; }
}
