/* ==========================================================================
   Palette Halloween — noir, orange, blanc cassé (site Alliance)
   Charge après site.css ; complète les surcharges inline retirées dans base.html
   ========================================================================== */

:root.theme-halloween,
:root.halloween {
  color-scheme: dark;

  --at-hw-black: #0a0706;
  --at-hw-ink: #12100e;
  --at-hw-surface: #1a1410;
  --at-hw-card: #221a14;
  --at-hw-card-hover: #2a2018;
  --at-hw-orange: #ff7a1a;
  --at-hw-orange-bright: #ff9f43;
  --at-hw-orange-deep: #c2410c;
  --at-hw-ember: #ff5500;
  --at-hw-white: #faf6f0;
  --at-hw-muted: #c9bdb0;
  --at-hw-dim: #9a8f82;
  --at-hw-border: rgb(255 122 26 / 0.35);
  --at-hw-border-soft: rgb(255 180 100 / 0.18);
  --at-hw-panel: #2a211a;
  --at-hw-panel-elevated: #352818;
  --at-hw-panel-footer: #1f1812;

  --hw-pumpkin: var(--at-hw-orange);
  --hw-ember: var(--at-hw-ember);
  --hw-witch: #1a1208;
  --hw-ghost: var(--at-hw-white);
  --hw-bat-color: rgb(8 6 5 / 0.92);
  --hw-watermark: rgb(255 140 60 / 0.28);
  --hw-watermark-strong: rgb(255 180 100 / 0.45);
}

/* —— Fond & typographie globale —— */
body.theme-halloween {
  background: linear-gradient(
    180deg,
    var(--at-hw-black) 0%,
    var(--at-hw-ink) 40%,
    #0f0c0a 100%
  ) !important;
  color: var(--at-hw-white) !important;
}

.theme-halloween ::selection {
  background: var(--at-hw-orange);
  color: var(--at-hw-black);
}

/* Nav forcée claire → barre sombre Halloween */
html.theme-halloween .force-light-nav {
  background-color: var(--at-hw-surface) !important;
  color: var(--at-hw-white) !important;
  border-color: var(--at-hw-border) !important;
  box-shadow: 0 4px 24px rgb(0 0 0 / 0.45);
}

html.theme-halloween .force-light-link {
  color: var(--at-hw-white) !important;
}

html.theme-halloween .force-light-link:hover {
  color: var(--at-hw-orange-bright) !important;
}

html.theme-halloween #mobile-menu-btn,
html.theme-halloween #mobile-menu-icon {
  color: var(--at-hw-white) !important;
}

html.theme-halloween header .border-gray-100,
html.theme-halloween header .border-b.border-gray-100 {
  border-color: var(--at-hw-border-soft) !important;
}

