/* ==========================================================================
   Quiz Challenge — feuille de style du site
   Palette et typographie reprises de l'application.

   VERSION 4 — À INCRÉMENTER À CHAQUE MODIFICATION DE CE FICHIER.
   Le .htaccess sert ce fichier en `immutable` pendant un an : les
   navigateurs ne le revalident donc jamais. Le seul moyen de leur faire
   reprendre une nouvelle version est de changer l'URL. Après édition :
   bumper le numéro ci-dessus, puis le `?v=` des trois pages —
   index.html, politique-de-confidentialite/index.html, 404.html.
   Sans ça, les visiteurs déjà venus garderont l'ancien style.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Polices — deux fichiers variables, une seule requête par famille.
   -------------------------------------------------------------------------- */
@font-face {
	font-family: 'Dosis';
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url('../fonts/dosis.woff2') format('woff2');
}

@font-face {
	font-family: 'Host Grotesk';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/host-grotesk.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
	--ground: #eef9fa;
	--surface: #ffffff;
	--ink: #0f4448;
	--ink-soft: #3d6c70;
	--cyan: #4dcfda;
	--cyan-deep: #126d76; /* 5.63:1 sur le fond clair — lisible en petit corps */
	--rose: #fc4c86;
	--rose-deep: #c81e57;
	--jaune: #fad141;
	--line: rgba(15, 68, 72, 0.14);
	--shadow-card: 0 20px 44px -26px rgba(15, 68, 72, 0.5);
	--shadow-device: drop-shadow(0 30px 40px rgba(15, 68, 72, 0.28));
	/* Sur fond clair le badge se détache seul : une ombre suffit à le poser. */
	--badge-filter: drop-shadow(0 10px 18px rgba(15, 68, 72, 0.26));
	--blob-cyan: rgba(77, 207, 218, 0.55);
	--blob-rose: rgba(252, 76, 134, 0.22);
	--blob-jaune: rgba(250, 209, 65, 0.3);

	--display: 'Dosis', 'Trebuchet MS', sans-serif;
	--body: 'Host Grotesk', 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ground: #06242a;
		--surface: #0d353b;
		--ink: #e2f6f7;
		--ink-soft: #92bcbf;
		--cyan: #62dbe5;
		--cyan-deep: #8ee8ef;
		--rose: #ff6d9c;
		--rose-deep: #ff9ab9;
		--jaune: #fbd979;
		--line: rgba(226, 246, 247, 0.16);
		--shadow-card: 0 20px 44px -26px rgba(0, 0, 0, 0.8);
		--shadow-device: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55));
		/* Quatre ombres décalées d'1px dessinent un filet qui épouse la
		   silhouette réelle du badge, coins Apple compris. */
		--badge-filter:
			drop-shadow(1px 0 0 rgba(226, 246, 247, 0.42))
			drop-shadow(-1px 0 0 rgba(226, 246, 247, 0.42))
			drop-shadow(0 1px 0 rgba(226, 246, 247, 0.42))
			drop-shadow(0 -1px 0 rgba(226, 246, 247, 0.42))
			drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
		--blob-cyan: rgba(77, 207, 218, 0.22);
		--blob-rose: rgba(252, 76, 134, 0.16);
		--blob-jaune: rgba(250, 209, 65, 0.12);
	}
}

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

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

body {
	margin: 0;
	min-height: 100svh;
	background-color: var(--ground);
	background-image:
		radial-gradient(60vw 52vw at 88% -8%, var(--blob-cyan), transparent 62%),
		radial-gradient(48vw 40vw at 6% 96%, var(--blob-rose), transparent 64%),
		radial-gradient(28vw 26vw at 96% 58%, var(--blob-jaune), transparent 66%);
	background-repeat: no-repeat;
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	font-weight: 300;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.page {
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: clamp(16px, 5vw, 64px);
	padding-block: clamp(36px, 6vw, 72px) clamp(40px, 6vw, 80px);
	display: flex;
	flex-direction: column;
	gap: clamp(56px, 9vw, 128px);
}

a {
	color: inherit;
}

a:focus-visible,
:focus-visible {
	outline: 3px solid var(--rose);
	outline-offset: 4px;
	border-radius: 4px;
}

img {
	max-width: 100%;
}

.label {
	font-family: var(--body);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(36px, 6vw, 56px);
	align-items: center;
}

@media (min-width: 900px) {
	.hero {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		gap: clamp(32px, 4vw, 64px);
	}
}

.hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
	max-width: 34rem;
}

/* L'icône et le titre forment un bloc : c'est l'icône qui porte le nom du
   jeu, elle doit donc se lire avec la promesse, pas à distance. Ses coins
   arrondis sont déjà dans l'alpha du fichier — pas de border-radius. */
.hero__lockup {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(14px, 2vw, 20px);
}

.hero__brand {
	width: clamp(56px, 7vw, 72px);
	height: auto;
}

/* Le nom du jeu est porté par l'icône : le titre est tout entier consacré
   à la promesse. */
