/* Cadre des deux pages Transforme le mot. Les interactions sont habillées par le module. */
.tp-tm-hote #tp-tm-contenu {
  grid-column: 1 / -1;
  grid-row: 6;
  order: 8;
  min-width: 0;
  --tm-marge: 14px;
}
.tp-tm-hote .tp-tm-scene {
  margin: 0 var(--tm-marge);
  scroll-margin-top: 4px;
}
.tp-tm-hote .tp-tm-accueil,
.tp-tm-hote .tp-tm-jeu {
  box-sizing: border-box;
  background: #f8f7ef;
  color: #263c35;
  border-radius: 12px;
}
.tp-tm-hote .tp-tm-accueil {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  padding: clamp(18px, 4vw, 44px);
  font: 17px/1.5 Arial, sans-serif;
}
.tp-tm-hote .tp-tm-invitation h1,
.tp-tm-hote .tp-tm-demonstration > h2,
.tp-tm-hote .tp-tm-invitation h2 { margin: 0; text-align: left; color: #203e33; font: bold clamp(26px, 4vw, 38px)/1.15 Arial, sans-serif; }
.tp-tm-hote .tp-tm-invitation h2 { margin: 12px 0; font-size: 19px; }
.tp-tm-hote .tp-tm-invitation p { margin: 12px 0; text-align: left; color: inherit; font: inherit; }
.tp-tm-hote .tp-tm-accueil .tp-tm-serie { color: #455e4d; font-size: 15px; }
.tp-tm-hote .tp-tm-jouer { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; box-sizing: border-box; margin-top: 3px; padding: 9px 27px; border: 1px solid #174b34; border-radius: 9px; background: #236147; color: white; text-decoration: none; font: bold 18px/1.3 Arial, sans-serif; }
.tp-tm-hote .tp-tm-jouer:hover { background: #194d36; }
.tp-tm-hote .tp-tm-jouer:focus-visible { outline: 3px solid #235897; outline-offset: 3px; }
.tp-tm-hote .tp-tm-listes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tp-tm-hote .tp-tm-invitation h1 { text-align: center; }
.tp-tm-hote .tp-tm-actions-accueil {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 8px 6px; margin-top: 12px;
}
.tp-tm-hote .tp-tm-actions-accueil > .tp-tm-jouer { grid-column: 2; }
.tp-tm-hote .tp-tm-actions-accueil h2, .tp-tm-hote .tp-tm-listes { grid-column: 1 / -1; justify-content: center; text-align: center; }
.tp-tm-hote .tp-tm-actions-accueil > .tp-tm-lien-demo { grid-column: 3; justify-self: start; font-size: .9em; }
.tp-tm-hote .tp-tm-listes + .tp-tm-lien-demo { grid-column: 1 / -1; justify-self: center; }
@media (prefers-reduced-motion: no-preference) {
  .tp-tm-hote .tp-tm-actions-accueil > .tp-tm-jouer { animation: tp-tm-invitation-jouer 1.1s ease-out .2s 2; }
}
@keyframes tp-tm-invitation-jouer {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 5px #407c543b, 0 0 12px 3px #e3bb5340; }
}
.tp-tm-hote .tp-tm-demonstration {
  min-width: 0;
}
.tp-tm-hote .tp-tm-demonstration > h2 { margin: 0 0 12px; font-size: clamp(22px, 2.4vw, 28px); scroll-margin-top: 12px; }
.tp-tm-hote .tp-tm-demonstration [data-tm-demo-repli] { margin: 0; padding: 14px; border: 1px solid #c4cdbd; border-radius: 12px; background: #fffdf5; }
.tp-tm-hote .tp-tm-lien-demo { display: none; color: #245783; font-weight: bold; }
.tp-tm-hote .tp-tm-lien-demo:focus-visible { outline: 3px solid #235897; outline-offset: 3px; }
.tp-tm-hote .tp-tm-jeu { padding: 6px; }
.tp-tm-hote .tp-tm-jeu .tp-transforme { width: 100%; margin: 0 auto; }
.tp-tm-hote .tp-tm-avec-verticale {
  display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 150px;
  align-items: start;
}
.tp-tm-hote .tp-tm-scene-verticale {
  margin-block-start: 20px;
  scroll-margin-top: 28px; /* Conserver le libellé au-dessus du rectangle à l’arrivée par Jouer. */
}
.tp-tm-hote #tp-tm-verticale { position: relative; text-align: center; }
.tp-tm-hote #tp-tm-verticale .tp-ad-label { position: absolute; inset: auto 0 100%; margin-bottom: 2px; text-align: center; color: #ffffcc; font: 12px/1.25 Arial, sans-serif; }
.tp-tm-hote #tp-tm-verticale .pubVerticaleGauche { width: 160px; height: 600px; margin: 0; }
.tp-tm-hote #tp-tm-verticale .adsbygoogle { width: 160px; height: 600px; }
.tp-tm-hote .tp-tm-avec-verticale .tp-tm-jeu { min-width: 0; padding: 0; background: transparent; }
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme {
  min-height: 600px; display: flex; flex-direction: column;
}
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme-plateau { flex: 1; align-content: space-evenly; }
.tp-tm-hote .tp-tm-avec-verticale [data-tm=bilan],
.tp-tm-hote .tp-tm-avec-verticale [data-tm=exemple] { margin-block: auto; }
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme-rangee { justify-content: center; }
@container tp-transforme (max-width: 589.99px) {
  .tp-tm-hote .tp-transforme-rangee { justify-content: center; }
}
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme-plateau {
  grid-template-areas: "consigne" "indices" "proposition";
  grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme-indices {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 12px 20px; gap: 12px 20px;
}
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme-image { height: clamp(140px, 11vw, 166px); }
.tp-tm-hote .tp-tm-avec-verticale .tp-transforme-ecoute { justify-self: start; align-items: flex-start; flex-direction: column; }
.tp-tm-hote .tp-tm-avec-verticale [data-tm=aide] { flex-basis: auto; text-align: left; }
.tp-tm-hote .tp-transforme-actions { flex-direction: column; align-items: center; }
@container tp-transforme (min-width: 590px) {
  .tp-tm-hote .tp-tm-partie:not(.tp-tm-avec-verticale) .tp-transforme-proposition {
    display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  }
  /* La largeur native des tuiles détermine la colonne commune, sans déplacer la rangée. */
  .tp-tm-hote .tp-tm-partie:not(.tp-tm-avec-verticale) .tp-transforme-rangee button { width: 58px; }
  .tp-tm-hote .tp-tm-partie:not(.tp-tm-avec-verticale) .tp-transforme-proposition > * { grid-column: 1; }
  .tp-tm-hote .tp-tm-partie:not(.tp-tm-avec-verticale) .tp-transforme-proposition [data-tm=retour] { grid-column: 1 / -1; }
}
.tp-tm-hote .tp-tm-titre-jeu { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tp-tm-hote .tp-tm-annonce { margin: 150px 0 24px; text-align: center; }
.tp-tm-en-partie .tp-tm-annonce { margin-bottom: 150px; }
.tp-tm-hote .tp-tm-annonce > span { color: #ffffcc; font: 12px/1.5 Arial, sans-serif; }
@media (max-width: 1199px) {
  .tp-tm-hote #affichage728x90 { display: none; }
}
@media (max-width: 640px) {
  .tp-tm-hote .tp-tm-accueil { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 8px; }
  .tp-tm-hote .tp-tm-invitation { display: contents; }
  .tp-tm-hote .tp-tm-actions-accueil { margin-top: 0; }
  .tp-tm-hote .tp-tm-demonstration { grid-row: 3; }
  .tp-tm-hote .tp-tm-invitation p { margin: 6px 0; }
  .tp-tm-hote .tp-tm-invitation h1 { font-size: clamp(23px, 6.7vw, 29px); }
  .tp-tm-hote .tp-tm-lien-demo { display: inline-flex; min-height: 44px; align-items: center; }
}
@media (min-width: 800px) and (min-height: 650px) {
  .tp-tm-hote .tp-tm-accueil { padding-top: 16px; }
  .tp-tm-hote .tp-tm-demonstration > h2 { margin-bottom: 6px; }
  .tp-tm-hote .tp-tm-jeu { padding-block: clamp(16px, 2vh, 24px); }
}
@media (max-width: 560px) {
  .tp-tm-hote #tp-tm-contenu { --tm-marge: 8px; }
  .tp-tm-hote .tp-tm-jeu { padding: 0; }
}
@media (orientation: landscape) and (max-height: 480px) {
  .tp-tm-hote .tp-tm-accueil { padding: 13px 18px; gap: 14px; align-items: start; }
  .tp-tm-hote .tp-tm-invitation p { margin: 6px 0; }
  .tp-tm-hote .tp-tm-jeu { padding: 0; }
}
