/**
 * theme-festival — Univers Cidre & Dragon (thème par défaut)
 * Parchemin, cidre / cuivre, noir — identité permanente du festival.
 * Mode intégral : page / footer (header YOOtheme inchangé).
 */

body.theme-festival #tm-main,
body.theme-festival.theme-integral {
  --theme-festival-parchment: #fff6eb;
  --theme-festival-paper: #fff8ef;
  --theme-festival-cream: #f5ebe0;
  --theme-festival-cidre: #9a3412;
  --theme-festival-cuivre: #c2410c;
  --theme-festival-gold: #d6a15c;
  --theme-festival-sand: #d6c7b4;
  --theme-festival-black: #000000;
  --theme-festival-noir: #0a0807;
  --theme-festival-ink: #000000;
  --theme-festival-ink-soft: #1a1510;
  --theme-festival-muted: #3d342c;
  --theme-festival-line: rgba(0, 0, 0, 0.35);
  --theme-festival-line-cidre: rgba(154, 52, 18, 0.4);
  --theme-festival-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  --theme-festival-radius: 14px;
}

body.theme-festival #tm-main {
  color: var(--theme-festival-ink);
  background-color: var(--theme-festival-parchment);
  background-image:
    radial-gradient(ellipse 85% 45% at 50% -8%, rgba(255, 255, 255, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 50% 35% at 100% 15%, rgba(194, 65, 12, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 40% 28% at 0% 80%, rgba(0, 0, 0, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #fde9d2 0%, var(--theme-festival-parchment) 38%, var(--theme-festival-cream) 100%);
  background-attachment: local;
  min-height: 40vh;
}

body.theme-festival #tm-main .uk-section-default {
  background-color: transparent;
  color: var(--theme-festival-ink);
}

body.theme-festival #tm-main .uk-section-default:not(:has(.uk-countdown)),
body.theme-festival #tm-main .uk-section-muted:not(:has(.uk-countdown)) {
  background-color: transparent !important;
}

body.theme-festival #tm-main h1:not([id="page#0"]),
body.theme-festival #tm-main h2,
body.theme-festival #tm-main h3,
body.theme-festival #tm-main .uk-h1:not([id="page#0"]),
body.theme-festival #tm-main .uk-h2,
body.theme-festival #tm-main .uk-h3,
body.theme-festival #tm-main .uk-article-title,
body.theme-festival #tm-main .uk-heading-medium {
  color: var(--theme-festival-black) !important;
}

body.theme-festival #tm-main h1:not([id="page#0"]) strong,
body.theme-festival #tm-main h2 strong,
body.theme-festival #tm-main .uk-article-title strong {
  color: var(--theme-festival-cidre) !important;
}

/* Hero accueil : conserver le blanc crème (comme les dates) */
body.theme-festival #tm-main .section-top-home h1,
body.theme-festival #tm-main .section-top-home h1 strong,
body.theme-festival #tm-main .section-top-home [id="page#0"],
body.theme-festival #tm-main .section-top-home [id="page#0"] strong,
body.theme-festival #tm-main .section-top-home [id^="page"],
body.theme-festival #tm-main .section-top-home p,
body.theme-festival #tm-main .section-top-home strong,
body.theme-festival #tm-main .section-top-home .uk-text-lead {
  color: #fff8ef !important;
}

body.theme-festival #tm-main p,
body.theme-festival #tm-main .uk-text-lead,
body.theme-festival #tm-main .uk-text-meta {
  color: var(--theme-festival-ink-soft);
}

body.theme-festival #tm-main a:not(.uk-button):not(.el-link) {
  color: var(--theme-festival-cuivre) !important;
}

body.theme-festival #tm-main a:not(.uk-button):not(.el-link):hover {
  color: var(--theme-festival-black) !important;
}

body.theme-festival #tm-main .uk-button-primary,
body.theme-festival #tm-main a.uk-button-primary {
  background: linear-gradient(135deg, var(--theme-festival-black) 0%, var(--theme-festival-cidre) 55%, var(--theme-festival-cuivre) 100%) !important;
  color: #fff8ef !important;
  border: 0 !important;
  border-radius: var(--theme-festival-radius) !important;
  box-shadow: var(--theme-festival-shadow);
}