/* Barre supérieure : liseré orange */
html.theme-halloween header > .bg-brandDark {
  background: linear-gradient(90deg, #0d0a08, #1a1008 50%, #0d0a08) !important;
  box-shadow: inset 0 -2px 0 var(--at-hw-orange);
}

html.theme-halloween header .text-gray-600 {
  color: var(--at-hw-dim) !important;
}

html.theme-halloween .text-brandRed,
html.theme-halloween .text-red-600,
html.theme-halloween .text-red-700 {
  color: var(--at-hw-orange-bright) !important;
}

html.theme-halloween .bg-brandRed,
html.theme-halloween .at-btn-primary {
  background: linear-gradient(135deg, var(--at-hw-orange-deep), var(--at-hw-orange)) !important;
  color: var(--at-hw-white) !important;
  border: 1px solid rgb(255 200 140 / 0.35) !important;
}

html.theme-halloween .at-btn-primary:hover,
html.theme-halloween .bg-brandRed:hover {
  background: linear-gradient(135deg, var(--at-hw-orange), var(--at-hw-orange-bright)) !important;
}

html.theme-halloween .at-btn-secondary {
  background: linear-gradient(135deg, #2a1808, var(--at-hw-orange-deep)) !important;
  color: var(--at-hw-white) !important;
}

html.theme-halloween .at-section-alt {
  background-color: var(--at-hw-ink) !important;
  border-color: var(--at-hw-border-soft) !important;
}

html.theme-halloween .at-focus-ring:focus-visible {
  --tw-ring-color: var(--at-hw-orange) !important;
  --tw-ring-offset-color: var(--at-hw-black) !important;
}

/* —— Surfaces Tailwind fréquentes —— */
.theme-halloween .bg-white:not(.at-brand-logo-plate):not(.at-logo-well) {
  background-color: var(--at-hw-card) !important;
  color: var(--at-hw-white);
}

.theme-halloween .bg-gray-50:not(.at-logo-well),
.theme-halloween .bg-gray-100 {
  background-color: var(--at-hw-surface) !important;
}

.theme-halloween .bg-red-50 {
  background-color: rgb(255 122 26 / 0.22) !important;
  color: var(--at-hw-orange-bright) !important;
}

.theme-halloween .bg-gray-200 {
  background-color: var(--at-hw-card-hover) !important;
}

.theme-halloween .text-gray-800,
.theme-halloween .text-gray-700,
.theme-halloween .text-gray-900,
.theme-halloween .text-brandDark {
  color: var(--at-hw-white) !important;
}

.theme-halloween .text-gray-600,
.theme-halloween .text-gray-500 {
  color: var(--at-hw-muted) !important;
}

.theme-halloween .text-gray-400 {
  color: var(--at-hw-dim) !important;
}

.theme-halloween .border-gray-100,
.theme-halloween .border-gray-200,
.theme-halloween .border-gray-300 {
  border-color: var(--at-hw-border-soft) !important;
}

.theme-halloween .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
.theme-halloween .divide-y.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--at-hw-border-soft) !important;
}

.theme-halloween .shadow-md,
.theme-halloween .shadow-lg,
.theme-halloween .shadow-xl,
.theme-halloween .shadow-2xl {
  box-shadow:
    0 4px 24px rgb(0 0 0 / 0.55),
    0 0 0 1px var(--at-hw-border-soft) !important;
}

/* —— Héros & sections bleues → nuit orange —— */
.theme-halloween #home-hero-section,
.theme-halloween .from-brandBlue,
.theme-halloween .bg-brandBlue {
  background: linear-gradient(
    135deg,
    #0d0a08 0%,
    #3d1a06 42%,
    #1a0f06 100%
  ) !important;
}

.theme-halloween #home-hero-section .via-indigo-900 {
  --tw-gradient-stops: var(--tw-gradient-from), #2a1206, var(--tw-gradient-to) !important;
}

.theme-halloween .bg-gradient-to-br.from-brandBlue {
  background-image: linear-gradient(
    to bottom right,
    #1a0f06,
    #4a2008,
    #0d0a08
  ) !important;
}

.theme-halloween .text-brandBlue,
.theme-halloween .text-indigo-900,
.theme-halloween .text-blue-600,
.theme-halloween .text-blue-700 {
  color: var(--at-hw-orange-bright) !important;
}

.theme-halloween .bg-brandBlue {
  background-color: var(--at-hw-orange-deep) !important;
}

/* —— Liens dans le contenu —— */
.theme-halloween main a:not(.at-btn-primary):not(.at-btn-secondary):not([class*="bg-"]) {
  color: var(--at-hw-orange-bright);
}

.theme-halloween main a:not(.at-btn-primary):hover {
  color: var(--at-hw-white);
}

