/**
 * Charte Moutonsalam.
 *
 * Ne fait que remplacer les variables exposées par wy-blocs, déclarer les deux
 * polices et habiller les éléments propres au site (en-tête, séances).
 * Page claire, vert bouteille pour la confiance, ocre réservé aux dates.
 */

/* ---------------- polices, servies depuis ce serveur ---------------- */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------- couleurs ---------------- */

:root {
  --ms-vert:        #1C5A3E;
  --ms-vert-fonce:  #123E2A;
  --ms-vert-teinte: #E5EFE6;
  --ms-ocre:        #B57A0A;
  --ms-ocre-teinte: #FBF0D6;
  --ms-alerte:      #FFF6DD;

  --wy-nuit:       #123E2A;
  --wy-nuit-clair: #1A4F37;
  --wy-vert:       var(--ms-vert);
  --wy-vert-vif:   #237050;
  --wy-papier:     #FFFFFF;
  --wy-teinte:     #EEF3EC;
  --wy-trait:      #D9E2D3;
  --wy-encre:      #15241B;
  --wy-sourd:      #4B5C51;
  --wy-clair:      #C9D8CC;
}

/* ---------------- typographie ---------------- */

body,
.wp-site-blocks,
.editor-styles-wrapper {
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--wy-encre);
  background: var(--wy-papier);
}

