/* Accueil : plateau de tirage — direction « moderne, sobre, clair » (neutres froids, un seul accent indigo).
   Tout est limité à body.page-home : la page résultat et les pages annexes gardent leur habillage.
   Les cartes sont positionnées par assets/js/tarot.js (transform inline) ; ce fichier gère l'habillage. */

/* PROVISOIRE : police du logo (supprimée quand le logo sera une image SVG aux tracés convertis) */
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces.woff2') format('woff2'); font-weight: 700 900; font-display: block; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-ext.woff2') format('woff2'); font-weight: 700 900; font-display: block; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-vietnamese.woff2') format('woff2'); font-weight: 700 900; font-display: block; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }



body.page-home {
	--c-bg: #f5f6f8;
	--c-surface: #ffffff;
	--c-ink: #171e33;
	--c-ink-soft: #5c6678;
	--c-primary: #1b2547;                /* bleu nuit (bandeau du logo) */
	--c-primary-dark: #111a38;
	--c-accent: #b08d57;                 /* or */
	--c-gold-light: #d9b872;
	--c-gold-ink: #8a6a37;               /* or foncé pour le texte (contraste sur blanc) */
	--c-line: #e1e5ec;
	--c-primary-rgb: 27, 37, 71;
	--c-shadow-rgb: 18, 24, 48;
	--c-scrim-rgb: 246, 247, 250;
	--c-page-top: #fff;
	--c-stage-top: #fff;
	--c-stage-bot: #f9fafc;
	--c-dash: #b4bccb;                   /* contours pointillés des emplacements */
	--c-num: #cfd5df;                    /* numéros des emplacements vides */
	--back-filter: none;                 /* teinte du dos des cartes (palettes d'essai) */
	--radius: 14px;
	--shadow: 0 1px 2px rgba(var(--c-shadow-rgb), .05), 0 10px 28px rgba(var(--c-shadow-rgb), .06);
	--font-title: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	background: linear-gradient(var(--c-page-top) 0, var(--c-bg) 460px);
}

