/* Sept univers en 3D · Castorama · Head of Creative Content & IA Factory (F/H)
   Jetons relevés sur castorama.fr le 20/11/2026 (voir BRAND_SYSTEM.md). Police Casto Pro (hommage, choix de Baptiste). */
@font-face { font-family: 'Casto Pro'; src: url('fonts/CastoPro-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Casto Pro'; src: url('fonts/CastoPro-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root { --blue: #245ea9; --deep: #003056; --yellow: #ffdc00; --ink: #323c41; --white: #fff; --txt: #fff; --gut: clamp(16px, 3.4vw, 44px); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-family: 'Casto Pro', Arial, sans-serif; color: var(--txt); background: var(--blue); font-size: 17px; line-height: 1.5; transition: color .5s; -webkit-text-size-adjust: 100%; }
body.clair { --txt: #323c41; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
body:not(.clair) a:focus-visible, body:not(.clair) button:focus-visible { outline-color: var(--yellow); }
.skip { position: fixed; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: 10px 16px; font-weight: 700; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
#magasin { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#magasin.cle { cursor: pointer; }
#magasin.prise { cursor: grabbing; }

/* ---------- Barre et univers ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 12px var(--gut); }
.bar-name { line-height: 1.2; flex: none; }
.bar-name b { display: block; font-weight: 700; font-size: 17px; }
.bar-name span { font-size: 13.5px; opacity: .9; }
.rayons { display: flex; gap: 4px; margin: 0 auto; background: rgba(255, 255, 255, .92); padding: 5px; border-radius: 999px; box-shadow: 0 6px 22px rgba(0, 32, 60, .16); }
.rayons button { color: var(--ink); font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 999px; white-space: nowrap; transition: background .25s, color .25s; }
.rayons button:hover { background: #f2f3f1; }
.rayons button.on { background: var(--blue); color: var(--white); }
.bar-act { display: flex; gap: 8px; flex: none; }
.bar-act a { text-decoration: none; font-weight: 700; font-size: 14px; padding: 9px 15px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 32, 60, .16); }
.bar-lire { background: rgba(255, 255, 255, .92); color: var(--ink); }
.bar-cv { background: var(--yellow); color: var(--ink); }
body.jaune .bar-cv { background: var(--deep); color: var(--white); }   /* univers à fond jaune (classe posée par interface_ dans visite.js) : le bouton jaune s'y perdrait */

/* ---------- Flèches ---------- */
.fleche { position: fixed; top: 46%; z-index: 15; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; transition: opacity .3s, transform .3s; }
.fleche i { font-style: normal; width: 52px; height: 52px; display: grid; place-items: center; background: var(--white); color: var(--ink); border-radius: 50%; font-size: 30px; line-height: 1; padding-bottom: 4px; box-shadow: 0 8px 24px rgba(0, 32, 60, .2); transition: transform .25s; }
.fleche-g { left: var(--gut); } .fleche-d { right: var(--gut); }
.fleche:hover i { transform: scale(1.08); }
.fleche[disabled] { opacity: 0; pointer-events: none; }
body.explore .fleche { opacity: 0; pointer-events: none; }

/* ---------- Légende de l'univers ---------- */
.legende { position: fixed; z-index: 10; left: 50%; bottom: clamp(48px, 6.5vh, 70px); transform: translateX(-50%); width: min(980px, 92vw); text-align: center; transition: opacity .4s ease, transform .5s ease; }
.legende.sort { opacity: 0; transform: translateX(-50%) translateY(14px); pointer-events: none; }
body.explore .legende { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }
.leg-k { font-size: 13.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
h1 { font-weight: 700; font-size: clamp(30px, 4.2vw, 58px); line-height: 1.06; letter-spacing: -.01em; text-transform: uppercase; margin: 6px 0 8px; text-wrap: balance; }
.legende.hero .leg-k { display: none; }
.legende.hero h1 { text-transform: none; font-size: clamp(40px, 5.4vw, 78px); letter-spacing: -.02em; }
.leg-c { max-width: 40em; margin: 0 auto; font-size: clamp(16px, 1.4vw, 19px); }
.leg-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.question { margin: 10px 0 2px; }
.question span { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: clamp(18px, 2vw, 26px); line-height: 1.15; padding: 9px 16px 8px; border-radius: 8px; position: relative; }
.question span::after { content: ''; position: absolute; left: 50%; bottom: -10px; margin-left: -8px; border: 10px solid transparent; border-top-color: var(--yellow); border-bottom: 0; }
.btn { display: inline-block; font-weight: 700; font-size: 16px; padding: 12px 24px; border-radius: 999px; text-decoration: none; background: var(--white); color: var(--ink); box-shadow: 0 8px 24px rgba(0, 32, 60, .18); transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-j { background: var(--yellow); }
.btn-b { background: var(--blue); color: var(--white); }

/* ---------- Fiche de l'univers exploré ---------- */
.fiche { position: fixed; z-index: 12; top: 0; right: 0; bottom: 0; width: min(470px, 40vw); padding: 88px var(--gut) 28px clamp(20px, 2.4vw, 36px); background: rgba(255, 255, 255, .96); color: var(--ink); overflow-y: auto; transform: translateX(104%); transition: transform .6s cubic-bezier(.2, .8, .2, 1); box-shadow: -18px 0 50px rgba(0, 32, 60, .16); }
body.explore .fiche { transform: none; }
.fiche-x { font-weight: 700; font-size: 14px; color: var(--blue); margin-bottom: 18px; }
.fiche .leg-k { color: var(--blue); }
h2 { font-weight: 700; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; margin: 4px 0 10px; }
.fi-c { font-size: 16.5px; }
.faits { list-style: none; margin-top: 18px; border-top: 3px solid var(--ink); counter-reset: f; }
.faits li { counter-increment: f; position: relative; padding: 13px 0 14px 46px; border-bottom: 1px solid #d6d8d9; cursor: pointer; transition: background .25s; }
.faits li::before { content: counter(f); position: absolute; left: 0; top: 13px; width: 30px; height: 30px; display: grid; place-items: center; background: var(--yellow); border-radius: 50%; font-weight: 700; font-size: 15px; transition: transform .25s, background .25s, color .25s; }
.faits li.on::before, .faits li:hover::before { background: var(--blue); color: var(--white); transform: scale(1.15); }
.faits b { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; }
.faits span { display: block; font-size: 15px; line-height: 1.42; margin-top: 2px; }
.fi-s { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.fi-s .btn { box-shadow: none; font-size: 15px; padding: 10px 18px; }
.fi-s .btn-o { border: 2px solid var(--ink); background: none; }
.contact { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 14px; }
.contact a { font-weight: 700; font-size: 18px; text-decoration: none; border-bottom: 3px solid var(--yellow); }
.mentions { margin-top: 22px; font-size: 13.5px; color: #5b6367; }

/* Pastilles numérotées posées sur le modèle */
.points { position: fixed; inset: 0; z-index: 11; pointer-events: none; }
.points button { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 15px; pointer-events: auto; box-shadow: 0 0 0 5px rgba(255, 220, 0, .35), 0 6px 16px rgba(0, 32, 60, .3); opacity: 0; transition: opacity .4s, background .25s, color .25s; will-change: transform; }
body.explore .points button { opacity: 1; }
.points button.on { background: var(--blue); color: var(--white); box-shadow: 0 0 0 6px rgba(36, 94, 169, .3), 0 6px 16px rgba(0, 32, 60, .3); }

.aide { position: fixed; z-index: 9; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 14px; opacity: .9; white-space: nowrap; transition: opacity .4s; }
body.explore .aide { opacity: 0; }
.pastilles { position: fixed; z-index: 9; left: 50%; bottom: 36px; transform: translateX(-50%); display: flex; gap: 8px; }
.pastilles button { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .35; transition: opacity .3s, transform .3s; }
.pastilles button.on { opacity: 1; transform: scale(1.4); }
body.explore .pastilles { opacity: 0; pointer-events: none; }

/* Mètre ruban et repères de la feuille : téléphone seulement (mobile.css) */
.ruban, .reperes { display: none; }

/* ---------- Ouverture ---------- */
.accueil { position: fixed; inset: 0; z-index: 60; background: var(--blue); color: var(--white); display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .7s ease, visibility .7s; }
.accueil.ouvert { opacity: 0; visibility: hidden; }
.accueil-t { font-weight: 700; font-size: clamp(26px, 4vw, 44px); }
.accueil-b { width: min(320px, 70vw); height: 12px; background: rgba(255, 255, 255, .25); border-radius: 6px; overflow: hidden; }
.accueil-b i { display: block; height: 100%; background: var(--yellow); transform: scaleX(.04); transform-origin: left; transition: transform .4s ease; }
.accueil-s { font-size: 14px; font-weight: 700; }
.noscript { position: fixed; inset: 0; z-index: 70; background: var(--blue); color: #fff; display: grid; place-content: center; padding: 24px; font-weight: 700; font-size: 20px; }

/* ---------- Écrans étroits ---------- */
@media (max-width: 1180px) and (min-width: 861px) { .bar-name span { display: none; } }
@media (max-width: 1180px) { .rayons button { padding: 7px 10px; font-size: 13px; } .fleche span { display: none; } }
@media (max-width: 860px), (orientation: portrait) {
  body { font-size: 15.5px; }
  .bar { flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .bar-name span { display: block; font-size: 11.5px; max-width: 56vw; }
  .bar-act a { padding: 8px 12px; font-size: 13px; }
  .bar-act { margin-left: auto; }
  .rayons { order: 3; width: 100%; margin: 0; overflow-x: auto; border-radius: 12px; scrollbar-width: none; }
  .fleche { top: 40%; } .fleche i { width: 42px; height: 42px; font-size: 24px; }
  .fleche-g { left: 8px; } .fleche-d { right: 8px; }
  .legende { bottom: 58px; }
  .fiche { top: auto; left: 0; width: auto; height: 54vh; padding: 16px var(--gut) 20px; transform: translateY(104%); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 40px rgba(0, 32, 60, .2); }
  .fiche-x { margin-bottom: 8px; }
  .aide { display: none; } .pastilles { bottom: 22px; }
}
@media (max-height: 600px) and (min-width: 861px) { .leg-c { display: none; } .legende { bottom: 46px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Départ en attente : la base de l'îlot demandé arrive encore (connexion lente). */
html[data-attente] body, html[data-attente] button { cursor: progress; }

/* Bouton du son : coupé au départ ; même gabarit que les liens voisins. */
.bar-son { font: inherit; font-weight: 700; font-size: 14px; padding: 9px 15px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .28); color: var(--white); }
.bar-son[aria-pressed="true"] { background: rgba(255, 255, 255, .92); color: var(--ink); }
body.jaune .bar-son, body.clair .bar-son { background: rgba(0, 48, 86, .14); color: var(--ink); }
body.jaune .bar-son[aria-pressed="true"], body.clair .bar-son[aria-pressed="true"] { background: var(--deep); color: var(--white); }
@media (max-width: 900px) { .bar-son { padding: 8px 12px; font-size: 13px; } }

/* Écran des outils (outils.js) : s'ouvre en zoom depuis la fiche cliquée, presque en plein écran. */
.outil { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 3vmin; background: rgba(0, 24, 46, .72); }
.outil[hidden] { display: none; }
.outil-b { width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; background: #f6f6f3; color: #323c41;
  border-radius: 22px; padding: clamp(14px, 2.4vmin, 26px); box-shadow: 0 30px 80px rgba(0, 16, 34, .5); overflow: auto; }
.outil-k { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #245ea9; margin: 0 0 4px; }
.outil-t { font-weight: 700; font-size: clamp(22px, 3.4vmin, 34px); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 6px; }
.outil-c { font-size: clamp(14px, 2vmin, 17px); line-height: 1.45; margin: 0; max-width: 62ch; }
.outil-ecran { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; display: block; background: #0d1722; min-height: 0; flex: 0 1 auto; }
.outil-pied { display: flex; gap: 8px; align-items: center; }
.outil-pied button { font: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer; background: #e4e6e4; color: #323c41; }
.outil-pied .outil-x { margin-left: auto; background: #245ea9; color: #fff; }
.outil-pied button:focus-visible { outline: 3px solid #ffdc00; outline-offset: 2px; }
@media (max-width: 700px) { .outil { padding: 0; } .outil-b { border-radius: 0; height: 100%; justify-content: center; } }

/* Flèches d'aide au-dessus des objets cliquables (voir fleches() dans le script) */
.fleches { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.fleche { position: absolute; left: 0; top: 0; width: 30px; height: 34px; margin: -46px 0 0 -15px; opacity: 0; transition: opacity .45s; filter: drop-shadow(0 2px 3px rgba(0, 20, 60, .45)); }
.fleche.vue { opacity: 1; }
.fleche::before { content: ""; position: absolute; inset: 0; background: #ffd200; clip-path: polygon(33% 0, 67% 0, 67% 48%, 100% 48%, 50% 100%, 0 48%, 33% 48%); animation: fleche-saut 1.1s ease-in-out infinite; }
@keyframes fleche-saut { 0%, 100% { transform: translateY(-9px); } 50% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fleche::before { animation: none; } }
