/* ==========================================================================
   ALFATOUR — home page
   Same hero, engine and section order. Refreshed type scale, surfaces,
   cards, spacing and states. Brand red + charcoal only.
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */

.home-hero {
  position: relative;
  background-color: #fff;
}

.home-hero .carousel-item {
  position: relative;
}

.home-hero .carousel-item > a {
  display: block;
}

.home-hero .carousel-item img {
  display: block;
  width: 100%;
  height: clamp(430px, 58vw, 640px);
  object-fit: cover;
}

.home-hero .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
      rgba(20, 24, 32, .72) 0%,
      rgba(20, 24, 32, .4) 45%,
      rgba(20, 24, 32, .12) 100%);
  pointer-events: none;
}

.home-hero .carousel-item > .container {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: clamp(150px, 18vw, 200px);
}

.home-hero .carousel-caption {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: 620px;
  padding: 0;
  text-align: left;
}

.home-hero .carousel-caption h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.home-hero .carousel-caption p {
  max-width: 46ch;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

/* Arrows */

.home-hero .carousel-control-prev,
.home-hero .carousel-control-next {
  width: 46px;
  height: 46px;
  top: 50%;
  margin-top: -23px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background-color: rgba(20, 24, 32, .32);
  opacity: 1;
  transition: background-color var(--af-ease), border-color var(--af-ease);
}

.home-hero .carousel-control-prev {
  left: 18px;
}

.home-hero .carousel-control-next {
  right: 18px;
}

.home-hero .carousel-control-prev:hover,
.home-hero .carousel-control-next:hover {
  background-color: var(--af-red);
  border-color: var(--af-red);
}

.home-hero .carousel-control-prev-icon,
.home-hero .carousel-control-next-icon {
  width: 16px;
  height: 16px;
}

/* Social rail */

@media (min-width: 768px) {
  .home-hero .banner-social-meta {
    bottom: 190px !important;
  }
}

.home-hero .banner-social-meta .social-icon li a {
  border-color: rgba(255, 255, 255, .45);
  background-color: rgba(20, 24, 32, .28);
  transition: background-color var(--af-ease), border-color var(--af-ease);
}

.home-hero .banner-social-meta .social-icon li a:hover {
  border-color: var(--af-red) !important;
  background-color: var(--af-red);
}

/* ---- Search engine ------------------------------------------------------
   Placement + carte flottante sombre (comme Votre Voyage) ; la barre elle-même
   est stylée dans hotel-engine.css (moteur he-*).
   -------------------------------------------------------------------------- */

.home-hero .z-moteur {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 18px;
  left: 0;
  z-index: 10;
  margin-top: 0;
}

.home-hero .z-moteur .row.justify-content-center > .col-md-12 {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

/* Carte moteur : rectangle sombre translucide, flou léger */
.home-hero .box-black-opacity {
  background: rgba(0, 0, 0, .6);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--af-radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .3);
  backdrop-filter: blur(6px);
}

/* Mobile : pas de carte noire, le moteur repose directement sur la bande sombre */
@media (max-width: 767px) {
  .home-hero .box-black-opacity {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0 !important;
  }
}

.home-hero #tab-pc {
  justify-content: center;
  margin-bottom: 6px;
}

/* Onglets à la Votre Voyage : texte blanc, soulignement rouge sur l'actif.
   Les règles legacy (cyan #06B7E8, orange #EE7F01 !important sous 768px)
   doivent être battues explicitement. */
.home-hero .tabcont .nav-tabs {
  gap: 4px;
  border: 0;
}

.home-hero .tabcont .nav-tabs .nav-link {
  padding: 6px 4px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  box-shadow: none !important;
  transition: color var(--af-ease);
}

.home-hero .tabcont .nav-tabs .nav-link.active {
  border-bottom: 2px solid var(--af-red) !important;
  box-shadow: none !important;
}

@media (max-width: 767px) {
  .home-hero .tabcont .nav-tabs .nav-link {
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  }

  .home-hero .tabcont .nav-tabs .nav-link.active {
    border-bottom-color: var(--af-red) !important;
  }
}

@media (max-width: 767.98px) {
  /* The desktop hero is hidden below 768px; the engine band keeps its own
     background and flows with the page. */
  .home-hero .z-moteur {
    position: relative;
    top: auto;
    bottom: auto;
    margin-top: 0;
  }
}

/* ---- Section heading ---------------------------------------------------- */

.home-head {
  margin-bottom: 34px;
  text-align: center;
}

.home-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: .02em;
}

.home-head img {
  width: auto;
  height: 10px;
  opacity: .9;
}

/* ---- Recommended hotels ------------------------------------------------- */

.home-hotels {
  padding: 60px 0 56px;
}

/* ---- Centralized hotel card --------------------------------------------------
   Single source of truth for the hotel card design, shared by all pages using
   views/hotels/inc/hotel-card.ejs: views/index.ejs ("Nos Meilleurs hôtels"),
   views/hotels/hotel-cities.ejs and views/hotels/hotel-selection.ejs (both load
   this stylesheet). Do NOT duplicate these rules per page — edit them here.
   Convention adapted from Votre Voyage (photo, title, .vv-stars gold stars on
   their own line from theme.css, city-country, accroche promo, price + CTA on
   one footer line like Votre Voyage): promo is intentionally clamped to ONE
   line (ellipsis + full text in the title tooltip), price sits next to the
   button in the footer (600 weight), and cards in a row share equal height
   via h-100.
   Weights: 600 titles AND prices, 500 options. No global resets, no Oswald.
   -------------------------------------------------------------------------- */

