/*
Theme Name: Extra Caramel Blueprint
Description: Le plan général d'Extra Caramel : papier quadrillé, encre bleue, notes à la main.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: extracaramel-blueprint
*/

.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks main { padding-block: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--xl); }
.wp-site-blocks main.is-flush { padding-block: 0; }

/* ---------- 1. Le papier quadrillé ---------- */
:root {
	--ec-ink: var(--wp--preset--color--primary);
	--ec-ink-dark: var(--wp--preset--color--text);
	--ec-paper: var(--wp--preset--color--background);
	--ec-grid: var(--wp--preset--color--grid);
	--ec-grid-major: var(--wp--preset--color--grid-major);
	--ec-stamp: var(--wp--preset--color--stamp);
	--ec-pencil: var(--wp--preset--color--pencil);
	--ec-line: 1.5px solid var(--ec-ink);
	--gx: 0px;
	--gy: 0px;
}
body {
	background-color: var(--ec-paper);
	background-image:
		linear-gradient(var(--ec-grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--ec-grid-major) 1px, transparent 1px),
		linear-gradient(var(--ec-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--ec-grid) 1px, transparent 1px);
	background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
	background-position: var(--gx) var(--gy);
}
::selection { background: var(--ec-ink); color: var(--ec-paper); }

/* ---------- 2. Typo utilitaire ---------- */
.ec-label {
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--ec-ink);
}
.ec-hand {
	font-family: var(--wp--preset--font-family--architects-daughter);
	font-size: var(--wp--preset--font-size--annotation);
	line-height: 1.15;
	color: var(--ec-ink);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}
.ec-inline-hand {
	display: inline-block;
	font-size: 0.55em;
	transform: rotate(-4deg) translateY(-0.35em);
	margin-left: 0.3em;
	vertical-align: top;
}
.ec-stamp {
	display: inline-block;
	color: var(--ec-stamp);
	border: 3px double var(--ec-stamp);
	padding: 6px 14px;
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transform: rotate(-5deg);
	opacity: 0.9;
}
h1, h2, h3, .wp-block-heading { text-transform: uppercase; letter-spacing: 0.01em; color: var(--ec-ink-dark); }
a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.ec-card__ref {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	margin-right: 6px;
	border: 1.5px solid var(--ec-ink);
	border-radius: 50%;
	font-size: 0.6875rem;
	letter-spacing: 0;
}

/* ---------- 3. Boutons ---------- */
.ec-btn .wp-block-button__link {
	border: var(--ec-line);
	transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.ec-btn .wp-block-button__link:hover,
.ec-btn .wp-block-button__link:focus-visible {
	background: var(--ec-paper);
	color: var(--ec-ink);
}
.ec-btn .wp-block-button__link:focus-visible { outline: 2px dashed var(--ec-stamp); outline-offset: 4px; }

/* ---------- 4. En-tête ---------- */
.ec-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: 14px clamp(1.25rem, 4vw, 2.5rem) !important;
	background: color-mix(in srgb, var(--ec-paper) 92%, transparent);
	border-bottom: var(--ec-line);
	gap: 12px 32px;
}
.ec-topbar__brand { gap: 18px; align-items: baseline; }
.ec-topbar__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--big-shoulders-display);
	font-weight: 800;
	font-size: 1.75rem;
	line-height: 1;
	text-transform: uppercase;
}
.ec-topbar__title a { color: var(--ec-ink-dark); text-decoration: none; }
.ec-topbar__meta { margin: 0; color: var(--ec-pencil); }
.ec-nav { gap: 26px; }
.ec-nav a { color: var(--ec-ink-dark); text-decoration: none; }
.ec-nav a:hover { color: var(--ec-ink); text-decoration: underline; }

/* ---------- 5. Le moyeu (accueil) ---------- */
.ec-hub {
	position: relative;
	min-height: 920px;
	margin: 0 !important;
	max-width: none !important;
	overflow: hidden;
	--tx: 0px;
	--ty: 0px;
}
.ec-hub .ec-card { --dx: 0px; --dy: 0px; }
.ec-hub::before {
	/* l'anneau de construction */
	content: "";
	position: absolute;
	left: calc(50% - 330px);
	right: calc(50% - 330px);
	top: calc(50% - 330px);
	bottom: calc(50% - 330px);
	border: 1.5px dashed var(--ec-grid-major);
	border-radius: 50%;
	pointer-events: none;
}
.ec-hub__spokes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ec-hub__spokes line { stroke: var(--ec-ink); stroke-width: 1.5; stroke-dasharray: 6 6; transition: stroke-dasharray 0.3s; }
.ec-hub__spokes line.is-on { stroke-dasharray: none; }

