/* ================================
   2048 - Styles spécifiques
   ================================ */

body { background: #faf8f0; }

/* CONTAINER */
.container-2048 {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
    align-items: start;
    position: relative;
}

/* SCORES COULEURS */
#box-score    { background: #f65e3b; }
#box-meilleur { background: #edcf72; color: #232526; }

/* CHRONO */
.chrono-defi {
    text-align: center;
    margin-bottom: 10px;
}

#chrono {
    font-size: 3em;
    font-weight: 900;
    color: #764ba2;
    line-height: 1;
}

.chrono-label {
    font-size: 0.85em;
    color: #999;
    display: block;
}

.chrono-urgent {
    color: #f65e3b !important;
    animation: urgence 0.5s ease-in-out infinite alternate;
}

@keyframes urgence {
    from { transform: scale(1); }
    to   { transform: scale(1.1); }
}

/* GRILLE */
.grille-2048 {
    background: #bbada0;
    border-radius: 10px;
    padding: 8px;
    display: grid;
    gap: 6px;
    touch-action: none;
    width: min(58vh, 440px);
    box-sizing: border-box;
}

/* TUILES */
.tuile {
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(0.5em, 2.5vh, 1.6em);
    transition: all 0.1s ease;
    overflow: hidden;
}

.tuile-0    { background: #cdc1b4; }
.tuile-2    { background: #eee4da; color: #776e65; }
.tuile-4    { background: #ede0c8; color: #776e65; }
.tuile-8    { background: #f2b179; color: white; }
.tuile-16   { background: #f59563; color: white; }
.tuile-32   { background: #f67c5f; color: white; }
.tuile-64   { background: #f65e3b; color: white; }
.tuile-128  { background: #edcf72; color: white; }
.tuile-256  { background: #edcc61; color: white; }
.tuile-512  { background: #edc850; color: white; }
.tuile-1024 { background: #edc53f; color: white; }
.tuile-2048 { background: #edc22e; color: white; }
.tuile-super { background: #3d3a33; color: white; }