@charset "UTF-8";
@import "fonts/clear-sans.css";
/* ==========================================================================
   1. DIMENSIONS DU JEU (OPTIMISÉ POUR EMBARQUEMENT / IFRAME)
   ========================================================================== */
/* Réduit pour éviter de déborder en hauteur dans l'iframe */
/* ==========================================================================
   2. COULEURS ET ESTHÉTIQUE
   ========================================================================== */
/* Marge réduite au-dessus de la grille pour gagner de la place */
/* ==========================================================================
   ADAPTATION "IFRAME APP" (Centrage, sans scroll, interface compacte)
   ========================================================================== */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  overflow: hidden !important; /* Force la disparition de la barre de défilement */
  background: #faf8ef;
  color: #776E65;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  /* Centrage global avec Flexbox */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Bloque la sélection de texte accidentelle */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.heading:after {
  content: "";
  display: block;
  clear: both;
}
.heading {
  width: 100%;
}

h1.title {
  font-size: 60px; /* Légèrement réduit pour gagner de la place */
  font-weight: bold;
  margin: 0;
  display: block;
  float: left;
}
@keyframes $animation-name {
  0% {
    top: 25px;
    opacity: 1;
  }
  100% {
    top: -50px;
    opacity: 0;
  }
}
.scores-container {
  float: right;
  text-align: right;
}

.score-container, .best-container {
  /* Légèrement réduit */
  position: relative;
  display: inline-block;
  background: #bbada0;
  padding: 10px 20px;
  font-size: 20px;
  height: 20px;
  line-height: 35px;
  font-weight: bold;
  border-radius: 3px;
  color: white;
  margin-top: 8px;
  text-align: center;
}
.score-container:after, .best-container:after {
  position: absolute;
  width: 100%;
  top: 5px;
  left: 0;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 11px;
  text-align: center;
  color: #eee4da;
}
.score-container .score-addition, .best-container .score-addition {
  position: absolute;
  right: 30px;
  color: red;
  font-size: 20px;
  line-height: 20px;
  font-weight: bold;
  color: rgba(119, 110, 101, 0.9);
  z-index: 100;
  animation: move-up 600ms ease-in;
  animation-fill-mode: both;
}

.score-container:after {
  content: "Score";
}

.best-container:after {
  content: "Best";
}

p {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.65;
}

