/* style.css — Bootstrap gère toute l'interface (boutons, cartes, formulaires, responsive).
   Ce fichier ne contient QUE ce que Bootstrap ne peut pas faire : le plateau de jeu
   (grille précise 15x15, positionnement des pions, couleurs du plateau). */

body.home-bg {
    min-height: 100vh;
    background: linear-gradient(160deg, #1d3557 0%, #457b9d 100%);
}

.ludo-title {
    letter-spacing: 4px;
    text-shadow: 0 4px 12px rgba(0,0,0,.35);
}

.letter-spacing {
    letter-spacing: 6px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(0,0,0,.08) inset;
}

/* ===================== PLATEAU DE JEU ===================== */

.board-shell {
    background: #0f1f38;
    min-height: 100vh;
}

.board-wrapper {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    padding: 8px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.board-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.cell {
    border: 1px solid rgba(0,0,0,.06);
    position: relative;
}

.cell.track {
    background: #fdfdfd;
}

.cell.safe {
    background: #fdfdfd;
}
.cell.safe::after {
    content: "★";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55%;
    color: #999;
}

.cell.entry-red   { background: #f8c9cd; }
.cell.entry-green { background: #c7e8d4; }
.cell.entry-yellow{ background: #faedb0; }
.cell.entry-blue  { background: #c4d7f5; }

.cell.home-red    { background: #e63946; }
.cell.home-green  { background: #2a9d5c; }
.cell.home-yellow { background: #f1c40f; }
.cell.home-blue   { background: #2166d6; }

.base-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.base-zone.red    { background: #e63946; }
.base-zone.green  { background: #2a9d5c; }
.base-zone.yellow { background: #f1c40f; }
.base-zone.blue   { background: #2166d6; }

.base-inner {
    width: 72%;
    height: 72%;
    background: #fff;
    border-radius: 8%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6%;
    padding: 8%;
}
.base-slot {
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.15);
}

.center-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}
.center-cell svg { width: 100%; height: 100%; display: block; }

.pawn {
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.9) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.pawn.movable {
    cursor: pointer;
    animation: pawn-pulse 1s infinite;
    z-index: 6;
}
/* Joueur ayant quitté la partie : pions et base grisés, sans les faire disparaître */
.pawn.pawn-left {
    filter: grayscale(1) brightness(.8);
    opacity: .55;
}
.base-zone.zone-left {
    filter: grayscale(1);
    opacity: .45;
    transition: filter .4s ease, opacity .4s ease;
}
@keyframes pawn-pulse {
    0%, 100% { box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.9) inset, 0 0 0 0 rgba(255,255,255,.7); }
    50%      { box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.9) inset, 0 0 0 6px rgba(255,255,255,0); }
}

.dice-box {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
    cursor: pointer;
    user-select: none;
    transition: transform .15s ease;
}
.dice-box:active { transform: scale(.92); }
.dice-box.disabled { opacity: .45; cursor: not-allowed; }
.dice-box.rolling { animation: dice-spin .5s linear; }
@keyframes dice-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.turn-banner {
    border-radius: 12px;
    padding: .6rem 1rem;
    font-weight: 600;
}

@media (max-width: 420px) {
    .dice-box { width: 52px; height: 52px; font-size: 1.5rem; }
}
