/* ==========================================================================
   ankori.fr — portail

   Thème sombre, sobre, volontairement différent de celui du serveur de jeu :
   l'accueil est un sommaire, pas une vitrine de plus.

   Aucune dépendance : ni police distante, ni CDN, ni script tiers.
   ========================================================================== */

:root {
	--fond:      #0a0d14;
	--fond-2:    #0f141f;
	--surface:   rgba(255, 255, 255, .035);
	--surface-2: rgba(255, 255, 255, .06);
	--bord:      rgba(160, 190, 240, .12);
	--bord-fort: rgba(160, 190, 240, .30);

	--texte:   #e8ecf6;
	--texte-2: #a3b0c9;
	--texte-3: #6f7d95;

	--accent:  #6fb3ff;
	--vert:    #4fd18b;
	--rouge:   #ff7a7a;
	--or:      #f0c46a;

	--r-s: 8px;
	--r-m: 14px;
	--r-l: 22px;

	--police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
	          Arial, "Noto Sans", sans-serif;

	--largeur: 1080px;
	--gouttiere: clamp(18px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.portail {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--police);
	font-size: 16px;
	line-height: 1.6;
	color: var(--texte);
	background: var(--fond);
	/* Deux halos très diffus : la page n'est pas un aplat noir, mais rien
	   ne bouge et rien ne se charge. */
	background-image:
		radial-gradient(900px 520px at 12% -8%,  rgba(111, 179, 255, .10), transparent 62%),
		radial-gradient(760px 460px at 92% 4%,   rgba(155, 140, 255, .08), transparent 60%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* -- En-tête --------------------------------------------------------------- */

.tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	max-width: var(--largeur);
	margin: 0 auto;
	padding: 22px var(--gouttiere) 0;
}

.marque {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--texte);
	font-weight: 600;
	letter-spacing: .01em;
}
.marque:hover { text-decoration: none; }

.marque-point {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px rgba(111, 179, 255, .16);
}

.tete-action {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.lien-bouton {
	display: inline-block;
	padding: 8px 15px;
	border: 1px solid var(--bord);
	border-radius: 999px;
	background: var(--surface);
	color: var(--texte-2);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .15s, color .15s, background .15s;
}
.lien-bouton:hover {
	border-color: var(--bord-fort);
	background: var(--surface-2);
	color: var(--texte);
	text-decoration: none;
}

.pastille {
	font-size: 13px;
	color: var(--texte-3);
}
.pastille--ouvert::before {
	content: "";
	display: inline-block;
	width: 7px; height: 7px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--vert);
	vertical-align: middle;
}

/* -- Corps ----------------------------------------------------------------- */

.corps {
	flex: 1;
	width: 100%;
	max-width: var(--largeur);
	margin: 0 auto;
	padding: clamp(40px, 9vw, 80px) var(--gouttiere) 64px;
}

.entete { margin-bottom: clamp(32px, 6vw, 52px); }

.entete h1 {
	margin: 0 0 10px;
	font-size: clamp(34px, 6.5vw, 54px);
	line-height: 1.08;
	letter-spacing: -.02em;
	font-weight: 650;
}

.sous-titre {
	margin: 0;
	max-width: 56ch;
	font-size: clamp(16px, 2.2vw, 19px);
	color: var(--texte-2);
}

.vide { color: var(--texte-3); }

/* -- Groupes --------------------------------------------------------------- */

.groupe { margin-bottom: clamp(34px, 5vw, 54px); }

.groupe-titre {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 16px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--texte-3);
}
/* Un filet qui court jusqu'au bord : sépare les sections sans une bordure de
   plus, et laisse le titre respirer. */
.groupe-titre::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--bord);
}

/* -- Grille de services ---------------------------------------------------- */

.grille {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.carte {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--bord);
	border-radius: var(--r-l);
	background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, .012));
	transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.carte:hover {
	border-color: var(--bord-fort);
	background: linear-gradient(180deg, var(--surface-2), rgba(255, 255, 255, .02));
	transform: translateY(-2px);
}

.carte--prive { border-color: rgba(240, 196, 106, .26); }
.carte--prive:hover { border-color: rgba(240, 196, 106, .55); }

.carte-lien {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
}
.carte-lien:hover { text-decoration: none; }

/* -- Vignette -------------------------------------------------------------- */

.carte-vignette {
	position: relative;
	display: block;
	aspect-ratio: 8 / 5;
	overflow: hidden;
	background: var(--fond-2);
	border-bottom: 1px solid var(--bord);
}

