/* ============================================================================
   BRAND TOKENS — Base neutre plateforme (noir / blanc / gris)
   Plateforme : Alu-Rex Partners
   ----------------------------------------------------------------------------
   Fallback global avant le CSS généré par installateur (`assets/css/generated/{slug}.css`).
   Chaque site écrase ces valeurs au build via `scripts/lib/generate-theme-css.js`.

   Ordre de chargement recommandé dans <head> :
       1. main.css                  (theme Bexon de base)
       2. brand-tokens.css          (← ce fichier — override les couleurs/fonts)
       3. typography-system.css     (système typo fluide)
       4. button-fill-hover.css     (effet hover boutons)
   ============================================================================ */


/* ============================================================================
   SECTION 1 — IDENTITÉ DE MARQUE   👈 SEULE SECTION À MODIFIER PAR CLIENT
   ============================================================================ */
:root {

  /* --- Couleur primaire de la marque (CTA, accents, liens, surlignages) --- */
  --brand-primary:        #333333;
  --brand-primary-rgb:    51, 51, 51;
  --brand-primary-dark:   #2a2a2a;
  --brand-primary-light:  #4d4d4d;

  --brand-secondary:      #111111;
  --brand-dark:           #111111;
  --brand-dark-rgb:       17, 17, 17;
  --brand-dark-soft:      #1f1f1f;
  --brand-dark-2:         #292929;

  --brand-bg-soft:        #ebebeb;
  --brand-bg-softer:      #f5f5f5;
  --brand-bg-white:       #ffffff;

  --brand-text-heading:   #333333;
  --brand-text-body:      #333333;
  --brand-text-muted:     #666666;
  --brand-text-soft:      #999999;
  --brand-text-on-dark:   rgba(255, 255, 255, 0.85);

  /* --- Bordures --- */
  --brand-border:         #cccccc;
  --brand-border-dark:    #222222;
  --brand-border-on-dark: rgba(255, 255, 255, 0.20);

  /* --- Typographie ---
     General Sans (Indian Type Foundry) — variable font self-hostée.
     Déclarée dans `assets/css/fonts.css`. La fallback stack utilise les
     polices système pour 0 ms de FOIT avant que la font ne charge. */
  --brand-font-body:      'General Sans', system-ui, -apple-system, BlinkMacSystemFont,
                          'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --brand-font-heading:   'General Sans', system-ui, -apple-system, BlinkMacSystemFont,
                          'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --brand-font-display:   'General Sans', system-ui, -apple-system, BlinkMacSystemFont,
                          'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* --- Logo & assets ---
     Utilisable via : background-image: var(--brand-logo); */
  --brand-logo:           url('../images/logos/Logo_gouttieres_boreal.svg');
  --brand-logo-white:     url('../images/logos/Logo_gouttieres_boreal.svg');
  --brand-favicon:        url('../images/fav.png');

  /* --- Hero overlay (dégradé du slider d'accueil) --- */
  --brand-hero-overlay:        rgba(0, 0, 0, 0.7);
  --brand-hero-overlay-mid:    rgba(0, 0, 0, 0.5);
  --brand-hero-overlay-soft:   rgba(0, 0, 0, 0.2);

  /* --- Navigation (menu sur hero / header transparent) --- */
  --brand-nav-text:            #ffffff;
  --brand-nav-text-hover:      var(--brand-primary);
  --brand-nav-text-active:     var(--brand-primary);
  --brand-nav-bg:              rgba(255, 255, 255, 0.1);
  --brand-nav-bg-opacity:      10;
  --brand-nav-bg-blur:         10px;

  /* --- Boutons CTA --- */
  --brand-btn-bg:              var(--brand-primary);
  --brand-btn-icon-bg:         var(--brand-primary-dark);
  --brand-btn-text:            var(--brand-bg-white);
  --brand-btn-radius:          5px;
  --brand-btn-padding:         5px;
  --brand-btn-padding-lg:        7px;
  --brand-btn-icon-radius:     max(0px, calc(var(--brand-btn-radius) - var(--brand-btn-padding)));
  --brand-btn-icon-radius-lg:  max(0px, calc(var(--brand-btn-radius) - var(--brand-btn-padding-lg)));
  --brand-btn-hover-fill:      var(--brand-dark);

  /* --- Cartes & panneaux (boîtes) --- */
  --brand-card-radius:         16px;

  /* --- Lueurs & dégradés décoratifs (sections sombres, produits, processus) --- */
  --brand-glow-05:        rgba(51, 51, 51, 0.05);
  --brand-glow-15:        rgba(51, 51, 51, 0.15);
  --brand-glow-25:        rgba(51, 51, 51, 0.25);
  --brand-glow-30:        rgba(51, 51, 51, 0.3);
  --brand-glow-35:        rgba(51, 51, 51, 0.35);
  --brand-glow-45:        rgba(51, 51, 51, 0.45);

  /* --- Coordonnées de l'entreprise (utilisables via attr() ou JS si besoin)
     Note : ces tokens sont informatifs — les coordonnées affichées restent
     pour l'instant dans les pages HTML. */
  --brand-name:           'Gouttières Boréal';
  --brand-phone:          '(418) 655-2342';
  --brand-email:          'info@gouttieresboreal.com';
}