body.theme-festival #tm-main .uk-button-default,
body.theme-festival #tm-main a.uk-button-default {
  background: var(--theme-festival-paper) !important;
  color: var(--theme-festival-black) !important;
  border: 2px solid var(--theme-festival-black) !important;
  border-radius: var(--theme-festival-radius) !important;
}

body.theme-festival #tm-main .uk-grid[class*="uk-child-width"] > * > article.uk-article {
  background: rgba(255, 248, 239, 0.96) !important;
  border: 2px solid var(--theme-festival-line) !important;
  border-left: 4px solid var(--theme-festival-black) !important;
  border-radius: var(--theme-festival-radius) !important;
  box-shadow: var(--theme-festival-shadow) !important;
}

body.theme-festival #tm-main .uk-card,
body.theme-festival #tm-main .uk-panel-box {
  background: rgba(255, 248, 239, 0.94) !important;
  border: 1px solid rgba(0, 0, 0, 0.22) !important;
  border-radius: var(--theme-festival-radius) !important;
}

body.theme-festival #tm-main input,
body.theme-festival #tm-main textarea,
body.theme-festival #tm-main select {
  background: #fff !important;
  border: 2px solid rgba(0, 0, 0, 0.35) !important;
  border-radius: 12px !important;
  color: var(--theme-festival-ink) !important;
}

body.theme-festival #tm-main input:focus,
body.theme-festival #tm-main textarea:focus,
body.theme-festival #tm-main select:focus {
  border-color: var(--theme-festival-black) !important;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.18) !important;
}

body.theme-festival #tm-main .uk-section-default hr {
  border: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, var(--theme-festival-black), var(--theme-festival-cidre), transparent) !important;
  opacity: 0.7 !important;
}

/* Hero / sections image : voile sombre léger + bas parchemin */
body.theme-festival #tm-main .section-top-home > .uk-section {
  position: relative;
}

body.theme-festival #tm-main .section-top-home > .uk-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.04) 45%,
    rgba(245, 235, 224, 0.4) 100%
  );
}

body.theme-festival #tm-main .section-top-home > .uk-section > * {
  position: relative;
  z-index: 1;
}

body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) > .uk-section[class*="uk-background"] {
  position: relative;
}

body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) > .uk-section[class*="uk-background"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.28) 40%,
    rgba(154, 52, 18, 0.2) 70%,
    rgba(255, 246, 235, 0.5) 100%
  );
}

body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) > .uk-section[class*="uk-background"] > * {
  position: relative;
  z-index: 1;
}

body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) .secondary-headline,
body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) h2 {
  color: #fff8ef !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) p,
body.theme-festival #tm-main .uk-section-secondary:not(:has(.uk-countdown)) .uk-text-lead {
  color: rgba(255, 248, 239, 0.92) !important;
}

@media (prefers-reduced-motion: no-preference) {
  body.theme-festival #tm-main .uk-grid[class*="uk-child-width"] > * > article.uk-article {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  body.theme-festival #tm-main .uk-grid[class*="uk-child-width"] > * > article.uk-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32) !important;
  }
}

/* === Mode intégral : page / footer (header inchangé) === */
body.theme-festival.theme-integral {
  background:
    radial-gradient(ellipse 85% 45% at 50% -8%, rgba(255, 255, 255, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 0, 0, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #fde9d2 0%, var(--theme-festival-parchment) 40%, var(--theme-festival-cream) 100%);
  background-attachment: fixed;
  color: var(--theme-festival-ink);
}

body.theme-festival.theme-integral .tm-page {
  background: transparent;
}

body.theme-festival.theme-integral footer,
body.theme-festival.theme-integral .tm-footer,
body.theme-festival.theme-integral [class*="footer"] > .uk-section {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, var(--theme-festival-noir) 28%, var(--theme-festival-black) 100%) !important;
  color: #fff8ef !important;
  border-top: 3px solid var(--theme-festival-cidre);
}

body.theme-festival.theme-integral footer a,
body.theme-festival.theme-integral .tm-footer a {
  color: #fdba74 !important;
}

body.theme-festival.theme-integral footer a:hover,
body.theme-festival.theme-integral .tm-footer a:hover {
  color: #fff !important;
}
