/*
Theme Name: Porto Child
Theme URI: https://www.portotheme.com/wordpress/porto
Author: P-THEMES
Author URI: https://www.portotheme.com/
Description: Porto Responsive WordPress + eCommerce Theme.
Version: 1.1
Template: porto
License: Commercial
License URI: http://themeforest.net/licenses/regular_extended
Tags: woocommerce, corporate, ecommerce, responsive, blue, black, green, white, light, dark, red, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
*/

/*************** ADD YOUR CUSTOM CSS HERE  ***************/

*, *::before, *::after {
  box-sizing: border-box;
}

/* =================================================================
   STYLES POUR LES PAGES DE SERVICE
   ================================================================= */

/* Hero Section */
.hero-service {
  position: relative;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  border-radius: 14px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374E54;
  opacity: 0.75;
  z-index: 1;
  border-radius: 14px;
}

.hero-content {
  position: relative;
  z-index: 2;
  container: true;
  margin: 0 160px;
  padding: 0 20px;
  width: 100%;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 30px;
  font-size: 14px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #E86012;
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 8px;
}

.breadcrumb .current {
  color: #E86012;
  font-weight: 600;
}

/* Hero Main Content */
.hero-main {
  max-width: 800px;
}

.hero-title {
  color: white;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 30px;
  font-weight: 500;
  word-spacing: normal;
}

