/* ============================================
   COGELAS — Corporate Red
   Primary: #001017 | Accent: #D9000D
   Font: Montserrat
   ============================================ */

/* === RESET & VARIABLES === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #001017;
  --accent: #D9000D;
  --accent-hover: #b8000b;
  --teal: #34546C;
  --white: #ffffff;
  --light: #f8f9fa;
  --gray-600: #6c757d;
  --gray-400: #ced4da;
  --font: 'Montserrat', sans-serif;
  --container: 1140px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  color: var(--primary);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* === HEADER === */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.transparent {
  background: transparent;
}

.header.scrolled {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header .logo img {
  height: 48px;
  width: auto;
  transition: filter var(--transition);
}

.header.transparent .logo img {
  filter: brightness(0) invert(1);
}

.header.scrolled .logo img {
  filter: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color var(--transition);
  padding: 8px 0;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%;
  height: 2px; background: var(--accent); transform: scaleX(0);
  transition: transform var(--transition); transform-origin: right;
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.header.transparent .nav-link { color: var(--white); }
.header.scrolled .nav-link { color: var(--primary); }
.nav-link:hover { color: var(--accent); }

.nav-cta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--white);
  padding: 12px 24px;
  transition: background var(--transition);
  cursor: pointer;
}

.nav-cta:hover { background: var(--accent-hover); }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  transition: all var(--transition);
}

.header.transparent .hamburger span { background: var(--white); }
.header.scrolled .hamburger span { background: var(--primary); }

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--primary);
  z-index: 999;
  padding: 100px 40px 40px;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  color: var(--white);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* === HERO === */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--primary);
}

.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}

.hero-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Hide native media controls if any browser surfaces them */
.hero-video video::-webkit-media-controls,
.hero-video video::-webkit-media-controls-panel,
.hero-video video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0,16,23,0.5) 0%, rgba(0,16,23,0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px 160px;
}

.hero-content h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  color: var(--white);
  letter-spacing: 3px;
  line-height: 1.15;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-content p {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* === CTA CARDS (inside hero, bottom) === */
.cta-cards {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 0 20px 40px;
}

.cta-cards-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cta-tile {
  position: relative;
  display: block;
  background: #1c2128;
  padding: 44px 48px 40px;
  min-height: 220px;
  overflow: hidden;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.cta-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}

.cta-tile:hover {
  background: #242a32;
  transform: translateY(-2px);
}

.cta-tile:hover::before {
  transform: scaleY(1);
}

.cta-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  background: #242a32;
}

.cta-tile:focus-visible::before {
  transform: scaleY(1);
}

.cta-tile-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.cta-tile-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 10px;
  max-width: 90%;
}

.cta-tile-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  max-width: 85%;
  margin-bottom: 0;
}

.cta-tile-arrow {
  position: absolute;
  right: 32px;
  bottom: 28px;
  transition: transform var(--transition);
}

.cta-tile:hover .cta-tile-arrow {
  transform: translateX(4px);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: gap var(--transition);
  cursor: pointer;
}

.arrow-link:hover { gap: 18px; color: var(--accent); }

.arrow-link svg polygon { fill: var(--accent); }

/* === PLANCHERS HIGHLIGHT === */
.planchers-highlight {
  padding: 80px 0;
  background: var(--white);
}

.planchers-highlight-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.planchers-highlight-img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.planchers-highlight-img img,
.planchers-highlight-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.planchers-highlight-img video {
  pointer-events: none;
}

.planchers-highlight-img video::-webkit-media-controls,
.planchers-highlight-img video::-webkit-media-controls-panel,
.planchers-highlight-img video::-webkit-media-controls-overlay-play-button,
.planchers-highlight-img video::-internal-media-controls-overflow-button {
  display: none !important;
  -webkit-appearance: none;
}

.planchers-highlight-text h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 24px;
}

.planchers-highlight-text p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.planchers-highlight-text .arrow-link {
  margin-top: 12px;
}