.ec-hub__center {
	position: absolute;
	left: 50%;
	top: 50%;
	width: clamp(260px, 22vw, 320px);
	height: clamp(260px, 22vw, 320px);
	transform: translate(-50%, -50%);
	border: 4px double var(--ec-ink);
	border-radius: 50%;
	background: var(--ec-paper);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	z-index: 3;
	margin: 0 !important;
}
.ec-hub__center > * { margin: 0 !important; }
.ec-hub__title {
	font-size: clamp(3.5rem, 6vw, 5.25rem) !important;
	font-weight: 800 !important;
	line-height: 0.88 !important;
	margin: 6px 0 4px !important;
}
.ec-hub__hand { font-size: 2rem; transform: rotate(-5deg); color: var(--ec-ink); }

.ec-card {
	position: absolute;
	width: 260px;
	padding: 16px 18px 18px;
	border: var(--ec-line);
	background: var(--ec-paper);
	z-index: 4;
	margin: 0 !important;
	transform: translate(calc(-50% + var(--tx) + var(--dx)), calc(-50% + var(--ty) + var(--dy)));
	transition: transform 0.6s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s;
}
.ec-card > * { margin-block: 0 !important; }
.ec-card > * + * { margin-top: 8px !important; }
.ec-card:hover { box-shadow: 4px 4px 0 var(--ec-grid-major); }
.ec-card__kicker { display: flex; align-items: center; }
.ec-card__title { font-size: 1.875rem !important; font-weight: 800 !important; line-height: 0.95 !important; }
.ec-card__text { font-size: 0.9375rem; line-height: 1.45; }
.ec-card .wp-block-buttons { margin-top: 12px !important; }
.ec-card__note {
	position: absolute;
	right: -14px;
	top: -30px;
	font-size: 1.25rem;
	transform: rotate(4deg);
	color: var(--ec-pencil);
	white-space: nowrap;
}
/* Disposition choisie par Nelson (16 h 31), mesurée depuis le centre du rond.
   Numéros dans le sens des aiguilles : 1 haut gauche, 2 haut droite, 3 droite, 4 gauche ; A et B en bas. */
.ec-card:nth-of-type(2) { left: calc(50% - 130px); top: calc(50% - 270px); } /* 1 Le studio créatif */
.ec-card:nth-of-type(3) { left: calc(50% + 140px); top: calc(50% - 265px); } /* 2 Vêtements & tatouage */
.ec-card:nth-of-type(4) { left: calc(50% + 335px); top: calc(50% - 15px); }  /* 3 Baron Co-Pack */
.ec-card:nth-of-type(5) { left: calc(50% - 335px); top: calc(50% - 15px); }  /* 4 BaronMag.com */
.ec-card:nth-of-type(6) { left: calc(50% - 195px); top: calc(50% + 230px); } /* A Événements */
.ec-card:nth-of-type(7) { left: calc(50% + 200px); top: calc(50% + 225px); } /* B Maison d'édition */
.ec-card--major { width: clamp(200px, 15vw, 230px); padding: 14px 16px 16px; border-width: 4px; border-style: double; }
.ec-card--major .ec-card__title { font-size: clamp(1.5rem, 1.8vw, 1.875rem) !important; }
.ec-card--major .ec-card__text { font-size: 0.875rem; line-height: 1.4; }
.ec-card--major .wp-block-button__link { padding: 10px 14px; font-size: 0.6875rem; }
.ec-card--minor { width: 190px; padding: 10px 12px 12px; }
.ec-card--minor .ec-card__title { font-size: 1.3125rem !important; }
.ec-card--minor .ec-card__text { font-size: 0.875rem; color: var(--ec-pencil); }
.ec-card__link a { text-decoration: none; color: var(--ec-ink); }
.ec-card__link a:hover { text-decoration: underline; }
.ec-hub__stamp { position: absolute; right: 4%; bottom: 5%; margin: 0 !important; z-index: 5; }
.ec-hub__aside {
	position: absolute;
	left: 4%;
	bottom: 5%;
	max-width: 260px;
	margin: 0 !important;
	transform: rotate(-3deg);
	color: var(--ec-pencil);
	z-index: 5;
}

