/*
Theme Name: Équipement Durable
Description: Thème sur mesure du site equipement-durable.fr
Version: 1.0.0
Requires PHP: 7.4
Text Domain: equipement-durable
*/

:root {
  --vert: #1F4D3A;
  --vert-2: #2F6B55;
  --sauge: #DCE7DA;
  --sable: #F6F2EA;
  --sable-2: #EDE6D8;
  --terre: #C8693B;
  --encre: #1D2521;
  --gris: #5C665F;
  --ligne: #E2DCCF;
  --blanc: #FFFFFF;
  --rayon: 18px;
  --ombre: 0 1px 2px rgba(29, 37, 33, .05), 0 8px 24px rgba(29, 37, 33, .06);
  --titre: "Fraunces", Georgia, "Times New Roman", serif;
  --texte: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --largeur: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sable);
  color: var(--encre);
  font: 400 17px/1.7 var(--texte);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vert-2); text-underline-offset: 3px; }
a:hover { color: var(--terre); }
h1, h2, h3, h4 { font-family: var(--titre); font-weight: 600; line-height: 1.2; color: var(--vert); letter-spacing: -.01em; margin: 0 0 .6em; }
:focus-visible { outline: 3px solid var(--terre); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-wrap { max-width: var(--largeur); margin: 0 auto; padding: 0 24px; }
.ed-icon { flex: none; }

/* ---------- En-tête ---------- */
.ed-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 242, 234, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ligne);
}
.ed-header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.ed-logo { flex: none; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--vert); }
.ed-logo__mark { width: 38px; height: 38px; border-radius: 12px; background: var(--vert); color: var(--sable); display: grid; place-items: center; }
.ed-logo__name { font-family: var(--titre); font-weight: 700; font-size: 21px; line-height: 1.1; }
.ed-logo__name small { display: block; font-family: var(--texte); font-weight: 500; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.ed-nav { margin-left: auto; }
.ed-nav__list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.ed-nav__list a { display: block; white-space: nowrap; padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--encre); text-decoration: none; }
.ed-nav__list a:hover, .ed-nav__list .current-cat > a, .ed-nav__list a[aria-current] { background: var(--sauge); color: var(--vert); }
.ed-search-toggle, .ed-burger { background: none; border: 0; padding: 8px; color: var(--vert); cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.ed-search-toggle:hover, .ed-burger:hover { background: var(--sauge); }
.ed-burger { display: none; }
.ed-searchbar { display: none; border-top: 1px solid var(--ligne); padding: 14px 0; }
.ed-searchbar.is-open { display: block; }

.ed-search { display: flex; gap: 8px; max-width: 560px; }
.ed-search input[type="search"] { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--ligne); border-radius: 999px; font: inherit; font-size: 16px; background: var(--blanc); color: var(--encre); }
.ed-search button { padding: 12px 20px; border: 0; border-radius: 999px; background: var(--vert); color: var(--sable); font: 600 15px var(--texte); cursor: pointer; }
.ed-search button:hover { background: var(--terre); }

/* ---------- Boutons, pastilles ---------- */
.ed-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: var(--vert); color: var(--sable); font-weight: 600; font-size: 15.5px; text-decoration: none; transition: background .2s, transform .2s; }
.ed-btn:hover { background: var(--terre); color: var(--blanc); transform: translateY(-1px); }
.ed-btn--ghost { background: transparent; color: var(--vert); box-shadow: inset 0 0 0 1.5px var(--vert); }
.ed-btn--ghost:hover { background: var(--vert); color: var(--sable); }
.ed-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--rub, var(--vert-2)); background: color-mix(in srgb, var(--rub, var(--vert-2)) 12%, white); text-decoration: none; }
.ed-eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--terre); margin-bottom: 14px; }

/* ---------- Accueil ---------- */
.ed-hero { padding: 72px 0 56px; }
.ed-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.ed-hero h1 { font-size: clamp(36px, 5vw, 58px); margin-bottom: 20px; }
.ed-hero h1 em { font-style: italic; color: var(--terre); }
.ed-hero__lead { font-size: 19px; color: var(--gris); max-width: 560px; margin: 0 0 28px; }
.ed-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.ed-hero__facts { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; font-size: 14.5px; color: var(--gris); }
.ed-hero__facts li { display: flex; align-items: center; gap: 7px; }
.ed-hero__facts .ed-icon { color: var(--vert-2); }
.ed-hero__art { position: relative; aspect-ratio: 1 / 1; border-radius: 32px; background: var(--vert); overflow: hidden; box-shadow: var(--ombre); }
.ed-hero__art svg { width: 100%; height: 100%; }

