/* Tu chauffes : nuit et braises. Thème sombre unique, comme les autres jeux Pyment. */
:root {
  color-scheme: dark;
  --nuit: #140c18; --nuit-2: #1f1424; --carte: rgba(246, 231, 207, .06); --carte-2: rgba(246, 231, 207, .1);
  --creme: #f6e7cf; --creme-2: #cdb79c; --or: #ffcf7a; --braise: #ff7a2a; --rouge: #ff4a1a;
  --glace: #8fd3ff; --glace-2: #5ab0ff;
  --serif: Georgia, 'Times New Roman', serif; --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --chaleur: 0; /* 0 à 1, meilleure progression : teinte le fond */
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--nuit); color: var(--creme); font: 17px/1.45 var(--serif); }
.fond { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 90, 31, calc(.1 + var(--chaleur) * .35)) 0%, transparent 60%),
              radial-gradient(90% 50% at 50% 0%, rgba(90, 176, 255, calc(.16 - var(--chaleur) * .16)) 0%, transparent 70%),
              linear-gradient(var(--nuit-2), var(--nuit) 60%);
  transition: background 1.2s; }
.page { max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); display: grid; gap: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--or); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }

/* En-tête */
.tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h1 { margin: 0; font-size: 30px; font-weight: normal; letter-spacing: .5px; color: var(--or); text-shadow: 0 0 16px rgba(255, 122, 42, .55); }
h1 span { color: var(--braise); font-style: italic; }
.tete-droite { display: grid; justify-items: end; gap: 4px; }
.jour { margin: 0; font: 600 12px/1.3 var(--mono); color: var(--creme-2); text-align: right; }
.outils { display: flex; gap: 6px; }
.icone { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 207, 122, .35); background: var(--carte); font-size: 15px; line-height: 1; }
.icone[aria-pressed="false"] { opacity: .55; }

