/* -------------------------------------------------------------------------
   /public/css/header.css
   Header public commun
   ------------------------------------------------------------------------- */

.rdv-public-header {
  position: relative;
  padding: 16px 16px 14px;
  color: var(--rdv-white);
  background:
    linear-gradient(135deg, rgba(15, 39, 71, 0.82), rgba(31, 85, 145, 0.66)),
    url("../assets/header-architecture.jpg") center / cover no-repeat;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.rdv-public-header::before {
  content: "";
  position: absolute;
  inset: auto -80px -130px auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.rdv-public-header::after {
  content: "";
  position: absolute;
  inset: -160px auto auto -110px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  pointer-events: none;
}

.rdv-header-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  max-width: 1240px;
  margin: 0 auto;
}

.rdv-header-main {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.rdv-header-main--triptych {
  grid-template-columns: minmax(220px, 0.92fr) minmax(360px, 1.7fr) minmax(250px, 1.02fr);
}

.rdv-brand,
.rdv-header-context,
.rdv-header-availability {
  min-width: 0;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  color: var(--rdv-white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.075)),
    rgba(12, 34, 61, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 18px 40px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.rdv-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 12px 14px;
  text-decoration: none;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.rdv-brand:hover {
  color: var(--rdv-white);
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.09)),
    rgba(12, 34, 61, 0.32);
  transform: translateY(-1px);
}

.rdv-brand__logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.24),
    inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.rdv-brand__logo img {
  display: block;
  width: 65px;
  height: 65px;
  object-fit: contain;
}

.rdv-brand__text {
  display: grid;
  min-width: 0;
}

.rdv-brand__text strong {
  color: var(--rdv-white);
  font-size: clamp(1.18rem, 1.65vw, 1.56rem);
  line-height: 1;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.rdv-header-context {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 14px clamp(18px, 2vw, 28px);
  text-align: center;
}

.rdv-header-context h1 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.25vw, 2.05rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 5px 18px rgba(0, 8, 20, 0.3);
}

.rdv-header-context__subtitle,
.rdv-header-context__services {
  margin: 0;
  color: rgba(239, 246, 255, 0.92);
  text-wrap: balance;
}

.rdv-header-context__subtitle {
  font-size: clamp(0.88rem, 1.22vw, 1.02rem);
  font-weight: 740;
  letter-spacing: 0.018em;
}

.rdv-header-context__services {
  font-size: clamp(0.74rem, 1vw, 0.86rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.025em;
  color: rgba(219, 234, 254, 0.88);
}

.rdv-header-availability {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  padding: 12px 16px;
  text-align: center;
}

.rdv-header-availability__days {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 840;
  letter-spacing: 0.015em;
}

.rdv-header-availability__hours {
  color: rgba(239, 246, 255, 0.94);
  font-size: 0.79rem;
  font-weight: 720;
  white-space: nowrap;
}

.rdv-header-availability__closed {
  color: rgba(203, 213, 225, 0.84);
  font-size: 0.72rem;
  font-weight: 620;
}


/* Fermeture programmée : le cadre Horaires devient l'information de disponibilité. */
.rdv-header-availability.is-scheduled-closure {
  gap: 5px;
  border-color: rgba(248, 113, 113, 0.48);
  background:
    linear-gradient(180deg, rgba(127, 29, 29, 0.2), rgba(69, 10, 10, 0.12)),
    rgba(12, 34, 61, 0.34);
}

.rdv-header-availability.is-scheduled-closure .rdv-header-availability__days {
  color: #fecaca;
  font-size: 0.88rem;
}

.rdv-header-availability.is-scheduled-closure .rdv-header-availability__hours {
  color: #ffffff;
  font-size: 0.8rem;
  white-space: normal;
}

.rdv-header-availability.is-scheduled-closure .rdv-header-availability__closed {
  max-width: 30rem;
  color: rgba(254, 226, 226, 0.92);
  font-size: 0.7rem;
  line-height: 1.3;
}

.rdv-header-availability__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 5px;
  padding: 7px 11px;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  background: rgba(14, 116, 144, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.rdv-header-availability__phone:hover,
.rdv-header-availability__phone:focus-visible {
  color: #ffffff;
  text-decoration: none;
  border-color: rgba(125, 211, 252, 0.58);
  background: rgba(14, 116, 144, 0.3);
  transform: translateY(-1px);
}

.rdv-header-availability__phone span {
  font-size: 0.82rem;
  line-height: 1;
}

.rdv-header-availability__phone strong {
  font-size: 0.82rem;
  font-weight: 840;
  white-space: nowrap;
}

.rdv-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  gap: 8px;
  margin-top: 1px;
}

.rdv-header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--rdv-white);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.12;
  text-align: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.rdv-header-link:hover,