/* === KEY FIGURES === */
.figures {
  position: relative;
  overflow: hidden;
  margin-top: 80px;
  margin-bottom: 24px;
}

.figures-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.figures-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,16,23,0.85);
  z-index: 1;
}

.figures-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px;
}

.figures-content h2 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.figures-content > p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 48px;
}

.figures-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.figure-item { text-align: center; color: var(--white); }

.figure-item .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 8px;
}

.figure-item .number {
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}

.figure-item .desc {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
  line-height: 1.5;
}

/* === SECTION HEADERS (2-col) === */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 80px 0 40px;
}

.section-header h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-header p {
  font-size: 14px;
  color: var(--gray-600);
  max-width: 500px;
}

.section-header a {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  transition: color var(--transition);
  white-space: nowrap;
}

.section-header a:hover { color: var(--accent); }

/* === EXPERTISES GRID === */
.expertises {
  background: var(--light);
  padding-bottom: 80px;
}

.expertises-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.expertise-card {
  position: relative;
  height: 380px;
  overflow: hidden;
  cursor: pointer;
}

.expertise-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.expertise-card:hover img { transform: scale(1.05); }

.expertise-card .slide-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 24px;
  background: linear-gradient(transparent, rgba(0,16,23,0.85));
  color: var(--white);
}

.expertise-card .slide-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 8px;
}

.expertise-card h3 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.expertise-card .slide-arrow {
  display: inline-block;
}

/* === PRESTATIONS (image right, card left) === */
.prestations {
  position: relative;
  padding: 0;
}

.prestations-bg {
  display: grid;
  grid-template-columns: 4fr 8fr;
}

.prestations-spacer { background: var(--light); }

.prestations-image {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.prestations-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

.prestations-card {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 50%;
  max-width: 560px;
  background: var(--white);
  padding: 48px;
  margin-left: calc((100vw - var(--container)) / 2 + 20px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

.prestations-card.reveal { transform: translateY(calc(-50% + 30px)); }
.prestations-card.reveal.visible { transform: translateY(-50%); }

.prestations-card h2 {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.prestation-link {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-400);
  transition: padding-left var(--transition), border-color var(--transition);
}

.prestation-link:hover {
  padding-left: 12px;
  border-color: var(--accent);
}

.prestation-link h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prestation-link:hover h3 { color: var(--accent); }

/* === PROJECTS === */
.projects {
  background: var(--light);
  padding-bottom: 80px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: var(--white);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.project-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.project-card-img {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.project-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card-img img { transform: scale(1.03); }

.project-card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

.project-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-card-meta h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.project-card-meta time {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-600);
}

.project-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.project-card-body .cta-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--gray-400);
  transition: color var(--transition);
}

.project-card:hover .cta-text { color: var(--accent); }

/* === DOMAINES D'ACTIVITE === */
.domaines {
  padding: 80px 0;
  background: var(--white);
}

.domaines-header {
  text-align: center;
  margin-bottom: 56px;
}

.domaines-header h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.domaines-header p {
  font-size: 14px;
  color: var(--gray-600);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.domaines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.domaine-item {
  text-align: center;
  padding: 40px 20px;
  border: 1px solid var(--gray-400);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.domaine-item:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(217, 0, 13, 0.08);
  transform: translateY(-4px);
}

.domaine-icon {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 16px;
}

.domaine-item h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  line-height: 1.4;
  transition: color var(--transition);
}

.domaine-item:hover h3 {
  color: var(--accent);
}

/* === COMPANY TEXT === */
.company-text {
  padding: 80px 0;
}

.company-text h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 48px;
}

.company-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.company-cols p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.company-cols strong { color: var(--primary); font-weight: 600; }

/* === FOOTER === */
.footer {
  background: var(--primary);
  padding: 60px 0 0;
  color: var(--white);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 48px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.6;
  margin-top: 20px;
}

.footer-brand .logo img {
  height: 44px;
  filter: brightness(0) invert(1);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.footer-social span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
}

.footer-social a svg { transition: opacity var(--transition); opacity: 0.8; }
.footer-social a:hover svg { opacity: 1; }

.footer-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 16px;
}