.hotel-card {
  overflow: hidden;
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-lg) !important;
  box-shadow: var(--af-shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.hotel-card-media {
  margin: 0;
  overflow: hidden;
}

.hotel-card-photo {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 0;
  transition: transform .45s ease;
}

.hotel-card:hover .hotel-card-photo {
  transform: scale(1.04);
}

.hotel-card .card-body {
  padding: 18px 18px 12px;
}

.hotel-card-title {
  margin-bottom: 4px;
  font-family: var(--af-font);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.hotel-card-title a {
  color: var(--af-ink);
}

.hotel-card-title a:hover {
  color: var(--af-red);
}

.hotel-card-stars {
  margin: 0 0 6px;
}

.hotel-card-place {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.hotel-card-promo {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hotel-card-price small {
  display: block;
  color: var(--af-muted);
  font-size: 12px;
}

.hotel-card-price-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--af-ink);
  white-space: nowrap;
}

.hotel-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--af-line);
  background-color: transparent;
}

.hotel-card-footer .btn {
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .82rem;
}

/* ---- Product cards (voyages organisés) ---------------------------------- */

.home-products {
  padding: 60px 0;
  background-color: var(--af-canvas);
}

.home-products .category-item.effect-1.home-product-card {
  height: 400px;
  border-radius: var(--af-radius-lg);
  box-shadow: var(--af-shadow-sm);
}

.home-products .home-product-link:hover .category-item.effect-1.home-product-card {
  box-shadow: var(--af-shadow-lg);
}

.home-products .category-item.effect-1.home-product-card .caption > div,
.home-products .home-product-link:hover .category-item.effect-1.home-product-card .caption > div {
  background: linear-gradient(180deg,
      rgba(20, 24, 32, 0) 28%,
      rgba(20, 24, 32, .88) 100%);
}

.home-products .category-item.effect-1.home-product-card .title-destination {
  border-radius: 999px;
  background-color: rgba(255, 255, 255, .95);
  color: var(--af-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  padding: 9px 15px;
}

.home-products .home-product-overlay-price {
  border-top-color: rgba(255, 255, 255, .24);
}

.home-products .home-product-overlay-price .price-label {
  font-size: 11px;
  letter-spacing: .08em;
}

.home-products .home-product-overlay-price .price-value {
  font-size: 26px;
  font-weight: 700;
}

.home-products .category-item.effect-1.home-product-card .btn {
  border-radius: 999px;
  background-color: var(--af-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.home-products .category-item.effect-1.home-product-card .btn:hover {
  background-color: var(--af-red-hover);
}

/* "Afficher plus d'offres" */

.home-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--af-line-strong);
  border-radius: 999px;
  background-color: #fff;
  color: var(--af-ink) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color var(--af-ease), border-color var(--af-ease),
              color var(--af-ease), transform var(--af-ease);
}

.home-more:hover,
.home-more:focus {
  background-color: var(--af-red);
  border-color: var(--af-red);
  color: #fff !important;
  transform: translateY(-1px);
}

/* ---- Why alfatour ------------------------------------------------------- */

.home-why {
  padding: 64px 0;
  background-color: #fff !important;
  border-top: 1px solid var(--af-line);
}

.home-why h2 {
  position: relative;
  padding-left: 16px;
  font-size: clamp(24px, 2.4vw, 32px);
}

.home-why h2::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background-color: var(--af-red);
}

.home-why p {
  color: var(--af-ink-soft);
  line-height: 1.75;
}

.home-why .why-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--af-line);
}

.home-why .why-row:last-child {
  border-bottom: 0;
}

.home-why .why-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--af-red) !important;
  box-shadow: 0 10px 20px rgba(var(--af-red-rgb), .22);
}

.home-why .why-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.home-why .why-row p {
  margin: 0;
  color: var(--af-ink);
  font-weight: 500;
  line-height: 1.45;
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 991.98px) {
  .home-hero .carousel-caption {
    max-width: 480px;
  }

  .home-hotels,
  .home-products,
  .home-why {
    padding: 44px 0;
  }

  .home-products .category-item.effect-1.home-product-card {
    height: 360px;
  }
}

@media (max-width: 767.98px) {
  /* The desktop hero is hidden below 768px; keep the engine band tidy. */
  .home-hero .bg-mobile-moteur {
    background-color: var(--af-ink);
  }

  .home-head {
    margin-bottom: 24px;
  }

  .home-hotels,
  .home-products,
  .home-why {
    padding: 36px 0;
  }

  .hotel-card-photo {
    height: 200px;
  }

  .home-products .category-item.effect-1.home-product-card {
    height: 340px;
  }
}

@media (max-width: 575.98px) {
  .home-products .category-item.effect-1.home-product-card {
    height: 320px;
  }
}
