@font-face {
  font-family: "Ubuntu";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/polices/ubuntu-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Ubuntu";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/polices/ubuntu-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/polices/nunito-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/polices/nunito-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/polices/nunito-latin-700-normal.woff2") format("woff2");
}

:root {
  --bleu-nuit: #12405f;
  --bleu-profond: #0b2c45;
  --turquoise: #26e9e0;
  --or: #f2be4b;
  --blanc: #ffffff;
  --pale: #e4f6f7;
  --trait: #c3dfe3;
  --texte: #12405f;
  --texte-doux: #46647a;
  --texte-sur-nuit: #ffffff;
  --texte-doux-sur-nuit: #b9d0df;
  --erreur: #b3261e;
  --succes: #0b6b4a;

  --police-titre: "Ubuntu", "Segoe UI", system-ui, sans-serif;
  --police-texte: "Nunito", "Segoe UI", system-ui, sans-serif;

  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 24px;
  --e6: 32px;
  --e7: 48px;
  --e8: 64px;

  --r-champ: 14px;
  --r-bloc: 28px;
  --r-grand: 36px;
  --r-pilule: 999px;

  --ombre: 0 8px 28px rgba(11, 44, 69, 0.14);
  --focus: 0 0 0 4px rgba(38, 233, 224, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--police-titre);
  font-weight: 700;
  line-height: 1.15;
}

p {
  margin: 0 0 var(--e4);
}

[hidden] {
  display: none !important;
}

a {
  color: var(--bleu-nuit);
}

:focus-visible {
  outline: 3px solid var(--bleu-nuit);
  outline-offset: 2px;
  box-shadow: var(--focus);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Marque en texte */

.marque {
  display: inline-flex;
  flex-direction: column;
  margin: 0;
  padding-left: var(--e4);
  border-left: 2px solid var(--texte-doux-sur-nuit);
  font-family: var(--police-titre);
  line-height: 1.1;
  color: var(--texte-sur-nuit);
}
.marque-petit {
  font-size: 0.8em;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--texte-doux-sur-nuit);
}
.marque-gras {
  font-size: 1.4em;
  font-weight: 700;
}

/* En-tête et bandeau */

.entete {
  padding: var(--e6) var(--e5) var(--e7);
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
}
.entete-interne {
  max-width: 720px;
  margin: 0 auto;
}
.entete h1 {
  margin: var(--e6) 0 var(--e3);
  font-size: clamp(2.2rem, 9vw, 3.4rem);
}
.entete .surtitre {
  margin: var(--e6) 0 0;
  font-family: var(--police-titre);
  font-weight: 500;
  color: var(--turquoise);
}
.entete .accroche {
  margin: 0;
  max-width: 34ch;
  font-size: 1.15rem;
  font-weight: 600;
}
.bandeau {
  padding: var(--e4) var(--e5);
  background: var(--turquoise);
  color: var(--bleu-nuit);
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

/* Mise en page */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--e6) var(--e4) var(--e8);
}
.page-large {
  max-width: 1100px;
}

.bloc {
  margin: 0 0 var(--e5);
  padding: var(--e5);
  background: var(--pale);
  border: 0;
  border-radius: var(--r-bloc);
}
.bloc-blanc {
  background: var(--blanc);
  border: 2px solid var(--trait);
}
.bloc h2,
.bloc legend {
  margin: 0 0 var(--e4);
  padding: 0;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
}
.bloc legend {
  float: left;
  width: 100%;
}
.bloc legend + * {
  clear: both;
}

/* Champs */

.champ {
  margin: 0 0 var(--e4);
}
.champ label,
.etiquette {
  display: block;
  margin: 0 0 var(--e1);
  font-weight: 700;
}
input[type="text"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--e3) var(--e4);
  background: var(--blanc);
  color: var(--texte);
  border: 2px solid var(--trait);
  border-radius: var(--r-champ);
  font: inherit;
  font-size: 1.05rem;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--bleu-nuit);
  outline: none;
  box-shadow: var(--focus);
}
.champ-erreur input {
  border-color: var(--erreur);
}
.message-erreur {
  margin: var(--e1) 0 0;
  color: var(--erreur);
  font-weight: 700;
  font-size: 0.95rem;
}
.aide {
  margin: var(--e1) 0 0;
  color: var(--texte-doux);
  font-size: 0.95rem;
}
.ligne {
  display: grid;
  gap: var(--e3);
}
@media (min-width: 560px) {
  .ligne-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Choix : pastilles et grosses cartes */

.choix-groupe {
  display: grid;
  gap: var(--e3);
}
.choix {
  position: relative;
  display: block;
}
.choix input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choix-contenu {
  display: block;
  padding: var(--e4) var(--e5);
  background: var(--blanc);
  border: 2px solid var(--trait);
  border-radius: var(--r-bloc);
  line-height: 1.3;
}
.choix input:checked + .choix-contenu {
  background: var(--bleu-nuit);
  border-color: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
}
.choix input:focus-visible + .choix-contenu {
  box-shadow: var(--focus);
  outline: 3px solid var(--bleu-nuit);
  outline-offset: 2px;
}
.choix-gros {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.5rem;
  display: block;
}
.choix-petit {
  display: block;
  margin-top: var(--e1);
  font-size: 1rem;
  font-weight: 600;
}
.choix input:checked + .choix-contenu .choix-gros {
  color: var(--turquoise);
}
.choix-pastille .choix-contenu {
  padding: var(--e3) var(--e5);
  border-radius: var(--r-pilule);
  text-align: center;
  font-weight: 700;
}
.choix-groupe-2 {
  grid-template-columns: 1fr 1fr;
}
.choix-groupe-4 {
  grid-template-columns: 1fr;
}
.choix-groupe-4 .choix-contenu {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--e1) var(--e3);
}
.choix-groupe-4 .choix-gros {
  font-size: 1.375rem;
  white-space: nowrap;
}
.choix-groupe-4 .choix-petit {
  margin-top: 0;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .choix-groupe-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.choix-libre .choix-contenu {
  display: grid;
  gap: var(--e2);
}
.choix-libre input[type="text"] {
  position: static;
  opacity: 1;
  width: 100%;
  height: auto;
  cursor: text;
}
.choix-libre .zone-montant {
  position: relative;
  z-index: 1;
}
.coche {
  display: flex;
  gap: var(--e3);
  align-items: flex-start;
  font-weight: 600;
}
.coche input {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--bleu-nuit);
}

