/* Masters App · styles du site (charte v2.0) */

/* Polices servies par le site (Fontsource, licence SIL Open Font) : aucun appel à Google. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/unbounded-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/unbounded-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ma-noir: #0B0B0C;
  --ma-carbone: #141416;
  --ma-bordure: #26262A;
  --ma-bordure-forte: #3A3A40;
  --ma-texte: #F2F2F3;
  --ma-gris: #8E8E93;
  --ma-or-clair: #FFE98A;
  --ma-or: #F8CB45;
  --ma-or-profond: #DFA21C;
  --ma-degrade-or: linear-gradient(135deg, #FFE98A 0%, #F8CB45 50%, #DFA21C 100%);
  --ma-police-titres: "Unbounded", sans-serif;
  --ma-police-textes: "Inter", system-ui, sans-serif;

  /* États des services */
  --etat-ok: #3DDC84;
  --etat-alerte: #F8CB45;
  --etat-panne: #FF5A52;
  --etat-inconnu: #8E8E93;
  --etat-live: #FF4D4D;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #0B0B0C;
  background-image: radial-gradient(ellipse 90% 55% at 50% 0%, #1B1B1F 0%, rgba(11, 11, 12, 0) 70%);
  background-repeat: no-repeat;
  color: var(--ma-texte);
  font-family: var(--ma-police-textes);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.page {
  width: 100%;
  max-width: 472px;
  padding: 44px 20px 28px;
  margin-block: auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

a:focus-visible {
  outline: 2px solid var(--ma-or-clair);
  outline-offset: 3px;
}

/* ---------- En-tête de l'accueil ---------- */

.marque { text-align: center; }
.marque img { width: 168px; height: auto; display: block; margin-inline: auto; }
.marque h1 {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.slogan {
  margin: 20px 0 0;
  font-family: var(--ma-police-titres);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ma-gris);
}

/* ---------- Cartes des apps ---------- */

.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.app {
  --teinte: 255, 255, 255;
  padding: 18px;
  border: 1px solid var(--ma-bordure);
  border-radius: 24px;
  background-color: #141416;
  background-image: radial-gradient(circle 220px at 46px 46px, rgba(var(--teinte), 0.10), rgba(var(--teinte), 0) 100%);
}
.app--streams { --teinte: 124, 92, 255; }
.app--poke { --teinte: 232, 74, 54; }

.app__tete { display: flex; align-items: center; gap: 14px; }
.app__icone {
  flex: none;
  width: 64px; height: 64px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.app__textes { min-width: 0; flex: 1; }
.app__nom {
  margin: 0;
  font-family: var(--ma-police-titres);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.app__accroche {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ma-gris);
  text-wrap: pretty;
}
/* Accueil : icône à gauche, voyant en haut à droite, puis nom et accroche */
.app__haut {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.app__haut + .app__nom { margin-top: 14px; font-size: 20px; letter-spacing: -0.02em; }

/* Boutons des stores */
.stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.store {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--ma-bordure-forte);
  border-radius: 14px;
  background-color: #0B0B0C;
  color: #F2F2F3;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.store:hover { border-color: var(--ma-or); }
a.store:active { transform: scale(0.985); }
.store__logo { flex: none; width: 22px; height: 22px; }
.store__textes { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.store__textes small { font-size: 11px; color: #8E8E93; }
.store__textes strong { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Site web : toute la largeur, même famille que les stores */
.store--web { grid-column: 1 / -1; }
.store--web .store__logo { color: var(--ma-or); }
.store__fleche {
  flex: none;
  width: 14px; height: 14px;
  margin-left: auto;
  color: #8E8E93;
  transition: color 0.2s ease, transform 0.2s ease;
}
a.store:hover .store__fleche { color: var(--ma-or); transform: translate(2px, -2px); }

/* Bêta : pastille or dans la petite ligne */
.store__badge {
  display: inline-block;
  margin-right: 3px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: rgba(248, 203, 69, 0.14);
  color: var(--ma-or);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Tuto d'installation de la bêta */
.tuto {
  margin-top: 10px;
  border: 1px solid var(--ma-bordure);
  border-radius: 14px;
  font-size: 14px;
}
.tuto summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #F2F2F3;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.tuto summary::-webkit-details-marker { display: none; }
.tuto summary::after {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  margin-right: 3px;
  border-right: 1.8px solid #8E8E93;
  border-bottom: 1.8px solid #8E8E93;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.tuto[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.tuto summary:hover { color: var(--ma-or); }
.tuto summary:focus-visible { outline: 2px solid var(--ma-or-clair); outline-offset: 2px; }
.tuto ol {
  margin: 0;
  padding: 2px 14px 14px 36px;
  color: #8E8E93;
  line-height: 1.5;
}
.tuto li + li { margin-top: 8px; }
.tuto li::marker { color: var(--ma-or); font-weight: 600; }
.tuto a { color: #F2F2F3; text-underline-offset: 2px; }
.tuto a:hover { color: var(--ma-or); }

/* Pas encore disponible : grisé, avec cadenas */
.store--verrou {
  border-style: dashed;
  border-color: var(--ma-bordure-forte);
  background-color: #141416;
  color: #8E8E93;
  cursor: not-allowed;
}
.store--verrou .store__logo { filter: grayscale(1); opacity: 0.55; }
.store__cadenas { position: absolute; top: 7px; right: 8px; width: 12px; height: 12px; }

@media (max-width: 359px) {
  .stores { grid-template-columns: 1fr; }
}

/* ---------- Voyant d'état ---------- */

.point {
  --couleur: var(--etat-inconnu);
  position: relative;
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background-color: var(--couleur);
}
[data-etat="operationnel"] .point { --couleur: var(--etat-ok); }
[data-etat="degrade"] .point,
[data-etat="maintenance"] .point { --couleur: var(--etat-alerte); }
[data-etat="panne"] .point { --couleur: var(--etat-panne); }
[data-live] .point { --couleur: var(--etat-live); }

.voyant {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 11px 4px 10px;
  border: 1px solid var(--ma-bordure);
  border-radius: 999px;
  background-color: #0B0B0C;
  font-size: 12.5px;
  font-weight: 500;
  color: #B4B4BA;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.voyant:hover { color: #F2F2F3; border-color: var(--ma-bordure-forte); }

/* ---------- Page statut ---------- */

.entete { display: flex; flex-direction: column; align-items: flex-start; }
.retour {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: #8E8E93;
  text-decoration: none;
  transition: color 0.2s ease;
}
.retour:hover { color: #F2F2F3; }
.retour img { width: 30px; height: 30px; }
.titre {
  margin: 22px 0 0;
  font-family: var(--ma-police-titres);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pile { display: grid; gap: 14px; }

.resume {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ma-bordure);
  border-radius: 24px;
  background-color: #141416;
}
.resume .point { width: 12px; height: 12px; margin-top: 5px; }
.resume__titre {
  margin: 0;
  font-family: var(--ma-police-titres);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.resume__detail { margin: 4px 0 0; font-size: 13px; color: #8E8E93; }

.service__etat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #F2F2F3;
}

.mesures { margin: 16px 0 0; }
.mesures div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--ma-bordure);
  font-size: 14.5px;
}
.mesures div:last-child { padding-bottom: 0; }
.mesures dt { color: #8E8E93; }
.mesures dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.service__note {
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid var(--ma-bordure);
  font-size: 13px;
  color: #8E8E93;
}

/* ---------- Mentions légales ---------- */

.texte {
  padding: 22px 20px;
  border: 1px solid var(--ma-bordure);
  border-radius: 24px;
  background-color: #141416;
  font-size: 14.5px;
  line-height: 1.6;
  color: #B4B4BA;
}
.texte section + section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ma-bordure);
}
.texte h2 {
  margin: 0 0 8px;
  font-family: var(--ma-police-titres);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #F2F2F3;
}
.texte p { margin: 0; text-wrap: pretty; }
.texte p + p { margin-top: 8px; }
.texte a { color: #F2F2F3; text-underline-offset: 2px; }
.texte a:hover { color: var(--ma-or); }
.texte__date { margin-top: 20px !important; font-size: 13px; color: #8E8E93; }

/* ---------- Pied de page ---------- */

.pied {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #8E8E93;
}
.pied nav { display: flex; gap: 20px; }
.pied a { color: #F2F2F3; text-decoration: none; padding: 6px 2px; }
.pied a:hover { color: var(--ma-or); }
.pied p { margin: 0; }

/* ---------- Mouvement ---------- */

@media (prefers-reduced-motion: no-preference) {
  .marque, .entete, .resume, .app, .texte, .pied {
    animation: monter 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .resume, .texte { animation-delay: 0.06s; }
  .app:nth-child(1) { animation-delay: 0.1s; }
  .app:nth-child(2) { animation-delay: 0.18s; }
  .pied { animation-delay: 0.26s; }

  /* Halo du voyant : service en ligne ou live en cours */
  [data-etat="operationnel"] .point::after,
  [data-live] .point::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: var(--couleur);
    animation: halo 2s ease-out infinite;
  }

  @keyframes monter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes halo {
    from { opacity: 0.55; transform: scale(1); }
    to { opacity: 0; transform: scale(3.2); }
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (min-width: 600px) {
  .page { padding-top: 72px; gap: 44px; }
  .marque img { width: 196px; }
  .slogan { font-size: 16px; }
  .titre { font-size: 28px; }
}