.ed-section { padding: 56px 0; }
.ed-section--white { background: var(--blanc); border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.ed-section__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.ed-section__head h2 { font-size: clamp(27px, 3.2vw, 36px); margin: 0; }
.ed-section__head p { margin: 6px 0 0; color: var(--gris); }
.ed-link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.ed-rubs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.ed-rub { --rub: var(--vert-2); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; border-radius: var(--rayon); background: var(--blanc); border: 1px solid var(--ligne); text-decoration: none; color: var(--encre); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ed-rub:hover { transform: translateY(-3px); box-shadow: var(--ombre); border-color: var(--rub); color: var(--encre); }
.ed-rub__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--rub); background: color-mix(in srgb, var(--rub) 12%, white); }
.ed-rub strong { font-family: var(--titre); font-size: 19px; font-weight: 600; color: var(--vert); line-height: 1.25; }
.ed-rub span { font-size: 14px; color: var(--gris); line-height: 1.5; }
.ed-rub em { margin-top: auto; font-style: normal; font-size: 13px; font-weight: 600; color: var(--rub); }

/* ---------- Cartes d'articles ---------- */
.ed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ed-card { display: flex; flex-direction: column; background: var(--blanc); border-radius: var(--rayon); overflow: hidden; border: 1px solid var(--ligne); transition: transform .2s, box-shadow .2s; }
.ed-card:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.ed-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sable-2); }
.ed-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ed-card:hover .ed-card__img { transform: scale(1.04); }
.ed-card__placeholder { --rub: var(--vert-2); width: 100%; height: 100%; display: grid; place-items: center; color: var(--rub); background:
  radial-gradient(circle at 20% 25%, color-mix(in srgb, var(--rub) 22%, white) 0 18%, transparent 19%),
  radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--rub) 16%, white) 0 24%, transparent 25%),
  color-mix(in srgb, var(--rub) 8%, var(--sable)); }
.ed-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.ed-card__title { font-size: 20px; margin: 0; line-height: 1.3; }
.ed-card__title a { color: var(--vert); text-decoration: none; }
.ed-card__title a:hover { color: var(--terre); }
.ed-card__excerpt { margin: 0; font-size: 15px; color: var(--gris); line-height: 1.6; }
.ed-card__meta { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gris); }

.ed-feature { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--blanc); border: 1px solid var(--ligne); border-radius: 26px; overflow: hidden; margin-bottom: 26px; }
.ed-feature .ed-card__media { aspect-ratio: auto; min-height: 340px; }
.ed-feature .ed-card__body { padding: 36px 40px; justify-content: center; gap: 14px; }
.ed-feature .ed-card__title { font-size: clamp(24px, 2.6vw, 32px); }
.ed-feature .ed-card__excerpt { font-size: 16.5px; }

