﻿/* ----- Général ----- */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    margin-left: 1em;
    margin-right: 1em;
    padding-bottom: 60px; /* Laisse de la place pour la barre du bas */
    background-color: #f4f4f4;
}

/*main {
    margin-top: 8rem; //Évite que le contenu soit caché par le header 
}*/

#pageLoader {
    display: none;
    background-color: rgba(255, 255, 255, 0.8);
}

/* ----- Header ----- */
header {
    width: 100vw; /* Occupe toute la largeur de l'écran */
    height: 85px; /* Ajuste à la hauteur du logo */
    position: fixed; /* Fixe le header en haut */
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Garde le logo à gauche et le bouton à droite */
    padding: 0 20px;
    background: linear-gradient(to bottom, #fc3b2d 10%, #fa7e75 100%);
    color: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.logo {
    height: 85px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    justify-content: flex-end; /* Assure que le bouton reste à droite */
}

#login-btn, #welcome-msg {
    font-size: 18px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Fixe l'affichage du header pour petits écrans */
@media (max-width: 770px) {
    header {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0 10px;
    }

    #login-btn, #welcome-msg {
        font-size: 16px;
    }
}

/* ----- Cartes ----- */
.card {
    background-color: white;
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}

/* ----- Grille des jeux ----- */
.game-grid {
    display: grid;
    gap: 20px;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Colonnes dynamiques */
}

/* 🔥 Centrer correctement les icônes des jeux */
.game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* 🔥 Centre verticalement */
    max-width: 150px;
    margin: auto; /* 🔥 Centre l'élément dans la grille */
}

/* 🔥 Force exactement 2 colonnes sur petits écrans */
@media (max-width: 600px) {
    .game-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes toujours */
        gap: 10px;
        justify-items: center; /* 🔥 Centre chaque élément */
    }
}

.game-link {
    text-decoration: none; /* 🔥 Supprime le soulignement du texte */
    display: flex;
    flex-direction: column;
    align-items: center;
    color: black; /* Assure que le texte reste bien visible */
}

/* 🔥 Assure que les labels passent bien sur 2 lignes */
.game-link p {
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100px;
    line-height: 1.2;
    text-decoration: none; /* 🔥 Assure que les labels ne sont PAS soulignés */
}

.game-link img {
    max-width: 100px;
}

/* ----- Barre de navigation inférieure ----- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    box-shadow: 0px -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1500;
}

.bottom-nav a {
    border: none;
    background: transparent;
    cursor: pointer;
}

.bottom-nav a img {
    width: 40px;
}

.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 10px; /* 🔥 Assure une taille minimale */
    margin-top: 10px;
}

.adsbygoogle {
    width: 100%;
    min-height: 10px; /* 🔥 Forcer une hauteur valide */
}

#ad_card {
    display:none;
}

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.login-box {
    background: #fff;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
    width: 100%;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 15px;
}

.login-container .separator {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    color: #777;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    cursor
    /* End Login Page */
 
/* Nav buttons */    
.nav-button img
{
    width: 32px;
    height: auto;
}

.nav-button {
    background-color: transparent;
    border: none;
    padding: 0;
}

/* GameSleeve */
.equal-width-table th,
.equal-width-table td {
    width: 1%;
    white-space: nowrap;
}
/* End GameSleeve */

#negativeToggle:checked ~ label {
    color: red;
}

/*  Grille Skyjo */


@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

#overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* === Grille Skyjo === */
#grid {
  all: unset;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: radial-gradient(circle at center, #222 0%, #111 100%);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

/* Table de cartes */
.card-table {
  all: unset;
  border-collapse: separate;
  border-spacing: 16px;
  margin: auto;
}

/* Cellules de cartes */
.card-cell {
  all: unset;
  width: 90px;
  height: 135px; /* ratio 2:3 */
  text-align: center;
  vertical-align: middle;
  font-size: 28px;
  font-weight: bold;
  color: white;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  font-family: 'Playfair Display', serif;
  border: 2px solid #fff;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

/* Hover interactif */
.card-cell:hover {
  all: unset;
  transform: scale(1.05);
  cursor: pointer;
}

/* Animation d’apparition */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Couleurs dynamiques (si utilisées via classes) */
.card-blue    { background-color: #2980b9; }
.card-orange  { background-color: #e67e22; }
.card-green   { background-color: #27ae60; }
.card-red     { background-color: #c0392b; }
.card-gray    { background-color: #7f8c8d; }


html, body {
    touch-action: manipulation;
}

button, a, input, textarea {
    touch-action: manipulation;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #fff;
}

.logo {
    height: 40px;
}

.home-icon {
    font-size: 24px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s ease;
}

.home-icon:hover {
    transform: scale(1.1);
    color: #000;
}

#friendsPanel h4, #friendsPanel h5, #friendsPanel legend {
    color: #333;
}

#friendsPanel ul {
    margin-bottom: 0;
}

#friendsPanel .form-check {
    margin-bottom: 8px;
}
