/* ═══════════════════════════════════════════════════════════════
   PIXELWAREZPLAY · THÈME AUTOMNE — Refonte complète
   Palette : ambre, rouille, or, brun, rouge feuille
   Effets : bordure feuille header, décor sidebar, ambiance chaude
═══════════════════════════════════════════════════════════════ */

:root {
  --autumn-bg: #2b1a0f;
  --autumn-bg2: #3d2414;
  --autumn-surface: #fff8f0;
  --autumn-surface2: #fef3e2;
  --autumn-border: rgba(180, 83, 9, 0.22);
  --autumn-border2: rgba(217, 119, 6, 0.35);
  --autumn-text: #3f2a1a;
  --autumn-text2: #6b4423;
  --autumn-text3: #9a7048;
  --autumn-accent: #d97706;
  --autumn-accent2: #b45309;
  --autumn-gold: #f59e0b;
  --autumn-rust: #c2410c;
  --autumn-red: #dc2626;
  --autumn-leaf: #a16207;
  --autumn-glow: 0 8px 28px rgba(180, 83, 9, 0.18);
}

/* ── Base automne ── */
body.theme-autumn {
  --bg: #fdf6ed;
  --bg2: #fffaf3;
  --card: rgba(255, 251, 245, 0.97);
  --card2: #fff7ed;
  --border: var(--autumn-border);
  --border2: var(--autumn-border2);
  --text: var(--autumn-text);
  --text2: var(--autumn-text2);
  --text3: var(--autumn-text3);
  --accent: var(--autumn-accent);
  --accent2: var(--autumn-accent2);
  --cyan: #ea580c;
  --cyan2: #c2410c;
  --green: #65a30d;
  --red: #dc2626;
  --yellow: #f59e0b;
  --shadow: var(--autumn-glow);
  --shadow-lg: 0 14px 40px rgba(120, 53, 15, 0.18);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(245, 158, 11, 0.16), transparent 32%),
    radial-gradient(ellipse at 92% 8%, rgba(220, 38, 38, 0.08), transparent 28%),
    radial-gradient(ellipse at 50% 100%, rgba(180, 83, 9, 0.10), transparent 40%),
    linear-gradient(180deg, #fff8ef 0%, #fdf1e1 48%, #fffaf3 100%) !important;
  color: var(--autumn-text);
}

/* Perf: éviter filter sur un calque plein écran (scroll fluide, comme thème clair) */
body.theme-autumn::before {
  content: none !important;
  display: none !important;
}

/* ── Header desktop : bordure automnale ── */
body.theme-autumn .site-header {
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 244, 228, 0.92)) !important;
  border-bottom: 3px solid transparent !important;
  border-image: linear-gradient(90deg,
    #92400e 0%,
    #d97706 12%,
    #f59e0b 25%,
    #ea580c 38%,
    #dc2626 50%,
    #ea580c 62%,
    #f59e0b 75%,
    #d97706 88%,
    #92400e 100%) 1 !important;
  box-shadow:
    0 8px 24px rgba(146, 64, 14, 0.12),
    0 2px 0 rgba(245, 158, 11, 0.25) inset !important;
}

/* Guirlande de feuilles décorative sous le header */
body.theme-autumn .site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -42px;
  height: 40px;
  pointer-events: none;
  background-image: url(https://i.ibb.co/Vc5H04gb/test.png);
  background-repeat: repeat-x;
  background-size: contain;
  opacity: 0.95;
  z-index: 2;
  transform: translateZ(0);
}

.main-content  {margin-top:-56px;}

:root {
    --header-h: 87px!important;
    --nav-item-min-width: 80px;
}

body.theme-autumn .site-header-inner {
  position: relative;
  z-index: 3;
}

/* Liens de nav header */
body.theme-autumn .site-nav-list > li > a,
body.theme-autumn .site-nav-list > li > .nav-toggle {
  color: #7c2d12 !important;
  font-weight: 600;
  border-radius: 999px;
  transition: all .2s ease;
}

body.theme-autumn .site-nav-list > li > a:hover,
body.theme-autumn .site-nav-list > li > .nav-toggle:hover,
body.theme-autumn .site-nav-list > li.has-sub.open > .nav-toggle {
  color: #9a3412 !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.12)) !important;
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.2) inset;
}