.footer-details .detail-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 8px;
}

.footer-details .detail-value {
  font-size: 14px;
  font-weight: 600;
}

.footer-details a { transition: color var(--transition); }
.footer-details a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 24px;
  margin-top: 32px;
}

.footer-links a {
  font-size: 12px;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.footer-links a:hover { opacity: 1; }

.footer-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 11px;
  opacity: 0.4;
}

/* === SVG ARROW (Mauffrey pattern) === */
.svg-arrow {
  display: inline-block;
  width: 28px; height: 22px;
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* === NAV DROPDOWN === */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 280px;
  padding: 12px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-dropdown-menu a:hover {
  background: rgba(217,0,13,0.06);
  color: var(--accent);
}
.mobile-sub-link {
  padding-left: 32px !important;
  font-size: 13px !important;
  opacity: 0.7;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .prestations-card {
    margin-left: 40px;
  }
}

@media (max-width: 992px) {
  .nav-menu { display: none; }
  .hamburger { display: flex; }

  .cta-cards-inner { grid-template-columns: 1fr; gap: 16px; }
  .cta-tile { padding: 36px 40px 32px; min-height: 180px; }
  .hero-content { padding-bottom: 420px; }

  .figures-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }

  .expertises-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-card { height: 320px; }

  .prestations-bg { grid-template-columns: 1fr; }
  .prestations-spacer { display: none; }
  .prestations-image { min-height: 400px; }
  .prestations-card {
    position: relative;
    top: auto; transform: none;
    width: 100%; max-width: 100%;
    margin: -60px 20px 0;
    padding: 32px;
  }

  .projects-grid { grid-template-columns: 1fr; }
  .domaines-grid { grid-template-columns: repeat(3, 1fr); }
  .company-cols { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-details { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Hero rules consolidated into the MOBILE POLISH block below — kept here
     are only the non-hero refinements that don't interfere. */
  .cta-tile-title { font-size: 18px; }

  .planchers-highlight-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 60px 0 32px;
  }

  .project-card-img { height: 220px; }
}

@media (max-width: 576px) {
  .figures-grid { grid-template-columns: 1fr 1fr; }
  .figure-item .number { font-size: 36px; }

  .cta-tile { padding: 24px 24px 20px; }
  .cta-tile-title { font-size: 16px; }
  .cta-tile-desc { font-size: 12px; }

  .prestations-card { margin: -40px 12px 0; padding: 24px; }
  .expertises-grid { grid-template-columns: 1fr; }
  .expertise-card { height: 280px; }
  .domaines-grid { grid-template-columns: repeat(2, 1fr); }
  .domaine-item { padding: 32px 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .expertise-card img { transition: none; }
  .project-card-img img { transition: none; }
  html { scroll-behavior: auto; }
}

/* === INNER PAGES === */

/* Skip link */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--white);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* Active nav state */
.nav-link[aria-current="page"],
.nav-dropdown-toggle.nav-dropdown-active {
  color: var(--accent);
}
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
/* Contact page: active state on the CTA button */
.nav-cta[aria-current="page"] {
  background: var(--accent-hover);
  outline: 2px solid var(--white);
  outline-offset: -4px;
}
.nav-dropdown-menu a[aria-current="page"] {
  color: var(--accent);
  background: rgba(217, 0, 13, 0.06);
}
.mobile-nav a[aria-current="page"] {
  color: var(--accent);
}
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* Page Hero */
.page-hero {
  position: relative;
  min-height: 40vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.page-hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 16, 23, 0.85);
}
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px 20px 60px;
  width: 100%;
}
.breadcrumb {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
  color: var(--white);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--white);
  transition: opacity var(--transition);
}
.breadcrumb a:hover {
  opacity: 0.8;
}
.page-hero-content h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.page-hero-content p {
  font-size: 14px;
  font-weight: 300;
  opacity: 0.7;
  color: var(--white);
  max-width: 600px;
  line-height: 1.8;
}

