/* DOSNE · charte graphique « Bandeau relief »
   Marine, bleu ciel, corail, jaune ; police Inter (embarquée, licence OFL dans assets/fonts/OFL.txt).
   Le volet en cours est annoncé par un bandeau plein, des filets latéraux et un filet bas de sa couleur. */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/Inter-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/Inter-Bold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("assets/fonts/Inter-ExtraBold.ttf") format("truetype"); }

:root {
  --navy: #12243A;
  --navy-2: #1F3A5C;
  --sky: #58A5D8;
  --coral: #C9484E;
  --coral-brand: #DF5B60;
  --yellow: #F2C744;
  --flame: #B5373D;
  --paper: #E6ECF3;
  --ink: #12243A;
  --muted: #566A80;
  --line: #D2DBE6;
  --white: #FFFFFF;
  --section-accent: #C9484E;
  --ui: 1;
  --band-px: 54px;  /* hauteur du bandeau en pixels écran : fixe, quel que soit le zoom d'affichage */
  --band-h: calc(var(--band-px) / var(--ui));
  --frame: 3px;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text-top-title: 12px;
  --text-menu-top-title: 12px;
  --text-section-title: 12px;
  --text-menu-card: 12px;
  --text-thumbnail-label: 10px;
  --text-home-button: 12px;
  --text-switch-button: 12px;
  --text-dropdown-menu: 12px;
  --text-footer: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; zoom: var(--ui); }
/* formats cibles : iPad (minimum), ordinateur portable (référence), grands écrans muraux (PC sécurité) :
   l'interface grossit avec l'écran. Réglable dans l'éditeur (Taille d'affichage). */
@media (min-width: 1700px) { :root { --ui: 1.2; } }
@media (min-width: 2200px) { :root { --ui: 1.5; } }
@media (min-width: 2800px) { :root { --ui: 1.9; } }
@media (min-width: 3600px) { :root { --ui: 2.4; } }
body { margin: 0; min-height: calc(100vh / var(--ui)); font-family: var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a, button { touch-action: manipulation; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), #contenu:focus { outline: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
.vband a:focus-visible, .vband button:focus-visible, .thumb-strip button:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--navy); }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 3000000; padding: 10px 16px; border-radius: 8px; background: #fff; color: #000; font-weight: 700; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }
a:hover { text-decoration: none; cursor: pointer; }

