/*
====================================================
Project : Société de Plomberie Ayouche
Page    : Projets en cours
Author  : AI + User
Version : 1.0.0
Notes   : Pixel-perfect reproduction of a supplied mockup. Reuses the
          site's shared design tokens (colors, buttons, navbar, footer
          from style.css) and the `.real-eyebrow` label class already
          defined in realisations.css. Every page-specific class below is
          prefixed `pec-`.
====================================================
*/

/* --------------------------------------------------------------------------
   HERO — background is a pre-made graphic (projetecour.png: dark navy field
   with baked-in blueprint decorations on the left, diagonal blue-stroke
   curve, construction-site photo on the right). Do not recreate its
   graphics — only overlay a dark gradient for legibility, matching the
   exact source ratio to avoid crop.
   -------------------------------------------------------------------------- */
.pec-hero {
  position: relative;
  aspect-ratio: 1717 / 916;
  display: flex;
  align-items: flex-start;
  padding-top: calc(var(--navbar-height) + 64px);
  background-color: #000A17;
  background-image: url('../back/projetecour.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.pec-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 10, 23, .32) 0%, rgba(0, 10, 23, .08) 42%, rgba(0, 10, 23, 0) 60%);
}

.pec-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.pec-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 30px;
}

.pec-breadcrumb a {
  color: rgba(255, 255, 255, .55);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.pec-breadcrumb i {
  font-size: 9px;
  color: rgba(255, 255, 255, .3);
}

.pec-breadcrumb span[aria-current] {
  color: var(--color-primary);
}

.pec-hero-content {
  max-width: 600px;
}

.pec-hero-content h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 46px;
  line-height: 1.1;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0 0 18px;
}

.pec-hero-content h1 .accent {
  color: var(--color-primary);
}

.pec-hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  color: #FFFFFF;
  margin: 0 0 18px;
}

.pec-hero-text {
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .68);
  max-width: 460px;
  margin: 0 0 32px;
}

.pec-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   BARRE DE STATISTIQUES
   -------------------------------------------------------------------------- */
.pec-stats {
  background-color: var(--color-white);
  padding-block: 40px;
}

.pec-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pec-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 22px;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-base), transform var(--transition-base);
}

.pec-stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 16px 34px rgba(1, 41, 99, .1);
  transform: translateY(-4px);
}

.pec-stat-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: #FFFFFF;
  color: var(--color-primary);
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(1, 41, 99, .1);
}

.pec-stat-body {
  display: flex;
  flex-direction: column;
}

.pec-stat-body strong {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.pec-stat-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text-dark);
  margin-top: 2px;
}

.pec-stat-sub {
  font-size: 11.5px;
  color: var(--color-text-gray);
  margin-top: 4px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   NOS CHANTIERS EN COURS — carrousel
   -------------------------------------------------------------------------- */
.pec-chantiers {
  background-color: var(--color-white);
}

.pec-chantiers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.pec-chantiers-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--color-primary);
  text-decoration: none;
  transition: gap var(--transition-fast);
}

.pec-chantiers-link:hover {
  gap: 12px;
  color: var(--color-primary-dark);
}

.pec-chantiers-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  padding-block: 10px 4px;
}

.pec-chantiers-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-primary-dark);
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(1, 41, 99, .08);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.pec-chantiers-arrow:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.pec-chantiers-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
}

.pec-chantier-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: 0 16px 34px rgba(1, 41, 99, .08);
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
}

.pec-chantier-card--peek {
  flex: 0 0 300px;
  width: 300px;
  opacity: .7;
  transform: scale(.94);
}

.pec-chantier-card--active {
  flex: 0 0 420px;
  width: 420px;
  position: relative;
  z-index: 1;
  opacity: 1;
  box-shadow: 0 28px 55px rgba(1, 41, 99, .18);
}

.pec-chantier-card:hover {
  box-shadow: 0 30px 56px rgba(1, 41, 99, .2);
}

.pec-chantier-card--peek:hover {
  transform: scale(.97);
}

