/* Carnet Level Up — pages d'assistance et de confidentialité.
   Aucune ressource externe : les polices de l'app (Playfair Display pour le nom, Newsreader pour le texte,
   licence OFL, fichiers de licence dans /fonts) sont servies par le site. Même habillage que l'app : la nuit
   étoilée de la boîte en tête, puis la page de parchemin, filets et chiffres d'or. */

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe4;
  --raised: #fbf8f0;
  --text: #33261a;
  --secondary: #7a6a55;
  --line: #e6dcc6;
  --border: #dccfb4;
  --gold: #b8924f;
  --gold-fill: #d2ae66;
  --bronze: #8c6a36;
  --link: #8c6a36;
  --night: #1e1812;
  --night-deep: #0d0906;
  --ivory: #f3e9d6;
  --star: #e2bc72;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16110c;
    --raised: #221a13;
    --text: #f3e9d6;
    --secondary: #bdae93;
    --line: #3e3124;
    --border: #3e3124;
    --gold: #e2bc72;
    --gold-fill: #d2ae66;
    --link: #e2bc72;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 18px/1.55 "Newsreader", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

/* La nuit de la boîte : quelques étoiles d'or à quatre branches et la Lune, en fond du bandeau. */
.night {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 30%, #ead7b0 0 20px, transparent 21px),
    radial-gradient(ellipse at 50% 0%, #2a2119 0%, var(--night) 55%, var(--night-deep) 100%);
  color: var(--ivory);
  padding: 18px 16px 64px;
}

.night::before {
  content: "✦   ·   ✧        ✦      ·    ✧   ✦        ·     ✧";
  position: absolute;
  inset: 76px 0 auto;
  text-align: center;
  color: var(--star);
  opacity: 0.45;
  font-size: 15px;
  letter-spacing: 6px;
  white-space: pre;
  pointer-events: none;
}

.top {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  font-size: 15px;
}

.top a {
  color: var(--ivory);
  border: 1px solid rgba(226, 188, 114, 0.55);
  border-radius: 999px;
  padding: 4px 12px;
  text-decoration: none;
}

.brand {
  position: relative;
  max-width: 420px;
  margin: 22px auto 0;
  text-align: center;
}

.brand img {
  width: 76px;
  height: 76px;
  border-radius: 17px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

h1 {
  margin: 12px 0 4px;
  font: italic 700 42px/1.1 "Playfair Display", Georgia, serif;
}

.tagline {
  margin: 0;
  color: #d8c8a8;
  font-style: italic;
  font-size: 17px;
}

/* Filet d'or : deux traits et un losange, comme sous le nom dans l'app. */
.rule {
  position: relative;
  display: block;
  width: 150px;
  height: 12px;
  margin: 12px auto 0;
  background:
    linear-gradient(var(--star), var(--star)) left center / 62px 1.2px no-repeat,
    linear-gradient(var(--star), var(--star)) right center / 62px 1.2px no-repeat;
}

.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold-fill);
  border: 0.8px solid var(--bronze);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* La page de parchemin, qui glisse sur la nuit : coins arrondis en haut. */
main {
  position: relative;
  max-width: 712px;
  margin: -28px auto 0;
  padding: 28px 16px 48px;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
}

h2 {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}

h2 .fig {
  float: right;
  font-weight: 400;
  font-style: italic;
  font-size: 14px;
  color: var(--secondary);
}

section {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 12px 0;
}

section.summary { background: var(--paper); }

p { margin: 0 0 10px; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

ul { margin: 0 0 10px; padding-left: 20px; }
li { margin: 4px 0; }

/* Les 8 paliers, numérotés dans des médaillons d'or comme dans l'écran des règles. */
ol.paliers { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: palier; }
ol.paliers li {
  counter-increment: palier;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}
ol.paliers li:first-child { border-top: 0; }
ol.paliers li::before {
  content: counter(palier);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-fill);
  border: 1.2px solid var(--bronze);
  color: #1b140d;
  font-weight: 600;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
}

.muted { color: var(--secondary); }

a { color: var(--link); text-underline-offset: 3px; }

.date {
  text-align: center;
  color: var(--secondary);
  font-style: italic;
  font-size: 15px;
  margin: 0 0 8px;
}

details { border-top: 1px solid var(--line); padding: 12px 0; }
details:first-of-type { border-top: 0; padding-top: 4px; }
details:last-of-type { padding-bottom: 0; }
summary { cursor: pointer; font-weight: 600; }
details p, details ol { margin-top: 8px; color: var(--secondary); }

footer {
  margin-top: 28px;
  text-align: center;
  font-size: 15px;
  color: var(--secondary);
}

footer nav { margin-bottom: 10px; }
footer nav a { margin: 0 8px; }
