/* ═══════════════════════════════════════════════════════════════════════════════════════════
   CELLTIS GAMES — socle : typographie, fond, ossature de page.
   Les composants vivent dans composants.css, les icônes dans glyph.css.

   Le fond est une image floutée recouverte d'un calque vert : le flou casse le détail de la
   photo pour que le texte reste lisible partout, et la teinte unifie l'ensemble quelle que
   soit l'image choisie. Changer --bg-image suffit à changer d'ambiance.

   Le défilement appartient à <content>, pas au document : la barre du haut reste en place.
   Une page « panneau » (accueil) empile des <section band> qui remplissent chacune l'écran,
   au lieu de tout déverser d'un bloc.
   ═══════════════════════════════════════════════════════════════════════════════════════════ */

/* Plus Jakarta Sans, variable 200→800, hébergée avec le site : aucune requête vers un tiers
   n'est faite au chargement d'une page. Deux sous-ensembles seulement — latin et latin
   étendu — ce dont le français a besoin, et rien de plus. */
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("/assets/fonts/plusjakartasans-latin.woff2") format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("/assets/fonts/plusjakartasans-latin-ext.woff2") format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	/* Le repli est volontairement une police SYSTÈME : elle est déjà chargée, ses proportions
	   sont proches, et la page ne saute donc pas quand la vraie fonte arrive. */
	--font-main: 'Plus Jakarta Sans', system-ui, 'Segoe UI', Roboto, sans-serif;
	--font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

	--bg-image: url('/assets/images/35.jpg');
	--bg-deep: #04100b;
	--bg-tint: rgba(6, 32, 21, 0.86);

	--green: #3ddc84;
	--green-soft: #6ef2a5;
	--green-deep: #0d2c1d;
	--teal: #10634a;
	--teal-dark: #0a3a2c;

	--ink: #ffffff;
	--ink-soft: #b4c9bd;
	--ink-dim: #83a091;

	--panel: rgba(8, 30, 21, 0.58);
	--panel-strong: rgba(5, 22, 15, 0.86);
	--line: rgba(255, 255, 255, 0.12);
	--line-strong: rgba(61, 220, 132, 0.34);

	--up: #3ddc84;
	--boot: #ffb74d;
	--down: #ef5350;
	--discord: #5865f2;

	--radius: 14px;
	--radius-s: 9px;
	--shadow: 0 18px 44px rgba(0, 0, 0, 0.5);

	/* Hauteur de la barre du haut : elle sert de base au calcul des pleines pages. */
	--topbar: 68px;
	/* Largeur utile du contenu, partagée par les sections et le pied de page. */
	--wrap: 1280px;
}

* {
	scrollbar-color: rgba(110, 242, 165, 0.4) transparent;
	scrollbar-width: thin;
	box-sizing: border-box;
}

a { text-decoration: none; color: inherit; }
a:hover, a:focus { text-decoration: none; }

html, body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100vh;
}

html {
	overscroll-behavior: contain;
	user-select: none;
	font-family: var(--font-main);
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	position: relative;
	overflow: hidden;
	background-color: var(--bg-deep);
	color: var(--ink);
	line-height: 1.5;
}

/* Fond : image floutée en couche la plus basse, calque vert par-dessus. Le léger
   agrandissement évite que le flou laisse apparaître les bords de l'image. */
body::after {
	position: fixed;
	inset: 0;
	content: '';
	z-index: -2;
	background-image: var(--bg-image);
	background-size: cover;
	background-position: 50% 50%;
	filter: blur(26px) saturate(0.75) brightness(0.75);
	transform: scale(1.14);
}

body::before {
	position: fixed;
	inset: 0;
	content: '';
	z-index: -1;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(61, 220, 132, 0.14), transparent 62%),
		linear-gradient(180deg, rgba(4, 16, 11, 0.6), var(--bg-tint) 55%, rgba(3, 11, 8, 0.96));
}

h1, h2, h3, h4, p { margin: 0; padding: 0; font-weight: normal; }

/* Échelle typographique fluide : un même titre reste juste sur un portable comme sur un
   grand écran, sans point de rupture qui le ferait sauter d'une taille à l'autre. */
h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
h2 { font-size: clamp(21px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.018em; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }

p { line-height: 1.65; }

small { font-size: 13px; color: var(--ink-dim); }

button, input, select, textarea {
	font-family: inherit;
	font-size: 15px;
	color: var(--ink);
	border: none;
	outline: none;
}

button { cursor: pointer; font-weight: 600; }

::placeholder { color: var(--ink-dim); opacity: 1; }

::selection { background-color: rgba(61, 220, 132, 0.3); }

/* Repère de mise au point visible au clavier uniquement : la souris ne le déclenche pas. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--green);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ── Ossature ───────────────────────────────────────────────────────────────────────────── */

hframe {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100vh;
	max-height: 100vh;
}

hframe > topmenu {
	height: var(--topbar);
	min-height: var(--topbar);
	display: flex;
	align-items: center;
	padding: 0 26px;
	gap: 20px;
	background-color: rgba(4, 16, 11, 0.62);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--line);
	z-index: 20;
}

hframe > topmenu > span {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

hframe > topmenu > span:first-child { justify-content: flex-start; }
hframe > topmenu > span:last-child { justify-content: flex-end; gap: 12px; }

topmenu a[brand] {
	display: flex;
	align-items: center;
	gap: 10px;
}

topmenu a[brand] img { height: 27px; }

topmenu a[brand] b {
	font-weight: 800;
	letter-spacing: 3px;
	font-size: 14px;
	text-transform: uppercase;
	color: var(--green-soft);
}

/* Les entrées de navigation sont des pastilles : le survol remplit le fond au lieu de
   souligner, ce qui évite de faire bouger la ligne de base d'un pixel. */
topmenu > span[nav] > a {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 9px 15px;
	border-radius: 100px;
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-soft);
	transition: color .2s, background-color .2s;
}