/* ---------- 6. Feuilles (sections) ---------- */
.ec-sheet {
	position: relative;
	margin: 0 clamp(12px, 2vw, 24px) !important;
	padding-block: var(--wp--preset--spacing--xl) !important;
	border-top: var(--ec-line);
	max-width: none !important;
}
.ec-sheet__no { color: var(--ec-pencil); margin-bottom: 18px !important; }
.ec-sheet__title {
	font-size: clamp(2.75rem, 7vw, 5.5rem) !important;
	font-weight: 800 !important;
	line-height: 0.92 !important;
	margin: 0 0 var(--wp--preset--spacing--lg) !important;
}
.ec-sheet__title .ec-inline-hand { font-size: 0.42em; }

.ec-duo { gap: 0 !important; border: var(--ec-line); background: var(--ec-paper); }
.ec-duo__item { padding: 28px 32px 32px; }
.ec-duo__item + .ec-duo__item { border-left: var(--ec-line); }
.ec-duo__item > * { margin-block: 0 0 12px !important; }
.ec-photo { position: relative; max-width: 240px; margin: 4px 0 18px !important; border: var(--ec-line); padding: 8px; background: var(--ec-paper); }
.ec-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center top; filter: grayscale(1) contrast(1.15); }
.ec-photo::after { content: ""; position: absolute; inset: 8px 8px auto 8px; aspect-ratio: 1; background: var(--ec-ink); mix-blend-mode: screen; pointer-events: none; }
.ec-photo figcaption { margin: 6px 0 0; font: 500 10px/1.3 var(--wp--preset--font-family--ibm-plex-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ec-pencil); }
/* Le CV qui se déploie */
.ec-cv { margin-top: 18px !important; border-top: 1.5px dashed var(--ec-ink); padding-top: 12px; }
.ec-cv > summary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	border: 1.5px solid var(--ec-ink);
	font-family: var(--wp--preset--font-family--ibm-plex-mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ec-ink);
	cursor: pointer;
	list-style: none;
	transition: background-color 0.2s, color 0.2s;
}
.ec-cv > summary::-webkit-details-marker { display: none; }
.ec-cv > summary::after { content: "+"; font-size: 1rem; line-height: 1; transition: transform 0.3s; }
.ec-cv[open] > summary::after { transform: rotate(45deg); }
.ec-cv > summary:hover, .ec-cv[open] > summary { background: var(--ec-ink); color: var(--ec-paper); }
.ec-cv > summary:focus-visible { outline: 2px dashed var(--ec-stamp); outline-offset: 3px; }
.ec-cv > *:not(summary) { margin: 0 0 10px !important; }
.ec-cv > summary + * { margin-top: 18px !important; }
.ec-cv__head { color: var(--ec-pencil); margin-top: 16px !important; }
.ec-now { display: inline-block; margin-left: 6px; font-size: 1.125rem; transform: rotate(-3deg); color: var(--ec-stamp); }
.ec-cv__list { padding-left: 0; list-style: none; font-size: 0.9375rem; line-height: 1.5; }
.ec-cv__list li { position: relative; padding-left: 18px; margin-bottom: 4px; }
.ec-cv__list li::before { content: "—"; position: absolute; left: 0; color: var(--ec-ink); }
.ec-anim .ec-cv[open] > *:not(summary) { animation: ec-unfold 0.45s ease both; }
@keyframes ec-unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ec-duo__name { font-size: 2.75rem !important; font-weight: 800 !important; }

.ec-chrono__line {
	position: relative;
	gap: 0 !important;
	border-top: var(--ec-line);
	padding-top: 0;
}
.ec-chrono__step { position: relative; padding: 28px 18px 0 0; }
.ec-chrono__step::before {
	/* repère de cote */
	content: "";
	position: absolute;
	left: 0;
	top: -9px;
	width: 1.5px;
	height: 18px;
	background: var(--ec-ink);
}
.ec-chrono__step > * { margin: 0 0 8px !important; }
.ec-chrono__year {
	font-family: var(--wp--preset--font-family--big-shoulders-display);
	font-weight: 800;
	font-size: 3.5rem;
	line-height: 0.9;
	color: var(--ec-ink-dark);
}
.ec-chrono__text { font-size: 0.9375rem; line-height: 1.45; }

