/* ============================================================================
   NLS — Style éditorial du blog (v2, inspiration food-blog : marineiscooking)
   Titres serif élégants (Cormorant Garamond) + corps sans lisible + images bridées
   Portée stricte : .single-post .entry-content (n'affecte pas les fiches produit)
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600&display=swap');

/* — Largeur de lecture confortable + corps — */
.single-post .entry-content {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.09rem;
  line-height: 1.85;
  color: #34362f;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.single-post .entry-content p { margin: 0 0 1.35rem; }
.single-post .entry-content a {
  color: #4a8a1f; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 -2px 0 rgba(125,194,65,.35); transition: box-shadow .15s, color .15s;
}
.single-post .entry-content a:hover { color: #2f6312; box-shadow: inset 0 -1.1em 0 rgba(125,194,65,.18); }
.single-post .entry-content strong { color: #262b1d; font-weight: 700; }
.single-post .entry-content em { color: #4a4d44; }

/* — Image à la une (en-tête) : bridée pour ne pas écraser la page — */
.single-post .entry-thumb img,
.single-post .post-thumbnail img,
.single-post img.wp-post-image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 16px;
}

/* — Chapô — */
.single-post .entry-content .nls-lead {
  font-size: 1.3rem;
  line-height: 1.62;
  color: #2f3a26;
  font-weight: 400;
  margin: 0 0 2rem;
}
.single-post .entry-content .nls-lead::first-letter {
  float: left;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4.4rem;
  line-height: 0.74;
  font-weight: 700;
  color: #5a9e2f;
  margin: 0.36rem 0.62rem 0 0;
}

/* — Hiérarchie des titres : serif élégant — */
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: #20300d;
}
.single-post .entry-content h2 {
  font-size: 2.45rem;
  line-height: 1.12;
  font-weight: 700;
  margin: 3rem 0 1.1rem;
  padding-bottom: 0.55rem;
  position: relative;
}
.single-post .entry-content h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 58px; height: 3px;
  background: #7dc241;
  border-radius: 2px;
}
.single-post .entry-content h3 {
  font-size: 1.78rem;
  line-height: 1.22;
  font-weight: 700;
  color: #3d7a1e;
  margin: 2.2rem 0 0.7rem;
}
.single-post .entry-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #262b1d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.6rem 0 0.5rem;
}

