/* =================================================================
   HV STYLISME — Page d'une lettre du Carnet (single-post.php)
   Colonne de lecture 680 px, photo de tête 880 × 500 max.
   Chargé uniquement sur is_singular('post'), après hv-chrome / hv-articles.
   ================================================================= */

/* ---------- Sortie du conteneur GeneratePress / hv-articles.css ---------- */
body.hv-chrome.hv-lettre-page .site.grid-container,
body.hv-lettre-page .site.grid-container.container{ max-width:none; padding:0; }
body.hv-chrome.hv-lettre-page .site-content{ display:block; padding:0; }
body.hv-chrome.hv-lettre-page #primary.content-area{ width:100%; float:none; }
body.hv-chrome.hv-lettre-page .site-main{ margin:0; }
body.hv-chrome.hv-lettre-page .site,
body.hv-chrome.hv-lettre-page .site-content{ background:transparent; }

.hv-lettre{
  --hv-text:#3F3A32;
  --hv-col:680px;
  --hv-wide:880px;
  --hv-line:var(--line-on-paper, rgba(11,14,28,0.14));
  background:var(--paper, #FBFAF8);
  color:var(--ink, #0B0E1C);
  font-family:'Inter', sans-serif;
  padding:120px var(--gutter, clamp(20px, 5vw, 72px)) 64px;   /* nav fixe */
  margin:0;
}
.hv-lettre > *{ max-width:var(--hv-col); margin-left:auto; margin-right:auto; }
.hv-lettre p{ text-align:left; }
.hv-lettre .hv-sep{ margin:0 8px; color:var(--stone, #C9C0AE); }

/* ---------- En-tête ---------- */
.hv-lettre-head{ padding-top:clamp(16px, 3vw, 40px); margin-bottom:36px; }
.hv-lettre-back{
  display:inline-block;
  margin-bottom:26px;
  font-size:0.7rem;
  font-weight:600;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--muted, #6E6656);
  text-decoration:none;
}
.hv-lettre-back:hover{ color:var(--accent, #A6355A); }
.hv-lettre-meta{
  font-size:0.66rem;
  font-weight:600;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--muted, #6E6656);
  margin:0 0 16px;
}
.hv-lettre-title{
  font-family:'EB Garamond', serif;
  font-weight:400;
  font-size:clamp(2.1rem, 4vw, 2.75rem) !important;   /* 44 px */
  line-height:1.12;
  letter-spacing:-0.01em;
  text-transform:none !important;
  color:var(--ink, #0B0E1C);
  margin:0 0 18px;
}
.hv-lettre-chapo{
  font-family:'EB Garamond', serif;
  font-style:italic;
  font-weight:400;
  font-size:clamp(1.2rem, 2vw, 1.375rem);              /* 22 px */
  line-height:1.45;
  color:var(--ink, #0B0E1C);
  margin:0;
}

/* ---------- Photo de tête ---------- */
.hv-lettre > .hv-lettre-photo{
  max-width:var(--hv-wide);
  margin:0 auto 48px;
}
.hv-lettre-photo img{
  display:block;
  width:100%;
  height:min(500px, 62vw);
  max-width:none;
  object-fit:cover;
  object-position:center 30%;
  border-radius:0;
}

/* ---------- Texte ---------- */
body.hv-lettre-page .hv-lettre-content{
  font-size:1.0625rem;                                 /* 17 px */
  line-height:1.75;
  color:var(--hv-text);
}
body.hv-lettre-page .hv-lettre-content p,
body.hv-lettre-page .hv-lettre-content li{
  font-family:'Inter', sans-serif;
  font-size:1.0625rem;
  line-height:1.75;
  color:var(--hv-text);
  margin:0 0 1.15em;
  text-align:left;                                     /* pas de justifié */
  hyphens:none;
}
body.hv-lettre-page .hv-lettre-content ul,
body.hv-lettre-page .hv-lettre-content ol{ margin:0 0 1.15em 1.25em; padding:0; }
body.hv-lettre-page .hv-lettre-content strong{ color:var(--ink, #0B0E1C); font-weight:600; }
body.hv-lettre-page .hv-lettre-content a{ color:var(--accent-deep, #7A1F43); text-decoration:underline; text-underline-offset:3px; }
body.hv-lettre-page .hv-lettre-content a:hover{ color:var(--accent, #A6355A); }

body.hv-lettre-page .hv-lettre-content h2{
  font-family:'EB Garamond', serif;
  font-weight:400;
  font-size:1.75rem !important;                        /* 28 px */
  line-height:1.25;
  letter-spacing:0;
  text-transform:none !important;
  color:var(--ink, #0B0E1C);
  margin:52px 0 18px;
  padding-top:30px;
  border-top:1px solid var(--hv-line);
}
body.hv-lettre-page .hv-lettre-content h3{
  font-family:'EB Garamond', serif;
  font-weight:500;
  font-size:1.3125rem !important;                      /* 21 px */
  line-height:1.35;
  text-transform:none !important;
  color:var(--ink, #0B0E1C);
  margin:30px 0 8px;
}
body.hv-lettre-page .hv-lettre-content blockquote{
  margin:32px 0;
  padding:4px 0 4px 22px;
  border-left:2px solid var(--accent, #A6355A);
  font-family:'EB Garamond', serif;
  font-style:italic;
  font-size:1.3rem;
  line-height:1.5;
  color:var(--ink, #0B0E1C);
}

/* ---------- Photos dans le texte : 400 px de haut max ---------- */
body.hv-lettre-page .hv-lettre-content .wp-block-image,
body.hv-lettre-page .hv-lettre-content figure.wp-block-image{ margin:32px 0; text-align:center; }
body.hv-lettre-page .hv-lettre-content .wp-block-image img{
  display:inline-block;
  width:auto !important;
  height:auto !important;
  max-width:100%;
  max-height:400px;
  border-radius:0;
}
body.hv-lettre-page .hv-lettre-content .wp-block-image figure{ margin:0 auto; text-align:center; }   /* garde le centrage « aligncenter » */
body.hv-lettre-page .hv-lettre-content figcaption{
  margin-top:10px;
  font-size:0.8rem;
  font-style:italic;
  color:var(--muted, #6E6656);
  text-align:center;
}

/* Deux photos qui se suivent : côte à côte, même hauteur */
body.hv-lettre-page .hv-lettre-content .hv-duo{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:32px 0;
}
body.hv-lettre-page .hv-lettre-content .hv-duo .wp-block-image,
body.hv-lettre-page .hv-lettre-content .hv-duo figure{ margin:0; }
body.hv-lettre-page .hv-lettre-content .hv-duo img{
  width:100% !important;
  height:360px !important;
  max-height:none;
  object-fit:cover;
  object-position:center 30%;
}

/* Signature manuscrite : taille d'origine (réglée dans l'éditeur) */
body.hv-lettre-page .hv-lettre-content .signature-helene{ text-align:left; margin:8px 0 18px; }
body.hv-lettre-page .hv-lettre-content .signature-helene img{ max-height:none; width:170px !important; }

/* ---------- Inscription fin de lettre ---------- */
.hv-lettre > .hv-lettre-insc{ margin-top:44px; margin-bottom:44px; }

/* ---------- Lettre précédente / suivante ---------- */
.hv-lettre-nav{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:20px;
  align-items:start;
  padding-top:28px;
  border-top:1px solid var(--hv-line);
}
.hv-lettre-nav a{ text-decoration:none; color:var(--ink, #0B0E1C); }
.hv-lettre-nav-next{ text-align:right; }
.hv-lettre-nav-label{
  display:block;
  font-size:0.66rem;
  font-weight:600;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color:var(--muted, #6E6656);
  margin-bottom:6px;
}
.hv-lettre-nav-title{
  display:block;
  font-family:'EB Garamond', serif;
  font-size:1.15rem;
  line-height:1.3;
  transition:color .25s ease;
}
.hv-lettre-nav a:hover .hv-lettre-nav-title{ color:var(--accent, #A6355A); }
.hv-lettre-nav-all{
  align-self:center;
  padding-bottom:3px;
  border-bottom:1px solid currentColor;
  font-size:0.7rem;
  font-weight:600;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--accent, #A6355A) !important;
  white-space:nowrap;
}

/* ---------- Mobile ---------- */
@media (max-width:640px){
  .hv-lettre{ padding-top:92px; }
  .hv-lettre-back{ margin-bottom:18px; }
  .hv-lettre-meta{ font-size:0.6rem; letter-spacing:0.14em; line-height:1.8; }
  .hv-lettre > .hv-lettre-photo{ margin-left:calc(-1 * var(--gutter, 20px)); margin-right:calc(-1 * var(--gutter, 20px)); margin-bottom:36px; }
  .hv-lettre-photo img{ height:340px; }
  body.hv-lettre-page .hv-lettre-content p,
  body.hv-lettre-page .hv-lettre-content li{ font-size:1rem; }
  body.hv-lettre-page .hv-lettre-content h2{ font-size:1.5rem !important; margin-top:40px; padding-top:24px; }
  body.hv-lettre-page .hv-lettre-content .hv-duo{ gap:8px; }
  body.hv-lettre-page .hv-lettre-content .hv-duo img{ height:230px !important; }
  body.hv-lettre-page .hv-lettre-content .wp-block-image img{ max-height:360px; }
  .hv-lettre-nav{ grid-template-columns:1fr 1fr; }
  .hv-lettre-nav-all{ grid-column:1 / -1; grid-row:2; justify-self:center; }
}