.ec-portes__grid { gap: 24px !important; }
.ec-door {
	position: relative;
	padding: 32px;
	border: 4px double var(--ec-ink);
	background: var(--ec-paper);
	transition: transform 0.3s, box-shadow 0.3s;
}
.ec-door:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ec-grid-major); }
.ec-door > * { margin: 0 0 14px !important; }
.ec-door__title { font-size: clamp(2.25rem, 3.4vw, 3rem) !important; font-weight: 800 !important; }
.ec-door__note { transform: rotate(-2deg); color: var(--ec-pencil); font-size: 1.125rem; }

/* ---------- 7b. Pages de détail (Maison d'édition, Événements) ---------- */
.ec-pagehead { border-top: 0; padding-block: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--lg) !important; }
.ec-pagehead__title { font-size: clamp(3.25rem, 9vw, 7rem) !important; font-weight: 800 !important; line-height: 0.9 !important; margin: 0 0 28px !important; }
.ec-pagehead__title .ec-inline-hand { font-size: 0.32em; }
.ec-pagehead__lead { max-width: 640px !important; margin-left: max(0px, calc((100% - 1200px) / 2)) !important; margin-right: auto !important; font-size: 1.125rem; }
.ec-back a { color: var(--ec-ink); text-decoration: none; }
.ec-back a:hover { text-decoration: underline; }
.ec-pubs { gap: 24px !important; align-items: start; }
.ec-pub {
	position: relative;
	padding: 14px 14px 18px;
	border: var(--ec-line);
	background: var(--ec-paper);
	transition: transform 0.3s, box-shadow 0.3s;
}
.ec-pub:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ec-grid-major); }
.ec-pub > * { margin: 0 0 8px !important; }
.ec-pub--now { border: 4px double var(--ec-ink); }
.ec-pub__years { margin-top: 14px !important; display: flex; align-items: center; }
.ec-pub__title { font-size: 1.75rem !important; font-weight: 800 !important; line-height: 0.95 !important; }
.ec-pubs--now .ec-pub__title { font-size: 2.25rem !important; }
.ec-pub__text { font-size: 0.9375rem; line-height: 1.45; }
.ec-pub__note { position: absolute; top: -30px; right: 0; transform: rotate(3deg); color: var(--ec-stamp); font-size: 1.125rem; white-space: nowrap; }
.ec-cover { position: relative; margin: 0 !important; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--ec-grid-major); background: var(--ec-paper); }
.ec-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(1) contrast(1.15); transition: filter 0.4s; }
.ec-cover:not(.ec-cover--blank)::after { content: ""; position: absolute; inset: 0; background: var(--ec-ink); mix-blend-mode: screen; transition: opacity 0.4s; pointer-events: none; }
.ec-pub:hover .ec-cover img { filter: none; }
.ec-pub:hover .ec-cover::after { opacity: 0; }
.ec-cover--blank {
	display: grid;
	place-items: center;
	background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ec-ink) 22%, transparent) 0 1.5px, transparent 1.5px 11px), var(--ec-paper);
	border: 1.5px dashed var(--ec-ink);
}
.ec-cover--blank .ec-hand { margin: 0 !important; padding: 4px 10px; background: var(--ec-paper); transform: rotate(-4deg); color: var(--ec-pencil); }
.ec-pubs--early .ec-cover { aspect-ratio: 4 / 3; }
.ec-pub--feature { gap: 28px !important; align-items: center; padding: 20px; max-width: 980px; }
.ec-pub--feature .ec-cover { aspect-ratio: auto; max-height: 520px; }
.ec-pub--feature .ec-cover img { height: auto; object-fit: contain; }
.ec-pub--feature .ec-pub__title { font-size: clamp(2.25rem, 4vw, 3.25rem) !important; }
.ec-pub--feature .ec-pub__text { font-size: 1.0625rem; }
.ec-pub--feature .ec-pub__note { top: -34px; right: 12px; }
.ec-pub__body > * { margin: 0 0 12px !important; }
.ec-pubs--events .ec-pub__text { font-size: 0.9375rem; }
@media (max-width: 899px) { .ec-pub--feature { grid-template-columns: 1fr !important; } }

@media (max-width: 899px) {
	.ec-pubs { grid-template-columns: 1fr 1fr !important; }
	.ec-pubs--now { grid-template-columns: 1fr !important; }
	.ec-pub__note { position: static; display: block; }
}
@media (max-width: 520px) { .ec-pubs { grid-template-columns: 1fr !important; } }

