/* L'ATELIER — page des calculateurs. Voir js/h2o-atelier.js. */
.at-intro { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.at-intro li { background: #fff; border: 1px solid #e3dccb; border-radius: 999px; padding: .4rem .8rem; font-weight: 700; font-size: .88rem; color: #0f2a2e; }
.at-intro li::before { content: "✓ "; color: #2f6f74; }

/* Quel calculateur pour moi ? */
.at-choix { margin: 2rem 0 1rem; padding: 1.25rem 1.4rem; background: #0f2a2e; color: #fff; border-radius: 18px; box-shadow: 0 12px 30px rgba(15,42,46,.18); }
.at-choix-titre { margin: 0 0 .8rem; font: 800 1.35rem/1.15 var(--font-sans); color: #fff; }
.at-choix-titre span { display: block; font-weight: 500; font-size: .95rem; color: rgba(255,255,255,.75); margin-top: .25rem; }
.at-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.at-chip { border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #fff; font: 700 .95rem/1 var(--font-sans);
  padding: .7rem 1rem; border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.at-chip:hover { border-color: #f4c430; transform: translateY(-1px); }
.at-chip[aria-pressed="true"] { background: #f4c430; border-color: #f4c430; color: #1a1a1a; }
.at-chip:focus-visible { outline: 3px solid #f4c430; outline-offset: 2px; }

.at-h2 { display: flex; align-items: center; gap: .6rem; font: 800 1.45rem/1.15 var(--font-sans); margin: 2.4rem 0 1rem; color: #0f2a2e; }
.at-h2 small { font: 700 .8rem/1 var(--font-sans); color: #6b736f; background: #efe9dc; padding: .35rem .55rem; border-radius: 999px; }
.at-pastille { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); }

.at-grille, .at-grille-v { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .at-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .at-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } .at-grille-v { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* La carte-outil */
.at-carte { position: relative; display: flex; flex-direction: column; background: #fff; color: #0f2a2e; text-decoration: none;
  border-radius: 16px; overflow: hidden; border: 1px solid #e7e1d3; box-shadow: 0 4px 14px rgba(15,42,46,.07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.at-carte:hover, .at-carte:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15,42,46,.16); border-color: var(--c); }
.at-carte:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.at-vis { display: grid; place-items: center; height: 110px; background:
  radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--c) 22%, #fff) 0%, color-mix(in srgb, var(--c) 8%, #fff) 70%); }
.at-vis svg { width: 132px; height: 77px; overflow: visible; }
.at-corps { display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.at-q { font: 800 1.12rem/1.2 var(--font-sans); }
.at-obt { font-size: .93rem; line-height: 1.4; color: #4b5653; }
.at-obt b { color: var(--c); font-weight: 800; }
.at-pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; }
.at-pills span { font: 700 .82rem/1 var(--font-sans); background: #f4f0e6; color: #3d4744; padding: .38rem .55rem; border-radius: 6px; }
.at-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem; margin-top: .4rem;
  background: var(--c); color: #fff; font: 800 .95rem/1 var(--font-sans); padding: .75rem 1rem; border-radius: 10px; transition: gap .15s; }
.at-carte:hover .at-btn { gap: .75rem; }

/* Vedettes : plus grandes, visuel plus haut */
.at-grande .at-vis { height: 150px; }
.at-grande .at-vis svg { width: 170px; height: 99px; }
.at-grande .at-q { font-size: 1.3rem; }
.at-grande::after { content: "Bon départ"; position: absolute; top: 12px; right: 12px; background: #f4c430; color: #1a1a1a;
  font: 800 .68rem/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; padding: .38rem .55rem; border-radius: 5px; }

/* ---- Les visuels : traits et couleurs ---- */
.at-vis svg text { font: 800 34px/1 var(--font-sans); fill: var(--c); }
.at-vis .at-dollar { fill: #0f2a2e; }
.at-trait { stroke: #0f2a2e; stroke-width: 4; stroke-linecap: round; fill: none; }
.at-sol { stroke: #0f2a2e; stroke-opacity: .25; stroke-width: 3; }
.at-pivot { fill: #0f2a2e; }
.at-b { fill: var(--c); transform-box: fill-box; transform-origin: bottom; }
.at-b2, .at-b4 { fill: color-mix(in srgb, var(--c) 55%, #fff); }
.at-plat { fill: var(--c); }
.at-plat2 { fill: color-mix(in srgb, var(--c) 50%, #fff); }
.at-fleau { transform-origin: 60px 18px; transform-box: view-box; }
.at-arc { stroke: #0f2a2e; stroke-opacity: .15; stroke-width: 10; fill: none; stroke-linecap: round; }
.at-arc-plein { stroke: var(--c); stroke-width: 10; fill: none; stroke-linecap: round; stroke-dasharray: 126; stroke-dashoffset: 40; }
.at-aiguille { transform-origin: 60px 60px; transform-box: view-box; transform: rotate(35deg); }
.at-ligne { stroke: var(--c); stroke-width: 5; fill: none; stroke-linecap: round; stroke-dasharray: 130; stroke-dashoffset: 0; }
.at-point { fill: var(--c); }
.at-cadran { fill: #fff; stroke: var(--c); stroke-width: 5; }
.at-heure, .at-minute { transform-origin: 60px 36px; transform-box: view-box; }
.at-bouclier { fill: var(--c); }
.at-check { stroke: #fff; stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; }

/* ---- Les mouvements : seulement quand la carte est à l'écran ---- */
.at-vivant .at-c1 { animation: atRoule 3.2s steps(1) infinite; }
.at-vivant .at-c2 { animation: atRoule 3.2s steps(1) infinite .25s; }
.at-vivant .at-c3 { animation: atRoule 3.2s steps(1) infinite .5s; }
@keyframes atRoule { 0% { transform: translateY(0) } 20% { transform: translateY(-42px) } 40% { transform: translateY(-84px) } 60% { transform: translateY(-126px) } 80%, 100% { transform: translateY(-168px) } }
.at-vivant .at-b1 { animation: atBarre 3s ease-in-out infinite; }
.at-vivant .at-b2 { animation: atBarre 3s ease-in-out infinite .2s; }
.at-vivant .at-b3 { animation: atBarre 3s ease-in-out infinite .4s; }
.at-vivant .at-b4 { animation: atBarre 3s ease-in-out infinite .6s; }
@keyframes atBarre { 0%, 100% { transform: scaleY(.3) } 50% { transform: scaleY(1) } }
.at-vivant .at-fleau { animation: atBalance 3.4s ease-in-out infinite; }
@keyframes atBalance { 0%, 100% { transform: rotate(-9deg) } 50% { transform: rotate(9deg) } }
.at-vivant .at-aiguille { animation: atAiguille 3s ease-in-out infinite; }
.at-vivant .at-arc-plein { animation: atArc 3s ease-in-out infinite; }
@keyframes atAiguille { 0%, 100% { transform: rotate(-70deg) } 55% { transform: rotate(40deg) } }
@keyframes atArc { 0%, 100% { stroke-dashoffset: 116 } 55% { stroke-dashoffset: 30 } }
.at-vivant .at-ligne { animation: atTrace 3.2s ease-in-out infinite; }
.at-vivant .at-point { animation: atPoint 3.2s ease-in-out infinite; }
@keyframes atTrace { 0% { stroke-dashoffset: 130 } 60%, 100% { stroke-dashoffset: 0 } }
@keyframes atPoint { 0%, 55% { opacity: 0; transform: scale(.4) } 70%, 100% { opacity: 1; transform: none } }
.at-point { transform-box: fill-box; transform-origin: center; }
.at-vivant .at-minute { animation: atTour 2.4s linear infinite; }
.at-vivant .at-heure { animation: atTour 14.4s linear infinite; }
@keyframes atTour { to { transform: rotate(360deg) } }
.at-vivant .at-check { animation: atCoche 2.8s ease-in-out infinite; }
.at-vivant .at-bouclier { animation: atPouls 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes atCoche { 0%, 15% { stroke-dashoffset: 40 } 45%, 100% { stroke-dashoffset: 0 } }
@keyframes atPouls { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.06) } }

/* Arrivée en cascade */
.at-carte { opacity: 0; transform: translateY(14px); }
.at-carte.at-vu { opacity: 1; transform: none; transition: opacity .45s ease calc(var(--i, 0) * 60ms), transform .45s ease calc(var(--i, 0) * 60ms), box-shadow .18s, border-color .18s; }
.at-carte.at-vu:hover { transform: translateY(-4px); }

@media (max-width: 640px) {
  .at-carte { flex-direction: row; }
  .at-vis { height: auto; width: 96px; flex: 0 0 96px; }
  .at-vis svg { width: 84px; height: 49px; }
  .at-grande { flex-direction: column; }
  .at-grande .at-vis { width: auto; height: 120px; }
  .at-q { font-size: 1.02rem; }
  .at-btn { padding: .6rem .85rem; font-size: .9rem; }
  .at-choix { padding: 1rem; }
  .at-chip { padding: .6rem .8rem; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .at-carte, .at-carte.at-vu { opacity: 1; transform: none; transition: none; }
  .at-vis * { animation: none !important; }
}
