@import url("tokens/root.css");
@import url("structure/layout-frame.css");
@import url("structure/loader.css");
@import url("landings/sections.css");
@import url("base/legals.css");
@import url("landings/cinema.css");
@import url("landings/studio.css");
@import url("modules/contact.css");
@import url("base/brand.css");
@import url("base/button.css");
@import url("modules/components.css");
@import url("modules/socials-unified.css");
@import url("editor/editor-overrides.css");
@import url("structure/mobile.css");

#portfolio_page.portfolio-font {
  font-family: var(--pfcustom-font-family-sans);
  color: var(--pfcustom-text);
  background: var(--pfcustom-bg);
}

/* Landings (.pfcustom-landing) : séparation — sections.css (--pfcustom-section-divider-color) */

/* Hors accueil personnalisé : fond uni via #portfolio_background. */
#portfolio_page.portfolio-font:has(main:not(.pfcustom-landing)) {
  background: transparent;
}

html:has(#header.pfcustom-header) {
  scrollbar-gutter: stable;
}

#portfolio_page.portfolio-font:has(#header.pfcustom-header) {
  scroll-padding-top: calc(var(--pfcustom-header-overlap-offset) + 0.35rem);
}

/* Typo portfolio (reset + zindex.css) : z-index 5 — ne doit pas passer au-dessus du header flottant */
#portfolio_page.portfolio-font:has(#header.pfcustom-header) main :is(p, ul, span, a, h1, h2, h3, h4, h5, h6, article div, form),
#portfolio_page.portfolio-font:has(#header.pfcustom-header) footer :is(p, ul, span, a, h1, h2, h3, h4, h5, h6) {
  z-index: auto;
}

/* Layout horizontal : structure/layout-frame.css */

#portfolio_page.portfolio-font:has(#header.pfcustom-header) main :is(#hero, .pfcustom-hero) {
  padding-top: 0 !important;
}

#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main:not(.pfcustom-landing):not(.pfcustom-contact) > :is(#hero, section):first-child :is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg),
#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main:not(.pfcustom-landing):not(.pfcustom-contact) #hero > .pf-w-wide:is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg),
#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main:not(.pfcustom-landing):not(.pfcustom-contact) > :is(#hero, section):first-child > :is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg),
#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main#about #hero > .pf-w-content,
#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main:not(.pfcustom-landing):not(.pfcustom-contact) #hero > .hero-width,
#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main#blog #hero > :is(:is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg), .pf-w-wide, .pf-w-content, :is(.pf-pad-x-md, .pf-pad-md, .pf-pl-md.pf-pr-md)),
#portfolio_page.portfolio-font:has(#header.pfcustom-header)
  main:has(#blog-article).section-bg:is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg) {
  padding-top: calc(var(--pfcustom-header-overlap-offset) + var(--pfcustom-hero-content-gap)) !important;
}

@media screen and (max-width: 1100px) {
  #portfolio_page.portfolio-font:has(#header.pfcustom-header) {
    --pfcustom-header-overlap-offset: calc(
      max(var(--pfcustom-header-float-inset), env(safe-area-inset-top, 0px))
      + var(--pfcustom-header-float-inset)
      + var(--pfcustom-header-bar-mobile-height)
    );
    scroll-padding-top: calc(var(--pfcustom-header-overlap-offset) + 0.35rem);
  }

  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main:not(.pfcustom-landing):not(.pfcustom-contact) > :is(#hero, section):first-child :is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg),
  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main:not(.pfcustom-landing):not(.pfcustom-contact) #hero > .pf-w-wide:is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg),
  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main:not(.pfcustom-landing):not(.pfcustom-contact) > :is(#hero, section):first-child > :is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg),
  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main#about #hero > .pf-w-content,
  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main:not(.pfcustom-landing):not(.pfcustom-contact) #hero > .hero-width,
  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main#blog #hero > :is(:is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg), .pf-w-wide, .pf-w-content, :is(.pf-pad-x-md, .pf-pad-md, .pf-pl-md.pf-pr-md)),
  #portfolio_page.portfolio-font:has(#header.pfcustom-header)
    main:has(#blog-article).section-bg:is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg) {
    padding-top: calc(var(--pfcustom-header-overlap-offset) + var(--pfcustom-hero-content-gap-mobile)) !important;
  }
}

@media screen and (max-width: 650px) {
  #portfolio_page.portfolio-font:has(#header.pfcustom-header) main :is(.pf-pt-xl, .pf-pad-y-xl) {
    padding-top: clamp(2.5rem, 12vw, 4.5rem) !important;
  }

  #portfolio_page.portfolio-font:has(#header.pfcustom-header) main :is(.pf-pb-xl, .pf-pad-y-xl) {
    padding-bottom: clamp(2.5rem, 12vw, 4.5rem) !important;
  }
}