/* ---------- 7. Pied de page : le cartouche ---------- */
.ec-footer { padding: var(--wp--preset--spacing--lg) clamp(12px, 2vw, 24px) !important; }
.ec-cartouche {
	gap: 0 !important;
	border: 4px double var(--ec-ink);
	background: var(--ec-paper);
	grid-template-columns: 2fr 1fr 1fr 1fr !important;
}
.ec-cartouche__cell { padding: 18px 22px; }
.ec-cartouche__cell + .ec-cartouche__cell { border-left: var(--ec-line); }
.ec-cartouche__cell > * { margin: 0 0 6px !important; }
.ec-cartouche__name {
	font-family: var(--wp--preset--font-family--big-shoulders-display);
	font-weight: 800;
	font-size: 2.75rem;
	line-height: 0.9;
	text-transform: uppercase;
	color: var(--ec-ink-dark);
}
.ec-cartouche__sheet { font-family: var(--wp--preset--font-family--big-shoulders-display); font-weight: 800; font-size: 2rem; line-height: 1; }

/* ---------- 8. Mouvement (ajouté par le script) ---------- */
/* état initial des animations, posé par le script seulement */
/* Fiches déplaçables (ordinateur) */
@media (min-width: 900px) {
	.ec-anim .ec-card { cursor: grab; touch-action: none; user-select: none; }
	.ec-anim .ec-card a { cursor: pointer; }
	.ec-anim .ec-card.is-dragging { cursor: grabbing; transition: box-shadow 0.2s; animation-play-state: paused; box-shadow: 6px 6px 0 var(--ec-grid-major); z-index: 6; }
	.ec-anim .ec-card.is-moved { border-style: dashed; }
	.ec-anim .ec-card.is-moved.ec-card--major { border-style: double; border-color: var(--ec-stamp); }
}
.ec-hub__reset {
	position: absolute;
	right: 4%;
	top: 24px;
	z-index: 7;
	padding: 4px 10px;
	border: 1.5px solid var(--ec-ink);
	background: var(--ec-paper);
	color: var(--ec-ink);
	font-family: var(--wp--preset--font-family--architects-daughter);
	font-size: 1.125rem;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: rotate(-2deg);
	transition: opacity 0.3s;
}
.ec-hub__reset.is-on { opacity: 1; pointer-events: auto; }
.ec-hub__reset:hover { background: var(--ec-ink); color: var(--ec-paper); }
.ec-hub__reset:focus-visible { outline: 2px dashed var(--ec-stamp); outline-offset: 3px; }
.ec-hub__hint { position: absolute; left: 4%; top: 28px; margin: 0 !important; z-index: 5; color: var(--ec-pencil); transform: rotate(-3deg); font-size: 1.125rem; }
@media (max-width: 899px) { .ec-hub__hint, .ec-hub__reset { display: none; } }