/* Boutons */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: var(--e3) var(--e6);
  border: 2px solid var(--bleu-nuit);
  border-radius: var(--r-pilule);
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover {
  background: var(--bleu-profond);
}
.bouton-turquoise {
  background: var(--turquoise);
  border-color: var(--turquoise);
  color: var(--bleu-nuit);
}
.bouton-turquoise:hover {
  background: #5ff0ea;
}
.bouton-clair {
  background: var(--blanc);
  color: var(--bleu-nuit);
}
.bouton-clair:hover {
  background: var(--pale);
}
.bouton-petit {
  min-height: 44px;
  padding: var(--e2) var(--e5);
  font-size: 1rem;
}
.bouton-plein {
  width: 100%;
}
.bouton[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e3);
  align-items: center;
}

/* Messages */

.alerte {
  margin: 0 0 var(--e4);
  padding: var(--e3) var(--e4);
  border-radius: var(--r-champ);
  background: var(--blanc);
  border: 2px solid var(--erreur);
  color: var(--erreur);
  font-weight: 700;
}
.alerte-ok {
  border-color: var(--succes);
  color: var(--succes);
}
.mention {
  margin: var(--e5) 0 0;
  color: var(--texte-doux);
  font-size: 0.95rem;
  text-align: center;
}

/* Remerciement */

.merci {
  text-align: center;
}
.merci h2 {
  font-size: clamp(2rem, 8vw, 2.8rem);
  margin-bottom: var(--e4);
}
.merci-montant {
  margin: var(--e5) 0;
  padding: var(--e5);
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
  border-radius: var(--r-grand);
}
.merci-montant strong {
  display: block;
  color: var(--or);
  font-family: var(--police-titre);
  font-size: 2.4rem;
  line-height: 1.15;
}

/* Outils internes : guichet et admin */