/* CTA Banner */
.cta-banner {
  background: var(--accent);
  padding: 60px 20px;
  text-align: center;
}
.cta-banner h2 {
  color: var(--white);
  font-size: clamp(18px, 2.5vw, 24px);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.cta-banner p {
  color: var(--white);
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 24px;
}
.cta-banner-btn {
  display: inline-block;
  background: var(--white);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px 32px;
  letter-spacing: 1px;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.cta-banner-btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* Content Section (image + text, 2-col) */
.content-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.content-section.reversed {
  direction: rtl;
}
.content-section.reversed > * {
  direction: ltr;
}
.content-section-img {
  overflow: hidden;
}
.content-section-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.content-section-text h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 24px;
}
.content-section-text p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 16px;
}

/* Centered variant: no image, narrower max-width, text centered */
.content-section--centered {
  grid-template-columns: 1fr;
  max-width: 860px;
  text-align: center;
}

/* Feature Cards (3-col grid) */
.feature-cards {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  padding: 40px 32px;
  border: 1px solid var(--gray-400);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(217, 0, 13, 0.08);
}
.feature-card-number {
  color: var(--accent);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.feature-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.8;
}

/* Accent border text block (isolation thermique) */
.accent-block {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px 80px;
}
.accent-block-inner {
  border-left: 4px solid var(--accent);
  padding: 24px 32px;
  background: var(--light);
}
.accent-block-inner p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
}

/* One-off centered intro text (used on maconnerie page) */
.intro-centered {
  padding: 80px 0 0;
}
.intro-centered .container {
  max-width: 800px;
  text-align: center;
}
.intro-centered p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
}

/* Contact Form */
.contact-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px 20px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
}
.contact-form h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.contact-form > p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 32px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-group {
  margin-bottom: 24px;
}
.form-group.full-width {
  grid-column: 1 / -1;
}
.form-group label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--gray-400);
  padding: 12px 0;
  font-family: var(--font);
  font-size: 14px;
  background: transparent;
  color: var(--primary);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--accent);
  outline: none;
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-group .field-error {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  display: none;
}
.form-group.has-error input,
.form-group.has-error textarea {
  border-bottom-color: var(--accent);
}
.form-group.has-error .field-error {
  display: block;
}
.form-submit {
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px 32px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
  margin-top: 8px;
}
.form-submit:hover {
  background: var(--accent-hover);
}
.form-success {
  border-left: 4px solid #28a745;
  padding: 24px 32px;
  background: var(--light);
}
.form-success p {
  font-size: 16px;
  font-weight: 600;
  color: #28a745;
}
.form-error-banner {
  border-left: 4px solid var(--accent);
  padding: 14px 20px;
  background: rgba(217, 0, 13, 0.06);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* Contact Info Panel */
.contact-info h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.contact-info p {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 32px;
  line-height: 1.6;
}
.contact-info a {
  transition: color var(--transition);
}
.contact-info a:hover {
  color: var(--accent);
}
.contact-info iframe {
  width: 100%;
  height: 300px;
  border: 0;
}
.contact-image {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--light);
  align-self: stretch;
}
.contact-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 992px) {
  .contact-image { aspect-ratio: 3 / 2; height: auto; min-height: 0; }
}
/* Inner pages: projects grid wrapper for realisations (full page, not homepage) */
.realisations-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px 20px;
}
.realisations-grid .projects-grid {
  grid-template-columns: 1fr 1fr;
}

/* Mobile folder toggle */
.mobile-folder-toggle {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-folder-toggle::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  transition: transform var(--transition);
}
.mobile-folder-toggle[aria-expanded="true"]::after {
  content: '−';
}
.mobile-nav .mobile-sub-link {
  display: none;
}
.mobile-nav .mobile-sub-visible {
  display: block;
}

