/* ============================================================================
   H12, contrôle du fichier téléversé + studio de détourage.
   Accompagne assets/js/product-fichier.js. Reste dans le langage H12 :
   angles nets (rayons 2-3 px), Space Mono pour les libellés techniques,
   rouge en accent, noir d'encre pour les surfaces fortes.
   ========================================================================== */

/* Damier de transparence, réutilisé partout où on montre un PNG détouré. */
:root {
	--h12-damier:
		linear-gradient(45deg, #E8E8E8 25%, transparent 25%, transparent 75%, #E8E8E8 75%),
		linear-gradient(45deg, #E8E8E8 25%, transparent 25%, transparent 75%, #E8E8E8 75%);
	--h12-damier-pos: 0 0, 8px 8px;
	--h12-damier-taille: 16px 16px;
}

/* ============================================================
   1. Le rapport, sous la zone de dépôt
   ============================================================ */

.h12-fx-hote:empty { display: none; }
.h12-fx-hote { margin-top: 12px; }

.h12-fx {
	border: 1.5px solid var(--h12-border);
	border-left: 3px solid var(--h12-text-3);
	border-radius: var(--h12-radius-sm);
	background: #fff;
	padding: 14px 16px;
	animation: h12-fx-entre .22s var(--h12-ease) both;
}
@keyframes h12-fx-entre {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.h12-fx { animation: none; }
}

/* Coup de projecteur quand le client revient de la fenêtre d'aperçu : sans ça
   le rapport reste sous la fenêtre et personne ne le voit jamais. */
.h12-fx--attire {
	animation: h12-fx-entre .22s var(--h12-ease) both, h12-fx-attire 1.5s var(--h12-ease) both;
}
@keyframes h12-fx-attire {
	0%   { box-shadow: 0 0 0 0 rgba(196, 22, 28, .45); }
	18%  { box-shadow: 0 0 0 5px rgba(196, 22, 28, .28); }
	60%  { box-shadow: 0 0 0 5px rgba(196, 22, 28, .10); }
	100% { box-shadow: 0 0 0 0 rgba(196, 22, 28, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.h12-fx--attire { animation: none; box-shadow: 0 0 0 3px rgba(196, 22, 28, .25); }
}

.h12-fx--ok        { border-left-color: var(--h12-ok-text); }
.h12-fx--attention { border-left-color: #C77700; }
.h12-fx--probleme  { border-left-color: var(--h12-red); }

/* ---- En-tête : pastille + verdict + ligne technique ---- */
.h12-fx__tete { display: flex; align-items: center; gap: 11px; }

.h12-fx__pastille {
	flex: 0 0 auto;
	width: 26px; height: 26px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--h12-text-3);
	color: #fff;
}
.h12-fx--ok        .h12-fx__pastille { background: var(--h12-ok-text); }
.h12-fx--attention .h12-fx__pastille { background: #C77700; }
.h12-fx--probleme  .h12-fx__pastille { background: var(--h12-red); }
.h12-fx__pastille svg { width: 15px; height: 15px; fill: currentColor; }

.h12-fx__titres { min-width: 0; }
.h12-fx__verdict {
	margin: 0;
	font-family: var(--h12-font-body);
	font-weight: 800;
	font-size: 14px;
	color: var(--h12-ink);
	line-height: 1.2;
}
.h12-fx__meta {
	margin: 2px 0 0;
	font-family: var(--h12-font-mono);
	font-size: 10.5px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--h12-text-3);
}

/* ---- Les constats ---- */
.h12-fx__points {
	list-style: none;
	margin: 12px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--h12-border);
	display: flex; flex-direction: column; gap: 10px;
}
.h12-fx__point { display: flex; gap: 9px; align-items: flex-start; }
.h12-fx__ic {
	flex: 0 0 auto;
	width: 16px; height: 16px;
	margin-top: 1px;
	display: grid; place-items: center;
}
.h12-fx__ic svg { width: 14px; height: 14px; }
.h12-fx__point--ok        .h12-fx__ic svg { fill: var(--h12-ok-text); }
.h12-fx__point--attention .h12-fx__ic svg { fill: #C77700; }
.h12-fx__point--probleme  .h12-fx__ic svg { fill: var(--h12-red); }

.h12-fx__corps { min-width: 0; }
.h12-fx__pt-titre {
	display: block;
	font-weight: 700; font-size: 13.5px;
	color: var(--h12-ink); line-height: 1.35;
}
.h12-fx__pt-detail {
	display: block;
	margin-top: 1px;
	font-size: 12.5px; line-height: 1.55;
	color: var(--h12-text-2);
}

/* ---- Bouton « Retirer le fond » ---- */
.h12-fx__actions {
	margin-top: 13px; padding-top: 13px;
	border-top: 1px solid var(--h12-border);
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
}
.h12-fx__btn {
	flex: 0 0 auto;
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--h12-ink); color: #fff;
	border: none; border-radius: var(--h12-radius-sm);
	font-family: var(--h12-font-body); font-weight: 800;
	font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
	padding: 11px 18px; cursor: pointer; line-height: 1;
	transition: background var(--h12-t-fast), transform var(--h12-t-fast);
}
/* petit damier : le symbole universel de la transparence. À 14 px il faut
   des cases de 7 px, sinon on ne voit qu'un carré blanc. */
.h12-fx__btn::before {
	content: ''; width: 14px; height: 14px; flex: none;
	background:
		linear-gradient(45deg, #9A9A9A 25%, transparent 25%, transparent 75%, #9A9A9A 75%),
		linear-gradient(45deg, #9A9A9A 25%, transparent 25%, transparent 75%, #9A9A9A 75%);
	background-position: 0 0, 3.5px 3.5px;
	background-size: 7px 7px;
	background-color: #fff;
}
.h12-fx__btn:hover { background: var(--h12-red); }
.h12-fx__btn:active { transform: translateY(1px); }
.h12-fx__btn:focus-visible { outline: 2px solid var(--h12-red); outline-offset: 3px; }

.h12-fx__hint {
	flex: 1 1 220px;
	font-size: 11.5px; line-height: 1.45; color: var(--h12-text-3);
}

/* ---- Pendant l'analyse ---- */
.h12-fx--attente {
	display: flex; align-items: center; gap: 10px;
	border-left-color: var(--h12-border);
	font-size: 13px; color: var(--h12-text-2);
}
.h12-fx__spin {
	width: 15px; height: 15px; flex: none;
	border: 2px solid var(--h12-border);
	border-top-color: var(--h12-red);
	border-radius: 50%;
	animation: h12-fx-tourne .7s linear infinite;
}
@keyframes h12-fx-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.h12-fx__spin { animation-duration: 2.4s; }
}

/* ============================================================
   2. Le studio de détourage
   ============================================================ */

body.h12-studio-ouvert { overflow: hidden; }

.h12-studio {
	/* L'éditeur d'aperçu de Live Preview monte à 10 000 000 : il faut passer
	   au-dessus, sinon le studio s'ouvre derrière et on ne voit rien. */
	position: fixed; inset: 0; z-index: 10000001;
	display: grid; place-items: center;
	padding: 20px;
	background: rgba(10, 10, 10, .72);
	backdrop-filter: blur(3px);
	animation: h12-studio-fond .18s ease-out both;
}
@keyframes h12-studio-fond { from { opacity: 0; } to { opacity: 1; } }

.h12-studio__boite {
	width: min(720px, 100%);
	max-height: calc(100vh - 40px);
	display: flex; flex-direction: column;
	background: #fff;
	border-radius: var(--h12-radius-lg);
	box-shadow: var(--h12-shadow-dark);
	overflow: hidden;
	animation: h12-studio-entre .24s var(--h12-ease) both;
}
@keyframes h12-studio-entre {
	from { opacity: 0; transform: translateY(14px) scale(.985); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.h12-studio, .h12-studio__boite { animation: none; }
}

/* ---- Bandeau ---- */
.h12-studio__tete {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 15px 18px;
	background: var(--h12-ink); color: #fff;
}
.h12-studio__titre {
	margin: 0;
	font-family: var(--h12-font-mono);
	font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.h12-studio__titre::before {
	content: ''; display: inline-block; vertical-align: -1px;
	width: 8px; height: 8px; margin-right: 9px;
	background: var(--h12-red);
}
.h12-studio__x {
	background: none; border: none; color: #fff; cursor: pointer;
	font-size: 15px; line-height: 1; padding: 6px;
	opacity: .7; transition: opacity var(--h12-t-fast);
}
.h12-studio__x:hover { opacity: 1; }
.h12-studio__x:focus-visible { outline: 2px solid var(--h12-red); outline-offset: 2px; }

/* ---- Scène avant / après ---- */
.h12-studio__scene {
	position: relative;
	padding: 18px;
	background: var(--h12-bg-gray);
	overflow: auto;
}
.h12-studio__cadre {
	--h12-part: 50%;
	position: relative;
	max-width: 460px; margin: 0 auto;
	line-height: 0;
	cursor: ew-resize;
	user-select: none;
	border: 1px solid var(--h12-border);
	background: #fff;
	touch-action: none;
}
.h12-studio__avant img { display: block; width: 100%; height: auto; }

.h12-studio__apres {
	position: absolute; inset: 0;
	/* le résultat n'apparaît qu'à droite de la poignée */
	clip-path: inset(0 0 0 var(--h12-part));
	background: var(--h12-damier);
	background-position: var(--h12-damier-pos);
	background-size: var(--h12-damier-taille);
	background-color: #fff;
}
.h12-studio__apres canvas { display: block; width: 100%; height: 100%; }

/* cadre pointillé : ce qui sera gardé si on rogne */
.h12-studio__rognage {
	position: absolute;
	pointer-events: none;
	outline: 1.5px dashed var(--h12-red);
	outline-offset: 0;
}
.h12-studio__rognage[hidden] { display: none; }

.h12-studio__poignee {
	position: absolute; top: 0; bottom: 0;
	left: var(--h12-part);
	width: 2px; margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
	cursor: ew-resize;
}
.h12-studio__poignee span {
	position: absolute; top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 32px; height: 32px;
	background: #fff;
	border: 1.5px solid var(--h12-ink);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.h12-studio__poignee span::before,
.h12-studio__poignee span::after {
	content: ''; position: absolute; top: 50%; width: 0; height: 0;
	border-top: 4px solid transparent; border-bottom: 4px solid transparent;
	transform: translateY(-50%);
}
.h12-studio__poignee span::before { left: 6px;  border-right: 5px solid var(--h12-ink); }
.h12-studio__poignee span::after  { right: 6px; border-left:  5px solid var(--h12-ink); }

.h12-studio__etiq {
	position: absolute; top: 8px;
	font-family: var(--h12-font-mono);
	font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
	background: rgba(20, 20, 20, .78); color: #fff;
	padding: 3px 7px; line-height: 1.3;
	pointer-events: none;
}
.h12-studio__etiq--g { left: 8px; }
.h12-studio__etiq--d { right: 8px; }

.h12-studio__calcul {
	margin: 10px 0 0; text-align: center;
	font-family: var(--h12-font-mono);
	font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
	color: var(--h12-text-3);
}
.h12-studio__calcul[hidden] { display: none; }

/* ---- Réglages ---- */
.h12-studio__reglages { padding: 16px 18px; border-top: 1px solid var(--h12-border); }

/* Deux façons d'enlever : le fond connexe, ou toute la teinte.
   Repris de Zazzle (« Background only » / « All white in image »), parce que
   les deux cas existent pour de vrai : un logo troué veut garder son blanc
   intérieur, un logo plein veut s'en débarrasser partout. */
.h12-studio__modes {
	display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
	margin-bottom: 16px;
}
.h12-studio__mode {
	display: flex; flex-direction: column; gap: 2px;
	text-align: left; cursor: pointer;
	padding: 10px 12px;
	background: #fff;
	border: 1.5px solid var(--h12-border);
	border-radius: var(--h12-radius-sm);
	transition: border-color var(--h12-t-fast), background var(--h12-t-fast);
}
.h12-studio__mode:hover { border-color: var(--h12-ink); }
.h12-studio__mode.is-actif { border-color: var(--h12-red); background: #FFF6F6; }
.h12-studio__mode:focus-visible { outline: 2px solid var(--h12-ink); outline-offset: 2px; }
.h12-studio__mode-nom {
	font-family: var(--h12-font-body); font-weight: 800; font-size: 12.5px;
	color: var(--h12-ink); line-height: 1.25;
}
.h12-studio__mode-aide { font-size: 11px; line-height: 1.4; color: var(--h12-text-3); }

@media (max-width: 460px) {
	.h12-studio__modes { grid-template-columns: 1fr; }
}

.h12-studio__reglage { display: block; }
.h12-studio__lab {
	display: block;
	font-family: var(--h12-font-mono);
	font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
	color: var(--h12-ink);
}
.h12-studio__curseur {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: 3px; margin: 12px 0 8px;
	background: var(--h12-border);
	border-radius: 2px; cursor: pointer;
}
.h12-studio__curseur::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--h12-red); border: 2px solid #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .3); cursor: grab;
}
.h12-studio__curseur::-moz-range-thumb {
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--h12-red); border: 2px solid #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .3); cursor: grab;
}
.h12-studio__curseur:focus-visible { outline: 2px solid var(--h12-red); outline-offset: 4px; }
.h12-studio__aide {
	display: block;
	font-size: 12px; line-height: 1.5; color: var(--h12-text-2);
}

.h12-studio__cases { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.h12-studio__case {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 13px; font-weight: 600; color: var(--h12-ink); cursor: pointer;
}
.h12-studio__case input { width: 16px; height: 16px; accent-color: var(--h12-red); cursor: pointer; }

.h12-studio__alerte {
	margin: 14px 0 0; padding: 9px 12px;
	background: #FFF6E8; border-left: 3px solid #C77700;
	font-size: 12.5px; line-height: 1.5; color: #7a4a00;
}
.h12-studio__alerte[hidden] { display: none; }


/* ---- Choix de l'outil : fond uni ou gomme ---- */
.h12-studio__outils {
	display: flex; gap: 1px;
	background: var(--h12-border);
	border-bottom: 1px solid var(--h12-border);
}
.h12-studio__outil {
	flex: 1; padding: 12px 10px; cursor: pointer;
	background: #FAFAFA; border: none;
	font-family: var(--h12-font-body); font-weight: 800;
	font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
	color: var(--h12-text-3);
	border-bottom: 2px solid transparent;
	transition: color var(--h12-t-fast), background var(--h12-t-fast), border-color var(--h12-t-fast);
}
.h12-studio__outil:hover:not(:disabled) { color: var(--h12-ink); background: #fff; }
.h12-studio__outil.is-actif {
	background: #fff; color: var(--h12-ink); border-bottom-color: var(--h12-red);
}
.h12-studio__outil:disabled { opacity: .38; cursor: not-allowed; }
.h12-studio__outil:focus-visible { outline: 2px solid var(--h12-red); outline-offset: -3px; }

.h12-studio__panneau[hidden] { display: none; }
.h12-studio__panneau { display: flex; flex-direction: column; }

/* ---- Gestes de la gomme ---- */
.h12-studio__gestes { display: flex; gap: 8px; margin-bottom: 14px; }
.h12-studio__gestes--fin { margin: 14px 0 0; }
.h12-studio__geste,
.h12-studio__annule-trait,
.h12-studio__tout-remettre {
	flex: 1; padding: 10px 12px; cursor: pointer;
	background: #fff; border: 1.5px solid var(--h12-border);
	border-radius: var(--h12-radius-sm);
	font-family: var(--h12-font-body); font-weight: 700; font-size: 12.5px;
	color: var(--h12-ink);
	transition: border-color var(--h12-t-fast), background var(--h12-t-fast), color var(--h12-t-fast);
}
.h12-studio__geste:hover,
.h12-studio__annule-trait:hover,
.h12-studio__tout-remettre:hover { border-color: var(--h12-ink); }
.h12-studio__geste.is-actif {
	background: var(--h12-ink); border-color: var(--h12-ink); color: #fff;
}
.h12-studio__annule-trait,
.h12-studio__tout-remettre {
	font-weight: 600; font-size: 12px; color: var(--h12-text-2);
}
.h12-studio__geste:focus-visible,
.h12-studio__annule-trait:focus-visible,
.h12-studio__tout-remettre:focus-visible { outline: 2px solid var(--h12-red); outline-offset: 2px; }

.h12-studio__taille {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: 3px; margin: 12px 0 8px;
	background: var(--h12-border); border-radius: 2px; cursor: pointer;
}
.h12-studio__taille::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--h12-red); border: 2px solid #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .3); cursor: grab;
}
.h12-studio__taille::-moz-range-thumb {
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--h12-red); border: 2px solid #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .3); cursor: grab;
}
.h12-studio__taille:focus-visible { outline: 2px solid var(--h12-red); outline-offset: 4px; }

/* ---- La scène quand on gomme ---- */
/* Plus de comparaison à la poignée : on peint sur le résultat en entier. */
.h12-studio__cadre.is-gomme { cursor: none; }
.h12-studio__cadre.is-gomme .h12-studio__apres { clip-path: none; }
.h12-studio__cadre.is-gomme .h12-studio__poignee,
.h12-studio__cadre.is-gomme .h12-studio__etiq--g { display: none; }

/* Le cercle qui suit le curseur : sans lui on ne sait pas ce qu'on va effacer. */
.h12-studio__pinceau {
	position: absolute; pointer-events: none;
	transform: translate(-50%, -50%);
	border: 1.5px solid var(--h12-red);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .9) inset, 0 0 0 1px rgba(255, 255, 255, .6);
	border-radius: 50%;
	z-index: 4;
}
.h12-studio__pinceau[hidden] { display: none; }

/* ---- Pied ---- */
.h12-studio__pied {
	display: flex; justify-content: flex-end; gap: 10px;
	padding: 14px 18px;
	border-top: 1px solid var(--h12-border);
	background: #FAFAFA;
}
.h12-studio__annuler, .h12-studio__ok {
	font-family: var(--h12-font-body); font-weight: 800;
	font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
	padding: 12px 20px; border-radius: var(--h12-radius-sm);
	cursor: pointer; line-height: 1;
	transition: background var(--h12-t-fast), color var(--h12-t-fast);
}
.h12-studio__annuler {
	background: #fff; color: var(--h12-text-2);
	border: 1.5px solid var(--h12-border);
}
.h12-studio__annuler:hover { color: var(--h12-ink); border-color: var(--h12-ink); }
.h12-studio__ok {
	background: var(--h12-red); color: #fff; border: none;
}
.h12-studio__ok:hover { background: var(--h12-red-hover); }
.h12-studio__ok:disabled { background: var(--h12-text-3); cursor: default; }
.h12-studio__annuler:focus-visible,
.h12-studio__ok:focus-visible { outline: 2px solid var(--h12-ink); outline-offset: 3px; }

/* ---- Petits écrans ---- */
@media (max-width: 560px) {
	.h12-studio { padding: 0; }
	.h12-studio__boite { width: 100%; max-height: 100vh; border-radius: 0; }
	.h12-studio__pied { flex-direction: column-reverse; }
	.h12-studio__annuler, .h12-studio__ok { width: 100%; }
	.h12-fx__hint { flex-basis: 100%; }
}

/* ============================================================
   « Faites-le pour moi » dans le rapport de fichier
   ============================================================ */
/* Deuxième bouton du rapport : le détourage confié à l'atelier. Il est
   secondaire par le contour, pas par la taille : c'est souvent le bon choix
   pour une photo, et un lien discret le ferait manquer. */
/* Pas de damier ici : ce bouton ne rend pas un fond transparent, il confie le
   travail à quelqu'un. Garder l'icône dirait le contraire de ce qu'il fait. */
.h12-fx__btn--service::before { display: none; }
.h12-fx__btn--service {
	background: #fff;
	color: var(--h12-ink);
}
/* Barn2 pose « border: none » sur TOUT bouton d'un .wpo-field, avec deux classes
   et un élément. Sa feuille est chargée après la nôtre : à spécificité égale il
   gagne, il faut donc monter strictement au-dessus. Même piège que les pastilles
   de couleur dans product.css.

   Sans ce trait, le bouton secondaire n'a plus de contour : il ne se lit plus
   comme un bouton, juste comme du texte posé à côté du vrai. */
.wpo-field .h12-fx__actions button.h12-fx__btn--service {
	border: 1.5px solid var(--h12-ink);
}
.h12-fx__btn--service:hover { background: var(--h12-ink); color: #fff; }
.h12-fx__btn--service .h12-fx__prix {
	font-family: var(--h12-font-mono); font-size: 11px; opacity: .75; margin-left: 6px;
}

/* `hidden` ne masque rien quand la règle de classe pose `display: flex` : la
   déclaration de classe bat la feuille du navigateur. Sans ces deux lignes, le
   bandeau « c'est noté » s'affiche dès le départ et les boutons ne partent
   jamais. */
.h12-fx__actions[hidden],
.h12-fx__confie[hidden] { display: none; }

/* Une fois confié : le rapport le dit et propose de revenir en arrière. */
.h12-fx__confie {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	margin-top: 10px; padding: 9px 12px;
	border-radius: var(--h12-radius-sm);
	background: var(--h12-ok-bg); color: var(--h12-ok-text);
	font-size: 13px; font-weight: 600;
}
.h12-fx__confie-txt { flex: 1; min-width: 180px; }
.h12-fx__annule {
	background: none; border: 0; padding: 0; cursor: pointer;
	font: inherit; font-weight: 700; color: var(--h12-ok-text);
	text-decoration: underline; text-underline-offset: 2px;
}

/* ============================================================
   FORME DE DÉCOUPE (2026-08-25)

   Les vignettes sont des canevas dessinés par traceForme(), le même tracé
   que le masque final : le bouton montre exactement ce que le client va
   recevoir. Une icône CSS aurait fini par mentir.
   ============================================================ */
.h12-studio__formes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
	margin-bottom: 14px;
}
.h12-studio__forme {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	padding: 10px 4px 8px;
	background: #fff;
	border: 1.5px solid var(--h12-border);
	border-radius: var(--h12-radius-sm);
	cursor: pointer;
	transition: border-color var(--h12-t-fast), background var(--h12-t-fast);
}
.h12-studio__forme:hover { border-color: var(--h12-ink); }
.h12-studio__forme:focus-visible { outline: 2px solid var(--h12-red); outline-offset: 2px; }
.h12-studio__forme canvas { display: block; }
.h12-studio__forme-nom {
	font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center;
	color: var(--h12-text-2);
}
/* Choisie : le contour et le fond, pas seulement la couleur du nom. */
.h12-studio__forme.is-actif {
	border-color: var(--h12-ink);
	background: var(--h12-bg-gray);
	box-shadow: inset 0 0 0 1px var(--h12-ink);
}
.h12-studio__forme.is-actif .h12-studio__forme-nom { color: var(--h12-ink); font-weight: 700; }

/* Le zoom n'existe que s'il y a une forme à remplir. */
.h12-studio__zoom-bloc[hidden] { display: none; }
.h12-studio__zoom-val {
	font-family: var(--h12-font-mono); font-size: 11px; color: var(--h12-text-3);
	font-variant-numeric: tabular-nums;
}

/* L'avertissement du retrait de fond n'a rien à dire sous l'onglet Forme. */
.h12-studio__alerte--hors-sujet { display: none; }

/* Pendant le cadrage, le curseur dit que ça se glisse. */
.h12-studio__cadre.is-forme { cursor: grab; }
.h12-studio__cadre.is-forme:active { cursor: grabbing; }

/* Le rognage n'a plus rien à décider quand une forme est choisie : on le dit
   au lieu de laisser une case cochable qui ne fait plus rien. */
.h12-studio__case.is-inerte { opacity: .45; cursor: not-allowed; }
.h12-studio__case.is-inerte input { cursor: not-allowed; }

@media (max-width: 600px) {
	.h12-studio__formes { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
	.h12-studio__forme { padding: 8px 2px 6px; }
	.h12-studio__forme-nom { font-size: 10px; }
}

/* ============================================================
   DÉTOURAGE AUTOMATIQUE (2026-08-25)
   ============================================================ */
.h12-studio__ia-etat { margin-bottom: 12px; }
.h12-studio__ia-txt {
	margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--h12-text-2);
}

/* Une jauge, pas un tourniquet : le premier chargement fait 7 Mo et le client
   doit voir que ça avance, sinon il croit que c'est figé et il ferme. */
.h12-studio__jauge {
	height: 6px; border-radius: 3px; overflow: hidden;
	background: var(--h12-border);
}
.h12-studio__jauge[hidden] { display: none; }
.h12-studio__jauge span {
	display: block; height: 100%; width: 0;
	background: var(--h12-red);
	transition: width .18s linear;
}

.h12-studio__ia-go {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--h12-ink); color: #fff;
	border: 1.5px solid var(--h12-ink); border-radius: var(--h12-radius-sm);
	font-family: var(--h12-font-body); font-weight: 800;
	font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
	padding: 12px 20px; cursor: pointer; line-height: 1;
	transition: background var(--h12-t-fast), border-color var(--h12-t-fast);
}
.h12-studio__ia-go:hover:not(:disabled) { background: var(--h12-red); border-color: var(--h12-red); }
.h12-studio__ia-go:disabled { opacity: .5; cursor: progress; }
.h12-studio__ia-go[hidden] { display: none; }
.h12-studio__ia-reglage[hidden] { display: none; }