/* — Listes — */
.single-post .entry-content ul { list-style: none; padding-left: 0; margin: 0 0 1.5rem; }
.single-post .entry-content ul > li { position: relative; padding-left: 1.7rem; margin-bottom: 0.62rem; }
.single-post .entry-content ul > li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.66em;
  width: 0.5rem; height: 0.5rem; background: #7dc241; border-radius: 50%;
}
.single-post .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.5rem; }
.single-post .entry-content ol > li { margin-bottom: 0.62rem; padding-left: 0.35rem; }
.single-post .entry-content ol > li::marker { color: #5a9e2f; font-weight: 700; }

/* — Figures & images de contenu : BRIDÉES EN HAUTEUR (correctif principal) — */
.single-post .entry-content figure,
.single-post .entry-content .nls-figure {
  margin: 2.4rem auto;
  text-align: center;
}
.single-post .entry-content figure img,
.single-post .entry-content .nls-figure img {
  display: inline-block;
  max-width: 100%;
  max-height: 500px;       /* clé : les portraits ne débordent plus */
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(32,48,13,.16);
}
.single-post .entry-content figcaption,
.single-post .entry-content .nls-figcaption {
  font-size: 0.88rem;
  color: #8a917e;
  font-style: italic;
  text-align: center;
  margin-top: 0.7rem;
  line-height: 1.45;
}
/* tableau dans une figure : pas de hauteur bridée */
.single-post .entry-content figure table { max-height: none; }

/* — Citation mise en exergue — */
.single-post .entry-content blockquote,
.single-post .entry-content .nls-pull {
  margin: 2.2rem 0;
  padding: 0.2rem 0 0.2rem 1.6rem;
  border-left: 4px solid #7dc241;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.35;
  font-weight: 600;
  font-style: italic;
  color: #2f3a26;
}
.single-post .entry-content blockquote p { margin-bottom: 0.4rem; }

/* — Encadrés (callouts) : plus légers, plus aérés — */
.single-post .entry-content .nls-box {
  margin: 2.2rem 0;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  background: #f7faf2;
  border: 1px solid #e2eed3;
  border-left: 4px solid #7dc241;
}
.single-post .entry-content .nls-box > :last-child { margin-bottom: 0; }
.single-post .entry-content .nls-box .nls-box__label {
  display: block;
  font-size: 0.74rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: #4a8a1f; margin-bottom: 0.5rem;
}
.single-post .entry-content .nls-box--tip  { background: #f7faf2; border-left-color: #7dc241; }
.single-post .entry-content .nls-box--warn { background: #fff7ea; border-left-color: #efb000; }
.single-post .entry-content .nls-box--warn .nls-box__label { color: #c2820a; }
.single-post .entry-content .nls-box--info { background: #fbf6ef; border-left-color: #d9a557; }
.single-post .entry-content .nls-box--info .nls-box__label { color: #b06f1d; }

/* — « Le saviez-vous ? » / anecdote — */
.single-post .entry-content .nls-saviez {
  margin: 2.4rem 0;
  padding: 1.6rem 1.7rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #213006 0%, #3f7d1c 100%);
  color: #eef6e4;
  box-shadow: 0 14px 34px rgba(32,48,13,.2);
}
.single-post .entry-content .nls-saviez > :last-child { margin-bottom: 0; }
.single-post .entry-content .nls-saviez .nls-box__label {
  display: block; font-size: 0.74rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: #bce896; margin-bottom: 0.5rem;
}
.single-post .entry-content .nls-saviez strong { color: #fff; }
.single-post .entry-content .nls-saviez a { color: #d6f3b4; box-shadow: inset 0 -2px 0 rgba(214,243,180,.4); }

/* — Tableaux comparatifs — */
.single-post .entry-content table {
  width: 100%; border-collapse: collapse; margin: 0 auto;
  font-size: 0.98rem; border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(32,48,13,.09);
}
.single-post .entry-content thead th {
  background: #4f8f23; color: #fff; font-weight: 700; text-align: left; padding: 0.85rem 1rem;
}
.single-post .entry-content tbody td { padding: 0.8rem 1rem; border-top: 1px solid #e8efe0; vertical-align: top; }
.single-post .entry-content tbody tr:nth-child(even) { background: #f7faf3; }

/* — CTA — */
.single-post .entry-content .nls-cta {
  margin: 2.8rem 0 1rem; padding: 2rem 1.8rem; border-radius: 18px; text-align: center;
  background: linear-gradient(135deg, #7dc241 0%, #4f8f23 100%); color: #fff;
}
.single-post .entry-content .nls-cta p { color: #f3f9ea; margin-bottom: 1.2rem; font-size: 1.1rem; }
.single-post .entry-content .nls-cta strong { color: #fff; }
.single-post .entry-content .nls-cta a.nls-btn {
  display: inline-block; background: #fff; color: #2f6312 !important; font-weight: 800;
  padding: 0.85rem 1.9rem; border-radius: 999px; text-decoration: none; box-shadow: none;
}
.single-post .entry-content .nls-cta a.nls-btn:hover { background: #fff7ec; color: #245009 !important; }

/* — Faits clés — */
.single-post .entry-content .nls-facts {
  margin: 2.2rem 0; padding: 1.35rem 1.6rem; border-radius: 14px;
  background: #fff; border: 1px dashed #b9d99a;
}
.single-post .entry-content .nls-facts li::before { content: "✔"; background: none; color: #4f8f23; font-weight: 900; top: 0; width: auto; height: auto; }

/* — Séparateur — */
.single-post .entry-content hr {
  border: none; height: 1px;
  background: linear-gradient(90deg, transparent, #cfe6b6, transparent);
  margin: 2.6rem 0;
}

/* ============================================================================
   ÉCRAN LARGE (PC / laptop) — composition éditoriale façon charity-is-hope :
   images en cadre PAYSAGE 3:2 (réf. 1920×1280) et ANGLES DROITS sur tous les
   éléments rectangulaires (images, encadrés, tableaux, CTA, bouton).
   ============================================================================ */
@media (min-width: 601px) {
  /* Images de contenu : cadre paysage 3:2 uniforme, à plat, coins droits */
  .single-post .entry-content figure img,
  .single-post .entry-content .nls-figure img {
    display: block;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 3 / 2;
    max-height: none;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
  }
  /* Image à la une : bannière paysage, coins droits */
  .single-post .entry-thumb img,
  .single-post .post-thumbnail img,
  .single-post img.wp-post-image {
    aspect-ratio: 3 / 2;
    max-height: 600px;
    object-fit: cover;
    border-radius: 0;
  }
  /* Angles droits sur tous les blocs rectangulaires en écran large */
  .single-post .entry-content .nls-box,
  .single-post .entry-content .nls-box--tip,
  .single-post .entry-content .nls-box--warn,
  .single-post .entry-content .nls-box--info,
  .single-post .entry-content .nls-saviez,
  .single-post .entry-content .nls-facts,
  .single-post .entry-content .nls-cta,
  .single-post .entry-content .nls-cta a.nls-btn,
  .single-post .entry-content table {
    border-radius: 0;
  }
}

/* ============================================================================
   RESPONSIVE — distinction smartphone / écran large
   • PC & laptop (par défaut, ci-dessus) : images CONTENUES (max-height 500px /
     440px) → meilleure composition sur écran large, les portraits n'écrasent pas.
   • Smartphone (≤ 600px, écran étroit & vertical) : les images verticales se
     lisent très bien → on les laisse occuper toute la largeur, hauteur naturelle.
   ============================================================================ */
@media (max-width: 600px) {
  .single-post .entry-content { font-size: 1.04rem; }
  .single-post .entry-content h2 { font-size: 1.95rem; }
  .single-post .entry-content h3 { font-size: 1.45rem; }
  .single-post .entry-content .nls-lead { font-size: 1.16rem; }

  /* On lève le plafond de hauteur : l'image prend toute la largeur de la colonne
     et sa hauteur naturelle — idéal pour les photos verticales sur smartphone. */
  .single-post .entry-content figure img,
  .single-post .entry-content .nls-figure img {
    max-height: none;
    width: 100%;
  }
  /* Image à la une : bannière un peu plus généreuse sur mobile. */
  .single-post .entry-thumb img,
  .single-post img.wp-post-image { max-height: 62vh; }
}