body.theme-autumn .site-nav .subnav,
body.theme-autumn .site-overflow-panel,
body.theme-autumn .site-search-panel {
  background: linear-gradient(180deg, #fffaf3, #fff3e0) !important;
  border: 1px solid rgba(217, 119, 6, 0.25) !important;
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.16) !important;
}

body.theme-autumn .site-nav .subnav a:hover {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #9a3412 !important;
}

/* Logo accent */
body.theme-autumn .site-logo img {
  filter: drop-shadow(0 4px 10px rgba(180, 83, 9, 0.18));
}

/* Boutons header */
body.theme-autumn .btn-primary,
body.theme-autumn .pw-btn-primary {
  background: linear-gradient(135deg, #d97706, #c2410c) !important;
  border-color: #b45309 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.28) !important;
}

body.theme-autumn .btn-primary:hover,
body.theme-autumn .pw-btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

body.theme-autumn .btn-outline {
  border-color: rgba(180, 83, 9, 0.4) !important;
  color: #9a3412 !important;
  background: rgba(255, 247, 237, 0.7);
}

body.theme-autumn .btn-outline:hover {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: #d97706 !important;
  color: #7c2d12 !important;
}

/* ── Sidebar / menu slide : thème automne + feuille ── */
body.theme-autumn .sidebar {
  background: #fbe9df;
  box-shadow: 10px 0 34px rgba(120, 53, 15, 0.12);
  border: 0;
}

/* Desktop : autoriser la feuille à dépasser */
@media (min-width: 901px) {
  body.theme-autumn .sidebar {
    overflow: visible;
  }
}

/* Mobile : s'assurer que header/menu burger fonctionnent en thème automne */
@media (max-width: 900px) {
  body.theme-autumn .site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    display: block !important;
    z-index: 56;
  }

  body.theme-autumn .sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body.theme-autumn .sidebar-burger {
    display: flex !important;
    z-index: 201;
    background: linear-gradient(180deg, #fffaf3, #fde8c8);
    border-color: rgba(217, 119, 6, 0.35);
  }

  body.theme-autumn .sidebar-burger .bar {
    background: #92400e !important;
  }

  body.theme-autumn .sidebar-overlay {
    background: rgba(62, 39, 18, 0.5);
    z-index: 45;
  }

  body.theme-autumn .main-content {
    padding-top: calc(var(--header-h, 89px) + 16px);
  }
}

/* Bordure intérieure chaude */
body.theme-autumn .sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    /* background: linear-gradient(180deg, #92400e, #f59e0b 30%, #ea580c 55%, #dc2626 75%, #92400e); */
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
}

/* Grande feuille décorative sur le menu slide (desktop) */
body.theme-autumn .sidebar::after {
  content: "";
  position: absolute;
  top: 64px;
  right: -18px;
  width: 86px;
  height: 96px;
  background: url("/assets/img/autumn-leaf.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 5;
  transform: translate3d(0, 0, 0) rotate(18deg);
  animation: autumnLeafFloat 5.5s ease-in-out infinite;
  opacity: 0.96;
  will-change: transform;
  backface-visibility: hidden;
}

/* Petite feuille secondaire en bas du menu slide (statique = pas de coût scroll) */
body.theme-autumn .sidebar .sidebar-stats::after {
  content: "";
  display: block;
  width: 52px;
  height: 58px;
  margin: 10px auto 2px;
  background: url("/assets/img/autumn-leaf.svg") center / contain no-repeat;
  opacity: 0.7;
  transform: rotate(-24deg);
}

@keyframes autumnLeafFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(18deg); }
  50% { transform: translate3d(0, -6px, 0) rotate(14deg); }
}

body.theme-autumn .sidebar-logo {
  border-bottom: 1px solid rgba(217, 119, 6, 0.18) !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), transparent);
}

body.theme-autumn .sidebar-logo a,
body.theme-autumn .sidebar-logo span {
  color: #7c2d12 !important;
}

