/* ============================================================
   app.css — styles de l’accueil (extraits de index.html)
   Chargé APRÈS brutal.css : surcharge les composants partagés.
   ============================================================ */

/* layout stable : scroll de page (pull-to-refresh natif OK) + footer en position:fixed (toujours visible) */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 4px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}

/* sticker HOMIES (comme le composant) */
.homies-badge {
  position: relative;
  display: inline-block;
}

.homies-badge::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: -4px;
  bottom: -4px;
  background: var(--ink);
}

.homies-badge .body {
  position: relative;
  padding: 7px 14px;
  border: 3px solid var(--ink);
  background: var(--magenta);
  display: flex;
  align-items: center;
  gap: 7px;
}

.homies-badge .body .bolt {
  font-size: 16px;
}

.homies-badge .body span {
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--paper);
}

.topbar .tag {
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 1px;
  border: 3px solid var(--ink);
  background: var(--cyan);
  padding: 6px 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

.home {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 18px 30px;
  display: flex;
  flex-direction: column;
}

.hero-sticker {
  align-self: flex-start;
}

.home-title {
  font-family: var(--fd);
  font-size: clamp(28px, 6.4vw, 50px);
  line-height: 1.06;
  text-transform: uppercase;
  margin: 16px 0 10px;
}

.home-title .u {
  background: var(--cyan);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 2px 8px;
  display: inline-block;
  margin-top: 8px;
}

.home-sub {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  max-width: 560px;
}

.home-sub mark {
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 0 4px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
}

.divider .line {
  flex: 1;
  height: 3px;
  background: var(--ink);
}

.divider .text {
  font-family: var(--fd);
  font-size: 14px;
  letter-spacing: 2px;
}

/* 2 cartes (esprit prototype, adapté) */
.cta-row {
  display: flex;
  gap: 16px;
}

.cta-card {
  flex: 1;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 7px;
  right: -7px;
  bottom: -7px;
  background: var(--ink);
}

.cta-card .body {
  position: relative;
  height: clamp(160px, 44vw, 210px);
  border: 4px solid var(--ink);
  padding: 16px;
  overflow: hidden;
  transition: transform .08s;
}

.cta-card:active .body {
  transform: translate(3px, 3px);
}

.cta-card.create .body {
  background: var(--magenta);
}

.cta-card.join .body {
  background: var(--yellow);
}

.cta-card .ghost {
  position: absolute;
  top: -14px;
  right: -18px;
  width: 130px;
  height: 130px;
  opacity: .2;
  pointer-events: none;
}

.cta-card .ghost img {
  width: 100%;
  height: 100%;
}

.icon-box-cta {
  position: relative;
  width: 46px;
  height: 46px;
}

.icon-box-cta::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 44px;
  height: 44px;
}

.cta-card.create .icon-box-cta::before {
  background: var(--ink);
}

.cta-card.join .icon-box-cta::before {
  background: var(--paper);
}