/* === INNER PAGES RESPONSIVE === */
@media (max-width: 992px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-hero-content {
    padding-top: 120px;
    padding-bottom: 40px;
  }
  .content-section {
    grid-template-columns: 1fr;
    padding: 60px 20px;
  }
  .content-section.reversed {
    direction: ltr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .realisations-grid .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion — inner page additions */
@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .domaine-item {
    transition: none;
    transform: none;
  }
  .feature-card:hover,
  .domaine-item:hover {
    transform: none;
  }
  .skip-link {
    transition: none;
  }
  .partners-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 56px;
  }
  .partners-viewport { mask-image: none; -webkit-mask-image: none; }
}

/* === PARTNERS === */
.partners {
  background: var(--white);
  padding: 72px 0 64px;
}

.partners-title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  color: var(--primary);
  margin-bottom: 40px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.partners-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.partners-track {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 88px;
  width: max-content;
  animation: partners-scroll 48s linear infinite;
  will-change: transform;
}

.partners-track[data-paused="true"] { animation-play-state: paused; }

.partner-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 200px;
}

.partner-logo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.partners-divider {
  height: 1px;
  background: var(--gray-400);
  margin: 48px auto 32px;
  max-width: 480px;
}

.partners-brand {
  display: flex;
  justify-content: center;
}

.partners-brand img {
  height: 88px;
  width: auto;
}

/* === REALISATIONS — PROJECT NUMBER BADGE === */
.project-card-num {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* === LEGAL PAGES (Mentions légales, Politique de confidentialité) === */
.page-hero--compact { min-height: 280px; }
.page-hero--compact .page-hero-content { padding-top: 120px; padding-bottom: 60px; }

.legal-content {
  background: var(--white);
  padding: 72px 0 96px;
}

.legal-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--primary);
  font-size: 15px;
  line-height: 1.75;
}

.legal-container h2 {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.legal-container h2:first-child { margin-top: 0; }

.legal-container h3 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--primary);
}

.legal-container p {
  margin: 0 0 14px;
}

.legal-container p strong {
  color: var(--primary);
  font-weight: 700;
}

.legal-container a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-container a:hover { color: var(--accent-hover); }

/* ================================================================
   MOBILE POLISH (≤992 / ≤768 / ≤576 / ≤380)
   Shared, additive refinements layered on top of the base rules.
   Goal: stable layouts, breathable spacing, no horizontal overflow,
   first-class form ergonomics, resilient nav.
   ================================================================ */

/* Global resilience.
   overflow-x: clip prevents stray horizontal scrolling without establishing a
   scroll container — preserves position:sticky elsewhere (e.g. .contact-image
   on desktop). Falls back gracefully to hidden in older browsers. */
html, body { overflow-x: clip; }
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

/* Lock body scroll while mobile menu is open (set by JS) */
body.nav-open { overflow: hidden; }