@keyframes pecChantierEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pec-chantier-card.is-entering {
  animation: pecChantierEnter .5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pec-chantier-media {
  position: relative;
  aspect-ratio: 4 / 2.7;
  overflow: hidden;
}

.pec-chantier-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.pec-chantier-card:hover .pec-chantier-media img {
  transform: scale(1.08);
}

.pec-chantier-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(1, 41, 99, .25);
}

.pec-chantier-body {
  padding: 20px 22px 22px;
}

.pec-chantier-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-primary-dark);
  margin: 0 0 4px;
}

.pec-chantier-location {
  font-size: 12.5px;
  color: var(--color-text-gray);
  margin: 0 0 16px;
}

.pec-chantier-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.pec-chantier-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pec-chantier-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--color-text-gray);
}

.pec-chantier-meta strong {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--color-text-dark);
}

.pec-chantier-progress-label {
  display: block;
  font-size: 11px;
  color: var(--color-text-gray);
  margin-bottom: 8px;
}

.pec-chantier-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pec-chantier-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background-color: var(--color-bg-light);
  overflow: hidden;
}

.pec-chantier-progress-bar {
  height: 100%;
  border-radius: 999px;
  background-color: var(--color-primary);
}

.pec-chantier-progress-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--color-primary-dark);
  flex-shrink: 0;
}

.pec-chantiers-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.pec-chantiers-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-border);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.pec-chantiers-dot.is-active {
  background-color: var(--color-primary);
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   IMPLANTATION DES CHANTIERS — carte stylisée du Maroc
   -------------------------------------------------------------------------- */
.pec-map {
  background-color: var(--color-bg-light);
}

.pec-map-grid {
  display: grid;
  grid-template-columns: .68fr 1.32fr;
  gap: 60px;
  align-items: center;
}

.pec-map-text h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin: 0 0 16px;
}

.pec-map-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-gray);
  margin: 0 0 30px;
  max-width: 420px;
}

.pec-map-visual {
  position: relative;
  margin-right: -24px;
}

@media (min-width: 1320px) {
  .pec-map-visual {
    margin-right: calc(-24px - (100vw - var(--container-width)) / 2);
  }
}

.pec-map-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1731 / 909;
}

/* --------------------------------------------------------------------------
   PROJET DU MOIS
   -------------------------------------------------------------------------- */
.pec-featured {
  background-color: var(--color-white);
}

.pec-featured-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.pec-featured-text h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin: 0 0 6px;
}

.pec-featured-location {
  font-size: 13.5px;
  color: var(--color-text-gray);
  margin: 0 0 16px;
}

.pec-featured-desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--color-text-gray);
  margin: 0 0 26px;
  max-width: 440px;
}

.pec-featured-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 24px;
  margin-bottom: 30px;
}

.pec-featured-meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pec-featured-meta-item i {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--color-bg-light);
  color: var(--color-primary);
  font-size: 15px;
}

.pec-featured-meta-item div {
  display: flex;
  flex-direction: column;
}

.pec-featured-meta-item span {
  font-size: 11px;
  color: var(--color-text-gray);
}

.pec-featured-meta-item strong {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--color-primary-dark);
}

.pec-progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}

.pec-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pec-progress-ring-track {
  fill: none;
  stroke: var(--color-bg-light);
  stroke-width: 10;
}

.pec-progress-ring-bar {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: calc(326.7 - (326.7 * 85 / 100));
}

.pec-progress-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pec-progress-ring-value strong {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--color-primary-dark);
}

.pec-progress-ring-value span {
  font-size: 10px;
  color: var(--color-text-gray);
  max-width: 70px;
  line-height: 1.3;
}

.pec-featured-media {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 4.55;
  box-shadow: 0 30px 60px rgba(1, 41, 99, .16);
}

.pec-featured-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pec-featured-overlay-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background-color: rgba(0, 10, 23, .82);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 20px 22px;
}

.pec-featured-overlay-panel h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 10px;
}

