/* A quiet, botanical night palette. The visitor may follow the OS or choose. */
html[data-theme="dark"] {
  color-scheme: dark;
  --forest: #d8ddd4;
  --green: #b1c1ac;
  --cream: #181f1c;
  --sage: #252f29;
  --sand: #28382b;
  --gold: #c1af83;
  --ink: #d8ddd4;
  --muted: #adb9ac;
  --line: #536451;
  --accent: #c1af83;
  background: var(--cream);
}
html[data-theme="dark"] body { background: var(--cream); color: var(--ink); }
html[data-theme="dark"] :is(p, li, dt, dd, label, legend, figcaption, small, summary) { color: inherit; }
html[data-theme="dark"] :is(h1, h2, h3, h4, .lead, .eyebrow, .card-kicker, .text-link) { color: var(--ink); }
html[data-theme="dark"] .site-header { background: #1c2520; color: var(--ink); border-color: var(--gold); }
html[data-theme="dark"] .site-header :is(.brand, .main-nav a, .nav-toggle) { color: var(--ink); }
html[data-theme="dark"] .site-header .main-nav a:hover,
html[data-theme="dark"] .site-header .main-nav a:focus-visible,
html[data-theme="dark"] .site-header .main-nav .nav-join:hover { background: #3b4c40; color: #dedfd5; }
html[data-theme="dark"] .site-header .main-nav a[aria-current="page"] { color: #d1c199; }
html[data-theme="dark"] :is(.page-hero, .producer-hero, .alt, .vendee-map-profile, .directory-card-contact) { background: var(--sage); color: var(--ink); }
html[data-theme="dark"] :is(.section, .vendee-map-section, .card, .producer-card, .contact-form, .document-brochure, .directory-card, .source-section, .faq-item) { border-color: var(--line); }
html[data-theme="dark"] :is(.card, .producer-card, .producer-visual, .producer-name-only, .producer-identity, .document-brochure, .contact-form, .source-section, .vendee-map-section, .media-tile) { background: var(--cream); color: var(--ink); }
html[data-theme="dark"] .vendee-map-profile { background: var(--sage); }
html[data-theme="dark"] :is(.producer-card-copy, .directory-card-copy, .document-brochure, .contact-aside, .vendee-map-heading, .vendee-map-list) :is(h2, h3, p, strong, a) { color: var(--ink); }
html[data-theme="dark"] :is(.producer-card, .card, .document-brochure, .vendee-map-list li) { border-color: var(--line); }
html[data-theme="dark"] .vendee-map-pin { background: #dedfd5; color: #2b4235; border-color: #252f29; box-shadow: 0 0 0 1px var(--gold); }
html[data-theme="dark"] .vendee-map-pin.is-current { box-shadow: 0 0 0 3px var(--gold); }
html[data-theme="dark"] :is(.vendee-map-brand, .vendee-map-list-logo) { background: #dedfd5; border-color: var(--gold); }
html[data-theme="dark"] .vendee-map-wordmark { color: #2b4235; }
html[data-theme="dark"] .vendee-map-outline-light { display: none; }
html[data-theme="light"] .vendee-map-outline-dark { display: none; }
html[data-theme="dark"] .vendee-map-outline-dark { display: block; }
html[data-theme="dark"] :is(.vendee-map-list a, .vendee-map-profile-copy a, .vendee-map-note, .vendee-map-source, .vendee-map-sea) { color: var(--muted); }
html[data-theme="dark"] body[data-cms-page="index"] :is(#association, .card.featured),
html[data-theme="dark"] :is(.site-footer, .card.featured),
html[data-theme="dark"] body[data-cms-page="documents"] .page-hero,
html[data-theme="dark"] body[data-cms-page="ressources"] .page-hero,
html[data-theme="dark"] body[data-cms-page="association"] .page-hero { background: #2b4235; color: #dedfd5; }
html[data-theme="dark"] body[data-cms-page="index"] #association :is(h2, p, .eyebrow, .text-link),
html[data-theme="dark"] body[data-cms-page="documents"] .page-hero :is(h1, p, .eyebrow),
html[data-theme="dark"] body[data-cms-page="ressources"] .page-hero :is(h1, p, .eyebrow),
html[data-theme="dark"] body[data-cms-page="association"] .page-hero :is(h1, p, .eyebrow),
html[data-theme="dark"] .site-footer :is(h2, h3, p, a, small, span, strong) { color: #dedfd5; }
html[data-theme="dark"] body[data-cms-page="index"] :is(.pillars article, .pillars article h3, .pillars article p) { color: var(--ink); }
html[data-theme="dark"] :is(.btn, .button) { background: #b1c1ac; border-color: #b1c1ac; color: #1c2b20; }
html[data-theme="dark"] :is(.btn, .button):hover,
html[data-theme="dark"] :is(.btn, .button):focus-visible { background: #e2eddb; border-color: #e2eddb; color: #1c2b20; }
html[data-theme="dark"] :is(input, textarea, select) { background: #1e2922; border-color: #718070; color: #e0e3da; }
html[data-theme="dark"] :is(input, textarea)::placeholder { color: #bed0bf; opacity: 1; }
html[data-theme="dark"] :is(input, textarea, select):focus-visible { outline-color: var(--gold); }
html[data-theme="dark"] :is(.cookie-notice, .cookie-modal, .cookie-settings) { background: #252f29; color: #d8ddd4; border-color: var(--gold); }
html[data-theme="dark"] .cookie-notice :is(h2, p, a, button) { color: #d8ddd4; }
html[data-theme="dark"] .cookie-notice button { background: #b1c1ac; color: #1c2b20; }
html[data-theme="dark"] .site-footer { border-color: var(--gold); }
html[data-theme="dark"] .site-footer :is(a, button):hover { color: #d1c199; }
html[data-theme="dark"] body[data-cms-page="connexion"] :is(.site-header, main .section, .page-hero) { background: var(--cream); color: var(--ink); }
html[data-theme="dark"] body[data-cms-page="index"] .home-masthead { color: #dedfd5; }
html[data-theme="dark"] body[data-cms-page="index"] .home-masthead :is(h1, p, a, span) { color: inherit; }
html[data-theme="dark"] .skip-link { background: #2b4235; color: #dedfd5; }
html[data-theme="dark"] .site-header .nav-toggle { background: #303e34; border-color: #718070; color: #dedfd5; }
html[data-theme="dark"] .site-header .nav-toggle:hover,
html[data-theme="dark"] .site-header .nav-toggle:focus-visible { background: #405848; color: #dedfd5; }
html[data-theme="dark"] .editorial-quote blockquote { color: var(--ink); }
html[data-theme="dark"] .editorial-quote figcaption { color: var(--muted); }
html[data-theme="dark"] body[data-cms-page="index"] .home-masthead .btn { background: #e7d9ae; border-color: #e7d9ae; color: #213d2a; }
html[data-theme="dark"] body[data-cms-page="index"] .home-masthead .btn:hover { background: #f2e8c9; border-color: #f2e8c9; color: #213d2a; }
html[data-theme="dark"] :is(.living, .living strong, .living h2, .living h3, .living p, .living a) { color: #dedfd5; }
html[data-theme="dark"] .living-items span { color: #d2dacb; }
html[data-theme="dark"] body[data-cms-page="index"] .home-joining { background: #252f29; color: var(--ink); }
html[data-theme="dark"] body[data-cms-page="index"] .home-news { background: var(--cream); color: var(--ink); }
html[data-theme="dark"] .home-news-empty,
html[data-theme="dark"] .home-news-card time { color: var(--muted); border-color: var(--line); }
html[data-theme="dark"] .membership-maintenance { background: #252f29; color: var(--ink); }
html[data-theme="dark"] .membership-maintenance h2,
html[data-theme="dark"] .membership-maintenance p:not(.eyebrow) { color: var(--ink); }
html[data-theme="dark"] .membership-maintenance .btn-secondary { background: #181f1c; border-color: #718070; color: var(--ink); }
html[data-theme="dark"] .form-field label span { color: var(--gold); }

.public-theme-choice { display: inline-flex; align-items: center; gap: 9px; margin-left: auto; color: inherit; font-size: .81rem; }
.public-theme-choice select { min-height: 38px; padding: 5px 27px 5px 9px; border: 1px solid currentColor; border-radius: 2px; background: transparent; color: inherit; font: inherit; }
.public-theme-choice option { background: #f6f4ec; color: #243e32; }
html[data-theme="dark"] .public-theme-choice option { background: #252f29; color: #d8ddd4; }
html[data-theme="dark"] body[data-cms-page="producteur-pavot"] .producer-hero .producer-identity img[src*="pavot.webp"] {
  filter: grayscale(1) invert(1) brightness(2.8);
  mix-blend-mode: screen;
}
html[data-theme="dark"] body[data-cms-page="producteurs"] .producer-card[href="producteur-pavot.html"] .producer-visual img[src*="pavot.webp"] {
  filter: grayscale(1) invert(1) brightness(2.8);
  mix-blend-mode: screen;
}

/* Retain the brand fonts while avoiding heavy, over-sharpened night text. */
/* Logos retain their alpha edges; Pavot also works when selected from the CMS library. */
html[data-theme="dark"] body img[src*="-transparent.webp"]{mix-blend-mode:normal!important;filter:invert(1) hue-rotate(180deg) blur(var(--cms-image-blur,0px)) brightness(var(--cms-image-brightness,1))!important}
html[data-theme="dark"] body img[src*="rencontres-au-naturel-transparent.webp"]{filter:blur(var(--cms-image-blur,0px)) brightness(var(--cms-image-brightness,1))!important}
html[data-theme="dark"] body img[src*="les-fees-des-herbes-transparent.webp"]{filter:brightness(0) invert(1) blur(var(--cms-image-blur,0px)) brightness(var(--cms-image-brightness,1))!important}
html[data-theme="dark"] body img[data-cms-image="image-3f40d3d3acdee2a2"]{
  filter:brightness(0) invert(1) blur(var(--cms-image-blur,0px)) brightness(var(--cms-image-brightness,1))!important;mix-blend-mode:normal;
}
html[data-theme="dark"] body:not(.admin-dark) {
  font-synthesis: none;
  text-shadow: none;
  -webkit-font-smoothing: auto;
}
html[data-theme="dark"] body:not(.admin-dark) :is(h1,h2,h3,blockquote) {
  font-weight: 400;
  text-shadow: none;
  letter-spacing: -.025em;
}
html[data-theme="dark"] body:not(.admin-dark) :is(p,li,small,figcaption) {
  text-shadow: none;
}
.public-theme-choice select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 700px) { .public-theme-choice { width: 100%; margin: 14px 0 0; justify-content: flex-start; } }

/* A small, keyboard-accessible appearance switch stays in the page header. */
.site-header .navigation-area { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.site-header .public-theme-toggle { display: inline-grid; place-items: center; flex: none; order: 2; width: 36px; height: 36px; padding: 6px; border: 1px solid #a8b8a3; border-radius: 50%; background: transparent; color: #174c3a; cursor: pointer; }
.site-header .public-theme-toggle:hover { background: #e9f0e3; border-color: #174c3a; }
.site-header .public-theme-toggle:focus-visible { outline: 3px solid #9b7f42; outline-offset: 3px; }
.site-header .public-theme-toggle svg { display: block; width: 20px; height: 20px; }
.site-header .public-theme-toggle .theme-sun,
.site-header .public-theme-toggle.is-dark .theme-moon { display: none; }
.site-header .public-theme-toggle.is-dark .theme-sun { display: block; }
html[data-theme="dark"] .site-header .public-theme-toggle { color: #d8ddd4; border-color: #829b83; }
html[data-theme="dark"] .site-header .public-theme-toggle:hover { background: #3b4c40; border-color: #d8ddd4; }
@media (max-width: 1150px) {
  .site-header .navigation-area { gap: 9px; }
  .site-header .public-theme-toggle { order: 0; width: 40px; height: 40px; }
}

/* Quieter night reading: warm grey text, charcoal-pine surfaces, real font weights. */
html[data-theme="dark"] body:not(.admin-dark){font-weight:400;font-synthesis:none}
html[data-theme="dark"] body:not(.admin-dark) :is(p,li,dt,dd,small,figcaption,label){font-weight:400;line-height:1.65}
html[data-theme="dark"] body:not(.admin-dark) :is(h1,h2,h3,h4,blockquote){font-weight:400}
html[data-theme="dark"] body:not(.admin-dark) :is(strong,b){font-weight:600}
html[data-theme="dark"] body:not(.admin-dark) :is(.eyebrow,.card-kicker,.main-nav a,.btn,.button,.profile,.filter){font-weight:500}
html[data-theme="dark"] body:not(.admin-dark) :is(.home-masthead,.home-masthead *,h1,h2,h3,p,a){text-shadow:none!important;-webkit-text-stroke:0}
html[data-theme="dark"] body[data-cms-page="index"] .home-masthead{color:#dedfd5}
html[data-theme="dark"] body[data-cms-page="index"] .home-masthead h1{color:#dedfd5}
html[data-theme="dark"] #territory-map .city text{font-weight:500}

/* Softer reading uses real regular weights, never translucent or blurred text. */
html[data-theme="dark"]{
 --ink:#d2d8d0;--forest:#d2d8d0;--green:#b3c0ae;--muted:#b1bcaf;
 --sage:#252e27;--sand:#2c362e;
 --select-bg:#202722;--select-ink:#d2d8d0;--select-hover:#3a493d;
 --select-active-bg:#b3c0ae;--select-active-ink:#202722;
}
html[data-theme="dark"] body{font-synthesis:none}
/* In night mode, preserve the photo and framing while giving small text a
   genuinely dark backing, including over the brightest flower petals. */
html[data-theme="dark"] .home-masthead::before{background:rgb(23 43 31 / .78)}
html[data-theme="dark"] body :is(p,li,dt,dd,small,figcaption,label,legend){font-weight:400!important}
html[data-theme="dark"] body :is(h1,h2,h3,h4,blockquote){font-weight:400!important}
html[data-theme="dark"] body :is(strong,b,.main-nav a,.eyebrow,.card-kicker,.btn,.button,.profile,.filter){font-weight:500!important}
html[data-theme="dark"] body :is(h1,h2,h3,h4,p,li,a,button,label,small,span,strong){text-shadow:none!important;-webkit-text-stroke:0!important}
html[data-theme="dark"] #territory-map .profile-index{font-weight:500}
/* Gold remains decorative; these small labels need a deeper ink on cream. */
html:not([data-theme="dark"]) #territory-map :is(.eyebrow,.profile-link,.locator-copy strong b){color:#7a6231}
