/* CAPORAL EVENTS — thème V4 pour les pages publiques et la connexion.
   Reprend la page d'accueil : fond journal et vinyles animé, verre dépoli,
   dégradé bleu / violet / rouge. Chargé après les feuilles de style propres à chaque page. */
body.theme-v4{
  --v4-ink:#0B0718;
  --v4-night:#151040;
  --v4-blue:#4F7BFF;
  --v4-violet:#9B4DFF;
  --v4-red:#FF2D55;
  --v4-pink:#FF3D8B;
  --v4-fg:#F7F4FF;
  --v4-muted:#CFC7EA;
  --v4-label:#FFB3CC;
  --v4-glass:rgba(255,255,255,.09);
  --v4-line:rgba(255,255,255,.24);
  --v4-field:rgba(10,7,26,.45);
  --v4-grad:linear-gradient(100deg,var(--v4-blue) 0%,var(--v4-violet) 48%,var(--v4-red) 100%);
  --v4-display:"Anton","Impact","Haettenschweiler","Arial Narrow Bold",sans-serif;
  --v4-body:"Manrope","Segoe UI","Helvetica Neue",Arial,sans-serif;
  --v4-mono:"IBM Plex Mono","SFMono-Regular",Menlo,Consolas,monospace;
  /* variables historiques du site, remappées sur la nouvelle palette */
  --gold:var(--v4-violet);
  --gold-light:var(--v4-label);
  --ink:var(--v4-fg);
  --muted:var(--v4-muted);
  --night:var(--v4-ink);
  --panel:rgba(255,255,255,.08);
  --line:rgba(255,255,255,.18);
  color-scheme:dark;
  background:var(--v4-ink)!important;
  color:var(--v4-fg)!important;
  font-family:var(--v4-body);
  overflow-x:clip;
}
html:has(body.theme-v4){overflow-x:clip}
body.theme-v4::selection{color:#fff;background:var(--v4-violet)}
body.theme-v4 :focus-visible{outline:2px solid var(--v4-pink);outline-offset:3px}

/* ---------- Fond vivant (injecté par theme-v4.js) ---------- */
.v4-stage{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.v4-stage .v4-paper{position:absolute;inset:-12%;background:url("/assets/fond-journal-vinyles.webp") center/cover;filter:grayscale(.35) contrast(1.05);animation:v4-kenburns 48s ease-in-out infinite alternate}
.v4-stage .v4-tint{position:absolute;inset:0;background:linear-gradient(160deg,rgba(14,16,64,.9) 0%,rgba(54,18,104,.86) 45%,rgba(120,10,38,.88) 100%)}
.v4-stage .v4-blob{position:absolute;width:52vmax;height:52vmax;border-radius:50%;filter:blur(90px);opacity:.5;mix-blend-mode:screen}
.v4-stage .v4-b1{background:var(--v4-blue);top:-18vmax;left:-14vmax;animation:v4-d1 26s ease-in-out infinite alternate}
.v4-stage .v4-b2{background:var(--v4-violet);top:28vh;right:-20vmax;animation:v4-d2 32s ease-in-out infinite alternate}
.v4-stage .v4-b3{background:var(--v4-red);bottom:-26vmax;left:18vw;opacity:.4;animation:v4-d3 38s ease-in-out infinite alternate}
.v4-stage .v4-spot{position:absolute;inset:0;background:radial-gradient(420px circle at var(--mx,50vw) var(--my,30vh),rgba(255,61,139,.2),transparent 60%)}
.v4-stage .v4-vignette{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 40%,transparent 40%,rgba(5,3,14,.6) 100%)}
@keyframes v4-kenburns{0%{transform:scale(1.04)}50%{transform:scale(1.14) translate(-2%,1.5%)}100%{transform:scale(1.08) translate(2%,-2%)}}
@keyframes v4-d1{to{transform:translate(18vw,22vh) scale(1.15)}}
@keyframes v4-d2{to{transform:translate(-24vw,-14vh) scale(.9)}}
@keyframes v4-d3{to{transform:translate(20vw,-18vh) scale(1.2)}}
@keyframes v4-shift{to{background-position:100% 0}}

/* ---------- Fonds des pages et sections : transparents pour laisser voir le thème ---------- */
body.theme-v4 :is(.providers-page,.provider-hero,.provider-section,.recruitment-section,.catering-section,.candidate-section,.venue-hero,.help-hero,.human-section,.project-main,.quote-form-section,.expertise,.site-footer,.account-main){background:transparent!important;border-color:rgba(255,255,255,.12)!important;color:var(--v4-fg)!important}

/* ---------- Typographie ---------- */
body.theme-v4 :is(h1,h2){font-family:var(--v4-display)!important;font-weight:400!important;font-style:normal;text-transform:uppercase;letter-spacing:.005em!important;line-height:.95!important;color:var(--v4-fg)!important;text-wrap:balance}
body.theme-v4 :is(h1,h2) em{display:inline;font-style:normal!important;background:var(--v4-grad);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent!important;animation:v4-shift 6s ease-in-out infinite alternate}
body.theme-v4 h3{font-family:var(--v4-body)!important;font-weight:800!important;font-style:normal!important;letter-spacing:0!important;color:var(--v4-fg)!important}
body.theme-v4 .eyebrow{font-family:var(--v4-mono);font-weight:500;letter-spacing:.2em;color:var(--v4-label)!important}
body.theme-v4 .eyebrow span{background:var(--v4-grad)!important}
body.theme-v4 :is(.lead,.section-heading>p,.gallery-heading>p,.provider-intro p,.help-hero p,.project-intro p,.quote-hero p,.auth-story>p){color:var(--v4-muted)!important}

/* ---------- En-tête : dégradé fondu dans la page ---------- */
body.theme-v4 :is(.quote-header,.account-header){position:sticky!important;top:env(safe-area-inset-top,0px)!important;z-index:40!important;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:12px max(16px,calc((100vw - 1240px)/2)) 22px!important;align-items:center!important;border:0!important;color:var(--v4-fg)!important;background:linear-gradient(180deg,rgba(14,10,40,.78) 0%,rgba(22,24,80,.42) 65%,rgba(22,24,80,0) 100%)!important;backdrop-filter:none!important;transition:background .4s,box-shadow .4s}
body.theme-v4 :is(.quote-header,.account-header).v4-scrolled{background:rgba(16,12,46,.62)!important;backdrop-filter:blur(18px) saturate(160%)!important;-webkit-backdrop-filter:blur(18px) saturate(160%)!important;box-shadow:0 10px 30px rgba(5,3,14,.3)}
body.theme-v4 :is(.quote-header,.account-header) .brand--official::before{width:100px;height:66px}
body.theme-v4 :is(.provider-nav,.help-nav,.project-nav){display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px}
body.theme-v4 :is(.provider-nav,.help-nav,.project-nav)>a:not(.button){position:relative;padding-block:6px;color:var(--v4-fg)!important;font-family:var(--v4-body);font-size:14px!important;font-weight:600;letter-spacing:0!important;text-transform:none!important}
body.theme-v4 :is(.provider-nav,.help-nav,.project-nav)>a:not(.button)::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--v4-grad);transform:scaleX(0);transform-origin:left;transition:transform .35s}
body.theme-v4 :is(.provider-nav,.help-nav,.project-nav)>a:not(.button):is(:hover,[aria-current])::after{transform:scaleX(1)}
body.theme-v4 :is(.provider-nav,.help-nav,.project-nav)>a[aria-current]{color:var(--v4-pink)!important}
body.theme-v4 :is(.quote-header,.account-header) .button{background:linear-gradient(90deg,#FF2D78,var(--v4-violet))!important;border:0!important;border-radius:999px!important;color:#fff!important;font-size:13px!important;letter-spacing:0!important;text-transform:none!important;padding:11px 20px!important;box-shadow:0 8px 24px rgba(255,45,120,.38)}

/* ---------- Boutons ---------- */
body.theme-v4 :is(.button-primary,.auth-primary,.venue-filter-actions button,.venue-card button,.venue-empty button,.assistant-form button,.project-submit button,.quote-form button[type="submit"],.support-form button[type="submit"],.mini-form button[type="submit"]){background:var(--v4-grad)!important;background-size:160% 100%!important;border:0!important;border-radius:999px!important;color:#fff!important;font-family:var(--v4-body);font-weight:800!important;letter-spacing:0!important;text-transform:none!important;box-shadow:0 12px 30px rgba(155,77,255,.4);animation:v4-shift 5s ease-in-out infinite alternate;transition:transform .25s,filter .25s}
body.theme-v4 :is(.button-primary,.auth-primary,.venue-filter-actions button,.venue-card button,.venue-empty button,.project-submit button):hover{filter:brightness(1.1);transform:translateY(-1px)}
body.theme-v4 .button-ghost:not(:is(.quote-header,.account-header) .button){background:rgba(255,255,255,.07)!important;border:1px solid var(--v4-line)!important;border-radius:999px!important;color:var(--v4-fg)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);letter-spacing:0!important;text-transform:none!important}
body.theme-v4 .button-ghost:hover{background:rgba(255,255,255,.14)!important}
body.theme-v4 :is(.package-badge,.venue-number,.assistant-message.user){background:var(--v4-grad)!important;color:#fff!important;border:0!important}

/* ---------- Panneaux en verre ---------- */
body.theme-v4 :is(.provider-hero-card,.event-grid article,.recruitment-card,.recruitment-cta,.mini-form,.venue-filters,.venue-map-panel,.venue-card,.help-promise,.faq-list details,.support-form,.project-card,.project-aside-card,.project-submit,.package-card,.estimate-card,.event-pricing-panel,.calculator-panel,.distance-box,.auth-card,.auth-benefits article,.account-card,.assistant-panel,.assistant-toggle){background:rgba(255,255,255,.09)!important;border:1px solid var(--v4-line)!important;border-radius:22px!important;backdrop-filter:blur(20px) saturate(170%);-webkit-backdrop-filter:blur(20px) saturate(170%);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 22px 55px rgba(6,3,24,.35)!important;color:var(--v4-fg)!important}
body.theme-v4 .auth-card::before{background:var(--v4-grad)!important;height:2px!important}
body.theme-v4 .provider-card{border:1px solid var(--v4-line)!important;border-radius:22px!important;background:rgba(16,12,46,.6)!important;box-shadow:0 22px 55px rgba(6,3,24,.4)!important}
body.theme-v4 .recruitment-card::after{border-top-color:rgba(255,255,255,.2)!important;color:var(--v4-label)!important}
body.theme-v4 .recruitment-card::before{border-color:rgba(255,255,255,.12)!important}
body.theme-v4 .recruitment-icon{color:var(--v4-label)!important}
body.theme-v4 :is(.recruitment-card h3){font-family:var(--v4-body)!important}

/* textes des anciennes sections claires */
body.theme-v4 :is(.provider-section,.recruitment-section) :is(.gallery-heading>p,.recruitment-cta p){color:var(--v4-muted)!important}
body.theme-v4 :is(.provider-section,.recruitment-section) .eyebrow span{background:var(--v4-grad)!important}

/* ---------- Lieux & salles ---------- */
body.theme-v4.venues-page{color:var(--v4-fg)!important}
body.theme-v4 :is(.venue-filter-actions p,.venue-map-panel>p,.venue-description,.venue-card small,.venue-note,.venue-location){color:var(--v4-muted)!important}
body.theme-v4 :is(.venue-card-top){color:var(--v4-label)!important}
body.theme-v4 .venue-card-links a{color:var(--v4-fg)!important}
body.theme-v4 .venue-card-links a:hover{color:var(--v4-pink)!important}
body.theme-v4 .venue-hero a{color:var(--v4-label)!important}
body.theme-v4 .venue-stats span{border-color:var(--v4-line)!important;color:var(--v4-fg)!important;background:rgba(255,255,255,.06)!important}
body.theme-v4 .venue-map{border-radius:16px;overflow:hidden}
body.theme-v4 .venue-pin span{background:var(--v4-grad)!important;color:#fff!important}

/* ---------- Champs de formulaire ---------- */
body.theme-v4 :is(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="range"]),select,textarea){background:var(--v4-field)!important;border:1px solid var(--v4-line)!important;border-radius:14px!important;color:var(--v4-fg)!important;font-family:var(--v4-body)}
body.theme-v4 .auth-field input{border-radius:999px!important}
body.theme-v4 :is(input,select,textarea)::placeholder{color:rgba(247,244,255,.55)!important}
body.theme-v4 :is(input,select,textarea):focus{outline:none!important;border-color:var(--v4-pink)!important;box-shadow:0 0 0 3px rgba(255,61,139,.18)!important}
body.theme-v4 select option{color:#14101f;background:#fff}
body.theme-v4 :is(label,.auth-field span,legend){color:var(--v4-muted)}
body.theme-v4 :is(.service-picker input:checked+span,.option-list input:checked+span){background:rgba(155,77,255,.28)!important;border-color:var(--v4-pink)!important;color:#fff!important}
body.theme-v4 .service-picker span{background:rgba(10,7,26,.4)!important;border-color:var(--v4-line)!important}
body.theme-v4 input[type="checkbox"],body.theme-v4 input[type="radio"]{accent-color:var(--v4-pink)}

/* ---------- Divers ---------- */
body.theme-v4 :is(.auth-status,.auth-back,.auth-try,.recruitment-link,.price-from,.estimate-total strong){color:var(--v4-label)!important}
body.theme-v4 .auth-benefits strong{color:var(--v4-fg)!important}
body.theme-v4 .auth-benefits small,body.theme-v4 .auth-intro,body.theme-v4 .auth-secure-note{color:var(--v4-muted)!important}
body.theme-v4 .auth-card-logo img{width:150px!important;filter:drop-shadow(0 6px 18px rgba(155,77,255,.45))!important}
body.theme-v4 .auth-card h2{font-size:clamp(36px,4vw,48px)!important;text-align:center}
body.theme-v4 .faq-list summary{color:var(--v4-fg)}
body.theme-v4 .faq-list details[open] summary{color:var(--v4-label)}

/* ---------- Pied de page public (public-footer.js) ---------- */
body.theme-v4 .caporal-public-footer{margin:24px auto 32px!important;max-width:1240px;width:calc(100% - 2*max(16px,env(safe-area-inset-left,0px)));padding:32px 0 20px!important;border:1px solid var(--v4-line)!important;border-radius:28px;background:rgba(255,255,255,.08)!important;backdrop-filter:blur(20px) saturate(170%);-webkit-backdrop-filter:blur(20px) saturate(170%);color:var(--v4-muted)!important}
body.theme-v4 .caporal-public-footer .shell{width:auto;padding-inline:32px}
body.theme-v4 .caporal-footer-brand img{width:120px!important;filter:drop-shadow(0 6px 18px rgba(155,77,255,.4))}
body.theme-v4 :is(.caporal-footer-brand p,.caporal-footer-contact span){color:var(--v4-muted)!important;font-size:13px!important}
body.theme-v4 .caporal-footer-block strong{color:var(--v4-label)!important;font-family:var(--v4-mono)}
body.theme-v4 :is(.caporal-footer-links a,.caporal-footer-contact a){color:var(--v4-fg)!important;font-size:14px!important}
body.theme-v4 :is(.caporal-footer-links a,.caporal-footer-contact a,.caporal-footer-bottom a):hover{color:var(--v4-pink)!important}
body.theme-v4 .caporal-footer-bottom{color:var(--v4-muted)!important;font-size:12px!important;border-top-color:rgba(255,255,255,.14)!important}
body.theme-v4 .caporal-footer-bottom a{color:var(--v4-fg)!important}

@media (max-width:620px){
  body.theme-v4 :is(.quote-header,.account-header) .brand--official::before{width:84px;height:56px}
  body.theme-v4 .caporal-public-footer .shell{padding-inline:20px}
}
@media (prefers-reduced-motion:reduce){
  .v4-stage *,body.theme-v4 *{animation:none!important}
}

/* Assistant CAPORAL EVENTS (assistant.js) */
body.theme-v4 .ev-assistant-toggle{background:linear-gradient(90deg,#FF2D78,var(--v4-violet))!important;color:#fff!important;border:0!important;box-shadow:0 10px 28px rgba(255,45,120,.4)!important}
body.theme-v4 .ev-assistant-panel{background:rgba(16,12,46,.92)!important;border:1px solid var(--v4-line)!important;border-radius:22px!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);color:var(--v4-fg)!important}

/* Connexion / création d'espace : affiche en fond */
body.theme-v4.auth-page{background:transparent!important}
body.theme-v4 .auth-bg{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#0B0718}
body.theme-v4 .auth-bg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 32%;filter:saturate(1.05) contrast(1.05);animation:v4-auth-zoom 30s ease-in-out infinite alternate}
body.theme-v4 .auth-bg::after{content:"";position:absolute;inset:0;background:
  linear-gradient(90deg,rgba(11,7,24,.92) 0%,rgba(11,7,24,.72) 38%,rgba(22,12,60,.35) 62%,rgba(11,7,24,.55) 100%),
  linear-gradient(180deg,rgba(14,10,40,.55) 0%,transparent 30%,transparent 70%,rgba(11,7,24,.85) 100%),
  radial-gradient(ellipse at 70% 40%,rgba(155,77,255,.18),transparent 60%)}
body.theme-v4.auth-page .v4-stage{display:none}
body.theme-v4 .auth-card{background:rgba(16,12,46,.42)!important}
@keyframes v4-auth-zoom{from{transform:scale(1.02)}to{transform:scale(1.1) translate(-1%,1%)}}
@media (max-width:900px){
  body.theme-v4 .auth-bg img{object-position:50% 20%}
  body.theme-v4 .auth-bg::after{background:linear-gradient(180deg,rgba(11,7,24,.55) 0%,rgba(11,7,24,.7) 45%,rgba(11,7,24,.9) 100%)}
}

/* ===== Performance (nov. 2026) : même rendu, beaucoup moins de calcul =====
   - halos en dégradé radial au lieu d'un flou CSS de 90px recalculé à chaque image
   - lueur de souris déplacée (transform) au lieu d'être repeinte sur tout l'écran
   - mobiles / écrans tactiles : fond figé et flou de verre allégé */
.v4-blob{filter:none;opacity:.62}
.v4-b1{background:radial-gradient(closest-side,var(--v4-blue) 0%,var(--v4-blue) 50%,transparent 100%)}
.v4-b2{background:radial-gradient(closest-side,var(--v4-violet) 0%,var(--v4-violet) 50%,transparent 100%)}
.v4-b3{background:radial-gradient(closest-side,var(--v4-red) 0%,var(--v4-red) 50%,transparent 100%);opacity:.5}

.v4-stage .v4-spot{inset:auto;left:0;top:0;width:840px;height:840px;margin:-420px 0 0 -420px;background:radial-gradient(closest-side,rgba(255,61,139,.2),transparent 60%);transform:translate3d(var(--mx,50vw),var(--my,30vh),0);will-change:transform}
@media (hover:none),(max-width:780px){
  .v4-blob,.v4-paper,body.theme-v4 .auth-bg img{animation:none!important}
  .v4-stage .v4-spot{display:none}
  body.theme-v4 :is(.quote-header,.account-header),
  body.theme-v4 :is(.quote-header,.account-header).v4-scrolled,
  body.theme-v4 .button-ghost:not(:is(.quote-header,.account-header) .button),
  body.theme-v4 :is(.provider-hero-card,.event-grid article,.recruitment-card,.recruitment-cta,.mini-form,.venue-filters,.venue-map-panel,.venue-card,.help-promise,.faq-list details,.support-form,.project-card,.project-aside-card,.project-submit,.package-card,.estimate-card,.event-pricing-panel,.calculator-panel,.distance-box,.auth-card,.auth-benefits article,.account-card,.assistant-panel,.assistant-toggle),
  body.theme-v4 .caporal-public-footer,
  body.theme-v4 .ev-assistant-panel{-webkit-backdrop-filter:blur(8px)!important;backdrop-filter:blur(8px)!important}
}
