/*
Theme Name: Jalon Mesure
Template: generatepress
Version: 1.0.0
Description: Habillage editorial sobre pour un blog d'analyse professionnelle.
*/

/* --- Design tokens (ocean-deep / compact / rounded / medium shadow) --- */
:root {
  --jm-primary: #1A56DB;
  --jm-primary-dark: #163FA8;
  --jm-accent: #3B82F6;
  --jm-accent-warm: #E8EEF8;
  --jm-surface: #EFF6FF;
  --jm-text: #1F2937;
  --jm-text-2: #6B7280;
  --jm-border: #E5E7EB;
  --jm-radius: 16px;
  --jm-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --jm-section-gap: 2rem;
  --jm-block-gap: 1rem;
}

body { font-weight: 400; }

/* --- Front-page H1 (tagline). Visible, distinct from blogname. Gate: h1-visible.cjs --- */
.jm-home-h1 {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--jm-section-gap) var(--jm-block-gap) 0.75rem;
  font-size: 1.45rem;
  line-height: 1.35;
  color: var(--jm-text);
  font-weight: 400;
}

@media (max-width: 768px) {
  .jm-home-h1 { font-size: 1.2rem; }
}

/* --- Featured post hero (brief §10: homepage hero = featured-post) --- */
.jm-hero {
  max-width: 1000px;
  margin: 0 auto var(--jm-section-gap);
  padding: 0 var(--jm-block-gap);
}

.jm-hero-inner {
  background: var(--jm-surface);
  border: 1px solid var(--jm-border);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 5fr 6fr;
  align-items: stretch;
}

.jm-hero-media { margin: 0; }

.jm-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.jm-hero-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.jm-hero-kicker {
  display: inline-block;
  align-self: flex-start;
  background: var(--jm-primary);
  color: #FFFFFF;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.jm-hero-title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 0.7rem;
}

.jm-hero-title a { color: var(--jm-text); text-decoration: none; }
.jm-hero-title a:hover { color: var(--jm-primary); }

.jm-hero-excerpt {
  color: #4B5563;
  line-height: 1.65;
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
}

.jm-hero-meta {
  font-size: 0.82rem;
  color: #4B5563;
  margin: 0 0 1.1rem;
}

.jm-hero-link {
  align-self: flex-start;
  background: var(--jm-primary);
  color: #FFFFFF;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}

.jm-hero-link:hover { background: var(--jm-primary-dark); color: #FFFFFF; }

@media (max-width: 768px) {
  .jm-hero-inner { grid-template-columns: 1fr; }
  .jm-hero-media img { min-height: 190px; }
  .jm-hero-body { padding: 1.25rem; }
  .jm-hero-title { font-size: 1.3rem; }
}

/* --- Section heading above the recent-post loop (brief §10) --- */
.jm-section-heading {
  max-width: 1000px;
  margin: 0 auto var(--jm-block-gap);
  padding: 0 var(--jm-block-gap);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--jm-text);
}

.jm-section-heading span {
  display: inline-block;
  border-bottom: 3px solid var(--jm-primary);
  padding-bottom: 0.3rem;
}

/* --- Cards / archive entries --- */
.separate-containers .site-main > .post,
.separate-containers .site-main > .page {
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  border: 1px solid var(--jm-border);
}

.post-image img, .page-header-image img {
  border-radius: calc(var(--jm-radius) - 4px);
}

/* --- Forms (Contact Form 7) --- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  border: 1px solid var(--jm-border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  background: #FFFFFF;
  color: var(--jm-text);
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
  border-color: var(--jm-primary);
  outline: none;
}

.wpcf7 label { display: block; margin-bottom: var(--jm-block-gap); font-size: 0.95rem; }

.wpcf7 input[type="submit"] {
  background: var(--jm-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.wpcf7 input[type="submit"]:hover { background: var(--jm-primary-dark); }

.search-field {
  border: 1px solid var(--jm-border);
  background: var(--jm-surface);
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
}

.search-field:focus { border-color: var(--jm-primary); outline: none; }

/* --- About page: avatar-left layout (brief §10) --- */
.jm-about-bio {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.75rem;
  align-items: start;
  margin: var(--jm-section-gap) 0;
}

.jm-about-bio img {
  width: 100%;
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  display: block;
}

@media (max-width: 600px) {
  .jm-about-bio { grid-template-columns: 1fr; }
  .jm-about-bio img { max-width: 200px; }
}

/* --- Author card at the foot of every post (brief §9 E-E-A-T) --- */
.jm-author-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--jm-block-gap);
  align-items: center;
  margin-top: var(--jm-section-gap);
  padding: 1.15rem;
  background: var(--jm-surface);
  border: 1px solid var(--jm-border);
  border-radius: var(--jm-radius);
}

