/* ====================================================================
   DUPLIT CSS — Version réorganisée & commentée
   ==================================================================== */


/* ====================================================================
   0. BASE / RESET
   ==================================================================== */
/* Ici, aucun override général de Bootstrap.
   Toutes les sections ci-dessous s'appuient sur les classes définies. */


/* ====================================================================
   1. TABLEUR & COUPS — Styles des cellules pour l’affichage coup-par-coup
   ==================================================================== */

/* Titre général */
td.t {
  background-color:#F5F5F5;
  text-align:center;
}

/* Titres des colonnes */
td.c { 
  background-color:#F5F5F5;
  text-align:center;
  width:22px;
}

/* Titre colonne joueur */
td.jt {
  background-color:white;
  text-align:center; 
  width:220px;
}

th.c {
  background-color:#F5F5F5;
  text-align:center;
  font-weight:bold;
  width:22px;
}

th.jt {
  background-color:white;
  text-align:center;
  font-weight:bold;
  width:220px;
}

/* Barre SOLO (copie exacte du tableur .s) */
.progress-bar.solo-bar {
    background-color: #ffcc66; /* ⚠️ mets EXACTEMENT la même valeur que td.s */
    color: #000;
    font-weight: bold;
}

th.sortable { cursor: pointer; user-select: none; }
.sort-icon { margin-left: 6px; font-size: 12px; opacity: 0.8; }
th.sortable:hover .sort-icon { opacity: 1.0; }

/* Seules les 3 colonnes à élargir */
th.col-joueur { width:250px; }
th.col-table { width: 60px; }
th.col-place { width: 60px; }

/* Cellule joueur */
td.j {
  background-color:#F5F5F5;
  width:220px;
  padding-left:3px;
}

/* Numéro de coup */
td.n { 
  background-color:white; 
  text-align:center; 
  width:22px;
}

/* Coup au top */
td.o { 
  background-color:#D4FFD4; 
  text-align:center; 
  width:22px;
}

/* Coup perdant */
td.p { 
  background-color:#FFD4FF; 
  text-align:center; 
  width:22px;
}

/* Coup solo */
td.s { 
  background-color:green; 
  color:white;
  text-align:center; 
  width:22px;
}

/* Mot et points */
td.m {
  background-color:#FFFFBB;
  text-align:center;
  width:22px;
  line-height:14px;
  vertical-align:top;
}
td.w {
  background-color:#FFFFBB;
  text-align:center;
  width:22px;
  vertical-align:top;
}

/* Coup à zéro */
td.z { 
  background-color:rgb(255, 2, 2); 
  text-align:center;
  width:22px;
}

/* Avertissement */
td.a { 
  background-color:rgb(146,159,255); 
  text-align:center;
  width:22px;
}

td.i {
  background-color: rgb(254, 134, 82);
  text-align: center;
  width: 22px;
}

td.e {
    background-color: #f71f18;   /* rouge Bootstrap lisible */
    color: white;
    font-weight: bold;
}

td.s {
    background-color: #ffd966;
    font-weight: bold;
}

/* Mot vertical */
td.m span.motv {
  display:inline-block;
  writing-mode:vertical-rl;
  text-orientation:upright;
}

/* ==========================================================
   GRILLE DU TABLEUR DE PARTIE
   ========================================================== */

table.tableur-partie {
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #909090;
}

/* Grille uniforme sur toutes les cellules */
table.tableur-partie th,
table.tableur-partie td {
    border: 1px solid #b6b6b6 !important;
}

/* Ligne uniforme au-dessus et en dessous des titres de colonnes */
table.tableur-partie tr.tableur-header th,
table.tableur-partie tr.tableur-header td {
    border-top: 1px solid #808080 !important;
    border-bottom: 1px solid #808080 !important;
}

/* Repère vertical après les coups 5, 10, 15, 20... */
table.tableur-partie .coup-separator {
    border-right: 2px solid #707070 !important;
}

/* Séparation entre les informations joueur et les coups */
table.tableur-partie tbody td:nth-child(8),
table.tableur-partie tr.tableur-header th:nth-child(8) {
    border-right: 2px solid #707070 !important;
}

/* Cellules vides avant les mots */
table.tableur-partie td.empty-cell {
    border: none !important;
}

/* ====================================================================
   2. GRILLE SCRABBLE — Cases du plateau (déjà largement prévues par toi)
   ==================================================================== */

/* Taille générale */
.grille { font-size:133%; }

