/*
 * Générateur fêtes (EVJF, EVG, anniversaire, fêtes votives) : styles de l'interface.
 *
 * Tout est rangé sous .cpc-gen. Mobile d'abord. Couleurs reprises de
 * theme.json (--wp--preset--color--*) avec replis. La page fête redéfinit
 * --cpc-gen-accent et --cpc-gen-accent-texte (sur un parent ou sur .cpc-gen) ;
 * les règles lisent des alias internes --cg-* pour que cette redéfinition
 * l'emporte toujours sur les valeurs par défaut.
 */

/* ---------- Polices des modèles (auto-hébergées) ---------- */
/*
 * Polices SIL OFL (licences : ../fonts/fete/OFL-*.txt), fichiers variables woff2 en
 * sous-ensembles latin et latin-ext, servis par le site (plus aucun appel à Google :
 * traceurs coupés). Un fichier par famille, style et sous-ensemble : la plage de
 * graisses couvre toutes celles qu'emploient les modèles.
 */

@font-face {
	font-family: 'Fredoka';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/fete/fredoka-normal-400-700-latin-ext.woff2') format('woff2');
	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: 'Fredoka';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/fete/fredoka-normal-400-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Pacifico';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/pacifico-normal-400-latin-ext.woff2') format('woff2');
	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: 'Pacifico';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/pacifico-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Great Vibes';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/greatvibes-normal-400-latin-ext.woff2') format('woff2');
	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: 'Great Vibes';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/greatvibes-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Dancing Script';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/fete/dancingscript-normal-400-700-latin-ext.woff2') format('woff2');
	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: 'Dancing Script';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/fete/dancingscript-normal-400-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Caveat';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/fete/caveat-normal-400-700-latin-ext.woff2') format('woff2');
	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: 'Caveat';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/fete/caveat-normal-400-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Bebas Neue';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/bebasneue-normal-400-latin-ext.woff2') format('woff2');
	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: 'Bebas Neue';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/bebasneue-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Anton';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/anton-normal-400-latin-ext.woff2') format('woff2');
	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: 'Anton';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/anton-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Alfa Slab One';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/alfaslabone-normal-400-latin-ext.woff2') format('woff2');
	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: 'Alfa Slab One';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/alfaslabone-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Abril Fatface';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/abrilfatface-normal-400-latin-ext.woff2') format('woff2');
	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: 'Abril Fatface';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/abrilfatface-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Playfair Display';
	font-style: italic;
	font-weight: 400 900;
	font-display: swap;
	src: url('../fonts/fete/playfairdisplay-italic-400-900-latin-ext.woff2') format('woff2');
	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: 'Playfair Display';
	font-style: italic;
	font-weight: 400 900;
	font-display: swap;
	src: url('../fonts/fete/playfairdisplay-italic-400-900-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Playfair Display';
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url('../fonts/fete/playfairdisplay-normal-400-900-latin-ext.woff2') format('woff2');
	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: 'Playfair Display';
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url('../fonts/fete/playfairdisplay-normal-400-900-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Monoton';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/monoton-normal-400-latin-ext.woff2') format('woff2');
	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: 'Monoton';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/monoton-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Press Start 2P';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/pressstart2p-normal-400-latin-ext.woff2') format('woff2');
	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: 'Press Start 2P';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/pressstart2p-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Rye';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/rye-normal-400-latin-ext.woff2') format('woff2');
	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: 'Rye';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/rye-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Bungee';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/bungee-normal-400-latin-ext.woff2') format('woff2');
	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: 'Bungee';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/bungee-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Righteous';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/righteous-normal-400-latin-ext.woff2') format('woff2');
	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: 'Righteous';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/righteous-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Shrikhand';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/shrikhand-normal-400-latin-ext.woff2') format('woff2');
	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: 'Shrikhand';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/fete/shrikhand-normal-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Fin des polices des modèles ---------- */