/* Hamburger: guarantee 44×44 tap target */
.hamburger {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* Mobile nav: dynamic viewport, safe-area, scrollable, smooth */
.mobile-nav {
  height: 100vh;
  height: 100dvh;
  padding: calc(96px + env(safe-area-inset-top)) 28px calc(40px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  gap: 8px;
}
.mobile-nav a,
.mobile-folder-toggle {
  font-size: 18px;
  padding: 14px 0;
  min-height: 48px;
}
.mobile-nav .mobile-sub-link {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  min-height: 40px;
  font-size: 13px !important;
}

/* ===== HERO (homepage) — let content + CTAs flow on mobile ===== */
@media (max-width: 768px) {
  /* Hero is one viewport tall as a flex column. The video + overlay sit
     absolutely behind everything; the title fills the remaining space and
     the CTA cards anchor to the bottom of the fold — visible without scrolling. */
  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }
  .hero-content {
    flex: 1;
    min-height: 0;
    padding: 88px 20px 16px;
    justify-content: center;
  }
  .hero-content h1 {
    letter-spacing: 1.5px;
    margin-bottom: 0;
  }
  /* CTA cards: in-flow flex item, dark tile bg shows over the video without
     a hard color break (transparent wrapper, opaque tiles). */
  .cta-cards {
    position: static;
    padding: 0 16px 28px;
    background: transparent;
  }
  .cta-cards-inner {
    gap: 12px;
  }
  .cta-tile {
    min-height: 0;
    padding: 22px 22px 20px;
  }
  .cta-tile-arrow {
    right: 22px;
    bottom: 20px;
  }
  /* Native <video> uses object-fit: cover — no per-breakpoint scaling needed */
}

/* ===== SECTION RHYTHM ===== */
@media (max-width: 768px) {
  .planchers-highlight { padding: 56px 0; }
  .planchers-highlight-inner { gap: 24px; }
  .figures { margin-top: 0; }
  .figures-content { padding: 56px 20px; }
  .figures-content > p { margin-bottom: 32px; }
  .domaines { padding: 56px 0; }
  .domaines-header { margin-bottom: 32px; }
  .partners { padding: 48px 0 40px; }
  .partners-title { margin-bottom: 28px; font-size: 22px; }
  .projects { padding-bottom: 56px; }
  .section-header { padding: 40px 0 24px; }
  .realisations-grid { padding: 40px 16px 56px; }
  .content-section { padding: 48px 20px; gap: 28px; }
  .feature-cards { padding: 0 16px 56px; gap: 16px; }
  .feature-card { padding: 28px 24px; }
  .accent-block { padding: 0 16px 56px; }
  .intro-centered { padding: 56px 0 0; }
  .legal-content { padding: 48px 0 64px; }
  .legal-container { padding: 0 20px; font-size: 15px; }
  .legal-container h2 { margin-top: 36px; }
}

/* ===== FIGURES — keep 2 columns clean, never let numbers crowd ===== */
@media (max-width: 576px) {
  .figures-grid { gap: 24px; }
  .figure-item .number { font-size: 34px; }
}

/* ===== DOMAINES — protect very narrow widths ===== */
@media (max-width: 380px) {
  .domaines-grid { grid-template-columns: 1fr; }
  .domaine-item { padding: 24px 16px; }
  .domaine-icon { width: 96px; height: 96px; }
}

/* ===== PARTNERS — readable on phones ===== */
@media (max-width: 768px) {
  .partner-logo { height: 70px; width: 140px; }
  .partners-track { gap: 56px; }
  .partners-divider { margin: 32px auto 24px; max-width: 280px; }
  .partners-brand img { height: 64px; }
}

/* ===== PROJECT CARDS ===== */
@media (max-width: 576px) {
  .project-card-img { height: 200px; }
  .project-card-body { padding: 20px 22px; }
  .project-card-body h3 { font-size: 16px; }
  .project-card-num { min-width: 38px; height: 38px; font-size: 13px; top: 12px; left: 12px; }
}

/* ===== INNER PAGE HERO — balanced on phones ===== */
@media (max-width: 768px) {
  .page-hero { min-height: 0; }
  .page-hero-content {
    padding: 112px 20px 36px;
  }
  .page-hero-content h1 {
    letter-spacing: 1px;
    word-break: break-word;
    hyphens: auto;
  }
  .page-hero-content p { font-size: 13px; line-height: 1.7; }
  .breadcrumb { font-size: 10px; letter-spacing: 1.5px; }
}

/* ===== CONTACT FORM — first-class on phones ===== */
@media (max-width: 768px) {
  .contact-layout { padding: 48px 20px; gap: 32px; }
  .contact-form > p { margin-bottom: 24px; }
  .form-grid { gap: 4px; }
  .form-group { margin-bottom: 20px; }
  /* 16px inputs prevent iOS zoom-on-focus */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
    padding: 14px 0;
  }
  .form-group label { font-size: 11px; }
  .form-submit {
    width: 100%;
    padding: 16px 24px;
    min-height: 48px;
  }
  .contact-info p { font-size: 15px; margin-bottom: 24px; }
  .contact-info iframe { height: 240px; }
}