.hero__title {
	margin: 0;
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(2.6rem, 7vw, 4.8rem);
	line-height: 0.94;
	letter-spacing: -0.025em;
	text-wrap: balance;
	color: var(--ink);
}

/* Le mot « décalé » est décalé : le jeu de mots du titre, rendu visible. */
.hero__shift {
	display: inline-block;
	color: var(--rose);
	transform: translateY(0.15em) rotate(-2.6deg);
}

.hero__lede {
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	line-height: 1.5;
	margin: 0;
	max-width: 30ch;
	color: var(--ink);
}

.hero__facts {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ink-soft);
}

/* Les badges officiels sont posés à même le fond. Le filtre leur rend une
   silhouette sans les encadrer (voir --badge-filter). */
.stores {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.stores a {
	display: inline-flex;
	line-height: 0;
	border-radius: 8px;
	filter: var(--badge-filter);
	transition: transform 0.25s ease;
}

.stores a:hover {
	transform: translateY(-3px);
}

.stores img {
	height: 52px;
	width: auto;
}

.hero__device {
	justify-self: center;
	line-height: 0;
}

.hero__device img {
	width: min(330px, 78vw);
	height: auto;
	filter: var(--shadow-device);
	transform: rotate(-3deg);
}

@media (min-width: 900px) {
	.hero__device img {
		width: min(400px, 38vw);
	}
}

/* --------------------------------------------------------------------------
   Le mécanisme, démontré
   -------------------------------------------------------------------------- */
.turns {
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 4vw, 44px);
}

.turns__head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 46ch;
}

.turns__title {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(1.75rem, 3.6vw, 2.6rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
}

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

@media (min-width: 860px) {
	.turns__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
		align-items: start;
	}

	/* L'escalier : chaque tour descend d'un cran sur le précédent. */
	.turns__list > :nth-child(2) {
		margin-top: 36px;
	}

	.turns__list > :nth-child(3) {
		margin-top: 72px;
	}
}

.turn {
	background: var(--surface);
	border-radius: 26px;
	padding: 24px;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.turn__no {
	font-family: var(--display);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cyan-deep);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 9px;
}

.turn__no::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--cyan);
	flex: none;
}

.slot {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.slot--answer {
	border-top: 1px solid var(--line);
	padding-top: 18px;
}

.slot__question {
	font-family: var(--display);
	font-weight: 600;
	font-size: 1.22rem;
	line-height: 1.22;
	margin: 0;
	color: var(--ink);
	text-wrap: pretty;
}

.slot__answer {
	font-weight: 600;
	font-size: 1.22rem;
	line-height: 1.22;
	margin: 0;
	color: var(--rose-deep);
}

.slot__answer--none {
	font-weight: 300;
	font-size: 1rem;
	color: var(--ink-soft);
	font-style: italic;
}

/* La flèche pointe vers le tour dont cette réponse est issue : en haut à
   gauche dans les deux dispositions, grâce à l'escalier. */
.slot__from {
	color: var(--rose);
	font-weight: 600;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.turns__foot {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ink-soft);
	max-width: 48ch;
}

/* --------------------------------------------------------------------------
   Pages de contenu (politique de confidentialité, 404)
   -------------------------------------------------------------------------- */
.article {
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 4vw, 40px);
}

.article__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(14px, 2vw, 20px);
}

.article__brand {
	width: clamp(56px, 7vw, 72px);
	height: auto;
}

.article__title {
	margin: 0;
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(2.1rem, 5vw, 3.4rem);
	line-height: 0.98;
	letter-spacing: -0.025em;
	text-wrap: balance;
	color: var(--ink);
}

.article__body {
	max-width: 62ch;
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}

.article__body p {
	margin: 0;
}

.article__body h2 {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(1.3rem, 2.4vw, 1.6rem);
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: clamp(18px, 2.4vw, 30px) 0 0;
	color: var(--ink);
	text-wrap: balance;
}

.article__body ul {
	margin: 0;
	padding-left: 1.15em;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.article__body li::marker {
	color: var(--cyan-deep);
}

/* L'essentiel en tête de page : le seul bloc détaché du document. */
.article__summary {
	background: var(--surface);
	border-radius: 22px;
	padding: clamp(20px, 3vw, 28px);
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.article__summary p {
	margin: 0;
}

.article__contact {
	font-style: normal;
	line-height: 1.7;
}

.article__note {
	font-size: 0.9rem;
	color: var(--ink-soft);
}

.article__back {
	align-self: flex-start;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1rem;
	color: var(--cyan-deep);
	text-decoration: none;
	border-bottom: 2px solid var(--line);
	padding-bottom: 2px;
	transition: border-color 0.2s;
}

.article__back:hover {
	border-color: currentColor;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.colophon {
	border-top: 1px solid var(--line);
	padding-top: 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.85rem;
	color: var(--ink-soft);
}

.colophon p {
	margin: 0;
}

.colophon nav {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.colophon a {
	text-decoration: none;
	border-bottom: 1px solid var(--line);
	padding-bottom: 1px;
}

.colophon a:hover {
	border-color: currentColor;
	color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}