topmenu > span[nav] > a:hover {
	color: var(--ink);
	background-color: rgba(61, 220, 132, 0.13);
}

topmenu > span[nav] > a[here] {
	color: var(--green-soft);
	background-color: rgba(61, 220, 132, 0.13);
}

topmenu > span:last-child > a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 100px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink-soft);
	border: 1px solid transparent;
	transition: color .2s, border-color .2s, background-color .2s;
}

topmenu > span:last-child > a:hover { color: var(--ink); border-color: var(--line); }

topmenu > span:last-child > a[cta] {
	border-color: var(--line-strong);
	background-image: linear-gradient(135deg, var(--teal), var(--teal-dark));
	color: var(--ink);
}

topmenu > span:last-child > a[cta]:hover {
	border-color: var(--green);
	box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.14);
}

topmenu glyph { font-size: 20px; }

wframe {
	display: flex;
	flex: 1;
	min-height: 0;
}

leftmenu {
	display: flex;
	flex-direction: column;
	width: 250px;
	min-width: 250px;
	padding: 22px 14px;
	gap: 4px;
	overflow-y: auto;
	background-color: rgba(4, 16, 11, 0.5);
	border-right: 1px solid var(--line);
}

/* Sans menu latéral, la colonne disparaît complètement : aucune gouttière fantôme. */
leftmenu:empty { display: none; }

leftmenu > a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 14px;
	border-radius: var(--radius-s);
	color: var(--ink-soft);
	font-size: 14.5px;
	font-weight: 500;
	transition: background-color .2s, color .2s;
}

leftmenu > a:hover {
	background-color: rgba(61, 220, 132, 0.13);
	color: var(--ink);
}

leftmenu > a > glyph { font-size: 21px; }

leftmenu > lsep {
	height: 1px;
	margin: 10px 14px;
	background-color: var(--line);
}

content {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-behavior: smooth;
}

/* Section ordinaire : une colonne centrée, respiration modérée. C'est la mise en page de
   toutes les pages de travail (boutique, parc, espace client, administration). */
content > section {
	display: block;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 36px 28px;
}

/* ── Pages « panneau » ──────────────────────────────────────────────────────────────────── */
/*  Une <section band> occupe toute la largeur ET au moins tout l'écran : on ne découvre
    qu'un sujet à la fois, en descendant. L'alternance de teinte marque la frontière entre
    deux panneaux sans qu'aucun trait ne soit nécessaire.                                    */

content > section[band] {
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: none;
	min-height: calc(100vh - var(--topbar));
	padding: 96px 28px;
	background-color: rgba(6, 20, 14, 0.62);
	border-top: 1px solid var(--line);
}

content > section[band][alt] { background-color: rgba(4, 14, 10, 0.74); }

/* La bande est pleine largeur, son contenu ne l'est pas : <wrap> ramène le texte à une
   longueur de ligne lisible et aligne tous les panneaux entre eux. */
section[band] > wrap {
	display: flex;
	flex-direction: column;
	gap: 28px;
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
}

/* En-tête de panneau : surtitre, titre, chapeau. */
bandhead {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 720px;
}

bandhead > over {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--green-soft);
}

bandhead > over::before {
	content: '';
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background-color: var(--green);
}

bandhead > p { font-size: 16.5px; color: var(--ink-soft); }

bandhead > a {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	margin-top: 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--green-soft);
	transition: gap .2s;
}

bandhead > a:hover { gap: 11px; }

/* Apparition au défilement. L'attribut `reveal` est posé par core.js : sans JavaScript, le
   sélecteur ne correspond à rien et tout le contenu reste visible d'emblée. La règle est en
   outre conditionnée aux préférences d'animation du système.

   Ce sont les enfants directs de <wrap> qui montent — aucun attribut n'est donc à écrire
   dans les gabarits, et un bloc produit par le serveur (la grille des univers) en profite
   sans que son générateur ait à le savoir. */
@media (prefers-reduced-motion: no-preference) {
	content[reveal] section[band] > wrap > * {
		opacity: 0;
		transform: translateY(26px);
		transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
	}
	content[reveal] section[band] > wrap > [shown] {
		opacity: 1;
		transform: none;
	}
}

/* ── Impression (facture) ───────────────────────────────────────────────────────────────── */

@media print {
	topmenu, leftmenu, footer, .noprint { display: none !important; }
	hframe, wframe, content { display: block !important; overflow: visible !important; height: auto !important; }
	html, body { height: auto !important; overflow: visible !important; background: #fff !important; color: #000 !important; user-select: auto !important; }
	body::before, body::after { display: none !important; }
	facture, facture * { color: #000 !important; background: transparent !important; border-color: #999 !important; }
}

/* ── Adaptatif ──────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
	:root { --topbar: 60px; }
	hframe > topmenu { padding: 0 14px; gap: 10px; }
	topmenu > span[nav] { gap: 2px; }
	topmenu > span[nav] > a { font-size: 12px; padding: 8px 11px; letter-spacing: 0.03em; }
	leftmenu { width: 68px; min-width: 68px; padding: 18px 8px; }
	leftmenu > a { justify-content: center; padding: 12px 0; font-size: 0; gap: 0; }
	leftmenu > a > glyph { font-size: 23px; }
	content > section { padding: 24px 16px; }
	content > section[band] { padding: 72px 18px; min-height: 0; }
	section[band] > wrap { gap: 22px; }
}

@media (max-width: 640px) {
	topmenu a[brand] b { display: none; }
	topmenu > span[nav] { display: none; }
	topmenu > span:last-child > a { padding: 9px 13px; font-size: 13px; }
}