.carte-vignette img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;   /* le haut d'une page est ce qui l'identifie */
	transition: transform .35s ease, opacity .2s ease;
}
.carte:hover .carte-vignette img { transform: scale(1.035); }

/* Voile discret : les captures sont claires, le portail est sombre. Sans lui
   la grille clignote. Il s'estompe au survol. */
.carte-vignette::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(10, 13, 20, .30), rgba(10, 13, 20, .58));
	transition: opacity .25s ease;
}
.carte:hover .carte-vignette::before { opacity: .45; }

/* Repli sans capture : un dégradé et l'initiale du service. */
.carte-vignette--repli {
	background:
		radial-gradient(120% 120% at 30% 0%, rgba(111, 179, 255, .22), transparent 60%),
		linear-gradient(160deg, #141b29, #0c1119);
}
.carte-vignette--repli::after {
	content: attr(data-initiale);
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 64px;
	font-weight: 700;
	color: rgba(232, 236, 246, .13);
	letter-spacing: -.03em;
}

.carte-haut {
	position: absolute;
	z-index: 2;
	top: 10px; left: 12px; right: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 20px;
}

.marque-etiquette {
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(5, 8, 14, .62);
	backdrop-filter: blur(3px);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--texte-2);
}
.carte--prive .marque-etiquette { color: var(--or); }

/* -- Corps de la carte ----------------------------------------------------- */

.carte-corps {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	padding: 15px 17px 17px;
}

.carte-titre {
	margin: 0;
	font-size: 17px;
	font-weight: 620;
	letter-spacing: -.01em;
}

.carte-texte {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--texte-2);
}

/* Pastille d'état, remplie après coup par le script de l'accueil. */
.etat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(5, 8, 14, .62);
	backdrop-filter: blur(3px);
	font-size: 11px;
	color: var(--texte-3);
}
.etat-point {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--texte-3);
}
.etat--ok  .etat-point { background: var(--vert); box-shadow: 0 0 0 3px rgba(79, 209, 139, .16); }
.etat--ok  .etat-mot   { color: var(--vert); }
.etat--ko  .etat-point { background: var(--rouge); }
.etat--ko  .etat-mot   { color: var(--rouge); }

.note-prive {
	margin-top: 34px;
	font-size: 14px;
	color: var(--texte-3);
}

/* -- Connexion ------------------------------------------------------------- */

.connexion {
	max-width: 380px;
	margin: clamp(20px, 8vh, 70px) auto;
}

.connexion h1 {
	margin: 0 0 8px;
	font-size: 30px;
	letter-spacing: -.02em;
}

.connexion .sous-titre { margin-bottom: 26px; font-size: 15px; }

.connexion form { display: flex; flex-direction: column; gap: 10px; }

.connexion label {
	font-size: 13px;
	color: var(--texte-2);
}

.connexion input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--bord);
	border-radius: var(--r-m);
	background: rgba(0, 0, 0, .30);
	color: var(--texte);
	font: inherit;
}
.connexion input[type="password"]:focus {
	border-color: var(--bord-fort);
	outline: none;
	box-shadow: 0 0 0 3px rgba(111, 179, 255, .16);
}

.bouton {
	margin-top: 6px;
	padding: 12px 18px;
	border: 0;
	border-radius: var(--r-m);
	background: var(--accent);
	color: #06101d;
	font: inherit;
	font-weight: 620;
	cursor: pointer;
	transition: filter .15s;
}
.bouton:hover { filter: brightness(1.08); }
.bouton:disabled { opacity: .5; cursor: not-allowed; filter: none; }

.alerte {
	margin: 0 0 18px;
	padding: 11px 14px;
	border: 1px solid rgba(255, 122, 122, .35);
	border-radius: var(--r-m);
	background: rgba(255, 122, 122, .09);
	color: #ffc9c9;
	font-size: 14px;
}

.reussite {
	margin: 0 0 18px;
	padding: 11px 14px;
	border: 1px solid rgba(79, 209, 139, .35);
	border-radius: var(--r-m);
	background: rgba(79, 209, 139, .09);
	color: #b6f2d2;
	font-size: 14px;
}

.retour { margin-top: 24px; font-size: 14px; }

/* -- Pied ------------------------------------------------------------------ */

.pied {
	width: 100%;
	max-width: var(--largeur);
	margin: 0 auto;
	padding: 22px var(--gouttiere) 30px;
	border-top: 1px solid var(--bord);
	font-size: 13px;
	color: var(--texte-3);
}

/* -- Préférences d'accessibilité ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
