/**
 * Accueil : tout tient sur un écran, sans défilement. Si la place manque (petit écran, barre d'admin),
 * assets/accueil.js resserre les espaces, puis cache la bande « Sélection » en dernier recours.
 * En haut les réseaux et l'apparence, au centre le nom et le menu, dessous la bande « Sélection »,
 * en bas la boîte aux lettres. Chargé seulement sur la page d'accueil.
 */
body.accueil-fixe { overflow: hidden; background-image: none; }
html:has(> body.accueil-fixe) { overflow: hidden; overscroll-behavior: none; }

.accueil {
	--lueur: rgba(22, 219, 146, 0.45);
	position: relative;
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
	overflow: hidden;
	color: var(--noir);
	font-family: var(--ui);
}
html[data-theme="sombre"] .accueil { --lueur: rgba(22, 219, 146, 0.6); }
.accueil a { color: inherit; text-decoration: none; }

.accueil__cadre {
	--marge: 32px;
	--marge-g: max(var(--marge), env(safe-area-inset-left, 0px));
	--marge-d: max(var(--marge), env(safe-area-inset-right, 0px));
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: calc(22px + env(safe-area-inset-top, 0px)) var(--marge-d) calc(20px + env(safe-area-inset-bottom, 0px)) var(--marge-g);
}

