/* Ardoise — la feuille de style du site.
 *
 * Aucune ressource extérieure : les polices sont servies d'ici, il n'y a ni
 * script, ni mesure d'audience, ni cookie. Une application qui se réclame de
 * l'absence de traceurs ne peut pas avoir un site qui en pose.
 *
 * Les deux mains sont celles de l'application : Caveat signe, Kalam parle.
 * Le corps de texte, lui, reste en police système — un paragraphe long en
 * écriture manuscrite se lit mal.
 */

@font-face {
  font-family: 'Caveat';
  src: url('polices/caveat-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Kalam';
  src: url('polices/kalam.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Kalam';
  src: url('polices/kalam-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ardoise: #141618;
  --craie: #f2efe6;
  --craie2: #c3c0b6;
  --craie3: #8c8a82;
  --trait: #4c5052;
  --bleu: #8fc2ef;
  --rouge: #e58f84;
  --or: #e9c46a;
  --vert: #83c99b;
  --texte: 17px/1.7 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Le bois du cadre déborde du tableau : le fond de page est plus sombre que
 * l'ardoise, pour que le cadre se détache au lieu de flotter. */
body {
  margin: 0;
  background: #0b0c0d;
  color: var(--craie2);
  font: var(--texte);
}

/*
 * Le tableau lui-même : l'ardoise, dans son cadre de bois.
 *
 * Le cadre est un `border-image` découpé dans le dessin d'origine. C'est la
 * seule façon d'encadrer une page dont on ne connaît pas la hauteur : les
 * quatre coins sont posés tels quels, les quatre côtés se répètent aussi loin
 * qu'il faut. Une image de fond, elle, se serait étirée.
 */
.tableau {
  max-width: 52rem;
  margin: 0 auto;
  background: var(--ardoise) url('img/ardoise.jpg') center / cover;
  border: 22px solid transparent;
  /* La source est haute : les montants sont longs, et leur raccord se voit
     d'autant moins. `round` ajuste le motif pour tomber juste. */
  border-image: url('img/cadre.jpg') 24 round;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

@media (min-width: 40rem) {
  .tableau { border-width: 34px; margin: 2rem auto; }
}

main, header, footer { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------------------------------------------------------------- l'en-tête */

header { text-align: center; padding-top: 3rem; padding-bottom: 1rem; }

.logo {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(3.5rem, 14vw, 6rem);
  line-height: 1;
  color: var(--craie);
  margin: 0;
}

/* Le coup de balai du logotype : six craies passées d'un geste. */
.balai {
  width: min(20rem, 70%);
  height: 12px;
  margin: -0.4rem auto 0;
  border-radius: 6px;
  background: linear-gradient(90deg,
    var(--rouge) 0 16%, var(--bleu) 16% 33%, var(--or) 33% 50%,
    var(--vert) 50% 67%, #b99be0 67% 84%, #e9a05c 84% 100%);
  opacity: .9;
}

.devise {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  color: var(--craie);
  margin: 1rem 0 0;
}

.icone { width: 104px; height: 104px; border-radius: 22px; margin-bottom: 1.2rem; }

/* ------------------------------------------------------------- les sections */

h2 {
  font-family: 'Kalam', cursive;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--craie);
  margin: 3.2rem 0 .2rem;
}

/* Le souligné de craie, sous chaque titre. */
h2::after {
  content: '';
  display: block;
  width: 4.5rem;
  height: 3px;
  margin-top: .35rem;
  border-radius: 2px;
  background: var(--bleu);
}
h2.rouge::after { background: var(--rouge); }
h2.or::after    { background: var(--or); }
h2.vert::after  { background: var(--vert); }

p { margin: 1rem 0; }
strong { color: var(--craie); font-weight: 600; }
a { color: var(--bleu); }

ul { padding-left: 1.1rem; }
li { margin: .45rem 0; }
li::marker { color: var(--bleu); }

/* ------------------------------------------------------------- les encadrés */

.jeux {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.2rem 0;
  padding: 0;
  list-style: none;
}
.jeux li {
  margin: 0;
  padding: .45rem .9rem;
  border: 1.5px solid var(--trait);
  border-radius: 999px;
  font-family: 'Kalam', cursive;
  font-size: 1.05rem;
  color: var(--craie);
}

.pieges { border-left: 3px solid var(--or); padding-left: 1.1rem; }
.pieges dt { font-family: 'Kalam', cursive; font-weight: 700; color: var(--craie); margin-top: .9rem; }
.pieges dd { margin: .1rem 0 0; }

.promesse {
  border: 2px solid var(--vert);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
  background: rgba(131, 201, 155, .06);
}
.promesse p:first-child { margin-top: 0; }
.promesse p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ les captures */

.captures {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: .5rem .25rem 1.5rem;
  scroll-snap-type: x mandatory;
}
.captures img {
  width: 240px;
  flex: 0 0 auto;
  border-radius: 12px;
  scroll-snap-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
}

/* ------------------------------------------------------------- le pied et le reste */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  border-top: 1px solid var(--trait);
  color: var(--craie3);
  font-size: .95rem;
  text-align: center;
}

.marques { font-size: .85rem; color: var(--craie3); margin-top: 2.5rem; }

code {
  background: rgba(242, 239, 230, .08);
  padding: .1em .35em;
  border-radius: 3px;
  font-size: .9em;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
}
