/* =========================================================
   M4P – ajustements propres à WordPress / Blocksy
   (la maquette elle-même est dans m4p.css, gardée telle quelle)
   ========================================================= */

/* Palette Blocksy alignée sur la maquette : tout ce que Blocksy dessine
   encore (formulaires, éditeur, pages d'archive…) reprend les mêmes couleurs. */
:root {
  --theme-palette-color-1: #e5b700;
  --theme-palette-color-2: #84640b;
  --theme-palette-color-3: #2b261c;
  --theme-palette-color-4: #1c1810;
  --theme-palette-color-5: #e4d9c4;
  --theme-palette-color-6: #f2e9d8;
  --theme-palette-color-7: #fbf6ed;
  --theme-palette-color-8: #ffffff;
  --theme-text-color: var(--text);
  --theme-headings-color: inherit;
  --theme-heading-color: inherit;
  --theme-link-initial-color: inherit;
  --theme-link-hover-color: inherit;
  --theme-border-color: var(--line);
  --theme-font-family: var(--body);
  --theme-content-spacing: 0;
}

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}
h1, h2, h3, h4, h5, h6 { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; }
.site-footer h2, .audience h3, .info-list h3, .toc h2 { font-family: var(--body); }
/* Blocksy retire le soulignement des liens ; la maquette garde celui du navigateur
   (spécificité minimale : toutes les règles de la maquette restent prioritaires) */
:where(body) a { color: inherit; text-decoration: underline; }
:where(body) a:hover { color: inherit; }


/* Blocksy dessine une bordure à gauche des citations : la maquette n'en a pas */
.quote blockquote, .pullquote { border: 0; padding-inline: 0; }
.quote blockquote p, .pullquote p { font-family: var(--display); }
.pullquote { padding-block: 32px; border-block: 1px solid var(--line); }

/* Le contenu des pages M4P occupe toute la largeur */
.m4p-full #main-container > main,
.m4p-full #main { display: block; padding: 0; }

/* En-tête collant sous la barre d'administration */
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

/* Le menu WordPress est rendu en liens à plat : rien à ajouter.
   Les listes du pied de page viennent de wp_nav_menu */
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-bottom ul li { margin: 0; }

/* Champs du formulaire : Blocksy stylise les input, on reprend la maquette */
.field input, .field select, .field textarea {
  height: auto; min-height: 0; box-shadow: none;
  font-family: var(--body); font-size: 1rem; line-height: inherit;
  appearance: auto; -webkit-appearance: auto;
  background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .75em .9em;
}
.field textarea { min-height: 150px; }

/* Formulaire de contact branché (inc/contact-form.php) */
.m4p-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field [aria-invalid="true"] { border-color: var(--clay); }
.field-error { margin: 0; font-size: .85rem; font-weight: 600; color: var(--clay); }
.form-status.is-ok { background: #e6f0d8; color: #2f4a12; }
.form-status.is-error { background: #fbe4d8; color: #7a2f10; }
.form-foot .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.form-foot .btn { height: auto; min-height: 0; }
.filters button { min-height: 0; height: auto; }

/* Images insérées par WordPress (srcset / lazy) gardent les règles de la maquette */
.hero-media img, .page-hero-media img, .split-media img, .approach-media img, .mosaic img { max-width: none; }
@media (max-width: 900px) {
  .hero-media img, .page-hero-media img, .split-media img, .approach-media img { max-width: 100%; }
}