/* ===== FOOTER — tighter, more readable ===== */
@media (max-width: 768px) {
  .footer { padding: 48px 0 0; }
  .footer-inner { gap: 32px; padding: 0 20px; }
  .footer-brand p { font-size: 12px; margin-top: 16px; }
  .footer-brand .logo img { height: 38px; }
  .footer-social { margin-top: 16px; gap: 12px; flex-wrap: wrap; }
  .footer-details { grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
  .footer-details .detail-value { font-size: 13px; }
  .footer-links { flex-wrap: wrap; gap: 16px; margin-top: 24px; }
  .footer-bottom { margin-top: 32px; padding: 16px 20px env(safe-area-inset-bottom); }
}
@media (max-width: 380px) {
  .footer-details { grid-template-columns: 1fr; gap: 20px; }
}

/* ===== HEADER — tighter on tiny screens ===== */
@media (max-width: 576px) {
  .header-inner { padding: 12px 16px; }
  .header .logo img { height: 40px; }
}

/* ===== CONTAINERS — match body padding rhythm on phones ===== */
@media (max-width: 576px) {
  .container,
  .header-inner,
  .footer-inner,
  .planchers-highlight-inner,
  .expertises-grid,
  .domaines-grid,
  .feature-cards,
  .accent-block,
  .legal-container,
  .contact-layout,
  .figures-content,
  .realisations-grid {
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer-bottom { padding-left: 16px; padding-right: 16px; }
}

/* ===== Reset desktop hover transforms on touch (avoids stuck states) ===== */
@media (hover: none) {
  .feature-card:hover,
  .domaine-item:hover,
  .project-card:hover,
  .cta-tile:hover {
    transform: none;
  }
  /* expertise / project image zooms — disable on touch */
  .expertise-card:hover img,
  .project-card:hover .project-card-img img {
    transform: none;
  }
}

/* ===== CTA BANNER (expertise pages + qui-sommes-nous) ===== */
@media (max-width: 768px) {
  .cta-banner { padding: 44px 20px; }
  .cta-banner h2 { font-size: 18px; line-height: 1.3; }
  .cta-banner p { font-size: 13px; margin-bottom: 20px; }
  .cta-banner-btn {
    display: inline-block;
    width: 100%;
    max-width: 320px;
    padding: 14px 24px;
    min-height: 48px;
    box-sizing: border-box;
  }
}

/* ===== COMPANY TEXT (multi-column copy block) ===== */
@media (max-width: 768px) {
  .company-text { padding: 56px 0; }
  .company-text h2 { margin-bottom: 28px; }
  .company-cols { gap: 24px; }
}

/* ===== EXPERTISES GRID — 1 col on small phones ===== */
@media (max-width: 480px) {
  .expertises-grid { grid-template-columns: 1fr; gap: 14px; }
  .expertise-card { height: 260px; }
  .expertise-card .slide-overlay { padding: 22px 20px; }
}

/* ===== Page hero stable min-height on mobile (no 40vh trap) ===== */
@media (max-width: 768px) {
  .page-hero { min-height: 220px; }
}

/* ===== LANDSCAPE PHONES (short-height viewports) =====
   Phones in landscape (e.g. 800×360, 740×360, 667×375) fall into the 992
   breakpoint where the hero forces `height: 100vh; min-height: 600px` and pins
   CTA cards `position: absolute; bottom: 0`. On a 360-tall screen the user
   sees ~60% of a 600-tall hero with the headline floated awkwardly and CTA
   cards entirely below the fold. Collapse to flow when height ≤ 600 + landscape. */
@media (max-height: 600px) and (orientation: landscape) {
  /* Same flex pattern as portrait phones: hero fills the (short) viewport,
     content takes remaining space, CTA cards anchor at the bottom in 2 columns. */
  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
  }
  .hero-content {
    flex: 1;
    min-height: 0;
    padding: 80px 24px 12px;
    justify-content: center;
  }
  .cta-cards {
    position: static;
    padding: 0 24px 20px;
    background: transparent;
  }
  .cta-cards-inner {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .cta-tile { min-height: 0; padding: 16px 20px; }
  /* Native <video> + object-fit: cover handles all orientations — no media-specific rules */
}

/* ===== iOS / Safari TAP POLISH ===== */
html { -webkit-tap-highlight-color: transparent; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
