/* Page d'Incrementalys Empire : SA charte à elle, science-fiction (html.jeu-inc). Une interface de vaisseau :
   fond de nuit spatiale, cyan lumineux, panneaux d'affichage tête haute à repères d'angle, relevés en police mono,
   un code couleur néon par pilier. Polices du studio (Oxanium pour les titres, JetBrains Mono pour les relevés).
   Toutes les couleurs de la page sont ici ; elles remplacent celles de partage/base.css. */

html.jeu-inc {
  --fond: #03060c;
  --fond-centre: #02040a;
  --fond-carte: rgba(7, 15, 27, .5);      /* panneaux transparents : on voit le ciel défiler derrière */
  --grain: none;
  --encre: #d3e4f0;
  --encre-titre: #f1faff;
  --encre-douce: #8ea6b8;
  --accent: #5ef2ff;           /* cyan : titres, détails, lumière */
  --accent-fonce: #2ec5d6;
  --accent-survol: #ffffff;
  --trait: rgba(94, 242, 255, .22);
  --trait-or: rgba(94, 242, 255, .55);
  --cadre-interieur: rgba(94, 242, 255, .4);
  --ombre: rgba(0, 0, 0, .55);
  --halo: rgba(94, 242, 255, .2);
  --logo-filtre: brightness(0) invert(1);
  --bouton-fond: rgba(94, 242, 255, .08);
  --bouton-fond-survol: rgba(94, 242, 255, .22);
  --bouton-fond-presse: rgba(94, 242, 255, .38);
  --bouton-trait: rgba(94, 242, 255, .55);
  --bouton-trait-survol: #5ef2ff;
  --bouton-trait-presse: #ffffff;
  --bouton-texte: #e8fbff;
  --espace-teinte: #3f6fe0;    /* la dominante du fond spatial (étoiles, nébuleuse), comme la teinte propre à chaque système du jeu */
  /* Les huit types de soleil du jeu (Ressources/Soleils/*.tres, valeurs 0 à 1 converties) : les couleurs des étoiles du fond */
  --etoile-jaune: #ffd966;
  --etoile-rouge: #ff734d;
  --etoile-blanche: #e6edff;
  --etoile-bleue: #8cb3ff;
  --etoile-neutron: #d9e6ff;
  --etoile-sombre: #c79eeb;
  --etoile-miasme: #73e680;
  --etoile-singularite: #6b2e9e;
  /* Un code couleur par pilier (la planète du menu, le bouton, le panneau) */
  --p-minage: #ffb347;
  --p-vaisseau: #ff5d73;
  --p-exploration: #5ec8ff;
  --p-colonies: #5dffb0;
  --p-civilisations: #b48cff;
  --p-faction: #ff7ad9;
  --repere: 22px;              /* longueur des repères d'angle */
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html.jeu-inc { scroll-behavior: auto; } }

/* Fond : le vide, noir ; les étoiles et la nébuleuse sont dessinées par le canvas (incrementalys-espace.js), collé à l'écran
   pendant le défilement, derrière le contenu (même méthode que le fond d'équations du studio) */
html.jeu-inc main { background: var(--fond-centre); }
.espace { position: sticky; top: 0; display: block; width: 100%; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; z-index: -1; pointer-events: none; }
html.jeu-inc .entete, html.jeu-inc .pied { border-style: solid; border-color: var(--trait); border-width: 0 0 1px; }
html.jeu-inc .pied { border-width: 1px 0 0; }
html.jeu-inc .marque { color: var(--accent); }

/* ─── Repères d'angle, façon affichage tête haute : à poser avec .reperes, couleur = --teinte (ou le cyan) ─── */
.reperes { position: relative; }
.reperes::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none; z-index: 2;
  --b: var(--teinte, var(--accent)); --w: 2px;
  background:
    linear-gradient(var(--b), var(--b)) top left / var(--repere) var(--w) no-repeat, linear-gradient(var(--b), var(--b)) top left / var(--w) var(--repere) no-repeat,
    linear-gradient(var(--b), var(--b)) top right / var(--repere) var(--w) no-repeat, linear-gradient(var(--b), var(--b)) top right / var(--w) var(--repere) no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / var(--repere) var(--w) no-repeat, linear-gradient(var(--b), var(--b)) bottom left / var(--w) var(--repere) no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / var(--repere) var(--w) no-repeat, linear-gradient(var(--b), var(--b)) bottom right / var(--w) var(--repere) no-repeat;
}
/* Les panneaux : verre sombre, fin liseré, lignes de balayage à peine visibles ; plus de cadre antique */
html.jeu-inc .cadre::after { display: none; }
html.jeu-inc .bloc {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, color-mix(in srgb, var(--teinte, var(--accent)) 7%, transparent), transparent 45%),
    var(--fond-carte);
  border: 1px solid color-mix(in srgb, var(--teinte, var(--accent)) 38%, transparent); border-radius: 2px;
  box-shadow: 0 0 40px color-mix(in srgb, var(--teinte, var(--accent)) 10%, transparent), inset 0 0 50px rgba(0, 0, 0, .15);
}
html.jeu-inc .cadre-double { border: 1px solid color-mix(in srgb, var(--teinte, var(--accent)) 55%, transparent); border-radius: 2px; }
html.jeu-inc .cadre-double::after { border-radius: 0; }

