/* ========================================
   MENUS DÉROULANTS
======================================== */
.has-dropdown {
  position: relative;
}

.has-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.arrow {
  font-size: 11px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.has-dropdown:hover .arrow {
  transform: rotate(180deg);
}

#nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 200;
  padding: 8px 0;
  padding-top: 16px;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

#nav .has-dropdown:hover .dropdown {
  display: flex;
}

.dropdown li {
  margin: 0 !important;
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px !important;
  color: var(--gray) !important;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.dropdown li a:hover {
  background: var(--gray-light);
  color: var(--primary) !important;
}

/* Lien actif dans le nav */
#nav a.active {
  color: var(--primary) !important;
  font-weight: 600;
}

/* ========================================
   PAGE HERO
======================================== */
.page-hero {
  background-image: url('images/hero-bg.PNG');
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 70px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.88) 0%, rgba(30,58,95,0.85) 50%, rgba(26,86,219,0.80) 100%);
  z-index: 0;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-content,
.page-hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
}

.page-hero-content h1,
.page-hero .container h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
  line-height: 1.15;
}

.page-hero-content p,
.page-hero .container p {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 0 auto;
}

.page-hero .container .section-tag {
  color: rgba(255,255,255,0.7);
}

/* ========================================
   PAGE INTRO
======================================== */
.page-intro {
  padding: 80px 0;
  background: white;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.intro-text h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  margin-top: 8px;
  line-height: 1.2;
}

.intro-text p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 20px;
}

.intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--gray-light);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gray);
}

.intro-placeholder svg {
  width: 64px;
  height: 64px;
  color: var(--primary);
  opacity: 0.4;
}

.intro-placeholder p {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray);
}

/* ========================================
   SECTIONS TYPES
======================================== */
.type-section {
  padding: 80px 0;
}

.bg-light { background: var(--gray-light); }
.bg-white { background: white; }

.type-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.type-content.reverse {
  direction: rtl;
}

.type-content.reverse > * {
  direction: ltr;
}

.type-text p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 24px;
}

/* ========================================
   GRILLE DE RÉALISATIONS / PHOTOS
======================================== */
.realisation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.realisation-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.realisation-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.photo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-placeholder {
  aspect-ratio: 3;
  background: white;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.photo-placeholder:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-placeholder span {
  font-size: 28px;
}

.photo-placeholder p {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  margin: 0;
}

.photo-placeholder small {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 0 8px;
}

/* Quand une vraie photo est ajoutée */
.photo-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.photo-caption {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
  text-align: center;
  margin: 0;
}

/* ========================================
   CARDS VITRAGE / AVANTAGES
======================================== */
.vitrage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.vitrage-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.vitrage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.vitrage-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.vitrage-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.vitrage-card p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.65;
}

/* ========================================
   CTA BAS DE PAGE
======================================== */
.page-cta {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  padding: 80px 0;
}

.page-cta-inner {
  text-align: center;
}

.page-cta-inner h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.page-cta-inner p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 32px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .type-content {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .type-content.reverse {
    direction: ltr;
  }

  .vitrage-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 260px;
  }

  .page-intro {
    padding: 56px 0;
  }

  .type-section {
    padding: 56px 0;
  }

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

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

  /* Menu mobile : cacher dropdown, afficher comme liste */
  #nav .dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--primary-light);
    border-radius: 0;
    display: none;
    background: var(--gray-light);
    padding: 4px 0;
  }

  #nav .has-dropdown.open .dropdown {
    display: flex;
  }

  .dropdown li a {
    padding: 8px 20px 8px 28px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 480px) {
  .realisation-grid {
    grid-template-columns: 1fr;
  }
}
