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

   VERSION 7 — À 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=` de TOUTES les pages qui
   chargent ce fichier. Pour n’en oublier aucune :
   grep -rl "style.css?v=" --include="*.html" public_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;
}

/* L'emplacement garde sa taille quand le téléphone part jouer au centre de
   l'écran (easter egg, voir egg.css et egg.js). */
.hero__device {
	justify-self: center;
	line-height: 0;
}

/* L'ombre est sur .phone et la rotation sur .phone__body : réunies sur le
   même élément, Safari rogne parfois l'ombre au rectangle de l'image. */
.phone {
	position: relative;
	width: min(330px, 78vw);
	filter: var(--shadow-device);
}

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

.phone__body {
	position: relative;
	transform: rotate(-3deg);
}

.phone img {
	display: block;
	width: 100%;
	height: auto;
}

/* Zone cliquable posée sur le bouton « Jouer » du mockup (788×1610 : bouton
   en 178,1 ; 906,8, 431,9×119,8). Créée par egg.js : sans JS, rien à cliquer. */
.phone__play {
	position: absolute;
	left: 22.6%;
	top: 56.32%;
	width: 54.81%;
	height: 7.44%;
	border: 0;
	padding: 0;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	transition: transform 0.15s ease;
}

.phone__play:focus-visible {
	border-radius: 999px;
}

/* Un halo discret, de temps en temps, pour donner envie de cliquer. */
.phone__play::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	animation: nudge 3.2s ease-out 2s infinite;
}

.phone__play:hover {
	transform: scale(1.04);
}

.phone__play:active {
	transform: scale(0.96);
}

@keyframes nudge {
	0% { box-shadow: 0 0 0 0 rgba(252, 76, 134, 0.6); }
	40%, 100% { box-shadow: 0 0 0 16px rgba(252, 76, 134, 0); }
}

/* --------------------------------------------------------------------------
   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);
}

/* Réseaux sociaux : pictos seuls, discrets, calés à droite après les liens. */
.colophon p {
	margin-right: auto;
}

.colophon__social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 2px;
}

.colophon__social a {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 0;
	padding: 0;
	opacity: 0.7;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.colophon__social a:hover,
.colophon__social a:focus-visible {
	opacity: 1;
}

.colophon__social svg {
	fill: currentColor;
}

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

/* --------------------------------------------------------------------------
   Accueil : sections de contenu (règles, thèmes, origine, FAQ, appel final)
   -------------------------------------------------------------------------- */
.rules,
.themes,
.faq {
	display: flex;
	flex-direction: column;
	gap: clamp(24px, 3.4vw, 36px);
}

.section-head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 52ch;
}

/* Même registre que .turns__title, pour toutes les nouvelles sections. */
.section-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;
}

.section-lede {
	margin: 0;
	color: var(--ink-soft);
	text-wrap: pretty;
}

/* Les règles : un chiffre du jeu en tête de chaque carte. */
.rules__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

@media (min-width: 620px) {
	.rules__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1060px) {
	.rules__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}
}

.rule {
	background: var(--surface);
	border-radius: 22px;
	padding: 22px;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Pictos dans une tuile aux coins arrondis, comme l'icône de l'app :
   couleurs pleines du jeu, picto couleur du fond (encre sur le jaune). */
.rule__icon {
	--tile: var(--cyan);
	width: 52px;
	height: 52px;
	border-radius: 16px;
	display: grid;
	place-items: center;
	background: var(--tile);
	color: var(--ground);
	box-shadow: inset 0 -4px 0 rgba(15, 68, 72, 0.14);
	transform: rotate(-3deg);
}

.rule__icon--rose {
	--tile: var(--rose);
}

.rule__icon--jaune {
	--tile: var(--jaune);
	color: #0f4448;
}

.rule__icon svg {
	display: block;
}

.rule__name {
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.2;
	margin: 4px 0 0;
	color: var(--ink);
}

.rule p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ink-soft);
}

/* Les thèmes : des étiquettes comme celles de l'app (MUSIQUE, CINÉMA…). */
.themes__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.theme {
	font-family: var(--display);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 8px 16px;
	border-radius: 999px;
	color: var(--ink);
}

.theme--cyan {
	background: var(--blob-cyan);
}

.theme--rose {
	background: var(--blob-rose);
}

.theme--jaune {
	background: var(--blob-jaune);
}

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

/* L'origine : le seul bloc de texte suivi, dans une carte unique. */
.origin__copy {
	background: var(--surface);
	border-radius: 26px;
	padding: clamp(24px, 4vw, 44px);
	box-shadow: var(--shadow-card);
	max-width: 46rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.origin__copy p:not(.label) {
	margin: 0;
	max-width: 62ch;
}

.origin__link {
	font-family: var(--display);
	font-weight: 700;
	color: var(--cyan-deep);
	text-decoration: none;
	border-bottom: 2px solid var(--line);
	padding-bottom: 2px;
	transition: border-color 0.2s;
}

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

/* FAQ : des <details> natifs, lisibles sans JS et par les robots. */
.faq__list {
	display: flex;
	flex-direction: column;
	max-width: 52rem;
	border-top: 1px solid var(--line);
}

.faq__item {
	border-bottom: 1px solid var(--line);
}

.faq__item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 2px;
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(1.05rem, 1.6vw, 1.2rem);
	line-height: 1.25;
}

.faq__item summary::-webkit-details-marker {
	display: none;
}

.faq__item summary::after {
	content: "+";
	flex: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--rose);
	transition: transform 0.2s ease;
}

.faq__item[open] summary::after {
	transform: rotate(45deg);
}

.faq__item p {
	margin: 0;
	padding: 0 2px 20px;
	max-width: 62ch;
	color: var(--ink-soft);
}

/* L'appel final reprend la question de /play. */
.closing {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	text-align: center;
}

.closing__title {
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1;
	letter-spacing: -0.025em;
	margin: 0;
	text-wrap: balance;
}

.closing .stores {
	justify-content: center;
}