/* ─── Haut de page : le menu en orbite dans un cadre d'écran de commande ─── */
.inc-hero { display: flex; flex-direction: column; align-items: center; padding-bottom: 28px; }
html.jeu-inc .retour, html.jeu-inc .surtitre { color: var(--accent); font-weight: 600; }
.inc-menu { display: block; width: min(1040px, 100%); aspect-ratio: 5 / 2; }   /* sans cadre : les orbites flottent sur le fond spatial */
/* Le titre du jeu, en grand, tout en haut */
.inc-titre { margin: 8px 0 12px; font: 700 clamp(2.4rem, 9vw, 5.6rem)/1.05 var(--police-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--encre-titre);
  text-shadow: 0 0 28px rgba(94, 242, 255, .55), 0 0 2px rgba(255, 255, 255, .8); }
.inc-titre-empire { color: var(--accent); font-weight: 300; }
html.jeu-inc .etiquette-centree {
  display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 8px 16px; border: 1px solid var(--accent); outline: 0; border-radius: 2px;
  color: var(--accent); background: rgba(94, 242, 255, .07); font: 600 12px/1 var(--police-mono); letter-spacing: .2em;
}
html.jeu-inc .etiquette-centree::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
@media (prefers-reduced-motion: no-preference) { html.jeu-inc .etiquette-centree::before { animation: voyant 2s ease-in-out infinite; } }
@keyframes voyant { 50% { opacity: .25; } }

/* ─── Les six boutons-piliers : des tuiles d'interface, numérotées, au code couleur du pilier ─── */
.piliers { counter-reset: tuile; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; max-width: 1040px; margin-top: 26px; }
.pilier {
  --teinte: var(--accent); counter-increment: tuile; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px 22px;
  text-align: left; text-decoration: none; border: 1px solid color-mix(in srgb, var(--teinte) 45%, transparent); border-radius: 2px;
  background:
    linear-gradient(225deg, var(--teinte) 0 12px, transparent 12px),   /* coin coupé, de la couleur du pilier */
    linear-gradient(90deg, var(--teinte) 0 3px, transparent 3px),      /* barre d'état à gauche */
    linear-gradient(135deg, color-mix(in srgb, var(--teinte) 14%, transparent), var(--fond-carte) 65%);
  transition: translate .25s cubic-bezier(.22, .8, .3, 1), border-color .2s, box-shadow .25s;
}
.pilier::after {   /* un trait lumineux balaie la tuile au survol */
  content: ""; position: absolute; inset: 0 auto 0 -40%; width: 40%; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--teinte) 35%, transparent), transparent);
}
.pilier:hover, .pilier:focus-visible { translate: 0 -3px; border-color: var(--teinte); box-shadow: 0 0 28px color-mix(in srgb, var(--teinte) 40%, transparent); }
.pilier:hover::after, .pilier:focus-visible::after { opacity: 1; animation: balayage-tuile .8s ease-out; }
@keyframes balayage-tuile { to { translate: 350% 0; } }
.pilier-nom { font: 700 1.1rem/1.2 var(--police-titre); color: var(--encre-titre); letter-spacing: .02em; }
.pilier-nom::before { content: "0" counter(tuile); display: block; margin-bottom: 4px; font: 600 11px/1 var(--police-mono); letter-spacing: .2em; color: var(--teinte); }
.pilier-desc { font-size: .88rem; line-height: 1.4; color: var(--encre-douce); }
.pilier-minage, .p-minage { --teinte: var(--p-minage); }
.pilier-vaisseau, .p-vaisseau { --teinte: var(--p-vaisseau); }
.pilier-exploration, .p-exploration { --teinte: var(--p-exploration); }
.pilier-colonies, .p-colonies { --teinte: var(--p-colonies); }
.pilier-civilisations, .p-civilisations { --teinte: var(--p-civilisations); }
.pilier-faction, .p-faction { --teinte: var(--p-faction); }

