/* jmsantolin : ce que l'atelier ne dessine pas, mais que le vrai site doit savoir faire.
   Écrit à la main, à partir des valeurs de l'atelier. « Provisoire » = pas encore réglé dans l'atelier. */

/* ---- Couleurs fusionnées (artefact « Gris de jmsantolin.com », choix du 2026-11-27) ----
   Les feuilles générées gardent les valeurs de l'atelier ; ces jetons les remplacent partout. */
:root {
  --jm-text: #454f5c; --jm-d1: #454f5c; --jm-d2: #454f5c; --jm-d3: #454f5c; --jm-mix: #454f5c;  /* textes foncés */
  --jm-quiet: #8690a0;                                /* gris moyens */
  --jm-cta: #a3afbf; --jm-underline: #a3afbf;         /* gris clairs, soulignement des liens compris */
  --jm-accent-strong: #fd4902;                        /* orange des erreurs */
}
.pv:not(._) .body a { text-decoration-color: var(--jm-underline); }

/* ---- Fin d'article : les espaces entre les blocs (relevés dans l'atelier) ---- */
:where(.pv) .tail > [data-b="auth"] { margin-top: 40px; }
:where(.pv) .tail > [data-b="fn"] { margin-top: 64px; }
:where(.pv) .tail > [data-b="ab"] { margin-top: 64px; }
:where(.pv) .tail > [data-b="nl"] { margin-top: 40px; }
:where(.pv) .tail > [data-b="rm"] { margin-top: 64px; }

/* ---- Images de l'éditeur Ghost ---- */
/* largeur « normale » = la colonne (le choix de l'atelier) ; « large » déborde de 120 px de chaque côté ;
   « pleine » prend toute la page, sans arrondi */
:where(.pv) .body .kg-width-full { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); }
:where(.pv) .body .kg-width-full img { border-radius: 0; }
:where(.pv) .body .kg-width-full figcaption { padding: 0 var(--pad); }
@media (min-width: 768px) {
  :where(.pv) .body .kg-width-wide { margin-left: calc(-1 * var(--dw)); margin-right: calc(-1 * var(--dw)); }
}
/* galeries : les photos gardent l'arrondi des images */
:where(.pv) .body .kg-gallery-image img { border-radius: var(--img-r); }
/* image de une : sa légende comme celle des images du texte */
:where(.pv) .feat-below figcaption { font-size: 13px; line-height: 18px; color: var(--jm-secondary); margin-top: 16px; }
:where(.pv) figcaption span { white-space: pre-wrap; }

/* ---- Texte : provisoire ---- */
/* intertitre de niveau 3 : la famille des intertitres, un cran plus petit */
:where(.pv) .body h3 { font-family: var(--serif); font-size: 18px; line-height: 26px; font-weight: 600; color: var(--jm-ink); margin-top: 28px; }
:where(.pv) .body h3 + * { margin-top: 8px; }
/* listes numérotées : comme les listes à puces */
:where(.pv) .body ol { padding-left: 20px; }
/* code : jamais de défilement horizontal (style guide) */
:where(.pv) .body pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/22px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--jm-fill); padding: 16px; border-radius: var(--img-r); }
:where(.pv) .body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; overflow-wrap: anywhere; }
:where(.pv) .body pre code { font-size: inherit; }

/* ---- En-tête des articles ---- */
.pv .hd { position: relative; }
.pv .hd .brand { text-decoration: none; }
.pv .hd button.menu { background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; }
.pv .dnav a { text-decoration: none; }

/* ---- Menu sur téléphone (retours du 2026-11-27) ----
   Le bouton à trois traits devient une croix : les traits se rejoignent au centre, puis pivotent
   (à la fermeture, l'inverse). Le menu couvre tout l'écran, blanc à peine transparent et flouté,
   liens centrés en 14 px medium ; la signature et la croix restent au-dessus. */
