/*
 * Page mère Visite virtuelle (maquette validée le 06/10, https://claude.ai/artifact/9r5Jqb52Q1svv7szBCQd3E) :
 * haut de page = vraie visite 360° (petite planète puis plongée, glisser pour regarder, choix du lieu), visites en
 * hublots, tableau de choix, lieux visités en défilé. Kit propre (préfixe cp-vm), chargé par inc/releve.php
 * seulement si la page l'utilise. Sans WebGL : premier panorama à plat en fond.
 */

/* ---------- Haut de page « visite 360° » ---------- */
.cp-sx-hero.is-vr { min-height: min(92vh, 900px); display: grid; align-items: center; background: #05050F var(--cp-vm-poster, none) 50% 55% / auto 160% no-repeat; cursor: grab; user-select: none; touch-action: pan-y; }
.cp-sx-hero.is-vr.is-drag { cursor: grabbing; }
.cp-sx-hero.is-vr::before,
.cp-sx-hero.is-vr.is-charte::before { display: block; right: auto; left: 0; top: 0; z-index: -1; width: 100%; height: 100%; aspect-ratio: auto; background: linear-gradient(90deg, rgba(3, 3, 20, .88) 0%, rgba(3, 3, 20, .5) 36%, rgba(3, 3, 20, 0) 60%), linear-gradient(0deg, rgba(3, 3, 20, .75) 0%, rgba(3, 3, 20, 0) 32%); }
.cp-vm-pano { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.cp-sx-hero.is-vr .cp-sx-hero__in { grid-template-columns: minmax(0, 1fr); pointer-events: none; }
.cp-sx-hero.is-vr .cp-sx-hero__txt { max-width: 660px; pointer-events: auto; cursor: auto; }
.cp-sx-hero.is-vr .cp-sx-hero__title { font-size: clamp(38px, 4vw, 62px); line-height: 1.02; letter-spacing: -.025em; }
.cp-sx-hero.is-vr .cp-sx-hero__title b { display: block; color: #fff; font-weight: 300; }
.cp-sx-hero.is-vr .cp-sx-hero__lead { color: #D3D5EA; }
/* Écran d'ordinateur : le haut de page tient dans la fenêtre, y compris à 1474 × 686 (écran à 125 %, 18/10) ; la fin
   du titre (zone servie) passe sur une ligne plus petite. */
@media (min-width: 1001px) {
	.cp-sx-hero.is-vr { min-height: min(100svh, 1000px); }
	.cp-sx-hero.is-vr .cp-sx-hero__in { padding-block: calc(var(--cp-sx-head, 120px) + clamp(12px, 4svh, 88px)) clamp(24px, 5svh, 120px); }
	.cp-sx-hero.is-vr .cp-sx-hero__title { margin-top: clamp(10px, 2svh, 24px); font-size: min(clamp(38px, 4vw, 62px), 7.4svh); }
	.cp-sx-hero.is-vr .cp-sx-hero__title b { margin-top: clamp(2px, .8svh, 8px); font-size: .62em; letter-spacing: -.01em; }
	.cp-sx-hero.is-vr .cp-sx-hero__lead { margin-top: clamp(12px, 2.4svh, 24px); font-size: min(clamp(17px, 1.3vw, 19px), 2.5svh); line-height: 1.55; }
	.cp-sx-hero.is-vr .cp-sx-hero__cta { margin-top: clamp(16px, 3.6svh, 36px); }
}
.cp-vm-nadir { position: absolute; left: var(--nx, 50%); top: 50%; z-index: -1; width: 120px; height: 120px; margin: -60px 0 0 -60px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #000033 58%, rgba(0, 0, 51, 0) 72%); color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .04em; box-shadow: inset 0 0 0 2px #FF9900; opacity: 0; pointer-events: none; }
.cp-vm-bous { position: absolute; right: clamp(16px, 4vw, 56px); top: calc(var(--cp-sx-head, 120px) + 24px); z-index: 1; width: 64px; height: 64px; border-radius: 50%; background: rgba(5, 5, 20, .4); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); pointer-events: none; }
.cp-vm-bous i { position: absolute; inset: 0; transform: rotate(var(--deg, 0deg)); }
.cp-vm-bous i::before { content: ""; position: absolute; left: 50%; top: 6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 22px solid #FF9900; }
.cp-vm-hud { position: absolute; right: clamp(16px, 4vw, 56px); bottom: 30px; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cp-vm-lieux { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(5, 5, 20, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cp-vm-lieux button { all: unset; padding: 8px 14px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .3s, color .3s; }
.cp-vm-lieux button.is-on { background: #FF9900; color: #000033; }
.cp-vm-lieux button:focus-visible { outline: 2px solid #FF9900; }
.cp-vm-glisse { color: rgba(255, 255, 255, .75); font-size: 13px; font-weight: 600; letter-spacing: .06em; pointer-events: none; }
.cp-vm-glisse::before { content: "⟷"; margin-right: 8px; color: #FF9900; }
@media (max-width: 1000px) {
	.cp-sx-hero.is-vr { min-height: 0; }
	.cp-sx-hero.is-vr::before,
	.cp-sx-hero.is-vr.is-charte::before { background: linear-gradient(0deg, rgba(3, 3, 20, .94) 0%, rgba(3, 3, 20, .6) 55%, rgba(3, 3, 20, .15) 100%); }
	.cp-sx-hero.is-vr .cp-sx-hero__in { padding-top: calc(var(--cp-sx-head, 120px) + 240px); padding-bottom: 150px; }
	.cp-vm-bous { display: none; }
	.cp-vm-hud { left: 16px; right: 16px; align-items: stretch; }
	.cp-vm-lieux { justify-content: center; border-radius: 12px; }
	.cp-vm-lieux button { padding: 7px 10px; font-size: 12px; }
	.cp-vm-glisse { text-align: center; }
}

/* ---------- Titres du kit ---------- */
[class*="cp-rl--vm-"] .cp-rl__cote { display: none; }
[class*="cp-rl--vm-"] .cp-rl__h { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -.015em; }
[class*="cp-rl--vm-"] .cp-rl__lead { margin-top: 18px; }

/* ---------- Hublots ---------- */
.cp-vm-hbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(18px, 2.4vw, 36px); margin-top: 56px; }
.cp-vm-hb { display: flex; flex-direction: column; color: inherit; text-decoration: none; } /* liens alignés en bas des quatre cartes */
.cp-vm-port { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 1px #E3E5EF, 0 30px 50px -30px rgba(0, 0, 51, .5); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s; }
.cp-rl .cp-vm-port img { position: absolute; inset: -12%; width: 124%; height: 124%; max-width: none; object-fit: cover; filter: saturate(.85); transition: transform 6s linear, filter .5s; }
.cp-vm-port::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .9), inset 0 0 40px rgba(0, 0, 51, .35); }
.cp-vm-port b { position: absolute; left: 50%; bottom: 18px; z-index: 1; padding: 5px 12px; border-radius: 999px; background: #000033; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); }
a.cp-vm-hb:hover .cp-vm-port,
a.cp-vm-hb:focus-visible .cp-vm-port { transform: translateY(-6px) scale(1.03); box-shadow: 0 0 0 2px #FF9900, 0 40px 60px -30px rgba(0, 0, 51, .6); }
.cp-rl a.cp-vm-hb:hover .cp-vm-port img { transform: rotate(40deg) scale(1.08); filter: none; }
a.cp-vm-hb:focus-visible { outline: none; }
.cp-rl .cp-vm-hb .cp-rl__h3 { margin: 22px 0 0; color: #000033; font-size: 22px; }
.cp-rl .cp-vm-hb p { margin-top: 8px; color: #5D6180; font-size: 16px; }
.cp-vm-hb em { display: inline-block; align-self: flex-start; margin-top: auto; padding-top: 12px; color: #000033; font-style: normal; font-weight: 700; text-decoration: underline; text-decoration-color: #FF9900; text-underline-offset: 4px; }

/* ---------- Tableau de choix ---------- */
.cp-vm-tw { margin-top: 48px; overflow-x: auto; }
.cp-vm-tab { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; }
.cp-vm-tab th,
.cp-vm-tab td { padding: 18px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 15px; line-height: 1.5; }
.cp-vm-tab thead th { color: #fff; font-size: 18px; font-weight: 700; border-bottom: 2px solid rgba(255, 255, 255, .2); }
.cp-vm-tab thead small { display: block; margin-top: 4px; color: #FF9900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.cp-vm-tab tbody th { width: 150px; color: #C9CBE3; font-weight: 600; }
.cp-vm-tab td { color: #E4E5F2; transition: background .3s; }
.cp-vm-tab .is-col { background: rgba(255, 153, 0, .09); }
.cp-vm-tab thead th.is-col { box-shadow: inset 0 3px 0 #FF9900; }
.cp-rl--blanc .cp-vm-tab th, .cp-rl--blanc .cp-vm-tab td { border-bottom-color: #E3E5EF; color: #14162E; }
.cp-rl--blanc .cp-vm-tab thead th { color: #000033; }

/* ---------- Lieux visités ---------- */
.cp-rl--vm-lieux { overflow: hidden; }
.cp-vm-tk { display: grid; gap: 14px; margin: 40px calc(50% - 50vw) 0; }
.cp-vm-tkr { display: flex; width: max-content; animation: cp-vm-tk 60s linear infinite; }
.cp-vm-tkr--2 { animation-direction: reverse; animation-duration: 70s; }
.cp-vm-tk:hover .cp-vm-tkr { animation-play-state: paused; }
.cp-vm-tkr > div { display: flex; gap: 40px; padding-right: 40px; }
.cp-vm-tkr span { color: #000033; font-size: clamp(26px, 3vw, 44px); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.cp-rl--nuit .cp-vm-tkr span { color: #fff; }
.cp-vm-tkr small { margin-left: 10px; color: #5D6180; font-size: .45em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.cp-vm-tkr span::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 40px; border-radius: 50%; background: #FF9900; vertical-align: middle; }
@keyframes cp-vm-tk { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
	.cp-vm-tkr { animation: none; width: auto; flex-wrap: wrap; }
	.cp-vm-tkr > div[aria-hidden] { display: none; }
	.cp-vm-tkr > div { flex-wrap: wrap; gap: 12px 40px; }
	[class*="cp-vm-"] { transition: none !important; }
}
