/* Charger après cemetery.css. Activer : <html data-theme="halloween">.
   Désactiver : retirer data-theme. Aucun effet sans cet attribut.
   Les décors .halloween-* sont affichés uniquement lorsque le thème est actif. */
html[data-theme="halloween"] {
    --cem-ink: #f3e6d2;
    --cem-cream: #19131e;
    --cem-gold: #e8a665;
    --cem-acid: #ffad66;
    background: #100e14;
    color-scheme: dark;
}
html[data-theme="halloween"] body { background: #100e14; color: #f3e6d2; }
[data-theme="halloween"] .cem-header { background: #100e14; border-color: #44303c; }
[data-theme="halloween"] .cem-brand-mark { border-color: #a56b45; }
[data-theme="halloween"] .cem-desktop-nav .cem-nav-button,
[data-theme="halloween"] .cem-mobile-menu .cem-nav-button { background: #ffad66; color: #20120d; }
[data-theme="halloween"] .cem-home-hero {
    position: relative;
    isolation: isolate;
    background: radial-gradient(ellipse at 78% 30%, #60372755, transparent 45%), linear-gradient(120deg, #100e14, #251a2d 65%, #17111b);
}
[data-theme="halloween"] .cem-home-hero::after {
    content: ""; pointer-events: none; position: absolute; z-index: -1;
    inset: 50% -20% -35%; opacity: .45;
    background: radial-gradient(ellipse, #ad849b40, transparent 65%);
    animation: halloween-mist 16s ease-in-out infinite alternate;
}
[data-theme="halloween"] .cem-home-hero-copy h1 { color: #f0bd85; text-shadow: 0 0 45px #db783326; }
[data-theme="halloween"] .cem-home-hero-copy p { color: #e0c9cf; }
[data-theme="halloween"] .cem-home-hero-divider { background: linear-gradient(90deg, transparent, #b77c53, transparent); }
[data-theme="halloween"] .cem-home-hero-divider::after { background: #19121f; color: #ffad66; }
[data-theme="halloween"] .cem-home-hero-visual { position: relative; isolation: isolate; }
[data-theme="halloween"] .cem-home-hero-visual::before {
    content: ""; position: absolute; z-index: -1; width: 210px; aspect-ratio: 1;
    top: 25px; right: 12%; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f5d09c, #ca864e 65%, #875337);
    box-shadow: 0 0 65px #e9903c25;
}
[data-theme="halloween"] .cem-home-hero-visual img { filter: sepia(.25) drop-shadow(0 20px 38px #000a); }
[data-theme="halloween"] .cem-how-it-works { background: #1b151f; color: #f3e6d2; }
[data-theme="halloween"] .cem-section-label { color: #e8a665; }
[data-theme="halloween"] .cem-how-it-works > h2 em { color: #e8a665; }
[data-theme="halloween"] .cem-how-intro,
[data-theme="halloween"] .cem-how-steps p { color: #c5b6c4; }
[data-theme="halloween"] .cem-how-steps,
[data-theme="halloween"] .cem-how-steps article + article { border-color: #493544; }
[data-theme="halloween"] .cem-how-steps span { color: #e8a665; }
[data-theme="halloween"] .cem-home-cta { background: #ffad66; color: #20120d; }
[data-theme="halloween"] .cem-home-cta span { color: inherit; }
[data-theme="halloween"] .cem-hall { background: #120f17; }
[data-theme="halloween"] .cem-hall > p { color: #ffad66; }
[data-theme="halloween"] .cem-hall article { background: linear-gradient(145deg, #2a1e2b, #1b151f); border-color: #52384b; border-radius: 90px 90px 3px 3px; }
[data-theme="halloween"] .cem-hall article > span { color: #e8a665; }
[data-theme="halloween"] .cem-hall article p,
[data-theme="halloween"] .cem-hall blockquote { color: #c5b6c4; }
[data-theme="halloween"] .cem-footer { background: #0e0c11; color: #bcadbd; border-top: 1px solid #392939; }
[data-theme="halloween"] :is(a, button, summary, input, textarea, select):focus-visible { outline: 2px solid #ffd09c; outline-offset: 5px; }
.halloween-only { display: none; }
[data-theme="halloween"] .halloween-only { display: block; }
[data-theme="halloween"] .halloween-season { margin: 0 0 28px; color: #ffbd80; font: 600 10px/1.5 'DM Sans', Arial, sans-serif; letter-spacing: .24em; text-transform: uppercase; }
[data-theme="halloween"] .halloween-pumpkins { position: absolute; bottom: 0; right: 80%; width: clamp(85px, 10vw, 145px); pointer-events: none;  }
.halloween-pumpkin-image { display: block; width: 100%; height: auto; }
[data-theme="halloween"] .cem-home-hero-visual .halloween-pumpkin-image { filter: none; }
[data-theme="halloween"] .halloween-lanterns { position: absolute; bottom: 8%; left: 47%; width: clamp(48px, 5vw, 70px); pointer-events: none; }
[data-theme="halloween"] .halloween-bats { position: absolute; top: 15%; left: 4%; width: 130px; color: #09080c; transform: rotate(-12deg); }
@keyframes halloween-mist { to { transform: translateX(12%) translateY(-6%); } }
@media (max-width: 700px) {
    [data-theme="halloween"] .cem-home-hero-visual::before { width: 150px; right: 15%; }
    [data-theme="halloween"] .halloween-season { margin-bottom: 24px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    [data-theme="halloween"] .cem-home-hero::after { animation: none; }
}
/* Extensions : promenade au cimetière et #BalanceTonEx. */
/* Décors facultatifs, hors du flux et sans interception des interactions. */
.halloween-corner { display: none; }
/* Conteneur pleine largeur : les décors restent au bord de la page,
   indépendamment de la largeur et des marges du contenu des anecdotes. */
.halloween-anecdotes-frame { position: relative; }
[data-theme="halloween"] .halloween-corner {
    display: block; position: absolute; top: 0; left: 0;
    width: clamp(100px, 16vw, 220px); aspect-ratio: 1;
    background: url('../images/halloween-web.svg') top left / contain no-repeat;
    pointer-events: none; user-select: none; z-index: 5; opacity: .65;
}
[data-theme="halloween"] .halloween-corner::after {
    content: ''; position: absolute; top: 0; left: 24%;
    width: 36px; height: 150px;
    background: url('../images/halloween-spider.svg') top center / contain no-repeat;
    transform-origin: 50% 0; animation: halloween-spider-sway 9s ease-in-out infinite alternate;
}
[data-theme="halloween"] .halloween-corner-right { left: auto; right: 0; transform: scaleX(-1); }
[data-theme="halloween"] .halloween-corner-right::after { animation-delay: -4s; height: 125px; }
@keyframes halloween-spider-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@media (max-width: 700px) {
    [data-theme="halloween"] .halloween-corner { width: 80px; opacity: .45; }
    [data-theme="halloween"] .halloween-corner::after { width: 22px; height: 85px; }
}
@media (prefers-reduced-motion: reduce) {
    [data-theme="halloween"] .halloween-corner::after { animation: none; }
}
[data-theme="halloween"] .cem-explorer-page { background: radial-gradient(ellipse at 50% 20%, #392337, #100d15 65%); }
[data-theme="halloween"] .cem-explorer-intro > p:first-child { color: #ffad66; }
[data-theme="halloween"] .cem-explorer-intro > p:last-child,
[data-theme="halloween"] .cem-explorer-help { color: #c5b6c4; }
[data-theme="halloween"] .cem-3d-stage { background: linear-gradient(#130e1a 10%, #352335 55%, #100d14); border-color: #52384b; }
[data-theme="halloween"] .cem-night-sky { background: radial-gradient(ellipse at 50% 100%, #bd713a35, transparent 65%); }
[data-theme="halloween"] .cem-moon-glow { opacity: .95; filter: sepia(1) saturate(2) drop-shadow(0 0 35px #dc8b4566); }
[data-theme="halloween"] .cem-path { background: linear-gradient(90deg, #241923, #58404a 48%, #271d29); }
[data-theme="halloween"] .cem-aisle-toolbar > button,
[data-theme="halloween"] .cem-aisle-picker-toggle,
[data-theme="halloween"] .cem-aisle-sign { background: #251a2b; color: #ffc187; border-color: #735068; }
[data-theme="halloween"] .cem-explorer-help span { color: #ffad66; }
[data-theme="halloween"] .cem-plot-cross { color: #ffd09c; }
[data-theme="halloween"] .cem-plot-stone small { color: #e7dfd3; }
[data-theme="halloween"] .cem-plot.is-empty .cem-plot-stone { border-color: #edb174; background: #6c3d2526; opacity: .8; }
[data-theme="halloween"] .cem-grave-dialog { background: #211725; color: #f3e6d2; border-color: #735068; }
[data-theme="halloween"] body.cem-anecdotes-page { background: radial-gradient(ellipse at 50% 0, #392337, #100e14 800px); color: #f3e6d2; }
[data-theme="halloween"] .cem-anecdotes-hero h1 em,
[data-theme="halloween"] .cem-anecdotes-section-heading h2 em,
[data-theme="halloween"] .cem-anecdotes-form-heading h2 em,
[data-theme="halloween"] .cem-anecdotes-ornament,
[data-theme="halloween"] .cem-anecdote-quote { color: #e8a665; }
[data-theme="halloween"] .cem-anecdotes-eyebrow,
[data-theme="halloween"] .cem-anecdote-meta { color: #efb981; }
[data-theme="halloween"] .cem-anecdotes-intro,
[data-theme="halloween"] .cem-anecdotes-caption,
[data-theme="halloween"] .cem-anecdote-meta span { color: #c5b6c4; }
[data-theme="halloween"] .cem-anecdotes-page .cem-anecdote-card { background: linear-gradient(135deg, #2b1e2d, #1b151f); border-color: #52384b; }
[data-theme="halloween"] .cem-anecdotes-page .cem-anecdotes-button { background: #ffad66; border-color: #ffad66; color: #20120d; }
[data-theme="halloween"] .cem-anecdotes-page .cem-anecdotes-button:hover { background: #ffc187; }
[data-theme="halloween"] .cem-anecdotes-section-heading,
[data-theme="halloween"] .cem-anecdote-share,
[data-theme="halloween"] .cem-anecdotes-terms { border-color: #52384b; }
[data-theme="halloween"] .cem-anecdotes-submission { background: radial-gradient(ellipse at 0 0, #3c2835, #1b151f 65%); border-color: #735068; border-top-color: #e8a665; }
[data-theme="halloween"] .cem-anecdotes-disclaimer { border-color: #e8a665; background: #e8a6650c; }
[data-theme="halloween"] .cem-anecdotes-submission .form-control { background: #130e19; border-color: #735068; color: #f3e6d2; }
[data-theme="halloween"] .cem-anecdotes-submission .form-control:focus { border-color: #ffc187; }
[data-theme="halloween"] .cem-anecdotes-submission .form-check-input { accent-color: #ffad66; }
[data-theme="halloween"] .cem-contact-heading h1 { color: #c47125; }
