/* Experience layer for the home page (index.php)
   Goal: improve first impression + readability without rewriting content. */

:root {
  --ove-glow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --ove-border: rgba(255, 255, 255, 0.14);
  --ove-border-light: rgba(0, 0, 0, 0.10);
}

/* Cinematic hero */
.hero {
  min-height: 92vh;
  height: auto;
  padding-top: 84px; /* room for fixed header */
  padding-bottom: 56px; /* lifts bottom elements a bit */
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  row-gap: 14px;
}

.video-container {
  margin-top: 0;
  z-index: 0;
}

.hero .video-container video {
  transform: scale(1.02);
  filter: saturate(1.06) contrast(1.04);
}

/* Autoplay fallback + reduced motion */
.ove-video-fallback .hero .video-container video {
  opacity: 0;
}

.ove-video-fallback .hero .video-container {
  background: url('../assets/aidant.jpg') center/cover no-repeat;
}

.ove-reduced-motion .hero .video-container video {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-dot { animation: none; }
  .hero-btn, .hero-btn:hover { transform: none; }
}

/* Better focus styles (keyboard accessibility) */
.hero-btn:focus-visible,
.hero-scroll:focus-visible {
  outline: 3px solid rgba(255, 224, 131, 0.9);
  outline-offset: 3px;
}

.hero .overlay {
  pointer-events: none;
  background: radial-gradient(1200px 700px at 50% 40%, rgba(0, 113, 227, 0.22), transparent 60%),
              linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.70) 70%, rgba(0, 0, 0, 0.85) 100%);
}

.hero-content {
  display: grid;
  gap: 18px;
  align-content: center;
  justify-items: center;
  z-index: 3;
  padding-bottom: 0;
  width: min(1200px, 100%);
}

/* Info banner inside hero (bottom overlay on video) */
.info-banner--hero {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  align-self: end;
  justify-self: stretch;
  z-index: 4;
  background: transparent;
  padding: 0;
  pointer-events: none; /* cards are visual; prevents accidental overlay issues */
  margin-bottom: 8px;
}

.hero-scroll--below {
  margin-top: 6px;
  margin-bottom: 0;
}

.info-banner--hero .container {
  max-width: 1200px;
  padding: 0 20px;
}

.info-banner--hero .info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.info-banner--hero .info-item {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.info-banner--hero .info-number,
.info-banner--hero .info-label {
  color: rgba(255,255,255,0.92);
}

.info-banner--hero .info-description {
  color: rgba(255,255,255,0.78);
}

.light-theme .info-banner--hero .info-item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
}

.light-theme .info-banner--hero .info-number,
.light-theme .info-banner--hero .info-label,
.light-theme .info-banner--hero .info-description {
  color: rgba(0,0,0,0.9);
}

@media (max-width: 992px) {
  .hero { padding-bottom: 46px; }
  .info-banner--hero .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
  .hero { padding-bottom: 38px; }
  .info-banner--hero .info-grid { grid-template-columns: 1fr; gap: 12px; }
  .info-banner--hero .info-item { border-radius: 16px; }
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hero-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.35));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ove-border);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  letter-spacing: 0.02em;
  font-weight: 600;
}

.hero-content h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  text-shadow: 0 12px 36px rgba(0,0,0,0.45);
}

.hero-subtitle {
  margin: 0;
  max-width: 68ch;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  will-change: transform;
}

.hero-btn-primary {
  background: linear-gradient(180deg, #1a86ff 0%, #0071e3 100%);
  color: #fff;
  box-shadow: 0 14px 40px rgba(0, 113, 227, 0.35);
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--ove-border);
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.hero-btn:hover {
  transform: translateY(-2px);
}

.hero-btn-primary:hover {
  box-shadow: 0 18px 55px rgba(0, 113, 227, 0.42);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-scroll {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.hero-scroll-text {
  display: inline-block;
  visibility: visible;
  opacity: 1;
  color: inherit;
  text-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

.hero-scroll-dot {
  width: 18px;
  height: 22px;
  display: inline-block;
  position: relative;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.35));
  animation: ovePulse 1.7s cubic-bezier(.2,.9,.2,1) infinite;
}

.hero-scroll-dot::before,
.hero-scroll-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 1px;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.14));
}

.hero-scroll-dot::before {
  top: 1px;
  opacity: 0.95;
}

.hero-scroll-dot::after {
  top: 9px;
  opacity: 0.70;
}

.hero-scroll:hover .hero-scroll-dot::before,
.hero-scroll:hover .hero-scroll-dot::after {
  border-right-color: rgba(255, 255, 255, 1);
  border-bottom-color: rgba(255, 255, 255, 1);
}

@keyframes ovePulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(7px); opacity: 0.8; }
}