#portfolio_background {
  background: var(--pfcustom-glass-ambient), var(--pfcustom-bg);
}

#portfolio_page:has(:is(main#blog, #blog-article, main#contact, main#about)) #portfolio_background {
  background: var(--pfcustom-hub-bg-main, var(--pfcustom-hub-bg-main-fallback));
}

#portfolio_page:has(:is(main#blog, #blog-article, main#contact, main#about)) main.bg-color-alt {
  background: transparent;
}

/* Fonds cartes (.pfcustom-card / featured) : ici, pas dans components.css */
#portfolio_page .pfcustom-card,
#portfolio_page .pfcustom-card--featured {
  background: var(--pfcustom-glass-sheen), var(--pfcustom-card-bg);
  backdrop-filter: var(--pfcustom-glass-blur-filter);
  -webkit-backdrop-filter: var(--pfcustom-glass-blur-filter);
}

/* Surfaces type carte (hors .pfcustom-card) — même stack que le header */
#portfolio_page .blog-list .thumbnail-tile,
#portfolio_page .blog-list .thumbnail > a,
#portfolio_page #blog-main-article,
#portfolio_page #blog-about,
#portfolio_page #content article.main,
#portfolio_page #technique .pf-w-content > article,
#portfolio_page #thanks article.main,
#portfolio_page #about-content .pf-w-content > article,
#portfolio_page .cookie-group,
.pfcustom-landing .pfcustom-project-card,
#portfolio_page .pfcustom-contact-members:not(.pfcustom-cast) .pfcustom-contact-member {
  backdrop-filter: var(--pfcustom-glass-blur-filter);
  -webkit-backdrop-filter: var(--pfcustom-glass-blur-filter);
}

/* Boutons : flou désactivé via --pfcustom-btn-blur-filter (fonds pleins) — règle gardée pour le réactiver */
.pfcustom-btn,
#portfolio_page :is(.folio-button, .folio_button, .ariane a),
#header.pfcustom-header .pfcustom-header__menu-toggle {
  backdrop-filter: var(--pfcustom-btn-blur-filter);
  -webkit-backdrop-filter: var(--pfcustom-btn-blur-filter);
}

#portfolio_page.portfolio-font a {
  color: inherit;
}

#portfolio_page.portfolio-font a:hover {
  opacity: 1;
}

#portfolio_page.portfolio-font p {
}

#portfolio_page.portfolio-font :is(h1, h2, h3) {
  font-family: var(--pfcustom-font-family-sans);
}

/* ----- Typographie : gabarit portfolio (cf. headings.css) ----- */

#portfolio_page .pfcustom-landing :is(h1, .pfcustom-type-h1) {
  margin: 0;
  font-weight: var(--pfcustom-type-h1-weight);
  color: var(--pfcustom-type-h1-color);
}

#portfolio_page .pfcustom-landing .pfcustom-hero :is(h1, .pfcustom-type-h1) {
}

#portfolio_page .pfcustom-contact .pfcustom-contact__intro .pfcustom-contact__intro-body {
  color: var(--pfcustom-text-muted);
}

#portfolio_page .pfcustom-contact .pfcustom-contact__intro .pfcustom-contact__intro-body :is(h1, h2, h3) {
  color: var(--pfcustom-text);
  font-weight: var(--pfcustom-type-h3-weight);
}

#portfolio_page .pfcustom-landing .pfcustom-hero .pfcustom-hero__subtitle {
  font-weight: var(--pfcustom-type-subtle-weight);
  color: var(--pfcustom-mockup-text-subtle);
  margin: 0 0 1rem;
}

#portfolio_page .pfcustom-landing h2.pfcustom-heading-split,
#portfolio_page .pfcustom-landing h2.pfcustom-heading-pricing {
  margin: 0 0 1.25rem;
  font-weight: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--pfcustom-space-heading-split-gap);
}

