/* Mise en page et composants. Aucune couleur ni police en dur : tout vient du thème. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--c-fond);
  background-image: var(--neige);
  background-size: var(--neige-taille);
  background-position: var(--neige-position);
  color: var(--c-encre);
  font-family: var(--f-texte);
  font-size: 16px;
  line-height: 1.45;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-or); outline-offset: 2px; }
[hidden] { display: none !important; }
.plein { width: 100%; }
.cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page {
  max-width: 460px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 32px max(18px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* En-tête */
.entete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.logo {
  background: var(--c-or); border: var(--trait); box-shadow: 3px 3px 0 var(--c-encre);
  padding: 4px 10px; font-family: var(--f-titre); font-size: 15px; letter-spacing: .04em; text-decoration: none;
}
.pastille {
  background: var(--c-blanc); border: var(--trait); border-radius: 999px; box-shadow: 3px 3px 0 var(--c-encre);
  padding: 6px 12px; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.pastille-son { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.entete-droite { display: flex; gap: 8px; align-items: center; }

/* Cartouches */
.cartouche {
  background: var(--c-papier); border: var(--trait-fort); border-radius: var(--rayon); box-shadow: var(--ombre-forte);
  padding: 13px 16px; display: flex; flex-direction: column; gap: 4px;
}
.titre { margin: 0; font-family: var(--f-titre); font-weight: 400; font-size: 28px; line-height: 1.05; text-wrap: balance; }
.sous-titre { margin: 0; font-family: var(--f-bulle); font-size: 18px; line-height: 1.35; }

/* Calendrier */
.portes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.porte {
  height: 40px; border: var(--trait); border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-titre); font-size: 16px; color: var(--c-blanc);
}
.porte.c0 { background: var(--c-rouge); }
.porte.c1 { background: var(--c-vert); }
.porte.c2 { background: var(--c-or); color: var(--c-encre); }
.porte.ouverte { background: var(--c-papier); color: var(--c-porte-ouverte); border-style: dashed; }
.porte.aujourdhui { background: var(--c-blanc); color: var(--c-rouge); box-shadow: 0 0 0 3px var(--c-rouge); }

/* Compte à rebours */
.rebours {
  background: var(--c-rouge); color: var(--c-blanc); border: var(--trait-fort); border-radius: var(--rayon); box-shadow: var(--ombre-forte);
  padding: 12px 14px; display: flex; align-items: center; gap: 14px;
}
.rebours-24 {
  font-family: var(--f-titre); font-size: 44px; line-height: 1; background: var(--c-blanc); color: var(--c-rouge);
  border: var(--trait); border-radius: 6px; padding: 6px 10px;
}
.rebours-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rebours-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rebours-temps { font-family: var(--f-titre); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Communiqué */
.bulle {
  background: var(--c-blanc); border: var(--trait); border-radius: var(--rayon-bulle); padding: 9px 14px;
  display: flex; flex-direction: column; gap: 2px; min-height: 74px;
}
.bulle-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-rouge); }
.bulle-texte { font-family: var(--f-bulle); font-size: 18px; line-height: 1.35; }

/* Boutons */
.btn {
  cursor: pointer; text-align: center; text-decoration: none; border: var(--trait-fort); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 12px; font-family: var(--f-titre); font-size: 19px; background: var(--c-or); color: var(--c-encre);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--c-encre); }
.btn[disabled] { cursor: default; }
.btn-rouge { background: var(--c-rouge); color: var(--c-blanc); }
.btn-second {
  font-family: var(--f-texte); font-weight: 700; font-size: 14px; background: var(--c-blanc); border-width: 2.5px;
  box-shadow: 3px 3px 0 var(--c-encre); padding: 11px 8px;
}
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Registre déjà signé */
.inscrit {
  background: var(--c-papier); border: var(--trait-fort); border-radius: var(--rayon); padding: 10px 14px; text-align: center;
  font-family: var(--f-bulle); font-size: 18px; line-height: 1.35;
}
.inscrit strong { font-family: var(--f-titre); font-weight: 400; }

/* Menu agenda */
.menu { display: flex; flex-direction: column; gap: 8px; background: var(--c-papier); border: var(--trait); border-radius: var(--rayon); padding: 10px; }
.menu-titre { margin: 0; font-size: 13px; font-weight: 700; }

/* Compteur public */
.compteur {
  background: var(--c-papier); border: var(--trait); border-radius: var(--rayon); padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px;
}
.compteur strong { font-family: var(--f-titre); font-weight: 400; font-size: 17px; }
.compteur a { font-weight: 700; white-space: nowrap; }

/* Section artiste */
.artiste { scroll-margin-top: 16px; }
.artiste-titre { margin: 0; font-family: var(--f-titre); font-weight: 400; font-size: 21px; }
.artiste-haut { display: flex; gap: 12px; align-items: center; }
.emplacement {
  background: var(--c-papier); border: 2px dashed var(--c-encre); border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; color: var(--c-encre-douce); text-align: center; padding: 4px;
}
.avatar { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; }
.bio { margin: 0; font-family: var(--f-bulle); font-size: 17px; line-height: 1.35; }
.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.videos .emplacement { aspect-ratio: 9 / 14; }

/* Message temporaire */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--c-encre); color: var(--c-blanc); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  max-width: calc(100% - 32px); text-align: center; z-index: 10;
}

.pied { text-align: center; font-size: 12px; color: var(--c-encre); }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