/* Light theme: keep hero readable */
.light-theme .hero .overlay {
  background: radial-gradient(1200px 700px at 50% 40%, rgba(0, 113, 227, 0.18), transparent 62%),
              linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.62) 70%, rgba(0, 0, 0, 0.78) 100%);
}

.light-theme .hero-btn-secondary {
  border-color: rgba(255, 255, 255, 0.22);
}

/* Make sections feel more premium */
.info-banner,
.engagement-section,
.poles-section,
.news-section,
.quick-access,
.testimonials-section,
.contact-section {
  position: relative;
}

/* News spacing (make it breathe) */
.news-section {
  padding-top: 120px !important;
  padding-bottom: 86px !important;
}

.news-section .section-title {
  margin-bottom: 74px !important;
}

.news-section .news-grid {
  margin-top: 0 !important;
  row-gap: 86px !important;
}

.news-section .news-cta {
  margin-top: 64px !important;
}

/* Fix: le bouton "Voir toutes les actualités" ne doit pas noircir au hover */
.news-cta-btn:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-primary) !important;
}

.light-theme .news-cta-btn:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #111 !important;
}

@media (max-width: 992px) {
  .news-section .section-title { margin-bottom: 66px !important; }
  .news-section .news-grid { row-gap: 92px !important; }
  .news-section .news-cta { margin-top: 70px !important; }
}

/* Map / Contact (home): remonte le titre et l'éloigne de la carte */
.map-section {
  padding-top: 44px !important;
}

.map-section .section-title {
  margin-bottom: 78px !important;
}

.map-section .section-title h2 {
  margin-bottom: 10px;
}

.map-section .section-title p {
  margin-top: 0;
}

@media (max-width: 768px) {
  .map-section { padding-top: 38px !important; }
  .map-section .section-title { margin-bottom: 56px !important; }
}

/* Tighten spacing: Engagement -> Structures slider (cartes.php include) */
.engagement-section {
  padding-bottom: 28px;
}

.engagement-section + .ove-structures {
  padding-top: 18px !important;
}

@media (max-width: 576px) {
  .engagement-section { padding-bottom: 20px; }
  .engagement-section + .ove-structures { padding-top: 14px !important; }
}

.info-banner .container,
.engagement-section .container {
  max-width: 1200px;
}

/* Subtle separators */
.info-banner::before,
.engagement-section::before,
.news-section::before,
.testimonials-section::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: min(1200px, calc(100% - 40px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
}

.light-theme .info-banner::before,
.light-theme .engagement-section::before,
.light-theme .news-section::before,
.light-theme .testimonials-section::before {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.10), transparent);
}

@media (max-width: 768px) {
  .hero { padding-top: 76px; }
  .hero-actions { gap: 10px; }
  .hero-btn { width: 100%; max-width: 420px; }
  .hero-logo { width: 44px; height: 44px; }
}

/* Home only: garder le "haut" (hero + header) en dark, même si le site est verrouillé en clair.
   Le JS sur index.php retire la classe index-hero-dark après la zone vidéo. */
.page-index.index-hero-dark .top-header {
  background-color: #000 !important;
  border-bottom-color: rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: none !important;
}

/* S'assure que l'arrière-plan du hero et du conteneur vidéo reste noir */
.page-index.index-hero-dark,
.page-index.index-hero-dark body,
.page-index.index-hero-dark .hero,
.page-index.index-hero-dark .video-container {
  background: #000 !important;
}

/* Assombrit fortement l'overlay au-dessus de la vidéo */
.page-index.index-hero-dark .video-container::after {
  background: rgba(0, 0, 0, 0.68) !important;
}

/* Écrase l'overlay "light-theme" pour la zone hero */
.page-index.index-hero-dark .hero .overlay {
  background: radial-gradient(1200px 700px at 50% 40%, rgba(0, 113, 227, 0.18), transparent 62%),
              linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.85) 70%, rgba(0, 0, 0, 0.92) 100%) !important;
}

.page-index.index-hero-dark .top-links a {
  color: rgba(255, 255, 255, 0.92) !important;
}

.page-index.index-hero-dark .header-contact-item {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
}

.page-index.index-hero-dark .header-contact-item:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.page-index.index-hero-dark .dropdown {
  background: #111 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.08) !important;
}

.page-index.index-hero-dark .dropdown-section {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.page-index.index-hero-dark .info-banner--hero .info-item {
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.page-index.index-hero-dark .info-banner--hero .info-number,
.page-index.index-hero-dark .info-banner--hero .info-label {
  color: rgba(255,255,255,0.92);
}

.page-index.index-hero-dark .info-banner--hero .info-description {
  color: rgba(255,255,255,0.78);
}