/* ---------- En haut : les réseaux à gauche, l'apparence à droite ---------- */
.accueil__haut { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.theme-choix--accueil { margin-left: auto; }
/* Sur téléphone seulement : un seul rond pour l'apparence (lune en clair, soleil en sombre). */
.theme-bascule { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: auto; padding: 0; border: var(--trait); border-radius: 50%; background: var(--blanc); color: var(--noir); cursor: pointer; }
.theme-bascule:active { background: var(--vert); color: #111111; }
.theme-bascule .icone { display: block; }
.theme-bascule__soleil, html[data-theme="sombre"] .theme-bascule__lune { display: none; }
html[data-theme="sombre"] .theme-bascule__soleil { display: block; }
/* Sur téléphone seulement : « Contact » en simple lien, à la place de la boîte aux lettres. */
.accueil__contact { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border-radius: 8px; font-weight: 700; }
.accueil__contact i { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }
/* Les réseaux : les mêmes ronds noirs que dans le pied de page (les logos y restent lisibles), en plus petit. */
.reseaux--accueil { gap: 8px; }
/* Accueil : rond vide (contour noir et fond blanc en clair, contour gris et fond noir en sombre), rempli de vert au survol, sans bouger. */
.reseaux--accueil .reseau { width: 36px; height: 36px; overflow: visible; border: 2px solid #111111; background: #FFFFFF; color: #111111; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.reseaux--accueil .reseau img { width: 17px; height: 17px; border-radius: 3px; } /* icône téléversée : affichée telle quelle, avec ses couleurs */
.reseaux--accueil .reseau__lettres { font-size: 15px; }
.reseaux--accueil .reseau:hover, .reseaux--accueil .reseau:focus-visible { background: var(--vert); border-color: #111111; color: #111111; }
html[data-theme="sombre"] .reseaux--accueil .reseau { background: #0A0A0B; border-color: #5E6168; color: #ECECEC; }
html[data-theme="sombre"] .reseaux--accueil .reseau:hover, html[data-theme="sombre"] .reseaux--accueil .reseau:focus-visible { background: var(--vert); border-color: var(--vert); color: #111111; }

/* ---------- Au centre : le nom, l'accroche et le menu ---------- */
.accueil__centre {
	display: flex; flex-direction: column; align-items: center; gap: 18px;
	margin-top: clamp(16px, 9vh, 88px);
	text-align: center;
}
.accueil__cadre--seul .accueil__centre { margin: auto 0; }
.accueil__titre {
	display: flex; align-items: baseline; justify-content: center;
	font-family: var(--titre);
	font-weight: 800;
	font-size: min(clamp(56px, 7.2vw, 102px), 13vh);
	line-height: 0.95;
	letter-spacing: -0.02em;
	animation: accueil-entree 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.accueil__nom { margin: 0; font: inherit; letter-spacing: inherit; }
.accueil__point { display: inline-block; color: var(--vert); animation: accueil-pouls 3.2s ease-in-out 1.4s infinite; }
.accueil__role {
	margin: -4px 0 0;
	padding: 2px 8px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--gris-texte);
	animation: accueil-entree 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s both;
}
.accueil__trait { display: block; width: 88px; height: 4px; margin-top: -4px; border-radius: 2px; background: var(--vert); animation: accueil-trait 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s both; }

/* Le point vert du nom : au survol, il glisse vers la droite et s'ouvre en portail tourbillonnant
   (mini-jeu, lien ou grotte, au choix dans Apparence › Personnaliser › Le point vert de l'accueil). */
.portail {
	position: relative;
	display: inline-block;
	flex: none;
	width: 0.2em; height: 0.2em;
	margin-left: 0.03em;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.portail::before { content: ''; position: absolute; left: -0.12em; top: -0.75em; width: 1.05em; height: 1.1em; }
.portail__trou {
	position: absolute; left: 50%; top: 50%;
	width: 0.62em; height: 0.62em;
	margin: -0.31em 0 0 -0.31em;
	overflow: hidden;
	border-radius: 50%;
	background: var(--vert);
	transform: scale(0.32);
	transition: transform 0.55s cubic-bezier(0.3, 1.4, 0.5, 1), box-shadow 0.45s;
}
.portail__trou::before {
	content: ''; position: absolute; inset: -10%;
	border-radius: 50%;
	background: conic-gradient(#16DB92, #0A6B47, #111111, #16DB92, #E3FAF1, #16DB92);
	opacity: 0;
	transition: opacity 0.35s;
	animation: portail-tourne 1.4s linear infinite;
}
.portail__trou::after {
	content: ''; position: absolute; inset: 16%;
	border-radius: 50%;
	background: radial-gradient(circle, #111111 0 38%, rgba(17, 17, 17, 0.75) 58%, transparent 72%);
	opacity: 0;
	transition: opacity 0.35s 0.1s;
}
.portail:hover .portail__trou, .portail:focus-visible .portail__trou { transform: translate(0.44em, -0.3em) scale(1); box-shadow: 0 0 26px 5px rgba(22, 219, 146, 0.55); }
.portail:hover .portail__trou::before, .portail:hover .portail__trou::after,
.portail:focus-visible .portail__trou::before, .portail:focus-visible .portail__trou::after { opacity: 1; }
.portail:not(:hover):not(:focus-visible) .portail__trou::before { animation-play-state: paused; }
.portail:focus-visible { outline: none; }
.portail__bulle {
	position: absolute; left: 0.44em; top: 0.25em;
	padding: 2px 10px;
	border: 1.5px solid #111111;
	border-radius: 999px;
	background: var(--vert);
	color: #111111;
	font-family: var(--sc);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.5;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, 6px);
	pointer-events: none;
	transition: opacity 0.3s 0.15s, transform 0.3s 0.15s;
}
.portail:hover .portail__bulle, .portail:focus-visible .portail__bulle { opacity: 1; transform: translate(-50%, 0); }

/* La bulle « Robin Débat » après le nom (styles communs : style.css) : ici, à la taille du nom. */
.accueil__titre .bulle-debat {
	/* taille du point : environ un quart de la hauteur du nom (même calcul que la taille du nom), 24 px au moins pour le doigt */
	--d: max(24px, min(clamp(16px, 2vw, 28px), 3.6vh));
	--h: 42px;
	margin-left: 0.05em;
}
.modifier-texte--point { margin: 0; background: color-mix(in srgb, var(--page) 85%, transparent); border-radius: 999px; }

/* Le menu et sa pilule aimantée (assets/accueil.js) : une pilule verte glisse d'une rubrique à l'autre
   et suit un peu la souris à l'intérieur du mot ; le mot bouge légèrement avec elle. */
.accueil__menu {
	position: relative;
	display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
	font-size: 22px; font-weight: 500;
	animation: accueil-entree 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}
.accueil__pilule {
	position: absolute; left: 0; top: 0; z-index: 0;
	width: 0; height: 0;
	border-radius: 999px;
	background: var(--vert);
	opacity: 0;
	pointer-events: none;
	transition: left 0.4s cubic-bezier(0.3, 1.3, 0.5, 1), top 0.4s cubic-bezier(0.3, 1.3, 0.5, 1), width 0.4s cubic-bezier(0.3, 1.3, 0.5, 1), height 0.4s cubic-bezier(0.3, 1.3, 0.5, 1), opacity 0.2s, transform 0.15s ease-out;
}
.accueil__pilule.sans-glisse { transition: opacity 0.2s, transform 0.15s ease-out; }
.accueil__pilule.visible { opacity: 1; }
.accueil__rubrique {
	position: relative; z-index: 1;
	display: inline-flex; align-items: center;
	min-height: 52px; padding: 0 24px;
	border-radius: 999px;
	transition: opacity 0.25s, color 0.25s;
}
.accueil__mot { display: inline-block; transition: transform 0.15s ease-out; }
.accueil__rubrique.dessus { color: #111111; }
.accueil__rubrique:focus-visible { outline: 2px solid var(--vert); outline-offset: 4px; }
/* Sans JavaScript : un fond vert simple au survol. */
.no-js .accueil__rubrique:hover { background: var(--vert); color: #111111; }
.accueil__menu:hover .accueil__rubrique:not(:hover),
.accueil__menu:focus-within .accueil__rubrique:not(:focus-visible):not(:hover) { opacity: 0.45; }

/* ---------- La bande « Sélection » : des cartes qui défilent de gauche à droite ---------- */
.bande {
	flex: 1 0 auto;
	display: flex; flex-direction: column; justify-content: center; gap: 12px;
	margin: 22px calc(-1 * var(--marge-d)) 10px calc(-1 * var(--marge-g));
	animation: accueil-entree 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}
.bande__titre {
	align-self: flex-start;
	display: inline-flex; align-items: center; gap: 10px;
	margin: 0 0 0 var(--marge-g);
	padding: 2px 8px;
	font-family: var(--sc);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: 0.08em;
	color: var(--gris-texte);
}
.bande__titre span { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }
/* Sans animation (ou sans JavaScript) : la bande se fait défiler à la main. */
.bande__fenetre {
	overflow-x: auto;
	overflow-y: hidden;
	padding: 14px var(--marge-d) 18px var(--marge-g);
	scrollbar-width: thin;
	scrollbar-color: var(--gris-ligne) transparent;
}
.bande__piste { display: flex; gap: 18px; width: max-content; }
.bande--courte .bande__fenetre { overflow: visible; }
.bande--courte .bande__piste { margin: 0 auto; }
/* Avec l'animation (assets/accueil.js) : la piste glisse en boucle, fondue sur les bords. */
.bande--defile .bande__fenetre {
	overflow: hidden;
	padding-left: 0;
	padding-right: 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
	touch-action: pan-y;
}
.bande--defile .bande__piste { will-change: transform; }

/* Toutes les cartes : le contour s'allume en vert là où passe la souris, jusque sur les cartes voisines ;
   la carte survolée rayonne. La photo, elle, ne bouge jamais. */
.tuile {
	position: relative;
	flex: none;
	display: flex; flex-direction: column;
	width: 270px;
	border-radius: 12px;
	color: var(--noir);
	transition: box-shadow 0.35s;
}
.tuile::before {
	content: '';
	position: absolute; inset: -1.5px; z-index: 3;
	padding: 2.5px;
	border-radius: 13px;
	background: radial-gradient(220px circle at var(--mx, -999px) var(--my, -999px), #16DB92, rgba(22, 219, 146, 0.35) 40%, transparent 70%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s;
}
.bande__fenetre.eclaire .tuile::before { opacity: 1; }
.tuile:hover, .tuile:focus-visible { box-shadow: 0 0 0 1.5px var(--vert), 0 0 28px 2px var(--lueur); outline: none; }
.tuile__etiquette {
	position: absolute; left: 10px; top: 10px; z-index: 1;
	display: inline-flex; align-items: center;
	padding: 1px 10px;
	border: 1.5px solid #111111;
	border-radius: 999px;
	background: #FFFFFF;
	color: #111111;
	font-family: var(--sc);
	font-weight: 700;
	font-size: 12.5px;
	line-height: 1.5;
	letter-spacing: 0.06em;
}
.tuile__etiquette--recherche { background: var(--vert); }
.tuile__titre {
	font-family: var(--titre);
	font-weight: 700;
	font-size: 16.5px;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Presse : la carte blanche avec son image (ou le picto de la catégorie sur sa couleur) */
.tuile--presse { background: var(--blanc); border: var(--trait); }
.tuile__image {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	height: 88px;
	overflow: hidden;
	border-bottom: var(--trait);
	border-radius: 10.5px 10.5px 0 0;
	background: color-mix(in srgb, var(--teinte) 32%, var(--blanc));
	color: color-mix(in srgb, var(--teinte) 50%, var(--noir));
}
.tuile__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tuile__corps { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 12px; }
.tuile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; line-height: 1.4; color: var(--gris-texte); }
.tuile__cat {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 1px 10px;
	border-radius: 6px;
	background: var(--gris);
	font-family: var(--sc);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.05em;
	color: var(--noir);
}
.tuile__cat i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--teinte) 80%, #111111); }

/* Recherche : la fiche noire du travail universitaire, coin corné vert */
.tuile--recherche {
	justify-content: space-between; gap: 8px;
	padding: 38px 14px 12px;
	background-color: #111111;
	background-image: radial-gradient(rgba(22, 219, 146, 0.22) 1.2px, transparent 1.3px);
	background-size: 18px 18px;
	border: 1.5px solid #111111;
}
.accueil .tuile--recherche { color: #FFFFFF; } /* plus fort que « .accueil a » */
html[data-theme="sombre"] .tuile--recherche { border-color: #5E6168; }
html[data-theme="sombre"] .tuile__image { background: color-mix(in srgb, var(--teinte) 14%, var(--blanc)); }
.tuile__coin { position: absolute; right: -1.5px; top: -1.5px; width: 34px; height: 34px; border-radius: 0 12px 0 0; background: linear-gradient(225deg, var(--page) 0 50%, var(--vert) 50% 100%); }
.tuile__haut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tuile__picto { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--vert); color: #111111; }
.tuile__niveau { font-family: var(--sc); font-weight: 700; font-size: 13.5px; letter-spacing: 0.06em; color: #BDBDBD; }
.tuile--recherche .tuile__titre { flex-basis: 100%; }
.tuile__pied { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 700; }
.tuile__lire { color: var(--vert); }
.tuile__pdf { padding: 1px 8px; border: 1.5px solid #5E6168; border-radius: 6px; font-family: var(--sc); font-size: 12px; letter-spacing: 0.06em; color: #BDBDBD; }

/* Quand la place manque, assets/accueil.js resserre (accueil--serre), puis cache la bande (accueil--sans-bande). */
.accueil--serre .accueil__cadre { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.accueil--serre .accueil__centre { margin-top: 1vh; gap: 10px; }
.accueil--serre .accueil__rubrique { min-height: 44px; }
.accueil--serre .bande { margin-top: 8px; margin-bottom: 4px; gap: 6px; }
.accueil--serre .bande__fenetre { padding-top: 10px; padding-bottom: 12px; }
.accueil--serre .boite-contact svg { width: 40px; height: 42px; }
.accueil--serre .accueil__discret { min-height: 40px; }
.accueil--sans-bande .bande { display: none; }
.accueil--sans-bande .accueil__centre { margin-top: auto; margin-bottom: auto; }

/* Avec les points : un léger voile derrière le texte pour qu'il reste bien lisible. */
[data-fond="points"] .accueil__titre,
[data-fond="points"] .accueil__role,
[data-fond="points"] .accueil__menu,
[data-fond="points"] .bande__titre,
[data-fond="points"] .accueil__pied a { background: color-mix(in srgb, var(--page) 85%, transparent); }
[data-fond="points"] .accueil__menu { border-radius: 999px; }
[data-fond="points"] .accueil__titre { padding: 4px 18px; }
[data-fond="points"] .accueil__role, [data-fond="points"] .bande__titre { border-radius: 6px; }
[data-fond="points"] .boite-contact { padding: 4px 10px; border-radius: 12px; }

/* ---------- Le fond ---------- */
.accueil-fil, .accueil-points { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.accueil-fil__vert { opacity: 0; animation: accueil-apparait 1.8s ease 0.2s forwards; }
.accueil-fil__gris { stroke: color-mix(in srgb, var(--noir) 16%, transparent); }

/* ---------- En bas : la boîte aux lettres à gauche, les mentions à droite ---------- */
.accueil__pied { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px 24px; margin-top: auto; font-size: 16px; }
.accueil__discret { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.accueil__discret:hover { text-decoration: underline; text-underline-offset: 4px; }

.boite-contact {
	position: relative;
	display: inline-flex; flex-direction: column; align-items: center;
	min-width: 44px; min-height: 44px;
	color: var(--noir);
}
.boite-contact:focus-visible { outline: 2px solid var(--vert); outline-offset: 4px; border-radius: 6px; }
.boite-contact svg { display: block; overflow: visible; }
.boite-contact svg * { transform-box: view-box; }
.boite-contact__caisse { fill: var(--page); }
.boite-contact__corps { transform-origin: 100px 152px; }
.boite-contact__fente { transform-origin: 100px 73.5px; }
.boite-contact__lettre { opacity: 0; transform-origin: 100px 58px; }
.boite-contact:hover .boite-contact__fente, .boite-contact:focus-visible .boite-contact__fente { animation: boite-bouche 1.6s ease-in-out forwards; }
.boite-contact:hover .boite-contact__lettre, .boite-contact:focus-visible .boite-contact__lettre { animation: boite-aspire 1.6s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
.boite-contact:hover .boite-contact__corps, .boite-contact:focus-visible .boite-contact__corps { animation: boite-saut 0.6s ease-out 1.2s both; }
.boite-contact__nom {
	position: absolute; bottom: 100%; left: 50%;
	margin-bottom: 4px;
	white-space: nowrap; font-size: 15px; font-weight: 700;
	opacity: 0; transform: translate(-50%, 4px);
	transition: opacity 0.25s, transform 0.25s;
	pointer-events: none;
}
.boite-contact:hover .boite-contact__nom, .boite-contact:focus-visible .boite-contact__nom { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Le mini-jeu (assets/jeu.js) : il s'ouvre en cercle depuis le portail ---------- */
.jeu {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	background: rgba(17, 17, 17, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	font-family: var(--ui);
	animation: jeu-ouvre 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.jeu--ferme { animation: jeu-ferme 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; pointer-events: none; }
.jeu__panneau {
	width: min(760px, 100%);
	padding: 20px 20px 16px;
	border: var(--trait);
	border-radius: 14px;
	background: var(--blanc);
	box-shadow: 0 0 0 4px rgba(22, 219, 146, 0.35);
	color: var(--noir);
	outline: none;
}
.jeu__tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.jeu__titre { margin: 0; font-family: var(--titre); font-weight: 800; font-size: 26px; line-height: 1.1; }
.jeu__aide { margin: 6px 0 0; font-size: 15px; line-height: 1.4; color: var(--gris-texte); }
.jeu__fermer {
	flex: none;
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	padding: 0;
	border: var(--trait);
	border-radius: 50%;
	background: var(--blanc);
	color: var(--noir);
	cursor: pointer;
	transition: background 0.2s;
}
.jeu__fermer:hover, .jeu__fermer:focus-visible { background: var(--vert); color: #111111; outline: none; }
.jeu__toile { display: block; width: 100%; height: auto; aspect-ratio: 720 / 220; border: 1.5px solid var(--gris); border-radius: 10px; cursor: pointer; touch-action: manipulation; }

/* ---------- Les mouvements ---------- */
@keyframes accueil-entree { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes accueil-trait { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes accueil-pouls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes accueil-apparait { to { opacity: 1; } }
/* ---------- La grotte (assets/grotte.js) : elle s'ouvre en cercle depuis le portail, la souris devient une lampe ---------- */
.grotte {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #050403;
	cursor: none;
	outline: none;
	animation: jeu-ouvre 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
	touch-action: none;
}
.grotte--ferme { animation: jeu-ferme 0.45s cubic-bezier(0.4, 0, 0.2, 1) both; pointer-events: none; }
.grotte__toile { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.grotte__sortir {
	position: absolute;
	top: max(16px, env(safe-area-inset-top));
	right: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px 8px 10px;
	border: 1.5px solid rgba(236, 236, 236, 0.35);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: rgba(236, 236, 236, 0.75);
	font-family: var(--ui);
	font-size: 15px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.grotte__sortir:hover, .grotte__sortir:focus-visible { background: #16DB92; border-color: #16DB92; color: #111111; outline: none; }
.grotte__aide {
	position: absolute;
	left: 50%;
	bottom: max(22px, env(safe-area-inset-bottom));
	margin: 0;
	max-width: calc(100vw - 32px);
	color: rgba(236, 236, 236, 0.7);
	font-family: var(--ui);
	font-size: 15px;
	text-align: center;
	transform: translateX(-50%);
	pointer-events: none;
	animation: grotte-aide 5s ease forwards;
}
@keyframes grotte-aide { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
a.portail { text-decoration: none; }

@keyframes portail-tourne { to { transform: rotate(360deg); } }
@keyframes jeu-ouvre { from { clip-path: circle(0 at var(--px, 50%) var(--py, 50%)); } to { clip-path: circle(150vmax at var(--px, 50%) var(--py, 50%)); } }
@keyframes jeu-ferme { from { clip-path: circle(150vmax at var(--px, 50%) var(--py, 50%)); } to { clip-path: circle(0 at var(--px, 50%) var(--py, 50%)); } }
@keyframes boite-bouche { 0% { transform: scale(1, 1); } 20%, 62% { transform: scale(1.14, 3.2); } 78%, 100% { transform: scale(1, 1); } }
@keyframes boite-aspire {
	0% { opacity: 0; transform: translate(-84px, -54px) rotate(-220deg) scale(1); }
	14% { opacity: 1; }
	52% { opacity: 1; transform: translate(0, -2px) rotate(0) scale(0.92); }
	70%, 100% { opacity: 1; transform: translate(0, 34px) rotate(10deg) scale(0.6); }
}
@keyframes boite-saut { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-10px); } 60% { transform: translateY(0); } 78% { transform: translateY(-3px); } }

/* ---------- Téléphone et tablette ---------- */
@media (hover: none) {
	.boite-contact__nom { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 700px) {
	.accueil__cadre { --marge: 18px; }
	/* Téléphone, version sobre : petits ronds des réseaux, un seul rond pour l'apparence, « Contact » en lien. */
	.theme-choix--accueil { display: none; }
	.theme-bascule { display: flex; }
	.no-js .theme-bascule { display: none; }
	.reseaux--accueil .reseau { width: 32px; height: 32px; }
	.reseaux--accueil .reseau img, .reseaux--accueil .reseau .icone { width: 15px; height: 15px; }
	.reseaux--accueil .reseau__lettres { font-size: 13px; }
	.accueil__centre { margin-top: clamp(16px, 5vh, 48px); }
	.boite-contact { display: none; }
	.accueil__contact { display: inline-flex; }
	.accueil__titre { font-size: min(clamp(44px, 12.5vw, 64px), 9vh); }
	.accueil__role { font-size: 16px; }
	.accueil__menu { gap: 2px 4px; font-size: 20px; }
	.accueil__rubrique { min-height: 46px; padding: 0 14px; }
	.accueil__titre .bulle-debat { --h: 38px; }
	.accueil__titre .bulle-debat__lien { font-size: 17px; }
	.bande { margin-top: 16px; }
	.tuile { width: 226px; }
	.tuile__image { height: 76px; }
	.accueil__pied { font-size: 15px; }
	.jeu { padding: 10px; }
	.jeu__panneau { padding: 16px 14px 12px; }
	.jeu__titre { font-size: 22px; }
}
@media (max-width: 360px) {
	.accueil__menu { font-size: 18px; }
	.accueil__rubrique { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.accueil__titre, .accueil__role, .accueil__menu, .bande, .accueil__trait, .accueil__point, .boite-contact svg * { animation: none !important; }
	.accueil__pilule, .accueil__mot { transition: opacity 0.2s; }
	.accueil-fil__vert { animation: none; opacity: 1; }
	.portail__trou::before { animation: none; }
	.reseaux--accueil .reseau { transition: background 0.2s ease; }
	.reseaux--accueil .reseau:hover, .reseaux--accueil .reseau:focus-visible { transform: none; }
	.reseaux--accueil .reseau:hover > *, .reseaux--accueil .reseau:focus-visible > * { animation: none; }
	.jeu, .jeu--ferme, .grotte, .grotte--ferme { animation-duration: 0.01s; }
	.grotte__aide { animation: none; }
}