/* Scène */
.scene { position: relative; height: 240px; }
.thermo { position: absolute; left: 4px; top: 18px; width: 22px; height: 172px; border-radius: 12px; background: #2a2033; border: 2px solid rgba(246, 231, 207, .3); overflow: hidden; }
.thermo i { position: absolute; left: 0; right: 0; bottom: 0; height: 4%; background: linear-gradient(var(--rouge), #ffb340 45%, var(--glace-2)); background-size: 100% 172px; background-position: bottom; transition: height 1s cubic-bezier(.3, 1.4, .5, 1); }
.thermo b { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 700 8px/1 var(--mono); color: var(--nuit); writing-mode: vertical-rl; transform: rotate(180deg); height: 60px; }
.bulle { position: absolute; right: 0; top: 4px; max-width: 56%; margin: 0; background: var(--creme); color: #3a1d14; font: italic 15px/1.3 var(--serif); padding: 8px 12px; border-radius: 14px 14px 14px 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transform-origin: 10% 100%; z-index: 3; }
.bulle.pop { animation: bulle-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bulle-pop { from { transform: scale(.6); opacity: 0; } }

/* Braise, la mascotte */
.braise { position: absolute; left: 50%; top: 60px; width: 120px; height: 176px; margin-left: -60px; }
.corps-boite { position: absolute; left: 0; right: 0; bottom: 18px; height: 140px; transform-origin: 50% 100%; animation: respire 2.6s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(255, 106, 42, .85)) drop-shadow(0 0 40px rgba(255, 74, 26, .35)); transition: filter .6s; }
.corps { position: absolute; inset: 0; transition: transform .5s; clip-path: path('M60 4 C66 26 80 30 84 46 C90 38 92 30 90 22 C104 40 114 62 114 88 C114 120 90 140 60 140 C30 140 6 120 6 88 C6 66 16 50 28 38 C28 48 32 56 38 60 C38 40 48 22 60 4 Z');
  background: radial-gradient(ellipse 46% 34% at 50% 80%, #fffbd0 0%, #ffe37a 40%, rgba(255, 227, 122, 0) 100%),
              linear-gradient(to top, #ffd36a 0%, #ffb340 30%, #ff7a2a 62%, #f0461a 88%, #d8300f 100%);
  animation: flamme 1.1s ease-in-out infinite; transition: filter .6s; }
@keyframes flamme { 0%, 100% { clip-path: path('M60 4 C66 26 80 30 84 46 C90 38 92 30 90 22 C104 40 114 62 114 88 C114 120 90 140 60 140 C30 140 6 120 6 88 C6 66 16 50 28 38 C28 48 32 56 38 60 C38 40 48 22 60 4 Z'); } 33% { clip-path: path('M64 0 C64 24 78 30 81 44 C90 36 95 28 95 16 C107 38 114 62 114 88 C114 120 90 140 60 140 C30 140 6 120 6 88 C6 64 18 48 25 32 C27 45 31 53 36 58 C40 36 54 18 64 0 Z'); } 66% { clip-path: path('M57 3 C68 24 82 32 85 48 C89 40 90 32 87 24 C102 42 114 62 114 88 C114 120 90 140 60 140 C30 140 6 120 6 88 C6 67 15 52 30 40 C29 50 33 57 39 61 C36 42 46 24 57 3 Z'); } }
.oeil { position: absolute; top: 72px; width: 15px; height: 20px; background: #2a0f08; border-radius: 50%; animation: cligne 4s infinite; }
.oeil i { position: absolute; top: 4px; left: 4px; width: 5px; height: 5px; background: #fff; border-radius: 50%; }
.oeil.g { left: 34px; } .oeil.d { right: 34px; }
.joue { position: absolute; top: 94px; width: 14px; height: 8px; border-radius: 50%; background: rgba(255, 60, 60, .45); }
.joue.g { left: 22px; } .joue.d { right: 22px; }
.bouche { position: absolute; left: 50%; top: 100px; width: 26px; height: 12px; margin-left: -13px; background: #2a0f08; border-radius: 0 0 16px 16px; transition: all .4s; }
.goutte { position: absolute; right: 14px; top: 58px; width: 9px; height: 13px; background: var(--glace); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; opacity: 0; }
.couronne { position: absolute; left: 50%; top: 14px; font-size: 34px; margin-left: -20px; opacity: 0; transform: translateY(-30px); transition: all .6s cubic-bezier(.3, 1.6, .5, 1); }
.bloc-glace { position: absolute; inset: 0 -14px -6px; border-radius: 22px; background: linear-gradient(135deg, rgba(220, 245, 255, .55), rgba(143, 211, 255, .25) 50%, rgba(220, 245, 255, .5)); border: 2px solid rgba(230, 248, 255, .8); box-shadow: inset 0 0 18px rgba(255, 255, 255, .6), 0 0 22px rgba(143, 211, 255, .6); opacity: 0; transform: scale(1.3); transition: opacity .35s, transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.bloc-glace::before { content: ""; position: absolute; left: 14px; top: 10px; width: 28px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .85); transform: rotate(-20deg); }
.ombre { position: absolute; left: 50%; bottom: 6px; width: 100px; height: 14px; margin-left: -50px; border-radius: 50%; background: rgba(255, 106, 42, .25); animation: ombre 2.6s ease-in-out infinite; }

@keyframes respire { 50% { transform: scale(1.03, .97); } }
@keyframes ombre { 50% { transform: scale(1.05); } }
@keyframes danse { to { transform: skewX(8deg) scaleY(1.12); } }
@keyframes cligne { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes saut { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-26px) scale(.94, 1.07); } 80% { transform: translateY(0) scale(1.12, .86); } }
@keyframes grelotte { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px) rotate(-1deg); } 75% { transform: translateX(3px) rotate(1deg); } }
@keyframes hausse { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 60% { transform: rotate(8deg); } }
@keyframes tombe { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(34px); } }
@keyframes tourne { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }

/* États de Braise, selon le dernier essai */
.forme-braise.etat-glacial .corps { filter: hue-rotate(185deg) saturate(.7) brightness(1.15); animation-play-state: paused; }
.forme-braise.etat-glacial .corps-boite { filter: drop-shadow(0 0 16px rgba(143, 211, 255, .7)); }
.forme-braise.etat-glacial .bloc-glace, .forme-ploc.etat-glacial .bloc-glace { opacity: 1; transform: scale(1); }
.etat-glacial .corps-boite { animation: grelotte .12s linear infinite; }
.etat-glacial .bouche { height: 6px; border-radius: 3px; width: 30px; margin-left: -15px; background: repeating-linear-gradient(90deg, #2a0f08 0 4px, #fff 4px 6px); }
.etat-glacial .ombre { background: rgba(143, 211, 255, .25); }
.forme-braise.etat-froid .corps { filter: hue-rotate(-20deg) saturate(.55) brightness(.9); }
.etat-froid .corps-boite { animation: grelotte .2s linear infinite; }
.etat-froid .bouche { height: 5px; border-radius: 3px; }
.etat-chaud .corps-boite { animation: saut .9s ease-in-out 2, respire 2.6s ease-in-out 1.8s infinite; }
.etat-chaud .goutte { animation: tombe 1s ease-in infinite; }
.forme-braise.etat-brulant .corps { filter: saturate(1.3) brightness(1.08); animation-duration: .45s; }
.forme-braise.etat-brulant .corps-boite { filter: drop-shadow(0 0 24px rgba(255, 106, 42, 1)) drop-shadow(0 0 60px rgba(255, 74, 26, .6)); }
.etat-froid .corps { animation-duration: 2.4s; }
.etat-brulant .corps-boite { animation: saut .55s ease-in-out infinite; }
.etat-brulant .goutte { animation: tombe .6s ease-in infinite; }
.etat-brulant .bouche { height: 18px; border-radius: 4px 4px 18px 18px; }
.etat-inconnu .corps-boite { animation: hausse .7s ease-in-out; }
.etat-inconnu .bouche { height: 4px; width: 20px; margin-left: -10px; border-radius: 3px; transform: rotate(-8deg); }
.forme-braise.etat-gagne .corps { background: radial-gradient(ellipse 50% 40% at 50% 78%, #ffffff 0%, #fff2a8 45%, rgba(255, 242, 168, 0) 100%), linear-gradient(to top, #ffe37a 0%, #ffcf5a 40%, #ffb340 75%, #f08a1a 100%); animation-duration: .6s; }
.forme-braise.etat-gagne .corps-boite { filter: drop-shadow(0 0 26px rgba(255, 215, 122, 1)) drop-shadow(0 0 70px rgba(255, 180, 64, .7)); }
.etat-gagne .couronne { opacity: 1; transform: translateY(0); }
.etat-gagne .corps-boite { animation: saut .7s ease-in-out infinite; }
.etat-gagne .bouche { height: 20px; border-radius: 4px 4px 20px 20px; }
.etat-gagne .oeil { height: 10px; top: 78px; border-radius: 10px 10px 0 0; background: transparent; border: 4px solid #2a0f08; border-bottom: 0; }
.etat-gagne .oeil i { display: none; }
.forme-braise.etat-triste .corps { filter: saturate(.5) brightness(.85); }
.etat-triste .bouche { height: 10px; border-radius: 16px 16px 0 0; top: 104px; }

/* Effets : étincelles, glaçons, flocons, confettis */
.effets { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.fx { position: absolute; will-change: transform, opacity; }
.fx-etincelle { width: 6px; height: 6px; border-radius: 50%; background: #ffd36a; box-shadow: 0 0 10px #ffb340; animation: fx-monte var(--d, 1.6s) ease-out forwards; }
.fx-glacon { font-size: var(--t, 22px); animation: fx-chute var(--d, 1.4s) cubic-bezier(.5, 0, .9, .6) forwards; }
.fx-flocon { color: #dff4ff; font-size: var(--t, 14px); animation: fx-flotte var(--d, 2.4s) linear forwards; }
.fx-confetti { width: 8px; height: 12px; border-radius: 2px; animation: fx-confetti var(--d, 2s) cubic-bezier(.2, .6, .4, 1) forwards; }
.fx-point { font-size: 26px; animation: fx-point 1.1s ease-out forwards; }
@keyframes fx-monte { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--x, 0), -150px) scale(.3); } }
@keyframes fx-chute { 0% { opacity: 0; transform: translateY(-30px) rotate(0); } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--y, 200px)) rotate(var(--r, 180deg)); } }
@keyframes fx-flotte { 0% { opacity: 0; transform: translate(0, -10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x, 20px), 210px); } }
@keyframes fx-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x, 0), var(--y, 120px)) rotate(var(--r, 540deg)); } }
@keyframes fx-point { 0% { opacity: 0; transform: translateY(0) scale(.5); } 30% { opacity: 1; transform: translateY(-14px) scale(1.2); } 100% { opacity: 0; transform: translateY(-40px) scale(1); } }

/* Saisie */
.saisie { display: flex; gap: 8px; }
.saisie input { flex: 1; min-width: 0; background: rgba(246, 231, 207, .07); border: 1px solid rgba(255, 207, 122, .45); border-radius: 14px; padding: 12px 14px; font: 18px var(--serif); color: var(--creme); }
.saisie input::placeholder { color: rgba(246, 231, 207, .45); }
.saisie input:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(255, 207, 122, .2), 0 0 24px rgba(255, 122, 42, .25); }
.saisie.secoue { animation: secoue .4s; }
@keyframes secoue { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.plein { background: linear-gradient(#ffb340, #ff6a2a); color: #2a0f08; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: bold; box-shadow: 0 4px 16px rgba(255, 106, 42, .35); transition: transform .1s; }
.plein:active { transform: scale(.96); }
.plein:disabled { opacity: .5; }
.second { background: var(--carte); border: 1px solid rgba(255, 207, 122, .4); color: var(--creme); border-radius: 14px; padding: 9px 14px; }
.lien { background: none; border: 0; color: var(--creme-2); text-decoration: underline; padding: 9px 6px; }
.etat { margin: -4px 2px 0; min-height: 1.3em; font-size: 14px; color: var(--creme-2); }

/* Essais */
.ligne { display: grid; grid-template-columns: 28px minmax(0, 1fr) 76px 92px; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--carte); font-size: 16px; }
.ligne .em { font-size: 18px; text-align: center; }
.ligne .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne .m small { color: var(--creme-2); font: 11px var(--mono); margin-left: 4px; }
.ligne .t { font: 600 14px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.ligne .p { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; font: 600 11px var(--mono); color: var(--creme-2); font-variant-numeric: tabular-nums; }
.jauge { height: 8px; border-radius: 5px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.jauge i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #ffcf7a, #ff7a2a 70%, #ff4a1a); }
.ligne.c-glacial .t { color: var(--glace); } .ligne.c-froid .t { color: #b9e2ff; } .ligne.c-tiede .t { color: var(--creme); }
.ligne.c-chaud .t { color: var(--or); } .ligne.c-brulant .t { color: var(--braise); } .ligne.c-trouve { background: linear-gradient(90deg, rgba(255, 207, 122, .3), rgba(255, 122, 42, .2)); }
.dernier .ligne { outline: 1px solid rgba(255, 179, 64, .6); box-shadow: 0 0 20px rgba(255, 106, 42, .25); animation: arrive .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes arrive { from { transform: translateY(-10px) scale(.94); opacity: 0; } }
.entete-liste { display: grid; grid-template-columns: 28px minmax(0, 1fr) 76px 92px; gap: 8px; padding: 0 12px; font: 11px var(--mono); color: var(--creme-2); text-transform: uppercase; letter-spacing: .5px; }
.entete-liste span:nth-child(3) { text-align: right; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.liste .ligne.vient { outline: 1px solid rgba(255, 207, 122, .5); }
.liste .ligne.repere { animation: repere 1.2s; }
@keyframes repere { 30% { background: rgba(255, 207, 122, .3); } }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* Fin de partie */
.fin { background: linear-gradient(160deg, rgba(255, 207, 122, .14), rgba(255, 106, 42, .08)); border: 1px solid rgba(255, 207, 122, .35); border-radius: 18px; padding: 16px; display: grid; gap: 10px; text-align: center; }
.fin h2 { margin: 0; font-size: 24px; color: var(--or); }
.fin-mot { margin: 0; font-size: 28px; letter-spacing: 1px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.stats div { background: var(--carte); border-radius: 10px; padding: 8px 4px; }
.stats dt { font-size: 11px; color: var(--creme-2); }
.stats dd { margin: 0; font: 700 20px var(--mono); color: var(--or); }
.demain { margin: 0; font-size: 14px; color: var(--creme-2); }
.pyment-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pyment-share button { background: var(--carte-2); border: 1px solid rgba(255, 207, 122, .4); border-radius: 12px; padding: 9px 14px; color: var(--creme); }
.voisins { text-align: left; background: var(--carte); border-radius: 12px; padding: 8px 12px; }
.voisins summary { cursor: pointer; color: var(--or); }
.voisins ol { margin: 8px 0 0; padding-left: 34px; columns: 2; column-gap: 18px; font-size: 14px; }
.voisins li { break-inside: avoid; }
.voisins li span { color: var(--creme-2); font: 11px var(--mono); }

/* Aide */
.aide { max-width: min(460px, calc(100vw - 32px)); background: var(--nuit-2); color: var(--creme); border: 1px solid rgba(255, 207, 122, .4); border-radius: 18px; padding: 18px 20px; }
.aide::backdrop { background: rgba(10, 5, 12, .7); }
.aide h2 { margin: 0 0 8px; color: var(--or); }
.aide ul { padding-left: 4px; list-style: none; display: grid; gap: 4px; }
.aide .hier { color: var(--creme-2); font-size: 14px; }
.boutons { display: flex; justify-content: center; gap: 8px; margin: 10px 0 0; }

/* Pied de page */
/* Pied de page commun aux jeux Pyment (« le bouton dé ») : seules --pp-accent et la couleur changent d'un jeu à l'autre */
.pp { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin: 28px auto 16px; padding: 0 12px; }
.pp p { margin: 0; }
.pp a { color: inherit; text-decoration: none; }
.pp a:hover, .pp a:focus-visible { text-decoration: underline; }
.pp .pp-de { display: inline-block; padding: 6px 18px; border: 2px solid var(--pp-accent); border-radius: 999px; color: var(--pp-accent); font-weight: 600; font-size: 16px; line-height: 1.3; margin-bottom: 8px; }
.pp .pp-de:hover, .pp .pp-de:focus-visible { text-decoration: none; background: color-mix(in srgb, var(--pp-accent) 14%, transparent); }
.pp-inspi { font-size: 13px; font-style: italic; opacity: .75; max-width: 46ch; }
.pp-sig { font-size: 13px; opacity: .75; }
.pp .pp-ico { display: inline-block; padding: 0 2px; }
.pp .pp-ico:hover, .pp .pp-ico:focus-visible { text-decoration: none; }
.pp { --pp-accent: var(--or); color: var(--creme-2); margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--creme); color: #3a1d14; padding: 10px 16px; border-radius: 12px; z-index: 50; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.noscript { text-align: center; padding: 20px; }
.pyment-banner { background: #3a2a18; color: #f2e3c4; padding: 8px; text-align: center; font-size: 14px; }

@media (max-width: 380px) {
  .ligne, .entete-liste { grid-template-columns: 24px minmax(0, 1fr) 66px 70px; gap: 6px; padding-left: 8px; padding-right: 8px; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .effets { display: none; }
}
.forme-braise.etat-brulant .corps, .forme-braise.etat-gagne .corps { transform: scale(1.06, 1.12); transform-origin: 50% 100%; }

/* Les trois formes de la mascotte, selon le meilleur mot : Glagla (glaçon), Ploc (goutte), Braise (flamme) */
.forme-glagla .corps { clip-path: none; inset: 34px 4px 0; border-radius: 26px; animation: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .95) 0%, #d8f3ff 22%, #9fdcff 55%, #6bbcf0 100%);
  box-shadow: inset 0 -10px 18px rgba(40, 120, 200, .35), inset 6px 6px 0 rgba(255, 255, 255, .55); }
.forme-glagla .corps::before { content: ""; position: absolute; left: 14px; top: 12px; width: 34px; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .9); transform: rotate(-18deg); }
.forme-glagla .corps::after { content: ""; position: absolute; right: 12px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .8); box-shadow: -8px 14px 0 -2px rgba(255, 255, 255, .5); }
.forme-glagla .corps-boite { filter: drop-shadow(0 0 14px rgba(143, 211, 255, .75)); animation: frisson 3s ease-in-out infinite; }
.forme-glagla .ombre { background: rgba(143, 211, 255, .22); }
.forme-glagla .joue { background: rgba(255, 120, 160, .45); }
.forme-glagla .goutte { display: none; }
.forme-ploc .corps { clip-path: path('M60 8 C70 30 108 60 108 94 C108 122 86 140 60 140 C34 140 12 122 12 94 C12 60 50 30 60 8 Z'); animation: ploc 2.2s ease-in-out infinite;
  background: radial-gradient(ellipse 30% 22% at 36% 52%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 100%),
              linear-gradient(to top, #2f8fd8 0%, #5ab8f0 45%, #9fdcff 85%, #d8f3ff 100%); }
.forme-ploc .corps-boite { filter: drop-shadow(0 0 14px rgba(90, 184, 240, .7)); }
.forme-ploc .ombre { background: rgba(90, 176, 255, .22); }
.forme-ploc .goutte { display: none; }
@keyframes ploc { 0%, 100% { clip-path: path('M60 8 C70 30 108 60 108 94 C108 122 86 140 60 140 C34 140 12 122 12 94 C12 60 50 30 60 8 Z'); } 50% { clip-path: path('M60 4 C72 28 110 60 110 95 C110 123 87 140 60 140 C33 140 10 123 10 95 C10 60 48 28 60 4 Z'); } }
@keyframes frisson { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-2deg); } 96% { transform: rotate(2deg); } }
/* Métamorphose : un nuage de vapeur et un petit rebond */
.braise.transforme .corps-boite { animation: metamorphose .8s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes metamorphose { 0% { transform: scale(.4, 1.3); filter: brightness(3) blur(2px); } 60% { transform: scale(1.15, .9); } 100% { transform: scale(1); } }
.fx-vapeur { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); animation: fx-vapeur 1.4s ease-out forwards; }
@keyframes fx-vapeur { 0% { opacity: .9; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--x, 0), -90px) scale(2.4); } }
.nom-mascotte { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font: 600 11px/1 var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--creme-2); white-space: nowrap; }

/* Thermomètre de chaque essai : la couleur suit la température réelle (-10 °C bleu, 60 °C rouge) */
.ligne, .entete-liste { grid-template-columns: 28px minmax(0, 1fr) 70px minmax(96px, 34%); }
.ligne .p { grid-template-columns: 1fr 42px; }
.ligne .p b { text-align: right; font: 700 11px var(--mono); color: var(--or); }
.ligne .p b.vide { color: transparent; }
.thermo-mini { position: relative; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.thermo-mini i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background-image: linear-gradient(90deg, #5ab0ff 0%, #9fd0ff 22%, #f6e7cf 42%, #ffcf7a 58%, #ff7a2a 80%, #ff4a1a 100%); background-repeat: no-repeat; }
.thermo-mini i::after { content: ""; position: absolute; right: -3px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: inherit; background: var(--bout, #ffcf7a); box-shadow: 0 0 8px var(--bout, #ffcf7a); }
.ligne.c-brulant .thermo-mini, .ligne.c-trouve .thermo-mini { box-shadow: 0 0 10px rgba(255, 106, 42, .5); }
@media (max-width: 380px) { .ligne, .entete-liste { grid-template-columns: 24px minmax(0, 1fr) 62px minmax(84px, 34%); } }

/* Lignes glacées et froides */
.ligne.c-glacial { background: linear-gradient(100deg, rgba(143, 211, 255, .16), rgba(143, 211, 255, .05) 60%), var(--carte); box-shadow: inset 0 0 0 1px rgba(200, 235, 255, .22); }
.ligne.c-glacial .m { color: #dff4ff; }
.ligne.c-glacial .p b { color: var(--glace); font-size: 13px; }
.ligne.c-froid { background: linear-gradient(100deg, rgba(143, 211, 255, .08), transparent 60%), var(--carte); }
.dernier .ligne.c-glacial { outline-color: rgba(143, 211, 255, .7); box-shadow: 0 0 20px rgba(90, 176, 255, .35); animation: arrive-glace .6s ease-out; }
@keyframes arrive-glace { 0% { transform: scale(1.04); filter: brightness(1.8); } 40% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 100% { transform: none; } }

/* Duel */
.defi-recu { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; background: linear-gradient(110deg, rgba(255, 207, 122, .18), rgba(255, 106, 42, .1)); border: 1px solid rgba(255, 207, 122, .5); border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.defi-recu .epees { font-size: 26px; }
.defi-recu strong { color: var(--or); }
.defi-recu small { display: block; color: var(--creme-2); font-size: 13px; }
.defi { background: rgba(20, 12, 24, .45); border: 1px dashed rgba(255, 207, 122, .45); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.defi h3 { margin: 0; color: var(--or); font-size: 18px; }
.defi p { margin: 0; font-size: 14px; color: var(--creme-2); }
.defi-ligne { display: flex; gap: 8px; }
.defi-ligne input { flex: 1; min-width: 0; background: rgba(246, 231, 207, .07); border: 1px solid rgba(255, 207, 122, .45); border-radius: 12px; padding: 10px 12px; font: 16px var(--serif); color: var(--creme); }
.defi-envoi { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.defi-resultat { margin: 0; font-size: 17px; background: var(--carte-2); border-radius: 12px; padding: 10px; }
.defi-resultat strong { color: var(--or); }
.hors-ecran { position: fixed; left: -9999px; top: 0; opacity: 0; }
/* 0.1.4 : colonnes qui tiennent sur téléphone, températures sur une ligne */
.ligne, .entete-liste { grid-template-columns: 26px minmax(0, 1fr) 84px minmax(84px, 32%); gap: 6px; }
.ligne .t { white-space: nowrap; font-size: 13px; }
.entete-liste span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .ligne, .entete-liste { grid-template-columns: 22px minmax(0, 1fr) 76px minmax(72px, 30%); } .ligne .t { font-size: 12px; } }
.page { grid-template-columns: minmax(0, 1fr); }
.page > *, .fin > *, .defi-ligne > * { min-width: 0; }
.aide .accroche { margin-top: -4px; font-style: italic; color: var(--or); }
.second:disabled { opacity: .5; cursor: default; }
.icone.langue { font: 700 12px var(--mono); letter-spacing: .5px; }
.defi-ligne { flex-wrap: wrap; } .defi-ligne input { flex: 1 1 130px; } .defi-ligne button { flex: 1 1 auto; }
.saisie[hidden] { display: none; }
/* Page « Comment marche le modèle » (modele.html) */
.modele section { background: var(--nuit-2); border: 1px solid rgba(255, 207, 122, .25); border-radius: 18px; padding: 16px 18px; }
.modele h2 { margin: 0 0 8px; color: var(--or); font-size: 20px; }
.modele h3 { margin: 16px 0 4px; font-size: 16px; color: var(--creme); }
.modele p, .modele li { line-height: 1.5; }
.modele ul { padding-left: 18px; display: grid; gap: 4px; }
.modele a { color: var(--or); }
.modele details { margin: 8px 0; }
.modele summary { cursor: pointer; color: var(--or); }
.modele .liste { font-size: 14px; color: var(--creme-2); margin: 6px 0 0; }
.modele .plus { color: #9fe0a0; white-space: nowrap; }
.modele .moins { color: #ffb08a; white-space: nowrap; }
.modele .retour { font-size: 14px; }
/* Bouton vers la page du modèle (sous le jeu, avant le pied de page) */
.corpus { text-align: center; margin: 4px 0 0; }
.corpus-btn { display: inline-block; padding: 5px 14px; border: 1px solid rgba(255, 207, 122, .45); border-radius: 999px; color: var(--or); font-size: 14px; text-decoration: none; }
.corpus-btn:hover, .corpus-btn:focus-visible { background: rgba(255, 207, 122, .12); }
/* Illustrations de modele.html (SVG + CSS, sans script) */
.modele .fig { margin: 12px 0 4px; }
.modele .fig svg { display: block; width: 100%; height: auto; max-width: 460px; margin: 0 auto; overflow: visible; }
.modele figcaption { font-size: 13px; color: var(--creme-2); text-align: center; margin-top: 6px; font-style: italic; }
.fig text { fill: var(--creme); font-family: var(--serif); }
.fig .fl { font-size: 15px; fill: var(--or); }
.fig .fs { font-size: 10px; fill: var(--creme-2); }
.fig .fm { font-size: 11px; }
.fig .bp { fill: var(--braise); }
.fig .bn { fill: #7ec8ff; }
.fig .axe { stroke: rgba(246, 231, 207, .35); stroke-width: 1; }
.fig .carte { fill: rgba(246, 231, 207, .05); stroke: rgba(255, 207, 122, .25); }
.fig .lien { stroke-width: 1.5; stroke-dasharray: 4 3; }
.fig .chaud { stroke: var(--braise); animation: tc-fourmi 1.2s linear infinite; }
.fig .froid { stroke: #7ec8ff; opacity: .7; }
.fig .chaud-t { fill: var(--braise); }
.fig .froid-t { fill: #7ec8ff; }
.fig .moi { fill: var(--or); animation: tc-pouls 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fig .pt2 { fill: var(--braise); }
.fig .pt3 { fill: #7ec8ff; }
.fig .feuille { fill: var(--creme); }
.fig .w { fill: var(--nuit); font: 700 14px/1 var(--serif); text-anchor: middle; }
.fig .ligne { stroke: var(--creme-2); stroke-width: 1.5; }
.fig .page { animation: tc-lire 6s ease-in infinite; opacity: 0; }
.fig .p1 { animation-delay: 1.5s; } .fig .p2 { animation-delay: 3s; } .fig .p3 { animation-delay: 4.5s; }
.fig .tamis { fill: rgba(255, 207, 122, .12); stroke: var(--or); stroke-dasharray: 3 3; }
.fig .mot { font-size: 12px; fill: var(--or); opacity: 0; animation: tc-mot 6s ease-in-out infinite; }
.fig .m1 { animation-delay: 1.5s; } .fig .m2 { animation-delay: 3s; } .fig .m3 { animation-delay: 4.5s; }
.fig .nuage { fill: var(--braise); animation: tc-scintille 3s ease-in-out infinite; }
.fig .n1 { animation-delay: .75s; } .fig .n2 { animation-delay: 1.5s; } .fig .n3 { animation-delay: 2.25s; }
.fig .fa { fill: #7ec8ff; animation: tc-dore-a 7s ease-in-out infinite; }
.fig .fb { fill: var(--braise); animation: tc-dore-b 7s ease-in-out infinite; }
.fig .ga { animation: tc-vers-d 7s ease-in-out infinite; }
.fig .gb { animation: tc-vers-g 7s ease-in-out infinite; }
.fig .ta, .fig .tb { animation: tc-sort 7s ease-in-out infinite; }
.fig .tm { fill: var(--or); opacity: 0; animation: tc-entre 7s ease-in-out infinite; }
@keyframes tc-fourmi { to { stroke-dashoffset: -14; } }
@keyframes tc-pouls { 50% { transform: scale(1.35); } }
@keyframes tc-lire { 0% { opacity: 0; transform: translate(0, 0); } 8% { opacity: 1; } 40% { opacity: 1; transform: translate(80px, 0) scale(.9); } 55% { opacity: 0; transform: translate(105px, 20px) scale(.4); } 100% { opacity: 0; transform: translate(105px, 20px) scale(.4); } }
@keyframes tc-mot { 0%, 45% { opacity: 0; } 55%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tc-scintille { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes tc-vers-d { 0%, 15% { transform: translateX(0); } 50%, 75% { transform: translateX(80px); } 100% { transform: translateX(0); } }
@keyframes tc-vers-g { 0%, 15% { transform: translateX(0); } 50%, 75% { transform: translateX(-80px); } 100% { transform: translateX(0); } }
@keyframes tc-dore-a { 0%, 15% { fill: #7ec8ff; } 50%, 75% { fill: #ffcf7a; } 100% { fill: #7ec8ff; } }
@keyframes tc-dore-b { 0%, 15% { fill: #ff7a2a; } 50%, 75% { fill: #ffcf7a; } 100% { fill: #ff7a2a; } }
@keyframes tc-sort { 0%, 20% { opacity: 1; } 45%, 80% { opacity: 0; } 100% { opacity: 1; } }
@keyframes tc-entre { 0%, 35% { opacity: 0; } 55%, 75% { opacity: 1; } 95%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fig *, .fig .page, .fig .mot { animation: none !important; }
  .fig .page.p0, .fig .mot { opacity: 1; }
  .fig .tm { opacity: 0; }
}
.pp .corpus { margin: 2px 0 10px; }
.pp .corpus-btn:hover { text-decoration: none; }
