/* Résidentiel Page Styles */

:root {
  --primary: #c50e19;
  --secondary: #376cb8;
  --accent: #2a5a9a;
  --dark: #1A1A2E;
  --light: #F7F7F7;
}

.page-container {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(-50vw + 50%);
  background: linear-gradient(135deg, #1A1A2E 0%, #2a3a5a 50%, #376cb8 100%);
  overflow: hidden;
}

.page-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1A1A2E 0%, #2a3a5a 50%, #376cb8 100%);
  z-index: -2;
}

/* Animated Background Pattern */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.15;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 35px, var(--primary) 35px, var(--primary) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, var(--secondary) 35px, var(--secondary) 36px);
  animation: patternSlide 30s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes patternSlide {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}



/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.breadcrumb {
  font-size: 0.9rem;
  color: rgba(247, 247, 247, 0.6);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--light);
}

.page-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 5rem;
  line-height: 1;
  color: var(--light);
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}

.page-title .highlight {
  color: var(--primary);
}

.page-subtitle {
  font-size: 1.3rem;
  color: rgba(247, 247, 247, 0.8);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.breadcrumb {
  font-size: 0.9rem;
  color: rgba(247, 247, 247, 0.6);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--light);
}

.page-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 5rem;
  line-height: 1;
  color: var(--light);
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}

.page-title .highlight {
  color: var(--primary);
}

.page-subtitle {
  font-size: 1.3rem;
  color: rgba(247, 247, 247, 0.8);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Section Titles */
.section-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 2.5rem;
  color: var(--light);
  margin-bottom: 1rem;
  letter-spacing: 1px;
  animation: fadeIn 1s ease-out 0.3s backwards;
}