/* ============================================================================
   SECTION 2 — MAPPING DES VARIABLES BEXON
   ----------------------------------------------------------------------------
   Réassigne les variables natives du template Bexon depuis les brand tokens.
   ⚠️  NE PAS modifier cette section sauf si tu veux découpler la marque
   du theme Bexon. Modifie la SECTION 1 à la place.
   ============================================================================ */
:root {
  /* Couleurs de marque ----------------------------------------------------- */
  --tj-color-theme-primary:    var(--brand-primary);
  --tj-color-theme-bg:         var(--brand-bg-soft);
  --tj-color-theme-bg-2:       var(--brand-bg-soft);
  --tj-color-theme-bg-3:       var(--brand-dark-2);
  --tj-color-theme-dark:       var(--brand-dark);
  --tj-color-theme-dark-2:     var(--brand-dark-soft);
  --tj-color-theme-dark-3:     var(--brand-text-body);
  --tj-color-theme-dark-4:     var(--brand-text-muted);

  /* Texte ----------------------------------------------------------------- */
  --tj-color-heading-primary:  var(--brand-text-heading);
  --tj-color-text-body:        var(--brand-text-body);
  --tj-color-text-body-2:      var(--brand-text-soft);
  --tj-color-text-body-3:      var(--brand-text-muted);
  --tj-color-text-body-4:      var(--brand-dark-soft);
  --tj-color-text-body-5:      var(--brand-text-on-dark);

  /* Surfaces -------------------------------------------------------------- */
  --tj-color-grey-1:           var(--brand-bg-softer);
  --tj-color-grey-2:           var(--brand-text-soft);
  --tj-color-common-white:     var(--brand-bg-white);

  /* Bordures -------------------------------------------------------------- */
  --tj-color-border-1:         var(--brand-border);
  --tj-color-border-2:         var(--brand-border-dark);
  --tj-color-border-4:         var(--brand-border-on-dark);

  /* Typographie ----------------------------------------------------------- */
  --tj-ff-body:                var(--brand-font-body);
  --tj-ff-heading:             var(--brand-font-heading);
}


/* ============================================================================
   SECTION 3 — COMPOSANTS CUSTOM
   ----------------------------------------------------------------------------
   Branche les composants ajoutés au site (button-fill, hero overlay…) sur
   les brand tokens. Si tu ajoutes de nouveaux composants custom, attache-les
   ici plutôt que de hardcoder une couleur.
   ============================================================================ */

/* ----- Rayon global des boîtes (cartes, héros, sections, panneaux…) -----
   Piloté par --brand-card-radius (admin / themes/installers/*.json → CSS généré).
   Exceptions : boutons CTA, pastilles rondes, icônes, menu mobile, lecteur vidéo. */
body :is(#smooth-content, .tj-footer-section) :is(
  /* Héros & bannières */
  .tj-slider-section,
  .tj-slider-item,
  .tj-banner-section,
  .banner-area,
  [class*="banner-"],
  [class*="hero-"],
  [class*="slider-wrapper"],
  [class*="slider-content"],
  [class*="slider-bg"],
  [class*="thumb-item"],
  /* Sections encadrées (dont « Built for every climate » / service-2) */
  section[class*="tj-"],
  [class*="tj-"][class*="-section"],
  [class*="-wrapper"],
  [class*="content-wrap"],
  [class*="-area"]:not(.btn-area),
  /* Cartes, panneaux, blocs */
  [class*="-card"],
  [class*="-box"],
  [class*="-panel"],
  [class*="-item"],
  [class*="feature-"],
  [class*="blog-"],
  [class*="post-"],
  [class*="testimonial-"],
  [class*="project-"],
  [class*="team-"],
  [class*="pricing-"],
  [class*="faq-"],
  [class*="choose-"],
  [class*="about-"],
  [class*="contact-"],
  [class*="widget-"],
  [class*="subscribe"],
  [class*="cta-"],
  [class*="page-header"],
  [class*="page-kicker"],
  [class*="boreal-"],
  [class*="h5-"],
  [class*="h6-"],
  [class*="h7-"],
  [class*="h8-"],
  [class*="h9-"],
  [class*="h10-"],
  .nice-select,
  blockquote,
  table,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  select,
  textarea,
  iframe
):not(
  .tj-primary-btn,
  .tj-primary-btn-lg,
  .tj-icon-btn,
  .tji-icon-btn,
  .text-btn,
  .btn-icon,
  .btn-fill,
  .video-btn,
  .banner-scroll,
  .scroll-down,
  .tj-scroll-btn,
  [class*="__icon"],
  .service-icon,
  .process-step,
  .swiper-slide,
  .swiper-wrapper,
  .swiper-pagination,
  .mean-container,
  .mobile_menu,
  .vbox-container,
  img,
  picture,
  video,
  svg,
  button
) {
  border-radius: var(--brand-card-radius) !important;
}

