/**
 * Hookeen visual v1 : écran de chargement + page d'accès (inc/visual-v1.php).
 * Modifier la charte ici : variables --hk-*.
 * Unités en px : Superio fixe html { font-size: 10px }, les rem seraient trop petits.
 */
/* Montserrat (SIL OFL 1.1, sous-ensemble latin, ~46 Ko au total), hébergée dans le thème : fonts/ */
@font-face { font-family: "Hookeen Display"; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Hookeen Display"; src: url("../fonts/montserrat-latin-800-italic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Hookeen Display"; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
.hk-loader__tagline,
.hk-access__title,
.hk-orb__title,
.hk-panel h2,
.hk-panel label,
.hk-panel .cmb-th,
.hk-panel [type="submit"] { font-family: var(--hk-font-display); }

/* ---------- Écran de chargement ---------- */
.hk-loader {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	overflow: hidden;
	color: var(--hk-text);
	background:
		radial-gradient(60% 45% at 50% 42%, rgba(47, 123, 255, .22), transparent 70%),
		radial-gradient(120% 90% at 50% 110%, var(--hk-navy-700), transparent 60%),
		var(--hk-navy-900);
	transition: opacity .5s ease, visibility .5s ease;
	/* filet de sécurité sans JS : disparaît seul après 6 s */
	animation: hk-loader-failsafe .5s ease 6s forwards;
}
/* Le préchargeur natif de Superio (option « preload ») ne s'empile pas sur le nôtre. */
.hk-loader-on .apus-page-loading { display: none; }
.hk-loader-skip .hk-loader,
.hk-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.hk-loader__halo,
.hk-loader__brand { grid-area: 1 / 1; }

.hk-loader { --hk-halo: min(max(78vmin, 92vw), 560px); }
.hk-loader__halo { position: relative; width: var(--hk-halo); aspect-ratio: 1; }
.hk-loader__halo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* Lueurs posées sur les éléments HTML (svg, div) et non sur les cercles SVG :
   un filtre sur un élément SVG est coupé à sa zone de filtre (le « halo rectangulaire »). */
.hk-loader__ring { filter: drop-shadow(0 0 6px rgba(255, 138, 29, .55)); }
.hk-loader__track,
.hk-loader__sunrise,
.hk-loader__tail,
.hk-loader__comet { fill: none; stroke-linecap: round; }
.hk-loader__track { stroke: rgba(255, 138, 29, .22); stroke-width: 1; }
/* Arc supérieur « lever de soleil » (statique) */
.hk-loader__sunrise { stroke: url(#hk-sunrise); stroke-width: 2.2; }
.hk-loader__flare {
	position: absolute;
	left: 79.5%;
	top: 14.75%;
	width: 18%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(closest-side, #fff 0, #ffe2c2 12%, rgba(255, 138, 29, .55) 35%, transparent);
	animation: hk-flare 2.4s ease-in-out infinite alternate;
}
/* Lumière qui parcourt le cercle : rotation du calque entier (composée par le GPU,
   aucun recalcul du tracé ni du flou à chaque image). */
.hk-loader__orbit {
	position: absolute;
	inset: 0;
	filter: drop-shadow(0 0 5px var(--hk-orange)) drop-shadow(0 0 14px rgba(255, 138, 29, .65));
	will-change: transform;
	animation: hk-spin var(--hk-loader-duration) linear infinite;
}
.hk-loader__tail { stroke: rgba(255, 138, 29, .45); stroke-width: 2; stroke-dasharray: 24 76; }
.hk-loader__comet { stroke: #ffd9b0; stroke-width: 3; stroke-dasharray: 7 93; stroke-dashoffset: -17; }

.hk-loader__brand { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 0 20px; }
.hk-logo {
	width: min(calc(var(--hk-halo) * .76), 420px);
	height: auto;
	filter: drop-shadow(0 0 18px rgba(255, 138, 29, .35));
}
.hk-loader__tagline {
	margin: 0;
	font-style: italic;
	font-weight: 700;
	font-size: clamp(15px, 4vw, 24px);
	line-height: 1.25;
	color: #fff;
	text-shadow: 0 2px 12px rgba(5, 12, 36, .6);
	animation: hk-rise .8s ease .2s both;
}
.hk-swoosh {
	display: block;
	justify-self: end;
	width: min(62%, 300px);
	height: 12px;
	margin: -4px 6% 0 0;
	background: var(--hk-swoosh) center / 100% 100% no-repeat;
	animation: hk-rise .8s ease .35s both;
}
.hk-loader__spinner {
	width: clamp(34px, 9vw, 44px);
	aspect-ratio: 1;
	margin-top: clamp(10px, 3vh, 20px);
	border-radius: 50%;
	background: conic-gradient(from 0deg, rgba(183, 195, 224, .18), rgba(255, 138, 29, .25) 120deg, var(--hk-orange) 310deg, #ffe2c2 360deg);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	animation: hk-spin .9s linear infinite;
}
.hk-loader__horizon {
	position: absolute;
	left: 50%;
	/* Ancrée sous l'anneau (et non au bas de l'écran, trop loin sur mobile), jamais hors écran. */
	top: min(calc(50% + var(--hk-halo) / 2 + clamp(16px, 4vh, 44px)), calc(100% - 40px));
	width: min(calc(var(--hk-halo) * 1.05), 86vw, 560px);
	height: 28px;
	transform: translateX(-50%);
	background:
		radial-gradient(closest-side, #fff2e4, rgba(255, 138, 29, .6) 40%, transparent) center / 110px 100% no-repeat,
		radial-gradient(closest-side, rgba(255, 138, 29, .28), transparent) center / 100% 100% no-repeat,
		linear-gradient(90deg, transparent, var(--hk-orange) 28%, #ffe2c2 50%, var(--hk-orange) 72%, transparent) center / 100% 2px no-repeat;
}

@keyframes hk-spin { to { transform: rotate(360deg); } }
@keyframes hk-flare { from { opacity: .65; } to { opacity: 1; } }
@keyframes hk-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes hk-loader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* ---------- Page d'accès ---------- */
.hk-access {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	overflow: clip; /* pas de conteneur défilant : le focus d'un champ ne décale pas le titre */
	min-height: calc(100vh - 80px);
	padding: clamp(40px, 8vw, 96px) 16px;
	color: var(--hk-text);
	background:
		radial-gradient(70% 60% at 50% 40%, rgba(47, 123, 255, .16), transparent 70%),
		linear-gradient(180deg, var(--hk-navy-800), var(--hk-navy-900));
}
.hk-access__glow {
	position: absolute;
	inset: auto -10% -30% -10%;
	height: 55%;
	z-index: -1;
	background:
		radial-gradient(50% 40% at 85% 70%, rgba(255, 138, 29, .35), transparent 70%),
		radial-gradient(50% 40% at 10% 60%, rgba(47, 123, 255, .3), transparent 70%);
	filter: blur(30px);
}
.hk-access__inner { max-width: 1040px; margin: 0 auto; }
.hk-access__head { text-align: center; margin-bottom: clamp(28px, 5vw, 56px); container-type: inline-size; }
.hk-access__title {
	margin: 0 0 8px;
	color: var(--hk-text);
	font-weight: 800;
	font-style: italic;
	font-size: clamp(32px, 6vw, 54.4px);
	font-size: clamp(28px, 8.5cqi, 54.4px); /* même règle que le hero : « professionnellement. » tient dans la colonne */
	line-height: 1.1;
	overflow-wrap: break-word;
}
@container (max-width: 330px) { .hk-access__title { -webkit-hyphens: auto; hyphens: auto; } }
.hk-access__title em { /* inline : « d’évoluer » ne se coupe pas ; trait répété sur chaque ligne (voir hk-ui.css) */
	color: var(--hk-orange); padding: 0 .08em .18em; margin-left: -.08em;
	background: var(--hk-swoosh) left bottom / 100% .2em no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* Vagues décoratives discrètes en bas de page */
.hk-access__waves {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: -1;
	width: 100%;
	height: clamp(70px, 11vw, 150px);
	pointer-events: none;
}
.hk-wave--blue { fill: rgba(47, 123, 255, .14); }
.hk-wave--orange { fill: none; stroke: rgba(255, 138, 29, .6); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hk-access__waves { filter: drop-shadow(0 0 6px rgba(255, 138, 29, .45)); }
.hk-access__lead { margin: 0; color: var(--hk-muted); font-size: 16.8px; }
.hk-access__back { display: inline-block; margin-bottom: 16px; color: var(--hk-muted); }
.hk-access__back:hover,
.hk-access__back:focus { color: var(--hk-orange); }

.hk-choice {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(24px, 5vw, 64px);
}
.hk-orb {
	--hk-ring: var(--hk-blue);
	--hk-ring-light: #a9c8ff;
	--hk-orb: min(80vw, 340px);
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start; /* icône et titre à la même hauteur dans les deux cartes */
	gap: 6px;
	width: var(--hk-orb);
	aspect-ratio: 1;
	padding: calc(var(--hk-orb) * .12) 32px 0; /* un % de padding se calculerait sur le parent */
	border-radius: 50%;
	text-align: center;
	text-decoration: none;
	color: var(--hk-text);
	border: 2px solid transparent;
	background:
		radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--hk-ring) 16%, #0b1a3f), var(--hk-navy-900) 70%) padding-box,
		conic-gradient(from 200deg, var(--hk-ring), var(--hk-ring-light) 10%, var(--hk-ring) 26%, color-mix(in srgb, var(--hk-ring) 45%, transparent) 55%, var(--hk-ring) 80%, var(--hk-ring-light) 92%, var(--hk-ring)) border-box;
	box-shadow:
		0 0 20px color-mix(in srgb, var(--hk-ring) 70%, transparent),
		0 0 64px color-mix(in srgb, var(--hk-ring) 22%, transparent),
		inset 0 0 32px color-mix(in srgb, var(--hk-ring) 28%, transparent);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.hk-orb--employer { --hk-ring: var(--hk-orange); --hk-ring-light: #ffd3a3; }
.hk-orb:hover,
.hk-orb:focus-visible {
	color: var(--hk-text);
	transform: translateY(-6px) scale(1.03);
	box-shadow:
		0 0 30px var(--hk-ring),
		0 0 90px color-mix(in srgb, var(--hk-ring) 38%, transparent),
		inset 0 0 40px color-mix(in srgb, var(--hk-ring) 40%, transparent);
	outline: none;
}
/* !important : Superio supprime les contours de focus avec outline: none !important. */
.hk-orb:focus-visible,
.hk-access__back:focus-visible { outline: 3px solid var(--hk-text) !important; outline-offset: 6px; }
.hk-orb__icon { width: clamp(48px, calc(var(--hk-orb) * .2), 72px); color: #c9d4ee; filter: drop-shadow(0 0 10px rgba(255, 138, 29, .35)); }
.hk-orb__icon svg { display: block; width: 100%; }
.hk-orb__icon .hk-ico-accent { stroke: var(--hk-orange); }
.hk-orb__icon .hk-ico-fill { fill: var(--hk-orange); stroke: var(--hk-orange); }
.hk-orb__icon .hk-ico-cut { stroke: var(--hk-navy-900); }
.hk-orb__title { font-size: clamp(24px, 3.2vw, 30px); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.hk-orb__text { color: var(--hk-muted); font-size: clamp(14px, 1.3vw, 15px); line-height: 1.4; max-width: 16em; }
.hk-orb__arrow {
	display: grid;
	place-items: center;
	position: absolute; /* même position dans les deux cartes, quel que soit le texte */
	left: 50%;
	bottom: 10%;
	translate: -50% 0;
	width: 44px;
	height: 44px;
	border-radius: var(--hk-radius-btn-sm);
	background: var(--hk-orange);
	color: #fff;
	font-size: 20.8px;
	font-weight: 700;
	transition: transform .35s ease;
}
.hk-orb:hover .hk-orb__arrow,
.hk-orb:focus-visible .hk-orb__arrow { transform: translateX(4px); }

/* Très petits écrans (< 360 px) : la flèche descend pour laisser respirer un texte sur trois lignes. */
@media (max-width: 359px) {
	.hk-orb__arrow { bottom: 6%; width: 40px; height: 40px; }
}

/* QA-049 : téléphone. Deux cercles de 312 px ne tenaient pas dans le premier écran (le second était hors vue) :
 * cartes compactes empilées, icône à gauche, titre et texte au centre, flèche à droite. Même anneau lumineux. */
@media (max-width: 599px) {
	.hk-access { padding-top: 28px; }
	.hk-access__head { margin-bottom: 20px; }
	.hk-choice { flex-direction: column; flex-wrap: nowrap; gap: 14px; }
	.hk-orb {
		display: grid;
		grid-template-columns: 48px minmax(0, 1fr) 40px;
		grid-template-rows: auto auto;
		align-items: center;
		gap: 2px 14px;
		width: 100%;
		aspect-ratio: auto;
		padding: 18px 16px;
		border-radius: var(--hk-radius-card);
		text-align: left;
	}
	.hk-orb__icon { grid-row: 1 / 3; width: 48px; }
	.hk-orb__title { grid-column: 2; font-size: 22px; }
	.hk-orb__text { grid-column: 2; max-width: none; font-size: 14px; }
	.hk-orb__arrow { position: static; grid-column: 3; grid-row: 1 / 3; translate: none; width: 40px; height: 40px; }
	.hk-orb:hover,
	.hk-orb:focus-visible { transform: translateY(-2px); }
}

/* Utilisateur déjà connecté : panneau compte (à la place des formulaires). */
.hk-account { max-width: 560px; margin: 0 auto; text-align: center; }
.hk-account__message { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.45; color: #1b2236; }
.hk-account--denied .hk-account__message { color: var(--hk-orange-ink); }
.hk-account__who { margin: 0 0 22px; color: #4a5470; font-size: 14px; }
.hk-account__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hk-account .hk-btn { color: var(--fg); white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
.hk-account .hk-btn--ghost { --fg: var(--hk-navy-900); --bd: rgba(27, 34, 54, .35); }
.hk-account .hk-btn--ghost:hover { --bd: var(--hk-navy-900); background: rgba(27, 34, 54, .05); }

/* Formulaires réels du plugin, habillés */
.hk-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; gap: 24px; }
.hk-panel {
	padding: clamp(20px, 4vw, 36px);
	border-radius: var(--hk-radius-card);
	background: #fff;
	color: #1b2236;
	box-shadow: 0 0 0 1px rgba(255, 138, 29, .35), 0 20px 50px rgba(0, 0, 0, .35);
}
.hk-panel h2 { margin: 0 0 22px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--hk-navy-900); }
.hk-access .hk-panel { font-size: 15px; }
/* Champs : un rythme unique pour les deux formulaires (Superio .form-group, CMB2 .cmb-row). */
.hk-access .hk-panel .form-group,
.hk-access .hk-panel .cmb-row { margin: 0 0 18px; padding: 0; border: 0; }
.hk-access .hk-panel .cmb-th,
.hk-access .hk-panel .cmb-td { float: none; width: 100%; padding: 0; }
/* Libellés : <label> côté connexion, .cmb-th côté inscription CMB2 : même rendu. */
.hk-access .hk-panel label,
.hk-access .hk-panel .cmb-th { display: block; margin: 0 0 7px; padding: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: #1b2236; }
/* Ligne « Rester connecté / Mot de passe oublié » : alignée sur les champs (grille Bootstrap neutralisée). */
.hk-access .hk-panel .form-group.info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-left: 0; margin-right: 0; }
.hk-access .hk-panel .form-group.info > [class*="col-"] { float: none; width: auto; padding: 0; }
.hk-access .hk-panel .form-group.info::before,
.hk-access .hk-panel .form-group.info::after { display: none; } /* clearfix Bootstrap 3, sinon éléments flex fantômes */
.hk-access .hk-panel .required { color: var(--hk-orange-ink); }
.hk-access .hk-panel .form-control,
.hk-access .hk-panel .regular-text {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1.5px solid #d6deec;
	border-radius: var(--hk-radius-field);
	background: var(--hk-bg-light);
	color: #141b2d;
	font-size: 15px;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.hk-access .hk-panel [type="password"] { padding-right: 52px; }
.hk-access .hk-panel .form-control:hover,
.hk-access .hk-panel .regular-text:hover { border-color: #b4c1da; }
/* Focus visible au clavier comme à la souris (Superio retire les contours). */
.hk-access .hk-panel .form-control:focus,
.hk-access .hk-panel .regular-text:focus {
	outline: 2px solid transparent !important; /* reste visible en mode contraste élevé */
	border-color: var(--hk-orange);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(255, 138, 29, .22);
}
.hk-access .hk-panel ::placeholder { color: #8791a9; opacity: 1; }
.hk-access .hk-panel .toggle-password { color: #6b7590; }
.hk-access .hk-panel .toggle-password:hover { color: var(--hk-navy-800); }
.hk-access .hk-panel label.remember { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: inherit; font-weight: 500; }
.hk-access .hk-panel [type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--hk-orange); }
.hk-access .hk-panel .alert { margin: 0 0 18px; padding: 12px 14px; border: 0; border-left: 4px solid var(--hk-orange); border-radius: 10px; background: #fff4e8; color: #6b3400; font-size: 14px; }
.hk-access .hk-panel .alert-info,
.hk-access .hk-panel .alert-success { border-left-color: var(--hk-blue); background: #eef4ff; color: #12306e; }
/* Boutons d'envoi : connexion (.btn-theme) et inscription CMB2 (.button-primary). Style seul. */
.hk-access .hk-panel .btn-theme,
.hk-access .hk-panel .button-primary,
.hk-access .hk-panel [type="submit"] {
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid var(--hk-orange);
	border-radius: var(--hk-radius-btn);
	background: var(--hk-orange);
	color: var(--hk-navy-900);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .01em;
	text-transform: none; /* Superio force la casse « Titre » (« Inscrivez-Vous Maintenant ») */
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(255, 138, 29, .3);
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.hk-access .hk-panel .btn-theme:hover,
.hk-access .hk-panel .button-primary:hover,
.hk-access .hk-panel [type="submit"]:hover,
.hk-access .hk-panel .btn-theme:focus-visible,
.hk-access .hk-panel .button-primary:focus-visible,
.hk-access .hk-panel [type="submit"]:focus-visible {
	border-color: var(--hk-navy-800);
	background: var(--hk-navy-800);
	color: var(--hk-text);
	box-shadow: 0 10px 26px rgba(10, 24, 56, .35);
	transform: translateY(-1px);
}
.hk-access .hk-panel .btn-theme:focus-visible,
.hk-access .hk-panel .button-primary:focus-visible,
.hk-access .hk-panel [type="submit"]:focus-visible { outline: 3px solid var(--hk-orange) !important; outline-offset: 3px; }
.hk-access .hk-panel [type="submit"]:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(10, 24, 56, .3); }
.hk-access .hk-panel [type="submit"]:disabled { opacity: .6; cursor: not-allowed; transform: none; }
/* Envoi en cours : le plugin ajoute .loading au formulaire pendant la requête AJAX. */
.hk-access .hk-panel form.loading [type="submit"] { opacity: .75; cursor: progress; animation: hk-busy .8s ease-in-out infinite alternate; }
@keyframes hk-busy { to { opacity: .45; } }
.hk-access .hk-panel a:not(.btn) { color: var(--hk-navy-700); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.hk-access .hk-panel a:not(.btn):hover { color: var(--hk-orange-ink); }
.hk-access .hk-panel a:not(.btn):focus-visible { outline: 2px solid var(--hk-orange) !important; outline-offset: 2px; border-radius: 2px; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
	.hk-loader__orbit,
	.hk-loader__flare,
	.hk-loader__spinner,
	.hk-loader__tagline,
	.hk-swoosh { animation: none; }
	.hk-orb,
	.hk-orb__arrow,
	.hk-access .hk-panel [type="submit"] { transition: none; }
	.hk-access .hk-panel [type="submit"]:hover { transform: none; }
	.hk-access .hk-panel form.loading [type="submit"] { animation: none; }
	.hk-orb:hover,
	.hk-orb:focus-visible { transform: none; }
}
