/* =============================================================================
   Truffoo — la feuille de style du site.
   Un seul visage, clair, comme l'app (src/ui/tokens.ts). Pas de mode sombre.
   ============================================================================= */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: only light;

  --creme: #FAF7F2;
  --blanc: #FFFFFF;
  --encre: #2B2019;
  /* Le texte secondaire de l'app (#8A7F76) est trop pâle pour de longs textes
     sur le web : on le fonce un peu pour rester lisible par tous. */
  --encre-douce: #6C6158;
  --filet: #EFE8DE;
  --moka: #6B4A2F;
  --moka-fonce: #5B3D24;
  --sauge: #4E9A5A;
  --sauge-fonce: #2F6B3A;
  --sauge-doux: #E3F0DE;
  --ambre: #C9902C;
  --ambre-fonce: #7A5510;
  --ambre-doux: #FCEFCF;
  --argile: #C2743F;
  --argile-doux: #F9E9DC;

  --rayon-carte: 22px;
  --rayon-vignette: 16px;
  --ombre-carte: 0 4px 16px rgba(60, 40, 20, 0.06);
  --ombre-posee: 0 4px 14px rgba(40, 25, 10, 0.14);

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --systeme: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --trait-argile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 12' fill='none'%3E%3Cpath d='M3 7.5C9 2 15 11 24 6.5S38 2.5 47 6.8 62 10.5 70 5.5 80 4 85 6.5' stroke='%23C2743F' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E");
  --trait-sauge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 12' fill='none'%3E%3Cpath d='M3 7.5C9 2 15 11 24 6.5S38 2.5 47 6.8 62 10.5 70 5.5 80 4 85 6.5' stroke='%234E9A5A' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E");
  --trait-ambre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 12' fill='none'%3E%3Cpath d='M3 7.5C9 2 15 11 24 6.5S38 2.5 47 6.8 62 10.5 70 5.5 80 4 85 6.5' stroke='%23C9902C' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--systeme);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.3rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.55rem, 4vw, 2.05rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--moka);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--encre);
  text-decoration-color: var(--argile);
}

:focus-visible {
  outline: 3px solid var(--moka);
  outline-offset: 3px;
  border-radius: 6px;
}

strong {
  font-weight: 650;
}

/* Le petit trait ondulé sous les titres, comme dans l'app. */
.trait::after {
  content: "";
  display: block;
  width: 88px;
  height: 12px;
  margin-top: 8px;
  background: var(--trait-argile) no-repeat left center / contain;
}

.trait.sauge::after {
  background-image: var(--trait-sauge);
}

.trait.ambre::after {
  background-image: var(--trait-ambre);
}

.centre .trait::after,
.trait.centre::after {
  margin-left: auto;
  margin-right: auto;
}

.page {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.etroit {
  max-width: 740px;
}

.centre {
  text-align: center;
}

.doux {
  color: var(--encre-douce);
}

.lien-evitement {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--blanc);
  padding: 10px 16px;
  border-radius: 14px;
  box-shadow: var(--ombre-posee);
  z-index: 10;
}

.lien-evitement:focus {
  left: 12px;
}

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

.entete {
  padding: 18px 0 6px;
}

.entete .page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--encre);
  text-decoration: none;
}

.marque img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
}

.menu a {
  display: inline-block;
  padding: 8px 0;
  font-size: 0.98rem;
  color: var(--encre);
  text-decoration: none;
  background: no-repeat left bottom / 0 8px;
}

.menu a:hover,
.menu a[aria-current="page"] {
  background-image: var(--trait-argile);
  background-size: 100% 8px;
}

.menu a[aria-current="page"] {
  font-weight: 650;
}

/* ----------------------------------------------------------------------------
   Les cartes, les étiquettes de papier, les autocollants
   ---------------------------------------------------------------------------- */

.carte {
  background: var(--blanc);
  border-radius: var(--rayon-carte);
  box-shadow: var(--ombre-carte);
  padding: 24px;
}

.carte.sauge {
  background: var(--sauge-doux);
  box-shadow: none;
}

.carte.ambre {
  background: var(--ambre-doux);
  box-shadow: none;
}

.carte.argile {
  background: var(--argile-doux);
  box-shadow: none;
}

.carte > :last-child {
  margin-bottom: 0;
}

/* Une étiquette de papier : un coin percé, un fil imaginaire, un peu de travers. */
.etiquette {
  display: inline-block;
  position: relative;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  padding: 12px 20px 12px 38px;
  border-radius: 10px 16px 16px 10px;
  border: 1px solid var(--filet);
  box-shadow: var(--ombre-posee);
  transform: rotate(-1.5deg);
  text-decoration: none;
}

.etiquette::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--creme);
  box-shadow: inset 0 1px 2px rgba(60, 40, 20, 0.28);
}

.etiquette.droite {
  transform: rotate(1.2deg);
}