/* Formulaire de contact — champs toujours à coins droits */
body :is(#smooth-content, .tj-footer-section) .contact-form .form-input :is(
  input,
  textarea,
  select,
  .nice-select
) {
  border-radius: 0 !important;
}

body :is(#smooth-content, .tj-footer-section) .contact-form .form-input .nice-select .list {
  border-radius: 0 !important;
}

/* Médias dans boîtes : coins = rayon de la boîte parente */
body :is(#smooth-content, .tj-footer-section) :is(
  .banner-img img,
  .banner-vimeo-bg,
  .banner-vimeo-iframe,
  .service-item__media img,
  .tj-slider-item .slider-bg-image__media,
  .tj-slider-item .thumb-item img,
  [class*="-card"] img,
  [class*="-box"] img,
  [class*="banner-"] img
) {
  border-radius: inherit !important;
}

.text-btn .btn-icon {
  border-radius: max(0px, calc(var(--brand-card-radius) * 0.35)) !important;
}

/* Barre de navigation & retour en haut (hors #smooth-content) */
body .header-area .header-wrapper,
body .header-area.header-sticky,
body .header-top,
body .header-area .search_popup,
body .lang-switcher,
body .lang-switcher__option,
#tj-back-to-top,
#tj-back-to-top-percentage {
  border-radius: var(--brand-card-radius) !important;
}

/* ----- Bouton « fill hover » (assets/css/button-fill-hover.css) -----
   Couleur de remplissage par défaut + variantes utilitaires.

   La classe `.btn-fill` (à appliquer sur n'importe quel `<a>` ou `<button>`)
   reçoit l'effet d'overlay défini dans `button-fill-hover.css`. C'est ici
   qu'on définit la couleur que prend l'overlay. */
.btn-fill::before {
  background-color: var(--brand-primary);
}
.btn-fill.btn-fill--dark::before {
  background-color: var(--brand-dark);
}
.btn-fill.btn-fill--light::before {
  background-color: var(--brand-bg-soft);
}
.btn-fill.btn-fill--white::before {
  background-color: var(--brand-bg-white);
}


