/* Widget compteur de points (compteur.html et ses versions nl/de/en), construit par compteur.js.
   Palette et typographie propres à cet outil (vert + terracotta ; Arial, et Manrope pour les scores) :
   seule zone du site où cette identité visuelle distincte est utilisée. */

:root{
  --bg: #1c1b17;
  --bg-soft: #26241e;
  --line: #3a372f;
  --sand: #f2ece0;
  --sand-dim: #a89e8c;
  --green: #4c7a3d;
  --green-deep: #375a2c;
  --terracotta: #b5502e;
  --terracotta-deep: #8a3b21;
  --boule: #c9c2b4;
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Le compteur est un widget autonome intégré dans la page normale du site. Depuis le
   14/10/2026, toute la page compteur.html est sombre (voir « Page sombre » en fin de fichier),
   comme partie.html ; le reste du site garde son thème clair. Par défaut, hauteur bornée façon "carte" ; en plein écran
   (.fullscreen-active, bouton dans la barre du haut), passe en position fixe pour occuper tout
   le viewport — même mécanisme que le mode plein écran de la carte ailleurs sur le site (voir
   definirModePleinEcran dans script.js). */
.compteur-widget{
  position: relative;
  height: min(640px, 80vh);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);

  background: var(--bg);
  font-family: 'Figtree', Arial, sans-serif;
  color: var(--sand);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.compteur-widget.fullscreen-active{
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  z-index: 1060;
}

/* Empêche la page de scroller derrière le widget tant que le plein écran est actif */
body.fullscreen-lock {
  overflow: hidden;
}

/* Contour visible au clavier uniquement (pas au toucher) */
.compteur-widget button:focus-visible{
  outline: 2px solid var(--sand);
  outline-offset: 2px;
}

/* Lu par les lecteurs d'écran, invisible à l'écran */
.compteur-widget .sr-only{
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Titre de la page masqué sur un téléphone (en hauteur ou en largeur), pour laisser l'écran au
   compteur ; Google et les lecteurs d'écran gardent leur <h1>. */
@media (max-width: 767px), (max-height: 500px){
  .hero-headline.titre-masque{
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.app{
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Boutons à pictos de la barre du haut : aide « ? » et plein écran */
.topbar-icones{ display: flex; align-items: center; }
.fullscreen-toggle-btn, .icone-topbar{
  background: none;
  border: none;
  color: var(--sand-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin-left: 8px;
}
.fullscreen-toggle-btn svg, .icone-topbar svg{ width: 18px; height: 18px; }
.fullscreen-toggle-btn:hover, .icone-topbar:hover{ color: var(--sand); }

/* top bar */
.topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 14px 8px;
  background: var(--bg);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sand-dim);
  flex: 0 0 auto;
  z-index: 5;
  white-space: nowrap;
}
.topbar button{
  background:none; border:none; color: var(--sand-dim);
  font-family: inherit; font-size: 12px; letter-spacing:.06em; text-transform:uppercase;
  padding: 6px 8px; cursor:pointer;
}
.target-toggle{ display:flex; gap:4px; background: var(--bg-soft); border-radius: 20px; padding:3px; }
.target-toggle button{
  padding: 5px 12px; border-radius: 16px; color: var(--sand-dim);
}
.target-toggle button.active{ background: var(--sand); color: var(--bg); font-weight:700; }

/* halves */
.halves{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
@media (orientation: landscape){
  .halves{ flex-direction: row; }
  .divider{ width:1px; height:100%; }
}

.team{
  flex: 1 1 0;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  position: relative;
  padding: 8px 16px 14px;
  min-height: 0;
  cursor: pointer;
  transition: filter .15s ease;
}
.team:active{ filter: brightness(1.12); }
.team.a{ background: var(--green); }
.team.b{ background: var(--terracotta); }

.divider{
  height: 1px;
  background: rgba(0,0,0,.35);
  flex: 0 0 auto;
}

/* Nom de l'équipe : un bouton, qui ouvre le panneau « Équipes » */
.name{
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  max-width: 90%;
  text-align:center;
  white-space: nowrap;
}
.name .texte-nom{ overflow: hidden; text-overflow: ellipsis; }

/* Pastille « Vous » : connecté, sur l'équipe du titulaire du compte */
.pastille-vous{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--sand);
  color: var(--bg);
  border-radius: 999px;
  padding: 3px 8px 3px 6px;
  font-family: 'Manrope', Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.pastille-vous svg{ width: 11px; height: 11px; stroke-width: 2.6; }

.score{
  font-family: 'Manrope', Arial, sans-serif;
  font-weight: 700;
  font-size: min(28vh, 32vw);
  line-height: 1;
  color: var(--sand);
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
}

/* « +3 » qui s'envole au-dessus du score à chaque mène marquée */
/* Décalé à droite et sur fond sombre, pour rester lisible par-dessus le gros score */
.gain{
  position: absolute;
  top: 26%;
  left: 78%;
  font-family: 'Manrope', Arial, sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--sand);
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  padding: 6px 14px;
  pointer-events: none;
  animation: gain-envol .8s ease-out forwards;
}
@keyframes gain-envol{
  0%{ transform: translate(-50%, 10px) scale(.8); opacity: 0; }
  20%{ transform: translate(-50%, 0) scale(1.1); opacity: 1; }
  100%{ transform: translate(-50%, -50px) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .gain{ animation-name: gain-fondu; }
  @keyframes gain-fondu{
    0%, 60%{ transform: translate(-50%, 0); opacity: 1; }
    100%{ transform: translate(-50%, 0); opacity: 0; }
  }
}

.boules{
  display:flex;
  flex-wrap: wrap;
  justify-content:center;
  gap: 4px;
  max-width: 260px;
  margin-bottom: 14px;
}
.boule{
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  flex: 0 0 auto;
}
.boule.filled{ background: var(--boule); box-shadow: 0 0 0 1px rgba(0,0,0,.15) inset; }

/* Une pastille par nombre de points d'une mène (le +1 se fait en touchant la moitié).
   Préfixe .compteur-widget : écarte le padding/la largeur de .controls de style.css (barre
   de recherche du site), qui faisaient passer la dernière pastille à la ligne sur mobile. */
.compteur-widget .controls{
  display:flex;
  align-items:center;
  flex-wrap: wrap;
  justify-content:center;
  gap: 6px;
  width: auto;
  max-width: 260px;
  padding: 0;
}
.chip{
  border: 1.5px solid rgba(255,255,255,.4);
  color: var(--sand);
  background: rgba(0,0,0,.12);
  font-family: 'Manrope', Arial, sans-serif;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
/* Le +1 n'a pas de pastille (on touche la moitié) : ce bouton n'existe que pour le clavier et
   n'apparaît que lorsqu'il a le focus. */
.chip.chip-un:not(:focus-visible){
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.hint{
  position:absolute;
  bottom: 8px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

/* bottom bar */
.bottombar{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  background: var(--bg);
}
.bottombar button{
  background:none; border:none; color: var(--sand-dim);
  font-family: inherit; font-weight:600;
  font-size: 13px; letter-spacing:.04em;
  padding: 8px 10px; cursor:pointer;
  display:flex; align-items:center; gap:6px;
  white-space: nowrap;
}
.bottombar button:disabled{ opacity:.35; }
.bottombar button svg{ width: 15px; height: 15px; }
/* Quatre boutons (Annuler, Mènes, Équipes, Partager) : resserrés sur un téléphone */
@media (max-width: 480px){
  .bottombar{ gap: 2px; padding-left: 8px; padding-right: 8px; justify-content: space-between; }
  .bottombar button{ padding: 8px 6px; font-size: 12.5px; letter-spacing: 0; gap: 5px; }
}
/* Petits téléphones : les quatre boutons tiennent sur une ligne même en néerlandais */
@media (max-width: 380px){
  .topbar{ padding-left: 8px; padding-right: 8px; }
  .topbar button{ padding: 6px 4px; }
  .bottombar{ padding-left: 8px; padding-right: 8px; gap: 4px; }
  .bottombar button{ padding: 8px 6px; font-size: 12px; letter-spacing: 0; gap: 4px; }
}

/* Panneaux par-dessus le compteur : victoire, renommer, détail des mènes.
   visibility (et pas seulement opacity) : un panneau caché ne doit pas être atteignable au
   clavier. Elle bascule après le fondu à la fermeture, tout de suite à l'ouverture. */
.win{
  position:absolute; inset:0;
  background: rgba(10,9,7,.92);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap: 18px;
  opacity:0; pointer-events:none; visibility: hidden;
  transition: opacity .3s ease, background .3s ease, visibility 0s linear .3s;
  z-index: 20;
  text-align:center;
  padding: 20px;
  overflow: hidden;
}
.win.show{
  opacity:1; pointer-events:auto; visibility: visible;
  transition: opacity .3s ease, background .3s ease;
}
.win.win-a{ background: linear-gradient(180deg, #1e2e17, #14200f); }
.win.win-b{ background: linear-gradient(180deg, #3a2015, #26140d); }
.win .trophy-line{
  font-size: 12px; letter-spacing:.14em; text-transform:uppercase; color: var(--sand-dim);
}
/* Annonce du vainqueur : écriture manuscrite (Caveat), comme le prévoit la charte */
.win .winner-name{
  font-family: 'Caveat', 'Manrope', Arial, sans-serif; font-weight:700;
  font-size: 44px; line-height: 1.05; color: #fff;
  text-wrap: balance;
}
.win .final-score{
  font-family: 'Manrope', Arial, sans-serif; font-weight:700;
  font-size: 20px; color: var(--sand-dim);
}
.win button{
  margin-top: 8px;
  background: var(--sand); color: var(--bg);
  border:none; border-radius: 999px;
  font-family: inherit; font-weight:700;
  padding: 12px 26px; font-size: 15px; cursor:pointer;
}
.win button.secondary{
  background: transparent; color: var(--sand);
  border: 1.5px solid rgba(255,255,255,.35);
  margin-top: 8px;
}

.confetti-field{
  position:absolute; inset:0;
  pointer-events:none;
  overflow:hidden;
}
.confetti-piece{
  position:absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  opacity: .9;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(.35,.05,.6,.95);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
@keyframes confetti-fall{
  0%{ transform: translateY(0) rotate(0deg); opacity: .95; }
  85%{ opacity: .9; }
  100%{ transform: translateY(115vh) rotate(540deg); opacity: 0; }
}
.modal-field{
  display:flex; flex-direction:column; gap:6px;
  width: min(280px, 80vw);
  text-align:left;
}
.modal-field span{
  font-size: 11px; letter-spacing:.08em; text-transform:uppercase; color: var(--sand-dim);
}
.modal-field input{
  font-family: inherit; font-weight:600; font-size:17px;
  background: var(--bg-soft); color: var(--sand);
  border: 1.5px solid rgba(255,255,255,.25); border-radius: 10px;
  padding: 10px 12px; outline:none;
}
.modal-field input:focus{ border-color: var(--sand); }

/* Détail des mènes : la plus récente en haut, avec le score après chaque mène */
.detail-menes{
  list-style: none;
  margin: 0; padding: 0;
  width: min(320px, 86vw);
  max-height: 60%;
  overflow-y: auto;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.detail-menes li{
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.detail-menes .numero{ color: var(--sand-dim); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.detail-menes .equipe{ display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-menes .equipe::before{ content: ''; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.detail-menes .a .equipe::before{ background: var(--green); }
.detail-menes .b .equipe::before{ background: var(--terracotta); }
.detail-menes .points{ font-family: 'Manrope', Arial, sans-serif; font-weight: 700; }
.detail-menes .apres{ color: var(--sand-dim); }
.detail-vide{ color: var(--sand-dim); font-size: 14px; }

/* ---------- Écran de fin : carte de la partie enregistrée ---------- */
.win{ overflow-y: auto; }
.win.show{ justify-content: safe center; }
.carte-partie{
  width: min(340px, 100%);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.carte-partie[hidden]{ display: none; }
.carte-partie svg{ width: 15px; height: 15px; flex: 0 0 auto; }
.tete-carte{ display: flex; align-items: center; gap: 7px; font-family: 'Manrope', Arial, sans-serif; font-weight: 700; font-size: 13px; color: #9fd585; }
.tete-carte svg{ width: 16px; height: 16px; }
.tete-carte.neutre{ color: var(--sand); }
.tete-carte a{ color: inherit; text-underline-offset: 3px; }
.ligne-carte{ display: flex; align-items: flex-start; gap: 8px; color: var(--sand); }
.ligne-carte > svg{ color: var(--sand-dim); margin-top: 2px; }
.ligne-carte > span{ min-width: 0; }
.carte-partie .discret{ color: var(--sand-dim); font-size: 12.5px; }
.resultat{ font-weight: 700; }
.resultat.v{ color: #9fd585; }
.resultat.d{ color: #f0a383; }
.fanny{ background: var(--sand); color: var(--bg); font-family: 'Manrope', Arial, sans-serif; font-weight: 800; font-size: 10px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 7px; }
.liens-carte{ display: flex; flex-wrap: wrap; gap: 6px; }
/* .win button est le gros bouton de l'écran de fin : ces liens en annulent l'allure */
.win .lien-carte{
  margin: 0;
  background: rgba(255,255,255,.1);
  color: var(--sand);
  border: none;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.win .lien-carte svg{ width: 13px; height: 13px; }
.win .lien-carte.plein{ background: var(--sand); color: var(--bg); padding: 9px 14px; font-size: 13.5px; }
.win .lien-carte.petit{ padding: 3px 9px; margin-left: 2px; }
.choix-equipe{ display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.win .choix-equipe .lien-carte{ justify-content: center; border-radius: 10px; padding: 9px 6px; color: #fff; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.win .choix-equipe .equipe-a{ background: var(--green); }
.win .choix-equipe .equipe-b{ background: var(--terracotta); }
.win .choix-equipe .aucune{ grid-column: 1 / -1; font-weight: 600; background: rgba(255,255,255,.1); }

/* ---------- Feuilles : « Équipes », « Ajouter un joueur », terrains proches ---------- */
.feuille{
  position: absolute; inset: 0;
  z-index: 30;
  background: rgba(10,9,7,.6);
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
  user-select: text; -webkit-user-select: text;
}
.feuille.show{ opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .25s ease; }
#joueurModal, #terrainModal, #partageModal{ z-index: 35; }
.feuille-corps{
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 16px 16px max(18px, env(safe-area-inset-bottom));
  max-height: 92%;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  transform: translateY(16px);
  transition: transform .25s ease;
}
.feuille.show .feuille-corps{ transform: none; }
@media (prefers-reduced-motion: reduce){ .feuille-corps{ transition: none; transform: none; } }
.feuille-tete{ display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feuille-titre{ font-family: 'Manrope', Arial, sans-serif; font-weight: 800; font-size: 18px; }
.fermer-feuille{ background: var(--bg-soft); border: none; color: var(--sand); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; flex: 0 0 auto; }
.formats{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.formats button{ background: var(--bg-soft); border: 1.5px solid transparent; color: var(--sand); border-radius: 12px; padding: 8px 4px; cursor: pointer; display: grid; gap: 2px; font-family: inherit; }
.formats button b{ font-family: 'Manrope', Arial, sans-serif; font-weight: 800; font-size: 15px; }
.formats button span{ font-size: 11px; color: var(--sand-dim); }
.formats button.actif{ border-color: var(--sand); }
.blocs-equipes{ display: grid; gap: 14px; }
.bloc-equipe{ display: grid; gap: 6px; }
.titre-equipe{ display: flex; align-items: center; gap: 8px; font-family: 'Manrope', Arial, sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sand-dim); }
.titre-equipe::before{ content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.bloc-equipe.b .titre-equipe::before{ background: var(--terracotta); }
.feuille .champ{
  background: var(--bg-soft); color: var(--sand);
  border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-weight: 600; font-size: 16px;
  padding: 8px 10px; width: 100%; min-width: 0; outline: none;
}
.feuille .champ:focus{ border-color: var(--sand); }
.joueur{ display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border-radius: 10px; padding: 6px 6px 6px 12px; min-height: 42px; font-size: 15px; font-weight: 600; }
.joueur .n{ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.joueur .vous{ color: var(--sand-dim); font-weight: 400; }
.joueur button{ background: none; border: none; color: var(--sand-dim); cursor: pointer; padding: 6px 8px; font-family: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.joueur button svg, .place-libre svg{ width: 15px; height: 15px; }
.place-libre{ background: none; border: 1.5px dashed var(--line); color: var(--sand-dim); border-radius: 10px; min-height: 42px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 0 12px; }
.case-garder{ display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--sand); background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.case-garder[hidden]{ display: none; }
.case-garder input{ width: 18px; height: 18px; margin: 1px 0 0; accent-color: #74C15A; flex: 0 0 auto; }
.case-garder small{ display: block; color: var(--sand-dim); font-size: 12px; margin-top: 2px; }
.note-feuille{ font-size: 12.5px; color: var(--sand-dim); margin: 0; }
.note-feuille[hidden], .recents-zone[hidden]{ display: none; }
.bouton-plein{ background: var(--sand); color: var(--bg); border: none; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 15px; padding: 11px 22px; cursor: pointer; }
.recents-zone{ display: grid; gap: 8px; }
.recents{ display: flex; flex-wrap: wrap; gap: 6px; }
.recents button{ background: var(--bg-soft); border: 1px solid var(--line); color: var(--sand); border-radius: 999px; padding: 8px 14px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.saisie-joueur{ display: flex; gap: 6px; }
.saisie-joueur .bouton-plein{ padding: 9px 16px; }
.liste-terrains{ display: grid; gap: 6px; }
.terrain-choix{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--bg-soft); border: none; color: var(--sand); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.terrain-choix svg{ width: 16px; height: 16px; color: var(--sand-dim); }
.terrain-choix small{ color: var(--sand-dim); font-size: 12.5px; white-space: nowrap; }

/* ---------- Feuille « Partager la partie » : QR code, code court, places ---------- */
.partage-corps{ display: grid; gap: 14px; }
.qr-partage{ display: grid; justify-items: center; gap: 8px; }
.qr-image{ width: min(200px, 60vw); aspect-ratio: 1; background: #fff; border-radius: 14px; padding: 6px; }
.qr-image[hidden]{ display: none; }
.qr-image svg{ display: block; width: 100%; height: 100%; }
.code-partage{ font-family: 'Manrope', Arial, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: .2em; text-align: center; }
.code-partage small{ display: block; font-family: 'Figtree', Arial, sans-serif; font-weight: 400; font-size: 12px; letter-spacing: 0; color: var(--sand-dim); }
.places-partage{ display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.place-partage{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.place-partage + .place-partage{ border-top: 1px solid var(--line); }
.place-partage .n{ display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-partage .n::before{ content: ''; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.place-partage.b .n::before{ background: var(--terracotta); }
.place-partage.libre{ color: var(--sand-dim); font-weight: 400; }
.etat-place{ flex: 0 0 auto; font-size: 12.5px; font-weight: 400; color: var(--sand-dim); }
.etat-place.ok{ color: #9fd585; font-weight: 700; }
.passer-main{ flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; background: none; color: var(--sand); border: 1px solid var(--sand-dim); border-radius: 999px; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 10px; cursor: pointer; }
.passer-main svg{ width: 14px; height: 14px; }

/* ---------- Passer la main ----------
   Un autre joueur marque : bandeau « Julie marque » en haut des moitiés, qui ne réagissent plus
   au toucher (pastilles et « Touchez pour +1 » cachées), et « Reprendre la main » en évidence. */
.halves{ position: relative; }
.bandeau-main{
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; align-items: center; gap: 7px; max-width: calc(100% - 24px);
  background: var(--sand); color: var(--bg); border-radius: 999px; padding: 6px 14px;
  font-family: 'Manrope', Arial, sans-serif; font-size: 13px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); pointer-events: none;
}
.bandeau-main[hidden]{ display: none; }
.bandeau-main span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau-main svg{ flex: 0 0 auto; width: 14px; height: 14px; color: var(--green); }
/* Message bref (partie arrêtée après 12 h, main reprise…) : sur deux lignes plutôt que coupé */
.bandeau-main.bandeau-message{ width: max-content; border-radius: 14px; }
.bandeau-main.bandeau-message span{ white-space: normal; }
.compteur-suit .team{ cursor: default; filter: saturate(.8); }
.compteur-suit .team:active{ filter: saturate(.8); }
.compteur-suit .controls, .compteur-suit .hint{ visibility: hidden; }
.compteur-suit .team .name{ cursor: default; }
.bottombar button[hidden]{ display: none; }
.bottombar button.reprendre{ color: var(--bg); background: var(--sand); border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.topbar button:disabled{ opacity: .35; cursor: default; }
.actions-partage{ display: flex; flex-wrap: wrap; gap: 8px; }
.bouton-ligne{ display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto; background: none; color: var(--sand); border: 1px solid var(--line); border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 14px; padding: 9px 14px; cursor: pointer; }
.bouton-ligne svg{ width: 15px; height: 15px; }
.partage-corps .note-feuille:empty{ display: none; }

/* ---------- Feuille « Comment ça marche ? » ---------- */
.aide-liste{ list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.aide-liste li{ display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.aide-liste svg{ box-sizing: content-box; width: 18px; height: 18px; padding: 8px; border-radius: 50%; background: var(--bg-soft); color: var(--sand); }
.aide-liste span{ font-size: 13.5px; line-height: 1.45; color: var(--sand-dim); }
.aide-liste b{ display: block; margin-bottom: 1px; font-family: 'Manrope', Arial, sans-serif; font-size: 15px; color: var(--sand); }
.aide-pied{ display: grid; gap: 8px; }
.aide-pied .bouton-plein{ display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.aide-pied .bouton-plein svg{ width: 17px; height: 17px; }

/* ---------- Page sombre (14/10/2026, demandé par Rémy) ----------
   Toute la page prend la palette du compteur, comme partie.html (« Rejoindre une partie ») :
   mêmes règles que style-partie.css, sur la classe .page-sombre du <body> et avec le logo
   négatif (images/mapetanque-logo.svg). Le widget garde un filet pour se détacher du fond. */
body.page-sombre{ background: var(--bg); color: var(--sand); }
.page-sombre .entete-sobre #menu-button,
.page-sombre .entete-sobre .province-breadcrumb,
.page-sombre .entete-sobre .province-breadcrumb a,
.page-sombre .entete-sobre .hero-headline{ color: var(--sand); }
.page-sombre .entete-sobre .province-breadcrumb a:hover{ color: #9fd585; }
/* Ordinateur : les trois rubriques du menu (leurs listes déroulantes gardent leur panneau clair) */
.page-sombre .entete-sobre .game-nav-link,
.page-sombre .entete-sobre #lang-switcher-inline .lang-toggle{ color: var(--sand); }
.page-sombre .compteur-widget:not(.fullscreen-active){ border: 1px solid var(--line); }

.compteur-lien-code{ margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--sand-dim); }
.compteur-lien-code a{ color: #9fd585; font-weight: 600; text-underline-offset: 3px; }

/* Présentation sous le compteur (texte pour les visiteurs, Google et les IA) */
.compteur-presentation{ margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); color: var(--sand); }
.compteur-presentation h2{ margin: 0 0 12px; font-family: 'Manrope', Arial, sans-serif; font-weight: 700; font-size: 19px; line-height: 1.3; color: var(--sand); }
.compteur-presentation p{ margin: 0 0 12px; font-family: 'Figtree', Arial, sans-serif; font-size: 16px; line-height: 1.55; }
.compteur-presentation b{ font-weight: 600; }
.compteur-presentation-liens{ color: var(--sand-dim); }
.compteur-presentation a,
.compteur-presentation button{ color: #9fd585; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.compteur-presentation button{ padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 600px){
  .compteur-presentation h2{ font-size: 18px; }
}