h1, h2, h3,
.wp-block-heading,
.wy-hero__titre,
.wp-block-post-title,
.wp-block-site-title {
  font-family: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.wy-hero__titre { font-weight: 800; letter-spacing: -0.03em; }

/* Les petits titres de cartes restent en Figtree : lisibles à cette taille. */
.wy-carte-info__titre,
.wy-etape__titre {
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.wy-surtitre { color: var(--ms-ocre); }

/* ---------------- en-tête ---------------- */

.ms-entete {
  background: var(--wy-papier);
  border-bottom: 1px solid var(--wy-trait);
  padding-block: 14px;
}
.ms-entete > .alignwide { gap: 12px 28px; flex-wrap: wrap; }
.ms-logo { margin: 0; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1; }
.ms-logo a { color: var(--ms-vert-fonce); text-decoration: none; }
.ms-logo span { color: var(--ms-ocre); }
.ms-menu { font-weight: 500; font-size: 0.98rem; }
.ms-menu a { text-decoration: none; }
.ms-menu a:hover { color: var(--ms-vert); }
.ms-actions { gap: 10px; }
.ms-bouton-entete .wp-block-button__link { padding: 0.55em 1.1em; font-size: 0.95rem; }

/* ---------------- pied de page ---------------- */

.ms-pied {
  background: var(--wy-teinte);
  border-top: 1px solid var(--wy-trait);
  padding-block: 40px 28px;
  font-size: 0.95rem;
  color: var(--wy-sourd);
}
.ms-pied a { color: var(--wy-encre); }
.ms-pied .ms-logo { font-size: 1.35rem; margin-bottom: 6px; }
.ms-pied__liens { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
.ms-pied__bas { margin-top: 24px; font-size: 0.85rem; }

/* ---------------- éléments à compléter ---------------- */

/* Tout ce qui attend une information réelle est surligné, pour qu'on le voie
   au premier coup d'œil et qu'aucun texte provisoire ne parte en ligne. */
.ms-a-completer {
  background: var(--ms-alerte);
  border-radius: 4px;
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------------- séances d'abattage ---------------- */

.ms-prochaine {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  background: var(--ms-ocre-teinte); border-radius: 12px; padding: 14px 20px;
  max-width: 100%; margin-inline: auto;
}
.ms-prochaine__libelle { font-size: 0.9rem; color: var(--wy-sourd); width: 100%; text-align: center; }
.ms-prochaine__date { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 1.35rem; font-weight: 700; color: var(--ms-ocre); }
.ms-prochaine__limite { font-size: 0.95rem; color: var(--wy-sourd); }
.ms-prochaine-wrap { text-align: center; margin-top: 8px; }

.ms-seances { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ms-seances li {
  background: var(--wy-papier); border: 1px solid var(--wy-trait); border-radius: 12px;
  padding: 16px 18px; display: grid; gap: 4px; min-width: 0;
}
.ms-seances__jour { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--ms-vert-fonce); }
.ms-seances__jour::first-letter, .ms-choix__jour::first-letter { text-transform: uppercase; }
.ms-seances__limite { font-size: 0.9rem; color: var(--wy-sourd); }
.ms-seances__etat { font-size: 0.85rem; font-weight: 600; color: var(--ms-ocre); }
.ms-seances li.est-fermee { opacity: 0.6; }
.ms-seances li.est-fermee .ms-seances__etat { color: var(--wy-sourd); }

/* Choix de la séance sur la fiche produit */
.ms-choix { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.ms-choix legend { font-weight: 700; color: var(--ms-vert-fonce); margin-bottom: 8px; padding: 0; }
.ms-choix__liste { display: grid; gap: 8px; }
.ms-choix__option { position: relative; }
.ms-choix__option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ms-choix__option label {
  display: block; border: 1.5px solid var(--wy-trait); border-radius: 10px; padding: 10px 14px;
  background: var(--wy-papier); line-height: 1.35; cursor: pointer;
}
.ms-choix__option label small { display: block; color: var(--wy-sourd); font-size: 0.85rem; margin-top: 2px; }
.ms-choix__option .ms-choix__places { float: right; font-size: 0.8rem; font-weight: 600; color: var(--ms-ocre); }
.ms-choix__option input:checked + label { border-color: var(--ms-vert); background: var(--ms-vert-teinte); }
.ms-choix__option input:focus-visible + label { outline: 3px solid var(--ms-ocre); outline-offset: 2px; }
.ms-choix__option input:disabled + label { opacity: 0.5; cursor: not-allowed; }
.ms-choix__vide { background: var(--wy-teinte); border-radius: 10px; padding: 12px 14px; }

/* Fiche produit sans image : la colonne de texte prend la place. */
.ms-fiche .wy-fiche__accroche { color: var(--wy-sourd); }
.ms-prix-a-venir { font-weight: 600; color: var(--ms-vert); }

@media (prefers-reduced-motion: no-preference) {
  .ms-choix__option label { transition: background-color .15s, border-color .15s; }
}

/* ---------------- corrections après relecture des captures ---------------- */

/* Boutons : vert bouteille partout (le thème les sortait en noir). */
.wp-block-button__link.wp-element-button,
.wp-element-button,
.woocommerce .button,
.wc-block-components-button:not(.is-link) {
  background-color: var(--ms-vert);
  color: #fff;
  border-color: var(--ms-vert);
}
.wp-block-button__link.wp-element-button:hover,
.wp-element-button:hover { background-color: var(--ms-vert-fonce); color: #fff; }
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--ms-vert-fonce);
  border: 1.5px solid var(--ms-vert);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--ms-vert); color: #fff; }

/* Halo de l'ouverture : vert et ocre, sans le bleu par défaut. */
.wy-hero::before {
  background:
    radial-gradient(46% 58% at 78% 8%, rgba(28, 90, 62, .22), transparent 62%),
    radial-gradient(40% 50% at 12% 96%, rgba(181, 122, 10, .14), transparent 60%);
}

/* Pas de bande blanche entre l'en-tête et la première section. */
main.wp-block-group { margin-block-start: 0; }
.ms-fiche { padding-block-start: clamp(1.5rem, 4vw, 2.5rem); }

/* La galerie WooCommerce attend un script pour s'afficher ; une seule image, pas besoin. */
.woocommerce-product-gallery { opacity: 1 !important; }
.woocommerce-product-gallery img { border-radius: var(--wy-rayon); }

/* Calendrier et liens alignés sur le bord gauche des titres de section. */
.ms-large { width: 100%; }
.ms-large > * + * { margin-block-start: 20px; }

/* Sur téléphone, le menu et le panier suffisent dans l'en-tête. */
@media (max-width: 600px) {
  .ms-bouton-entete { display: none; }
  .ms-entete > .alignwide { flex-wrap: nowrap; }
  .ms-actions { margin-inline-start: auto; }
}
