/* « On garde ta semaine au chaud ? » (popotam-mail-wow.js, 30/11/2026). Écrite à la main, classes `ac-`.
   La scène vit DANS le voile orange de la sortie de la création (popotam-creation-ui.js, sortieOrange), z-index du voile. */
.ac {
  --ac-ink: #2A211B; --ac-ink2: #6A5C4C; --ac-cream: #FFF8EA; --ac-cream2: #FCEFD9; --ac-line: #F0E5CF;
  --ac-orange: #F0682F; --ac-orange-d: #DA541E; --ac-sun: #FFC53D; --ac-green: #33A15B; --ac-red: #8E1F0E;
  --ac-fd: "Bricolage Grotesque", system-ui, sans-serif; --ac-fb: "Hanken Grotesk", system-ui, sans-serif; --ac-fh: "Caveat", cursive;
  --ac-spring: cubic-bezier(.3, 1.35, .45, 1); --ac-out: cubic-bezier(.2, .8, .2, 1);
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  font-family: var(--ac-fb); color: #fff; text-align: center;
  background: radial-gradient(120% 80% at 50% 18%, #F7894F 0%, var(--ac-orange) 46%, #E85A22 100%);
}
html.ac-bloque, html.ac-bloque body { overflow: hidden !important; }
.ac *, .ac *::before, .ac *::after { box-sizing: border-box; }
.ac button { font: inherit; cursor: pointer; border: 0; -webkit-tap-highlight-color: transparent; }
.ac.ac-sort { animation: acSort .26s var(--ac-out) both; }
@keyframes acSort { to { opacity: 0; transform: scale(1.03); } }

/* Le fond : des rayons de soleil qui tournent doucement, des bulles aux couleurs des plats qui montent. */
.ac-fond { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.ac-rayons { position: absolute; left: 50%; top: 30%; width: 0; height: 0; animation: acTourne 60s linear infinite; }
.ac-rayons i { position: absolute; left: -60px; bottom: 0; width: 120px; height: 140vmax; transform-origin: 50% 100%; transform: rotate(var(--r));
  background: linear-gradient(to top, rgba(255, 230, 170, .16), rgba(255, 230, 170, 0)); clip-path: polygon(50% 100%, 0 0, 100% 0); }
@keyframes acTourne { to { transform: rotate(360deg); } }
.ac-bulles i { position: absolute; bottom: -40px; width: var(--s); height: var(--s); border-radius: 50%; opacity: .55;
  animation: acMonte var(--t) linear var(--d) infinite; }
@keyframes acMonte { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: .55; } 100% { transform: translateY(-115vh) scale(1.1); opacity: 0; } }

/* Les confettis : une pluie à l'entrée, un jet depuis l'enveloppe au merci. */
.ac-conf { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.ac-conf i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px;
  animation: acPluie var(--t) cubic-bezier(.25, .6, .5, 1) both; }
.ac-conf i.ac-rond { width: 11px; height: 11px; border-radius: 50%; }
@keyframes acPluie { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--x), 110vh) rotate(var(--rot)); opacity: 0; } }
.ac-conf i.ac-jet { top: 34%; animation-name: acJet; animation-timing-function: cubic-bezier(.15, .7, .4, 1); }
@keyframes acJet { 0% { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; } 35% { transform: translate(calc(var(--x) * .7), var(--y)) rotate(calc(var(--rot) * .4)) scale(1); }
  100% { transform: translate(var(--x), 80vh) rotate(var(--rot)); opacity: 0; } }

/* « Passer » en haut à droite, en plus de celui du bas : on ne le cherche jamais. */
.ac-passer-haut { position: fixed; z-index: 4; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; padding: 9px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .18) !important; color: #fff; font-weight: 700; font-size: 14.5px; backdrop-filter: blur(6px);
  opacity: 0; transition: background .2s, opacity .4s .9s; }
.ac-passer-haut:hover { background: rgba(255, 255, 255, .3) !important; }
.ac.ac-in .ac-passer-haut { opacity: 1; }
.ac.ac-fini .ac-passer-haut { display: none; }

.ac-col { position: relative; z-index: 2; width: 100%; max-width: 460px; margin: 0 auto; min-height: 100%;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 22px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: center; }