/* ----- Application automatique aux boutons natifs Bexon ------------------
   Les boutons natifs du template (`.tj-primary-btn` et variantes) reçoivent
   automatiquement l'effet de remplissage — pas besoin d'ajouter `.btn-fill`
   sur chaque <a> du HTML. Si tu ne veux PAS l'effet sur un bouton précis,
   ajoute la classe `no-btn-fill` dessus.

   Couleurs intelligentes :
     - bouton plein vert (défaut)        → overlay = dark
     - bouton plein dark (`.btn-dark`)   → overlay = primary
     - bouton transparent                → overlay = primary
*/
.tj-primary-btn:not(.no-btn-fill),
.tj-primary-btn-lg:not(.no-btn-fill) {
  position: relative;
  overflow: hidden;
}
.tj-primary-btn:not(.no-btn-fill)::before,
.tj-primary-btn-lg:not(.no-btn-fill)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;                         /* derrière .btn-text et .btn-icon */
  background-color: var(--brand-btn-hover-fill, var(--brand-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
  will-change: transform;
  border-radius: inherit;
  pointer-events: none;
}
.tj-primary-btn:not(.no-btn-fill):hover::before,
.tj-primary-btn:not(.no-btn-fill):focus-visible::before,
.tj-primary-btn-lg:not(.no-btn-fill):hover::before,
.tj-primary-btn-lg:not(.no-btn-fill):focus-visible::before {
  transform: scaleX(1);
}

/* Variante : bouton plein dark → overlay vert primary */
.tj-primary-btn.btn-dark:not(.no-btn-fill)::before {
  background-color: var(--brand-primary);
}

/* Variante : bouton transparent → overlay vert primary */
.tj-primary-btn.transparent-btn:not(.no-btn-fill)::before {
  background-color: var(--brand-primary);
}

/* S'assurer que les enfants restent au-dessus de l'overlay.
   Le `.btn-icon` a déjà son propre background dark — il reste un carré
   distinct par-dessus l'overlay, ce qui est l'effet attendu. */
.tj-primary-btn:not(.no-btn-fill) > *,
.tj-primary-btn-lg:not(.no-btn-fill) > * {
  position: relative;
  z-index: 1;
}

/* Désactivation du slide-up natif du texte au hover.
   Le theme Bexon fait monter le texte (translateY(-30px)) au hover, ce qui
   entre en compétition visuelle avec notre overlay de remplissage. On force
   le texte à rester statique — seul l'overlay anime le bouton. */
.tj-primary-btn:hover .btn-text span,
.tj-primary-btn:focus-visible .btn-text span,
.tj-primary-btn-lg:hover .btn-text span,
.tj-primary-btn-lg:focus-visible .btn-text span {
  transform: none;
}

/* Accessibilité : pas d'animation si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
  .tj-primary-btn:not(.no-btn-fill)::before,
  .tj-primary-btn-lg:not(.no-btn-fill)::before {
    transition: none;
  }
}

/* ----------------------------------------------------------------------------
   Préchargeur plein écran — désactivé (plus d’overlay « Loading… » au démarrage).
   Les initialisations WOW / GSAP restent dans main.js sur l’événement « load », sans pause.
   ---------------------------------------------------------------------------- */
body .tj-preloader {
  display: none !important;
  pointer-events: none;
}

/* Scroll natif (mobile/touch) — ScrollSmoother désactivé dans main.js */
body.native-scroll #smooth-wrapper {
  overflow: visible !important;
  height: auto !important;
  position: static !important;
}

body.native-scroll #smooth-content {
  transform: none !important;
  will-change: auto !important;
  padding-bottom: 0 !important;
}


/* -----------------------------------------------------------------------------
   Méga-menu « démo » (.tj-demo-thumb) : bouton sur l’image — survol lisible.
   Le thème (translateY + text-shadow + hover) donnait souvent foncé sur foncé.
   Survol demandé : libellé blanc sur fond sombre ; pastille/flèche = carré blanc
   avec flèche foncée.
   --------------------------------------------------------------------------- */
.tj-demo-thumb .tj-demo-button .tj-primary-btn .btn-text span {
  text-shadow: none;
}

.tj-demo-thumb .tj-demo-button .tj-primary-btn:hover .btn-text span,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:focus-visible .btn-text span {
  transform: none;
}

.tj-demo-thumb .tj-demo-button .tj-primary-btn:hover,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:focus-visible {
  background-color: var(--tj-color-theme-dark);
}

.tj-demo-thumb .tj-demo-button .tj-primary-btn:hover .btn-text,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:focus-visible .btn-text,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:hover .btn-text span,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:focus-visible .btn-text span {
  color: var(--tj-color-common-white);
}

.tj-demo-thumb .tj-demo-button .tj-primary-btn:hover .btn-icon,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:focus-visible .btn-icon {
  background-color: var(--tj-color-common-white);
}

.tj-demo-thumb .tj-demo-button .tj-primary-btn:hover .btn-icon i,
.tj-demo-thumb .tj-demo-button .tj-primary-btn:focus-visible .btn-icon i {
  color: var(--tj-color-theme-dark);
  transform: none;
}

/* Hero slider — overlay sombre (Header-1) : valeurs par défaut, écrasées par generated/{slug}.css */
.tj-slider-item {
  background-color: #000;
}

/* Hero slider — images plein cadre, centrées (object-fit: cover) */
.tj-slider-section .hero-slider {
  overflow: hidden;
}
.tj-slider-section .hero-slider .swiper-wrapper,
.tj-slider-section .hero-slider .swiper-slide,
.tj-slider-section .hero-slider .tj-slider-item {
  height: 100%;
}
.tj-slider-section .slider-bg-image__media,
.tj-slider-section .hero-thumb .thumb-item img {
  object-fit: cover;
  object-position: center center;
}

/* Hero slider — texte au-dessus des vignettes, titres moins hauts sur desktop */
.tj-slider-section .slider-content {
  padding-bottom: clamp(96px, 11vh, 132px);
}