/* Cases d'angle vides */
td.coin {
  background-color:#c7fbc7;
  border-color:#c7fbc7;
  width:30px;
  height:30px;
}

/* Cases repères (lettres ou chiffres axes) */
td.rep {
  background-color:#c7fbc7; 
  text-align:center;
  color:black;
  border-color:#c7fbc7;
  width:30px;
  height:30px;
}

/* --- CASES VIDES (plateau standard) --- */

/* Case neutre */
td.l1 {
  background-color:white; 
  width:30px;
  height:30px;
}

/* Lettre ×2 */
td.l2 {
  background-color:#96C4E5; 
  width:30px;
  height:30px;
}

/* Lettre ×3 */
td.l3 {
  background-color:#0892CF; 
  width:30px;
  height:30px;
}

/* Mot ×2 */
td.m2 {
  background-color:#FBBBBB; 
  width:30px;
  height:30px;
}

/* Mot ×3 */
td.m3 {
  background-color:#D8012D; 
  width:30px;
  height:30px;
}

/* --- CASES REMPLIES (lettres posées) --- */

td.l {
  background-color:#f2f2bd; 
  text-align:center;
  color:black;
  width:30px;
  height:30px;
}

/* Joker */
td.jok {
  background-color:#f2f2bd; 
  text-align:center;
  color:red;
  width:30px;
  height:30px;
}

/* Conteneur tableau partie */
#partie td { padding:3px; }

/* Case vide du tableau */
td.empty-cell {
  background-color:transparent !important;
  border:none !important;
  padding:0 !important;
}

/* Plateau Scrabble dans la page Partie */
table.grille {
    border-collapse: collapse;
    margin: 0 auto 20px auto;
}

table.grille td {
    border: 1px solid #ccc;
}

/* Tableau des coups de la partie */
.table-coups-partie th,
.table-coups-partie td {
    font-size: 13px;
    padding: 4px 6px;
}

/* ====================================================================
   3. PALETTES SPÉCIALES — Palmarès, catégories, classements
   ==================================================================== */

/* Palmarès par série (rouge pastel) */
.palmares-serie {
    background-color:#f0bdbd !important;
    font-weight:bold;
    font-size:15px;
}

/* Palmarès par catégorie (vert pastel) */
.palmares-categorie {
    background-color:#dff0d8 !important;
    font-weight:bold;
    font-size:15px;
}

/* Empêche bootstrap d'altérer les lignes colorées */
table.table.table-striped tr.palmares-serie td,
table.table.table-striped tr.palmares-serie th,
table.table.table-striped tr.palmares-categorie td,
table.table.table-striped tr.palmares-categorie th {
    background-color:inherit !important;
}

/* Bandeau d’en-tête du classement */
.classement-header th {
    background-color:#ffe5cc !important;
    font-weight:bold;
    text-align:center;
}

/* Colonnes "zéro" dans le classement */
td.col-zero, th.col-zero {
    background-color:#e5e2e2 !important;
}


/* ====================================================================
   4. PANNEAUX INDIVIDUELS — Fiches joueurs, stats
   ==================================================================== */

.panel-heading-feuille {
    background-color:#d6f5d6 !important;  /* vert pastel */
    font-weight:bold;
    font-size:16px;
}

.panel-heading-stats {
    background-color:#d6e6ff !important;  /* bleu pastel */
    font-weight:bold;
    font-size:16px;
}


/* ====================================================================
   5. MENUS — Local (P1/P2) + Global + Logo
   ==================================================================== */

/* Logo */
.menu-logo {
    text-align:left !important;
    margin-bottom:10px;
}
.menu-logo-img {
    height:60px;
}

/* --- Menu local (nav-pills) --- */
.nav.nav-pills {
    margin-bottom:20px;
    border-bottom:1px solid #ddd;
    padding-bottom:5px;     /* alignement visuel avec menu global */
    margin-top:0;           /* évite les décalages */
    font-weight:bold;
}

/* --- Menu façon "Sablier" --- */

.navbar-sablier {
    border-bottom:1px solid #ddd;
    margin-bottom:20px;
    padding-bottom:5px;
}

.navbar-sablier a {
    display:inline-block;
    padding:10px 18px;
    margin-right:5px;
    font-weight:bold;
    color:#337ab7;
    border:1px solid transparent;
    border-radius:4px 4px 0 0;
    text-decoration:none;
}

.navbar-sablier a:hover {
    background-color:#eee;
}