body.theme-autumn .sidebar-user {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), rgba(234, 88, 12, 0.06)) !important;
  border: 1px solid rgba(217, 119, 6, 0.2) !important;
}

body.theme-autumn .sidebar-username {
  color: #7c2d12 !important;
}

/* Liens sidebar */
body.theme-autumn .sidebar-nav a,
body.theme-autumn .sidebar-nav .nav-toggle {
  color: #7c2d12 !important;
}

body.theme-autumn .sidebar-nav a:hover,
body.theme-autumn .sidebar-nav .nav-toggle:hover {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.04)) !important;
  color: #9a3412 !important;
  border-left-color: #d97706 !important;
}

body.theme-autumn .sidebar-nav a.active {
  color: #9a3412 !important;
  border-left-color: #ea580c !important;
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.14), rgba(245, 158, 11, 0.06)) !important;
}

body.theme-autumn .subnav {
  background: rgba(245, 158, 11, 0.06) !important;
  border-left: 2px solid rgba(217, 119, 6, 0.25);
}

body.theme-autumn .subnav a {
  color: #92400e !important;
}

body.theme-autumn .subnav a:hover {
  color: #7c2d12 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

body.theme-autumn .sidebar-nav .nav-icon svg.pw-svg-ico {
  stroke: #b45309 !important;
}

body.theme-autumn .sidebar-nav a:hover .nav-icon svg.pw-svg-ico,
body.theme-autumn .sidebar-nav .nav-toggle:hover .nav-icon svg.pw-svg-ico {
  stroke: #ea580c !important;
}

body.theme-autumn .sidebar-search input {
  background: #fffdf8 !important;
  border-color: rgba(217, 119, 6, 0.28) !important;
  color: #7c2d12 !important;
}

body.theme-autumn .sidebar-search input:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

body.theme-autumn .sidebar-stats {
  border-top: 1px solid rgba(217, 119, 6, 0.18) !important;
  color: #92400e !important;
}

/* Burger / mobile header */
body.theme-autumn .mobile-header {
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(255, 244, 228, 0.96)) !important;
  border-bottom: 2px solid rgba(217, 119, 6, 0.28) !important;
}

body.theme-autumn .sidebar-burger .bar {
  background: #92400e !important;
}

/* ── Cartes, sections, contenus ── */
body.theme-autumn .card,
body.theme-autumn .pw-card,
body.theme-autumn .content-card,
body.theme-autumn .pw-content-card,
body.theme-autumn .form-card,
body.theme-autumn .profile-header {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 247, 237, 0.96)) !important;
  border-color: rgba(217, 119, 6, 0.18) !important;
  box-shadow: 0 10px 26px rgba(120, 53, 15, 0.08) !important;
}

body.theme-autumn .content-card:hover,
body.theme-autumn .pw-content-card:hover,
body.theme-autumn .pw-cat:hover {
  border-color: rgba(217, 119, 6, 0.38) !important;
  box-shadow: 0 14px 30px rgba(180, 83, 9, 0.16) !important;
}

body.theme-autumn .section-title::before,
body.theme-autumn .pw-eyebrow {
  color: #b45309 !important;
}

body.theme-autumn .section-title::before {
  background: linear-gradient(180deg, #f59e0b, #c2410c) !important;
}

body.theme-autumn a {
  color: #b45309;
}
body.theme-autumn a:hover {
  color: #9a3412;
}

body.theme-autumn .badge-cat,
body.theme-autumn .pw-chip {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #92400e !important;
  border: 1px solid rgba(217, 119, 6, 0.22) !important;
}

body.theme-autumn .badge-quality {
  background: rgba(234, 88, 12, 0.12) !important;
  color: #c2410c !important;
  border-color: rgba(234, 88, 12, 0.22) !important;
}

/* ── Home hero automne ── */
body.theme-autumn:has(.pw-hero) {
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.22), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(220, 38, 38, 0.10), transparent 22%),
    radial-gradient(circle at 55% 90%, rgba(180, 83, 9, 0.14), transparent 30%),
    linear-gradient(180deg, #fff8ef 0%, #fde8c8 45%, #fff7ed 100%) !important;
}