/* Chiffres Clés */
.chiffres-cles {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.badge-chiffre {
  background-color: #425D64;
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 500;
  display: inline-block;
}

/* Bouton Hero */
.btn-hero {
  background-color: #E86012;
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 2px solid #E86012;
}

.btn-hero:hover {
  background-color: transparent;
  color: #E86012;
  transform: translateY(-2px);
}

.btn-hero svg {
  transition: transform 0.3s ease;
}

.btn-hero:hover svg {
  transform: translateX(5px);
}

/* Main Content Layout */
.main-content-bis {
  display: flex;
  margin: 0 auto 90px auto;
  padding: 0 20px;
  gap: 40px;
  max-width: 1440px;
  box-sizing: border-box;
}

.container-aside {
  flex: 0 0 300px;
  min-width: 300px;
  max-width: 300px;
}

/* Sidebar */
.service-sidebar {
  position: sticky;
  top: 120px;
  width: 100%;
}

.contact-sidebar {
  margin-top: 20px;
}

.services-menu h2, .contact-sidebar h3 {
  color: #374E54;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 25px;
}

.services-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-category {
  margin-bottom: 6px;
  border: 1px solid rgba(224, 224, 224, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.service-category.active {
  border-color: rgba(66, 93, 100, 0.4);
  box-shadow: 0 2px 8px rgba(66, 93, 100, 0.1);
}

.service-category.expanded {
  border-color: rgba(224, 224, 224, 0.4);
}

/* Service Content */
.service-content {
  flex: 1;
  min-width: 0; /* Important pour éviter le débordement du flex */
  padding-left: 40px;
  border-left: 1px solid rgba(66, 93, 100, 0.2);
  box-sizing: border-box;
}

/* Section Titles */
.section-title {
  color: #E86012;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.section-intro {
  font-size: 20px;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 30px;
}

/* Header de catégorie */
.category-header {
  position: relative;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  text-decoration: none;
  color: #374E54;
  font-weight: 600;
  transition: all 0.3s ease;
  background-color: rgba(224, 224, 224, 0.4);
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
}

/* Catégorie active (page actuelle) */
.service-category.active .category-link.current {
  background-color: #425D64;
  color: white;
  cursor: default;
}

/* Catégories cliquables */
.category-link.expandable:hover {
  background-color: rgba(224, 224, 224, 0.4);
  color: #425D64;
}

.service-category.expanded .category-link.expandable {
  background-color: rgba(224, 224, 224, 0.4);
  color: #425D64;
}

/* Indicateur pour catégorie active */
.category-indicator {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.active-indicator .chevron {
  transform: rotate(90deg);
  color: white;
}

/* Chevron animations */
.category-link .chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.service-category.expanded .chevron {
  transform: rotate(90deg);
}

/* Sub-services */
.sub-services {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: white;
  border-top: 1px solid rgba(224, 224, 224, 0.5);
}

/* Sous-services visibles (catégorie active) */
.sub-services.visible {
  max-height: none;
  overflow: visible;
}

/* Sous-services collapsibles (autres catégories) */
.sub-services.collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.service-category.expanded .sub-services.collapsible {
  max-height: 1000px; /* Valeur élevée pour s'adapter au contenu */
}

.sub-services li {
  border-top: 1px solid rgba(224, 224, 224, 0.3);
}

.sub-services li:first-child {
  border-top: none;
}

.sub-services a {
  display: block;
  padding: 12px 25px;
  text-decoration: none;
  color: #666;
  font-size: 13px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.sub-services a:hover {
  background-color: rgba(66, 93, 100, 0.05);
  color: #425D64;
  border-left-color: #425D64;
  padding-left: 30px;
  font-weight: 500;
}

/* Service actuel dans la catégorie active */
.sub-services.visible .current-service a {
  background-color: rgba(66, 93, 100, 0.1);
  color: #425D64;
  font-weight: 600;
  border-left-color: #425D64;
  border-left-width: 2px;
}

/* Compteur de services */
.category-link .service-count {
  background-color: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 500;
}

.service-category.active .category-link.current .service-count {
  background-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
  .service-sidebar {
    flex: none;
    margin-bottom: 40px;
  }
  
  .services-menu {
    position: static;
  }
}
/* Responsive */
@media (max-width: 1024px) {
  .service-sidebar {
    flex: none;
    margin-bottom: 40px;
  }
  
  .services-menu {
    position: static;
  }
}

@media (max-width: 768px) {
  .services-menu h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .category-link {
    padding: 12px 15px;
    font-size: 13px;
  }
  
  .sub-services a {
    padding: 10px 20px;
    font-size: 12px;
  }
}

/* Sections */
section {
  margin-bottom: 60px;
}

/* Intro Section */
.intro-text {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 30px;
}

.intro-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery-item{
  padding: 0;
  margin-bottom: 24px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* Bénéfices Section */
.benef-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.benef-card {
  background: #425D64;
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benef-card:first-child{
  background-color: #E86012;
  color: #ffff;
}

.benef-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.benef-title {
  color: #ffff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.benef-text, .benef-card p, .benef-card li{
  color: #ffff;
  line-height: 1.6;
  margin-bottom: 20px;
}

.btn-secondary {
  background-color: #fff;
  color: #425D64;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #E86012;
  color: white;
}

/* Méthodologie Section */
.methodologie-section {
  background-image: url('https://ateco-couvreur41.fr/wp-content/uploads/2025/07/Design-sans-titre-2.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  padding: 80px 0;
  margin: 80px -20px 60px -20px;
}

.methodo-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px;
  color: #fff;
}

.methodologie-section .section-title,
.methodologie-section .section-intro {
  text-align: center;
  color: #fff ;
}

.methode-etapes {
  list-style: none;
  padding: 0;
  margin: 40px 0 0 0;
}

.etape-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
}

.etape-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 25px;
  top: 60px;
  width: 2px;
  height: calc(100% + 20px);
  background-color: #E86012;
  opacity: 0.3;
}

.etape-number {
  flex: 0 0 50px;
  height: 50px;
  background-color: #E86012;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-right: 25px;
}

.etape-content {
  flex: 1;
  padding-top: 5px;
}

.etape-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.etape-description {
  color: #fff;
  line-height: 1.6;
  margin: 0;
}

/* Témoignages Section */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  margin: 0;
  position: relative;
}

.testimonial-text {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  color: #374E54;
  font-weight: 600;
  text-align: right;
}

/* FAQ Section */
/* FAQ Section - Version corrigée */
.faq-section .section-title {
  font-size: 48px;
  text-align: center;
  color: #273032;
  margin-bottom: 0;
}

.faq-list {
  background-color: #273032;
  border-radius: 6px;
  padding: 48px;
}

.faq-item {
  background: white;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  background-color: #273032;
  color: #fff;
  padding: 20px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  width: 100%;
  text-align: left;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
}

.faq-question:hover {
  background-color: #E86012;
  color: white;
}

.faq-item.open .faq-question {
  background-color: #E86012;
  color: white;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

/* Correction principale : Une seule règle pour faq-answer */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 20px;
  color: #666;
  line-height: 1.6;
  background-color: white;
}

.faq-item.open .faq-answer {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
}

/* Styles pour le contenu de la réponse */
.faq-answer p {
  margin: 0;
}

.faq-answer p:not(:last-child) {
  margin-bottom: 15px;
}

/* Animation plus fluide */
.faq-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .faq-section .section-title {
    font-size: 36px;
  }
  
  .faq-list {
    padding: 30px 20px;
  }
  
  .faq-question {
    padding: 15px;
    font-size: 15px;
  }
  
  .faq-answer {
    padding: 0 15px;
  }
  
  .faq-item.open .faq-answer {
    padding: 15px;
  }
}



.benefices-section .section-intro{
  color: #374E54;
}

/* Signes Section (Nouvelle section avec répéteur) */
.signes-section {
  margin-bottom: 60px;
  opacity: 1;
}

.signes-section .section-intro {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 40px;
}

.signes-section .section-intro ul,
.signes-section .section-intro ol {
  margin: 15px 0;
  padding-left: 25px;
}

.signes-section .section-intro li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.signes-section .section-intro ul li {
  list-style-type: disc;
}

.signes-section .section-intro ol li {
  list-style-type: decimal;
}

.signes-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.signe-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;  
  gap: 12px;
  align-items: flex-start;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.signe-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.signe-image {
  position: relative;
}

.signe-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.signe-item:hover .signe-img {
  transform: scale(1.05);
}

.signe-content {
  color: #666;
  line-height: 1.6;
}

.signe-content p {
  margin-bottom: 15px;
}

.signe-content p:last-child {
  margin-bottom: 0;
}

.signe-content ul,
.signe-content ol {
  margin: 15px 0;
  padding-left: 25px;
}

.signe-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.signe-content ul li {
  list-style-type: disc;
  color: #666;
}

.signe-content ol li {
  list-style-type: decimal;
  color: #666;
}


@media (max-width: 1440px) {


  .hero-service{
    min-height: 40vh;
    padding: 60px;
  }

  .hero-content{
    margin: 0 60px;
    padding: 0;
  }

  .hero-main{
    width: 100%;
  }

  .breadcrumb{
    margin-bottom: 12px;
  }

  .signe-item{
    padding: 14px;
  }

  .signes-items {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
  }

  .methodo-content .section-title{
    text-wrap: balance;
  }

  p.section-intro{
    font-size: 20px;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content-bis {
    flex-direction: column;
    gap: 40px;
  }
  
  .service-sidebar {
    flex: none;
  }
  
  .methodologie-section {
    margin-left: 0;
    margin-right: 0;
    background-attachment: scroll;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .chiffres-cles {
    justify-content: center;
  }
  
  .main-content-bis {
    padding: 0 15px;
    margin: 40px auto;
    flex-direction: column-reverse;
  }
  
  .benef-blocks {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .intro-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .methodo-content {
    padding: 0 20px;
  }
}

@media (max-width: 480px) {

  .hero-service{
    height: unset;
    padding: 48px;
  }

  .hero-content {
    padding:0;
    margin: 0;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .chiffres-cles {
    flex-direction: column;
    align-items: start;
  }
  
  .etape-item {
    gap: 12px;
    flex-direction: column;
  }
  
  .etape-number {
    margin-right: 0;
    margin-bottom: 15px;
    width: 50px;
  }
  
  .etape-item::after {
    display: none;
  }

  .service-content{
    padding-left: 0;
    border-left: none;
  }
}

/* Responsive pour la section signes */
@media (max-width: 768px) {
  .signe-item,
  .signe-item:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .signe-item:nth-child(even) .signe-image,
  .signe-item:nth-child(even) .signe-content {
    order: unset;
  }
  
  .signe-img {
    height: 180px;
  }
}

.contact-tel, .contact-mail{
  display: flex;
  gap: 12px;
}

.contact-mail svg, .contact-tel svg{
  color: #425D64;
  fill: #425D64;
}

/* =================================================================
   CARROUSEL D'IMAGES - FANCYBOX
   ================================================================= */

/* Container principal du carrousel */
.service-gallery-container {
  position: relative;
  margin: 30px 0;
  max-width: 100%;
  overflow: visible; /* Permet d'afficher les dots en dehors du conteneur */
}

/* Carrousel Fancybox - Configuration */
.service-carousel {
  --f-carousel-spacing: 15px;
  --f-carousel-slide-width: 280px; /* Largeur fixe au lieu de pourcentage */
  margin-bottom: 20px;
}

.service-carousel .f-carousel__viewport {
  border-radius: 12px;
  overflow: hidden;
}

.service-carousel .f-carousel__slide {
  flex: 0 0 auto;
  width: var(--f-carousel-slide-width);
  padding: 0;
}

/* Items de la galerie */
.gallery-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: block;
  height: 100%;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  visibility: visible;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-item:hover .carousel-image {
  transform: scale(1.05);
}

/* Overlay avec icône zoom */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(55, 78, 84, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.zoom-icon {
  color: white;
  width: 32px;
  height: 32px;
}

/* Icône play visible sur les vidéos */
.gallery-video-item .play-icon {
  z-index: 1;
}

/* Navigation personnalisée */
.carousel-navigation {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.carousel-btn {
  background: rgba(55, 78, 84, 0.9);
  border: none;
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.carousel-btn:hover {
  background: #E86012;
  transform: scale(1.1);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-prev {
  margin-left: -22px;
}

.carousel-next {
  margin-right: -22px;
}

/* Masquer les boutons de navigation Fancybox par défaut */
.service-carousel .f-carousel__button {
  display: none !important;
}

/* Indicateurs de pagination (dots) */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 10px;
  height: 12px;
  border-radius: 50%;
  background: rgba(55, 78, 84, 0.3);
  border: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.is-active,
.carousel-dot:hover {
  background: #E86012;
  transform: scale(1.2);
}

/* =================================================================
   MODE GRILLE (1-2 items) — alternative au carousel
   ================================================================= */

.service-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start; /* alignement à gauche */
  align-items: flex-start;
  width: 100%;
  margin-bottom: 20px;
}

/* Item de grille (remplace .f-carousel__slide en mode 1-2 items) */
.gallery-grid-item {
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

/* L'item à l'intérieur prend tout l'espace alloué */
.gallery-grid-item .gallery-item {
  width: 100%;
  height: 100%;
  display: block;
}

.gallery-grid-item .gallery-item img,
.gallery-grid-item .gallery-item .carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----- 1 ITEM : aligné à gauche, comme s'il y avait un slot vide à droite ----- */
.gallery-count-1 .gallery-grid-item {
  aspect-ratio: 9 / 16; /* forcé portrait temporairement */
  height: 450px;
  width: auto;
}

/* ----- 2 ITEMS : côte à côte, hauteur commune ----- */
.gallery-count-2 .gallery-grid-item {
  aspect-ratio: 9 / 16; /* forcé portrait temporairement */
  height: 450px;
  width: auto;
}

/* Responsive mobile : empiler les items en mode grille (toujours portrait 9:16 pour l'instant) */
@media (max-width: 768px) {
  .service-gallery-grid {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .gallery-count-1 .gallery-grid-item,
  .gallery-count-2 .gallery-grid-item {
    aspect-ratio: 9 / 16;
    height: min(70vh, 500px);
    width: auto;
    max-width: 90vw;
  }
}

/* Animation d'apparition mode grille */
.gallery-mode-grid .gallery-grid-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-mode-grid.animate-in .gallery-grid-item {
  opacity: 1;
  transform: translateY(0);
}

.gallery-mode-grid.animate-in .gallery-grid-item:nth-child(2) {
  transition-delay: 0.1s;
}

/* Customisation Fancybox Lightbox */
.fancybox__container {
  --fancybox-bg: rgba(24, 24, 27, 0.95);
  --fancybox-color: #fff;
}

.fancybox__backdrop {
  background: var(--fancybox-bg);
  backdrop-filter: blur(10px);
}

.fancybox__toolbar {
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.fancybox__button {
  background: rgba(55, 78, 84, 0.8) !important;
  border-radius: 6px !important;
  color: white !important;
}

.fancybox__button:hover {
  background: #E86012 !important;
}

.fancybox__counter {
  color: white;
  font-weight: 600;
}

.fancybox__caption {
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 30px 20px 20px;
  text-align: center;
}

/* Navigation dans le lightbox */
.fancybox__nav .fancybox__button {
  width: 60px !important;
  height: 60px !important;
  background: rgba(55, 78, 84, 0.9) !important;
  border-radius: 50% !important;
}

.fancybox__nav .fancybox__button:hover {
  background: #E86012 !important;
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .service-carousel {
    --f-carousel-slide-width: calc(50% - 8px); /* 2 slides sur tablette */
  }
  
}

@media (max-width: 768px) {
  .service-carousel {
    --f-carousel-slide-width: 100%; /* 1 slide sur mobile */
    --f-carousel-spacing: 10px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-prev {
    margin-left: -20px;
  }
  
  .carousel-next {
    margin-right: -20px;
  }
}

@media (max-width: 480px) {
  .service-gallery-container {
    margin: 20px -15px;
  }
  
  .carousel-btn {
    width: 35px;
    height: 35px;
  }
  
  .zoom-icon {
    width: 24px;
    height: 24px;
  }
  
  .carousel-dots {
    margin-top: 15px;
  }
  
  .carousel-dot {
    width: 8px;
    height: 12px;
  }
}

/* Animation d'apparition */
.service-gallery-container {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-gallery-container.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* États de chargement */
.gallery-item.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Amélioration de l'accessibilité */
.gallery-item:focus {
  outline: 2px solid #E86012;
  outline-offset: 2px;
}

.carousel-btn:focus {
  outline: 2px solid #E86012;
  outline-offset: 2px;
}

/* Masquer les éléments pour les lecteurs d'écran lors de l'ouverture du lightbox */
.fancybox-is-open .service-content,
.fancybox-is-open .service-sidebar {
  filter: blur(3px);
}

/* Performance - Optimisation GPU */
.gallery-item,
.carousel-image,
.gallery-overlay,
.carousel-btn {
  transform: translateZ(0);
  will-change: transform;
}



/* Boutons/liens de catégorie */
.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  text-decoration: none;
  color: #374E54;
  font-weight: 600;
  transition: all 0.3s ease;
  background-color: rgba(224, 224, 224, 0.4);
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
}

/* Style du bouton de catégorie active */
.category-link.current {
  background-color: #425D64;
  color: white;
}

/* Hover sur les autres catégories */
.category-link.expandable:hover {
  background-color: rgba(224, 224, 224, 0.6);
  color: #425D64;
}

/* Chevron */
.category-link .chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Rotation du chevron quand ouvert */
.service-category.expanded .chevron {
  transform: rotate(90deg);
}

/* Liste des sous-services */
.sub-services {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: white;
  border-top: 1px solid rgba(224, 224, 224, 0.5);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* Sous-services visibles quand catégorie expanded */
.service-category.expanded .sub-services {
  max-height: 500px; /* Assez grand pour contenir tous les sous-services */
}

.sub-services li {
  border-top: 1px solid rgba(224, 224, 224, 0.3);
}

.sub-services li:first-child {
  border-top: none;
}

.sub-services a {
  display: block;
  padding: 12px 25px;
  text-decoration: none;
  color: #666;
  font-size: 13px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sub-services a:hover {
  background-color: rgba(66, 93, 100, 0.05);
  color: #425D64;
  border-left-color: #425D64;
  padding-left: 30px;
  font-weight: 500;
}

/* Service actuel */
.sub-services .current-service a {
  background-color: rgba(66, 93, 100, 0.1);
  color: #425D64;
  font-weight: 600;
  border-left-color: #425D64;
  border-left-width: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
  .service-sidebar {
    flex: none;
    margin-bottom: 40px;
    position: static;
  }
}

@media (max-width: 768px) {
  .services-menu h2 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .category-link {
    padding: 12px 15px;
    font-size: 13px;
  }
  
  .sub-services a {
    padding: 10px 20px;
    font-size: 12px;
  }
}

/* =================================================================
   HERO CLEAN - Sans fond
   ================================================================= */

.hero-service-clean {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  text-align: center;
}

.hero-content-clean {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Breadcrumb */
.hero-service-clean .breadcrumb {
  font-size: 14px;
  margin-bottom: 10px;
}

.hero-service-clean .breadcrumb a {
  color: #374E54;
  text-decoration: none;
  transition: color 0.3s ease;
}

.hero-service-clean .breadcrumb a:hover {
  color: #E86012;
}

.hero-service-clean .breadcrumb .separator {
  color: rgba(55, 78, 84, 0.4);
  margin: 0 8px;
}

.hero-service-clean .breadcrumb .current {
  color: #E86012;
  font-weight: 600;
}

/* Titre */
.hero-title-clean {
  color: #374E54;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

/* Sous-titre */
.hero-subtitle-clean {
  color: #374E54;
  font-size: 20px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.8;
}

/* Chiffres clés */
.chiffres-cles-clean {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 10px 0;
}

.badge-chiffre-clean {
  background-color: #F5F5F5;
  color: #374E54;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 500;
  display: inline-block;
  transition: all 0.3s ease;
}

.badge-chiffre-clean:hover {
  background-color: #374E54;
  color: white;
}

/* Bouton CTA */
.btn-hero-clean {
  background-color: #E86012;
  color: white;
  padding: 6px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 2px solid #E86012;
  margin-top: 10px;
}

.btn-hero-clean:hover {
  background-color: transparent;
  color: #E86012;
  transform: translateY(-2px);
}

.btn-hero-clean svg {
  transition: transform 0.3s ease;
}

.btn-hero-clean:hover svg {
  transform: translateX(5px);
}

/* =================================================================
   SECTION VIDÉO YOUTUBE
   ================================================================= */

.video-section {
  margin: 0 auto 80px;
  max-width: 1440px;
  padding: 0 20px;
}

.video-container {
  width: 100%;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-height: 399px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.video-wrapper[data-video-id] {
  cursor: pointer;
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-wrapper:hover .video-thumbnail {
  transform: scale(1.05);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #374E54;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.video-wrapper:hover .video-overlay {
  opacity: 0.3;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 0;
}

.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Popup vidéo */
.video-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.video-popup-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  z-index: 2;
}

.video-popup-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
}

.video-popup-close:hover {
  transform: rotate(90deg);
}

.video-popup-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  border-radius: 8px;
  overflow: hidden;
}

.video-popup-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Format vertical homogène pour toutes les slides */
.service-carousel .f-carousel__slide {
  aspect-ratio: 9 / 16; /* Format vertical type Reels/Shorts */
  height: 500px; /* Hauteur fixe */
}

.service-carousel .carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Icône play pour les vidéos */
.gallery-video-item .play-icon {
  width: 60px;
  height: 60px;
}

.gallery-video-item:hover .play-icon circle {
  fill-opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .service-carousel .f-carousel__slide {
    height: 400px;
  }

  .hero-title-clean{
    font-size: 36px;
  }

  .hero-subtitle-clean{
    font-size: 16px;
  }

  .hero-service-clean .breadcrumb{
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .badge-chiffre-clean{
    padding: 6px 12px;
    font-size: 13px;
  }

  section.hero-service-clean{
    margin-bottom: 32px;
  }

  .hero-service-clean .breadcrumb a, .hero-service-clean .breadcrumb .current{
    font-size: 12px;
  }
}

@media (max-width: 1200px) {
  .main-content-bis {
    gap: 30px;
  }
  
  .service-content {
    padding-left: 30px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .chiffres-cles {
    justify-content: center;
  }
  
  .main-content-bis {
    padding: 0 15px;
    margin: 40px auto;
    flex-direction: column-reverse;
    gap: 30px;
  }
  
  .container-aside {
    flex: none;
    min-width: 100%;
    max-width: 100%;
  }
  
  .service-content {
    padding-left: 0;
    border-left: none;
  }
  
  .benef-blocks {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .intro-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .methodo-content {
    padding: 0 20px;
  }
  
  /* Carrousel mobile */
  .service-carousel {
    --f-carousel-slide-width: 220px;
  }
}