#portfolio_page .pfcustom-landing h2.pfcustom-heading-pricing {
  margin: 0 0 1rem;
}

#portfolio_page .pfcustom-landing .pfcustom-heading-split__strong,
#portfolio_page .pfcustom-landing .pfcustom-heading-pricing__strong {
  font-weight: var(--pfcustom-type-h1-weight);
  color: var(--pfcustom-type-h1-color);
}

#portfolio_page .pfcustom-landing .pfcustom-heading-split__light,
#portfolio_page .pfcustom-landing .pfcustom-heading-pricing__light {
  font-weight: var(--pfcustom-type-subtle-weight);
  color: var(--pfcustom-mockup-text-subtle);
}

#portfolio_page .pfcustom-landing .pfcustom-showcase__title {
  margin: 0 0 0.35rem;
  font-weight: var(--pfcustom-type-h1-weight);
  color: var(--pfcustom-type-h1-color);
}

#portfolio_page .pfcustom-landing .pfcustom-showcase__subtitle {
  margin: 0 0 1rem;
  font-weight: var(--pfcustom-type-subtle-weight);
  color: var(--pfcustom-mockup-text-subtle);
}

#portfolio_page .pfcustom-landing .pfcustom-faq__kicker {
  margin: 0 0 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: var(--pfcustom-type-h3-weight);
  color: var(--pfcustom-accent-title);
}

#portfolio_page .pfcustom-landing .pfcustom-faq__title {
  margin: 0 0 1rem;
  font-weight: var(--pfcustom-type-h1-weight);
  color: var(--pfcustom-text);
}

#portfolio_page .pfcustom-landing :is(h3, .pfcustom-type-h3) {
  font-weight: var(--pfcustom-type-h3-weight);
  color: var(--pfcustom-type-h3-color);
}

#portfolio_page .pfcustom-landing .pfcustom-pricing-card:not(.pfcustom-card--featured) h3,
#portfolio_page .pfcustom-landing .pfcustom-feature-card h3,
#portfolio_page .pfcustom-landing .pfcustom-card--featured.pfcustom-pricing-card h3 {
  color: var(--pfcustom-text);
}

#portfolio_page .pfcustom-contact .pfcustom-contact__infos > .pf-w-wide > h2 {
  margin: 0;
  font-weight: var(--pfcustom-type-h2-weight);
  color: color-mix(in srgb, var(--pfcustom-accent) 24%, var(--pfcustom-mockup-text-subtle));
}

#portfolio_page .pfcustom-contact .pfcustom-contact__form-heading {
  margin: 0 0 1.25rem;
  font-weight: var(--pfcustom-type-h3-weight);
  color: var(--pfcustom-text);
}

/* =============================================================================
 * Projets — liste / fiche : rythme de page, liens de section, alignements
 * (détails visuels cartes / hero dans templates/custom/css/components.css)
 * ============================================================================= */

#portfolio_page.portfolio-font:has(main#projects) #hero :is(.pf-pt-lg, .pf-pad-y-lg, .pf-pad-lg) {
  max-width: min(100%, var(--pfcustom-page-content-max-width));
  margin-inline: auto;
}

#portfolio_page.portfolio-font:has(main#projects) #hero .content-article {
  text-align: inherit;
}

#portfolio_page.portfolio-font main#projects > section.section-bg:not(#hero) .pf-w-wide {
  max-width: min(100%, var(--pfcustom-page-content-max-width));
  margin-inline: auto;
}

#portfolio_page #about-content > h2 a {
  color: var(--pfcustom-text);
  text-decoration: none;
  border-bottom: var(--pfcustom-page-border-width) solid var(--pfcustom-rgba-border-on-dark-medium);
  padding-bottom: 0.15rem;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

#portfolio_page #about-content > h2 a:hover {
  color: var(--pfcustom-accent);
  border-bottom-color: color-mix(in srgb, var(--pfcustom-accent) 45%, transparent);
}

#portfolio_page section#projects > h2 a {
  color: var(--pfcustom-text);
  text-decoration: none;
  border-bottom: var(--pfcustom-page-border-width) solid var(--pfcustom-rgba-border-on-dark-medium);
  padding-bottom: 0.12rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

#portfolio_page section#projects > h2 a:hover {
  color: var(--pfcustom-accent);
  border-bottom-color: color-mix(in srgb, var(--pfcustom-accent) 45%, transparent);
}

