/*
Theme Name: Baptista Verdier
Description: Site one-page de Baptista Verdier, grossiste en viande de porc. Thème sur mesure réalisé d'après la maquette Figma.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: baptista-verdier
*/

:root {
  --rouge: #a23d36;
  --rouge-fonce: #5e1c19;
  --encre: #2a1d1a;
  --gris: #6e5f57;
  --creme: #f2e8d8;
  --sable: #e6d6bd;
  --blanc: #fffbf4;
  --rose: #ebc2b4;
  --trait: #d9c7ad;
  --titre: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --texte: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --marge: 96px;
  --section: 104px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; overflow-wrap: break-word; }
a { color: inherit; }
[id] { scroll-margin-top: 96px; }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }
.sombre :focus-visible { outline-color: var(--rose); }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.conteneur {
  width: 100%;
  max-width: calc(1248px + 2 * var(--marge));
  margin: 0 auto;
  padding-left: var(--marge);
  padding-right: var(--marge);
}
.section { padding: var(--section) 0; }
.fond-creme { background: var(--creme); }
.fond-sable { background: var(--sable); }
.sombre { background: var(--rouge-fonce); }

/* Typographie */
.surtitre {
  font-weight: 600; font-size: 13px; line-height: 1.4;
  letter-spacing: 1.3px; text-transform: uppercase; color: var(--rouge);
}
.sombre .surtitre { color: var(--rose); }
.h1, .h2 { font-family: var(--titre); font-weight: 800; text-transform: uppercase; color: var(--encre); }
.h1 { font-size: 60px; line-height: 1.04; }
.h2 { font-size: 40px; line-height: 1.1; }
.h3 { font-family: var(--titre); font-weight: 700; font-size: 24px; line-height: 1.25; color: var(--encre); }
.sombre .h2, .sombre .h3 { color: var(--creme); }
.chapo { font-size: 20px; line-height: 1.5; color: var(--gris); }
.corps { color: var(--gris); }
.entete { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 56px; }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px; border-radius: 6px; border: 0;
  font-family: var(--texte); font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.bouton-primaire { background: var(--rouge); color: var(--blanc); }
.bouton-primaire:hover { background: var(--rouge-fonce); }
.bouton-secondaire { padding: 14.5px 26.5px; border: 1.5px solid var(--encre); color: var(--encre); background: transparent; }
.bouton-secondaire:hover { background: var(--encre); color: var(--creme); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: var(--creme); }
.nav .conteneur { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.marque { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.marque img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.marque-nom {
  font-family: var(--titre); font-weight: 800; font-size: 20px; line-height: 1.2;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--rouge); white-space: nowrap;
}
.nav-liens { display: flex; align-items: center; gap: 36px; }
.nav-liens a:not(.bouton) { font-weight: 500; font-size: 15px; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.nav-liens a:not(.bouton):hover { color: var(--rouge); }
.nav-menu { display: none; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--encre); cursor: pointer; }
.nav-menu svg { display: block; width: 28px; height: 28px; }

/* Accueil */
.accueil { padding: 72px 0 112px; }
.accueil .conteneur { display: flex; align-items: center; gap: 64px; }
.accueil-texte { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.accueil-actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }
.accueil-logo { flex: 0 1 480px; min-width: 0; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }

/* Bandeau clients */
.bandeau { background: var(--rouge); color: var(--creme); }
.bandeau ul {
  list-style: none; margin: 0; padding-top: 26px; padding-bottom: 26px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  font-family: var(--titre); font-weight: 800; font-size: 20px; line-height: 1.2;
  letter-spacing: 0.8px; text-transform: uppercase; white-space: nowrap;
}

/* La maison */
.maison .conteneur { display: flex; align-items: center; gap: 72px; }
.maison-photo { flex: 0 1 560px; min-width: 0; height: 520px; border-radius: 8px; object-fit: cover; }
.maison-texte { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }

/* Produits */
.cartes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.carte { display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; }
.carte img { width: 100%; height: 220px; object-fit: cover; }
.carte-contenu { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 24px 28px; }
.carte-lien { font-weight: 600; line-height: 1.2; color: var(--rouge); text-decoration: none; }
.carte-lien:hover { text-decoration: underline; }

/* Engagements */
.engagements { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.engagement { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; border-top: 1px solid var(--rose); }
.engagement-numero { font-family: var(--titre); font-weight: 800; font-size: 36px; line-height: 1; color: var(--rose); }
.engagement p:last-child { color: var(--sable); }

/* Commander */
.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; list-style: none; margin: 0; padding: 0; }
.etape { display: flex; flex-direction: column; gap: 16px; }
.pastille {
  display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--rouge); color: var(--blanc);
  font-family: var(--titre); font-weight: 700; font-size: 24px; line-height: 1.25;
}