.tj-slider-section .slider-content .slider-title {
  font-size: clamp(2.5rem, 1.4rem + 3.2vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 11.5em;
}

.tj-slider-section .slider-content .slider-desc {
  max-width: 26rem;
  margin-top: 0.75rem;
}

.tj-slider-section .slider-content .slider-btn {
  margin-top: 1.25rem;
}

@media (min-width: 992px) {
  .tj-slider-section .hero-thumb {
    bottom: 52px;
  }
}

@media (max-width: 767.98px) {
  .tj-slider-section .slider-content {
    padding-bottom: clamp(112px, 18vh, 160px);
  }

  .tj-slider-section .slider-content .slider-title {
    max-width: none;
  }
}

/* Footer — contenu centré sur mobile / tablette */
@media (max-width: 991.98px) {
  .tj-footer-section.h5-footer .footer-main-area .footer-widget {
    text-align: center;
  }

  .tj-footer-section.h5-footer .footer-logo {
    margin-inline: auto;
  }

  .tj-footer-section.h5-footer .footer-logo a {
    display: inline-block;
  }

  .tj-footer-section.h5-footer .footer-widget .footer-text {
    margin-inline: auto;
  }

  .tj-footer-section.h5-footer .award-logo-area {
    justify-content: center;
  }

  .tj-footer-section.h5-footer .widget-nav-menu ul {
    align-items: center;
  }

  .tj-footer-section.h5-footer .widget-nav-menu ul li {
    text-align: center;
  }

  .tj-footer-section.h5-footer .footer-contact-info {
    margin-inline: auto;
  }

  .tj-footer-section.h5-footer .footer-contact-info .contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tj-footer-section.h5-footer .footer-contact-info .contact-item span,
  .tj-footer-section.h5-footer .footer-contact-info .contact-item a {
    justify-content: center;
    text-align: center;
  }

  .tj-footer-section.h5-footer .footer-contact-info .contact-item a {
    display: inline-flex;
  }

  .tj-footer-section.h5-footer .h5-footer-copyright .copyright-content-area {
    justify-content: center;
  }

  .tj-footer-section.h5-footer .h5-footer-copyright .copyright-text {
    width: 100%;
    text-align: center;
  }
}

/* Cartes icône + texte — contenu centré dans la carte (whyTeam, problemsGrid, etc.) */
.tj-service-section.service-4 .service-item.style-4 {
  align-items: center;
  text-align: center;
}

.tj-service-section.service-4 .service-item.style-4 .service-content {
  align-items: center;
  text-align: center;
  width: 100%;
}

.tj-service-section.service-4 .service-item.style-4 .title,
.tj-service-section.service-4 .service-item.style-4 .desc {
  max-width: 100%;
  margin-inline: auto;
}

/* Processus — renforcer le centrage icône + texte dans chaque carte */
.tj-working-process--boreal .working-process-area--five .process-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tj-working-process--boreal .working-process-area--five .process-item .process-content {
  width: 100%;
  text-align: center;
}

.tj-working-process--boreal .working-process-area--five .process-item__num {
  margin-inline: auto;
}

@media only screen and (max-width: 767px) {
  .tj-working-process--boreal .working-process-area--five .process-item .process-step {
    order: 1;
    margin-inline: auto;
    margin-bottom: 14px;
  }

  .tj-working-process--boreal .working-process-area--five .process-item__num {
    order: 2;
    margin-inline: auto;
    margin-bottom: 16px;
  }

  .tj-working-process--boreal .working-process-area--five .process-item .process-content {
    order: 3;
    width: 100%;
  }
}

/* Hero split — contenu texte centré dans le panneau gauche */
.tj-banner-section--split .banner-left-box {
  justify-content: center;
}

.tj-banner-section--split .banner-content {
  margin-inline: auto;
  text-align: center;
}

.tj-banner-section--split .banner-content .sub-title {
  margin-inline: auto;
}

.tj-banner-section--split .banner-content .banner-title,
.tj-banner-section--split .banner-content .banner-title.title-anim,
.tj-banner-section--split .banner-content .title-anim > div {
  text-align: center;
}

.tj-banner-section--split .banner-content .banner-desc-area {
  margin-inline: auto;
  margin-top: 40px;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
}

.tj-banner-section--split .banner-content .banner-desc-area .banner-link {
  border-inline-end: none;
  padding: 0;
}

.tj-banner-section--split .banner-content .banner-desc-area .banner-desc {
  padding-inline: 0;
  text-align: center;
  max-width: 517px;
}


/* ----------------------------------------------------------------------------
   FIN — Tout est centralisé. Bonne duplication ! 🚀
   ---------------------------------------------------------------------------- */