/* ---------- En-tête et pied de page compacts ---------- */
.page-home .site-header { display: none; }              /* le logo est dans le plateau (intro) */
.page-home .site-main { max-width: 1120px; padding-top: 1.1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


.page-home .btn {
	background: var(--c-primary); border-radius: 10px; font-weight: 600;
	box-shadow: 0 1px 2px rgba(var(--c-shadow-rgb), .12), 0 6px 16px rgba(var(--c-primary-rgb), .22);
}
.page-home .btn:hover { background: var(--c-primary-dark); transform: translateY(-1px); }

/* ---------- Consigne de l'étape (en haut du plateau) ---------- */
.table { position: relative; text-align: center; }

.stage__guide { position: absolute; top: 0; left: 0; right: 0; height: var(--guide-h); z-index: 5; padding: 28px 130px 0; display: flex; flex-direction: column; justify-content: center; text-align: center; pointer-events: none; transition: opacity .35s ease, top .6s cubic-bezier(.4, 0, .2, 1), height .6s cubic-bezier(.4, 0, .2, 1), padding .6s cubic-bezier(.4, 0, .2, 1); }
.stage.is-intro .stage__guide, .stage.is-revealing .stage__guide { opacity: 0; }

.step-title { margin: 0; min-height: 1.2em; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.step-title__text { display: inline-block; color: var(--c-ink); }
.step-title .w {
	display: inline-block; margin: 0 .13em;
	animation: wordIn .7s cubic-bezier(.2, .8, .2, 1) both;
	animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes wordIn { from { opacity: 0; transform: translateY(.4em); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }

.table__hint { min-height: 1.3em; margin: 0 auto; max-width: 34em; color: var(--c-primary); font-family: 'Fraunces', Georgia, 'Times New Roman', serif; font-weight: 800; line-height: 1.22; letter-spacing: -.01em; font-size: clamp(1.25rem, 2.5vw, 1.7rem); text-wrap: balance; }
.table__hint .ln { display: block; }
.table__hint .w { display: inline-block; animation: wordIn .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.table__hint.is-new { animation: hintIn .5s .2s ease both; }
@keyframes hintIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* « Recommencer » : coin haut-droit du plateau (au-dessus du voile) */
.restart {
	position: absolute; right: 12px; top: 12px; z-index: 130; display: inline-flex; align-items: center; gap: .4rem;
	border: 1px solid var(--c-line); background: #fff; color: var(--c-ink-soft);
	border-radius: 8px; padding: .35rem .8rem; font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer;
}
.restart:hover { color: var(--c-primary-dark); border-color: var(--c-primary); }
.restart[hidden] { display: none; }

/* ---------- Logo (intro) : apparaît au centre du plateau, puis se range dans le coin ---------- */
.brand {
	position: absolute; z-index: 6; left: 50%; top: 50%; translate: -50% -50%; transform-origin: 0 0; scale: 1;
	display: block; white-space: nowrap; text-decoration: none; pointer-events: none;
	line-height: 0; border-radius: 18px; box-shadow: 0 10px 30px rgba(var(--c-shadow-rgb), .22);
	animation: brandIn .55s cubic-bezier(.2, .8, .2, 1) both;
	transition: left .6s cubic-bezier(.4, 0, .2, 1), top .6s cubic-bezier(.4, 0, .2, 1), translate .6s cubic-bezier(.4, 0, .2, 1), scale .6s cubic-bezier(.4, 0, .2, 1);
}
.stage { --logo-w: clamp(280px, 52vw, 460px); }
.brand svg, .brand img { display: block; width: var(--logo-w); height: auto; }
.stage.is-docked .brand { left: 14px; top: 12px; translate: 0 0; scale: .24; pointer-events: auto; box-shadow: 0 6px 16px rgba(var(--c-shadow-rgb), .18); }
@keyframes brandIn { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }
.stage__tagline {
	position: absolute; z-index: 6; left: 50%; top: calc(50% + var(--logo-w) * .1413 + 22px); translate: -50% 0; width: max-content; max-width: 92%; margin: 0; text-align: center;
	font-size: clamp(1rem, 2.2vw, 1.3rem); font-weight: 500; letter-spacing: .01em; color: var(--c-ink-soft); pointer-events: none;
	animation: tagIn .7s .25s cubic-bezier(.2, .8, .2, 1) backwards; transition: opacity .3s ease;
}
/* logo rangé : le texte disparaît à coup sûr (animation d'entrée coupée, sinon elle peut encore piloter l'opacité) */
.stage.is-docked .stage__tagline { animation: none; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; }
@keyframes tagIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Plateau : emplacements | jeu | emplacements ---------- */
.board {
	--board-h: clamp(400px, calc(100svh - 210px), 580px);
	--sw: clamp(46px, calc((var(--board-h) / 2 - 36px) * 163 / 300), 92px);
	display: grid; align-items: center; justify-items: center;
	--col: 0px;                                          /* colonnes des emplacements : fermées avant le tirage */
	grid-template-columns: var(--col) minmax(0, 1fr) var(--col);
	grid-template-rows: 1fr 1fr; column-gap: 0; overflow-x: clip;
	margin-inline: auto; max-width: 1200px;
	transition: grid-template-columns .6s cubic-bezier(.4, 0, .2, 1), grid-template-rows .6s cubic-bezier(.4, 0, .2, 1), max-width .6s cubic-bezier(.4, 0, .2, 1), height .6s cubic-bezier(.4, 0, .2, 1);
	height: var(--board-h);
}

.board.has-slots { --col: calc(var(--sw) + clamp(24px, 3vw, 40px)); }
.slots { display: contents; list-style: none; padding: 0; margin: 0; counter-reset: slot; }
.slot:nth-child(1) { grid-column: 1; grid-row: 1; }
.slot:nth-child(2) { grid-column: 1; grid-row: 2; }
.slot:nth-child(3) { grid-column: 3; grid-row: 1; }
.slot:nth-child(4) { grid-column: 3; grid-row: 2; }

/* ---------- Scène (le jeu) ---------- */
.stage {
	grid-column: 2; grid-row: 1 / 3; position: relative; width: 100%; height: 100%; min-height: 0;
	--guide-h: 110px;
	overflow: hidden; contain: layout;
	background: linear-gradient(var(--c-stage-top), var(--c-stage-bot)); border: 1px solid var(--c-line); border-radius: 18px; box-shadow: var(--shadow);
}

.deck { --cw: 90px; position: absolute; left: 0; right: 0; bottom: 0; top: var(--guide-h); transition: opacity .35s ease, top .6s cubic-bezier(.4, 0, .2, 1); }
.stage.is-intro .deck { opacity: 0; }

.card {
	position: absolute; left: 50%; top: 50%;
	width: var(--cw); height: calc(var(--cw) * 300 / 163);
	margin: calc(var(--cw) * -150 / 163) 0 0 calc(var(--cw) / -2);
	padding: 0; border: 0; background: none;
	cursor: default; pointer-events: none;
	-webkit-tap-highlight-color: transparent;
	will-change: transform;
	transform-origin: 50% 50%;
	filter: drop-shadow(0 1px 2px rgba(var(--c-shadow-rgb), .14));
}
.card img { display: block; width: 100%; height: 100%; border-radius: 8px; user-select: none; -webkit-user-drag: none; filter: var(--back-filter); }
.bigcard .flipcard__face--back { filter: var(--back-filter); }

/* Interactif (idle, couper, tirer) : survol = la carte se décale (propriété `translate`, indépendante du transform JS) */
.stage.is-interactive .card { pointer-events: auto; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .stage.is-interactive .card:hover { translate: calc(var(--ux, 0) * 14px) calc(var(--uy, -1) * 14px); z-index: 60 !important; } }
.card:focus-visible { translate: calc(var(--ux, 0) * 14px) calc(var(--uy, -1) * 14px); z-index: 60 !important; }
.card:focus-visible { outline: none; }
.card:focus-visible img { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.card.is-picked { opacity: 0; pointer-events: none !important; }
.stage.is-collapsed .card:not(.is-picked) { opacity: 0; transition: opacity .6s ease !important; }
/* Pendant la présentation d'une carte : voile uniforme sur le jeu (les cartes restent opaques dessous, pas de transparence individuelle) */
.stage::after {
	content: ''; position: absolute; inset: 0; z-index: 100; pointer-events: none;
	background: rgba(var(--c-scrim-rgb), .72); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
	opacity: 0; transition: opacity .4s ease;
}
.stage.is-revealing::after { opacity: 1; }

/* Compteur : en bas à droite du plateau (le centre du cercle reste libre) */
.stage__center {
	position: absolute; right: 16px; bottom: 14px; z-index: 7; display: flex; align-items: baseline; gap: .45rem;
	padding: .35rem .9rem .4rem; border-radius: 999px; background: #fff; border: 1px solid #e2d6bb; box-shadow: 0 2px 8px rgba(var(--c-shadow-rgb), .08);
	pointer-events: none; opacity: 0; transition: opacity .5s ease;
}
.stage__center strong { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--c-gold-ink); min-width: .7em; text-align: center; }
.stage__center strong.is-tick { animation: tick .45s cubic-bezier(.2, 1.4, .4, 1); }
.stage__center span { font-size: .95rem; font-weight: 600; color: var(--c-ink); }
.stage.is-picking:not(.is-revealing) .stage__center { opacity: 1; }
@keyframes tick { 0% { transform: scale(1.4); opacity: .3; } 100% { transform: scale(1); opacity: 1; } }

/* Bouton « Mélanger » : sous les cartes (position calculée par le JS) */
.btn--shuffle {
	position: absolute; left: 50%; top: calc(50% + var(--guide-h) / 2 + var(--btn-y, 120px)); translate: -50% 0;
	display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem;
	transition: opacity .4s ease, transform .15s ease, background .15s ease;
	opacity: 0; pointer-events: none;
}
.stage.is-idle .btn--shuffle { opacity: 1; pointer-events: auto; }
.btn--shuffle[hidden] { display: none; }

/* ---------- Emplacements (mini-cartes sur les côtés) ---------- */
.slot { display: flex; flex-direction: column; align-items: center; width: var(--sw); opacity: 0; visibility: hidden; transition: opacity .4s ease .2s, visibility 0s linear .6s; }
.board.has-slots .slot { opacity: 1; visibility: visible; transition: opacity .45s ease .25s, visibility 0s; }
.slot__frame {
	position: relative; width: var(--sw); aspect-ratio: 163 / 300;
	display: grid; place-items: center;
	border: 1.5px dashed var(--c-dash); border-radius: 10px; background: rgba(255, 255, 255, .35);
	transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.slot__frame::before {
	content: ''; width: 44%; aspect-ratio: 2 / 3;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 60'%3E%3Crect x='3' y='3' width='34' height='54' rx='5' fill='none' stroke='%23c3cad6' stroke-width='2.4'/%3E%3Cpath d='M20 20 L22.6 27.4 L30 30 L22.6 32.6 L20 40 L17.4 32.6 L10 30 L17.4 27.4 Z' fill='%23c3cad6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.slot.is-next .slot__frame { border: 1.5px solid var(--c-accent); background: #fff; box-shadow: 0 0 0 3px rgba(176, 141, 87, .14); }
.slot.is-filled .slot__frame { border: 0; background: transparent; box-shadow: none; }
.slot.is-filled .slot__frame::before { display: none; }
.slot__frame img { display: block; width: 100%; height: 100%; border-radius: 6px; box-shadow: 0 4px 12px rgba(var(--c-shadow-rgb), .22); animation: settle .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes settle { from { transform: scale(1.08); } to { transform: none; } }

.slot__label { margin-top: .4rem; font-size: clamp(.75rem, 1.8vw, .9rem); font-weight: 600; color: #8b94a5; white-space: nowrap; transition: color .3s ease; }
.slot.is-next .slot__label, .slot.is-filled .slot__label { color: var(--c-ink); }

/* ---------- Présentation d'une carte tirée : grande carte + nom + thématique ---------- */
.bigcard { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: auto; cursor: pointer; will-change: transform; transform-origin: 50% 50%; perspective: 1100px; }
.bigcard .flipcard { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, .7, .2, 1); }
.bigcard .flipcard.is-flipped { transform: rotateY(180deg); }
.bigcard .flipcard__face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; box-shadow: 0 12px 32px rgba(var(--c-shadow-rgb), .3); }
.bigcard .flipcard__face--front { transform: rotateY(180deg); }

.reveal-cap {
	position: fixed; z-index: 1000; translate: -50% 0; width: max-content; max-width: 90vw; text-align: center; pointer-events: none;
	display: flex; flex-direction: column; align-items: center; gap: .1rem; opacity: 0; transition: opacity .35s ease, transform .35s ease; transform: translateY(6px);
	/* petit cadre autour du titre / de la thématique */
	padding: .55rem 1.3rem .6rem; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: 0 6px 20px rgba(var(--c-shadow-rgb), .14);
}
.reveal-cap.is-in { opacity: 1; transform: none; }
.reveal-cap__theme { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-gold-ink); }
.reveal-cap strong { font-family: var(--font-title); font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 700; letter-spacing: -.01em; color: var(--c-ink); line-height: 1.2; }
.reveal-cap__hint { font-size: .85rem; color: var(--c-ink-soft); }

/* ---------- Fin : interprétation puis bouton, au centre du plateau ---------- */
.status { position: absolute; inset: var(--guide-h) 0 0 0; display: grid; place-items: center; pointer-events: none; }
.status > * { grid-area: 1 / 1; pointer-events: auto; }
.status__working { display: flex; flex-direction: column; align-items: center; gap: .6rem; font-family: var(--font-title); font-weight: 600; font-size: 1.15rem; color: var(--c-ink); }
.status__orb { width: 26px; height: 26px; border-radius: 50%; background: var(--c-accent); animation: orb 1.2s ease-in-out infinite; }
.status__bar { width: min(240px, 60%); height: 4px; border-radius: 999px; background: var(--c-line); overflow: hidden; }
.status__bar > span { display: block; height: 100%; width: 0; background: var(--c-accent); border-radius: inherit; }
.status__working.is-running .status__bar > span { animation: bar var(--dur, 1.8s) linear forwards; }
.status [hidden] { display: none !important; }



@keyframes orb { 0%, 100% { transform: scale(.85); opacity: .6; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes bar { to { width: 100%; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---------- Frise des 4 étapes (sous le plateau) ---------- */
.steps ol { list-style: none; display: flex; justify-content: center; margin: 1rem auto 0; padding: 0; max-width: 620px; }
.step {
	position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem;
	font-size: .8rem; font-weight: 500; color: var(--c-ink-soft); transition: color .3s ease;
}
/* connecteur : piste claire + remplissage doré */
.step:not(:last-child)::after,
.step:not(:last-child)::before { content: ''; position: absolute; top: 12px; left: calc(50% + 20px); width: calc(100% - 40px); height: 3px; border-radius: 3px; }
.step:not(:last-child)::after { background: #ece4d2; }
.step:not(:last-child)::before { z-index: 1; background: linear-gradient(90deg, #dcc07c, #b08d57); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s ease; }
.step.is-done:not(:last-child)::before { transform: scaleX(1); }

.step__dot {
	position: relative; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
	background: #fff; border: 1.5px solid #e2d6bb; color: #a39a86; font-size: .8rem; font-weight: 700;
	transition: background .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease, transform .4s cubic-bezier(.2, 1.4, .4, 1);
}
.step__dot > * { grid-area: 1 / 1; transition: opacity .25s ease, transform .3s ease; }
.step__dot svg { opacity: 0; transform: scale(.4); }

/* disque doré « premium » : dégradé métallique, reflet en haut, ombre interne en bas */
.step.is-active .step__dot, .step.is-done .step__dot {
	background: radial-gradient(circle at 32% 26%, #fcefcd 0%, #e4c67f 36%, #b98f4a 78%, #9a7439 100%);
	border-color: #a77f3f; color: #3a2a0e;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .8), inset 0 -2px 3px rgba(122, 88, 28, .35), 0 2px 5px rgba(122, 88, 28, .26);
}
.step.is-active .step__dot { transform: scale(1.4); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .8), inset 0 -2px 3px rgba(122, 88, 28, .35), 0 3px 8px rgba(122, 88, 28, .3); }
.step.is-active { color: var(--c-ink); font-weight: 700; }
.step.is-done { color: var(--c-ink); }
.step.is-done .step__dot b { opacity: 0; transform: scale(.4); }
.step.is-done .step__dot svg { opacity: 1; transform: none; }
.step__label { white-space: nowrap; }
.step__count { display: inline-block; padding: .05em .5em; border-radius: 999px; background: var(--c-gold-light); color: #3a2a0e; font-size: .78em; font-weight: 700; }
.step__count:empty { display: none; }

.noscript { color: var(--c-primary-dark); font-weight: 600; }

/* ---------- Pub 970×250 sous le tirage ---------- */
.page-home .ad { margin: 1.25rem auto 0; width: 100%; }
.page-home .ad--placeholder {
	flex-direction: column; gap: .2rem; border: 1.5px dashed var(--c-dash); background: #fff;
	color: var(--c-ink-soft); font-size: .82rem; font-weight: 500; letter-spacing: .03em;
}

/* ---------- Texte de présentation (SEO) ---------- */
.seo-text.card-box {
	max-width: 1000px; margin: 1.5rem auto 0; padding: 1.75rem 2.25rem; background: #fff; border-color: var(--c-line);
	columns: 2 340px; column-gap: 2.75rem; color: var(--c-ink-soft); text-align: left; hyphens: auto;
}
.seo-text p { margin: 0 0 1em; break-inside: avoid; }
.seo-text a { color: var(--c-primary); font-weight: 600; }
.seo-text b { color: var(--c-ink); }

/* ---------- Mobile : emplacements en rangée au-dessus du jeu ---------- */
@media (max-width: 700px) {
	.page-home .site-main { padding-top: .75rem; }
	.board {
		--sw: clamp(48px, 17vw, 72px);
		--stage-h: clamp(380px, 62svh, 520px);
		--row1: 0px; grid-template-columns: repeat(4, 1fr); grid-template-rows: var(--row1) var(--stage-h);
		height: auto; row-gap: 0; column-gap: .5rem;
	}
	.slot:nth-child(n) { grid-row: 1; grid-column: auto; }
	.board.has-slots { --col: 0px; --row1: calc(var(--sw) * 300 / 163 + 2.1rem); }
	.slot { align-self: start; padding-top: .3rem; }
	.stage { grid-column: 1 / -1; grid-row: 2; --guide-h: 120px; }
	.stage__guide { justify-content: flex-start; padding: 30px 46px 0 12px; }
	.table__hint { font-size: 1.2rem; }
	.restart { padding: .3rem; width: 32px; height: 32px; justify-content: center; }
	.restart__label { display: none; }
	.stage.is-docked .brand { visibility: hidden; }          /* pas de place pour le logo rangé en coin */
	.seo-text.card-box { padding: 1.25rem; }
	.step { font-size: .72rem; }
	.step__label { white-space: normal; text-align: center; line-height: 1.2; }
}

/* ---------- Écran final : logo recentré, consigne, 4 cartes au centre (cliquables), bouton doré qui pulse ---------- */
.slot.is-gone .slot__frame img { opacity: 0; animation: none; }

.stage.is-final .brand { left: calc(50% - var(--logo-w) * .26); top: 20px; translate: 0 0; scale: .52; pointer-events: auto; visibility: visible; opacity: 1; }
.stage.is-final .stage__guide { top: calc(var(--logo-w) * .147 + 30px); height: 64px; }
.stage.is-final .status { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 26px; padding-bottom: 28px; }
.stage.is-final .status__working { gap: .5rem; }
.stage.is-final #status-text { display: none; }               /* le texte « Interprétation en cours… » est déjà dans la consigne du haut */

.final-cards { position: relative; z-index: 2; display: flex; justify-content: center; gap: var(--final-gap, 16px); }
.final-card {
	display: block; padding: 0; border: 0; background: none; width: var(--final-cw, 80px); height: var(--final-ch, 148px); border-radius: 8px;
	cursor: default; -webkit-tap-highlight-color: transparent; transition: transform .25s ease;
}
.final-card:not(:disabled) { cursor: pointer; }
.final-card:not(:disabled):hover { transform: translateY(-6px); }
.final-card:not(:disabled):hover img { box-shadow: 0 14px 28px rgba(var(--c-shadow-rgb), .3); }
.final-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.final-card img { display: block; width: 100%; height: 100%; border-radius: 8px; box-shadow: 0 6px 16px rgba(var(--c-shadow-rgb), .2); transition: box-shadow .25s ease; }

/* Bouton final : bleu nuit, texte blanc, anneau doré + pulsation de halo doré */
.page-home .btn.btn--lg {
	position: relative; z-index: 1; cursor: pointer; font: inherit; font-weight: 600; font-size: 1.1rem; letter-spacing: .01em; padding: .95rem 2.4rem; border-radius: 12px; color: #fff;
	border: 1px solid var(--c-gold-light); background: var(--c-primary);
	box-shadow: 0 0 0 3px rgba(217, 184, 114, .45), 0 8px 20px rgba(var(--c-primary-rgb), .35);
	animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both, goldPulse 2.6s .8s ease-in-out infinite;
}
.page-home .btn.btn--lg:hover { background: #24305a; color: #fff; transform: none; }
.page-home .btn.btn--lg:active { filter: brightness(.94); }
@keyframes goldPulse {
	0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(217, 184, 114, .45), 0 8px 20px rgba(var(--c-primary-rgb), .35), 0 0 0 3px rgba(217, 184, 114, .4); }
	50% { transform: scale(1.02); box-shadow: 0 0 0 3px rgba(217, 184, 114, .6), 0 9px 24px rgba(var(--c-primary-rgb), .38), 0 0 0 14px rgba(217, 184, 114, 0); }
}
@media (max-width: 700px) {
	.stage.is-final .brand { visibility: visible; }
	.stage.is-final .stage__guide { top: calc(var(--logo-w) * .147 + 28px); height: auto; padding: 0 14px; }
	.stage.is-final .status { gap: 18px; padding-bottom: 20px; }
}

/* Écran final : cadre resserré, barre d'étapes retirée, cartes juste sous la consigne */
.board.is-final { max-width: 780px; }
.steps { overflow: hidden; max-height: 90px; transition: opacity .6s cubic-bezier(.4, 0, .2, 1), max-height .6s cubic-bezier(.4, 0, .2, 1); }
.table.is-final .steps { opacity: 0; max-height: 0; pointer-events: none; }
.stage.is-final .stage__guide { padding-top: 0; }
@media (min-width: 701px) {
	.stage.is-final .status { justify-content: flex-start; padding-top: calc(var(--logo-w) * .147 + 100px); padding-bottom: 0; }
}

/* Bouton : texte en majuscules, bien lisible */
.page-home .btn.btn--lg { text-transform: uppercase; letter-spacing: .09em; font-weight: 700; font-size: 1rem; padding: 1.05rem 2.6rem; }

/* Disparition du jeu : anneau et étincelles dorés */
.burst { position: absolute; left: 50%; top: calc(50% + var(--guide-h) / 2 - 16px); width: 0; height: 0; z-index: 40; pointer-events: none; }
.burst__ring {
	position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%;
	background: radial-gradient(circle, rgba(250, 232, 178, .95) 0%, rgba(214, 176, 98, .55) 38%, rgba(214, 176, 98, 0) 70%);
	animation: burstRing 1s cubic-bezier(.2, .7, .2, 1) forwards;
}
.burst__spark {
	position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #e4c67f;
	box-shadow: 0 0 8px 2px rgba(228, 198, 127, .7); opacity: 0;
	animation: burstSpark 1.1s cubic-bezier(.15, .7, .25, 1) forwards;
}
@keyframes burstRing { 0% { transform: scale(.2); opacity: .95; } 100% { transform: scale(7); opacity: 0; } }
@keyframes burstSpark {
	0% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(var(--s, 1)); }
	15% { opacity: 1; }
	100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d, 120px)) scale(.2); }
}

/* Carte en vol (clone posé sur l'emplacement, animé vers le cadre central) */
.fly { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; will-change: transform; }
.fly img { display: block; width: 100%; height: 100%; border-radius: 6px; box-shadow: 0 6px 16px rgba(var(--c-shadow-rgb), .22); }

/* Mesure de la disposition finale : aucune transition le temps de lire les positions */
html.is-measuring *, html.is-measuring *::before, html.is-measuring *::after { transition: none !important; }

/* Finale : les titres des thématiques s'effacent dès que les cartes quittent leurs emplacements */
.slot.is-gone .slot__label { opacity: 0; transition: opacity .3s ease; }

/* Bouton final : pas de cadre bleu du navigateur ; anneau doré discret pour la navigation au clavier */
.page-home .btn.btn--lg:focus { outline: none; }
.page-home .btn.btn--lg:focus-visible { outline: 2px solid rgba(176, 141, 87, .55); outline-offset: 5px; }

/* Finale : les cartes sont ancrées en haut de la zone et ne bougent plus ; la barre d'attente puis le bouton occupent la place sous elles */
.stage.is-final .final-cards { order: 1; }
.stage.is-final .status__working, .stage.is-final #consult-form { order: 2; }

/* ================= MOBILE (≤ 700 px) : ajustements de mise en page ================= */
@media (max-width: 700px) {
	.board { --stage-h: clamp(430px, 56svh, 500px); }
	.stage { --guide-h: 112px; }

	/* Logo rangé en haut, centré ; consigne dessous, sur 2 lignes en pleine largeur */
	.stage.is-docked .brand { left: calc(50% - var(--logo-w) * .18); top: 12px; scale: .36; visibility: visible; }
	.stage__guide { justify-content: flex-start; padding: 54px 14px 0; }
	.table__hint { font-size: 1.1rem; max-width: none; }

	/* Bouton « Mélanger » plus compact */
	.btn--shuffle { padding: .6rem 1.4rem; font-size: .95rem; }

	/* Tirage : logo masqué, consigne remontée, compteur centré sous le cercle (plus de chevauchement) */
	.stage.is-picking .brand { visibility: hidden; }
	.stage.is-picking .stage__guide { padding: 16px 44px 0; }
	.stage.is-picking .table__hint { font-size: 1.05rem; }
	.stage__center { right: auto; left: 50%; translate: -50% 0; bottom: 10px; padding: .3rem .8rem .35rem; }
	.stage__center strong { font-size: 1.45rem; }

	/* Dernier écran : logo plus gros, tout remonté, cartes sur une rangée, pas de vide */
	.stage.is-final .brand { left: calc(50% - var(--logo-w) * .31); top: 14px; scale: .62; visibility: visible; }
	.stage.is-final .stage__guide { top: calc(var(--logo-w) * .175 + 22px); height: 64px; padding: 0 14px; justify-content: center; }
	.stage.is-final .table__hint { font-size: 1.2rem; }
	.stage.is-final .status { justify-content: flex-start; padding-top: calc(var(--logo-w) * .175 + 22px + 64px + 6px); padding-bottom: 0; gap: 22px; }
}

@media (max-width: 380px) {
	.table__hint { font-size: 1rem; }
	.stage.is-picking .table__hint { font-size: .98rem; }
}

/* ================= MOBILE : intro en cadre court, logo plus gros, espaces resserrés ================= */
@media (max-width: 700px) {
	.board { --stage-h: clamp(420px, 54svh, 480px); }
	.board.is-intro { --stage-h: 210px; }                         /* intro : cadre court ; il grandit quand le logo se range */
	.stage { --guide-h: 124px; }
	.stage.is-docked .brand { left: calc(50% - var(--logo-w) * .27); top: 12px; scale: .54; }
	.stage__guide { padding: 68px 14px 0; }
	.stage.is-picking .stage__guide { padding: 16px 44px 0; }
	.stage.is-final .stage__guide { padding: 0 14px; }
	.stage.is-final .brand { left: calc(50% - var(--logo-w) * .31); top: 14px; scale: .62; }
}

/* ================= MOBILE : règle de marges égales (haut, entre chaque élément, bas) ================= */
@media (max-width: 700px) {
	.stage { --g: 22px; --text-h: 44px; --logo-h: calc(var(--logo-w) * .1526); --guide-h: calc(var(--g) * 3 + var(--logo-h) + var(--text-h)); }
	.board { --stage-h: var(--idle-h, 440px); }
	.board.is-intro { --stage-h: 210px; }
	.stage.is-docked .brand { top: var(--g); }

	/* bande de la consigne : sous le logo, texte centré (marge égale au-dessus et au-dessous) */
	.stage__guide { top: calc(var(--g) + var(--logo-h)); height: calc(var(--text-h) + var(--g) * 2); padding: 0 14px; justify-content: center; }

	/* tirage : logo masqué, bande resserrée, cercle et compteur à marges égales */
	.stage.is-circling { --guide-h: calc(var(--g) * 2 + var(--text-h)); }
	.stage.is-circling .brand { visibility: hidden; }
	.stage.is-circling .stage__guide { top: 0; height: var(--guide-h); padding: 0 44px; }
	.stage__center { bottom: var(--g); }

	/* dernier écran : mêmes marges, valeurs calculées par le script */
	.stage.is-final .brand { top: var(--final-g, 22px); visibility: visible; }
	.stage.is-final .stage__guide { top: var(--final-guide-top); height: var(--final-band-h); padding: 0 14px; }
	.stage.is-final .status { padding-top: var(--final-cards-top); gap: var(--final-g, 22px); }
}

/* ================= Contenu éditorial sous le tirage ================= */
.editorial { max-width: 1040px; margin: 2.75rem auto 0; display: flex; flex-direction: column; gap: clamp(2.6rem, 6vw, 4.4rem); }

.ed__head { text-align: center; max-width: 54rem; text-wrap: balance; margin: 0 auto 1.7rem; }
.ed__rule { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-bottom: .95rem; }
.ed__rule::before, .ed__rule::after { content: ''; width: 54px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--c-accent)); }
.ed__rule::after { background: linear-gradient(270deg, transparent, var(--c-accent)); }
.ed__rule i { width: 8px; height: 8px; background: var(--c-accent); transform: rotate(45deg); }
.ed h2 { margin: 0 0 .55rem; font-family: 'Fraunces', Georgia, 'Times New Roman', serif; font-weight: 800; font-size: clamp(1.55rem, 3.2vw, 2.2rem); line-height: 1.15; letter-spacing: -.015em; color: var(--c-ink); }
.ed__lead { margin: 0; color: var(--c-ink-soft); font-size: 1.08rem; }

/* pastille d'icône : or doux, trait doré foncé */
.ed__icon {
	display: inline-grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; color: #8a6a37;
	background: radial-gradient(circle at 32% 26%, #fffaf0, #f6ead0 72%); border: 1px solid #e8d8b4; box-shadow: 0 4px 12px rgba(122, 88, 28, .12);
}

/* Comment ça marche */
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.howto__item { position: relative; text-align: center; background: #fff; border: 1px solid var(--c-line); border-radius: 16px; padding: 1.6rem 1.1rem 1.4rem; box-shadow: var(--shadow); }
.howto__item:not(:last-child)::after { content: ''; position: absolute; top: 3.2rem; right: -1.1rem; width: 1.1rem; height: 1.5px; background: linear-gradient(90deg, #e3d3ac, transparent); }
.howto__num { position: absolute; top: .8rem; left: 1rem; font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: .95rem; color: #c9ac6e; }
.howto__item h3 { margin: .95rem 0 .35rem; font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 1.2rem; color: var(--c-ink); }
.howto__item p { margin: 0; color: var(--c-ink-soft); font-size: .96rem; line-height: 1.5; }

/* Six thèmes */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.theme-card { display: flex; align-items: flex-start; gap: 1rem; background: #fff; border: 1px solid var(--c-line); border-radius: 16px; padding: 1.3rem; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.theme-card:hover { transform: translateY(-3px); border-color: #e2d3ae; box-shadow: 0 14px 30px rgba(var(--c-shadow-rgb), .12); }
.theme-card h3 { margin: .15rem 0 .3rem; font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 1.15rem; color: var(--c-ink); }
.theme-card p { margin: 0; color: var(--c-ink-soft); font-size: .95rem; line-height: 1.5; }

/* Les 22 arcanes : défilement horizontal */
.ed--arcana { padding: 2rem 0 .6rem; border-radius: 24px; background: linear-gradient(180deg, rgba(246, 234, 208, .45), rgba(246, 234, 208, 0)); }
.arcana {
	display: flex; gap: 14px; overflow-x: auto; padding: 10px 28px 24px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
	scrollbar-width: thin; scrollbar-color: #d9c79b transparent;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}
.arcana:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; border-radius: 12px; }
.arcana__card { flex: 0 0 auto; width: 112px; margin: 0; scroll-snap-align: start; text-align: center; }
.arcana__card img { display: block; width: 100%; height: auto; aspect-ratio: 163 / 300; border-radius: 8px; box-shadow: 0 6px 16px rgba(var(--c-shadow-rgb), .2); transition: transform .3s ease, box-shadow .3s ease; }
.arcana__card:hover img { transform: translateY(-6px); box-shadow: 0 14px 26px rgba(var(--c-shadow-rgb), .28); }
.arcana__card figcaption { margin-top: .6rem; font-size: .82rem; font-weight: 600; line-height: 1.25; color: var(--c-ink-soft); }

/* Texte éditorial */
.about { background: #fff; border: 1px solid var(--c-line); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.8rem); }
.about__lead { margin: 0 auto 1.8rem; max-width: 40rem; text-align: center; font-size: clamp(1.12rem, 2vw, 1.3rem); line-height: 1.55; color: var(--c-ink); }
.about__quote { text-wrap: balance; position: relative; margin: 0 auto 2rem; max-width: 36rem; padding: 1.9rem 1rem 0; text-align: center; font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: clamp(1.25rem, 2.6vw, 1.65rem); line-height: 1.3; color: var(--c-primary); }
.about__quote::before { content: '\201C'; position: absolute; left: 50%; top: -.3rem; transform: translateX(-50%); font-size: 3.8rem; line-height: 1; color: var(--c-accent); }
.about__cols { columns: 2 320px; column-gap: 2.6rem; color: var(--c-ink-soft); }
.about__cols p { margin: 0 0 1em; break-inside: avoid; }
.about__note { margin: .6rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--c-line); color: var(--c-ink-soft); }
.about a { color: var(--c-primary); font-weight: 600; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: .7rem; }
.faq__item { background: #fff; border: 1px solid var(--c-line); border-radius: 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq__item[open] { border-color: #e2d3ae; box-shadow: var(--shadow); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; font-weight: 700; color: var(--c-ink); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 14px; }
.faq__item summary::after {
	content: ''; flex: 0 0 24px; height: 24px; border-radius: 50%; border: 1px solid #e2d3ae; transition: transform .25s ease;
	background: linear-gradient(#8a6a37, #8a6a37) center / 10px 1.8px no-repeat, linear-gradient(#8a6a37, #8a6a37) center / 1.8px 10px no-repeat, #f8eed6;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0; padding: 0 1.25rem 1.2rem; color: var(--c-ink-soft); line-height: 1.6; }

/* Bandeau horoscope */
.cta {
	position: relative; overflow: hidden; text-align: center; padding: clamp(1.9rem, 5vw, 3rem) 1.5rem; border-radius: 24px; color: #f6efe2;
	background: radial-gradient(120% 140% at 50% -20%, #2a3a74 0%, #1b2547 55%, #111a38 100%); box-shadow: 0 18px 40px rgba(17, 26, 56, .28);
}
.cta::before {
	content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image: radial-gradient(circle, rgba(217, 184, 114, .6) 0 1.2px, transparent 1.7px), radial-gradient(circle, rgba(217, 184, 114, .4) 0 1px, transparent 1.5px);
	background-size: 130px 96px, 74px 62px; background-position: 12px 16px, 46px 40px;
}
.cta h2 { position: relative; margin: 0 0 .55rem; font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.015em; color: #f6efe2; }
.cta p { position: relative; margin: 0 auto 1.5rem; max-width: 36rem; color: rgba(246, 239, 226, .86); }
.cta__btn {
	position: relative; display: inline-block; padding: .95rem 2.4rem; border-radius: 12px; text-decoration: none; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; font-size: .95rem; color: #2f2108;
	background: linear-gradient(180deg, #f5e0a8 0%, #deba68 46%, #b98f4a 100%);
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .8), inset 0 -2px 4px rgba(122, 88, 28, .35), 0 8px 22px rgba(0, 0, 0, .3);
	transition: transform .2s ease, filter .2s ease;
}
.cta__btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: #2f2108; }

@media (max-width: 900px) {
	.howto { grid-template-columns: repeat(2, 1fr); }
	.howto__item:not(:last-child)::after { display: none; }
	.themes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.editorial { margin-top: 2rem; }
	.themes { grid-template-columns: 1fr; }
	.howto { gap: .8rem; }
	.howto__item { padding: 1.3rem .8rem 1.1rem; }
	.howto__item h3 { font-size: 1.08rem; }
	.howto__item p { font-size: .9rem; }
	.arcana { padding-left: 16px; padding-right: 16px; }
	.arcana__card { width: 94px; }
	.about { padding: 1.4rem 1.1rem; }
	.faq__item summary { padding: .9rem 1rem; }
}

/* ================= Illustrations aquarelle (Magnific) ================= */
/* Médaillons des six thèmes */
.theme-card { align-items: center; }
.theme-card__img { flex: 0 0 auto; width: 104px; height: 104px; object-fit: contain; mix-blend-mode: multiply; }
@media (max-width: 600px) { .theme-card__img { width: 84px; height: 84px; } }

/* Bandeau horoscope : ciel étoilé aquarellé, texte bleu nuit sur le centre clair */
.cta {
	color: var(--c-primary);
	background: url('../img/illus/ciel-etoile.webp') center / cover no-repeat, #dfe8f4;
	box-shadow: 0 18px 40px rgba(var(--c-primary-rgb), .18);
}
.cta::before {
	opacity: 1; background-image: radial-gradient(62% 95% at 50% 52%, rgba(255, 255, 255, .78), rgba(255, 255, 255, 0) 100%); background-size: auto; background-position: center;
}
.cta h2 { color: var(--c-primary); }
.cta p { color: rgba(var(--c-primary-rgb), .88); }

/* ================= Fond aquarelle « Ciel du matin » du cadre de tirage ================= */
.stage {
	background: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/ciel-matin.webp') center / cover no-repeat, #f4f1ea;
}
/* Lueur dorée qui monte derrière les 4 cartes sur l'écran final */
.stage::before {
	content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .6s ease;
	background: radial-gradient(60% 55% at 50% 62%, rgba(246, 205, 120, .55), rgba(246, 205, 120, 0) 100%);
}
.board.is-final .stage::before { opacity: 1; }
@media (max-width: 700px) {
	.stage { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 100%), url('../img/illus/ciel-matin-mobile.webp'); }
}

/* Variantes d'habillage (choisies côté serveur, data-skin sur #tarot-app) ; « matin » = valeurs par défaut ci-dessus */
.table[data-skin="crepuscule"] .stage { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/ciel-crepuscule.webp'); background-color: #fbf1ea; }
.table[data-skin="voile"] .stage { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 100%), url('../img/illus/ciel-voile.webp'); background-color: #f6f4ee; }
@media (max-width: 700px) {
	.table[data-skin="crepuscule"] .stage { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 100%), url('../img/illus/ciel-crepuscule-mobile.webp'); }
	.table[data-skin="voile"] .stage { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 100%), url('../img/illus/ciel-voile-mobile.webp'); }
}

/* ================= Pages thématiques : fonds aquarelle par thème (data-skin = clé du thème) ================= */
.table[data-skin="amour"] .stage   { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-amour.webp'); background-color: #fdf1ee; }
.table[data-skin="argent"] .stage  { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-argent.webp'); background-color: #f4f4ea; }
.table[data-skin="travail"] .stage { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-travail.webp'); background-color: #f1f4f6; }
.table[data-skin="famille"] .stage { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-famille.webp'); background-color: #fcf3ea; }
.table[data-skin="lune"] .stage    { background-image: radial-gradient(70% 60% at 50% 48%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-lune.webp'); background-color: #f3f1f6; }
@media (max-width: 700px) {
	.table[data-skin="amour"] .stage   { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-amour-mobile.webp'); }
	.table[data-skin="argent"] .stage  { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-argent-mobile.webp'); }
	.table[data-skin="travail"] .stage { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-travail-mobile.webp'); }
	.table[data-skin="famille"] .stage { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-famille-mobile.webp'); }
	.table[data-skin="lune"] .stage    { background-image: radial-gradient(75% 55% at 50% 48%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 100%), url('../img/illus/fond-lune-mobile.webp'); }
}

/* ================= Pages thématiques : contenu éditorial ================= */
/* Carte de thème cliquable : toute la carte est le lien (lien étiré), présenté comme un bouton */
.theme-card { position: relative; }
.theme-card:has(.theme-card__link) { cursor: pointer; }
.theme-card:has(.theme-card__link):hover { border-color: var(--c-gold-light); }
.theme-card__link { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; width: fit-content; max-width: 100%; margin-top: .7rem; padding: .32rem .8rem; border-radius: 999px; border: 1px solid var(--c-gold-light); background: #fff; color: var(--c-primary); font-size: .84rem; font-weight: 600; line-height: 1.3; white-space: nowrap; text-decoration: none; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.theme-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.theme-card:hover .theme-card__link, .theme-card__link:focus-visible { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.theme-card__link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

.crumbs { margin: 0 0 .7rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; font-size: .88rem; color: var(--c-ink-soft); }
.crumbs li + li::before { content: '›'; margin-right: .35rem; color: var(--c-accent); }
.crumbs a { color: var(--c-ink-soft); text-decoration: none; border-bottom: 1px solid var(--c-line); }
.crumbs a:hover { color: var(--c-primary); }
.crumbs [aria-current] { color: var(--c-primary); font-weight: 600; }

.tlead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.75rem; align-items: center; max-width: 1040px; margin: 0 auto; padding: 1.75rem 2rem; background: #fff; border: 1px solid var(--c-line); border-radius: 18px; box-shadow: var(--shadow); }
.tlead__img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c-gold-light); }
.tlead__text h2 { margin: .2rem 0 .6rem; font-family: var(--font-serif, 'Fraunces', Georgia, serif); font-weight: 800; color: var(--c-primary); }
.tlead__text p { margin: 0 0 .7rem; color: var(--c-ink); line-height: 1.65; }
.tlead__text p:last-child { margin-bottom: 0; }
.tlead__cta { display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap; padding: .8rem 1.3rem; border-radius: 999px; background: var(--c-primary); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 0 0 3px rgba(217, 184, 114, .45), 0 8px 20px rgba(var(--c-primary-rgb), .3); transition: background .2s ease, transform .2s ease; }
.tlead__cta:hover { background: #24305a; color: #fff; transform: translateY(-2px); }
.tlead__emoji { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(217, 184, 114, .16); color: var(--c-gold-light); }
.tlead__emoji svg { display: block; stroke-width: 1.7; }
.tlead__cta svg { flex: 0 0 auto; margin-left: .1rem; color: var(--c-gold-light); }

.reveals { list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.reveal { display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--c-line); border-radius: 16px; color: var(--c-ink); line-height: 1.45; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.reveal:hover { transform: translateY(-3px); border-color: var(--c-gold-light); box-shadow: 0 14px 30px rgba(var(--c-shadow-rgb), .12); color: var(--c-ink); }
.reveal__icon { flex: 0 0 auto; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #2b3a6b, #1b2547 70%); box-shadow: 0 0 0 2px var(--c-gold-light), 0 6px 14px rgba(var(--c-primary-rgb), .25); color: var(--c-gold-light); transition: transform .25s ease; }
.reveal__icon svg { display: block; stroke-width: 1.6; }
.reveal:hover .reveal__icon { transform: scale(1.06) rotate(-4deg); }

.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; max-width: 1040px; margin: 0 auto; }
.tcard { margin: 0; }
.tcard__btn { display: flex; gap: 1rem; align-items: flex-start; width: 100%; height: 100%; padding: 1rem; margin: 0; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--c-line); border-radius: 14px; cursor: zoom-in; position: relative; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tcard__btn:hover, .tcard__btn:focus-visible { transform: translateY(-3px); border-color: var(--c-gold-light); box-shadow: 0 14px 30px rgba(var(--c-shadow-rgb), .12); }
.tcard__btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.tcard__btn::after { content: '⤢'; position: absolute; right: .7rem; top: .5rem; font-size: .95rem; color: var(--c-gold-ink); opacity: .55; }
.tcard__btn img { flex: 0 0 auto; width: 72px; height: auto; border-radius: 6px; box-shadow: 0 6px 14px rgba(var(--c-shadow-rgb), .18); }
.tcard__body { display: block; min-width: 0; }
.tcard__name { display: block; margin: 0 0 .3rem; padding-right: 1.2rem; font-family: var(--font-serif, 'Fraunces', Georgia, serif); font-size: 1.1rem; font-weight: 800; color: var(--c-primary); }
.tcard__text { display: block; font-size: .95rem; line-height: 1.55; color: var(--c-ink-soft); }

/* Arcane en grand */
.arcana-dialog { width: min(92vw, 420px); max-height: 92vh; padding: 1.6rem 1.5rem 1.5rem; border: 0; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(var(--c-shadow-rgb), .45); overflow: auto; }
.arcana-dialog::backdrop { background: rgba(var(--c-primary-rgb), .55); backdrop-filter: blur(4px); }
.arcana-dialog[open] { animation: arcanaIn .3s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes arcanaIn { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
.arcana-dialog__img { display: block; width: auto; height: min(52vh, 420px); max-width: 100%; margin: 0 auto 1rem; border-radius: 10px; box-shadow: 0 18px 40px rgba(var(--c-shadow-rgb), .35); }
.arcana-dialog__name { margin: 0 0 .4rem; font-family: var(--font-serif, 'Fraunces', Georgia, serif); font-size: 1.5rem; font-weight: 800; color: var(--c-primary); }
.arcana-dialog__text { margin: 0; line-height: 1.6; color: var(--c-ink-soft); }
.arcana-dialog__close { position: absolute; right: .8rem; top: .6rem; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3efe6; color: var(--c-primary); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.arcana-dialog__close:hover { background: var(--c-gold-light); }
html:has(dialog[open]) { overflow: hidden; }

html:has(body.page-theme) { scroll-behavior: smooth; }
.others { list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.others li { flex: 1 1 280px; max-width: 330px; }
.others a { display: flex; align-items: center; gap: 1rem; height: 100%; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--c-line); border-radius: 16px; color: var(--c-primary); font-weight: 700; line-height: 1.3; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.others a::after { content: '→'; margin-left: auto; color: var(--c-gold-ink); font-weight: 400; transition: transform .25s ease; }
.others a:hover { transform: translateY(-3px); border-color: var(--c-gold-light); box-shadow: 0 14px 30px rgba(var(--c-shadow-rgb), .12); }
.others a:hover::after { transform: translateX(3px); }
.others img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c-gold-light); }
@media (max-width: 700px) {
	.tlead { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 1.4rem 1.2rem; gap: 1rem; }
	.reveals { grid-template-columns: 1fr; }
	.tlead__img { width: 110px; height: 110px; }
	.tcards { grid-template-columns: 1fr; }
}

/* Cartes de thèmes : texte aligné en haut, colonne de texte en pile (le bouton garde sa taille), médaillon un peu plus petit sur ordinateur */
.theme-card { align-items: flex-start; }
.theme-card > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
@media (min-width: 701px) { .theme-card__img { width: 92px; height: 92px; } }

/* Pages thématiques : l'emplacement du thème demandé (carte 1) est mis en avant en doré */
.slot--focus .slot__frame { border-color: var(--c-accent); border-style: solid; box-shadow: 0 0 0 3px rgba(217, 184, 114, .35); }
.slot--focus .slot__label { color: var(--c-gold-ink); font-weight: 700; }
/* Consigne : un mot composé (« concentrez-vous ») ne se coupe pas en fin de ligne */
.table__hint .w { white-space: nowrap; }

/* Pages thèmes : fil d'Ariane dans le bloc de présentation, contenu plus près de la publicité */
.editorial--theme { margin-top: 1.5rem; }
.tlead__text .crumbs ol { font-size: .84rem; }
.tlead__text .ed__rule { display: none; }
@media (max-width: 700px) { .tlead__text .crumbs ol { justify-content: center; } }

/* Frise des 22 arcanes : chaque carte est un bouton qui l'affiche en grand */
.arcana__btn { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; text-align: center; cursor: zoom-in; border-radius: 10px; }
.arcana__btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }
