:root {
  --ground:     #FCFAF6;
  --surface:    #F5EEE4;
  --line:       #E6DCCC;
  --ink:        #241E1A;
  --muted:      #6B5F55;
  --accent:     #C0603A;
  --accent-hi:  #8F4526;
  --serif: Fraunces, "Iowan Old Style", Georgia, serif;
  --sans:  "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:    #191512;
    --surface:   #221C18;
    --line:      #352C25;
    --ink:       #F2EBE1;
    --muted:     #A69789;
    --accent:    #DA8058;
    --accent-hi: #EC9670;
  }
}
:root[data-theme="dark"] {
  --ground:    #191512;
  --surface:   #221C18;
  --line:      #352C25;
  --ink:       #F2EBE1;
  --muted:     #A69789;
  --accent:    #DA8058;
  --accent-hi: #EC9670;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 40px 64px;
  display: grid;
  gap: 40px;
}
@media (min-width: 940px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 72px;
    padding-block: 72px 96px;
  }
  .shell > .rail-slot { grid-column: 1; grid-row: 1; }
  .shell > main       { grid-column: 2; grid-row: 1 / span 2; }
  .shell > .site-foot { grid-column: 1; grid-row: 2; align-self: end; }
}

/* ---------- rail ---------- */

.rail { display: grid; gap: 26px; align-content: start; }
@media (min-width: 940px) {
  /* Le rail est collant, et un élément collant s'arrête au bas de son bloc
     conteneur — pas au bas de sa cellule de grille. Posé directement dans
     .shell, son conteneur était la boîte de contenu du .shell tout entier :
     arrivé en bas de page, le rail descendait de 119 px par-dessus le pied de
     page, brouillait « © 2026 Nidello » et avalait les clics sur le courriel
     et LinkedIn. align-self:start ne réglait que l'étirement, pas la descente.
     D'où .rail-slot : une boîte qui occupe la rangée 1 et rien d'autre. Le
     rail colle à l'intérieur, et s'arrête donc un interstice au-dessus du
     pied de page. Mesuré sur cartina.html en 1100 × 900 : chevauchement de
     119 px avant, de zéro après, à toutes les positions de défilement. */
  .rail {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 72px);
  }
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit; width: max-content;
}
.brand .mark { flex: none; }
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.015em;
  line-height: 1;
}
.rail .tagline {
  font-size: 14px;
  color: var(--muted);
  max-width: 26ch;
  margin: 0;
}

.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (min-width: 940px) { .nav { display: grid; gap: 2px; } }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding-block: 3px;
  border-bottom: 1px solid transparent;
  width: max-content;
}
.nav a:hover { color: var(--accent-hi); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-free {
  display: inline-block; margin-left: 8px; padding: 0 7px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; line-height: 17px;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; vertical-align: 1px;
}

.site-foot {
  font-size: 12.5px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.site-foot a { color: var(--muted); }
.site-foot a, .site-foot span { width: max-content; }
@media (min-width: 940px) {
  /* au-dessus du rail, ceinture et bretelles */
  .site-foot { padding-top: 26px; position: relative; z-index: 1; }
}

/* ---------- renvoi vers l'app, au bas de l'accueil ---------- */

.nav-group {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); opacity: 0.75;
  margin-top: 14px; width: max-content;
}
.nav a + .nav-group { margin-top: 18px; }
.nav-rule {
  height: 1px; background: var(--line); margin-block: 14px 4px;
  width: 100%; min-width: 34px;
}
@media (max-width: 939px) { .nav-group, .nav-rule { display: none; } }

.langs { display: flex; gap: 10px; font-size: 13.5px; font-weight: 500; }
.langs a, .langs button {
  color: var(--muted); text-decoration: none; background: none;
  border: 0; padding: 0; font: inherit; cursor: pointer;
}
.langs a:hover, .langs button:hover { color: var(--accent-hi); }
.langs [aria-current="true"] { color: var(--ink); }

/* ---------- main ---------- */

/* align-content: start. Sur grand écran, main couvre les deux rangées du
   .shell : une page plus courte que le rail et le pied de page (1305 px) était
   étirée à leur hauteur, et la grille répartissait l'excédent entre ses
   rangées : le haut de page changeait d'une app à l'autre. Mesuré en
   1024 × 768 sur les fiches françaises : la carte de l'app commençait entre
   112 et 248 px avant, à 112 px partout après. */
main { display: grid; gap: 56px; min-width: 0; align-content: start; }
section { display: grid; gap: 22px; scroll-margin-top: 28px; }

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 6.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
  max-width: 20ch;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.005em;
}
p { margin: 0; max-width: 64ch; }
.lede { font-size: clamp(17px, 2.2vw, 19.5px); line-height: 1.55; }
.muted { color: var(--muted); }

.eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

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

/* ---------- engagements : l'arche abrite chaque promesse ---------- */

.beliefs { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
@media (min-width: 620px) {
  .beliefs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; }
}
.beliefs li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; }
.arch-marker { margin-top: 2px; }
.beliefs p { font-size: 14.5px; color: var(--muted); margin-top: 5px; }

/* ---------- cartes d'apps, sur l'accueil ---------- */

.section-lead { padding-top: 34px; border-top: 1px solid var(--line); }
/* le nom d'un rayon, au-dessus de ses cartes */
.shelf { margin-top: 30px; color: var(--accent); opacity: 0.9; }
.section-lead + .shelf { margin-top: 10px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
.cards a {
  display: grid; gap: 7px; height: 100%; align-content: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 22px 18px;
  color: inherit; text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}
.cards a:hover { border-color: var(--accent); transform: translateY(-1px); }
.card-name {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  letter-spacing: -0.015em; line-height: 1;
}
.card-line { font-size: 14.5px; color: var(--muted); }
.card-go { font-size: 13.5px; font-weight: 500; color: var(--accent); }
.cards a:hover .card-go { color: var(--accent-hi); }
.nw { white-space: nowrap; }

/* listes simples dans les politiques */
.plain { margin: 0; padding-left: 1.15em; display: grid; gap: 7px; max-width: 62ch; }
.plain li { font-size: 15px; }
.cards .card-name + .card-line { margin-top: 2px; }

/* ---------- fiche d'app ---------- */

.app {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 34px);
  display: grid;
  gap: 20px;
}
.app-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
/* La base de 20rem garde le nom à côté de l'icône dès qu'il y a la place : sans
   elle, un sous-titre trop long pour tenir sur une ligne envoyait tout le bloc
   sous l'icône (six fiches sur seize en 960 px, dont Quadretto et Stelletta
   jusqu'en 1024). Le sous-titre passe maintenant sur deux lignes. Sur
   téléphone, jusqu'à 440 px, le bloc passe encore sous l'icône, comme avant. */
.app-head .titles { display: grid; gap: 6px; min-width: 0; flex: 1 1 20rem; }
.appicon {
  width: 84px; height: 84px; flex: none;
  border-radius: 19px;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 6px 18px -8px rgba(0,0,0,.35);
}
.app-name {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 4.4vw, 38px); line-height: 1;
  letter-spacing: -0.02em; margin: 0;
}
.app-tagline { font-size: 17px; color: var(--muted); font-style: italic; }

.stats {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  font-variant-numeric: tabular-nums;
  padding-block: 4px;
}
.stats li { display: grid; gap: 1px; }
.stats b { font-size: 21px; font-weight: 700; line-height: 1.1; }
.stats span { font-size: 12.5px; color: var(--muted); }

/* Le prix, en bas de chaque page d'app, au-dessus du statut ou du bouton. */
.price { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.price h3 { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); }

.specs { margin: 0; display: grid; gap: 18px; }
.specs > div { display: grid; gap: 4px; }
.specs dt { font-weight: 700; font-size: 15px; }
.specs dd { margin: 0; font-size: 14.5px; color: var(--muted); max-width: 62ch; }

/* Le bouton de téléchargement remplace la ligne de statut quand une app
   sort. Il occupe la même place et le même poids visuel : la page ne se
   réorganise pas le jour de la publication.

   Ce n'est PAS le badge d'Apple. Le lockup « Download on the App Store »
   est une marque déposée dont Apple fournit l'artwork officiel et interdit
   la recréation. Le jour où le fichier officiel est déposé dans
   assets/, il prend la place de ce bouton. */
.store { margin: 0; max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.store-link {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  width: max-content;
}
.store-link:hover { filter: brightness(1.08); }
.store-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Le code QR, pour qui lit la page sur un ordinateur. Noir sur blanc dans
   les deux thèmes (la marge blanche est dans le SVG) ; un écran tactile ne
   l'affiche pas, puisqu'on y est déjà sur l'appareil. */
.store-qr {
  margin: 0; display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--muted);
}
.store-qr svg {
  flex: none; width: 112px; height: 112px;
  border-radius: 10px; border: 1px solid var(--line);
}
.store-qr figcaption { max-width: 24ch; }
@media (hover: none) and (pointer: coarse) { .store-qr { display: none; } }

.status {
  font-size: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--ink);
  max-width: none;
}

/* ---------- texte long : politique, soutien ---------- */

.prose { display: grid; gap: 26px; }
.prose h3 { font-size: 15.5px; }
.prose > div { display: grid; gap: 7px; }
.prose p, .prose li { font-size: 14.8px; color: var(--muted); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose strong { color: var(--ink); font-weight: 700; }
.asof { font-size: 13px; color: var(--muted); }

.qa { display: grid; gap: 20px; }
.qa > div { display: grid; gap: 5px; }
.qa dt { font-weight: 700; font-size: 15px; }
.qa dd { margin: 0; font-size: 14.5px; color: var(--muted); max-width: 62ch; }

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  display: grid; gap: 8px;
}
.callout .addr {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(20px, 3.4vw, 26px); letter-spacing: -0.01em;
  word-break: break-word;
}

/* ---------- la page des noms ---------- */

.names { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; max-width: 66ch; }
.names li { display: flex; align-items: flex-start; gap: 16px; }
.names-icon, .names-mark {
  width: 48px; height: 48px; flex: none; border-radius: 11px;
}
.names-icon { box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 4px 12px -6px rgba(0,0,0,.35); }
span.names-icon { background: var(--surface); border: 1px solid var(--line); }
.names-mark { display: grid; place-items: center; }
.names-text { display: grid; gap: 4px; min-width: 0; }
.names-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.names-name {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  letter-spacing: -0.015em; line-height: 1.1; color: var(--ink); text-decoration: none;
}
a.names-name:hover { color: var(--accent); }
.names-gloss { font-size: 14px; color: var(--muted); font-style: italic; }
.names-text p:last-child { font-size: 15px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.pub { max-width: 44rem; margin: 0 auto; padding: 28px 20px 56px; display: grid; gap: 40px; }
.pub-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.pub-head .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.pub-head .section-name { font-family: var(--serif); font-size: 19px; color: var(--muted); text-decoration: none; }
.pub-head .section-name:hover { color: var(--accent-hi); }
.pub-head .langs { margin-left: auto; }
.pub-index { display: grid; gap: 18px; }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pub-list a {
  display: grid; gap: 4px; padding: 16px 18px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .15s, transform .15s;
}
.pub-list a:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--ink); }
.pub-list .t { font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.pub-list .r { font-size: 14.5px; color: var(--muted); }
.pub-list .m { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.tag { font-size: 11.5px; font-weight: 500; border: 1px solid var(--line); border-radius: 99px;
       padding: 1px 8px; margin-left: 6px; color: var(--muted); white-space: nowrap; }
article { display: grid; gap: 18px; }
article .meta { font-size: 13.5px; color: var(--muted); }
article .meta a { color: var(--muted); }
article .chapo { font-size: clamp(17px, 2.2vw, 19.5px); line-height: 1.55; }
article h2 { margin-top: 18px; }
article ul, article ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 64ch; }
article blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent);
                     display: grid; gap: 10px; font-style: italic; }
article hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 8px 0; }
article code { font-size: .92em; background: var(--surface); padding: 1px 5px; border-radius: 5px; }
.fin { text-align: center; max-width: none; color: var(--muted); letter-spacing: .1em; }
.author-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px;
               border: 1px solid var(--line); border-radius: 14px; }
.author-card .initiale { flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--ground);
  font-family: var(--serif); font-size: 22px; }
.author-card .who { display: grid; gap: 4px; }
.author-card .who b { font-size: 16px; }
.author-card .who span, .author-card .who p { font-size: 14.5px; color: var(--muted); }
.pub-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted);
            padding-top: 22px; border-top: 1px solid var(--line); }
.pub-foot a { color: var(--muted); }