/* L'arrivée : le moyeu grandit, les fiches sortent du centre, les rayons apparaissent. */
@media (min-width: 900px) {
	.ec-anim .ec-hub__center { opacity: 0; transform: translate(-50%, -50%) scale(0.7); transition: opacity 0.6s ease, transform 0.9s cubic-bezier(.2,1.3,.4,1); }
	.ec-anim .ec-hub.is-open .ec-hub__center { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.ec-anim .ec-hub__title { clip-path: inset(0 0 100% 0); transition: clip-path 0.7s cubic-bezier(.2,.7,.2,1) 0.35s; }
.ec-anim .ec-hub.is-open .ec-hub__title { clip-path: inset(0 0 -10% 0); }
.ec-anim .ec-hub__hand { clip-path: inset(0 100% 0 0); transition: clip-path 1s steps(14) 0.9s; }
.ec-anim .ec-hub.is-open .ec-hub__hand { clip-path: inset(-20% -10% -20% 0); }
.ec-anim .ec-hub::before { opacity: 0; transform: scale(0.6); transition: opacity 1s ease 0.2s, transform 1.2s cubic-bezier(.2,.7,.2,1) 0.2s; }
.ec-anim .ec-hub.is-open::before { opacity: 1; transform: none; }
.ec-anim .ec-hub.is-arriving .ec-card { opacity: 0; transition: transform 0.9s cubic-bezier(.2,1.25,.4,1), opacity 0.4s ease; }
.ec-anim .ec-hub.is-open .ec-card { opacity: 1; }
.ec-anim .ec-hub__spokes { opacity: 0; transition: opacity 0.8s ease 1s; }
.ec-anim .ec-hub.is-open .ec-hub__spokes { opacity: 1; }
.ec-anim .ec-hub__stamp, .ec-anim .ec-hub__aside { opacity: 0; transition: opacity 0.6s ease 1.6s, transform 0.45s cubic-bezier(.3,1.6,.5,1) 1.6s; }
.ec-anim .ec-hub.is-open .ec-hub__stamp, .ec-anim .ec-hub.is-open .ec-hub__aside { opacity: 0.9; }

/* Ensuite : les fiches flottent doucement, chacune à son rythme. */
@keyframes ec-float {
	0%, 100% { translate: 0 0; }
	50% { translate: 0 -7px; }
}
@media (min-width: 900px) {
	.ec-anim .ec-card { animation: ec-float 6s ease-in-out infinite; }
	.ec-anim .ec-card:nth-of-type(3) { animation-duration: 7s; animation-delay: -2s; }
	.ec-anim .ec-card:nth-of-type(4) { animation-duration: 5.5s; animation-delay: -4s; }
	.ec-anim .ec-card:nth-of-type(5) { animation-duration: 6.5s; animation-delay: -1s; }
	.ec-anim .ec-card:nth-of-type(6) { animation-duration: 7.5s; animation-delay: -3s; }
	.ec-anim .ec-card:nth-of-type(7) { animation-duration: 5s; animation-delay: -5s; }
}
.ec-anim .ec-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s, transform 0.7s; }
.ec-anim .ec-reveal.is-in { opacity: 1; transform: none; }
.ec-anim .ec-hand.ec-reveal { clip-path: inset(0 100% 0 0); opacity: 1; transform: none; transition: clip-path 1.1s steps(18); }
.ec-anim .ec-hand.ec-reveal.is-in { clip-path: inset(0 -10% 0 0); }
.ec-anim .ec-stamp.ec-reveal { opacity: 0; transform: rotate(-5deg) scale(1.6); transition: transform 0.45s cubic-bezier(.3,1.6,.5,1), opacity 0.2s; }
.ec-anim .ec-stamp.ec-reveal.is-in { opacity: 0.9; transform: rotate(-5deg) scale(1); }

/* ---------- 9. Mobile : la roue se déroule ---------- */
@media (max-width: 899px) {
	.ec-topbar__meta { display: none; }
	.ec-nav { gap: 14px; }
	.ec-hub { min-height: 0; padding: 32px clamp(16px, 4vw, 24px) 56px !important; display: flex; flex-direction: column; align-items: center; gap: 28px; }
	.ec-hub::before, .ec-hub__spokes { display: none; }
	.ec-hub__center, .ec-card, .ec-hub__stamp, .ec-hub__aside { position: relative; left: auto !important; top: auto !important; right: auto; bottom: auto; transform: none; }
	.ec-hub__center { width: 280px; height: 280px; }
	.ec-card { width: 100%; max-width: 420px; }
	.ec-card + .ec-card::before, .ec-hub__center + .ec-card::before {
		content: "";
		position: absolute;
		left: 50%;
		top: -29px;
		height: 28px;
		border-left: 1.5px dashed var(--ec-ink);
	}
	.ec-card__note { right: 8px; }
	.ec-hub__stamp { transform: rotate(-5deg); }
	.ec-hub__aside { transform: rotate(-2deg); text-align: center; }
	.ec-duo { flex-direction: column; }
	.ec-duo__item + .ec-duo__item { border-left: 0; border-top: var(--ec-line); }
	.ec-chrono__line { grid-template-columns: 1fr 1fr !important; row-gap: 28px !important; }
	.ec-portes__grid { grid-template-columns: 1fr !important; }
	.ec-cartouche { grid-template-columns: 1fr 1fr !important; }
	.ec-cartouche__main { grid-column: 1 / -1; }
	.ec-cartouche__cell + .ec-cartouche__cell { border-left: 0; border-top: var(--ec-line); }
	.ec-sheet__title .ec-inline-hand { display: block; font-size: 0.5em; margin: 10px 0 0 0.2em; transform: rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 900px) {
	.ec-card { transform: translate(-50%, -50%) !important; }
}