a {
  color: #776E65;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

strong.important {
  text-transform: uppercase;
}

hr {
  display: none !important; /* Masqué pour l'affichage App */
}

.container {
  width: 380px;
  max-width: 95vw;
  margin: 0 auto;
}
@keyframes $animation-name {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.game-container {
  margin-top: 10px;
  position: relative;
  padding: 15px;
  cursor: default;
  -webkit-touch-callout: none;
  -ms-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: none;
  background: #bbada0;
  border-radius: 6px;
  width: 380px;
  height: 380px;
  box-sizing: border-box;
}
.game-container .game-message {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(238, 228, 218, 0.5);
  z-index: 100;
  text-align: center;
}
.game-container .game-message p {
  font-size: 50px;
  font-weight: bold;
  height: 50px;
  line-height: 50px;
  margin-top: 140px;
}
.game-container .game-message .lower {
  display: block;
  margin-top: 30px;
}
.game-container .game-message a {
  display: inline-block;
  background: rgb(142.7914110429, 121.7484662577, 102.2085889571);
  border-radius: 3px;
  padding: 0 15px;
  text-decoration: none;
  color: #f9f6f2;
  height: 35px; /* Légèrement réduit */
  line-height: 37px;
  margin-left: 9px;
}
.game-container .game-message a.keep-playing-button {
  display: none;
}
.game-container .game-message {
  animation: fade-in 800ms ease 1200ms;
  animation-fill-mode: both;
}
.game-container .game-message.game-won {
  background: rgba(237, 194, 46, 0.5);
  color: #f9f6f2;
}
.game-container .game-message.game-won a.keep-playing-button {
  display: inline-block;
}
.game-container .game-message.game-won, .game-container .game-message.game-over {
  display: block;
}

.grid-container {
  position: absolute;
  z-index: 1;
}

.grid-row {
  margin-bottom: 15px;
}
.grid-row:last-child {
  margin-bottom: 0;
}
.grid-row:after {
  content: "";
  display: block;
  clear: both;
}

.grid-cell {
  width: 76.25px;
  height: 76.25px;
  margin-right: 15px;
  float: left;
  border-radius: 3px;
  background: rgba(238, 228, 218, 0.35);
}
.grid-cell:last-child {
  margin-right: 0;
}

.tile-container {
  position: absolute;
  z-index: 2;
}

.tile, .tile .tile-inner {
  width: 77px;
  height: 77px;
  line-height: 77px;
}
.tile.tile-position-1-1 {
  transform: translate(0px, 0px);
}
.tile.tile-position-1-2 {
  transform: translate(0px, 91px);
}
.tile.tile-position-1-3 {
  transform: translate(0px, 182px);
}
.tile.tile-position-1-4 {
  transform: translate(0px, 273px);
}
.tile.tile-position-2-1 {
  transform: translate(91px, 0px);
}
.tile.tile-position-2-2 {
  transform: translate(91px, 91px);
}
.tile.tile-position-2-3 {
  transform: translate(91px, 182px);
}
.tile.tile-position-2-4 {
  transform: translate(91px, 273px);
}
.tile.tile-position-3-1 {
  transform: translate(182px, 0px);
}
.tile.tile-position-3-2 {
  transform: translate(182px, 91px);
}
.tile.tile-position-3-3 {
  transform: translate(182px, 182px);
}
.tile.tile-position-3-4 {
  transform: translate(182px, 273px);
}
.tile.tile-position-4-1 {
  transform: translate(273px, 0px);
}
.tile.tile-position-4-2 {
  transform: translate(273px, 91px);
}
.tile.tile-position-4-3 {
  transform: translate(273px, 182px);
}
.tile.tile-position-4-4 {
  transform: translate(273px, 273px);
}

.tile {
  position: absolute;
}
.tile .tile-inner {
  border-radius: 3px;
  background: #eee4da;
  text-align: center;
  font-weight: bold;
  z-index: 10;
  font-size: 45px; /* Ajusté pour la nouvelle taille */
}
.tile {
  transition: 100ms ease-in-out;
  transition-property: transform;
}
.tile.tile-2 .tile-inner {
  background: #eee4da;
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0), inset 0 0 0 1px rgba(255, 255, 255, 0);
}
.tile.tile-4 .tile-inner {
  background: rgb(237.9, 224.6, 200.8);
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0), inset 0 0 0 1px rgba(255, 255, 255, 0);
}
.tile.tile-8 .tile-inner {
  color: #f9f6f2;
  background: rgb(242.86, 177.64, 122.22);
}
.tile.tile-16 .tile-inner {
  color: #f9f6f2;
  background: rgb(245.565, 149.71, 100.18);
}
.tile.tile-32 .tile-inner {
  color: #f9f6f2;
  background: rgb(247.17, 124.53, 95.19);
}
.tile.tile-64 .tile-inner {
  color: #f9f6f2;
  background: rgb(247.125, 94.95, 59.4);
}
.tile.tile-128 .tile-inner {
  color: #f9f6f2;
  background: rgb(237.4, 207.6, 114.8);
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0.2380952381), inset 0 0 0 1px rgba(255, 255, 255, 0.1428571429);
  font-size: 35px;
}
@media screen and (max-width: 400px) {
  .tile.tile-128 .tile-inner {
    font-size: 25px;
  }
}
.tile.tile-256 .tile-inner {
  color: #f9f6f2;
  background: rgb(237.3, 204.2, 97.6);
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0.3174603175), inset 0 0 0 1px rgba(255, 255, 255, 0.1904761905);
  font-size: 35px;
}
@media screen and (max-width: 400px) {
  .tile.tile-256 .tile-inner {
    font-size: 25px;
  }
}
.tile.tile-512 .tile-inner {
  color: #f9f6f2;
  background: rgb(237.2, 200.8, 80.4);
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0.3968253968), inset 0 0 0 1px rgba(255, 255, 255, 0.2380952381);
  font-size: 35px;
}
@media screen and (max-width: 400px) {
  .tile.tile-512 .tile-inner {
    font-size: 25px;
  }
}
.tile.tile-1024 .tile-inner {
  color: #f9f6f2;
  background: rgb(237.1, 197.4, 63.2);
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0.4761904762), inset 0 0 0 1px rgba(255, 255, 255, 0.2857142857);
  font-size: 25px;
}
@media screen and (max-width: 400px) {
  .tile.tile-1024 .tile-inner {
    font-size: 15px;
  }
}
.tile.tile-2048 .tile-inner {
  color: #f9f6f2;
  background: #edc22e;
  box-shadow: 0 0 30px 10px rgba(243.0660792952, 214.5572687225, 116.4339207048, 0.5555555556), inset 0 0 0 1px rgba(255, 255, 255, 0.3333333333);
  font-size: 25px;
}
@media screen and (max-width: 400px) {
  .tile.tile-2048 .tile-inner {
    font-size: 15px;
  }
}
.tile.tile-super .tile-inner {
  color: #f9f6f2;
  background: rgb(60.3, 58.15, 50.75);
  font-size: 30px;
}
@media screen and (max-width: 400px) {
  .tile.tile-super .tile-inner {
    font-size: 10px;
  }
}
@keyframes $animation-name {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.tile-new .tile-inner {
  animation: appear 200ms ease 100ms;
  animation-fill-mode: backwards;
}
@keyframes $animation-name {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
.tile-merged .tile-inner {
  z-index: 20;
  animation: pop 200ms ease 100ms;
  animation-fill-mode: backwards;
}

/* ==========================================================================
   AFFICHAGE ÉPURÉ & COMPACT (Mise à jour pour Iframe)
   ========================================================================== */
.above-game {
  display: flex;
  justify-content: flex-end; /* Aligne le bouton à droite */
  margin-top: -10px; /* Remonte le bouton vers le titre */
  margin-bottom: 5px; /* Espace réduit sous le bouton pour gagner en hauteur */
}

.game-intro, .game-explanation {
  display: none !important; /* Masqué définitivement pour l'affichage App */
}

.restart-button {
  display: inline-block;
  background: rgb(142.7914110429, 121.7484662577, 102.2085889571);
  border-radius: 3px;
  padding: 0 15px;
  text-decoration: none;
  color: #f9f6f2;
  height: 35px; /* Légèrement réduit */
  line-height: 37px;
  display: block;
  text-align: center;
}

/* ==========================================================================
   3. DIMENSIONS DU JEU (SMARTPHONES)
   ========================================================================== */
@media screen and (max-width: 400px) {
  /* Adapté pour très petits écrans */
  html, body {
    font-size: 15px;
  }
  body {
    margin: 0 !important;
    padding: 0 5px !important;
  }
  h1.title {
    font-size: 27px;
    margin-top: 5px;
  }
  .container {
    width: 280px;
    margin: 0 auto;
  }
  .score-container, .best-container {
    margin-top: 0;
    padding: 10px 10px;
    min-width: 40px;
  }
  .heading {
    margin-bottom: 10px;
  }
  .restart-button {
    width: auto;
    padding: 0 15px;
    margin-top: 0;
  }
  .game-container {
    margin-top: 10px;
    position: relative;
    padding: 15px;
    cursor: default;
    -webkit-touch-callout: none;
    -ms-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none;
    background: #bbada0;
    border-radius: 6px;
    width: 380px;
    height: 380px;
    box-sizing: border-box;
  }
  .game-container .game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(238, 228, 218, 0.5);
    z-index: 100;
    text-align: center;
  }
  .game-container .game-message p {
    font-size: 50px;
    font-weight: bold;
    height: 50px;
    line-height: 50px;
    margin-top: 140px;
  }
  .game-container .game-message .lower {
    display: block;
    margin-top: 30px;
  }
  .game-container .game-message a {
    display: inline-block;
    background: rgb(142.7914110429, 121.7484662577, 102.2085889571);
    border-radius: 3px;
    padding: 0 15px;
    text-decoration: none;
    color: #f9f6f2;
    height: 35px; /* Légèrement réduit */
    line-height: 37px;
    margin-left: 9px;
  }
  .game-container .game-message a.keep-playing-button {
    display: none;
  }
  .game-container .game-message {
    animation: fade-in 800ms ease 1200ms;
    animation-fill-mode: both;
  }
  .game-container .game-message.game-won {
    background: rgba(237, 194, 46, 0.5);
    color: #f9f6f2;
  }
  .game-container .game-message.game-won a.keep-playing-button {
    display: inline-block;
  }
  .game-container .game-message.game-won, .game-container .game-message.game-over {
    display: block;
  }
  .grid-container {
    position: absolute;
    z-index: 1;
  }
  .grid-row {
    margin-bottom: 15px;
  }
  .grid-row:last-child {
    margin-bottom: 0;
  }
  .grid-row:after {
    content: "";
    display: block;
    clear: both;
  }
  .grid-cell {
    width: 76.25px;
    height: 76.25px;
    margin-right: 15px;
    float: left;
    border-radius: 3px;
    background: rgba(238, 228, 218, 0.35);
  }
  .grid-cell:last-child {
    margin-right: 0;
  }
  .tile-container {
    position: absolute;
    z-index: 2;
  }
  .tile, .tile .tile-inner {
    width: 77px;
    height: 77px;
    line-height: 77px;
  }
  .tile.tile-position-1-1 {
    transform: translate(0px, 0px);
  }
  .tile.tile-position-1-2 {
    transform: translate(0px, 91px);
  }
  .tile.tile-position-1-3 {
    transform: translate(0px, 182px);
  }
  .tile.tile-position-1-4 {
    transform: translate(0px, 273px);
  }
  .tile.tile-position-2-1 {
    transform: translate(91px, 0px);
  }
  .tile.tile-position-2-2 {
    transform: translate(91px, 91px);
  }
  .tile.tile-position-2-3 {
    transform: translate(91px, 182px);
  }
  .tile.tile-position-2-4 {
    transform: translate(91px, 273px);
  }
  .tile.tile-position-3-1 {
    transform: translate(182px, 0px);
  }
  .tile.tile-position-3-2 {
    transform: translate(182px, 91px);
  }
  .tile.tile-position-3-3 {
    transform: translate(182px, 182px);
  }
  .tile.tile-position-3-4 {
    transform: translate(182px, 273px);
  }
  .tile.tile-position-4-1 {
    transform: translate(273px, 0px);
  }
  .tile.tile-position-4-2 {
    transform: translate(273px, 91px);
  }
  .tile.tile-position-4-3 {
    transform: translate(273px, 182px);
  }
  .tile.tile-position-4-4 {
    transform: translate(273px, 273px);
  }
  .tile .tile-inner {
    font-size: 35px;
  }
  .game-message p {
    font-size: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    margin-top: 110px !important;
  }
  .game-message .lower {
    margin-top: 30px !important;
  }
}/*# sourceMappingURL=main.css.map */