/* La scène : Popotam qui salue, à côté de l'enveloppe qui garde « ta semaine ». */
.ac-scene { position: relative; height: 196px; margin: 0 auto 6px; width: 300px; }
.ac-pop { position: absolute; left: -6px; bottom: -6px; width: 150px; transform: translateY(60px) scale(.4) rotate(-12deg); opacity: 0; filter: drop-shadow(0 10px 0 rgba(120, 40, 10, .18)); }
.ac-pop svg { width: 100%; height: auto; display: block; }
.ac.ac-in .ac-pop { animation: acPop .8s var(--ac-spring) .15s forwards, acFlotte 3.4s ease-in-out 1.2s infinite; }
@keyframes acPop { to { transform: none; opacity: 1; } }
@keyframes acFlotte { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(-2deg); } }

.ac-env { position: absolute; right: 0; bottom: 6px; width: 168px; height: 112px; transform: translateY(80px) rotate(14deg) scale(.5); opacity: 0; }
.ac.ac-in .ac-env { animation: acEnv .9s var(--ac-spring) .35s forwards; }
@keyframes acEnv { to { transform: rotate(5deg); opacity: 1; } }
.ac-env-dos { position: absolute; inset: 0; border-radius: 12px; background: #F3DFC0; box-shadow: 0 12px 0 rgba(120, 40, 10, .2); }
.ac-env-face { position: absolute; inset: 0; border-radius: 12px; z-index: 3;
  background: linear-gradient(to top right, var(--ac-cream) 50%, transparent 50.5%) left / 51% 100% no-repeat,
              linear-gradient(to top left, var(--ac-cream) 50%, transparent 50.5%) right / 51% 100% no-repeat;
  clip-path: inset(30% 0 0 0 round 0 0 12px 12px); }
.ac-env-face::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: linear-gradient(transparent, rgba(240, 104, 47, .07)); border-radius: 0 0 12px 12px; }
.ac-rabat { position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 4; transform-origin: 50% 0; transform: rotateX(0);
  background: #FBEBD1; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .5s var(--ac-out); }
.ac.ac-in .ac-rabat { animation: acRabat .55s var(--ac-out) .95s forwards; }
@keyframes acRabat { to { transform: rotateX(180deg); z-index: 0; } }
.ac-lettre { position: absolute; left: 10px; right: 10px; top: 12px; height: 96px; z-index: 2; border-radius: 8px; background: #fff; padding: 9px 10px 0;
  box-shadow: 0 2px 0 var(--ac-line); transform: translateY(0); display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.ac.ac-in .ac-lettre { animation: acLettre .7s var(--ac-spring) 1.25s forwards; }
@keyframes acLettre { to { transform: translateY(-58px); } }
.ac-lettre-t { font: 700 19px/1 var(--ac-fh); color: var(--ac-orange-d); white-space: nowrap; }
.ac-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: 100%; }
.ac-grille i { height: 11px; border-radius: 4px; background: var(--c); opacity: 0; transform: scale(.3); }
.ac.ac-in .ac-grille i { animation: acCase .4s var(--ac-spring) calc(var(--d) + .6s) forwards; }
@keyframes acCase { to { opacity: .9; transform: none; } }
.ac-tampon { position: absolute; z-index: 5; right: -14px; top: -26px; padding: 5px 11px; border-radius: 8px; border: 3px solid var(--ac-green); color: var(--ac-green);
  background: rgba(255, 255, 255, .92); font: 800 15px/1 var(--ac-fd); letter-spacing: .02em; text-transform: uppercase;
  transform: rotate(-14deg) scale(2.4); opacity: 0; pointer-events: none; }

/* Le merci : la lettre rentre, le rabat se referme, le tampon claque, l'enveloppe s'envole. */
.ac.ac-envoi .ac-lettre { animation: acRentre .45s var(--ac-out) forwards; transform: translateY(-58px); }
@keyframes acRentre { to { transform: translateY(0); } }
.ac.ac-envoi .ac-rabat { animation: acFerme .4s var(--ac-out) .35s both; }
@keyframes acFerme { from { transform: rotateX(180deg); z-index: 0; } to { transform: rotateX(0); z-index: 4; } }
.ac.ac-envoi .ac-tampon { animation: acTampon .38s cubic-bezier(.5, 1.6, .6, 1) .72s forwards; }
@keyframes acTampon { to { transform: rotate(-14deg) scale(1); opacity: 1; } }
.ac.ac-envoi .ac-env { animation: acEnvole .9s cubic-bezier(.55, -0.3, .7, .4) 1.15s both; transform: rotate(5deg); opacity: 1; }
@keyframes acEnvole { 0% { transform: rotate(5deg); } 25% { transform: translate(-6px, 8px) rotate(-3deg) scale(.96); } 100% { transform: translate(180px, -340px) rotate(28deg) scale(.4); opacity: 0; } }
.ac.ac-envoi .ac-pop { animation: acSaute .7s var(--ac-spring) .9s both; opacity: 1; transform: none; }
@keyframes acSaute { 0% { transform: none; } 40% { transform: translateY(-26px) rotate(-6deg) scale(1.04); } 100% { transform: none; } }
.ac.ac-fini .ac-env { opacity: 0; animation: none; }
.ac.ac-fini .ac-pop { left: 50%; margin-left: -75px; animation: acFlotte 3.4s ease-in-out infinite; opacity: 1; transform: none; }

/* Les textes */
.ac-txt { opacity: 0; transform: translateY(18px); }
.ac.ac-in .ac-ask { animation: acTxt .6s var(--ac-spring) .55s forwards; }
.ac.ac-fini .ac-merci { animation: acTxt .55s var(--ac-spring) forwards; }
@keyframes acTxt { to { opacity: 1; transform: none; } }
.ac-hand { display: block; font: 700 25px/1 var(--ac-fh); color: #FFE7A6; transform: rotate(-3deg); }
.ac h2 { margin: 6px 0 0; font: 800 31px/1.06 var(--ac-fd); letter-spacing: -.025em; text-wrap: balance; color: #fff; outline: none;
  text-shadow: 0 3px 0 rgba(140, 45, 10, .22); }
.ac-dd { margin: 12px auto 0; max-width: 34ch; font-size: 16px; line-height: 1.45; color: rgba(255, 255, 255, .94); text-wrap: pretty; }
.ac-dd b { color: #fff; }
.ac-sert { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.ac-sert li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px; background: rgba(255, 255, 255, .16);
  font-size: 15px; line-height: 1.35; color: #fff; }
.ac-sert b { font-weight: 800; }
.ac-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ac-cream); color: var(--ac-orange-d);
  box-shadow: 0 3px 0 rgba(140, 45, 10, .18); }

.ac-form { margin: 16px 0 0; display: grid; gap: 10px; }
.ac-f { position: relative; display: flex; align-items: center; height: 58px; border-radius: 18px; background: #fff; padding: 0 16px 0 48px;
  box-shadow: 0 5px 0 rgba(140, 45, 10, .22); transition: box-shadow .2s; }
.ac-f:focus-within { box-shadow: 0 5px 0 rgba(140, 45, 10, .22), 0 0 0 4px rgba(255, 231, 166, .85); }
.ac-f.ac-bad { box-shadow: 0 5px 0 rgba(140, 45, 10, .22), 0 0 0 3px var(--ac-red); }
.ac-mi { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ac-orange); display: grid; }
.ac-f input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: 600 17px var(--ac-fb); color: var(--ac-ink); }
.ac-f input::placeholder { color: #B5A591; font-weight: 500; }
.ac-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ac-shake { animation: acShake .4s; }
@keyframes acShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.ac-err { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--ac-cream); color: var(--ac-red); font-size: 14px; font-weight: 700; text-align: left; }