.navbar-sablier a.active {
    background-color:#337ab7;
    color:white !important;
    border-color:#337ab7;
}

/* --- Menu GLOBAL (bleu moderne) --- */

.navbar-global {
    border-bottom:1px solid #ddd;
    margin-bottom:20px;
    padding-bottom:5px;
}

.navbar-global a {
    display:inline-block;
    padding:10px 18px;
    margin-right:5px;
    font-weight:bold;
    color:#1A73E8;                 /* bleu Google-like */
    border:1px solid transparent;
    border-radius:4px 4px 0 0;
    text-decoration:none;
}

.navbar-global a:hover {
    background-color:#E8F0FE;
}

.navbar-global a.active {
    background-color:#e81a35;
    color:white !important;
    border-color:#e81a40;
}

/* Entrée grisée pour les parties non disponibles */
.navbar-global .disabled-link {
    color:#999;
    padding:8px 12px;
    margin-right:4px;
    text-decoration:none;
    cursor:default;
    opacity:0.7;
}

/* Menu switch parties */

.menu-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:1px solid #ddd;
    margin-bottom:20px;
    padding-bottom:5px;
}

/* Quand le menu est dans menu-row, un seul trait horizontal suffit */
.menu-row .nav.nav-pills,
.menu-row .navbar-sablier,
.menu-row .navbar-global {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.menu-main{
    flex:1;
}

.menu-parts{
    flex:0 0 auto;
    display:flex;
    justify-content:flex-end;
}

.part-switcher{
    display:flex;
    gap:6px;
    margin:0;
    justify-content:flex-end;
    white-space:nowrap;
}

.part-switcher a{
    padding:8px 12px;
    border-radius:6px;
    background:#888;
    color:white;
    text-decoration:none;
    font-weight:bold;
}

.part-switcher a:hover{
    background:#666;
    color:white;
    text-decoration:none;
}

.part-switcher a.active{
    background:#e74c3c;
}


/* ====================================================================
   6. TABLEAUX GLOBAUX — Alignements, colonnes numériques
   ==================================================================== */

/* Centrage vertical/horizontal des titres */
table.table.classement-global th {
    vertical-align:middle !important;
    text-align:center !important;
}

/* Alignement des nombres (résumés, classements) */
td.num-cell {
    font-family:monospace;
}

td.num-cell .num-int {
    display:inline-block;
    min-width:4ch;
    text-align:right;
}

td.num-cell .num-dec {
    display:inline-block;
    min-width:3ch;
    text-align:left;
}

/* =====================
   7. TABLEAU DES COUPS
   ===================== */

/* Titre du tableau des coups*/
.titre-coups {
    background-color: #fff7cc;
    padding: 8px 12px;
    font-weight: bold;
    border-radius: 4px;
    width: 100%;            /* ← occupe toute la largeur du parent */
    display: block;         /* ← obligatoire pour largeur 100% */
    margin-bottom: 10px;    /* ← légère marge sous le bandeau */
    text-align: center;     /* (optionnel) centrer le texte */
}

/* Solo ordinateur dans le tableau */
.solo-ordinateur {
    color: #c00000;
    font-weight: bold;
}

/* Scrabble dans le tableau */
.mot-scrabble {
    font-weight: bold;
}

/* Nouveau mots admis dans ODS dans le tableau */
.mot-nouveau-ods {
    color: #1f4fd8;
}

/* Style pour notation (ODSx) */
.ods-version {
    font-size: 0.85em;
    margin-left: 4px;
    opacity: 0.85;
}

/* Lettre joker dans le mot */
.joker-letter {
    font-weight: bold;
    color: #c00000;
}

/* Coup actif dans la grille */
.coup-actif { outline: 2px solid #337ab7; }

/* Dashboard: tables compactes (force) */
#dashboard table,
.dashboard table,
.panel table,
.card table {
    border-collapse: collapse !important;
    width: 100%;
}

#dashboard table th,
#dashboard table td,
.dashboard table th,
.dashboard table td,
.panel table th,
.panel table td,
.card table th,
.card table td {
    padding: 4px 8px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* Empêche les lignes de s'étirer */
#dashboard table tr,
.dashboard table tr,
.panel table tr,
.card table tr {
    height: auto !important;
}

/* Si certains conteneurs sont en flex, évite l'étirement */
#dashboard .panel-body,
.dashboard .panel-body,
.panel .panel-body,
.card .panel-body {
    align-items: flex-start !important;
}