.cpc-gen {
	--cg-accent: var(--cpc-gen-accent, var(--wp--preset--color--petrole, #0e3a49));
	--cg-accent-texte: var(--cpc-gen-accent-texte, #fff);
	--cg-accent-doux: var(--cpc-gen-accent-doux, var(--wp--preset--color--ciel, #e4f1ef));
	--cg-encre: var(--cpc-gen-encre, var(--wp--preset--color--noir, #12242a));
	--cg-attenue: var(--cpc-gen-attenue, #4a5b62);
	--cg-fond: var(--cpc-gen-fond, var(--wp--preset--color--creme, #f8f4e9));
	--cg-carte: var(--cpc-gen-carte, var(--wp--preset--color--blanc, #fff));
	--cg-bord: var(--cpc-gen-bord, var(--wp--preset--color--sable, #d9c89c));
	--cg-bord-saisie: #8a8064;
	--cg-focus: var(--cpc-gen-focus, var(--cg-accent));
	--cg-ok: #2e6b2f;
	--cg-ok-fond: #e6f2e3;
	--cg-attention: #8a4b00;
	--cg-attention-fond: #fff1d9;
	--cg-erreur: #b3261e;
	--cg-erreur-fond: #fce8e6;
	--cg-rayon: var(--cpc-gen-rayon, 14px);
	--cg-police: var(--wp--preset--font-family--body, 'Nunito Sans', 'Segoe UI', sans-serif);
	--cg-police-titre: var(--wp--preset--font-family--display, 'Fredoka', ui-rounded, 'Segoe UI', sans-serif);

	color: var(--cg-encre);
	font-family: var(--cg-police);
	font-size: 1rem;
	line-height: 1.5;
	width: 100%;
}

.cpc-gen *,
.cpc-gen *::before,
.cpc-gen *::after {
	box-sizing: border-box;
}

/* L'attribut hidden l'emporte sur toutes les mises en page ci-dessous. */
.cpc-gen [hidden] {
	display: none !important;
}

.cpc-gen p {
	margin: 0 0 0.5rem;
}

.cpc-gen-vh {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Focus visible ---------- */

.cpc-gen :focus {
	outline: 3px solid var(--cg-focus);
	outline-offset: 2px;
}

.cpc-gen :focus:not(:focus-visible) {
	outline: none;
}

.cpc-gen-choix input:focus + .cpc-gen-choix-corps {
	outline: 3px solid var(--cg-focus);
	outline-offset: 2px;
}

.cpc-gen-choix input:focus:not(:focus-visible) + .cpc-gen-choix-corps {
	outline: none;
}

/* ---------- Étapes ---------- */

.cpc-gen-etape {
	background: var(--cg-carte);
	border: 1px solid var(--cg-bord);
	border-radius: var(--cg-rayon);
	margin: 0 0 0.75rem;
	overflow: visible;
	/* Le titre d'une étape ouverte s'arrête sous l'en-tête collant du site. */
	scroll-margin-top: calc(var(--crocoprint-entete, 100px) + 0.5rem);
}

.cpc-gen-etape--ouverte {
	border-color: var(--cg-accent);
	box-shadow: 0 6px 20px rgba(14, 58, 73, 0.08);
}

.cpc-gen-etape-entete {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.cpc-gen-etape-bouton {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 60px;
	padding: 0.75rem 3rem 0.75rem 0.9rem;
	border: 0;
	border-radius: var(--cg-rayon);
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	position: relative;
}

.cpc-gen-etape-bouton::after {
	content: '';
	position: absolute;
	right: 1.2rem;
	top: 50%;
	width: 0.6rem;
	height: 0.6rem;
	margin-top: -0.4rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.cpc-gen-etape-bouton[aria-expanded="true"]::after {
	transform: rotate(-135deg);
	margin-top: -0.1rem;
}

.cpc-gen-etape-bouton:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.cpc-gen-etape-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--cg-accent);
	color: var(--cg-accent-texte);
	font-family: var(--cg-police-titre);
	font-weight: 600;
	font-size: 1.1rem;
}

.cpc-gen-etape-textes {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cpc-gen-etape-titre {
	font-family: var(--cg-police-titre);
	font-weight: 600;
	font-size: 1.2rem;
	line-height: 1.25;
}

.cpc-gen-etape-resume {
	color: var(--cg-attenue);
	font-size: 0.9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cpc-gen-etape-resume:empty {
	display: none;
}

.cpc-gen-etape-corps {
	padding: 0.25rem 0.9rem 1.1rem;
}

.cpc-gen-sous-titre {
	font-family: var(--cg-police-titre);
	font-weight: 600;
	font-size: 1.1rem;
	margin: 1.25rem 0 0.5rem;
}

/* ---------- Boutons ---------- */

.cpc-gen-bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.55rem 1.2rem;
	border: 2px solid var(--cg-accent);
	border-radius: 999px;
	background: var(--cg-carte);
	color: var(--cg-accent);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.cpc-gen-bouton:hover {
	background: var(--cg-accent-doux);
}

.cpc-gen-bouton--principal {
	background: var(--cg-accent);
	color: var(--cg-accent-texte);
}

.cpc-gen-bouton--principal:hover {
	background: var(--cg-accent);
	filter: brightness(0.92);
}

.cpc-gen-bouton--discret {
	border-color: var(--cg-bord-saisie);
	color: var(--cg-encre);
	font-weight: 600;
}

.cpc-gen-bouton--large {
	width: 100%;
	min-height: 52px;
	font-size: 1.05rem;
}

.cpc-gen-bouton:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	filter: none;
}

.cpc-gen-lien {
	display: inline;
	min-height: 44px;
	padding: 0.4rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: underline;
	cursor: pointer;
}

.cpc-gen-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.6rem;
	margin-top: 1.1rem;
}

.cpc-gen-actions--gauche {
	justify-content: flex-start;
	margin-top: 0.75rem;
}

/* ---------- Étape 1 : modèles ---------- */

.cpc-gen-onglets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.25rem 0 1rem;
}

.cpc-gen-onglet,
.cpc-gen-segment {
	border-color: var(--cg-bord-saisie);
	color: var(--cg-encre);
	font-weight: 600;
}

.cpc-gen-onglet[aria-pressed="true"],
.cpc-gen-segment[aria-pressed="true"] {
	background: var(--cg-accent);
	border-color: var(--cg-accent);
	color: var(--cg-accent-texte);
}

.cpc-gen-modeles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpc-gen-modeles > li {
	margin: 0;
	display: flex;
}

.cpc-gen-modele {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.3rem;
	width: 100%;
	padding: 0.5rem 0.5rem 0.75rem;
	border: 2px solid var(--cg-bord);
	border-radius: var(--cg-rayon);
	background: var(--cg-carte);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cpc-gen-modele:hover {
	border-color: var(--cg-accent);
}

.cpc-gen-modele[aria-pressed="true"] {
	border-color: var(--cg-accent);
	box-shadow: 0 0 0 2px var(--cg-accent);
}

.cpc-gen-modele-nom {
	font-family: var(--cg-police-titre);
	font-weight: 600;
	font-size: 1.05rem;
	line-height: 1.25;
	margin-top: 0.25rem;
	/* Noms allemands longs (« Handgeschriebener ») : coupés plutôt que de sortir de la carte. */
	overflow-wrap: break-word;
}

.cpc-gen-modele-resume {
	color: var(--cg-attenue);
	font-size: 0.85rem;
	line-height: 1.35;
}

.cpc-gen-badge {
	position: absolute;
	top: 0.9rem;
	left: 0.9rem;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--cg-accent);
	color: var(--cg-accent-texte);
	font-size: 0.75rem;
	font-weight: 700;
}

/* Carte « Votre visuel » : devant (cadre « Votre visuel ») et dos côte à côte. */
.cpc-gen-modele-duo {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.3rem;
}

/* ---------- Scène : mockup <img> + dessin <canvas> ---------- */

.cpc-gen-scene {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: calc(var(--cg-rayon) - 4px);
	background-color: #eee;
	-webkit-user-select: none;
	user-select: none;
}

.cpc-gen-scene-img {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
	-webkit-user-drag: none;
}

.cpc-gen-scene-dessin {
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Plan du dessin : de la taille de la scène, il porte le canvas et le cadre photo.
   Scène zoomée : le mockup et le plan reçoivent la même transformation (generateur.js). */
.cpc-gen-scene-plan {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.cpc-gen-scene-img,
.cpc-gen-scene-plan {
	-webkit-transform-origin: 0 0;
	transform-origin: 0 0;
}

.cpc-gen-scene--zoom {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.cpc-gen-zoom-scene {
	white-space: nowrap;
}

/* Pendant le chargement, ou sans mockup : un carré de la couleur du textile. */
.cpc-gen-scene--attente::before,
.cpc-gen-scene--vide::before {
	content: '';
	display: block;
	padding-top: 100%;
}

.cpc-gen-scene--attente .cpc-gen-scene-img {
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0;
}

.cpc-gen-scene--vide .cpc-gen-scene-img {
	display: none;
}

.cpc-gen-scene--principale {
	max-width: 520px;
	margin: 0 auto;
}

/* Cadre photo : zone de recadrage posée sur l'aperçu. */
.cpc-gen-cadre {
	position: absolute;
	z-index: 2;
	pointer-events: auto;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0);
	transition: box-shadow 0.15s ease;
}

.cpc-gen-cadre:hover,
.cpc-gen-cadre:focus {
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.cpc-gen-cadre:focus {
	outline: 3px dashed var(--cg-focus);
	outline-offset: 3px;
}

/* Scène agrandie : traits du cadre ramenés à leur épaisseur à l'écran
   (--cpc-gen-zoom = facteur d'agrandissement, posé par generateur.js). */
.cpc-gen-scene--zoom .cpc-gen-cadre:hover,
.cpc-gen-scene--zoom .cpc-gen-cadre:focus {
	box-shadow: inset 0 0 0 calc(2px / var(--cpc-gen-zoom, 1)) rgba(255, 255, 255, 0.9), 0 0 0 calc(2px / var(--cpc-gen-zoom, 1)) rgba(0, 0, 0, 0.35);
}

.cpc-gen-scene--zoom .cpc-gen-cadre:focus {
	outline-width: calc(3px / var(--cpc-gen-zoom, 1));
	outline-offset: calc(3px / var(--cpc-gen-zoom, 1));
}

.cpc-gen-cadre--photo {
	cursor: grab;
	touch-action: none;
	-ms-touch-action: none;
}

.cpc-gen-cadre--actif {
	cursor: grabbing;
}

.cpc-gen-cadre--forme-rond {
	border-radius: 50%;
}

.cpc-gen-cadre--forme-arche {
	border-radius: 50% 50% 8px 8px / 35% 35% 8px 8px;
}

/* ---------- Étape 2 : atelier ---------- */

.cpc-gen-atelier {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

.cpc-gen-atelier-apercu {
	min-width: 0;
}

.cpc-gen-atelier-reglages {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.cpc-gen-outils-vue {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-bottom: 0.6rem;
}

.cpc-gen-outils-vue:empty {
	display: none;
}

.cpc-gen-segments {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.cpc-gen-segment {
	padding: 0.45rem 1rem;
}

.cpc-gen-legende {
	margin: 0.5rem 0 0;
	color: var(--cg-attenue);
	font-size: 0.9rem;
	text-align: center;
}

.cpc-gen-legende:empty {
	display: none;
}

.cpc-gen-recadrage {
	margin-top: 0.75rem;
	padding: 0.75rem;
	border-radius: var(--cg-rayon);
	background: var(--cg-fond);
}

.cpc-gen-zoom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}

.cpc-gen-zoom label {
	font-weight: 700;
}

.cpc-gen-curseur {
	flex: 1 1 10rem;
	min-width: 8rem;
	height: 44px;
	margin: 0;
	accent-color: var(--cg-accent);
	cursor: pointer;
}

.cpc-gen-dpi {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.6rem 0 0;
	padding: 0.45rem 0.7rem;
	border-radius: 10px;
	font-size: 0.92rem;
	font-weight: 600;
}

.cpc-gen-dpi:empty {
	display: none;
}

.cpc-gen-dpi::before {
	content: '';
	flex: 0 0 auto;
	width: 0.75rem;
	height: 0.75rem;
	margin-top: 0.35rem;
	border-radius: 50%;
	background: currentColor;
}

.cpc-gen-dpi--bon {
	background: var(--cg-ok-fond);
	color: var(--cg-ok);
}

.cpc-gen-dpi--moyen {
	background: var(--cg-attention-fond);
	color: var(--cg-attention);
}

.cpc-gen-dpi--faible {
	background: var(--cg-erreur-fond);
	color: var(--cg-erreur);
}

.cpc-gen-bloc {
	min-width: 0;
}

.cpc-gen-depot {
	padding: 1rem;
	border: 2px dashed var(--cg-bord-saisie);
	border-radius: var(--cg-rayon);
	background: var(--cg-fond);
	text-align: center;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cpc-gen-depot--survol {
	border-color: var(--cg-accent);
	background: var(--cg-accent-doux);
}

.cpc-gen-depot-titre {
	font-family: var(--cg-police-titre);
	font-weight: 600;
	font-size: 1.1rem;
}

/* Bloc logo : même dépôt que la photo ; l'indicateur de netteté reste aligné à gauche. */
.cpc-gen-depot--logo .cpc-gen-dpi {
	text-align: left;
}

.cpc-gen-droit-logo {
	margin: 0.25rem 0 0;
	font-weight: 600;
}

/* Conseil de résolution du visuel (pixels attendus pour la taille d'impression). */
.cpc-gen-conseil-visuel {
	margin: 0.35rem 0 0;
}

.cpc-gen-depot-boutons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0.5rem 0;
}

/* ---------- Champs ---------- */

.cpc-gen-champs {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.cpc-gen-champ label,
.cpc-gen-cellule > label,
.cpc-gen-libelle,
.cpc-gen-coller > label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 700;
}

.cpc-gen-facultatif {
	color: var(--cg-attenue);
	font-weight: 400;
}

/* 16 px minimum : iOS ne zoome pas la page au focus. */
.cpc-gen-saisie {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--cg-bord-saisie);
	border-radius: 10px;
	background: var(--cg-carte);
	color: var(--cg-encre);
	font: inherit;
	font-size: 1rem;
	line-height: 1.3;
}

select.cpc-gen-saisie {
	padding-right: 2rem;
	cursor: pointer;
}

textarea.cpc-gen-saisie {
	min-height: 8rem;
	resize: vertical;
	font-family: inherit;
}

.cpc-gen-saisie[aria-invalid="true"] {
	border: 2px solid var(--cg-erreur);
}

.cpc-gen-erreur-champ {
	margin: 0.3rem 0 0;
	color: var(--cg-erreur);
	font-size: 0.88rem;
	font-weight: 600;
}

.cpc-gen-erreur-champ:empty {
	display: none;
}

.cpc-gen-aide {
	color: var(--cg-attenue);
	font-size: 0.9rem;
}

.cpc-gen-aide:empty {
	display: none;
}

.cpc-gen-limite {
	margin: 0.4rem 0 0;
	color: var(--cg-encre);
	font-weight: 600;
}

/* ---------- Choix (radios en pastilles) ---------- */

.cpc-gen-groupe-choix {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.cpc-gen-groupe-choix > legend {
	padding: 0;
	margin-bottom: 0.4rem;
	font-weight: 700;
}

.cpc-gen-choix-liste {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.25rem 0 0.5rem;
}

.cpc-gen-choix {
	position: relative;
	display: inline-flex;
	cursor: pointer;
}

.cpc-gen-choix input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.cpc-gen-choix-corps {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 44px;
	padding: 0.4rem 0.9rem;
	border: 2px solid var(--cg-bord);
	border-radius: 999px;
	background: var(--cg-carte);
	line-height: 1.2;
	transition: border-color 0.15s ease;
}

.cpc-gen-choix:hover .cpc-gen-choix-corps {
	border-color: var(--cg-bord-saisie);
}

.cpc-gen-choix input:checked + .cpc-gen-choix-corps {
	border-color: var(--cg-accent);
	box-shadow: inset 0 0 0 1px var(--cg-accent);
	font-weight: 700;
}

.cpc-gen-choix-note {
	color: var(--cg-attenue);
	font-size: 0.8rem;
	font-weight: 400;
}

.cpc-gen-teinte {
	display: inline-block;
	flex: 0 0 auto;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.3);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.cpc-gen-encre-points {
	display: inline-flex;
}

.cpc-gen-encre-points > span {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.3);
}

.cpc-gen-encre-points > span + span {
	margin-left: -0.3rem;
}

.cpc-gen-note-encre {
	margin: 0;
}

.cpc-gen-mention {
	font-style: italic;
}

/* ---------- Étape 3 : l'équipe ---------- */

.cpc-gen-groupe {
	padding: 0.75rem;
	border-radius: var(--cg-rayon);
	background: var(--cg-fond);
}

.cpc-gen-groupe-titre {
	font-weight: 700;
}

.cpc-gen-groupe-ligne {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.6rem;
	margin-bottom: 0.6rem;
}

.cpc-gen-case {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0.9rem 0;
}

.cpc-gen-case input {
	flex: 0 0 auto;
	width: 1.4rem;
	height: 1.4rem;
	margin: 0.6rem 0 0;
	accent-color: var(--cg-accent);
	cursor: pointer;
}

/* Le libellé porte la cible tactile de 44 px. */
.cpc-gen-case label {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0.1rem 0;
	cursor: pointer;
	font-weight: 600;
}

.cpc-gen-equipe-entete {
	display: none;
}

.cpc-gen-equipe-liste {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Mobile : une carte par personne. */
.cpc-gen-personne {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0.6rem 0.75rem;
	margin: 0 0 0.75rem;
	padding: 0.75rem;
	border: 1px solid var(--cg-bord);
	border-radius: var(--cg-rayon);
	background: var(--cg-carte);
}

.cpc-gen-cellule {
	min-width: 0;
}

.cpc-gen-cellule--rang {
	grid-row: 1;
	grid-column: 1;
	align-self: center;
}

.cpc-gen-cellule--suppr {
	grid-row: 1;
	grid-column: 2;
	justify-self: end;
}

.cpc-gen-cellule--nom,
.cpc-gen-cellule--titre,
.cpc-gen-cellule--couleur,
.cpc-gen-cellule--support {
	grid-column: 1 / -1;
}

.cpc-gen-rang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.9rem;
	height: 1.9rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--cg-fond);
	border: 1px solid var(--cg-bord);
	font-weight: 700;
	font-size: 0.9rem;
}

.cpc-gen-pastille {
	display: inline-block;
	margin-top: 0.35rem;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: var(--cg-accent);
	color: var(--cg-accent-texte);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.4;
}

.cpc-gen-supprimer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--cg-bord-saisie);
	border-radius: 50%;
	background: var(--cg-carte);
	color: var(--cg-erreur);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.cpc-gen-supprimer:hover {
	background: var(--cg-erreur-fond);
}

.cpc-gen-supprimer:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	background: var(--cg-carte);
}

.cpc-gen-avec-teinte {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cpc-gen-avec-teinte .cpc-gen-saisie {
	flex: 1 1 auto;
	min-width: 0;
}

.cpc-gen-taille-unique {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--cg-attenue);
}

.cpc-gen-coller {
	margin-top: 0.75rem;
	padding: 0.75rem;
	border: 1px solid var(--cg-bord);
	border-radius: var(--cg-rayon);
	background: var(--cg-fond);
}

.cpc-gen-coller-retour {
	margin-top: 0.75rem;
}

.cpc-gen-remarques {
	margin: 0.4rem 0 0;
	padding-left: 1.2rem;
	font-size: 0.9rem;
}

.cpc-gen-equipe-total {
	margin: 1rem 0 0;
	font-weight: 700;
}

.cpc-gen-equipe-total:empty {
	display: none;
}

/* ---------- Alertes ---------- */

.cpc-gen-alerte {
	margin: 0.6rem 0;
	padding: 0.65rem 0.85rem;
	border-left: 4px solid currentColor;
	border-radius: 8px;
	font-weight: 600;
}

.cpc-gen-alerte--info {
	background: var(--cg-accent-doux);
	color: var(--cg-encre);
	border-left-color: var(--cg-accent);
}

.cpc-gen-alerte--ok {
	background: var(--cg-ok-fond);
	color: var(--cg-ok);
}

.cpc-gen-alerte--attention {
	background: var(--cg-attention-fond);
	color: var(--cg-attention);
}

.cpc-gen-alerte--erreur {
	background: var(--cg-erreur-fond);
	color: var(--cg-erreur);
}

/* ---------- Étape 4 : vérification ---------- */

.cpc-gen-galerie {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpc-gen-piece {
	margin: 0;
	padding: 0.6rem;
	border: 1px solid var(--cg-bord);
	border-radius: var(--cg-rayon);
	background: var(--cg-carte);
}

.cpc-gen-piece-vues {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.4rem;
}

.cpc-gen-piece-vue {
	margin: 0;
}

.cpc-gen-piece-vue figcaption {
	margin-top: 0.2rem;
	color: var(--cg-attenue);
	font-size: 0.8rem;
	text-align: center;
}

.cpc-gen-piece-infos {
	margin-top: 0.5rem;
}

.cpc-gen-piece-nom {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.cpc-gen-piece-textile {
	margin: 0.2rem 0 0;
	color: var(--cg-attenue);
	font-size: 0.9rem;
}

.cpc-gen-piece-role {
	display: inline-block;
	margin-top: 0.35rem;
	padding: 0.1rem 0.55rem;
	border: 1px solid var(--cg-bord-saisie);
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
}

.cpc-gen-piece-note {
	margin: 0.35rem 0 0;
	padding: 0.3rem 0.5rem;
	border-radius: 8px;
	background: var(--cg-accent-doux);
	font-size: 0.82rem;
	font-weight: 600;
}

.cpc-gen-piece-note--attention {
	background: var(--cg-attention-fond);
	color: var(--cg-attention);
}

.cpc-gen-recap-liste,
.cpc-gen-paliers {
	margin: 0;
	padding-left: 1.2rem;
}

.cpc-gen-recap-liste li,
.cpc-gen-paliers li {
	margin-bottom: 0.25rem;
}

.cpc-gen-prix {
	padding: 0.85rem;
	border-radius: var(--cg-rayon);
	background: var(--cg-fond);
}

.cpc-gen-prix-total {
	font-size: 1.1rem;
}

.cpc-gen-prix-total strong {
	font-family: var(--cg-police-titre);
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--cg-encre);
}

.cpc-gen-limite-bloc {
	margin-top: 0.75rem;
}

.cpc-gen-validations {
	margin-top: 1rem;
}

.cpc-gen-validations .cpc-gen-case {
	margin: 0.4rem 0;
}

.cpc-gen-erreurs {
	margin-top: 0.75rem;
}

.cpc-gen-erreurs:empty {
	display: none;
}

.cpc-gen-erreurs ul {
	margin: 0;
	padding: 0.5rem 0.75rem 0.5rem 1.8rem;
	border-radius: 8px;
	background: var(--cg-erreur-fond);
	color: var(--cg-erreur);
}

.cpc-gen-erreurs-titre {
	font-weight: 700;
	color: var(--cg-erreur);
}

.cpc-gen-progression {
	display: block;
	width: 100%;
	height: 12px;
	margin-top: 1rem;
	accent-color: var(--cg-accent);
}

.cpc-gen-statut {
	margin-top: 0.4rem;
	font-weight: 600;
}

.cpc-gen-statut:empty {
	display: none;
}

.cpc-gen-fichiers {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpc-gen-fichier {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--cg-bord);
}

.cpc-gen-fichier-textes {
	flex: 1 1 14rem;
	min-width: 0;
}

.cpc-gen-fichier-textes p {
	margin: 0;
}

.cpc-gen-fichier-libelle {
	font-weight: 700;
}

.cpc-gen-fichier-nom {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8rem;
	color: var(--cg-attenue);
	overflow-wrap: anywhere;
}

.cpc-gen-fichier-details {
	font-size: 0.88rem;
}

.cpc-gen-json {
	max-height: 26rem;
	margin: 0.5rem 0 0;
	padding: 0.85rem;
	overflow: auto;
	border-radius: 10px;
	background: var(--wp--preset--color--noir, #12242a);
	color: var(--wp--preset--color--creme, #f8f4e9);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.78rem;
	line-height: 1.45;
	white-space: pre;
}

/* Bon à tirer (facultatif, une fois pour tout le lot) */
.cpc-gen-case--bat {
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--cg-bord);
	border-radius: 10px;
	background: var(--cg-carte);
}

.cpc-gen-case--bat label {
	display: block;
	padding: 0.55rem 0;
	font-weight: 400;
}

.cpc-gen-case-aide {
	display: block;
	margin-top: 0.2rem;
	color: var(--cg-attenue);
	font-size: 0.88rem;
}

/* Mode réel : confirmation d'ajout au panier, message du serveur en cas de refus */
.cpc-gen-confirmation {
	margin-top: 1rem;
}

.cpc-gen-confirmation-titre {
	font-size: 1.05rem;
	font-weight: 700;
}

.cpc-gen-confirmation p {
	color: var(--cg-encre);
}

.cpc-gen-confirmation .cpc-gen-bouton {
	margin-top: 0.4rem;
}

.cpc-gen-message-serveur {
	font-weight: 400;
	overflow-wrap: anywhere;
}

/* ---------- Écrans plus larges ---------- */

@media (min-width: 480px) {
	.cpc-gen-galerie {
		grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	}

	.cpc-gen-groupe-ligne {
		grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	}
}

/* À partir de 640 px : l'équipe devient un tableau (défilement horizontal si besoin). */
@media (min-width: 640px) {
	.cpc-gen-etape-bouton {
		padding-left: 1.2rem;
	}

	.cpc-gen-etape-corps {
		padding: 0.25rem 1.2rem 1.4rem;
	}

	.cpc-gen-modeles {
		grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
	}

	.cpc-gen-equipe-defil {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.25rem;
	}

	.cpc-gen-equipe-entete,
	.cpc-gen-personne {
		display: grid;
		grid-template-columns: var(--cpc-gen-colonnes, 2.25rem minmax(8.5rem, 2fr) minmax(8.5rem, 1.4fr) minmax(6rem, 1fr) 2.75rem);
		gap: 0.5rem;
	}

	/* Au moins la somme des colonnes minimales : les filets suivent le défilement. */
	.cpc-gen-equipe-entete,
	.cpc-gen-equipe-liste {
		min-width: -webkit-min-content;
		min-width: min-content;
	}

	.cpc-gen-equipe-entete {
		padding: 0 0 0.35rem;
		border-bottom: 2px solid var(--cg-bord);
		color: var(--cg-attenue);
		font-size: 0.85rem;
		font-weight: 700;
	}

	.cpc-gen-personne {
		align-items: start;
		margin: 0;
		padding: 0.5rem 0;
		border: 0;
		border-bottom: 1px solid var(--cg-bord);
		border-radius: 0;
		background: transparent;
	}

	.cpc-gen-personne .cpc-gen-cellule {
		grid-row: auto;
		grid-column: auto;
	}

	.cpc-gen-cellule--rang {
		align-self: start;
		padding-top: 0.4rem;
	}

	.cpc-gen-cellule--suppr {
		justify-self: end;
	}

	/* Les intitulés sont dans l'en-tête : libellés des champs masqués à l'écran, gardés pour les lecteurs d'écran. */
	.cpc-gen-personne .cpc-gen-cellule > label,
	.cpc-gen-personne .cpc-gen-libelle {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

@media (min-width: 900px) {
	.cpc-gen-atelier {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		gap: 1.75rem;
		align-items: start;
	}

	/* L'aperçu reste visible pendant qu'on remplit les champs. */
	.cpc-gen-atelier-apercu {
		position: -webkit-sticky;
		position: sticky;
		top: 1rem;
		top: calc(var(--crocoprint-entete, 100px) + 1rem);
	}
}

/* ---------- Mouvements réduits ---------- */

@media (prefers-reduced-motion: reduce) {
	.cpc-gen *,
	.cpc-gen *::before,
	.cpc-gen *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Mode contraste forcé (Windows) ---------- */

@media (forced-colors: active) {
	.cpc-gen-choix input:checked + .cpc-gen-choix-corps,
	.cpc-gen-modele[aria-pressed="true"],
	.cpc-gen-onglet[aria-pressed="true"],
	.cpc-gen-segment[aria-pressed="true"] {
		outline: 3px solid Highlight;
	}
}