.rdv-header-link:focus-visible {
  color: var(--rdv-white);
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 22px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

.rdv-header-link--soft {
  opacity: 0.88;
}

.rdv-header-link--quote {
  color: #fff7ed;
  border-color: rgba(251, 146, 60, 0.58);
  background:
    linear-gradient(180deg, rgba(251, 146, 60, 0.34), rgba(20, 184, 166, 0.18)),
    rgba(15, 39, 71, 0.2);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.14),
    0 0 22px rgba(251, 146, 60, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.rdv-header-link--quote:hover,
.rdv-header-link--quote:focus-visible {
  color: #ffffff;
  border-color: rgba(251, 146, 60, 0.78);
  background:
    linear-gradient(180deg, rgba(251, 146, 60, 0.42), rgba(20, 184, 166, 0.22)),
    rgba(15, 39, 71, 0.24);
}

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

@media (max-width: 980px) {
  .rdv-public-header {
    padding: 16px 14px 15px;
  }

  .rdv-header-main--triptych {
    grid-template-columns: minmax(210px, 0.9fr) minmax(300px, 1.35fr);
  }

  .rdv-header-availability {
    grid-column: 1 / -1;
    min-height: auto;
    grid-template-columns: auto auto auto auto;
    gap: 8px 14px;
    align-items: center;
    padding: 10px 14px;
  }

  .rdv-header-availability__phone {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .rdv-public-header {
    padding: 12px 10px 13px;
  }

  .rdv-header-shell {
    gap: 9px;
  }

  .rdv-header-main--triptych {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .rdv-brand,
  .rdv-header-context,
  .rdv-header-availability {
    min-height: auto;
    border-radius: 16px;
  }

  .rdv-brand {
    justify-content: flex-start;
    padding: 9px 12px;
  }

  .rdv-brand__logo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .rdv-brand__logo img {
    width: 50px;
    height: 50px;
  }

  .rdv-brand__text strong {
    font-size: 1.23rem;
  }

  .rdv-header-context {
    padding: 12px 14px;
  }

  .rdv-header-context h1 {
    font-size: clamp(1.24rem, 7vw, 1.65rem);
  }

  .rdv-header-context__subtitle {
    font-size: 0.9rem;
  }

  .rdv-header-context__services {
    font-size: 0.76rem;
  }

  .rdv-header-availability {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 10px 12px;
  }

  .rdv-header-availability__hours {
    white-space: normal;
  }

  .rdv-header-availability__phone {
    margin-top: 5px;
  }

  .rdv-header-actions {
    gap: 6px;
  }

  .rdv-header-link {
    flex: 1 1 calc(50% - 6px);
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 430px) {
  .rdv-header-link {
    flex-basis: calc(50% - 6px);
  }
}

/* -------------------------------------------------------------------------
   État actif navigation header public
   ------------------------------------------------------------------------- */

.rdv-header-link.is-active,
.rdv-header-link[aria-current="page"] {
  color: #ffffff;
  border-color: rgba(45, 212, 191, 0.58);
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.28), rgba(37, 99, 168, 0.26)),
    rgba(15, 39, 71, 0.22);
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.16),
    0 0 22px rgba(45, 212, 191, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.rdv-header-link.is-active:hover,
.rdv-header-link[aria-current="page"]:hover {
  color: #ffffff;
  border-color: rgba(45, 212, 191, 0.72);
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.34), rgba(37, 99, 168, 0.3)),
    rgba(15, 39, 71, 0.24);
}