/* Contact */
.contact .conteneur { display: flex; align-items: flex-start; gap: 72px; }
.coordonnees { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.coordonnees .entete { max-width: 540px; margin-bottom: 0; }
.coordonnee { display: flex; flex-direction: column; gap: 4px; }
.coordonnee-valeur { font-size: 20px; line-height: 1.5; color: var(--encre); }
.coordonnee-valeur a { text-decoration: none; }
.coordonnee-valeur a:hover { color: var(--rouge); }
.formulaire {
  flex: 0 1 560px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  padding: 40px; border-radius: 8px; background: var(--blanc);
}
.ligne { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; }
.champ { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.champ label { font-weight: 500; font-size: 15px; line-height: 1.4; }
.champ input, .champ textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--trait); border-radius: 6px;
  background: var(--blanc); color: var(--encre);
  font-family: var(--texte); font-size: 16px; line-height: 1.6; font-variation-settings: inherit;
}
.champ input { height: 54px; }
.champ textarea { height: 140px; resize: vertical; }
.champ ::placeholder { color: var(--gris); opacity: 1; }
.champ input:focus, .champ textarea:focus { outline: 2px solid var(--rouge); outline-offset: 1px; }
.piege { position: absolute; left: -9999px; }
.message { width: 100%; padding: 14px 16px; border-radius: 6px; font-weight: 500; }
.message-ok { background: #e3ecd9; color: #2f4a1e; }
.message-erreur { background: #f6dcd6; color: var(--rouge-fonce); }

/* Pied de page */
.pied { background: var(--rouge-fonce); color: var(--rose); font-size: 14px; line-height: 1.5; }
.pied .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; padding-top: 40px; padding-bottom: 40px; }
.pied-marque { display: flex; align-items: center; gap: 16px; }
.pied-marque img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.pied-marque > div { display: flex; flex-direction: column; gap: 4px; }
.pied .marque-nom { color: var(--creme); }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; }

/* Pages simples (mentions légales, etc.) */
.page-simple { max-width: 760px; }
.page-simple .h2 { margin-bottom: 32px; }
.page-simple .contenu > * + * { margin-top: 1em; }
.page-simple .contenu h2, .page-simple .contenu h3 { font-family: var(--titre); line-height: 1.25; margin-top: 1.6em; }
.page-simple .contenu a { color: var(--rouge); }

/* Tablette */
@media (max-width: 1180px) {
  :root { --marge: 40px; --section: 80px; }
  .h1 { font-size: 48px; }
  .h2 { font-size: 34px; }
  .nav-liens { gap: 24px; }
  .accueil .conteneur, .maison .conteneur, .contact .conteneur { gap: 48px; }
  .accueil-logo { flex-basis: 380px; }
  .maison-photo { flex-basis: 420px; }
  .formulaire { flex-basis: 480px; padding: 32px; }
  .engagements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cartes { gap: 24px; }
  .etapes { gap: 32px; }
}

/* Mobile */
@media (max-width: 860px) {
  :root { --marge: 20px; --section: 56px; }
  [id] { scroll-margin-top: 72px; }
  .h1 { font-size: 34px; line-height: 1.06; }
  .h2 { font-size: 26px; line-height: 1.12; }
  .entete { gap: 12px; margin-bottom: 32px; }
  .bouton { white-space: normal; text-align: center; }

  .nav .conteneur { padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .marque { gap: 10px; }
  .marque img { width: 44px; height: 44px; }
  .nav .marque-nom { font-size: 16px; letter-spacing: 0.64px; }
  .nav-menu { display: block; }
  .nav-liens { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 0 8px; }
  .nav-liens.ouvert { display: flex; }
  .nav-liens a:not(.bouton) { padding: 12px 0; font-size: 16px; border-top: 1px solid var(--trait); }
  .nav-liens .bouton { margin-top: 12px; }

  .accueil { padding: 24px 0 48px; }
  .accueil .conteneur { flex-direction: column-reverse; align-items: stretch; gap: 20px; }
  .accueil-texte { flex: none; gap: 16px; }
  .accueil-logo { flex: none; width: 240px; height: 240px; align-self: center; }
  .chapo { font-size: 16px; line-height: 1.6; }
  .accueil-actions { flex-direction: column; gap: 12px; padding-top: 4px; width: 100%; }

  .bandeau ul { padding-top: 20px; padding-bottom: 20px; justify-content: center; gap: 10px 16px; font-family: var(--texte); font-weight: 600; font-size: 13px; line-height: 1.4; letter-spacing: 1.3px; }

  .maison .conteneur { flex-direction: column; align-items: stretch; gap: 24px; }
  .maison-photo { flex: none; width: 100%; height: 280px; }
  .maison-texte { flex: none; align-items: stretch; }

  .cartes { grid-template-columns: 1fr; gap: 20px; }
  .engagements { grid-template-columns: 1fr; gap: 28px; }
  .etapes { grid-template-columns: 1fr; gap: 32px; }

  .contact .conteneur { flex-direction: column; align-items: stretch; gap: 32px; }
  .coordonnees { flex: none; gap: 20px; }
  .coordonnees .entete { margin-bottom: 12px; }
  .coordonnee-valeur { font-size: 16px; line-height: 1.6; }
  .formulaire { flex: none; align-items: stretch; gap: 16px; padding: 24px 20px; }
  .ligne { grid-template-columns: 1fr; }

  .pied .conteneur { flex-direction: column; align-items: flex-start; padding-top: 32px; padding-bottom: 32px; }
  .pied-marque { flex-wrap: wrap; gap: 12px; }
  .pied-marque img { width: 56px; height: 56px; }
  .pied .marque-nom { font-size: 16px; letter-spacing: 0.64px; }
  .pied-marque > div { display: contents; }
  .pied-marque p { flex-basis: 100%; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
}
