/*
 * La page du testeur (13/11/2026, tranche T9). Les couleurs de la charte des
 * courriels (`apps/api/src/email/habillage-neibo.ts`, CHARTE). Pensée pour un
 * téléphone de 375 px de large ; sur un ordinateur, la même colonne, centrée, où
 * le QR se scanne avec le téléphone.
 */
:root {
  --nuit: #183642;
  --soleil: #ffbe00;
  --ardoise: #5b7079;
  --brume: #eef3f4;
  --trait: #cdd6d8;
  --fond: #ffffff;
  --rouge: #b3261e;
  --vert: #1e7a4c;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--brume);
  color: var(--nuit);
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.tete {
  display: flex;
  justify-content: center;
  padding: 20px 16px 8px;
}

.logo {
  width: 40px;
  height: 40px;
}

main {
  max-width: 440px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}

.carte-blanche {
  background: var(--fond);
  border: 1px solid var(--trait);
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.numero {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.puce {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brume);
  color: var(--nuit);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.puce.soleil {
  background: var(--soleil);
}

.puce.rouge {
  background: #fbe4e2;
  color: var(--rouge);
}

label.champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ardoise);
}

input[type='text'] {
  width: 100%;
  font: inherit;
  font-size: 20px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  padding: 12px 14px;
  border: 2px solid var(--trait);
  border-radius: 12px;
  color: var(--nuit);
  background: var(--fond);
}

input[type='text']:focus {
  outline: none;
  border-color: var(--nuit);
}

/* La liste des opérateurs d'une arrivée d'une commande du site (16/11/2026). */
select {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 12px 14px;
  border: 2px solid var(--trait);
  border-radius: 12px;
  color: var(--nuit);
  background: var(--fond);
}

select:focus {
  outline: none;
  border-color: var(--nuit);
}

input[type='text'].faux {
  border-color: var(--rouge);
  animation: secousse 0.3s;
}

@keyframes secousse {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

button.principal {
  width: 100%;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--soleil);
  color: var(--nuit);
  cursor: pointer;
}

button.principal:disabled {
  background: var(--trait);
  color: var(--ardoise);
  cursor: default;
}

/* Un choix refusé, ou « Installée » qui attend son second appui. */
button.principal.faux {
  outline: 2px solid var(--rouge);
  outline-offset: 2px;
  animation: secousse 0.3s;
}

button.principal.confirmer {
  background: var(--nuit);
  color: var(--fond);
}

/* Les tuiles : de vrais boutons radio, cachés derrière leur étiquette. */
.tuiles {
  display: grid;
  gap: 8px;
}

.tuiles.deux {
  grid-template-columns: 1fr 1fr;
}

.tuiles.trois {
  grid-template-columns: 1fr 1fr 1fr;
}

.tuiles.un {
  grid-template-columns: 1fr;
}

.tuile {
  position: relative;
}

/* L'abonnement d'une arrivée : montré, sans bouton. */
.tuile.fixe > span {
  border-color: var(--nuit);
  background: #fff7dc;
  cursor: default;
}

.tuile input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.tuile > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 6px;
  border: 2px solid var(--trait);
  border-radius: 12px;
  background: var(--fond);
  text-align: center;
  cursor: pointer;
}

.tuile > input:checked + span {
  border-color: var(--nuit);
  background: #fff7dc;
  box-shadow: inset 0 0 0 1px var(--nuit);
}

.tuile > input:focus-visible + span {
  outline: 3px solid var(--soleil);
  outline-offset: 2px;
}

.tuile .nom {
  font-weight: 700;
}

.tuile .go {
  font-size: 15px;
}

.tuile .prix {
  font-size: 14px;
  color: var(--ardoise);
}

.adresse {
  background: var(--brume);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}

.case {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.case input {
  width: 22px;
  height: 22px;
  accent-color: var(--nuit);
}

.case a {
  color: var(--nuit);
}

.zone-qr {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 15/11/2026, question 9 : sur un iPhone reconnu, le QR et « Installer » sont un seul lien, touché d'un doigt. */
a.installer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

a.installer .principal {
  display: block;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  background: var(--soleil);
  color: var(--nuit);
}

.qr {
  display: block;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  margin: 0 auto;
  background: var(--fond);
  image-rendering: pixelated;
}

.pin {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
}

ol.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

ol.etapes li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--ardoise);
}

ol.etapes li::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--trait);
  background: var(--fond);
}

ol.etapes li.fait {
  color: var(--nuit);
}

ol.etapes li.fait::before {
  border-color: var(--vert);
  background: var(--vert);
}

ol.etapes li.en-cours {
  color: var(--nuit);
}

ol.etapes li.en-cours::before {
  border-color: var(--soleil);
  background: var(--soleil);
}

.grand {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}

.centre {
  text-align: center;
}

.discret {
  color: var(--ardoise);
}

.adresse-bloc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[hidden] {
  display: none !important;
}