body.theme-autumn .pw-hero-inner {
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.82), rgba(255, 244, 228, 0.58)) !important;
  border-color: rgba(217, 119, 6, 0.22) !important;
}

body.theme-autumn .pw-glow-1 { background: rgba(245, 158, 11, 0.35) !important; }
body.theme-autumn .pw-glow-2 { background: rgba(234, 88, 12, 0.22) !important; }
body.theme-autumn .pw-glow-3 { background: rgba(220, 38, 38, 0.12) !important; }

body.theme-autumn .pw-hero-title,
body.theme-autumn .pw-section-title,
body.theme-autumn .pw-card-title,
body.theme-autumn .pw-stat-num {
  color: #7c2d12 !important;
}

body.theme-autumn .pw-hero-title .pw-accent {
  background: linear-gradient(90deg, #d97706, #dc2626) !important;
  -webkit-background-clip: text;
  background-clip: text;
}

@media only all and (max-width:799px)  {    

body.theme-autumn .site-header  { display:none!important; }

}


body.theme-autumn .pw-hero-desc,
body.theme-autumn .pw-section-desc,
body.theme-autumn .pw-card-sub,
body.theme-autumn .pw-cat-desc,
body.theme-autumn .pw-content-title,
body.theme-autumn .pw-top-title {
  color: #78350f !important;
}

body.theme-autumn .pw-search {
  background: rgba(255, 253, 248, 0.88) !important;
  border-color: rgba(217, 119, 6, 0.26) !important;
}
body.theme-autumn .pw-search:focus-within {
  border-color: rgba(217, 119, 6, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14), 0 8px 24px rgba(180, 83, 9, 0.12) !important;
}
body.theme-autumn .pw-search-input-home { color: #7c2d12 !important; }
body.theme-autumn .pw-search-icon { color: #d97706 !important; }

/* ── Formulaires / footer ── */
body.theme-autumn input,
body.theme-autumn textarea,
body.theme-autumn select,
body.theme-autumn .form-control,
body.theme-autumn .form-select {
  background: #fffdf9 !important;
  color: #7c2d12 !important;
  border-color: rgba(217, 119, 6, 0.24) !important;
}

body.theme-autumn input:focus,
body.theme-autumn textarea:focus,
body.theme-autumn select:focus,
body.theme-autumn .form-control:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14) !important;
}

body.theme-autumn .site-footer {
background: linear-gradient(180deg, #fff7ed, #ffedd5) !important;
    border-top: 3px solid transparent !important;
    /* border-image: linear-gradient(90deg, #92400e, #f59e0b, #ea580c, #dc2626, #ea580c, #f59e0b, #92400e) 1 !important; */
    color: #92400e !important;
}

body.theme-autumn .footer-links a { color: #9a3412 !important; }
body.theme-autumn .footer-links a:hover { color: #7c2d12 !important; }
body.theme-autumn .footer-logo { color: #7c2d12 !important; }

/* ── Widgets / pagination ── */
body.theme-autumn .chat-widget,
body.theme-autumn .news-widget {
  background: linear-gradient(180deg, #fffaf3, #fff3e0) !important;
  border-color: rgba(217, 119, 6, 0.28) !important;
}

body.theme-autumn .page-btn.active {
  background: linear-gradient(135deg, #d97706, #c2410c) !important;
  border-color: #b45309 !important;
}

body.theme-autumn .page-btn:hover {
  border-color: #d97706 !important;
  color: #9a3412 !important;
}

/* ── Theme toggle hint (autumn pill option support) ── */
.theme-pill.theme-autumn-btn {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
}

/* Annonce : alignée comme thèmes clair/sombre (compense la guirlande header) */
body.theme-autumn .dash-announce {
  /* margin-top: -40px; */
}
@media (max-width: 900px) {
  body.theme-autumn .dash-announce {
    margin-top: 0;
  }
}

/* Réduction d'effets sur mobile */
@media (max-width: 900px) {
  body.theme-autumn .sidebar::after {
    display: none;
  }
  body.theme-autumn .site-header::after {
    bottom: -11px;
    height: 14px;
    background-size: auto 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-autumn .sidebar::after {
    animation: none;
  }
}