/* —— Pied de page —— */
.theme-halloween footer.bg-brandDark {
  background: linear-gradient(180deg, #0d0a08, #050403) !important;
  border-top: 2px solid var(--at-hw-orange) !important;
}

.theme-halloween footer .text-gray-300:hover,
.theme-halloween footer a:hover {
  color: var(--at-hw-orange-bright) !important;
}

/* —— Cartes nouvelles & tableaux : fond fixe opaque (le reste du site garde l’ambiance) —— */
.theme-halloween #news-section-container,
.theme-halloween .news-carousel {
  position: relative;
  z-index: 46;
}

.theme-halloween .news-carousel-slide {
  position: relative;
  z-index: 1;
  background-color: var(--at-hw-panel) !important;
  border: 2px solid rgb(255 122 26 / 0.45) !important;
}

.theme-halloween .news-carousel-slide > div.border-t.bg-gray-50 {
  background-color: var(--at-hw-panel-footer) !important;
}

.theme-halloween .news-card-latest {
  background-color: var(--at-hw-panel-elevated) !important;
  background-image: none !important;
  border-color: var(--at-hw-orange) !important;
  box-shadow: 0 12px 32px -10px rgb(255 122 26 / 0.45) !important;
}

.theme-halloween .news-date-latest {
  color: var(--at-hw-orange-bright) !important;
}

.theme-halloween .news-carousel-btn {
  background-color: var(--at-hw-panel-elevated) !important;
  color: var(--at-hw-white) !important;
  border-color: var(--at-hw-border) !important;
}

.theme-halloween table {
  position: relative;
  z-index: 46;
  background-color: var(--at-hw-panel) !important;
  border-collapse: separate;
}

.theme-halloween table th,
.theme-halloween table td {
  background-color: var(--at-hw-panel) !important;
  color: var(--at-hw-white) !important;
  border-color: var(--at-hw-border-soft) !important;
}

.theme-halloween .outage-page-body table,
.theme-halloween #outages-section-wrapper table {
  z-index: 46;
}

.theme-halloween .news-latest-strip {
  background: linear-gradient(90deg, var(--at-hw-orange-deep), var(--at-hw-orange)) !important;
}

.theme-halloween .news-carousel-track {
  scrollbar-color: var(--at-hw-orange) transparent;
}

/* —— Champs de formulaire —— */
.theme-halloween input,
.theme-halloween textarea,
.theme-halloween select {
  background-color: var(--at-hw-surface) !important;
  color: var(--at-hw-white) !important;
  border-color: var(--at-hw-border-soft) !important;
}

.theme-halloween input::placeholder,
.theme-halloween textarea::placeholder {
  color: var(--at-hw-dim) !important;
}

/* —— Puces / badges top bar (garder lisibles) —— */
.theme-halloween header .bg-purple-600 {
  background-color: #3d2208 !important;
  border: 1px solid var(--at-hw-border);
}

.theme-halloween header .bg-blue-600 {
  background-color: #1a2838 !important;
}

.theme-halloween header .text-green-400 {
  color: #7dd87d !important;
}

.theme-halloween .hw-fog {
  background:
    radial-gradient(40% 70% at 20% 100%, rgb(255 122 26 / 0.2), transparent 70%),
    radial-gradient(35% 60% at 65% 100%, rgb(255 60 0 / 0.14), transparent 70%),
    radial-gradient(30% 55% at 95% 100%, rgb(255 180 100 / 0.1), transparent 70%) !important;
}

/* —— Logos Alliance : fond blanc unique, tailles contrôlées —— */
html.theme-halloween a.at-brand-logo-link,
html.theme-halloween .at-brand-logo-plate,
html.theme-halloween .at-logo-well {
  background-color: #ffffff !important;
  color: #1a1a1a;
}

html.theme-halloween header a.at-brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  max-width: 11rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid rgb(0 0 0 / 0.1);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
  line-height: 0;
  position: relative;
  z-index: 1;
}

html.theme-halloween header a.at-brand-logo-link img.at-brand-logo {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: block;
  height: 2.75rem !important;
  max-height: 2.75rem;
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
}

html.theme-halloween .at-brand-logo-plate {
  border-color: rgb(0 0 0 / 0.12) !important;
}

html.theme-halloween .at-brand-logo-plate img.at-brand-logo,
html.theme-halloween .at-logo-well img.at-brand-logo {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

html.theme-halloween .at-logo-well {
  border-color: rgb(0 0 0 / 0.12) !important;
}

html.theme-halloween .at-logo-well img:not(.at-brand-logo) {
  background-color: #ffffff !important;
  border-radius: 0.25rem;
}

html.theme-halloween #home-hero-section .at-brand-logo-plate {
  display: none;
}

@media (min-width: 768px) {
  html.theme-halloween #home-hero-section .at-brand-logo-plate {
    display: inline-flex;
  }

  html.theme-halloween header a.at-brand-logo-link img.at-brand-logo {
    height: 3.25rem !important;
    max-height: 3.25rem;
  }
}
