/*
Theme Name: Grille Neutre
Template: generatepress
Version: 1.0.0
Description: Custom child theme
*/

/* Palette — berry-vivid */
:root {
  --ip-primary: #7C3AED;
  --ip-secondary: #A78BFA;
  --ip-accent: #8B5CF6;
  --ip-accent-warm: #F0ECF8;
  --ip-surface: #F5F3FF;
  --ip-background: #FFFFFF;
  --ip-text: #1E1B4B;
  --ip-text-secondary: #6B7280;
  --ip-border: #E9E5F5;
}

/* Body font — Inter (self-hosted, see assets/fonts/fonts.css) */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  color: var(--ip-text);
  background-color: var(--ip-background);
}

/* Heading font — Inter Bold */
h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.widget-title,
.page-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  color: var(--ip-text);
}

a {
  color: var(--ip-primary);
}
a:hover {
  color: var(--ip-secondary);
}

/* ------------------------------------------------------------------ */
/* Front-page H1 — deliberate exception: literal site name, not tagline
   (precedent: cmsimple-xh.fr, session 2026-07-01). See functions.php
   for the generate_before_header injection.) */
/* ------------------------------------------------------------------ */
.site-tagline-heading {
  display: block;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 1.7rem;
  color: var(--ip-text);
  margin: 0.5rem 0 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Body signature sig-A, sidebar overridden LEFT per brief §10 —
   separate content boxes (sep-containers), nav-below-header.
   Sidebar position itself is a GP option (see NOTES.md); this CSS
   only covers the visual "boxed" treatment GP doesn't give for free. */
/* ------------------------------------------------------------------ */
.inside-article,
.paging-navigation,
#secondary .widget {
  border: 1px solid var(--ip-border);
  background-color: var(--ip-background);
  border-radius: 6px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

#secondary .widget-title {
  font-size: 1rem;
  color: var(--ip-text);
  border-bottom: 2px solid var(--ip-accent);
  padding-bottom: 0.4rem;
  margin-bottom: 0.85rem;
}

/* Left sidebar spacing tweak — keep content box and sidebar box visually paired */
.left-sidebar #primary,
.left-sidebar #secondary {
  padding-top: 0;
}

/* ------------------------------------------------------------------ */
/* Homepage hero — featured-cover composition ("À découvrir" section
   below). Markup rendered via [inono_homepage] shortcode in functions.php,
   never hardcoded <img>/URLs. */
/* ------------------------------------------------------------------ */
.ip-hero-post {
  border: 1px solid var(--ip-border);
  background-color: var(--ip-surface);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2.5rem;
}
.ip-hero-post img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  display: block;
}
.ip-hero-post h2 {
  margin-top: 0;
  font-size: 1.75rem;
}
.ip-hero-post p {
  /* Darker than --ip-text-secondary (#6B7280 gives 4.41:1 on this card's
     --ip-surface bg, below WCAG AA 4.5:1). #666D7A on #F5F3FF = 4.75:1. */
  color: #666D7A;
}
.ip-hero-post .ip-read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--ip-primary);
}

.ip-section-heading {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--ip-accent);
  padding-bottom: 0.4rem;
}

.ip-post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 600px) {
  .ip-post-grid { grid-template-columns: 1fr; }
}
.ip-post-card {
  border: 1px solid var(--ip-border);
  border-radius: 6px;
  padding: 1rem;
  background-color: var(--ip-background);
}
.ip-post-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: 0.75rem;
}
.ip-post-card strong {
  color: var(--ip-text);
}
.ip-post-card p {
  color: var(--ip-text-secondary);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------ */
/* Header type D — split nav, logo centered. GP Menu Plus renders the
   two nav groups; this CSS enforces the flanking layout + centered
   branding column GP doesn't provide out of the box. */
/* ------------------------------------------------------------------ */
.inside-header.grid-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.inside-header .site-logo {
  grid-column: 2;
  justify-self: center;
}
.main-navigation .inside-navigation {
  max-width: 1200px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* Footer — 2-col-light: nav column + info column, light background */
/* ------------------------------------------------------------------ */
.site-footer,
.site-footer .footer-widgets {
  background-color: var(--ip-surface);
  color: var(--ip-text);
}
.site-footer .widget-title {
  color: var(--ip-text);
  font-size: 1rem;
  border-bottom: 1px solid var(--ip-border);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}
.site-footer a {
  color: var(--ip-primary);
}
.site-footer a:hover {
  color: var(--ip-secondary);
}
.copyright-bar {
  background-color: var(--ip-surface);
  color: var(--ip-text-secondary);
  border-top: 1px solid var(--ip-border);
}

/* Submit-button palette rule (mandatory — contact-form-render.cjs gate) */
body button.wpforms-submit,
body .wpcf7-submit,
body .ff-btn-submit {
  background-color: var(--ip-primary) !important;
  color: #ffffff !important;
}
body button.wpforms-submit:hover,
body .wpcf7-submit:hover,
body .ff-btn-submit:hover {
  filter: brightness(0.88) !important;
}

/* Mobile header — logo + hamburger on one row, hamburger flush right.
   Signal de marque responsive */
@media (max-width: 767px) {
  .inside-navigation::before {
    content: "Retours d'expérience sur les systèmes, les outils et la stratégie digitale — depuis 35 ans en première ligne.";
    font-style: italic;
    position: absolute;
    left: var(--gap-small, 8px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--ip-text-secondary);
  }
  .inside-navigation { position: relative; }
}
#mobile-header .inside-navigation {
  flex-wrap: nowrap;
}
#mobile-header .site-logo.mobile-header-logo {
  flex: 1 1 auto;
  min-width: 0;
}
#mobile-header .site-logo.mobile-header-logo img {
  max-width: 160px;
  width: auto;
  height: auto;
}
#mobile-header button.menu-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Scroll-to-top — enabled per brief; light restyle to match palette */
#generate-back-to-top {
  background-color: var(--ip-primary) !important;
  border-radius: 4px;
}

/* Search submit button — GP's form_button_background_color option is set
   to a generic grey (#666666); body-scoping is required to reach the
   search-form markup on templates like 404 that render it outside
   .widget_search context. */
body .search-form .search-submit {
  background-color: var(--ip-primary);
  color: #fff;
}
body .search-form .search-submit:hover {
  background-color: var(--ip-secondary);
}

/* Homepage topical intro — links to the site's 5 category archives
   directly under the H1, establishing topical clusters for crawlers. */
.ip-topic-intro {
  max-width: 46rem;
  margin: 0 auto 1.75rem;
  text-align: center;
  color: var(--ip-text-secondary);
}
.ip-topic-intro a {
  font-weight: 600;
}