.jm-author-card img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: block; }
.jm-author-card .jm-author-name { font-weight: 700; margin: 0 0 0.15rem; }
.jm-author-card .jm-author-name a { color: var(--jm-text); text-decoration: none; }
.jm-author-card .jm-author-name a:hover { color: var(--jm-primary); }
.jm-author-card .jm-author-role { font-size: 0.85rem; color: var(--jm-text-2); margin: 0 0 0.35rem; }
.jm-author-card .jm-author-bio { font-size: 0.9rem; color: var(--jm-text-2); margin: 0; line-height: 1.55; }

/* --- Byline avatar thumb --- */
.jm-byline-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* --- Footer: single-line-dark, no headings --- */
.site-info { font-size: 0.88rem; }
.site-info .copyright-bar { letter-spacing: 0.01em; }

/* --- Legal / methodology note blocks --- */
.jm-note {
  background: var(--jm-accent-warm);
  border-left: 4px solid var(--jm-primary);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.1rem;
  margin: var(--jm-section-gap) 0;
  font-size: 0.92rem;
  color: var(--jm-text);
}

.site-info .copyright-bar { line-height: 1.9; }
.site-info .copyright-bar a { color: #FFFFFF; text-decoration: none; }
.site-info .copyright-bar a:hover { color: #93C5FD; text-decoration: underline; }
.jm-footer-sep { opacity: 0.45; margin: 0 0.15rem; }

/* --- Mobile-scoped pseudo-element tagline (gate: mobile-tagline.cjs, M2-1) ---
   Sits left of the hamburger inside the nav bar. Text is the first clause of the
   brief tagline; the full tagline is the front-page H1. Colour #4B5563 gives
   6.94:1 on white — 11px text needs >= 4.5:1. */
@media (max-width: 1024px) {
  #mobile-header .inside-navigation,
  #site-navigation .inside-navigation { position: relative; }
  #mobile-header .inside-navigation::before,
  #site-navigation .inside-navigation::before {
    content: "L’entreprise vue de l’intérieur";
    font-style: italic;
    position: absolute;
    /* Anchored between the logo (ends ~123px) and the toggle cluster
       search item (starts 232px at 390w) so it never overlaps either.
       Measured band at 390w: logo 10-123, search 232-287, toggle 287-390. */
    left: 131px;
    right: 166px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #4B5563;
    line-height: 1.2;
    white-space: normal;
    pointer-events: none;
  }
}

/* --- /a-propos/ avatar-left bio (brief §10 "About structure: avatar-left").
   wpautop injects a stray <p> between the portrait and the text wrapper, which
   breaks a 2-column grid (the text lands back in column 1). A floated portrait
   inside a flow-root is immune to stray inline children. */
.jm-about-bio {
  display: flow-root;
  grid-template-columns: none;
  gap: 0;
}

.jm-about-bio > p:empty { display: none; }

.jm-about-bio img {
  float: left;
  width: 200px;
  margin: 0.25rem 1.75rem 1rem 0;
}

@media (max-width: 600px) {
  .jm-about-bio img { float: none; margin: 0 0 1.25rem; }
}

/* --- Nav search: GP ships only the has-inline-mobile-toggle variant of the
   hide/reveal CSS in main.min.css, so the form renders as a permanently visible
   empty box. Documented GP gap → child theme CSS. GP's menu.min.js toggles
   .nav-search-active on click of the search item. */
.main-navigation { position: relative; }

.main-navigation .navigation-search {
  position: absolute;
  left: -99999px;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease-in-out;
}

.main-navigation .navigation-search.nav-search-active {
  left: 0;
  opacity: 1;
  z-index: 20;
  pointer-events: auto;
}

.main-navigation .navigation-search input[type="search"] {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: var(--jm-surface);
  color: var(--jm-text);
}