/* ─── Sections des piliers : un panneau par pilier, repères d'angle de sa couleur ─── */
.titre-piliers { display: flex; align-items: center; gap: 18px; margin: 0 0 -12px; text-align: center; font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.titre-piliers::before, .titre-piliers::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.titre-piliers::after { background: linear-gradient(270deg, transparent, var(--accent)); }
.piliers-sections { counter-reset: secteur; display: grid; gap: 44px; }
.pilier-section { counter-increment: secteur; display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; padding: 36px; scroll-margin-top: 24px; }
.pilier-section:nth-child(even) { grid-template-columns: 1.1fr 1fr; }
.pilier-section:nth-child(even) .pilier-images { order: 2; }
.pilier-images { display: grid; gap: 14px; }
.pilier-image { margin: 0; aspect-ratio: 16 / 9; }
.pilier-image img { width: 100%; height: 100%; object-fit: cover; }
.pilier-texte h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .6em; letter-spacing: .01em; }
.pilier-texte h3::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 10px; background: var(--teinte); box-shadow: 0 0 12px var(--teinte); }
.pilier-texte p { margin: 0 0 14px; color: var(--encre-douce); }
.pilier-texte ul { margin: 0; padding: 0; list-style: none; }
.pilier-texte li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px dashed color-mix(in srgb, var(--teinte) 25%, transparent); color: var(--encre); }
.pilier-texte li:last-child { border-bottom: 0; }
.pilier-texte li::before { content: "▸"; position: absolute; left: 2px; color: var(--teinte); }
.pilier-texte li strong { color: var(--teinte); font-weight: 600; }
.pilier-pastille { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 12px; border: 1px solid var(--teinte); border-radius: 2px; color: var(--teinte);
  font: 600 11px/1 var(--police-mono); letter-spacing: .18em; text-transform: uppercase; background: color-mix(in srgb, var(--teinte) 10%, transparent); }
.pilier-pastille::before { content: "SEC-0" counter(secteur); opacity: .75; padding-right: 8px; border-right: 1px solid color-mix(in srgb, var(--teinte) 60%, transparent); }
/* Une tuile « écran » à la place d'une capture, tant que le pilier n'a pas la sienne */
.pilier-tuile { display: grid; place-items: center; color: var(--teinte); font: 700 clamp(1.6rem, 4.5vw, 2.6rem)/1 var(--police-titre); letter-spacing: .14em; text-transform: uppercase;
  text-shadow: 0 0 18px var(--teinte);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px),
    linear-gradient(color-mix(in srgb, var(--teinte) 14%, transparent) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, color-mix(in srgb, var(--teinte) 14%, transparent) 1px, transparent 1px) 0 0 / 24px 100%,
    radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--teinte) 30%, transparent), transparent 70%), var(--fond); }

/* Fiche du jeu : un relevé technique */
.fiche-faits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 22px 0; padding: 0; background: var(--trait); border: 1px solid var(--trait); }
.fiche-faits div { padding: 12px 16px; background: var(--fond-carte); }
.fiche-faits dt { font: 600 11px/1 var(--police-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.fiche-faits dd { margin: 0; color: var(--encre-titre); }
.fiche-texte .jeu-actions { justify-content: flex-start; }
html.jeu-inc .fiche-texte h2, html.jeu-inc .fiche-galerie h2 { color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }

/* Boutons et flèches : cyan, anguleux, relevé en mono */
html.jeu-inc .bouton { border-radius: 2px; outline: 0; padding: 12px 24px; font: 600 13px/1 var(--police-mono); letter-spacing: .16em; text-transform: uppercase; }
html.jeu-inc .bouton:hover, html.jeu-inc .bouton:focus-visible { box-shadow: 0 0 22px rgba(94, 242, 255, .4); }
html.jeu-inc .bouton-inactif { opacity: .6; }
html.jeu-inc .galerie-fleche { border-radius: 2px; }
html.jeu-inc .contact { max-width: 760px; padding: 36px 24px; border: 1px solid var(--trait); background: var(--fond-carte); }

@media (max-width: 900px) { .piliers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .pilier-section, .pilier-section:nth-child(even) { grid-template-columns: 1fr; padding: 24px; }
  .pilier-section:nth-child(even) .pilier-images { order: 0; }
  .fiche-faits { grid-template-columns: 1fr; }
  .inc-menu { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) { .piliers { grid-template-columns: 1fr; } .titre-piliers::before, .titre-piliers::after { display: none; } }
@media (prefers-reduced-motion: reduce) { .pilier { transition: none; } .pilier:hover { translate: 0 0; } .pilier:hover::after { animation: none; opacity: 0; } }