.barre {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e3);
  align-items: center;
  justify-content: space-between;
  padding: var(--e4) var(--e5);
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
}
.barre h1 {
  font-size: 1.4rem;
}
.barre .bouton {
  border-color: var(--texte-sur-nuit);
}
.onglets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e2);
  margin: 0 0 var(--e5);
}
.onglet {
  min-height: 48px;
  padding: var(--e2) var(--e5);
  border: 2px solid var(--bleu-nuit);
  border-radius: var(--r-pilule);
  background: var(--blanc);
  color: var(--bleu-nuit);
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.onglet[aria-selected="true"] {
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
}
.liste {
  display: grid;
  gap: var(--e3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.carte {
  padding: var(--e4) var(--e5);
  background: var(--blanc);
  border: 2px solid var(--trait);
  border-radius: var(--r-bloc);
}
.carte-annulee {
  background: var(--pale);
  color: var(--texte-doux);
}
.carte-annulee .carte-titre {
  text-decoration: line-through;
}
.carte-titre {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.15rem;
}
.carte-meta {
  margin: var(--e1) 0 var(--e3);
  color: var(--texte-doux);
  font-size: 0.95rem;
}
.etiquette-statut {
  display: inline-block;
  margin-left: var(--e2);
  padding: 0 var(--e3);
  border-radius: var(--r-pilule);
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
  font-family: var(--police-texte);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.chiffres {
  display: grid;
  gap: var(--e3);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 0 0 var(--e5);
}
.chiffre {
  padding: var(--e4) var(--e5);
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
  border-radius: var(--r-bloc);
}
.chiffre strong {
  display: block;
  color: var(--or);
  font-family: var(--police-titre);
  font-size: 1.9rem;
  line-height: 1.2;
}
.chiffre span {
  color: var(--texte-doux-sur-nuit);
  font-size: 0.95rem;
}
.table-defilante {
  overflow-x: auto;
  border-radius: var(--r-champ);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--blanc);
}
th,
td {
  padding: var(--e2) var(--e3);
  border-bottom: 1px solid var(--trait);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--bleu-nuit);
  color: var(--texte-sur-nuit);
  font-family: var(--police-titre);
  white-space: nowrap;
}
td.num {
  text-align: right;
  white-space: nowrap;
}
tr.ligne-annulee td {
  color: var(--texte-doux);
  background: var(--pale);
}
.centre {
  max-width: 420px;
  margin: var(--e8) auto;
}

/* Écran projeté : 16:9, 1rem = 1 % de la largeur de la scène */

html.ecran {
  font-size: min(1vw, 1.7778vh);
  height: 100%;
}
.ecran body {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--bleu-profond);
  color: var(--texte-sur-nuit);
  font-size: 1.7rem;
  line-height: 1.3;
}
.scene {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100rem;
  height: 56.25rem;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: 1fr 36rem;
  column-gap: 3rem;
  padding: 3rem 3.5rem;
  background: var(--bleu-profond);
}
.scene-gauche {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.scene-gauche .marque {
  font-size: 2rem;
  align-self: flex-start;
}
.scene-gauche .evenement {
  margin: 1rem 0 0;
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: 1.8rem;
  color: var(--turquoise);
}
.zone-total {
  margin: auto 0;
}
.etiquette-total {
  font-family: var(--police-titre);
  font-weight: 500;
  font-size: 2.4rem;
  color: var(--turquoise);
}
.total {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 12rem;
  line-height: 1.05;
  color: var(--or);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform-origin: left center;
}
.total[data-taille="moyen"] {
  font-size: 9.5rem;
}
.total[data-taille="petit"] {
  font-size: 7.5rem;
}
.total.monte {
  animation: pulse-total 0.9s ease-out;
}
.jauge {
  margin-top: 1.4rem;
}
.jauge-piste {
  height: 2rem;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pilule);
  overflow: hidden;
}
.jauge-remplissage {
  height: 100%;
  width: 0;
  background: var(--turquoise);
  border-radius: var(--r-pilule);
  transition: width 1.2s ease-out;
}
.jauge-legende {
  margin-top: 0.6rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--texte-doux-sur-nuit);
}
.stats {
  display: flex;
  gap: 1.5rem;
}
.stat {
  padding: 1.2rem 2rem;
  border-radius: var(--r-bloc);
  background: rgba(255, 255, 255, 0.08);
}
.stat strong {
  display: block;
  font-family: var(--police-titre);
  font-size: 3.4rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--texte-doux-sur-nuit);
}
.scene-droite {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  min-height: 0;
  padding-bottom: 10.5rem;
}
.panneau {
  padding: 1.2rem 1.8rem;
  border-radius: var(--r-bloc);
  background: rgba(255, 255, 255, 0.08);
}
.panneau h2 {
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
  color: var(--turquoise);
}
.panneau-dernieres {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.lignes {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ligne-don {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.6rem;
}
.ligne-don:last-child {
  border-bottom: 0;
}
.don-nom {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.don-montant {
  flex: none;
  font-family: var(--police-titre);
  font-weight: 700;
  color: var(--or);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.don-detail {
  display: block;
  font-family: var(--police-texte);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--texte-doux-sur-nuit);
}
.rang {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  margin-right: 1rem;
  border-radius: 50%;
  background: var(--or);
  color: var(--bleu-profond);
  font-family: var(--police-titre);
  font-weight: 700;
  line-height: 2.6rem;
  text-align: center;
}
.ligne-don.avec-rang {
  align-items: center;
}
.ligne-don.nouveau {
  animation: arrivee 1.6s ease-out;
}
.qr {
  position: absolute;
  right: 3.5rem;
  bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: 36rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--r-bloc);
  background: var(--blanc);
  color: var(--bleu-nuit);
}
.qr img {
  flex: none;
  width: 7.5rem;
  height: 7.5rem;
}
.qr p {
  margin: 0;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.2;
}
.qr small {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--police-texte);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--texte-doux);
}
.liaison {
  position: absolute;
  left: 3.5rem;
  bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--texte-doux-sur-nuit);
}

@keyframes arrivee {
  0% {
    opacity: 0;
    transform: translateY(-1.2rem);
    background: rgba(38, 233, 224, 0.45);
  }
  40% {
    opacity: 1;
    transform: translateY(0);
    background: rgba(38, 233, 224, 0.3);
  }
  100% {
    background: transparent;
  }
}
@keyframes pulse-total {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ligne-don.nouveau,
  .total.monte {
    animation: none;
  }
  .jauge-remplissage {
    transition: none;
  }
}

fieldset {
  min-width: 0;
}
.espace-haut {
  margin-top: var(--e4);
}

.page + .page {
  padding-top: 0;
}
.centre h1 {
  margin-bottom: var(--e4);
}