.pec-featured-overlay-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.pec-featured-overlay-panel li {
  position: relative;
  padding-left: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .8);
}

.pec-featured-overlay-panel li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   PLANNING D'AVANCEMENT
   -------------------------------------------------------------------------- */
.pec-timeline-section {
  background-color: var(--color-bg-light);
}

.pec-timeline-header {
  margin-bottom: 44px;
}

.pec-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.pec-timeline::before {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background-color: var(--color-border);
  z-index: 0;
}

.pec-timeline-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.pec-timeline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  color: var(--color-border);
  font-size: 19px;
}

.pec-timeline-step.is-done .pec-timeline-icon {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.pec-timeline-step.is-current .pec-timeline-icon {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 6px rgba(0, 140, 209, .18);
}

.pec-timeline-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--color-primary-dark);
}

.pec-timeline-status {
  font-size: 11px;
  color: var(--color-text-gray);
}

.pec-timeline-step.is-current .pec-timeline-status {
  color: var(--color-primary);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   NOS DOMAINES D'INTERVENTION
   -------------------------------------------------------------------------- */
.pec-domains {
  background-color: var(--color-white);
}

.pec-domains-header {
  margin-bottom: 36px;
}

.pec-domains-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.pec-domain-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.pec-domain-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.pec-domain-card:hover img {
  transform: scale(1.08);
}

.pec-domain-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 10, 23, 0) 40%, rgba(0, 10, 23, .82) 100%);
}

.pec-domain-icon {
  position: absolute;
  left: 16px;
  bottom: 44px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-size: 14px;
}

.pec-domain-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13.5px;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   CTA FINAL — background reuses projetecour.png, dimmed
   -------------------------------------------------------------------------- */
.pec-cta {
  position: relative;
  background-color: #000A17;
  background-image: url('../back/projetecour.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.pec-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0, 10, 23, .95) 0%, rgba(0, 10, 23, .85) 55%, rgba(0, 10, 23, .6) 100%);
}

.pec-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.pec-cta-inner h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.25;
  color: #FFFFFF;
  margin: 12px 0 16px;
}

.pec-cta-inner h2 .accent {
  color: var(--color-primary);
}

.pec-cta-inner p {
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .75);
  margin: 0 0 30px;
}

.pec-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .pec-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pec-chantier-card--peek {
    flex-basis: 220px;
    width: 220px;
  }

  .pec-chantier-card--active {
    flex-basis: 340px;
    width: 340px;
  }

  .pec-map-grid,
  .pec-featured-grid {
    gap: 40px;
  }

  .pec-domains-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (max-width: 991.98px) {
  .pec-hero {
    aspect-ratio: auto;
    min-height: 640px;
    padding-bottom: 40px;
  }

  .pec-hero-content h1 {
    font-size: 34px;
  }

  .pec-chantier-card--peek {
    display: none;
  }

  .pec-chantier-card--active {
    flex: 1 1 auto;
    width: 100%;
    max-width: 480px;
  }

  .pec-map-grid {
    grid-template-columns: 1fr;
  }

  .pec-map-visual {
    order: -1;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .pec-featured-grid {
    grid-template-columns: 1fr;
  }

  .pec-featured-media {
    order: -1;
    aspect-ratio: 4 / 3.4;
  }

  .pec-timeline {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 36px;
  }

  .pec-timeline::before {
    display: none;
  }

  .pec-domains-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767.98px) {
  .pec-hero {
    min-height: 600px;
    padding-top: calc(var(--navbar-height) + 24px);
  }

  .pec-hero-content h1 {
    font-size: 28px;
  }

  .pec-stats-grid {
    grid-template-columns: 1fr;
  }

  .pec-chantiers-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pec-featured-meta {
    grid-template-columns: 1fr;
  }

  .pec-featured-overlay-panel {
    grid-template-columns: 1fr;
  }

  .pec-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .pec-domains-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pec-cta-inner h2 {
    font-size: 26px;
  }
}
