/*
 * En-tete partage Au P'tit Serveur - v4 2026-08-07
 * Source unique pour l'accueil, les pages internes et le blog.
 * Le visuel est un vrai <img> afin d'eviter les differences de calcul de background.
 */

@media (min-width: 981px) {
  .top-header {
    position: relative !important;
    width: 100% !important;
    height: clamp(700px, 32vw, 560px) !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    background: #050302 !important;
    background-image: none !important;
    overflow: visible !important;
    z-index: 20 !important;
    border-bottom: 1px solid rgba(200,150,42,.28) !important;
    isolation: isolate;
  }

  .top-header-art {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center 32% !important;
    z-index: 0 !important;
    pointer-events: none !important;
    user-select: none !important;
    transform: translateY(12px) !important;
  }

  /* Neutralise aussi un ancien header.php encore present en cache/deploiement partiel. */
  .top-header > .logo,
  .top-header .header-logo,
  .top-header img[src*="logo.webp"] {
    display: none !important;
  }

  .header-nav {
    position: absolute !important;
    left: 50% !important;
    bottom: 42px !important;
    transform: translateX(-50%) !important;
    z-index: 12 !important;
    display: block !important;
    width: max-content !important;
    max-width: calc(100% - 40px) !important;
    margin: 0 !important;
    padding: 10px 22px !important;
    border: 1px solid rgba(201,150,42,.35) !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, rgba(35,17,8,.90), rgba(13,7,3,.94)) !important;
    box-shadow: 0 7px 24px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.04) !important;
    backdrop-filter: blur(2px);
  }

  .header-nav ul {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: clamp(14px, 2vw, 31px) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-nav ul li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-nav ul li a {
    font-family: 'Lora', Georgia, serif !important;
    font-size: clamp(11px, .95vw, 15px) !important;
    color: var(--chalk, #f0e8d0) !important;
    text-decoration: none !important;
    letter-spacing: .55px !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.9) !important;
    white-space: nowrap !important;
    position: relative !important;
  }

  .header-nav ul li a:hover {
    color: var(--gold-light, #e8b84b) !important;
  }


  /* Le contenu passe sous la guirlande : les ampoules peuvent chevaucher le corps
     sans etre coupees par la limite du header. */
  .main-content {
    position: relative !important;
    z-index: 1 !important;
  }

  .festoon {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -12px !important;
    display: flex !important;
    justify-content: space-around !important;
    padding: 2px 16px !important;
    margin: 0 !important;
    z-index: 25 !important;
    background: transparent !important;
  }
}

@media (max-width: 980px) {
  .top-header {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    background: none !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  .top-header-art,
  .top-header .header-nav,
  .top-header .festoon,
  .top-header > .logo,
  .top-header .header-logo,
  .top-header img[src*="logo.webp"] {
    display: none !important;
  }
}