/* ---------- couleurs du volet ---------- */
.v-fire { --vol: var(--coral); --vol-l: var(--coral); --vol-r: var(--coral); --plan-line: #DF5B60; --vol-ink: #fff; }
.v-security { --vol: var(--sky); --vol-l: var(--sky); --vol-r: var(--sky); --plan-line: #58A5D8; --vol-ink: var(--navy); }
.v-combined { --vol: var(--coral); --vol-l: var(--coral); --vol-r: var(--sky); --plan-line: #DF5B60; --vol-ink: #fff; }

/* ---------- cadre de page : filets latéraux et filet bas ---------- */
.page { position: relative; min-height: calc(100vh / var(--ui)); min-height: calc(100dvh / var(--ui)); display: flex; flex-direction: column; background-color: var(--paper); background-image: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0) 38%), repeating-linear-gradient(30deg, rgba(18,36,58,.05) 0 1px, transparent 1px 30px), repeating-linear-gradient(-30deg, rgba(18,36,58,.05) 0 1px, transparent 1px 30px); }
.page::before { content: ""; position: absolute; inset: 0; border-left: var(--frame) solid var(--vol-l); border-right: var(--frame) solid var(--vol-r); pointer-events: none; z-index: 4; }
.page::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--frame); background: linear-gradient(90deg, var(--vol-l) 50%, var(--vol-r) 50%); pointer-events: none; z-index: 4; }
/* fond des pages de consultation et d'image interactive : dégradé + quadrillage isométrique, comme les briques Blocs */
.consult { background-color: #E6ECF3; background-image: radial-gradient(ellipse at 50% 70%, #FFFFFF 0%, #E9EEF5 55%, #CDD7E4 100%), repeating-linear-gradient(30deg, rgba(18,36,58,.05) 0 1px, transparent 1px 30px), repeating-linear-gradient(-30deg, rgba(18,36,58,.05) 0 1px, transparent 1px 30px); }

/* ---------- bandeau du volet ---------- */
.vband { position: relative; z-index: 6; flex: none; display: flex; align-items: center; gap: 6px; zoom: calc(1 / var(--ui)); height: var(--band-px); min-height: var(--band-px); padding: 0 12px; overflow: visible; background: var(--vol); color: var(--navy); }
.vtools { display: flex; align-items: center; gap: 10px; position: relative; z-index: 7; }
.ctl { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: inherit; cursor: pointer; transition: background .15s, transform .12s; }
.ctl svg { width: 23px; height: 23px; display: block; }
.ctl:hover { background: var(--navy-2); }
.ctl:active { background: #0A1624; transform: scale(.95); }
.ctl-label { display: flex; align-items: center; gap: 7px; width: auto; padding: 0 12px 0 9px; text-decoration: none; }
.ctl-label span { font-size: var(--text-dropdown-menu); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
#exitFullscreen { display: none; }
.is-fs #enterFullscreen { display: none; }
.is-fs #exitFullscreen { display: grid; }
.bchip { display: flex; align-items: center; gap: 8px; height: 44px; max-width: 200px; padding: 0 14px 0 11px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-size: var(--text-dropdown-menu); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; position: relative; z-index: 7; transition: background .15s, transform .12s; }
.bchip:hover { background: var(--navy-2); }
.bchip:active { background: #0A1624; transform: scale(.95); }
.bchip svg { width: 23px; height: 23px; flex: none; }
.bchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlabel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 24px; border-radius: 8px; font-size: var(--text-dropdown-menu); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.vlabel svg { width: 24px; height: 24px; flex: none; }
.v-fire .vlabel, .vlabel.l { background: var(--yellow); color: var(--navy); }
.v-fire .vlabel svg, .vlabel.l svg { color: var(--flame); }
.v-security .vlabel, .vlabel.r { background: var(--navy); color: #fff; }
.v-security .vlabel svg, .vlabel.r svg { color: var(--sky); }
.has-bchip .vlabel { padding: 0 14px; gap: 8px; }
.has-bchip .vlabel svg { width: 19px; height: 19px; }
.vswitch { margin-left: auto; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 8px; color: var(--navy); font-size: var(--text-dropdown-menu); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; position: relative; z-index: 7; transition: filter .15s, transform .12s; }
.vswitch svg { width: 14px; height: 14px; flex: none; }
.vswitch.to-security { background: var(--sky); }
.vswitch.to-fire { background: var(--coral-brand); }
.vswitch:hover { filter: brightness(1.08); }
.vswitch:active { transform: scale(.97); }
/* bandeau en trois zones égales : commandes | titre du volet | autre volet ; dès 1100 px, commandes et autre volet sont centrés entre le bord et le titre */
.vband:not(.split) { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
.vband:not(.split) .vlabel { position: static; transform: none; grid-column: 2; }
.vleft, .vright { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vleft { justify-content: flex-start; grid-column: 1; }
.vright { justify-content: flex-end; grid-column: 3; }
.vband:not(.split) .vswitch { margin-left: 0; }
@media (min-width: 1100px) { .vleft, .vright { justify-content: center; } }
/* bandeau du menu combiné : deux moitiés */
.vband.split { padding: 0; gap: 0; }
.vband.split .vhalf { flex: 1; align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: var(--band-px); }
.vband.split .vhalf.l { background: var(--coral); }
.vband.split .vhalf.r { background: var(--sky); }
.vband.split .vlabel { position: static; transform: none; }
.vband.split .vtools { position: absolute; left: 12px; top: 5px; }

/* menu déroulant des pages */
#mobileMenu { display: none; position: fixed; zoom: calc(1 / var(--ui)); top: calc(var(--band-px) + 6px); left: 12px; width: min(max(340px, calc(var(--text-dropdown-menu) * 24px)), calc(100vw - 24px)); max-height: calc(100vh - var(--band-px) - 24px); max-height: calc(100dvh - var(--band-px) - 24px); overflow-y: auto; background: var(--navy); border-radius: 12px; box-shadow: 0 14px 36px rgba(18,36,58,.4); z-index: 1000002; }  /* en pixels écran, comme le bandeau : même taille de texte */
#mobileMenu a { display: block; padding: 14px 18px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 700; font-size: var(--text-dropdown-menu); }
/* une seule typographie pour tout le bandeau (Menu, Choix bâtiment, titre du volet, autre volet) et la liste déroulante */
.vband .ctl-label span, .vband .bchip, .vband .vlabel, .vband .vswitch, #mobileMenu a { font-family: var(--font); font-size: var(--text-dropdown-menu); font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.vband .vlabel b { font-weight: inherit; }
#mobileMenu a:hover { background: var(--vol); color: var(--vol-ink); }
#mobileMenu a small { font-weight: 500; opacity: .8; }
#mobileMenu a.menu-building { background: rgba(255,255,255,.07); text-transform: uppercase; }
#mobileMenu a.menu-building.is-current { background: var(--vol); color: var(--vol-ink); }
#mobileMenu a.menu-choose { background: rgba(255,255,255,.14); }

/* ---------- menu principal ---------- */
.menu-body { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 20px min(160px, 11vw) 52px; display: flex; flex-direction: column; gap: 30px; }
.msec { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 18px; border-radius: 6px; background: var(--vol); color: var(--vol-ink); font-size: var(--text-section-title); font-weight: 800; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; text-align: center; }
/* les cartes sont toujours centrées, y compris la dernière rangée incomplète */
.mgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--mgap); align-items: flex-start; }
.menu { --cols: 4; --mgap: 80px; }
.menu .mgrid { --rows: var(--r4, 1); }
.combined-col { --cols: 2; }
.combined-col .mgrid { --rows: var(--r2, 1); }
.mgrid .menu-card { flex: 0 0 calc((100% - var(--mgap) * (var(--cols) - 1)) / var(--cols)); }
/* miniature de menu : « cristal pur » (verre givré) */
/* miniature de menu : « lisibilité maximale » (nom très grand sur bandeau marine plein, liseré d'accent) ; image 4/3 qui remplit la carte */
.menu-card { --glass-accent: var(--yellow); container-type: inline-size; position: relative; margin: 0; padding: 0; overflow: hidden; text-align: center; color: var(--navy); background: #fff; border: 1px solid #fff; border-radius: clamp(10px, 5cqw, 14px); box-shadow: 0 8px 20px rgba(0,0,0,.3); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.v-security .menu-card, .combined-col.col-security .menu-card { --glass-accent: var(--sky); }
/* survol : bord de 2 px (1 px de bordure + 1 px de trait extérieur, sans décaler la mise en page) : jaune en sécurité incendie, bleu ciel comme le bandeau en protection des personnes */
.menu-card:hover { transform: translateY(-4px); border-color: var(--glass-accent); box-shadow: 0 0 0 1px var(--glass-accent), 0 14px 28px rgba(0,0,0,.4); }
/* au clic : bord jaune de 2 px à l'extérieur de la carte (les deux volets) */
.menu-card:active { transform: translateY(-1px); outline: 2px solid var(--yellow); outline-offset: 0; }
.menu-card a { display: block; position: relative; color: inherit; text-decoration: none; }
.menu-card a:focus-visible { outline-offset: 5px; }
.menu-card img.image-format-specifique, .menu-card .image-format-specifique.placeholder-card { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.menu-card .placeholder-card { display: grid !important; place-items: center; color: var(--muted); font-weight: 800; letter-spacing: .1em; font-size: 12px; }
.menu-badge { position: absolute; left: 7px; top: 7px; z-index: 2; padding: 3px 7px; border-radius: 4px; background: var(--navy); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; }
.menu-card h4 { margin: 0; padding: clamp(10px, 4.4cqw, 14px) clamp(4px, 2.4cqw, 12px); font-size: min(var(--text-section-title), 9cqw); font-weight: 800; letter-spacing: .12em; overflow-wrap: anywhere; line-height: 1.2; text-transform: uppercase; color: var(--navy); background: #fff; border-top: 3px solid var(--glass-accent); }
.empty-menu { width: 100%; margin: 4px 0 8px; color: var(--muted); font-weight: 700; text-align: center; grid-column: 1 / -1; }
.cname { position: absolute; left: 28px; bottom: 14px; z-index: 6; max-width: calc(100% - 56px); color: var(--ink); font-size: var(--text-footer); font-weight: 500; letter-spacing: .04em; }
.cname a { color: inherit; opacity: .8; text-decoration: underline; }
.cname a:hover { opacity: 1; }
.menu .cname { left: 44px; }
.consult .cname { color: #fff; }
.consult.no-strip .cname { color: var(--ink); }
/* menu combiné : deux colonnes, une par volet */
.combined-grid { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1700px; margin: 0 auto; padding: 16px 28px 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 84px; align-content: start; }
.combined-col { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.combined-col.col-fire { --vol: var(--coral); --plan-line: #DF5B60; --vol-ink: #fff; }
.combined-col.col-security { --vol: var(--sky); --plan-line: #58A5D8; --vol-ink: var(--navy); }

/* ---------- page de consultation ---------- */
.stage { position: relative; z-index: 1; flex: 1 1 0; min-height: 0; display: flex; padding: 12px 32px; }
.consult.no-strip .stage { padding-bottom: 36px; }
.viewer-zone { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.mainimage { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-in; border: 2px solid var(--plan-line); background: #fff; box-shadow: 0 0 0 5px #fff, 0 20px 40px rgba(18,36,58,.28), 0 3px 8px rgba(18,36,58,.20); }
.viewer-hidden { display: none !important; }
.placeholder { padding: 70px; border: 3px dashed var(--line); border-radius: 10px; color: var(--muted); font-weight: 700; text-align: center; }
#viewerContainer { display: none; position: absolute; inset: 0; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 24px rgba(18,36,58,.18); }
#viewerContainer.integrated-viewer { display: block; }
#viewerContainer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* le zoom d'affichage (--ui) ne doit pas agrandir le contenu de la vue 3D / du panorama : sinon ses panneaux dépassent du cadre */
#viewerContainer iframe { zoom: calc(1 / var(--ui)); }
.interactive-image-wrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; }
.interactive-mainimage { display: block; max-width: 100%; max-height: calc((100vh / var(--ui)) - var(--band-h) - 48px); max-height: calc((100dvh / var(--ui)) - var(--band-h) - 48px); width: auto; height: auto; object-fit: contain; border: 2px solid var(--plan-line); background: #fff; box-shadow: 0 0 0 5px #fff, 0 20px 40px rgba(18,36,58,.28); }
.interactive-hotspot { position: absolute; width: 28px; height: 28px; transform: translate(-50%, -50%); border-radius: 50%; background: #ff0000; border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(255,0,0,.35), 0 8px 18px rgba(0,0,0,.45); z-index: 4; }
.interactive-hotspot:hover { transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 0 0 8px rgba(255,0,0,.28), 0 12px 24px rgba(0,0,0,.5); }
.interactive-hotspot span { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: none; min-width: 90px; padding: 6px 9px; border-radius: 8px; background: rgba(0,0,0,.82); color: #fff; font-size: 13px; font-weight: 800; line-height: 1.2; text-align: center; white-space: nowrap; }
.interactive-hotspot:hover span { display: block; }
.interactive-hotspot.is-letter { width: 38px; height: 38px; display: grid; place-items: center; background: var(--flame, #B5373D); }
.interactive-hotspot.is-letter span { position: static; display: block; min-width: 0; padding: 0; transform: none; background: none; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 0; }

/* bandeau de miniatures : une seule rangée, tailles ajustées au nombre d'images */
.has-back .stage { flex-direction: column; }
.backrow { align-self: flex-start; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; margin: 0 0 8px; padding: 0 16px 0 10px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; position: relative; z-index: 3; box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 3px 8px rgba(18,36,58,.25); }
.backrow:hover { background: var(--navy-2); }
.backrow svg { width: 18px; height: 18px; flex: none; }
.thumb-strip { position: relative; z-index: 2; flex: none; display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: var(--gap, 30px); margin-bottom: var(--frame); padding: 10px 28px 0; background: var(--navy); }
.thumb-strip.n-few { --gap: 64px; --thumb-fs: var(--text-thumbnail-label); padding-bottom: 22px; }
.thumb-strip.n-mid { --gap: 40px; --thumb-fs: calc(var(--text-thumbnail-label) - 1px); padding-bottom: 24px; }
.thumb-strip.n-many { --gap: 18px; --thumb-fs: calc(var(--text-thumbnail-label) - 2px); padding-bottom: 24px; }
.media-card { flex: 0 1 104px; min-width: 0; padding: 0; border: 0; background: transparent; color: #fff; font: inherit; text-align: center; cursor: pointer; transition: transform .2s ease; }
.n-mid .media-card, .n-many .media-card { flex: 1 1 0; max-width: 104px; }
.n-many .media-card h6 { max-width: calc(100% + 10px); }
.media-card:hover { transform: translateY(-3px); }
.media-card img.miniature-chanfrein, .media-card .miniature-chanfrein.icon-card { display: block; width: 100%; aspect-ratio: 1.8; object-fit: cover; border: 2px solid #fff; border-radius: 4px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.40); transition: box-shadow .2s ease; }
.media-card .icon-card { display: grid; place-items: center; background: var(--navy-2); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.media-card h6 { position: relative; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% + 36px); margin: 6px 0 0; text-align: center; color: #fff; font-size: var(--thumb-fs, 12.5px); font-weight: 700; line-height: 1.15; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }
.media-card.miniature-active-card { transform: translateY(-3px); }
.media-card .miniature-chanfrein.miniature-active { outline: 3px solid var(--yellow); outline-offset: 0; box-shadow: 0 0 14px rgba(242,199,68,.55), 0 4px 10px rgba(0,0,0,.4); }
.media-card.miniature-active-card h6 { color: var(--yellow); }
.empty { color: #fff; font-weight: 700; }

/* ---------- accueil ---------- */
.home { position: relative; min-height: calc(100vh / var(--ui)); min-height: calc(100dvh / var(--ui)); display: flex; flex-direction: column; background-color: var(--paper); background-image: radial-gradient(ellipse at 50% 70%, #FFFFFF 0%, #E9EEF5 55%, #CDD7E4 100%), repeating-linear-gradient(30deg, rgba(18,36,58,.05) 0 1px, transparent 1px 30px), repeating-linear-gradient(-30deg, rgba(18,36,58,.05) 0 1px, transparent 1px 30px); --plan-line: #DF5B60; }
.home::after { content: ""; flex: none; height: 10px; background: linear-gradient(90deg, #58A5D8 0 33.3%, #DF5B60 33.3% 66.6%, #F2C744 66.6%); }
.home-head { position: relative; z-index: 3; flex: none; padding: 24px 24px 22px; text-align: center; background: var(--navy); color: #fff; border-bottom: 5px solid; border-image: linear-gradient(90deg, #58A5D8 0 33.3%, #DF5B60 33.3% 66.6%, #F2C744 66.6%) 1; }
.home-head h1 { margin: 0; color: #fefffe; font-size: var(--text-top-title); font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.home-prompt { margin: 8px 0 0; color: var(--yellow); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.home-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 18px; }
.home-card { display: block; min-width: 300px; padding: 13px 28px; border-radius: 8px; color: #fff; font-size: var(--text-home-button); font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-align: center; text-transform: uppercase; text-decoration: none; transition: filter .15s, transform .12s; }
.home-card:hover { filter: brightness(1.08); }
.home-card:active { transform: scale(.98); }
.home-card.fire { background: var(--coral-brand); }
.home-card.security { background: var(--sky); color: var(--navy); }
.home-card.both { background: linear-gradient(90deg, var(--coral-brand) 50%, var(--sky) 50%); }
.building-block { padding: 12px 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; }
.building-name { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.home-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.home-cards.compact .home-card { min-width: 240px; padding: 11px 20px; font-size: calc(var(--text-home-button) - 1px); }
.home-stage { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 22px 70px 18px; }
.home-map { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.cover-image, .home-map > img { display: block; max-width: 100%; max-height: calc((100vh / var(--ui)) - 250px); max-height: calc((100dvh / var(--ui)) - 250px); width: auto; height: auto; border: 2px solid var(--plan-line); background: #fff; box-shadow: 0 0 0 8px #fff, 0 26px 52px rgba(18,36,58,.34); }
.home-hotspot { width: 34px; height: 34px; }
.home-hotspot span { display: block !important; bottom: calc(100% + 8px); font-size: 14px; background: rgba(0,0,0,.78); }
.home-about { position: relative; z-index: 1; margin: 0; padding: 0 0 12px; text-align: center; font-size: 12px; color: var(--muted); }
.home-about a { color: inherit; text-decoration: underline; opacity: .85; }
.about-link { color: inherit; opacity: .8; text-decoration: underline; }
.about-link:hover { opacity: 1; }

/* ---------- plein écran, agrandissement d'image ---------- */
#resumeFullscreen { position: fixed; right: 18px; bottom: 18px; z-index: 1000003; display: none; padding: 13px 18px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: 800 13px var(--font); letter-spacing: .03em; text-transform: uppercase; box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: pointer; }
#resumeFullscreen.is-visible { display: block; }
/* l'agrandissement ne subit pas le zoom d'affichage (--ui) : positions de la souris, glisser et croix restent justes */
.lightbox { zoom: calc(1 / var(--ui)); position: fixed; inset: 0; background: rgba(0,0,0,.95); display: none; align-items: center; justify-content: center; z-index: 2000000; padding: 24px; overflow: hidden; touch-action: none; }
.lightbox.is-open { display: flex; }
#lightboxContent { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.lightbox iframe { width: 95vw; height: 92vh; border: 0; background: #fff; }
.lightbox img.zoom-image { width: auto; height: auto; max-width: 95vw; max-height: 92vh; object-fit: contain; border: 0; background: #fff; user-select: none; -webkit-user-drag: none; transform-origin: center center; cursor: zoom-in; transition: transform .22s ease; }
.lightbox img.zoom-image.is-zoomed { cursor: grab; transition: none; }
.lightbox img.zoom-image.is-dragging { cursor: grabbing; }
.zoom-hint { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2000001; padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.32); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; font-weight: 700; pointer-events: none; }
#closeLightbox { position: fixed; left: 20px; top: 16px; width: 48px; height: 48px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-size: 0; cursor: pointer; z-index: 2000001; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
#closeLightbox::before, #closeLightbox::after { content: ""; position: absolute; left: 13px; top: 22px; width: 22px; height: 4px; border-radius: 3px; background: #fff; }
#closeLightbox::before { transform: rotate(45deg); }
#closeLightbox::after { transform: rotate(-45deg); }

/* ---------- mentions et licences ---------- */
.about-body { background: #111; }
.about-page { max-width: 880px; margin: 0 auto; padding: 40px 24px 70px; color: #fff; line-height: 1.55; font-family: var(--font); }
.about-page h1 { font-size: 30px; margin: 10px 0 4px; }
.about-page h2 { font-size: 19px; margin: 28px 0 8px; color: #ffd9d9; }
.about-back { color: #fff; text-decoration: none; font-weight: 700; }
.about-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.about-table th, .about-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.2); vertical-align: top; }
.about-table a { color: #9cd3ff; }

/* ---------- page de menu : fond blanc, contenu réparti sur toute la hauteur ---------- */
.menu { background-image: none; }
.menu { background-color: #fff; }
.menu.v-fire { background-color: #94121F; }
.menu.v-security { background-color: var(--navy); }
.menu.v-combined { background-color: #94121F; background-image: linear-gradient(90deg, #94121F 50%, var(--navy) 50%); }
@media (max-width: 900px) { .menu.v-combined { background-image: linear-gradient(180deg, #94121F 50%, var(--navy) 50%); } }
.menu.v-combined:has(> .bg-photo) { background-image: linear-gradient(90deg, #94121F 50%, var(--navy) 50%); }
.menu.v-fire .cname, .menu.v-security .cname, .menu.v-combined .cname { color: #fff; }
@media (min-width: 720px) {
  .menu-body { padding-bottom: 40px; }
  .combined-grid { align-content: start; padding-bottom: 40px; }
  .menu .mgrid { align-items: flex-start; row-gap: 36px; }
}

/* ---------- adaptation à l'écran ---------- */
@media (max-width: 959px) {
  .menu { --mgap: 48px; }
}
@media (max-width: 1000px) {
  .bchip { max-width: 44px; padding: 0; justify-content: center; }
  .bchip span { display: none; }
}
@media (max-width: 900px) {
  .ctl-label { width: 44px; padding: 0; justify-content: center; }
  .ctl-label span { display: none; }
  .vlabel { padding: 0 12px; }
  .combined-grid { grid-template-columns: 1fr; gap: 24px; }
  .combined-col { --cols: 3; }
  .combined-col .mgrid { --rows: var(--r3, 1); }
  .home-stage { padding: 18px 28px; }
}
@media (max-width: 700px) {
  .menu, .combined-col { --cols: 2; }
  .menu .mgrid, .combined-col .mgrid { --rows: var(--r2, 1); }
  .menu-body { padding: 14px 8px 52px; }
  .menu { --mgap: 20px; }
  .vswitch { width: 44px; padding: 0; justify-content: center; }
  .vswitch span { display: none; }
  .vswitch svg { width: 18px; height: 18px; }
  .stage { padding: 8px 10px; }
  .thumb-strip { justify-content: flex-start; overflow-x: auto; gap: 10px; padding: 10px 14px 24px; -webkit-overflow-scrolling: touch; }
  .thumb-strip .media-card, .thumb-strip.n-mid .media-card, .thumb-strip.n-many .media-card { flex: 0 0 96px; max-width: none; }
  .home-card, .home-cards.compact .home-card { min-width: 0; width: 100%; }
  .home-actions { flex-direction: column; align-items: stretch; }
  .home-head h1 { font-size: calc(var(--text-top-title) - 4px); }
}
@media (max-width: 560px) {
  .vband { flex-wrap: nowrap; }
  .vlabel { padding: 0 8px; gap: 6px; }
  .vlabel svg { display: none; }
  .vband.split .vlabel { width: auto; padding: 0 8px; }
  .vband.split .vlabel svg { display: none; }
  .home-stage { padding: 16px 12px; }
}
@media (max-height: 640px) and (min-width: 701px) {
  .thumb-strip.n-few { padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (pointer: coarse) {
  .ctl, .vswitch, .bchip { min-height: 44px; }
  .ctl { min-width: 44px; }
  #mobileMenu a { padding: 18px 20px; }
  .interactive-hotspot { width: 40px; height: 40px; }
  .home-hotspot { width: 44px; height: 44px; }
}


/* ---------- heure et date, mode nuit ---------- */
.vclock { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding: 0 12px; line-height: 1.1; color: var(--navy); font-family: var(--font); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.vclock .vc-time { font-size: calc(var(--text-dropdown-menu) * 1.5); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.vclock .vc-date { font-size: calc(var(--text-dropdown-menu) * .8); font-weight: 700; opacity: .85; }
.vband.split .vclock { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 8; }
.v-security .vclock { color: var(--navy); }
#nightBtn[aria-pressed="true"] { background: var(--yellow); color: var(--navy); }
/* mode nuit : un voile sombre et froid par-dessus tout (y compris les vues 3D et panoramas) ; les couleurs d'origine reviennent en le désactivant */
html.is-night::after { content: ""; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; background: rgba(4, 10, 22, .52); }
@media (max-width: 900px) { .vclock .vc-date { display: none; } }
@media (max-width: 560px) { .vclock { display: none; } }

/* ---------- fond animé très léger : sol de logiciel 3D (plan de travail) vu en biais, fixe, qui s'estompe vers l'horizon + lueur douce qui dérive ---------- */
:root { --bg-k: 0.55; }   /* intensité du fond animé réglée dans l'éditeur (1 = 100 %) */
.bg-anim { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; perspective: 760px; perspective-origin: 50% 46%; --bg-d: 1700px;
  --bg-glow: rgba(88,165,216,calc(.20 * var(--bg-k))); --bg-fl: rgba(18,36,58,calc(.17 * var(--bg-k))); --bg-fl-major: rgba(18,36,58,calc(.27 * var(--bg-k))); --bg-ax1: rgba(201,72,78,calc(.40 * var(--bg-k))); --bg-ax2: rgba(63,120,181,calc(.40 * var(--bg-k))); }
/* boîte 3D : sol, plafond et deux murs en perspective (même grille fine), qui s'estompent vers le fond */
.bg-anim > i { position: absolute; z-index: 1;
  background-image:
    linear-gradient(var(--bg-fl-major) 1px, transparent 1px), linear-gradient(90deg, var(--bg-fl-major) 1px, transparent 1px),
    linear-gradient(var(--bg-fl) .6px, transparent .6px), linear-gradient(90deg, var(--bg-fl) .6px, transparent .6px);
  background-size: 300px 300px, 300px 300px, 60px 60px, 60px 60px; }
.bg-anim > i:nth-child(1) { left: 0; right: 0; bottom: 0; height: var(--bg-d); transform-origin: 50% 100%; transform: rotateX(90deg);
  -webkit-mask-image: linear-gradient(transparent 45%, rgba(0,0,0,.55) 78%, #000 100%); mask-image: linear-gradient(transparent 45%, rgba(0,0,0,.55) 78%, #000 100%); }
.bg-anim > i:nth-child(2) { left: 0; right: 0; top: 0; height: var(--bg-d); transform-origin: 50% 0; transform: rotateX(-90deg);
  -webkit-mask-image: linear-gradient(#000 0, rgba(0,0,0,.55) 22%, transparent 55%); mask-image: linear-gradient(#000 0, rgba(0,0,0,.55) 22%, transparent 55%); }
.bg-anim > i:nth-child(3) { left: 0; top: 0; bottom: 0; width: var(--bg-d); transform-origin: 0 50%; transform: rotateY(90deg);
  -webkit-mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.55) 22%, transparent 55%); mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.55) 22%, transparent 55%); }
.bg-anim > i:nth-child(4) { right: 0; top: 0; bottom: 0; width: var(--bg-d); transform-origin: 100% 50%; transform: rotateY(-90deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, rgba(0,0,0,.55) 78%, #000 100%); mask-image: linear-gradient(90deg, transparent 45%, rgba(0,0,0,.55) 78%, #000 100%); }
.bg-anim::after { content: ""; position: absolute; left: -25%; top: -25%; width: 75%; height: 75%; background: radial-gradient(closest-side, var(--bg-glow), transparent); animation: bg-glow 50s ease-in-out infinite alternate; will-change: transform; z-index: 0; }
@keyframes bg-glow { to { transform: translate3d(95%, 70%, 0); } }
/* le quadrillage fixe des pages est remplacé par ce sol */
.consult:has(> .bg-anim), .home:has(> .bg-anim) { background-image: radial-gradient(ellipse at 50% 70%, #FFFFFF 0%, #E9EEF5 55%, #CDD7E4 100%); }
.menu.v-fire > .bg-anim { --bg-glow: rgba(245,80,90,calc(.34 * var(--bg-k))); --bg-fl: rgba(255,255,255,calc(.12 * var(--bg-k))); --bg-fl-major: rgba(255,255,255,calc(.21 * var(--bg-k))); --bg-ax1: rgba(242,199,68,calc(.42 * var(--bg-k))); --bg-ax2: rgba(88,165,216,calc(.42 * var(--bg-k))); }
.menu.v-combined > .bg-anim { --bg-glow: rgba(245,80,90,calc(.34 * var(--bg-k))); --bg-fl: rgba(255,255,255,calc(.12 * var(--bg-k))); --bg-fl-major: rgba(255,255,255,calc(.21 * var(--bg-k))); --bg-ax1: rgba(242,199,68,calc(.42 * var(--bg-k))); --bg-ax2: rgba(88,165,216,calc(.42 * var(--bg-k))); }
.menu.v-security > .bg-anim { --bg-glow: rgba(88,165,216,calc(.24 * var(--bg-k))); --bg-fl: rgba(255,255,255,calc(.12 * var(--bg-k))); --bg-fl-major: rgba(255,255,255,calc(.21 * var(--bg-k))); --bg-ax1: rgba(223,91,96,calc(.48 * var(--bg-k))); --bg-ax2: rgba(242,199,68,calc(.42 * var(--bg-k))); }
@media (prefers-reduced-motion: reduce) { .bg-anim::after { animation: none; } }

/* ---------- image de fond du menu (facultative, choisie par volet) : « horizon » + « vitrine sombre » ---------- */
.menu.v-fire { --veil: #94121F; }
.menu.v-security { --veil: var(--navy); }
.bg-photo { position: fixed; left: 0; right: 0; bottom: 0; height: 62vh; z-index: 0; pointer-events: none; background: var(--bgp) center 62% / cover no-repeat; filter: contrast(1.1); -webkit-mask-image: linear-gradient(transparent, #000 55%); mask-image: linear-gradient(transparent, #000 55%); }
.bg-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--veil) 96%, transparent), color-mix(in srgb, var(--veil) 80%, transparent)); }
.menu.v-fire:has(> .bg-photo) { background-image: linear-gradient(180deg, #94121F, #6e0d17); }
.menu.v-security:has(> .bg-photo) { background-image: linear-gradient(180deg, #12243A, #0c1a2c); }
/* menu combiné : une image par moitié (sécurité incendie à gauche, protection des personnes à droite) */
.bg-photo.half { width: 50%; }
.bg-photo.half.l { left: 0; right: auto; --veil: #94121F; }
.bg-photo.half.r { right: 0; left: auto; --veil: #12243A; }

/* Miniatures « verre » (option « Style des miniatures du menu » : Verre). Mêmes dimensions que la carte classique :
   l'image est inscrite dans un cadre de 3 % et la hauteur de l'étiquette compense exactement le liseré de 3 px supprimé. */
.cards-glass .menu-card { background: rgba(255,255,255,.14); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.35); color: #fff; }
.cards-glass .menu-card a { padding: 3cqw 3cqw 0; }
.cards-glass .menu-card img.image-format-specifique, .cards-glass .menu-card .image-format-specifique.placeholder-card { border-radius: clamp(4px, 2.6cqw, 8px); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.cards-glass .menu-card h4 { color: #fff; background: transparent; border-top: 0; text-shadow: 0 1px 3px rgba(0,0,0,.5); padding-top: calc(clamp(10px, 4.4cqw, 14px) + 3px + 1.5cqw); }
.cards-glass .menu-badge { left: calc(3cqw + 7px); top: calc(3cqw + 7px); background: rgba(18,36,58,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.4); }
.cards-glass .menu-card:hover { border-color: var(--glass-accent); box-shadow: 0 0 0 1px var(--glass-accent), 0 14px 28px rgba(0,0,0,.4); }