.ac-go { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 58px; border-radius: 18px;
  background: var(--ac-ink) !important; color: #fff; font: 800 17.5px var(--ac-fd); letter-spacing: -.01em;
  box-shadow: 0 5px 0 rgba(60, 20, 5, .35); transition: transform .25s var(--ac-spring), box-shadow .2s; }
.ac-go:hover { transform: translateY(-2px); }
.ac-go:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(60, 20, 5, .35); }
.ac-go svg { transition: transform .25s var(--ac-spring); }
.ac-go:hover svg { transform: translateX(4px); }
.ac-go.ac-done { background: var(--ac-green) !important; }
.ac-go.ac-busy { pointer-events: none; }
.ac-sp { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: acTourne .7s linear infinite; }

.ac-promis { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px 0 0; }
.ac-promis span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--ac-cream); color: var(--ac-ink);
  font-size: 13px; font-weight: 800; }
.ac-promis svg { color: var(--ac-orange); }
.ac-rien { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 9px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .9); }
.ac-passer { margin: 16px auto 0; display: block; padding: 13px 22px; border-radius: 999px; background: transparent !important; color: #fff;
  font-weight: 800; font-size: 15.5px; box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, .75); transition: background .2s, box-shadow .2s; }
.ac-passer:hover { background: rgba(255, 255, 255, .14) !important; box-shadow: inset 0 0 0 2.5px #fff; }
.ac button:focus-visible { outline: 3px solid #FFE7A6; outline-offset: 3px; }

.ac-merci .ac-dd { margin-bottom: 18px; }

/* « Je ne préfère pas » : l'enveloppe se range, Popotam passe au centre, « Pas de problème ! » entre. */
.ac.ac-vers-non .ac-ask { animation: acSortGauche .38s var(--ac-out) forwards; }
@keyframes acSortGauche { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-40px); } }
.ac.ac-vers-non .ac-lettre, .ac.ac-sur-non .ac-lettre { animation: acRentre .4s var(--ac-out) forwards; transform: translateY(-58px); }
.ac.ac-vers-non .ac-env, .ac.ac-sur-non .ac-env { animation: acEnvPart .45s var(--ac-out) .1s forwards; transform: rotate(5deg); opacity: 1; }
@keyframes acEnvPart { to { transform: translateY(30px) rotate(12deg) scale(.7); opacity: 0; } }
.ac.ac-sur-non .ac-pop { left: 50%; margin-left: -75px; opacity: 1; transform: none; animation: acSaute .6s var(--ac-spring), acFlotte 3.4s ease-in-out .6s infinite; }
.ac.ac-sur-non .ac-scene { height: 150px; }
.ac.ac-sur-non .ac-non { animation: acEntreDroite .5s var(--ac-spring) forwards; }
@keyframes acEntreDroite { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.ac-cle { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 12px 14px; border-radius: 18px; background: var(--ac-cream);
  color: var(--ac-ink); text-align: left; box-shadow: 0 5px 0 rgba(140, 45, 10, .22); border: 2px dashed #F3C9A8; }
.ac-cle-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #FCE3D8; color: var(--ac-orange-d); }
.ac-cle-u { min-width: 0; font: 600 14px/1.3 "JetBrains Mono", ui-monospace, monospace; color: var(--ac-ink2); overflow-wrap: anywhere; }
.ac-cle-u b { color: var(--ac-ink); font-weight: 800; }
.ac-cle-pop { animation: acClePop .5s var(--ac-spring); }
@keyframes acClePop { 40% { transform: scale(1.04) rotate(-1deg); } }
.ac-cle-b { display: flex; gap: 8px; margin: 10px 0 0; }
.ac-blanc { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 16px;
  background: #fff !important; color: var(--ac-orange-d); font: 800 15.5px var(--ac-fd); box-shadow: 0 4px 0 rgba(140, 45, 10, .2);
  transition: transform .25s var(--ac-spring); }
.ac-blanc:hover { transform: translateY(-2px); }
.ac-blanc.ac-ok { background: var(--ac-green) !important; color: #fff; }
.ac-astuce { margin: 10px auto 16px; max-width: 34ch; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .9); }
.ac-retour { display: block; margin: 14px auto 0; padding: 8px 12px; background: transparent !important; color: #fff; font-size: 14.5px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .6); }
@media (max-width: 600px) { .ac.ac-sur-non .ac-pop { margin-left: -64px; } .ac.ac-sur-non .ac-scene { height: 130px; } }
.ac.ac-calme.ac-sur-non .ac-env { opacity: 0; }
.ac-note { margin: -6px auto 18px; max-width: 34ch; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .9); }

@media (max-width: 600px) {
  .ac-col { justify-content: flex-start; padding-top: calc(50px + env(safe-area-inset-top, 0px)); }
  .ac-scene { height: 170px; width: 270px; }
  .ac-pop { width: 128px; }
  .ac.ac-fini .ac-pop { margin-left: -64px; }
  .ac-env { width: 150px; height: 100px; }
  .ac h2 { font-size: 27px; }
  .ac-dd { font-size: 15px; }
  .ac-sert li { font-size: 14.5px; padding: 10px 12px; }
}
@media (max-height: 700px) and (max-width: 600px) { .ac-scene { height: 140px; } .ac-pop { width: 112px; } .ac-env { transform-origin: 100% 100%; } }

/* Moins d'animations : tout est posé, rien ne bouge. */
.ac.ac-calme *, .ac.ac-calme *::before, .ac.ac-calme *::after { animation: none !important; transition: none !important; }
.ac.ac-calme .ac-pop, .ac.ac-calme .ac-env, .ac.ac-calme .ac-txt, .ac.ac-calme .ac-passer-haut { opacity: 1; transform: none; }
.ac.ac-calme .ac-rabat { transform: rotateX(180deg); z-index: 0; }
.ac.ac-calme .ac-lettre { transform: translateY(-58px); }
.ac.ac-calme .ac-grille i { opacity: .9; transform: none; }
.ac.ac-calme .ac-bulles { display: none; }
.ac.ac-calme.ac-envoi .ac-tampon { opacity: 1; transform: rotate(-14deg); }
