/* ═══════════════════════════════════════════
   B04 — HERO V5 (split + carousel galerie)
   - DA cohérente avec B05→B11 (off-white background)
   - Carrousel 5 images + flèches + dots + animations
   - Fix : pin icône, border-radius input + carrousel
   ═══════════════════════════════════════════ */

.b04-hero{
  position: relative;
  background: #FAF9F6;
  padding: 64px 0 88px;
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

.b04-hero::before{
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 45, 63, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 45, 63, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.b04-hero-container{
  position: relative;
  z-index: 2;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

.b04-hero-grid{
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 80px;
  align-items: center;
}

/* ═══════════════ COLONNE GAUCHE ═══════════════ */

.b04-hero-content{
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
}

/* Eyebrow */
.b04-hero-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
}
.b04-hero-eyebrow-logo{
  width: auto;
  height: 56px;
  max-width: 110px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.b04-hero-eyebrow-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #F5A623;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 10px;
  flex-shrink: 0;
}
.b04-hero-eyebrow-text{
  font-size: 0.92rem;
  font-weight: 600;
  color: #1E2D3F;
  line-height: 1.3;
}

/* H1 — version finale 2 lignes */
.b04-hero-h1{
  font-family: 'IBM Plex Sans', sans-serif !important;
  font-size: clamp(1.8rem, 2.9vw, 2.5rem);
  font-weight: 800 !important;
  font-style: normal !important;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #1E2D3F;
  margin: 0;
  max-width: 620px;
}
.b04-h1-line{
  display: block;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
}
.b04-h1-highlight{
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: 800 !important;
  color: #1E2D3F !important;
  background: linear-gradient(180deg, transparent 60%, rgba(245, 166, 35, 0.55) 60%);
  padding: 0 4px;
  display: inline;
  white-space: nowrap;
}

/* Sous-titre */
.b04-hero-sub{
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.5;
  color: #6B7888;
  margin: 0;
  font-weight: 400;
  max-width: 560px;
}


/* Bloc de réassurance sous le sous-titre */
.b04-hero-reassurance{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  list-style: none !important;
  margin: 4px 0 8px;
  padding: 0;
}
.b04-hero-reassurance li{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none !important;
  color: #6B7888;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
}
.b04-hero-reassurance li::before{
  content: none !important;
  display: none !important;
}
.b04-hero-reassurance svg{
  flex-shrink: 0;
  color: #1FA868;
  width: 14px;
  height: 14px;
}

/* ─── Formulaire ─── */
.b04-hero-form{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.b04-hero-input-wrap{
  position: relative;
  width: 100%;
}

/* Pin icône input adresse — centrage strict v6 */
.b04-hero-input-icon{
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: #F5A623;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.b04-hero-input-icon svg{
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

/* Input adresse — version optimisée v6 */
.b04-hero-input{
  width: 100%;
  padding: 18px 56px 18px 64px !important;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #1E2D3F;
  background: #FFFFFF;
  border: 2px solid rgba(30, 45, 63, 0.14);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  line-height: 1.4;
  text-overflow: ellipsis;
}
.b04-hero-input::placeholder{
  color: #9AA4B0;
  font-weight: 400;
}
.b04-hero-input:focus{
  border-color: #F5A623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}
.b04-hero-input.is-error{
  border-color: #DC3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
  animation: b04-shake 0.3s ease;
}
@keyframes b04-shake{
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Loader spinner */
.b04-hero-input-loader{
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(245, 166, 35, 0.25);
  border-top-color: #F5A623;
  border-radius: 50%;
  display: none;
  pointer-events: none;
  z-index: 2;
}
.b04-hero-input-loader.is-loading{
  display: block;
  animation: b04-spin 0.7s linear infinite;
}
@keyframes b04-spin{
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Dropdown suggestions */
.b04-hero-suggestions{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid rgba(30, 45, 63, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(30, 45, 63, 0.12);
  list-style: none !important;
  margin: 0;
  padding: 6px 0;
  z-index: 100;
  display: none;
}
.b04-hero-suggestions.is-open{ display: block; }
.b04-hero-suggestions li{
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 2px;
  list-style: none !important;
}
.b04-hero-suggestions li::before{ content: none !important; display: none !important; }
.b04-hero-suggestions li:hover,
.b04-hero-suggestions li.is-active{ background: #FAF9F6; }
.b04-suggest-label{
  font-size: 0.94rem;
  color: #1E2D3F;
  font-weight: 500;
  line-height: 1.3;
}
.b04-suggest-context{
  font-size: 0.78rem;
  color: #9AA4B0;
  font-weight: 400;
  line-height: 1.2;
}
.b04-hero-suggestions-empty{
  padding: 16px 18px;
  font-size: 0.88rem;
  color: #9AA4B0;
  font-style: italic;
  text-align: center;
  list-style: none !important;
}

/* CTA row */
.b04-hero-cta-row{
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.b04-hero-submit{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  background: #F5A623;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.35);
}
.b04-hero-submit:hover{
  background: #FF7A00;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.45);
}
.b04-hero-submit:focus-visible{
  outline: 3px solid #FF7A00;
  outline-offset: 3px;
}
.b04-hero-submit.is-pulsing{
  animation: b04-pulse 0.9s ease-out;
}
@keyframes b04-pulse{
  0%   { transform: scale(1);    box-shadow: 0 6px 18px rgba(245, 166, 35, 0.35); }
  30%  { transform: scale(1.04); box-shadow: 0 12px 28px rgba(245, 166, 35, 0.55), 0 0 0 6px rgba(245, 166, 35, 0.18); }
  100% { transform: scale(1);    box-shadow: 0 6px 18px rgba(245, 166, 35, 0.35); }
}

/* CTA ghost — bouton "Demander un devis" */
.b04-hero-cta-ghost{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 28px;
  background: #FFFFFF;
  color: #1E2D3F;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid rgba(30, 45, 63, 0.12);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.b04-hero-cta-ghost:hover{
  border-color: #F5A623;
  color: #F5A623;
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 45, 63, 0.08);
}
.b04-hero-cta-ghost:focus-visible{
  outline: 3px solid rgba(245, 166, 35, 0.4);
  outline-offset: 3px;
}
.b04-hero-cta-ghost svg{
  flex-shrink: 0;
  transition: transform 0.2s;
}
.b04-hero-cta-ghost:hover svg{
  transform: translateX(2px);
}

/* ═══════════════ COLONNE DROITE : CAROUSEL ═══════════════ */

.b04-hero-visual{
  position: relative;
  width: 100%;
}

/* Carrousel container avec border-radius bien arrondi */
.b04-gallery{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 30px 70px rgba(30, 45, 63, 0.18),
    0 10px 24px rgba(30, 45, 63, 0.08);
  background: #1E2D3F;
  user-select: none;
  touch-action: pan-y pinch-zoom;
  isolation: isolate;
}

/* Track : conteneur des slides */
.b04-gallery-track{
  position: relative;
  width: 100%;
  height: 100%;
}

/* Slides : empilées avec fade */
.b04-gallery-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.b04-gallery-slide.is-active{
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.b04-gallery-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Flèches navigation — version discrète */
.b04-gallery-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  color: #1E2D3F;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
  box-shadow: 0 2px 8px rgba(30, 45, 63, 0.12);
  z-index: 5;
  opacity: 0;
}
.b04-gallery:hover .b04-gallery-arrow,
.b04-gallery:focus-within .b04-gallery-arrow{
  opacity: 0.85;
}
.b04-gallery-arrow:hover{
  background: #FFFFFF;
  color: #F5A623;
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.05);
}
.b04-gallery-prev{ left: 14px; }
.b04-gallery-next{ right: 14px; }
.b04-gallery-arrow svg{
  width: 16px;
  height: 16px;
}

/* Dots indicateurs (en bas du carrousel) */
.b04-gallery-dots{
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  list-style: none !important;
  margin: 0;
  padding: 9px 16px;
  background: rgba(30, 45, 63, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  z-index: 5;
}
.b04-gallery-dots li{
  list-style: none !important;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.b04-gallery-dots li::before{ content: none !important; }
.b04-gallery-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.b04-gallery-dot:hover{
  background: rgba(255, 255, 255, 0.85);
}
.b04-gallery-dot.is-active{
  background: #F5A623;
  width: 26px;
  border-radius: 4px;
}

/* Badge -30/-40% en bas droite (à l'intérieur du carrousel) */
.b04-hero-badge{
  position: absolute;
  bottom: 22px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(30, 45, 63, 0.3);
  z-index: 6;
}
.b04-hero-badge-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #F5A623;
  color: #FFFFFF;
  border-radius: 10px;
  flex-shrink: 0;
}
.b04-hero-badge-text{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.b04-hero-badge-value{
  font-size: 1.05rem;
  font-weight: 800;
  color: #1E2D3F;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.b04-hero-badge-label{
  font-size: 0.7rem;
  font-weight: 600;
  color: #6B7888;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
  white-space: nowrap;
}

/* ═══════════════ RESPONSIVE ═══════════════ */


/* Bloc CTA row : single CTA primary */
.b04-hero-cta-row{
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
@media (max-width: 1100px){
  .b04-hero-grid{ gap: 56px; }
  .b04-hero-container{ padding: 0 36px; }
}

@media (max-width: 1000px){
  .b04-hero{ padding: 56px 0 72px; }
  .b04-hero-container{ padding: 0 28px; }
  .b04-hero-grid{
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .b04-hero-content{ max-width: 100%; }
  .b04-gallery{
    aspect-ratio: 4 / 5;
    max-width: 580px;
    margin: 0 auto;
  }
}

@media (max-width: 640px){
  .b04-hero{ padding: 40px 0 56px; }
  .b04-hero-container{ padding: 0 20px; }
  .b04-hero-grid{ gap: 40px; }
  .b04-hero-content{ gap: 18px; }
  .b04-hero-h1{
  font-family: 'IBM Plex Sans', sans-serif !important;
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 800 !important;
  font-style: normal !important;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #1E2D3F;
  margin: 0;
  max-width: 100%;
  word-wrap: normal;
  overflow-wrap: normal;
  white-space: normal;
}
.b04-hero-h1 br{
  display: inline;
}
  .b04-hero-input{ padding: 18px 56px 18px 64px !important; font-size: 0.95rem; }
  .b04-hero-cta-row{
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .b04-hero-submit{
    width: 100%;
    padding: 16px 24px;
  }
  .b04-gallery{
    aspect-ratio: 4 / 5;
    border-radius: 22px;
  }
  .b04-gallery-arrow{
    width: 40px; height: 40px;
  }
  .b04-gallery-prev{ left: 12px; }
  .b04-gallery-next{ right: 12px; }
  .b04-gallery-dots{
    bottom: 16px;
    padding: 7px 13px;
  }
  .b04-hero-badge{
    bottom: 60px;
    right: 16px;
    padding: 10px 14px;
    gap: 10px;
  }
  .b04-hero-badge-icon{ width: 32px; height: 32px; }
  .b04-hero-badge-value{ font-size: 0.92rem; }
  .b04-hero-badge-label{ font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce){
  .b04-hero-submit, .b04-hero-input,
  .b04-gallery-slide, .b04-gallery-arrow, .b04-gallery-dot{
    transition: none !important;
    animation: none !important;
  }
  .b04-hero-submit:hover{ transform: none !important; }
  .b04-gallery-arrow:hover{ transform: translateY(-50%) !important; }
}