/* ---------- Bandeau approche ---------- */
.ed-approach { background: var(--vert); color: var(--sauge); border-radius: 28px; padding: 52px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.ed-approach h2 { color: var(--sable); font-size: clamp(28px, 3vw, 38px); }
.ed-approach p { color: #CFE0D3; margin: 0; }
.ed-approach ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.ed-approach li { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.ed-approach li .ed-icon { color: #F1B48F; margin-top: 2px; }
.ed-approach li strong { display: block; color: var(--sable); font-weight: 600; margin-bottom: 2px; }
.ed-approach li span { font-size: 15px; color: #BFD3C4; line-height: 1.55; }

/* ---------- Pages rubrique / liste ---------- */
.ed-archive-head { padding: 48px 0 36px; }
.ed-archive-head__box { --rub: var(--vert-2); display: flex; gap: 26px; align-items: center; }
.ed-archive-head__icon { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; color: var(--rub); background: color-mix(in srgb, var(--rub) 13%, white); flex: none; }
.ed-archive-head h1 { font-size: clamp(32px, 4vw, 46px); margin: 0 0 8px; }
.ed-archive-head p { margin: 0; color: var(--gris); font-size: 18px; max-width: 720px; }
.ed-pagination { margin: 44px 0 0; display: flex; justify-content: center; }
.ed-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border-radius: 999px; background: var(--blanc); border: 1px solid var(--ligne); text-decoration: none; font-weight: 600; color: var(--encre); }
.ed-pagination .page-numbers.current { background: var(--vert); color: var(--sable); border-color: var(--vert); }

/* ---------- Fil d'Ariane ---------- */
.ed-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 13.5px; color: var(--gris); }
.ed-breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #A9A196; }
.ed-breadcrumb a { color: var(--gris); text-decoration: none; }
.ed-breadcrumb a:hover { color: var(--terre); }

/* ---------- Article ---------- */
.ed-article-head { padding: 40px 0 30px; }
.ed-article-head__inner { max-width: 860px; }
.ed-article-head h1 { font-size: clamp(32px, 4.4vw, 50px); margin: 18px 0 18px; }
.ed-article-head__lead { font-size: 19.5px; color: var(--gris); margin: 0 0 22px; }
.ed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--gris); }
.ed-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ed-article-cover { margin: 0 0 40px; border-radius: 26px; overflow: hidden; aspect-ratio: 21 / 9; background: var(--sable-2); }
.ed-article-cover img { width: 100%; height: 100%; object-fit: cover; }
.ed-article-cover .ed-card__placeholder svg { width: 96px; height: 96px; }
.ed-article-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 64px; }
.ed-toc { position: sticky; top: 100px; padding: 20px 22px; background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); font-size: 14.5px; }
.ed-toc strong { display: block; font-family: var(--titre); font-size: 17px; color: var(--vert); margin-bottom: 10px; }
.ed-toc ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ed-toc a { color: var(--gris); text-decoration: none; line-height: 1.4; display: block; }
.ed-toc a:hover, .ed-toc a.is-active { color: var(--vert); font-weight: 600; }