#portfolio_page #content article.main a {
  color: var(--pfcustom-accent);
  text-decoration: none;
  border-bottom: var(--pfcustom-page-border-width) solid color-mix(in srgb, var(--pfcustom-accent) 35%, transparent);
}

#portfolio_page #content article.main a:hover {
  color: var(--pfcustom-accent-strong);
  border-bottom-color: color-mix(in srgb, var(--pfcustom-accent-strong) 50%, transparent);
}

/* =============================================================================
 * Bloc Discord — landing (.pfcustom-discord), ex hub/css/modules/discord.css
 * ============================================================================= */

#portfolio_page .pfcustom-landing .pfcustom-discord {
  --pfcustom-discord-blurple: #5865f2;
  --pfcustom-discord-blurple-hover: #4752c4;
  --hub-surface: var(--arktefakt-bg-surface, rgba(30, 31, 34, 0.88));
  --hub-surface-2: var(--arktefakt-bg-surface-secondary, rgba(20, 20, 22, 0.92));
  --hub-border: var(--arktefakt-border-main, rgba(255, 255, 255, 0.08));
  --hub-text: var(--arktefakt-text-main, #f6f6f7);
  --hub-text-muted: var(--arktefakt-text-muted, #a0a0a0);
  --hub-label: var(--arktefakt-text-label, #e2e2e2);
  position: relative;
  overflow: hidden;
  background: var(--pfcustom-bg, #000);
}

#portfolio_page .pfcustom-landing .pfcustom-discord__inner {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

#portfolio_page .pfcustom-landing .pfcustom-discord__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: var(--pfcustom-radius-card);
  border: var(--pfcustom-glass-border);
  background:
    var(--pfcustom-glass-sheen),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--hub-surface) 92%, var(--pfcustom-discord-blurple) 8%) 0%,
      var(--hub-surface-2) 100%
    );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pfcustom-discord-blurple) 12%, transparent),
    var(--pfcustom-glass-shadow-sm);
  backdrop-filter: var(--pfcustom-glass-blur-filter);
  -webkit-backdrop-filter: var(--pfcustom-glass-blur-filter);
}

#portfolio_page .pfcustom-landing .pfcustom-discord__mark {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#portfolio_page .pfcustom-landing .pfcustom-discord__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(3.5rem, 8vw, 4.5rem);
  height: clamp(3.5rem, 8vw, 4.5rem);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--pfcustom-discord-blurple), #3c45a5);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--pfcustom-discord-blurple) 45%, transparent);
}

#portfolio_page .pfcustom-landing .pfcustom-discord__logo-wrap svg {
  width: 55%;
  height: auto;
  display: block;
}

#portfolio_page .pfcustom-landing .pfcustom-discord__body {
  min-width: 0;
  text-align: left;
}

#portfolio_page .pfcustom-landing .pfcustom-discord__title {
  margin: 0 0 0.65rem;
  font-weight: var(--pfcustom-type-h2-weight, 700);
  color: var(--hub-text);
}

#portfolio_page .pfcustom-landing .pfcustom-discord__text {
  margin: 0 0 1.1rem;
  color: var(--hub-text-muted);
}

#portfolio_page .pfcustom-landing .pfcustom-discord__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

#portfolio_page .pfcustom-landing .pfcustom-discord__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: var(--pfcustom-btn-padding);
  border-radius: var(--pfcustom-radius-pill);
  font-weight: var(--pfcustom-btn-font-weight);
  text-decoration: none;
  color: #fff !important;
  background: var(--pfcustom-btn-sheen), var(--pfcustom-discord-blurple);
  backdrop-filter: var(--pfcustom-btn-blur-filter);
  -webkit-backdrop-filter: var(--pfcustom-btn-blur-filter);
  border: none;
  box-shadow: 0 2px 0 color-mix(in srgb, #000 22%, transparent);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

#portfolio_page .pfcustom-landing .pfcustom-discord__btn:hover {
  background: var(--pfcustom-btn-sheen), var(--pfcustom-discord-blurple-hover);
  transform: translateY(-1px);
}

#portfolio_page .pfcustom-landing .pfcustom-discord__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media screen and (max-width: 640px) {
  #portfolio_page .pfcustom-landing .pfcustom-discord__card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #portfolio_page .pfcustom-landing .pfcustom-discord__btn:hover {
    transform: none;
  }
}
