/*
Theme Name: Midori ASBL
Theme URI: https://midoriasbl.be
Author: Midori ASBL
Description: Thème sur mesure de Midori ASBL : fond vert forêt, cartes menthe, hexagones et mascotte Kawa.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: midori
*/

:root {
  --bg: #0a3a29;
  --bg-deep: #072c1f;
  --green: #1ece8b;
  --mint: #48e9ab;
  --ink: #0a3a29;
  --text: #d9fbea;
  --font-title: "Permanent Marker", "Rubik", system-ui, sans-serif;
  --font-body: "Patrick Hand SC", "Trebuchet MS", sans-serif;
  --font-ui: "Rubik", system-ui, sans-serif;
  --hex: polygon(26% 0, 74% 0, 78% 2%, 98% 46%, 98% 54%, 78% 98%, 74% 100%, 26% 100%, 22% 98%, 2% 54%, 2% 46%, 22% 2%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.2rem; line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--mint); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- En-tête ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); position: relative; }
.site-header__brand { font-family: var(--font-title); font-size: 1.6rem; color: var(--green); text-decoration: none; }
.site-header__brand img { max-height: 3.2rem; width: auto; display: block; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.nav a { font-family: var(--font-ui); font-weight: 500; font-size: 1rem; color: var(--text); text-decoration: none; }
.nav a:hover, .nav .current-menu-item > a { color: var(--green); }
.nav-toggle { display: none; background: none; border: 2px solid var(--green); color: var(--green); border-radius: 999px; padding: .4rem 1rem; font-family: var(--font-ui); font-size: .95rem; cursor: pointer; }
@media (max-width: 48rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; right: 1rem; top: 100%; background: var(--bg-deep); padding: 1rem 1.4rem; border-radius: .6rem; z-index: 20; }
  .site-nav.is-open { display: block; }
  .nav { flex-direction: column; gap: .9rem; }
}

/* ---------- Éléments communs ---------- */
.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.section-title, .page-title { font-family: var(--font-title); font-weight: 400; color: var(--green); font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.05; margin: 0 0 1.5rem; }
.btn { display: inline-block; background: var(--green); color: var(--ink); font-family: var(--font-title); font-size: 1.25rem; text-decoration: none; padding: .85rem 2.4rem; border-radius: 999px; }
.btn:hover { background: var(--mint); }
.hex { display: block; clip-path: var(--hex); aspect-ratio: 1.12 / 1; background: linear-gradient(135deg, #1aa670, #0d5c3f); overflow: hidden; }
.hex img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: center; min-height: 62vh; padding-block: 2rem; }
.hero__text { text-align: center; }
.hero__title { font-family: var(--font-title); font-weight: 400; color: var(--green); font-size: clamp(3.4rem, 9vw, 7rem); line-height: .95; margin: 0 0 1.8rem; }
.hero__art img { display: block; margin-inline: auto; max-height: 28rem; width: auto; }
@media (max-width: 48rem) { .hero { grid-template-columns: 1fr; min-height: 0; } }

.aspects { padding-block: 3rem 5rem; }
.aspects__list { list-style: none; margin: 3rem 0 0; padding: 0; display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 2.5rem; }
.aspects__list li { width: min(100%, 17rem); }
.aspects__list li:nth-child(2) { margin-top: -3.5rem; }
.aspect { position: relative; display: block; text-decoration: none; }
.aspect .hex { filter: none; }
.aspect__label { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-title); color: var(--green); font-size: clamp(1.6rem, 3.4vw, 2.4rem); transform: rotate(-6deg); text-shadow: 0 2px 10px rgba(0, 0, 0, .75); }
.aspect:hover .hex { outline: none; box-shadow: none; }
.aspect:hover .aspect__label { color: var(--mint); }
@media (max-width: 48rem) { .aspects__list li:nth-child(2) { margin-top: 0; } }

/* ---------- Cartes (pages univers) ---------- */
.univers { padding-block: 2rem 5rem; }
.cards { list-style: none; margin: 5.5rem auto 0; padding: 0; max-width: 64rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2.5rem 2rem; }
.card { position: relative; display: block; height: 100%; background: var(--green); color: var(--ink); border-radius: .7rem; padding: 10rem 1.4rem 1.7rem; text-decoration: none; box-shadow: 0 22px 28px -20px rgba(0, 0, 0, .8); transition: opacity .2s; }
.card .hex { position: absolute; top: -4.5rem; left: 50%; transform: translateX(-50%); width: min(85%, 15rem); }
.card__title { font-family: var(--font-title); font-size: 1.6rem; line-height: 1.1; margin: 0 0 .4rem; }
.card__text { margin: 0; }
@media (hover: hover) {
  .cards:hover .card:not(:hover), .cards:focus-within .card:not(:focus-within) { opacity: .45; }
}

/* ---------- Pages de contenu ---------- */
.page { padding-block: 2rem 5rem; }
.page-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
.page-layout--solo { grid-template-columns: minmax(0, 1fr); max-width: 50rem; margin-inline: auto; }
.page-art img { display: block; max-height: 26rem; width: auto; margin-inline: auto; }
@media (max-width: 52rem) { .page-layout { grid-template-columns: 1fr; } }

.page-body > * { margin-top: 0; }
.page-body .wp-block-group.is-style-midori-card {
  background: var(--mint); color: var(--ink); border-radius: .6rem;
  padding: 1.4rem 1.7rem; margin-bottom: 1.8rem; box-shadow: 0 22px 28px -20px rgba(0, 0, 0, .8);
}
.page-body .is-style-midori-card :is(h2, h3, h4) { font-family: var(--font-title); font-weight: 400; font-size: 1.6rem; color: var(--ink); margin: 0 0 .5rem; }
.page-body .is-style-midori-card p { margin: 0 0 .8rem; }
.page-body .is-style-midori-card p:last-child { margin-bottom: 0; }
.page-body .is-style-midori-card a { color: var(--ink); }

/* ---------- Pied de page ---------- */
.site-footer { text-align: center; padding: 4rem 1rem 6rem; }
.site-footer__title { font-family: var(--font-title); font-weight: 400; color: var(--green); font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 0 0 3rem; }
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; max-width: 62rem; margin: 0 auto 2.5rem; }
.contacts h3 { font-family: var(--font-ui); font-weight: 700; color: var(--green); font-size: 1.25rem; line-height: 1.25; margin: 0 0 .5rem; }
.contacts a { font-family: var(--font-ui); font-weight: 500; color: var(--green); text-decoration: none; }
.contacts a:hover { text-decoration: underline; }
.socials { display: flex; justify-content: center; gap: .9rem; margin-bottom: 1.6rem; }
.socials a { color: var(--green); display: inline-flex; }
.socials svg { width: 2.2rem; height: 2.2rem; }
.to-top { position: fixed; right: 1.5rem; bottom: 1.5rem; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--mint); color: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 16px rgba(0, 0, 0, .4); z-index: 30; }
.to-top:hover { background: var(--green); }
.to-top svg { width: 1.6rem; height: 1.6rem; }