.ed-prose { max-width: 760px; font-size: 18px; }
.ed-prose > * + * { margin-top: 1.15em; }
.ed-prose p { margin: 0; }
.ed-prose p + p { margin-top: 1em; }
.ed-prose .chapeau { font-size: 20px; line-height: 1.65; color: var(--encre); font-weight: 500; }
.ed-prose h2 { font-size: clamp(25px, 2.6vw, 31px); margin: 1.9em 0 .55em; scroll-margin-top: 100px; }
.ed-prose h3 { font-size: 22px; margin: 1.5em 0 .4em; }
.ed-prose ul, .ed-prose ol { padding-left: 1.3em; margin: 1em 0; }
.ed-prose li { margin: .4em 0; }
.ed-prose ul li::marker { color: var(--terre); }
.ed-prose strong { color: var(--vert); }
.ed-prose blockquote { margin: 1.8em 0; padding: 22px 26px; border-radius: 16px; background: var(--sauge); border-left: 5px solid var(--vert-2); }
.ed-prose blockquote p { font-size: 17px; color: var(--vert); }
.ed-prose blockquote p:first-child::before { content: "À retenir"; display: block; font: 600 12.5px var(--texte); letter-spacing: .12em; text-transform: uppercase; color: var(--terre); margin-bottom: 6px; }
.ed-prose .encadre { padding: 22px 26px; border-radius: 16px; background: var(--blanc); border: 1px solid var(--ligne); }
.ed-table { overflow-x: auto; margin: 1.6em 0; border-radius: 16px; border: 1px solid var(--ligne); background: var(--blanc); }
.ed-prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 520px; }
.ed-prose th { background: var(--vert); color: var(--sable); text-align: left; font-weight: 600; padding: 12px 16px; }
.ed-prose td { padding: 12px 16px; border-top: 1px solid var(--ligne); vertical-align: top; }
.ed-prose tr:nth-child(even) td { background: #FBF9F4; }
.ed-prose a { font-weight: 500; }

.ed-article-foot { max-width: 760px; margin-top: 44px; padding: 26px 28px; border-radius: var(--rayon); background: var(--blanc); border: 1px solid var(--ligne); display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ed-article-foot__mark { width: 56px; height: 56px; border-radius: 16px; background: var(--vert); color: var(--sable); display: grid; place-items: center; }
.ed-article-foot strong { font-family: var(--titre); font-size: 18px; color: var(--vert); }
.ed-article-foot p { margin: 4px 0 0; font-size: 15px; color: var(--gris); }

/* ---------- Page simple ---------- */
.ed-page { padding: 40px 0 72px; }
.ed-page__box { max-width: 820px; background: var(--blanc); border: 1px solid var(--ligne); border-radius: 26px; padding: clamp(28px, 5vw, 56px); margin-top: 20px; }
.ed-page__box h1 { font-size: clamp(32px, 4vw, 44px); }

/* ---------- 404 / vide ---------- */
.ed-empty { text-align: center; padding: 80px 0; }
.ed-empty h1 { font-size: clamp(32px, 4vw, 44px); }
.ed-empty p { color: var(--gris); }
.ed-empty .ed-search { margin: 26px auto 0; }

/* ---------- Pied de page ---------- */
.ed-footer { background: var(--encre); color: #BFC8C1; margin-top: 40px; font-size: 15px; }
.ed-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding: 60px 0 44px; }
.ed-footer .ed-logo { color: var(--sable); }
.ed-footer .ed-logo__mark { background: var(--sable); color: var(--vert); }
.ed-footer .ed-logo__name small { color: #94A098; }
.ed-footer p { margin: 16px 0 0; max-width: 380px; line-height: 1.65; }
.ed-footer h3 { font-family: var(--texte); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #F1B48F; margin-bottom: 16px; }
.ed-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ed-footer a { color: #DCE4DE; text-decoration: none; }
.ed-footer a:hover { color: var(--blanc); text-decoration: underline; }
.ed-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: #8E9A92; }
.ed-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Responsive ---------- */
.ed-hero__grid > *, .ed-article-layout > *, .ed-feature > *, .ed-approach > * { min-width: 0; }
@media (max-width: 1180px) { .ed-logo__name small { display: none; } .ed-nav__list a { padding: 8px 10px; font-size: 14.5px; } }
@media (max-width: 1080px) {
  .ed-rubs { grid-template-columns: repeat(3, 1fr); }
  .ed-rubs { grid-template-columns: repeat(3, 1fr); }
  .ed-article-layout { grid-template-columns: 1fr; gap: 0; }
  .ed-toc { position: static; margin-bottom: 30px; max-width: 760px; }
}
@media (max-width: 900px) {
  .ed-burger { display: grid; }
  .ed-search-toggle { margin-left: auto; }
  .ed-header__inner { gap: 6px; }
  .ed-nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--sable); border-bottom: 1px solid var(--ligne); display: none; }
  .ed-nav.is-open { display: block; }
  .ed-nav__list { flex-direction: column; padding: 12px 18px 18px; }
  .ed-nav__list a { padding: 12px 14px; border-radius: 12px; font-size: 16px; }
  .ed-hero { padding: 44px 0 32px; }
  .ed-hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .ed-hero__art { max-width: 420px; aspect-ratio: 4 / 3; }
  .ed-grid { grid-template-columns: repeat(2, 1fr); }
  .ed-feature { grid-template-columns: 1fr; }
  .ed-feature .ed-card__media { min-height: 220px; aspect-ratio: 16 / 9; }
  .ed-feature .ed-card__body { padding: 26px; }
  .ed-approach { grid-template-columns: 1fr; padding: 36px 28px; gap: 28px; }
  .ed-footer__grid { grid-template-columns: 1fr 1fr; }
  .ed-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .ed-wrap { padding: 0 18px; }
  .ed-logo__name small { display: none; }
  .ed-logo__name { font-size: 18px; }
  .ed-logo__mark { width: 34px; height: 34px; }
  .ed-rubs { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ed-rub { padding: 18px 16px; }
  .ed-grid { grid-template-columns: 1fr; }
  .ed-section { padding: 44px 0; }
  .ed-section__head { flex-direction: column; align-items: start; }
  .ed-approach ul { grid-template-columns: 1fr; }
  .ed-archive-head__box { flex-direction: column; align-items: start; gap: 16px; }
  .ed-article-cover { aspect-ratio: 16 / 10; border-radius: 18px; }
  .ed-prose { font-size: 17px; }
  .ed-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