a.etiquette {
  transition: transform 0.15s ease;
}

a.etiquette:hover {
  transform: rotate(0deg) translateY(-2px);
  color: var(--moka);
}

@media (prefers-reduced-motion: reduce) {
  a.etiquette {
    transition: none;
  }
}

.etiquette small {
  display: block;
  font-family: var(--systeme);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--encre-douce);
}

/* Une liste dont les puces sont les autocollants de l'app. */
.autocollants {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.autocollants li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 10px;
}

.autocollants li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 22px;
  height: 22px;
  background: url("/img/autocollant-paw.webp") no-repeat center / contain;
}

.autocollants.coeur li::before {
  background-image: url("/img/autocollant-heart.webp");
}

.autocollants.etoile li::before {
  background-image: url("/img/autocollant-sparkle.webp");
}

.autocollants.fleur li::before {
  background-image: url("/img/autocollant-flower.webp");
}

.pastille {
  width: 30px;
  height: 30px;
  flex: none;
}

/* Une capture de l'app, posée comme une photo dans un album. */
.capture {
  margin: 0;
  width: 100%;
  max-width: 270px;
}

.capture img {
  width: 100%;
  border-radius: 30px;
  border: 6px solid var(--blanc);
  box-shadow: 0 10px 30px rgba(60, 40, 20, 0.13);
  background: var(--blanc);
}

.capture figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--encre-douce);
  text-align: center;
}

.penche-g {
  transform: rotate(-2deg);
}

.penche-d {
  transform: rotate(2deg);
}

/* ----------------------------------------------------------------------------
   L'accueil
   ---------------------------------------------------------------------------- */

.bloc {
  padding: 56px 0;
}

.heros {
  padding: 34px 0 48px;
}

.heros .page {
  display: grid;
  gap: 36px;
  align-items: center;
}

.heros p.accroche {
  font-size: 1.16rem;
  color: var(--encre-douce);
  max-width: 34em;
  margin: 18px 0 26px;
}

.heros-image {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0 10px;
}

.heros-image .mascotte {
  position: absolute;
  width: 124px;
  left: 50%;
  bottom: -18px;
  margin-left: -190px;
}

.heros-image .mascotte.droite {
  width: 92px;
  margin-left: 62px;
  bottom: auto;
  top: -6px;
}

.bientot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
}

.intro-bloc {
  max-width: 40em;
  margin-bottom: 30px;
}

.intro-bloc p {
  color: var(--encre-douce);
  margin: 14px 0 0;
  font-size: 1.06rem;
}

.grille {
  display: grid;
  gap: 18px;
}

.carte-titre {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.carte h3 {
  margin-bottom: 8px;
}

.carte-titre h3 {
  margin-bottom: 0;
}

.carte p {
  color: var(--encre-douce);
}

.carte.sauge p,
.carte.ambre p,
.carte.argile p,
.carte.sauge li,
.carte.ambre li,
.carte.argile li {
  color: var(--encre);
}

.duo {
  display: grid;
  gap: 34px;
  align-items: center;
}

.duo .images {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.duo .images .capture {
  max-width: 230px;
}

.trio {
  display: flex;
  gap: 22px;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 18px 20px 26px;
  margin: 26px -20px 0;
  scroll-snap-type: x proximity;
}

.trio .capture {
  flex: 0 0 230px;
  scroll-snap-align: center;
}

.mascotte-coin {
  width: 120px;
  margin: 0 auto 6px;
}

.prive {
  display: grid;
  gap: 20px;
  align-items: center;
}

.prive img {
  width: 150px;
  margin: 0 auto;
}

/* ----------------------------------------------------------------------------
   Les pages de texte : aide, règles, confidentialité, conditions…
   ---------------------------------------------------------------------------- */

.chapeau {
  padding: 30px 0 8px;
}

.chapeau p.accroche {
  font-size: 1.12rem;
  color: var(--encre-douce);
  margin: 16px 0 0;
  max-width: 36em;
}

.chapeau .date {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--encre-douce);
}

.texte {
  padding: 22px 0 60px;
}

.texte h2 {
  margin-top: 46px;
  margin-bottom: 14px;
  scroll-margin-top: 20px;
}

.texte h3 {
  margin-top: 26px;
  margin-bottom: 8px;
}

.texte ul,
.texte ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

.texte li {
  margin-bottom: 6px;
}

.texte ul.autocollants {
  padding-left: 0;
}

.texte .carte {
  margin: 22px 0;
}

.texte .carte h2,
.texte .carte h3 {
  margin-top: 0;
}

.texte .carte p,
.texte .carte li {
  color: var(--encre);
}

.sommaire ol {
  margin: 10px 0 0;
  padding-left: 1.4em;
  columns: 2 240px;
  column-gap: 30px;
}

.sommaire li {
  break-inside: avoid;
  margin-bottom: 5px;
}

/* L'adresse de contact : un texte qu'on peut sélectionner et copier. */
.adresse {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95em;
  background: var(--blanc);
  border: 1px dashed #D9CDBD;
  border-radius: 10px;
  padding: 3px 10px;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}

/* Ce que l'éditeur doit encore remplir : bien visible, pour ne pas l'oublier. */
[data-valeur][data-vide] {
  background: var(--ambre-doux);
  color: var(--ambre-fonce);
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 600;
}

.tableau {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 0.96rem;
  background: var(--blanc);
  border-radius: var(--rayon-vignette);
  overflow: hidden;
  box-shadow: var(--ombre-carte);
}

.tableau caption {
  text-align: left;
  padding: 0 0 8px;
  color: var(--encre-douce);
  font-size: 0.92rem;
}

.tableau th,
.tableau td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--filet);
}

