/**
 * Hero CSS - Bannière d'accueil
 * Pas de la Case Refonte 2026
 * Mobile First
 */

/* ============================================
   HERO PRINCIPAL - MOBILE FIRST
   ============================================ */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh; /* Safari viewport fix */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #1a5fb4 0%, #3584e4 50%, #87ceeb 100%);
}

/* Background image */
.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero__bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* Overlay gradient */
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
}

/* ============================================
   HERO CONTENT - MOBILE FIRST
   ============================================ */

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-white);
  padding: 16px;
  padding-top: 80px; /* Espace pour le header */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.hero__eyebrow {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
  font-size: 0.7rem;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
}

.hero__title {
  font-size: 1.75rem;
  font-weight: var(--font-extrabold);
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--color-white);
  text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.3);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.hero__title span {
  display: block;
  font-size: 0.55em;
  font-weight: var(--font-regular);
  opacity: 0.9;
  margin-top: var(--space-2);
}

.hero__subtitle {
  font-size: 0.85rem;
  font-weight: var(--font-regular);
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 20px;
  opacity: 0.95;
  text-shadow: 1px 2px 10px rgba(0, 0, 0, 0.2);
  padding: 0;
  box-sizing: border-box;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 12px;
  padding: 0;
  box-sizing: border-box;
}

.hero__cta .btn {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  padding: 12px 16px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* ============================================
   HERO WIDGETS - MOBILE FIRST
   ============================================ */

.hero__widgets {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: var(--space-4);
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-sizing: border-box;
}

.hero__widgets-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero__widget {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-gray-800);
  transition: all var(--transition-fast);
}

.hero__widget:hover {
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.hero__widget-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--color-gray-100);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero__widget--weather .hero__widget-icon {
  background-color: #e8f4fd;
}

.hero__widget--routes .hero__widget-icon {
  background-color: #e8f5e9;
}

.hero__widget--snow .hero__widget-icon {
  background-color: #f3e5f5;
}

.hero__widget-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.hero__widget-label {
  display: block;
  font-size: 0.65rem;
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray-500);
  margin-bottom: 2px;
}

.hero__widget-value {
  font-size: 0.85rem;
  font-weight: var(--font-bold);
  color: var(--color-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__widget-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__widget-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.hero__widget-dot--green {
  background-color: var(--color-success);
  animation: pulse-dot 2s infinite;
}

.hero__widget-dot--red {
  background-color: var(--color-error);
}

.hero__widget-dot--orange {
  background-color: var(--color-warning);
  animation: pulse-dot 1.5s infinite;
}

/* Widget en alerte */
.hero__widget--alert {
  border-color: var(--color-warning) !important;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
  animation: pulse-widget 2s infinite;
}

.hero__widget--alert:hover {
  border-color: var(--color-warning) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(243, 156, 18, 0.3);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-widget {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.25);
  }
}

/* ============================================
   TABLET (768px+)
   ============================================ */

@media (min-width: 48em) {
  .hero__content {
    padding: var(--space-8);
    padding-top: 100px;
  }

  .hero__eyebrow {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__subtitle {
    font-size: var(--text-lg);
    max-width: 550px;
    margin-bottom: var(--space-6);
  }

  .hero__cta {
    flex-direction: row;
    justify-content: center;
    width: auto;
  }

  .hero__cta .btn {
    width: auto;
    font-size: 1rem;
    padding: var(--space-3) var(--space-6);
  }

  .hero__widgets {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-6) var(--space-8);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
  }

  .hero__widgets-grid {
    flex-direction: row;
    justify-content: center;
    max-width: var(--container-5xl);
    margin: 0 auto;
  }

  .hero__widget {
    flex: 1;
    max-width: 300px;
    padding: var(--space-4);
  }

  .hero__widget-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .hero__widget-label {
    font-size: var(--text-xs);
  }

  .hero__widget-value {
    font-size: var(--text-base);
  }
}

/* ============================================
   DESKTOP (1024px+)
   ============================================ */

@media (min-width: 64em) {
  .hero {
    justify-content: center;
  }

  .hero__content {
    padding: var(--space-10);
    padding-top: 120px;
  }

  .hero__eyebrow {
    padding: var(--space-2) var(--space-5);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
  }

  .hero__title {
    font-size: 3.5rem;
    margin-bottom: var(--space-6);
  }

  .hero__subtitle {
    font-size: var(--text-xl);
    max-width: 600px;
    margin-bottom: var(--space-8);
  }

  .hero__cta .btn {
    padding: var(--space-4) var(--space-8);
  }

  .hero__widgets {
    padding: var(--space-6) var(--space-10);
  }

  .hero__widget {
    padding: var(--space-4) var(--space-5);
    gap: var(--space-4);
  }

  .hero__widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }

  .hero__widget-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .hero__widget-value {
    font-size: var(--text-lg);
  }
}

/* ============================================
   HERO VARIANTS
   ============================================ */

/* Hero compact pour pages internes */
.hero--compact {
  min-height: 300px;
}

.hero--compact .hero__content {
  padding-top: 100px;
}

.hero--compact .hero__title {
  font-size: 1.5rem;
}

@media (min-width: 48em) {
  .hero--compact {
    min-height: 350px;
  }

  .hero--compact .hero__title {
    font-size: 2rem;
  }
}

@media (min-width: 64em) {
  .hero--compact {
    min-height: 400px;
  }

  .hero--compact .hero__title {
    font-size: 2.5rem;
  }
}