.icon-box-cta .inner {
  position: relative;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cta-card.create .inner {
  background: var(--paper);
}

.cta-card.join .inner {
  background: var(--ink);
}

.icon-box-cta .inner img {
  width: 30px;
  height: 30px;
}

.title-bottom {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
}

.title-bottom .main {
  font-family: var(--fd);
  font-size: clamp(24px, 6vw, 32px);
  letter-spacing: 1px;
  line-height: 1;
}

.title-bottom .sub {
  margin-top: 6px;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
}

.cta-card.create .main {
  color: var(--paper);
}

.cta-card.create .sub {
  color: rgba(255, 254, 247, .85);
}

.cta-card.join .main {
  color: var(--ink);
}

.cta-card.join .sub {
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

/* panneau code */
.join-panel {
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
  padding: 20px;
  margin-top: 22px;
}

.join-panel .jp-h {
  font-family: var(--fd);
  font-size: 20px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.join-panel .jp-h img {
  width: 24px;
  height: 24px;
}

.join-panel .jp-sub {
  font-weight: 700;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  margin-bottom: 14px;
}

.code-cells {
  display: flex;
  gap: 8px;
}

.code-cell {
  flex: 1;
  aspect-ratio: 3/4;
  max-width: 60px;
  border: 4px solid var(--ink);
  background: var(--paper);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 32px;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  min-width: 0;
}

.code-cell.filled {
  background: var(--yellow);
}

.code-cell:focus {
  background: #fff;
  box-shadow: 4px 4px 0 var(--magenta);
}

.or-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}

.or-line .l {
  flex: 1;
  height: 3px;
  background: var(--ink);
}

.or-line .o {
  font-family: var(--fd);
  font-size: 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 2px 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

/* sections (SPA accueil) */
.sec {
  display: none;
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 18px 30px;
  flex-direction: column;
}

.sec.active {
  display: flex;
}

.sec-title {
  font-family: var(--fd);
  font-size: clamp(26px, 7vw, 40px);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sec-sub {
  font-weight: 700;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  margin-bottom: 18px;
}

/* PROFIL */
.pf-card {
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pf-ava {
  width: 96px;
  height: 96px;
  font-size: 96px;
  flex-shrink: 0;
  box-shadow: 5px 5px 0 var(--ink);
}

.pf-ava .ava-emo {
  border-width: 4px;
}

.pf-name {
  font-family: var(--fd);
  font-size: 26px;
  letter-spacing: 1px;
  text-transform: uppercase;
  word-break: break-word;
}

.pf-tag {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 55.00000000000001%, transparent);
  margin-top: 4px;
}

.pf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.pf-stat {
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 12px 8px;
  text-align: center;
}

.pf-stat.a {
  background: var(--yellow);
}

.pf-stat.b {
  background: var(--cyan);
}

.pf-stat.c {
  background: var(--green);
}

.pf-stat .v {
  font-family: var(--fd);
  font-size: 30px;
  line-height: 1;
}

.pf-stat .l {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 4px;
}

.pf-ava-wrap {
  position: relative;
  flex-shrink: 0;
}

.pf-lv {
  position: absolute;
  bottom: -8px;
  right: -10px;
  background: var(--magenta);
  color: var(--paper);
  border: 3px solid var(--ink);
  font-family: var(--fd);
  font-size: 12px;
  line-height: 1;
  padding: 4px 7px;
  box-shadow: 2px 2px 0 var(--ink);
}

.pf-lbl {
  font-family: var(--fd);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  margin: 18px 0 10px;
}

/* MES QUIZ */
.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-card {
  position: relative;
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--paper);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-card .qc-info {
  flex: 1;
  min-width: 0;
}

.quiz-card .qc-name {
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiz-card .qc-sub {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 55.00000000000001%, transparent);
  margin-top: 2px;
}

.quiz-card .qc-play {
  font-family: var(--fd);
  font-size: 14px;
  border: 3px solid var(--ink);
  background: var(--green);
  padding: 9px 12px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.quiz-card .qc-del {
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--paper);
  font-family: var(--fd);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.empty-box {
  border: 3px dashed var(--ink);
  padding: 30px 18px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

/* RÉGLAGES */
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
  padding: 14px;
  margin-bottom: 12px;
}

.set-row .sr-l {
  font-family: var(--fd);
  font-size: 15px;
  letter-spacing: .5px;
}

.set-row .sr-l small {
  display: block;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 10px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  letter-spacing: 0;
}

.seg {
  display: flex;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.seg button {
  font-family: var(--fd);
  font-size: 12px;
  padding: 8px 10px;
  background: var(--paper);
  border: none;
  border-left: 3px solid var(--ink);
  cursor: pointer;
}

.seg button:first-child {
  border-left: none;
}

.seg button.on {
  background: var(--magenta);
  color: var(--paper);
}

/* navbar — actif = sticker magenta — footer FIXE en bas de l'écran (toujours visible) */
body {
  padding-bottom: 84px;
}

.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  border-top: 3px solid var(--ink);
  background: var(--paper);
  padding: 9px 6px calc(8px + env(safe-area-inset-bottom));
}

.nav-item {
  flex: 1;
  display: flex;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  position: relative;
}

.nav-item .ico {
  width: 24px;
  height: 24px;
  opacity: .85;
}

.nav-item .ico img {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-item .lbl {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 1px;
  opacity: .6;
}

.nav-item.active .nav-inner {
  background: var(--magenta);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 10px;
}

.nav-item.active .ico {
  opacity: 1;
}

.nav-item.active .lbl {
  color: var(--paper);
  opacity: 1;
}

/* modal scanner QR */
.qr-modal {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.qr-modal.show {
  display: flex;
}

.qr-card {
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 4px solid var(--ink);
  background: var(--magenta);
  color: var(--paper);
  font-family: var(--fd);
  letter-spacing: 1px;
  position: sticky;
  top: 0;
}

.qr-head button {
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-family: var(--fd);
  box-shadow: 2px 2px 0 var(--ink);
}

#qr-reader {
  width: 100%;
}

#qr-reader video {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.qr-msg {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

/* écran création de profil (1er lancement) */
.ob-screen {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--paper);
  background-image: radial-gradient(rgba(10, 10, 10, .07) 1.6px, transparent 1.6px);
  background-size: 20px 20px;
  overflow-y: auto;
  transition: opacity .35s ease;
}

.ob-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.ob-inner {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 26px;
  gap: 13px;
  box-sizing: border-box;
}

.ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ob-tag {
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 1px;
  border: 3px solid var(--ink);
  background: var(--cyan);
  padding: 6px 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

.ob-title {
  font-family: var(--fd);
  font-size: clamp(26px, 7vw, 34px);
  letter-spacing: .5px;
  line-height: 1;
}

.ob-sub {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.ob-sub b {
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 0 4px;
  color: var(--ink);
}

.ob-pick {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ob-preview-wrap {
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
}

.ob-preview {
  width: 104px;
  height: 104px;
  box-shadow: 6px 6px 0 var(--ink);
}

.ob-preview .ava-emo {
  width: 100%;
  height: 100%;
  border-width: 5px;
}

.ob-dice {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  background: var(--magenta);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 20px;
  cursor: pointer;
  transform: rotate(-4deg);
}

.ob-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
}

.ob-shuffle {
  font-family: var(--fd);
  font-size: 13px;
  letter-spacing: .5px;
  border: 3px solid var(--ink);
  background: var(--cyan);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 9px 12px;
  cursor: pointer;
}

.ob-lbl {
  font-family: var(--fd);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.ob-colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.ob-sw {
  width: 30px;
  height: 30px;
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}

.ob-sw.sel {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 var(--ink);
}

.ob-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
  padding: 8px;
}

.ob-tile {
  aspect-ratio: 1;
  border: 2.5px solid var(--ink);
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
}

.ob-tile .ava-emo {
  width: 100%;
  height: 100%;
  border: none;
  box-shadow: none;
}

.ob-tile.sel {
  outline: 4px solid var(--magenta);
  outline-offset: -4px;
}

.ob-nickwrap.shake {
  animation: ob-shake .4s;
}

@keyframes ob-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.ob-nick {
  width: 100%;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 16px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 13px 14px;
  outline: none;
  box-sizing: border-box;
}

.ob-nick:focus {
  box-shadow: 4px 4px 0 var(--magenta);
}

.ob-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 10px;
}

.ob-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 10.5px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.ob-go {
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 1.5px;
  border: 4px solid var(--ink);
  background: var(--green);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 15px;
  cursor: pointer;
}

.ob-go:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.ob-import {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .5px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  text-decoration: underline;
  padding: 4px;
}

.ob-import:active {
  color: var(--magenta);
}

/* hub : choisis ton jeu */
.hub-back {
  align-self: flex-start;
  font-family: var(--fd);
  font-size: 12px;
  letter-spacing: 1px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 7px 12px;
  cursor: pointer;
  margin-bottom: 14px;
}

.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

/* mode 1 colonne / lignes empilées (cartes horizontales larges) */
.hub-grid.solo {
  grid-template-columns: 1fr;
  gap: 16px;
}

.hub-tile {
  position: relative;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
  border: 4px solid var(--ink);
  padding: 14px;
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}

/* carte horizontale (emoji | texte | flèche) pour le layout solo */
.hub-grid.solo .hub-tile {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 16px 18px;
}

.hub-tile.quiz {
  background: var(--cyan);
}

.hub-tile.cartes {
  background: var(--magenta);
  color: var(--paper);
}

.hub-tile.loup {
  background: var(--purple);
  color: var(--paper);
}

.hub-tile.soon {
  background: #E8E8E8;
}

.hub-tile:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.hub-e {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-grid.solo .hub-e {
  width: 64px;
  height: 64px;
}

.hub-e img {
  width: 34px;
  height: 34px;
}

.hub-grid.solo .hub-e img {
  width: 42px;
  height: 42px;
}

.hub-grid.solo .hub-tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hub-nm {
  font-family: var(--fd);
  font-size: 22px;
  letter-spacing: .5px;
  line-height: 1;
  margin-top: 10px;
}

.hub-grid.solo .hub-nm {
  font-size: 26px;
  margin-top: 0;
}

.hub-ds {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 10px;
  margin-top: 3px;
}

.hub-grid.solo .hub-ds {
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.35;
}

.hub-tile.cartes .hub-ds,
.hub-tile.loup .hub-ds {
  color: rgba(255, 254, 247, .85);
}

.hub-go {
  font-family: var(--fd);
  font-size: 30px;
  flex-shrink: 0;
  opacity: .55;
}

.hub-soon {
  position: absolute;
  top: 9px;
  right: 9px;
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: 1px;
  background: var(--ink);
  color: var(--paper);
  padding: 2px 6px;
  transform: rotate(4deg);
}
/* ============ MES POTES : bouton header + drawer ============ */
.social-btn {
  position: relative;
  width: 44px; height: 44px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  display: grid; place-items: center;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.social-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.social-drawer {
  position: fixed; top: 0; right: -340px;
  width: 320px; max-width: 88vw; height: 100%;
  background: var(--paper);
  border-left: 5px solid var(--ink);
  box-shadow: -8px 0 0 rgba(0, 0, 0, .18);
  z-index: 1200;
  transition: right .25s ease;
  display: flex; flex-direction: column;
  padding: 16px calc(16px + env(safe-area-inset-right)) 16px 16px;
}
.social-drawer .sd-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 4px solid var(--ink); padding-bottom: 12px; margin-bottom: 12px;
}
.social-drawer .sd-title { font-family: var(--fd); font-size: 24px; letter-spacing: 1px; color: var(--ink); }
.sd-close {
  width: 40px; height: 40px; flex: 0 0 auto;
  border: 3px solid var(--ink); background: #FF5252; color: #fff;
  box-shadow: 3px 3px 0 var(--ink); font-family: var(--fd); font-size: 16px; cursor: pointer;
}
.sd-close:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.sd-add { display: flex; gap: 8px; margin-bottom: 14px; }
.sd-add input {
  flex: 1; min-width: 0; border: 3px solid var(--ink); background: var(--paper);
  padding: 9px 10px; font-family: var(--fb); font-weight: 700; font-size: 13px;
}
.sd-add button {
  flex: 0 0 auto; border: 3px solid var(--ink); background: var(--magenta); color: #fff;
  box-shadow: 3px 3px 0 var(--ink); font-family: var(--fd); font-size: 13px; letter-spacing: .5px; padding: 9px 12px; cursor: pointer;
}
.sd-add button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
#socialList { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }

/* lignes & boutons du drawer — brutalist (bords nets, ombres franches) */
.sd-sec { font-family: var(--fd); font-size: 15px; letter-spacing: 1px; color: var(--ink); margin: 6px 0 2px; }
.sd-sec.magenta { color: var(--magenta); }
.sd-empty { font-family: var(--fb); font-weight: 700; font-size: 12px; opacity: .6; line-height: 1.4; }
.sd-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--paper); padding: 10px 11px;
}
.sd-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sd-nm { font-family: var(--fd); font-size: 15px; letter-spacing: .3px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-st { font-family: var(--fb); font-weight: 700; font-size: 11px; opacity: .8; display: flex; align-items: center; }
.sd-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.sd-mini {
  font-family: var(--fd); font-size: 13px; letter-spacing: .5px; line-height: 1;
  border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--paper); color: var(--ink);
  padding: 7px 9px; cursor: pointer;
}
.sd-mini:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.sd-mini.ok { background: var(--green, #5BE885); }
.sd-mini.no { background: var(--paper); }
.sd-mini.inv { background: var(--magenta); color: #fff; }

/* gate : connexion Google requise */
.sd-gate { text-align: center; padding: 24px 6px; }
.sd-gate-ic { font-size: 40px; }
.sd-gate-txt { font-family: var(--fb); font-weight: 700; font-size: 13px; line-height: 1.5; color: var(--ink); margin: 10px 0 16px; }
.sd-gate-btn {
  width: 100%; border: 4px solid var(--ink); background: var(--magenta); color: #fff; box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--fd); font-size: 16px; letter-spacing: 1px; padding: 13px; cursor: pointer;
}
.sd-gate-btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

/* ============================================================
   ÉCRAN POTES (plein écran, remplace l'ancien drawer)
   ============================================================ */
#sec-potes.sec { padding: 0 0 24px; }
#sec-potes .subhead { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 3px solid var(--ink); margin-bottom: 12px; }
#sec-potes .subhead .back { width: 38px; height: 38px; flex-shrink: 0; border: 3px solid var(--ink); background: #FFD600; box-shadow: 3px 3px 0 var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-size: 20px; cursor: pointer; color: var(--ink); }
#sec-potes .subhead .back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
#sec-potes .subhead .ttl { font-family: var(--fd); font-size: 24px; letter-spacing: 1px; color: var(--ink); }
#sec-potes .sd-add { padding: 0 16px; }
#sec-potes #socialList { padding: 0 16px; }

/* Toast d'annulation brutalist (suppression d'un pote, compte à rebours 5 s) */
.undo-toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(24px); opacity: 0;
  display: flex; align-items: center; gap: 12px; z-index: 3000;
  max-width: min(92vw, 420px); padding: 12px 14px; overflow: hidden;
  border: 4px solid var(--ink); background: var(--ink); color: var(--paper);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .35); transition: transform .2s ease, opacity .2s ease;
}
.undo-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.undo-toast .ut-msg { flex: 1; min-width: 0; font-family: var(--fb); font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.undo-toast .ut-undo { flex: 0 0 auto; border: 3px solid var(--paper); background: #FFD600; color: var(--ink); box-shadow: 2px 2px 0 rgba(0, 0, 0, .4); font-family: var(--fd); font-size: 13px; letter-spacing: .5px; padding: 7px 12px; cursor: pointer; }
.undo-toast .ut-undo:active { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(0, 0, 0, .4); }
.undo-toast .ut-bar { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: #FF5252; transform-origin: left; animation: ut-countdown 5s linear forwards; }
@keyframes ut-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .undo-toast .ut-bar { animation-duration: 5s; } }

/* ============================================================
   NOUVEAUTÉS (changelog) — popup listant les nouveautés/corrections à chaque MAJ
   ============================================================ */
.cl-ov { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--ink) 62%, transparent); }
.cl-ov.show { display: flex; }
.cl-card { width: 100%; max-width: 440px; max-height: 86vh; display: flex; flex-direction: column; background: var(--paper); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); animation: cl-pop .26s cubic-bezier(.2,1.3,.5,1) both; }
@keyframes cl-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cl-top { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 4px solid var(--ink); background: var(--yellow); }
.cl-top .cl-emoji { font-size: 30px; }
.cl-top .cl-ttl { font-family: var(--fd); font-size: 23px; letter-spacing: 1px; }
.cl-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 18px; }
.cl-rel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.cl-rel-t { font-family: var(--fd); font-size: 14px; letter-spacing: .5px; background: var(--ink); color: var(--paper); padding: 3px 10px; }
.cl-rel-d { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 11px; opacity: .55; white-space: nowrap; }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-list li { font-family: var(--fb); font-weight: 600; font-size: 13px; line-height: 1.4; padding: 2px 0 2px 11px; border-left: 3px solid var(--ink); }
.cl-ok { flex-shrink: 0; margin: 0; border: 0; border-top: 4px solid var(--ink); background: var(--green, #5BE885); color: var(--ink); padding: 15px; font-family: var(--fd); font-size: 17px; letter-spacing: 1px; cursor: pointer; }
.cl-ok:active { transform: translateY(1px); }

/* Désactive le PULL-TO-REFRESH natif : il rechargeait l'app et faisait "redémarrer" les
   écrans à chaque geste. Les mises à jour restent auto-détectées (bannière MAJ du SW). */
html, body.home-page { overscroll-behavior-y: contain; }
