/* Écrans sociaux de Pile Poil (lot H) : partage, duel, classement, équipe,
   bandes, réglages, à propos, série.

   Les composants de la promo Mantan (promo/src/commun.tsx) traduits en em :
   Bulle, Mot, Badge, Pastille, Carte. Ombre dure pour ce qui surgit, ombre
   floue pour les seules cartes à lire ; autocollants opaques, jamais de
   backdrop-filter, jamais de thème sombre. Toutes les classes commencent par
   so- pour ne rien toucher de style.css.

   Les entrées au ressort sont jouées en JS (Web Animations, échantillons du
   ressort de la promo) : la propriété transform leur appartient, l'inclinaison
   fixe d'un autocollant passe donc par la propriété rotate. */

/* --------------------------------------------------------------------------
   Écran
   -------------------------------------------------------------------------- */

.so-ecran {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: 'Nunito', 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  color: #1f2937;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.so-ecran[hidden],
.so-ecran [hidden] {
  display: none !important;
}

.so-ecran *,
.so-panneau * {
  box-sizing: border-box;
}

/* colonne de lecture : le contenu ne s'étale pas sur un écran large */
.so-colonne {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.so-centre {
  text-align: center;
}

.so-nombre {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-variant-numeric: tabular-nums;
}

.so-hors-ecran {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* en-tête : retour à gauche, titre au centre, la droite libre pour le bouton son de la façade */
.so-entete {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 58px 6px;
  flex: none;
}

.so-retour {
  position: absolute;
  left: 0;
  top: 6px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #15803d;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.so-retour:active {
  translate: 0 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.so-picto {
  width: 24px;
  height: 24px;
  flex: none;
}

/* --------------------------------------------------------------------------
   Autocollants de la promo
   -------------------------------------------------------------------------- */

/* Bulle : étiquette du haut de l'écran, vert foncé pour les bonnes nouvelles,
   rouge pour un raté (un duel perdu) */
.so-bulle {
  display: inline-block;
  margin: 0;
  max-width: 100%;
  padding: 0.196em 0.478em 0.109em;
  border-radius: 0.435em;
  background: #15803d;
  color: #fff;
  font: 800 1.75rem/1.05 'Baloo 2', 'Nunito', sans-serif;
  text-align: center;
  box-shadow: 0 0.152em 0 rgba(0, 0, 0, 0.18);
  rotate: -3deg;
  overflow-wrap: anywhere;
}

.so-bulle-rouge { background: #ef4444; }

/* Mot : gros mot qui surgit (titres, chiffres) */
.so-mot {
  margin: 0;
  font: 800 2.25rem/1 'Baloo 2', 'Nunito', sans-serif;
  letter-spacing: -0.01em;
  color: #15803d;
  text-align: center;
  text-shadow: 0 0.05em 0 #15803d22;
}


/* sur le fond vert de la promo, les titres sont blancs */
.so-sur-vert .so-mot {
  color: #fff;
  text-shadow: 0 0.05em 0 rgba(0, 0, 0, 0.18);
}

/* Badge « EXCLUSIF » : jaune, capitales, oscillation 4° ± 2° sur 1,26 s */
.so-badge {
  display: inline-block;
  padding: 0.18em 0.6em 0.07em;
  border-radius: 0.54em;
  background: #facc15;
  color: #1f2937;
  font: 800 0.875rem/1.2 'Baloo 2', 'Nunito', sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: 0 0.14em 0 rgba(0, 0, 0, 0.15);
  rotate: 4deg;
  animation: so-oscille 1.26s ease-in-out infinite;
}

@keyframes so-oscille {
  0%, 100% { rotate: 2deg; }
  50% { rotate: 6deg; }
}

/* Pastille : blanche, texte vert foncé, légèrement penchée */
.so-pastille {
  display: inline-block;
  padding: 0.267em 0.667em 0.1em;
  border-radius: 0.567em;
  background: #fff;
  color: #15803d;
  font: 800 1rem/1.25 'Baloo 2', 'Nunito', sans-serif;
  box-shadow: 0 0.167em 0 rgba(0, 0, 0, 0.15);
  rotate: -2deg;
  white-space: nowrap;
}

.so-pastilles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}

.so-pastilles .so-pastille:nth-child(even) { rotate: 2deg; }

/* Carte (« Sous » de la promo) : la seule à ombre floue, faite pour être lue */
.so-carte {
  border-radius: 0.68em;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 0.27em 0.68em rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
}

.so-etiquette {
  margin: 0 0 6px;
  font: 800 0.8125rem/1.25 'Nunito', sans-serif;
  color: #15803d;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.so-texte {
  margin: 0;
  font: 800 1rem/1.35 'Nunito', sans-serif;
}

.so-texte-doux {
  margin: 0;
  font: 700 0.9375rem/1.4 'Nunito', sans-serif;
  color: #374151;
}

/* --------------------------------------------------------------------------
   Boutons et champs
   -------------------------------------------------------------------------- */

.so-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0.45em 1em 0.3em;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #15803d;
  font: 800 1.25rem/1.1 'Baloo 2', 'Nunito', sans-serif;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.so-bouton:active {
  translate: 0 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* principal : le vert de la pompe et son ombre dure vert foncé (blanc sur
   #16a34a seulement en gros caractères gras : 20 px et plus) */
.so-bouton-principal {
  width: 100%;
  min-height: 64px;
  background: #16a34a;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 6px 0 #15803d;
}

.so-bouton-principal:active {
  translate: 0 5px;
  box-shadow: 0 1px 0 #15803d;
}

.so-bouton-fonce {
  background: #15803d;
  color: #fff;
  box-shadow: 0 5px 0 #166534;
}

.so-bouton-fonce:active {
  box-shadow: 0 1px 0 #166534;
}

.so-bouton-large {
  width: 100%;
}

.so-bouton-danger {
  background: #fff;
  color: #dc2626;
}

.so-bouton[disabled],
.so-bouton[aria-disabled='true'] {
  cursor: default;
  opacity: 0.55;
  translate: none;
}

.so-lien {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: #15803d;
  font: 800 1rem/1.2 'Nunito', sans-serif;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.so-ecran :focus-visible,
.so-panneau :focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}

/* la feuille reçoit le focus à l'ouverture (dialogue) : pas d'anneau autour d'elle */
.so-panneau .so-feuille:focus,
.so-panneau .so-feuille:focus-visible {
  outline: none;
}

.so-boutons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.so-champ {
  width: 100%;
  height: 54px;
  padding: 6px 16px 2px;
  border: 3px solid #15803d;
  border-radius: 16px;
  background: #fff;
  color: #1f2937;
  font: 800 1.375rem/1 'Baloo 2', 'Nunito', sans-serif;
  outline: none;
}

.so-champ::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.so-champ:focus {
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35);
}

/* onglets : deux choix en pastilles accolées */
.so-onglets {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.so-onglet {
  flex: 1;
  min-height: 44px;
  padding: 6px 10px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #15803d;
  font: 800 1.0625rem/1.1 'Baloo 2', 'Nunito', sans-serif;
  cursor: pointer;
}

.so-onglet[aria-selected='true'],
.so-onglet[aria-pressed='true'] {
  background: #15803d;
  color: #fff;
}

/* sur le fond vert de la promo : le principal passe en blanc, les autres en
   vert foncé (le vert de la pompe s'y fondrait) */
.so-sur-vert .so-bouton-principal {
  background: #fff;
  color: #15803d;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
}

.so-sur-vert .so-bouton-principal:active {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.so-sur-vert .so-boutons-ligne .so-bouton {
  background: #15803d;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}

/* dans une carte blanche, un bouton blanc prend le crème pour se détacher */
.so-carte .so-bouton:not(.so-bouton-principal):not(.so-bouton-fonce) {
  background: #fffbeb;
  color: #15803d;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

/* rangée de boutons égaux */
.so-boutons-ligne {
  display: flex;
  gap: 10px;
  width: 100%;
}

.so-boutons-ligne > * {
  flex: 1 1 0;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Duel
   -------------------------------------------------------------------------- */

.so-duel-colonne {
  align-items: center;
}

.so-duel-colonne > .so-carte,
.so-duel-colonne > .so-bouton {
  align-self: stretch;
}

.so-duel-mascotte {
  display: block;
  width: 140px;
  height: 140px;
  margin: -6px auto -10px;
}

.so-duel-titre {
  font-size: 2.125rem;
}

.so-duel-carte {
  padding: 12px 16px 14px;
}

.so-lignes-pleins {
  margin: 0;
  padding: 0;
  list-style: none;
}

.so-ligne-plein {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px 2px;
  border-bottom: 2px dashed #f1e7cc;
}

.so-ligne-plein:last-child {
  border-bottom: 0;
}

.so-ligne-plein .so-point {
  width: 22px;
  height: 22px;
  margin: 0;
}

.so-ligne-montant {
  font: 800 1.625rem/1 'Baloo 2', 'Nunito', sans-serif;
  padding-top: 4px;
  white-space: nowrap;
}

.so-ligne-verdict {
  font: 800 0.9375rem/1.2 'Nunito', sans-serif;
  text-align: right;
}

.so-verdict-pile { color: #15803d; }
.so-verdict-depasse { color: #dc2626; }

.so-duel-score {
  margin: 12px 0 4px;
  text-align: center;
}

.so-duel-score .so-badge {
  font-size: 1.1875rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.so-duel-pastilles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
}

.so-duel-pastilles .so-point {
  width: 22px;
  height: 22px;
  margin: 0;
}

.so-duel-note {
  margin: 0;
  text-align: center;
  font: 800 1rem/1.35 'Nunito', sans-serif;
}

.so-duel-note-compte {
  color: #15803d;
}

.so-relever {
  gap: 12px;
}

.so-anneau {
  display: none;
  width: 30px;
  height: 30px;
  flex: none;
  margin-top: -3px;
}

.so-relever.so-charge .so-anneau {
  display: block;
}

.so-relever.so-attend {
  translate: 0 5px;
  box-shadow: 0 1px 0 #15803d;
}

.so-duel-explication {
  margin: 0;
  align-self: stretch;
}

.so-duel-verdict {
  font-size: 1.75rem;
  margin: 6px auto 4px;
  align-self: center;
}

/* ticket de pompe côte à côte, bord bas déchiré */
.so-ticket {
  position: relative;
  margin-bottom: 10px;
  padding: 16px 14px 14px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 0.27em 0.68em rgba(0, 0, 0, 0.14);
  rotate: -1deg;
}

.so-ticket::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  height: 9px;
  /* une dent par tuile de 16 px : le bord déchiré d'un ticket de caisse */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9'%3E%3Cpath d='M0 0h16v1L8 9 0 1z' fill='%23fff'/%3E%3C/svg%3E") 0 0 / 16px 9px repeat-x;
}

.so-ticket-tete {
  margin: 0 0 6px;
  font: 800 0.8125rem/1.2 'Nunito', sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: #15803d;
}

.so-ticket-table {
  width: 100%;
  border-collapse: collapse;
}

.so-ticket-table th,
.so-ticket-table td {
  padding: 8px 2px 6px;
  text-align: right;
  vertical-align: middle;
}

.so-ticket-table thead th {
  max-width: 8em;
  padding-bottom: 6px;
  border-bottom: 2px dashed #e5e7eb;
  font: 800 1.0625rem/1.1 'Baloo 2', 'Nunito', sans-serif;
  color: #15803d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.so-ticket-table tbody th,
.so-ticket-table tfoot th {
  text-align: left;
  font: 800 0.875rem/1.2 'Nunito', sans-serif;
  color: #6b7280;
  white-space: nowrap;
}

.so-ticket-table td {
  font: 800 1.25rem/1 'Baloo 2', 'Nunito', sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.so-ticket-table td .so-point {
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.3em;
  vertical-align: 0.05em;
}

.so-ticket-table tfoot th,
.so-ticket-table tfoot td {
  padding-top: 10px;
  border-top: 2px dashed #e5e7eb;
}

.so-ticket-table tfoot td {
  font-size: 1.75rem;
}

.so-ticket-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 4px;
}

.so-ticket-points .so-point {
  width: 12px;
  height: 12px;
  margin: 0;
}

.so-gagnant .so-nombre {
  display: inline-block;
  padding: 0.12em 0.32em 0;
  border-radius: 0.35em;
  background: #15803d;
  color: #fff;
  rotate: -2deg;
}

.so-duel-equipe {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.so-duel-equipe .so-bouton {
  min-height: 52px;
  font-size: 1.0625rem;
  padding-inline: 0.6em;
}

/* --------------------------------------------------------------------------
   Classement : la carte 3D en haut (portrait) ou à gauche (paysage), la liste
   dans le panneau
   -------------------------------------------------------------------------- */

.so-classement {
  gap: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.so-classement .so-entete {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  width: auto;
  min-height: 0;
  padding: 0;
  z-index: 1;
}

.so-classement .so-retour {
  position: static;
}

.so-classement-titres {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.so-classement-titres .so-bulle {
  flex: none;
  /* le retour et le bouton son tiennent les coins : le titre reste entre eux */
  max-width: calc(100% - 116px);
  margin-top: 4px;
}

/* rectangle laissé à la carte 3D, mesuré par la façade (data-zone="scene") */
.so-classement-carte {
  flex: 1 1 0;
  min-height: 80px;
  width: 100%;
  pointer-events: none;
}

.so-classement-compte {
  flex: none;
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.so-classement-panneau {
  flex: none;
  display: flex;
  flex-direction: column;
  width: calc(100% + 2 * max(16px, env(safe-area-inset-left)));
  max-width: 600px;
  height: 52%;
  min-height: 0;
  margin: 0 calc(-1 * max(16px, env(safe-area-inset-left)));
  padding: 14px 14px 0;
  border-radius: 24px 24px 0 0;
  background: #fffbeb;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.16);
}

.so-classement-commandes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: none;
}

.so-classement-commandes .so-onglet {
  font-size: 0.9375rem;
  padding-inline: 6px;
}

.so-classement-tete {
  flex: none;
  margin-top: 10px;
}

.so-classement-tete:empty {
  display: none;
}

.so-classement-moi {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: #dcfce7;
}

.so-classement-moi .so-etiquette {
  margin: 0;
}

.so-classement-eteint {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.so-classement-eteint .so-bouton {
  min-height: 52px;
  font-size: 1.125rem;
}

.so-classement-liste {
  flex: 1 1 auto;
  min-height: 0;
  margin: 10px -14px 0;
  padding: 4px 14px max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  /* blanc à 99,6 % : un défilement à fond opaque fait masquer à Chromium une
     bande du canvas WebGL au-dessus (la carte 3D disparaît en haut d'écran) */
  background: rgba(255, 255, 255, 0.996);
}

.so-classement-ligne {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 6px;
  border-bottom: 2px dashed #f1e7cc;
}

.so-classement-ligne:last-child {
  border-bottom: 0;
}

.so-classement-rang {
  font-size: 1.25rem;
  color: #15803d;
  text-align: center;
}

.so-classement-nom {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.so-classement-nom .so-texte {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.so-classement-nom .so-texte-doux {
  font-size: 0.8125rem;
  color: #6b7280;
}

.so-classement-adresse {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 1.25rem;
}

.so-classement-adresse .so-point {
  width: 14px;
  height: 14px;
  margin: 0;
}

.so-eteint .so-classement-nom .so-texte {
  color: #6b7280;
}

.so-eteint .so-classement-rang {
  color: #9ca3af;
}

.so-classement-eteint-pastille {
  padding: 3px 10px 1px;
  border: 2px solid #15803d;
  border-radius: 999px;
  background: #fffbeb;
  color: #15803d;
  font: 800 0.8125rem/1.2 'Nunito', sans-serif;
}

.so-moi {
  border-radius: 12px;
  background: #dcfce7;
  border-bottom-color: transparent;
}

.so-classement-vide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 8px;
  text-align: center;
}

.so-classement-legende {
  flex: none;
  margin: 0 -14px;
  padding: 8px 14px max(10px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 2px solid #f1e7cc;
  font: 700 0.75rem/1.3 'Nunito', sans-serif;
  color: #6b7280;
  text-align: center;
}

@media (orientation: landscape) and (min-width: 640px) {
  .so-classement {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 44%);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    padding-right: 0;
  }

  .so-classement-titres {
    grid-column: 1;
    grid-row: 1;
    padding-top: 6px;
  }

  .so-classement-panneau {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    max-width: none;
    height: auto;
    margin: calc(-1 * max(12px, env(safe-area-inset-top))) 0 0 0;
    padding-top: max(12px, env(safe-area-inset-top));
    border-radius: 24px 0 0 24px;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.16);
  }

  /* les onglets laissent le coin haut droit au bouton son de la façade
     (44 px à 16 px du bord) */
  .so-classement-commandes {
    margin-right: 64px;
  }
}

/* paysage de téléphone : la colonne est trop étroite pour 4 onglets sur une
   ligne (« Hors de France » passait sur 3 lignes) ; un groupe par ligne */
@media (orientation: landscape) and (min-width: 640px) and (max-height: 500px) {
  .so-classement-commandes {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .so-classement-commandes .so-onglet {
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   Équipe
   -------------------------------------------------------------------------- */

.so-question {
  margin: 4px 0 0;
  font: 800 1.375rem/1.25 'Nunito', sans-serif;
  text-align: center;
}

.so-equipe-saisie {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.so-equipe-saisie .so-etiquette {
  margin: 0;
}

.so-equipe-retour {
  min-height: 38px;
}

.so-equipe-trouvee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 3px;
  border-radius: 12px;
  background: #dcfce7;
  color: #15803d;
  font: 800 1.25rem/1.1 'Baloo 2', 'Nunito', sans-serif;
}

.so-equipe-coche {
  width: 22px;
  height: 22px;
  margin-top: -3px;
}

.so-equipe-propositions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.so-equipe-propositions:empty {
  display: none;
}

.so-equipe-proposition {
  min-height: 44px;
  border: 0;
  font-size: 1rem;
  rotate: none;
  cursor: pointer;
}

.so-equipe-liens {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
}

.so-equipe-actuelle {
  align-self: center;
  margin: 0;
}

.so-equipe-code {
  margin: 18px 0 4px;
  font-size: 4.5rem;
}

/* --------------------------------------------------------------------------
   Bandes
   -------------------------------------------------------------------------- */

.so-bandes-mascotte {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto -6px;
}

.so-bandes-invitation {
  align-self: center;
  margin: 4px 0;
  font-size: 1.75rem;
}

.so-bandes-apercu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.so-bandes-apercu .so-badge {
  font-size: 1.0625rem;
}

.so-bandes-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.so-bandes-entete .so-badge {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.so-bandes-choix .so-onglet {
  font-size: 0.9375rem;
}

.so-bandes-carte {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 6px;
}

.so-bandes-carte .so-onglets {
  background: #fffbeb;
  box-shadow: none;
}

.so-bandes-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.so-bandes-ligne {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 4px 6px;
  border-bottom: 2px dashed #f1e7cc;
}

.so-bandes-ligne:last-child {
  border-bottom: 0;
}

.so-bandes-points {
  font-size: 1.25rem;
  white-space: nowrap;
}

.so-absent .so-classement-nom .so-texte {
  color: #6b7280;
}

.so-bandes-quitter {
  display: flex;
  justify-content: center;
}

.so-bandes-confirmer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.so-lien-danger {
  color: #b91c1c;
}

/* --------------------------------------------------------------------------
   Réglages et À propos
   -------------------------------------------------------------------------- */

.so-reglages-carte {
  padding: 2px 16px;
}

.so-reglage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 2px dashed #f1e7cc;
}

.so-reglage:last-child {
  border-bottom: 0;
}

.so-reglage-colonne {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.so-reglage-libelle {
  font: 800 1.0625rem/1.2 'Nunito', sans-serif;
}

.so-reglage-son,
.so-reglage-equipe {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.so-reglage-equipe .so-texte-doux {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.so-reglage-langues {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.so-reglage-langues .so-onglet {
  min-height: 44px;
  background: #fffbeb;
  font-size: 0.9375rem;
}

.so-reglage-langues .so-onglet[aria-pressed='true'] {
  background: #15803d;
}

.so-interrupteur {
  position: relative;
  flex: none;
  width: 58px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: #d1d5db;
  cursor: pointer;
}

.so-interrupteur[aria-checked='true'] {
  background: #16a34a;
}

.so-interrupteur-bille {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.so-interrupteur[aria-checked='true'] .so-interrupteur-bille {
  left: 28px;
}

.so-bouton-petit {
  min-height: 44px;
  padding: 0.35em 0.8em 0.2em;
  font-size: 1rem;
}

.so-apropos-mascotte {
  display: block;
  width: 110px;
  height: 110px;
  margin: 0 auto -4px;
}

.so-apropos-bloc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.so-apropos-bloc .so-etiquette {
  margin: 0;
}

.so-apropos-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 1.1em;
}

.so-apropos-liste li::marker {
  color: #16a34a;
}

.so-apropos-pied {
  margin: 4px 0 8px;
}

/* --------------------------------------------------------------------------
   Série
   -------------------------------------------------------------------------- */

.so-serie {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.so-serie .so-etiquette {
  margin: 0;
}

.so-serie-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.so-serie-jours {
  margin: 0;
  font: 800 1.75rem/1.05 'Baloo 2', 'Nunito', sans-serif;
  color: #15803d;
}

.so-serie-jokers {
  display: inline-flex;
  flex: none;
  gap: 6px;
}

/* la plaque du ventre de la mascotte et son cœur, posés sur une pastille verte
   comme sur le corps de la pompe */
.so-serie-joker {
  width: 40px;
  height: 30px;
  padding: 3px 4px;
  border-radius: 9px;
  background: #16a34a;
}

.so-serie-sous-titre {
  margin-top: 6px;
}

.so-serie-barres {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.so-serie-ligne {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) 2.2em;
  align-items: center;
  gap: 8px;
}

.so-serie-cle {
  font-size: 1.0625rem;
  color: #374151;
}

.so-serie-piste {
  height: 22px;
  border-radius: 8px;
  background: #f6eed8;
}

.so-serie-barre {
  display: block;
  width: calc(var(--so-part, 0.1) * 100%);
  height: 100%;
  border-radius: 8px;
  background: var(--so-couleur, #16a34a);
}

.so-serie-nombre {
  font-size: 1.125rem;
  text-align: right;
}

.so-serie-aujourdhui .so-serie-cle,
.so-serie-aujourdhui .so-serie-nombre {
  color: #15803d;
}

.so-serie-aujourdhui .so-serie-piste {
  box-shadow: 0 0 0 3px #dcfce7;
}

.so-serie-rebours {
  margin: 6px 0 0;
  font: 800 1.0625rem/1.3 'Nunito', sans-serif;
}

/* --------------------------------------------------------------------------
   Panneau de partage
   -------------------------------------------------------------------------- */

.so-panneau {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: 'Nunito', 'Baloo 2', sans-serif;
  font-weight: 800;
  color: #1f2937;
}

.so-voile {
  position: absolute;
  inset: 0;
  background: rgba(31, 41, 55, 0.32);
}

.so-feuille {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fffbeb;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  outline: none;
}

.so-feuille-titre {
  align-self: center;
  margin: 2px 44px 0;
  font-size: 1.625rem;
}

.so-feuille-fermer {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.so-prenom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.so-prenom .so-etiquette {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9375rem;
}

.so-cibles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.so-cible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 10px 2px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #15803d;
  font: 800 1.1875rem/1.1 'Baloo 2', 'Nunito', sans-serif;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.13);
  cursor: pointer;
  touch-action: manipulation;
}

.so-cible:active {
  translate: 0 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.13);
}

.so-cible-picto {
  width: 22px;
  height: 22px;
  margin-top: -3px;
}

.so-cible-principale {
  grid-column: 1 / -1;
  min-height: 60px;
  background: #16a34a;
  color: #fff;
  font-size: 1.375rem;
  box-shadow: 0 5px 0 #15803d;
}

.so-cible-principale:active {
  box-shadow: 0 1px 0 #15803d;
}

/* dernière cible seule sur sa ligne : elle prend toute la largeur */
.so-cibles > :last-child:nth-child(even) {
  grid-column: 1 / -1;
}

.so-apercu-cadre {
  padding: 12px 14px 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

.so-apercu {
  user-select: text;
  -webkit-user-select: text;
}

.so-apercu-ligne {
  margin: 0;
  font: 800 0.9375rem/1.45 'Nunito', sans-serif;
  color: #1f2937;
  overflow-wrap: anywhere;
}

.so-apercu-url {
  color: #15803d;
}

.so-point {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.18em;
  border-radius: 50%;
  background: var(--so-point, #16a34a);
  vertical-align: -0.08em;
}

/* 🎯 d'une traite : la pastille verte cerclée */
.so-point-cible {
  box-shadow: inset 0 0 0 0.15em #fff, 0 0 0 0.09em var(--so-point, #16a34a);
  margin: 0 0.27em 0 0.09em;
}

@media (min-width: 600px) and (min-height: 520px) {
  .so-panneau {
    align-items: center;
  }

  .so-feuille {
    border-radius: 24px;
    max-height: calc(100dvh - 48px);
    padding: 20px 20px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  }
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.so-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  z-index: 1100;
  translate: -50% 0;
  max-width: calc(100vw - 32px);
  padding: 0.3em 0.7em 0.15em;
  border-radius: 0.435em;
  background: #15803d;
  color: #fff;
  font: 800 1.25rem/1.15 'Baloo 2', 'Nunito', sans-serif;
  text-align: center;
  box-shadow: 0 0.152em 0 rgba(0, 0, 0, 0.18);
  rotate: -3deg;
  pointer-events: none;
}

.so-toast[hidden] {
  display: none;
}

.so-toast[data-fond='rouge'] { background: #ef4444; }
.so-toast[data-fond='encre'] { background: #1f2937; }

/* --------------------------------------------------------------------------
   Moins de mouvement
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .so-badge {
    animation: none;
  }
}
