/* =========================================================================
css/pages/project/gt-overrides.css
Auto-split from css/pages/project.css.
========================================================================= */

/* Scope strict à la section injectée */
/* Full-bleed sans scroll horizontal; on ajoute 1px pour couvrir les arrondis sous certains zooms */
.gt-main {
  all: initial;
  display: block;
  width: calc(100vw + 2px);
  max-width: none;
  margin-left: calc(50% - 50vw - 1px);
  margin-right: calc(50% - 50vw - 1px);
  overflow-x: hidden;
}

/* Réactiver l'héritage utile depuis le body du site */
body .gt-main,
body .gt-main * {
  box-sizing: border-box;
  font-family: 'Rajdhani', 'Onest', 'Jost', sans-serif;
  color: #32455e;
}

/* Supprimer tout padding/marge latéral du layout autour de la section projets */
.page-template-page_template-projects #content.site-content,
#content.site-content,
.page-template-page_template-projects .content-area,
.content-area,
.page-template-page_template-projects .site-main,
.site-main,
.page-template-page_template-projects .layout-full,
.layout-full {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.gt-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Grid utilitaires type bootstrap (scopés) */
.gt-main .row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-right: 0;
  margin-left: 0;
}

.gt-main [class^="col-"],
.gt-main [class*=" col-"] {
  position: relative;
  width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.gt-main .col-lg-12 {
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

/* Forcer pleine largeur de tous les wrappers internes (WPBakery) */
.gt-main .vc_row,
.gt-main .vc_row>div,
.gt-main .wpb_column,
.gt-main .vc_column-inner,
.gt-main .wpb_wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Wrapper / conteneur */
.gt-main .gt-page-wrapper {
  padding: 0 !important;
  background: transparent !important;
}

.gt-main .gt-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Bannière – masquée pour un rendu 100% largeur comme la maquette */
.gt-main .gt-page-banner {
  display: none;
}

.gt-main .gt-page-banner-img {
  display: none;
}

/* Titre + breadcrumb alignés au style du site */
.gt-main .gt-page-heading {
  text-align: center;
}

.gt-main .gt-page-heading .gt-line {
  width: 44px;
  height: 3px;
  margin: 0 auto 10px;
  background: #d84156;
}

.gt-main .gt-page-heading span {
  display: block;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #a0a6b0;
  margin-bottom: 6px;
}

.gt-main .gt-page-heading h1 {
  margin: 0;
  font-family: 'Onest', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  color: #020014;
  font-size: clamp(28px, 5vw, 60px);
}

/* Breadcrumb */
.gt-main .gt-breadcrumb {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: inline-flex;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7b8796;
}

.gt-main .gt-breadcrumb a {
  color: #d84156;
  text-decoration: none;
}

.gt-main .gt-breadcrumb a:hover {
  color: #c60035;
}

/* --- ARKIZ THEME REDESIGN STYLES --- */
.all-categories-section .gt-container {
  max-width: 1600px;
  margin: 0 auto !important;
  padding: 0 100px !important;
}

/* Blog grid wrap - transparent container for projects */
.blog-grid-wrap {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.categories-grid {
  padding: 0 !important;
  margin: 0 !important;
  grid-template-columns: repeat(4, 1fr) !important;
  /* Force 4 columns to match 4x4 request */
  max-width: 100% !important;
}

@media screen and (max-width: 991px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 575px) {
  .categories-grid {
    grid-template-columns: 1fr !important;
  }
}

.all-categories-title {
  font-family: 'Onest', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px !important;
  text-align: center;
  color: #000 !important;
  /* Centered as requested */
}

.category-group-header {
  color: #000 !important;
}

.category-item {
  color: #000 !important;
}

.projects-header {
  padding: 60px 0 5px !important;
  /* Extremely reduced bottom padding */
  margin-bottom: 0 !important;
  text-align: center;
}

.projects-header .entry-title {
  font-family: 'Onest', sans-serif;
  font-size: clamp(60px, 15vw, 150px) !important;
  /* "Tres Grand" title */
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: -4px;
  /* More aggressive negative tracking for huge font */
  margin: 0 !important;
  color: #020014;
  line-height: 0.9;
}

/* Hide the redundant banner titles if "Projects" is the main one */
.gt-main .gt-page-banner {
  display: none !important;
}

/* PROJECTS GRID LAYOUT - DESKTOP FIRST */
@media screen and (min-width: 992px) {

  #projects-container,
  .portfolio-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    margin: 40px auto !important;
    max-width: 1600px !important;
    width: 100% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    align-items: flex-start !important;
  }

  #projects-container .hentry,
  .portfolio-grid .hentry {
    width: 25% !important;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
  }
}

/* SHARED ITEM WRAP STYLES */
.portfolio-grid .hentry-wrap {
  position: relative;
  background: transparent;
  overflow: hidden;
  width: 100% !important;
}

#projects-container .featured-image,
.portfolio-grid .featured-image,
.featured-image {
  position: relative;
  margin-bottom: 25px;
  overflow: hidden;
  /* Taller aspect ratio for full-width feel */
  aspect-ratio: 4 / 3 !important;
  border-radius: 0;
  width: 100% !important;
  max-width: 100% !important;
}

#projects-container .featured-image img,
.portfolio-grid .featured-image img,
.featured-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.hentry-wrap:hover .featured-image img {
  transform: scale(1.03);
}

.featured-image a:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.hentry-wrap:hover .featured-image a:before {
  opacity: 0.1;
}

.hentry-middle {
  padding: 0;
}

.entry-header {
  margin-top: 0;
}

/* Project Title Styles - Shared */
.portfolio-grid .entry-title {
  font-family: 'Onest', sans-serif;
  font-weight: 900 !important;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.3;
}

.portfolio-grid .entry-title a {
  color: #000000 !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.portfolio-grid .entry-title a:hover {
  color: #333333 !important;
}

/* Fallback and hidden states for filtering */
.hentry.is-hidden {
  display: none !important;
}

/* Global page layout refinements */
#main,
.site-main,
.content-area,
.site-content,
.layout-full {
  background: transparent !important;
}

.site .footer-subscribe {
  display: none !important;
}

.site-footer {
  margin-top: 80px !important;
  border-top: none !important;
}

/* Fix for the main title as requested */
.gt-main .gt-page-heading h1 {
  font-weight: 900 !important;
  letter-spacing: -1px;
  margin-bottom: 40px;
}

/* Ensure category section itself doesn't have offset */
.all-categories-section {
  width: 100%;
  margin-bottom: 40px;
  margin-top: 0 !important;
  padding-top: 5px !important;
  /* Extremely reduced top padding */
}

.category-column {
  display: flex;
  flex-direction: column;
  gap: 40px;
  /* Desktop gap */
}

@media screen and (max-width: 575px) {
  .category-column {
    gap: 10px !important;
    /* Extremely reduced gap on mobile per arrows */
  }

  .category-group-header {
    cursor: pointer;
    padding: 5px 0 !important;
    margin-bottom: 5px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #000 !important;
    color: #000 !important;
    width: 100% !important;
  }

  .category-group-header::after {
    content: '+' !important;
    display: block !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    color: #000 !important;
    margin-left: 10px !important;
  }

  .category-group.is-active .category-group-header::after {
    content: '-' !important;
  }

  .category-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .category-group.is-active .category-list {
    max-height: 1000px;
    margin-bottom: 15px;
  }
}

/* ========================================
   PROJECTS LAYOUT SYSTEM - REFINED
   ======================================== */

/* Image Aspect Ratio */
#projects-container .featured-image,
.portfolio-grid .featured-image {
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  margin-bottom: 20px !important;
  overflow: hidden;
}

/* Titles */
#projects-container .entry-title,
.portfolio-grid .entry-title {
  font-family: 'Onest', sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  margin-top: 10px !important;
  line-height: 1.2 !important;
}

@media screen and (min-width: 992px) {

  #projects-container .entry-title,
  .portfolio-grid .entry-title {
    font-size: 19px !important;
    /* Smaller for 4-column grid */
  }
}

#projects-container .entry-title a,
.portfolio-grid .entry-title a {
  color: #000000 !important;
  /* Pure black as standard */
  text-decoration: none;
}

/* MOBILE VERSION - ISOLATED */
@media screen and (max-width: 991px) {
  #projects-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 60px !important;
    max-width: 800px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
  }

  #projects-container .hentry {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #projects-container .entry-title {
    font-size: 22px !important;
    margin-top: 15px !important;
  }
}
