/* Site provisoire tolvy.fr : charte « Tirage » de l'app (Tolvy/DesignSystem/Couleurs.swift, Typo.swift). */

@font-face {
  font-family: "Newsreader";
  src: url("/polices/newsreader.woff2") format("woff2-variations"), url("/polices/newsreader.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  /* Seulement les lettres de « Tolvy », pour la marque. */
  font-family: "Newsreader Marque";
  src: url("/polices/newsreader-italique.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/polices/figtree.woff2") format("woff2-variations"), url("/polices/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --papier: #ffffff;
  --table: #f4f3f1;
  --filet: #e4e1dc;
  --encre: #1a1816;
  --encre-douce: #5c574f;
  --grenat: #8b2232;
  --grenat-pale: #f7e8ea;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mesure: 38rem;
  --marge: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}

/* 18 px par défaut ; sur iPhone, suit la taille du texte choisie dans les Réglages. */
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
}

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

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

a { color: var(--grenat); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--grenat); outline-offset: 3px; border-radius: 4px; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.25rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.8rem); }
h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0; }
p, ul, ol { margin: 0; }
p + p, p + ul, p + ol, ul + p, ol + p { margin-top: 0.85em; }
li + li { margin-top: 0.5em; }
strong { font-weight: 700; }

.cadre { width: 100%; max-width: calc(var(--mesure) + 2 * var(--marge)); margin-inline: auto; padding-inline: var(--marge); }
.cadre-large { max-width: calc(62rem + 2 * var(--marge)); }

.lien-evitement { position: absolute; left: -999rem; }
.lien-evitement:focus { left: var(--marge); top: 0.75rem; background: var(--papier); padding: 0.5rem 0.75rem; z-index: 2; }

/* En-tête : la marque, et le lien vers l'aide. */
.entete { border-bottom: 1px solid var(--filet); }
.entete .cadre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.marque {
  font-family: "Newsreader Marque", var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--grenat);
  text-decoration: none;
}
.entete nav a { font-weight: 600; text-decoration: none; padding: 0.5rem 0; }
.entete nav a:hover { text-decoration: underline; }
.marque-app { display: none; }

/* Ouverte depuis l'app (?app=1) : aucun lien vers l'accueil ni le reste du site (règle 3.1.1(a) d'Apple). */
.dans-app .liens-site { display: none !important; }
.dans-app .marque-app { display: inline; }

main { display: block; }

/* Accueil */
.une { background: var(--table); }
.une .cadre { display: grid; gap: 1.5rem; padding-block: 2rem 2.75rem; align-items: center; }
.une figure { margin: 0; justify-self: center; width: min(15rem, 68vw); }
.une-texte p { font-size: 1.1rem; color: var(--encre-douce); max-width: 32rem; }
.une-texte h1 + p { margin-top: 1rem; }
.une-texte .offert { margin-top: 1.25rem; font-weight: 700; color: var(--encre); }
.une-texte .bientot {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--papier);
  border: 1px solid var(--filet);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--encre);
}
@media (min-width: 46rem) {
  .une .cadre { grid-template-columns: 1fr 15rem; gap: 3rem; padding-block: 4rem; }
  .une figure { order: 2; width: 100%; }
}

.bloc { padding-block: 2.75rem; }
.bloc .cadre-large > * { max-width: var(--mesure); }
.bloc + .bloc { border-top: 1px solid var(--filet); }
.bloc h2 { margin-bottom: 1.25rem; }

.etapes { list-style: none; padding: 0; counter-reset: etape; display: grid; gap: 1.5rem; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 0.75rem; margin: 0; }
.etapes li::before {
  content: counter(etape);
  grid-row: span 2;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  color: var(--grenat);
}
.etapes p { color: var(--encre-douce); margin-top: 0.25rem; }

.savoir { padding-left: 1.2rem; }
.savoir li::marker { color: var(--grenat); }

.contact { background: var(--grenat-pale); border-radius: 12px; padding: 1.25rem 1.25rem 1.35rem; }
.contact h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.contact a { font-weight: 700; }

/* Aide et textes légaux */
.texte { padding-block: 2.25rem 3rem; }
.texte h1 { margin-bottom: 0.5rem; }
.date { color: var(--encre-douce); font-size: 0.95rem; }
.resume { background: var(--table); border-radius: 12px; padding: 1.1rem 1.25rem 1.25rem; margin-top: 1.75rem; }
.resume h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.resume ul { padding-left: 1.2rem; }
.texte section { margin-top: 2.25rem; scroll-margin-top: 1rem; }
.texte section h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.texte section ul, .texte section ol { padding-left: 1.4rem; }
.texte section li::marker { color: var(--encre-douce); }
.encart { border: 1px solid var(--filet); border-radius: 12px; padding: 1rem 1.25rem; margin-top: 1rem; }
.encart > p:first-child { font-weight: 700; }
.question h2 { font-size: 1.3rem; }
.chemin { font-weight: 600; }

/* Pied de page */
.pied { border-top: 1px solid var(--filet); background: var(--table); color: var(--encre-douce); font-size: 0.95rem; }
.pied .cadre { padding-block: 1.75rem 2.25rem; display: grid; gap: 0.75rem; }
.pied nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.pied nav li { margin: 0; }
.pied a { color: var(--encre); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