.tableau tr:last-child th,
.tableau tr:last-child td {
  border-bottom: 0;
}

.tableau thead th {
  font-family: var(--serif);
  font-weight: 600;
  background: var(--argile-doux);
}

.tableau tbody th {
  font-weight: 650;
  width: 34%;
}

/* Les questions de l'aide : on déplie celle qu'on cherche. */
details.question {
  background: var(--blanc);
  border-radius: var(--rayon-carte);
  box-shadow: var(--ombre-carte);
  margin-bottom: 12px;
}

details.question summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
  border-radius: var(--rayon-carte);
}

details.question summary::-webkit-details-marker {
  display: none;
}

details.question summary::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  background: url("/img/autocollant-paw.webp") no-repeat center / contain;
  transition: transform 0.2s ease;
}

details.question[open] summary::after {
  transform: rotate(35deg);
}

@media (prefers-reduced-motion: reduce) {
  details.question summary::after {
    transition: none;
  }
}

details.question .reponse {
  padding: 0 22px 20px;
  color: var(--encre);
}

details.question .reponse > :last-child {
  margin-bottom: 0;
}

.regles {
  counter-reset: regle;
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 14px;
}

.texte ol.regles {
  padding-left: 0;
}

.regles li {
  counter-increment: regle;
  background: var(--blanc);
  border-radius: var(--rayon-carte);
  box-shadow: var(--ombre-carte);
  padding: 20px 22px 20px 70px;
  position: relative;
  margin: 0;
}

.regles li::before {
  content: counter(regle);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--argile-doux);
  color: var(--moka-fonce);
  font-family: var(--serif);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.regles strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.regles span {
  color: var(--encre-douce);
}

.etapes {
  counter-reset: etape;
  list-style: none;
  margin: 0 0 1em;
}

.texte ol.etapes {
  padding: 0;
}

.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 42px;
  margin-bottom: 12px;
}

.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sauge-doux);
  color: var(--sauge-fonce);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grande-mascotte {
  width: 190px;
  margin: 0 auto 10px;
}

/* ----------------------------------------------------------------------------
   Le pied de page
   ---------------------------------------------------------------------------- */

.pied {
  border-top: 1px solid var(--filet);
  padding: 38px 0 46px;
  font-size: 0.95rem;
  color: var(--encre-douce);
}

.pied .page {
  display: grid;
  gap: 26px;
}

.pied h2 {
  font-size: 1.05rem;
  color: var(--encre);
  margin-bottom: 8px;
}

.pied ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pied li {
  margin-bottom: 4px;
}

.pied a {
  display: inline-block;
  padding: 3px 0;
}

.pied .signature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pied .signature img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}

.pied .signature p {
  margin: 0 0 6px;
}

.pied .adresse {
  font-size: 0.84em;
  padding: 3px 8px;
}

/* ----------------------------------------------------------------------------
   À partir d'une tablette
   ---------------------------------------------------------------------------- */

@media (min-width: 720px) {
  body {
    font-size: 18px;
  }

  .page {
    padding: 0 32px;
  }

  .bloc {
    padding: 76px 0;
  }

  .heros {
    padding: 50px 0 70px;
  }

  .heros .page {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }

  .heros-image .capture {
    max-width: 290px;
  }

  .heros-image .mascotte.droite {
    width: 104px;
    margin-left: 96px;
  }

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

  .grille.trois {
    grid-template-columns: repeat(3, 1fr);
  }

  .duo {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .duo.inverse > :first-child {
    order: 2;
  }

  .trio {
    justify-content: center;
    overflow: visible;
    margin: 44px 0 0;
    padding: 0 0 10px;
  }

  .trio .capture {
    flex: 0 1 250px;
  }

  .prive {
    grid-template-columns: 170px 1fr;
    gap: 34px;
  }

  .carte {
    padding: 28px;
  }

  .pied .page {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
  }
}

@media print {
  .entete .menu,
  .pied ul,
  .lien-evitement {
    display: none;
  }

  body {
    background: #fff;
  }
}