.section-subtitle {
  color: rgba(247, 247, 247, 0.7);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  animation: fadeIn 1s ease-out 0.4s backwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Services Grid */
.services-section {
  margin-bottom: 5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  border-radius: 15px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out backwards;
}

.service-card:nth-child(1) {
  animation-delay: 0.5s;
}

.service-card:nth-child(2) {
  animation-delay: 0.6s;
}

.service-card:nth-child(3) {
  animation-delay: 0.7s;
}

.service-card:nth-child(4) {
  animation-delay: 0.8s;
}

.service-card:nth-child(5) {
  animation-delay: 0.9s;
}

.service-card:nth-child(6) {
  animation-delay: 1s;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 50px rgba(197, 14, 25, 0.3);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.service-card:nth-child(odd) .service-icon {
  filter: drop-shadow(0 0 20px rgba(197, 14, 25, 0.5));
}

.service-card:nth-child(even) .service-icon {
  filter: drop-shadow(0 0 20px rgba(55, 108, 184, 0.5));
}

.service-name {
  font-family: 'Bebas Neue', cursive;
  font-size: 2rem;
  color: var(--light);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.service-description {
  color: rgba(247, 247, 247, 0.7);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  margin-top: 1.5rem;
}

.service-features li {
  color: rgba(247, 247, 247, 0.8);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Process Section */
.process-section {
  margin-bottom: 5rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.process-step {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out backwards;
}

.process-step:nth-child(1) {
  animation-delay: 0.6s;
}

.process-step:nth-child(2) {
  animation-delay: 0.7s;
}

.process-step:nth-child(3) {
  animation-delay: 0.8s;
}

.process-step:nth-child(4) {
  animation-delay: 0.9s;
}

.process-step:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
}

.step-number {
  font-family: 'Bebas Neue', cursive;
  font-size: 4rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.step-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.5rem;
  color: var(--light);
  margin-bottom: 0.8rem;
  letter-spacing: 1px;
}

.step-description {
  color: rgba(247, 247, 247, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Why Choose Us Section */
.benefits-section {
  margin-bottom: 5rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.benefit-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 15px;
  display: flex;
  gap: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out backwards;
}

.benefit-card:nth-child(1) {
  animation-delay: 0.5s;
}

.benefit-card:nth-child(2) {
  animation-delay: 0.6s;
}

.benefit-card:nth-child(3) {
  animation-delay: 0.7s;
}

.benefit-card:nth-child(4) {
  animation-delay: 0.8s;
}

.benefit-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(10px);
}

.benefit-icon {
  font-size: 2.5rem;
  min-width: 60px;
}

.benefit-content h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.5rem;
  color: var(--light);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.benefit-content p {
  color: rgba(247, 247, 247, 0.7);
  line-height: 1.6;
}

/* Realizations Gallery Section */
.realizations-section {
  margin-bottom: 5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.gallery-item {
  animation: fadeInUp 1s ease-out backwards;
}

/* Hierarchical Grid Pattern */
/* Large featured items */
.gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(6) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(11) {
  grid-column: span 2;
  grid-row: span 2;
}

/* Medium items */
.gallery-item:nth-child(4),
.gallery-item:nth-child(9),
.gallery-item:nth-child(14) {
  grid-column: span 2;
  grid-row: span 1;
}

/* Tall items */
.gallery-item:nth-child(3),
.gallery-item:nth-child(8),
.gallery-item:nth-child(13) {
  grid-row: span 2;
}

.gallery-item:nth-child(1) {
  animation-delay: 0.5s;
}
.gallery-item:nth-child(2) {
  animation-delay: 0.6s;
}
.gallery-item:nth-child(3) {
  animation-delay: 0.7s;
}
.gallery-item:nth-child(4) {
  animation-delay: 0.8s;
}
.gallery-item:nth-child(5) {
  animation-delay: 0.9s;
}
.gallery-item:nth-child(6) {
  animation-delay: 1s;
}
.gallery-item:nth-child(7) {
  animation-delay: 1.1s;
}
.gallery-item:nth-child(8) {
  animation-delay: 1.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-image {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(197, 14, 25, 0.3);
  border-color: var(--primary);
}

.gallery-image:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(26, 26, 46, 0.95) 0%, rgba(26, 26, 46, 0.7) 60%, transparent 100%);
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(calc(100% - 60px));
  transition: transform 0.4s ease;
}

.gallery-image:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-info h3 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.5rem;
  color: var(--light);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.gallery-info p {
  color: rgba(247, 247, 247, 0.8);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease 0.1s;
}

.gallery-image:hover .gallery-info p {
  opacity: 1;
  transform: translateY(0);
}

.gallery-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding: 3rem;
  background: rgba(197, 14, 25, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 14, 25, 0.2);
  border-radius: 15px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Bebas Neue', cursive;
  font-size: 3.5rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: rgba(247, 247, 247, 0.8);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  background: rgba(197, 14, 25, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 14, 25, 0.3);
  padding: 4rem 3rem;
  border-radius: 20px;
  animation: fadeIn 1s ease-out 1s backwards;
}

.cta-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 3rem;
  color: var(--light);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.cta-text {
  font-size: 1.2rem;
  color: rgba(247, 247, 247, 0.8);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1.2rem 2.5rem;
  font-family: 'Archivo', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  border-radius: 5px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 30px rgba(197, 14, 25, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(197, 14, 25, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--light);
  border: 2px solid var(--light);
}

.btn-secondary:hover {
  background: var(--light);
  color: var(--dark);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 968px) {


  .page-title {
    font-size: 3.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
  }

  /* Simplified hierarchical pattern for tablet */
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5),
  .gallery-item:nth-child(9) {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery-item:nth-child(3),
  .gallery-item:nth-child(7),
  .gallery-item:nth-child(11) {
    grid-row: span 2;
  }

  /* Reset other patterns */
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(6),
  .gallery-item:nth-child(8),
  .gallery-item:nth-child(13),
  .gallery-item:nth-child(14) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .cta-section {
    padding: 3rem 2rem;
  }
}

@media (max-width: 600px) {
  .page-title {
    font-size: 2.5rem;
  }

  .page-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-text {
    font-size: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
    gap: 1rem;
  }

  /* Reset all items to single column on mobile */
  .gallery-item:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Keep some items taller for visual interest */
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(5),
  .gallery-item:nth-child(8) {
    grid-row: span 2;
  }

}