@media (max-width: 767px) {
  .pv .hd { z-index: 30; }
  .pv .hd .brand, .pv .hd .menu { position: relative; z-index: 1; }
  .pv .hd .dnav { display: flex; position: fixed; inset: 0; z-index: 0; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
    padding: 0 var(--pad); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    font: 500 14px/20px var(--sans); color: var(--jm-ink); text-transform: uppercase; letter-spacing: .08em;
    opacity: 0; visibility: hidden; transition: opacity .45s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .45s; }
  .pv .hd.is-open .dnav { opacity: 1; visibility: visible; transition: opacity .45s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
  .pv .hd .dnav a { opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
  .pv .hd.is-open .dnav a { opacity: 1; transform: none; transition: opacity .5s cubic-bezier(.22, 1, .36, 1) .08s, transform .6s cubic-bezier(.22, 1, .36, 1) .08s; }
  .pv .hd.is-open .dnav a:nth-child(2) { transition-delay: .14s; }
  .pv .hd.is-open .dnav a:nth-child(3) { transition-delay: .2s; }
  .pv .hd.is-open .dnav a:nth-child(n+4) { transition-delay: .26s; }
  .pv .hd .menu i { transition: translate .24s cubic-bezier(.65, 0, .35, 1) .22s, rotate .24s cubic-bezier(.65, 0, .35, 1), opacity .1s linear .22s; }
  .pv .hd.is-open .menu i { transition: translate .24s cubic-bezier(.65, 0, .35, 1), rotate .3s cubic-bezier(.65, 0, .35, 1) .22s, opacity .1s linear .2s; }
  .pv .hd.is-open .menu i:nth-child(1) { translate: 0 calc(var(--menu-gap, 7px) + var(--menu-t, 1.25px)); rotate: 45deg; }
  .pv .hd.is-open .menu i:nth-child(2) { opacity: 0; }
  .pv .hd.is-open .menu i:nth-child(3) { translate: 0 calc(-1 * (var(--menu-gap, 7px) + var(--menu-t, 1.25px))); rotate: -45deg; }
  html.jm-menu-open { overflow: hidden; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .pv .hd .dnav, .pv .hd .dnav a, .pv .hd .menu i { transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* ---- Article sur téléphone : la ligne de méta plus discrète, 12 px et le gris clair des liens « All … » ---- */
@media (max-width: 767px) {
  .pv .ah { --meta-fs: 12px; --meta-c: var(--jm-cta); }
}

/* ---- La Lettre : le vrai champ e-mail, à l'allure de l'atelier ---- */
.pv .hform input { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; color: var(--jm-ink); }
.pv .hform input::placeholder { color: var(--jm-secondary); opacity: 1; }
.pv .hform input:focus { outline: none; }
.pv .hform:focus-within { border-bottom-color: var(--jm-secondary); }
.pv .hform .go { margin: 0; padding: 0; border: 0; background: none; font-family: inherit; line-height: inherit; cursor: pointer; }
.pv .hform.loading .go { opacity: .5; }
/* message après l'envoi : provisoire */
.pv .hmsg { display: none; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--jm-secondary); }
.pv .hform.success ~ .hmsg-ok, .pv .hform.error ~ .hmsg-err { display: block; }
.pv .hform.success { display: none; }

/* ---- Pied de page : les icônes des réseaux, puis l'e-mail et l'heure (retour du 2026-11-27) ----
   Comme le pied de page d'avant l'atelier : icônes de 24 px dans une zone de 44 px, centrées, gris des logos,
   plus foncées au survol ; plus de colonnes ni de filet. */
.pv .f-new .f-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pv .f-new .f-icons:not(:has(a)) { display: none; }
.pv .f-new .f-icons a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--jm-icon); transition: color var(--jm-fast, 150ms) var(--jm-ease, ease); }
.pv .f-new .f-icons a:hover { color: var(--jm-secondary); }
.pv .f-new .f-icons svg { display: block; width: 24px; height: 24px; fill: currentColor; }
.pv .f-new .f-icons + .fa { margin-top: 38px; }
.pv .f-new .cpy { cursor: pointer; }

/* ---- Clavier : un seul bleu de focus, #2f6fe0, aussi sur l'accueil (retour du 2026-11-27) ---- */
:root { --jm-focus: #2f6fe0; }
.pv a:focus-visible, .pv button:focus-visible, .pv [role="button"]:focus-visible { outline: 2px solid var(--jm-focus); outline-offset: 2px; border-radius: 2px; }

/* ---- Liste des essais (Essays, un tag) : provisoire ---- */
:where(.pv) .tail > .rm-list { margin-top: 48px; }
:where(.pv) .rm-list .pg { display: flex; justify-content: space-between; margin: 32px 0 0; font-size: 14px; line-height: 20px; }
:where(.pv) .rm-list .pg a { color: var(--jm-ink); text-decoration: none; }

/* ---- Accueil : les liens du texte, comme ceux des articles (soulignement gris, pas de flèche) ----
   Ne touche pas aux paragraphes qui ne portent qu'un lien (About me, More on Instagram). */
.hero-intro > p:not(:has(> a:only-child)) a,
.hero-intro > p:not(:has(> a:only-child)) a:hover,
.section-custom-content .gh-content > p:not(:has(> a:only-child)) a,
.section-custom-content .gh-content > p:not(:has(> a:only-child)) a:hover { color: var(--jm-ink); text-decoration: underline 1px var(--jm-underline); text-underline-offset: 4px; }
.hero-intro > p:not(:has(> a:only-child)) a::after { display: none !important; }

/* ---- Accueil, Side projects : un survol lent et souple ---- */
.section-showcase .card-image img { transition: transform .8s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
.section-showcase .card-title::after { transition: opacity .5s cubic-bezier(.22, 1, .36, 1); }

/* ---- Accueil, Latest essays : comme « By the same author » en fin d'article, titre à gauche, durée à droite ---- */
.post-feed.minimal .feed { padding: 12px 0; }
.post-feed.minimal .feed:first-child { padding-top: 0; }
.post-feed.minimal .feed:last-child { padding-bottom: 0; }
/* retour du 27-11, style choisi dans l'atelier « Liste des essais » : vignette 4:5 de 64 px de haut à gauche (coins de 4 px),
   titre 16/22 sur deux lignes au plus, souligné au survol, puis date · durée 12 px, 5 px sous le titre */
.post-feed.minimal .feed-wrapper { flex-direction: row; justify-content: flex-start; align-items: center; gap: 18px; }
.post-feed.minimal .feed-thumb { flex: 0 0 auto; height: 64px; width: auto; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--jm-fill); } /* 4:5 toujours respecté (51,2 × 64) */
.post-feed.minimal .feed-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-feed.minimal .feed-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.post-feed.minimal .feed-title { font-size: 16px; line-height: 22px; letter-spacing: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  text-decoration: underline 1px transparent; text-underline-offset: 3px; transition: text-decoration-color .3s var(--jm-ease, ease); }
.post-feed.minimal .feed:hover .feed-title { text-decoration-color: var(--jm-cta); }
.post-feed.minimal .feed-calendar { font-size: 12px; line-height: 18px; color: var(--jm-secondary); }
.post-feed.minimal .feed[hidden], .home-template .section-blog .button-center[hidden] { display: none; }
/* « More essays » est un bouton : même allure que les liens « All … » */
.home-template .section-blog .button-center button.button { background: none; border: 0; padding: 0; height: auto; cursor: pointer; color: var(--jm-cta); }
.home-template .section-blog .button-center button.button::after { content: none; }

/* ---- Accueil : le pied de page sans fond blanc, sinon il recouvre le bas de la signature juste au-dessus ---- */
.pv.pv-foot { background: none; }

/* ---- Accueil : les états que le relevé ne voit pas (repris de l'ancien thème, à l'identique) ---- */
/* carte d'inscription de Ghost : envoi, erreur, succès */
.kg-signup-card form.loading .kg-signup-card-button { opacity: .5; }
.kg-signup-card form.error .kg-signup-card-fields { border-color: var(--jm-accent-strong); }
.kg-signup-card .kg-signup-card-error,
.kg-signup-card .kg-signup-card-disclaimer { margin-top: 12px; font: var(--jm-w-text) var(--jm-fs-caption)/var(--jm-lh-caption) var(--font-base); color: var(--jm-secondary) !important; }
.kg-signup-card .kg-signup-card-error { color: var(--jm-accent-strong) !important; }
.kg-signup-card .kg-signup-card-success { padding: 10px 0 0; font: var(--jm-w-text) var(--jm-fs-body)/var(--jm-lh-body) var(--font-base); color: var(--jm-text) !important; text-align: left; }
/* pile de tirages : la photo qu'on soulève */
.jm-print.lift { --sc: 1.04; cursor: grabbing; box-shadow: var(--jm-lift), 0 0 0 1px rgba(3, 9, 17, .06); transition: transform var(--jm-fast), box-shadow var(--jm-fast); }

/* ---- Retours du 27-11 ---- */
/* accueil : moitié plus d'espace sous le portrait (32 px -> 48 px) */
.home-template .hero-intro h2:first-child { margin-top: 48px; }
@media (min-width: 601px) { .home-template .hero-intro h2:first-child { margin-top: 40px; } }
/* accueil : « More on Instagram » 10 px plus bas */
.section-custom-content .gh-content > p:last-child:has(> a:only-child) { margin-top: calc(var(--jm-sp-cta) + 10px); }
/* articles : la signature de l'en-tête un peu plus grande */
:where(.pv).pv:not(._):not(._) { --hsig-w: 110px; }
@media (min-width: 768px) { :where(.pv).pv:not(._):not(._) { --hsig-w: 164px; } }
/* articles : les intertitres d'un cran moins gras (Geist Serif n'a qu'une graisse, 600 était un gras simulé) */
:where(.pv).pv:not(._):not(._) { --h2-w: 400; }
/* articles sur téléphone : la description un peu plus grande, la méta un peu plus petite */
@media (max-width: 767px) { .pv .ah { --desc-fs: 19px; --desc-lh: 27px; --meta-fs: 11px; } }
/* fin d'article : « Thank you for reading » 1 px plus bas, pour l'aligner à l'œil sur la photo */
.pv .wbtxt { position: relative; top: 1px; }

/* ---- Tailles de texte alignées entre accueil et articles (artefact « Tailles de jmsantolin.com », 27-11) ---- */
/* texte courant : 17/28 partout, comme dans les articles ; après l'article (bio, Lettre) : 16/26 sur tous les formats */
:root:root { --jm-fs-body: 1.7rem; --jm-lh-body: 2.8rem; }
:where(.pv).pv:not(._):not(._) { --t2-fs: 16px; --t2-lh: 26px; }
/* titres dans les listes : 16 px, « By the same author » compris */
html body .pv .r-cur .t { font-size: 16px; line-height: 22px; }
/* petits textes : 14/20 partout (liens « More … », rôles des expériences, légendes, pied de page) */
:root:root { --jm-fs-caption: 1.4rem; --jm-lh-caption: 2rem; --jm-fs-cta: var(--jm-fs-small); --jm-lh-cta: var(--jm-lh-small); }
html body .pv .body-img figcaption, html body .pv .kg-image-card figcaption, html body .pv .kg-gallery-card figcaption, html body .pv .feat-below figcaption { font-size: 14px; line-height: 20px; }
html body .ft .fa, html body .ft .fa a, html body .ft .tm { font-size: 14px; line-height: 20px; }
/* étiquettes en capitales : 11 px (titres de section de l'accueil, auteur et date des articles) */
.section-custom-content .gh-content > h2:first-child, .section-header-title { font-size: 11px; }
:where(.pv).pv:not(._):not(._) .ah { --meta-fs: 11px; }

/* ---- Accueil : plus d'air entre les sections (retour du 27-11) : 104 px sur ordinateur (au lieu de 96), 80 px sur téléphone (au lieu de 72).
   « Experience » reste collée à « Selected work » ; l'espace au-dessus du portrait ne bouge pas. ---- */
html body.home-template .section-container:not(.tag-hash-section-experiences) { margin-top: 80px; }
@media (min-width: 1024px) { html body.home-template .section-container:not(.tag-hash-section-experiences) { margin-top: 104px; } }

/* ---- Articles : visionneuse d'images (PhotoSwipe de Ghost) ---- */
/* pswp.css (Ghost) s'appuie sur les couleurs des thèmes Ghost, absentes ici : on les donne */
.pswp { --color-white: #fff; --color-black: #000; --color-secondary-text: rgba(255,255,255,.6); }
/* fond presque opaque, dans l'encre du site, pour que le texte de l'article ne transparaisse pas */
.pswp .pswp__bg { background-color: #0d1116; }
.pv .body img.jm-zoomable { cursor: zoom-in; }
.pswp .pswp__caption__center { max-width: 640px; font: 400 14px/20px var(--sans, "Inter", sans-serif); color: rgba(255,255,255,.78); text-align: center; }
.pswp__caption__center a { color: #fff; }
.pswp .pswp__counter { font: 400 13px/44px var(--sans, "Inter", sans-serif); opacity: .7; }
