/* ============================================
   HEADER — PENSEZ SAUVAGE KRAFT
   ============================================ */

/* --- Masthead principal --- */
#masthead,
.site-header {
    background: url('../images/kraft-long.jpg') #C8A882 !important;
    background-attachment: fixed !important;
    background-size: 6% !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding-bottom: 20px !important;
    min-height: 150px !important;
    position: relative !important;
    overflow: visible !important;
    z-index: auto !important;
    transform: none !important;
    filter: none !important;
}

.inside-header {
    background: transparent !important;
    max-width: 1700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative !important;
    overflow: visible !important;
}

/* --- FLEUR DOUBLE ---
   Position exacte SPIP : 58px depuis gauche, 34px depuis haut.
   Attachée à .inside-header (wrapper plafonné 1700px) pour suivre
   le centrage horizontal sur viewport > 1700px. */
.inside-header::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 52px;
    width: 308px;
    height: 308px;
    background-image: url('../images/fleur-double.png');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

/* --- LOGO SVG ---
   GP utilise .main-title (pas .site-title) pour le titre texte.
   On cache le titre texte et on affiche le SVG en background. */
.main-title,
.main-title a,
.site-title,
.site-title a {
    display: none !important;
}

.site-branding {
    width: 368px !important;
    height: 136px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 2 !important;
    margin-top: -6px !important;
    margin-left: 12% !important;
    background-image: url('../images/pensez-sauvage-producteur-graines-biologiques.svg') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: left top !important;
    cursor: pointer;
}

.site-branding a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* --- SLOGAN "PAYSANS SEMENCIERS" --- */
.site-description {
    font-family: 'OldNewspaperTypesALM', Georgia, serif !important;
    color: #2C1810 !important;
    font-size: 1.9rem !important;
    text-align: right !important;
    width: 430px !important;
    white-space: nowrap !important;
    display: block !important;
    position: absolute !important;
    bottom: -20px !important;
    right: -8% !important;
    letter-spacing: 0.01rem !important;
}

/* ============================================
   NAVIGATION GP — Z-INDEX
   GP met #primary-navigation en position:sticky z-index:100.
   .content-area a aussi z-index:100 → même niveau, le cadre
   (DOM après) passerait devant.
   On monte le wrapper nav à 200 pour qu'il reste TOUJOURS
   au-dessus du cadre vignettes (z-index:1 dans content-area).
   ============================================ */
.nav-primary,
#primary-navigation {
    z-index: 200 !important;
}

/* ============================================
   MENU CATALOGUE — 5 BOUTONS TAMPON SPIP
   Placés sous le header, ils passent AU-DESSUS
   du bord haut du cadre (.ps-contenu-border z-index:1).
   z-index: 500 > cadre z-index: 1.
   ============================================ */
.main-navigation {
    position: relative;
    z-index: 500;
}
.main-navigation ul.menu,
.main-navigation ul.nav-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    list-style: none !important;
    padding: 0.3rem 1rem !important;
    margin: 0 !important;
}
/* Bouton tampon : fond kraft + border-image texture SPIP
   border-image-width 12px → adapté à un bouton de ~35px de haut */
.main-navigation ul.menu > li,
.main-navigation ul.nav-menu > li {
    display: inline-block !important;
    background: url('../images/kraft-long.jpg') #C8A882;
    background-size: 6%;
    background-attachment: fixed;
    margin: 0.3rem !important;
    border: 1.6pt solid #4C351C;
    border-image: url('../images/border.png') 24 24 / 12px 15px / 0.05rem round;
}
.main-navigation ul.menu > li > a,
.main-navigation ul.nav-menu > li > a {
    font-family: 'OldNewspaperTypesALM', Georgia, serif;
    color: #2C1810 !important;
    padding: 0.3em 1.2rem !important;
    display: inline-block !important;
    text-decoration: none;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    text-transform: uppercase;
    font-size: 1.1rem;
}
.main-navigation ul.menu > li > a:hover,
.main-navigation ul.nav-menu > li > a:hover,
.main-navigation ul.menu > li.current-menu-item > a,
.main-navigation ul.nav-menu > li.current-menu-item > a {
    background: radial-gradient(#ffffffb5, #e8d3ba2b);
    color: #2C1810 !important;
}
.main-navigation .sub-menu { z-index: 9999 !important; }

/* ============================================
   HEADER DROITE (injection PHP : recherche + compte)
   ============================================ */

.header-droite {
    position: absolute !important;
    top: 52px !important;
    right: 26% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    z-index: 400 !important;
}

.header-recherche-label {
    font-family: 'OldNewspaperTypesALM', Georgia, serif !important;
    color: #4e352a !important;
    font-size: 1.4rem !important;
    margin-bottom: 0 !important;
    display: block !important;
    letter-spacing: -0.05em !important;
}

.header-recherche form {
    display: flex !important;
    align-items: center !important;
    border: 2px solid #c9a47c !important;
    background-color: rgba(240, 217, 185, 0.6) !important;
    padding: 2px 8px 2px 12px !important;
    width: 280px !important;
}

.header-recherche input[type="search"] {
    font-family: 'OldNewspaperTypesALM', Georgia, serif !important;
    background: transparent !important;
    border: none !important;
    color: #2C1810 !important;
    width: 230px !important;
    outline: none !important;
    font-size: 1.2rem !important;
    font-style: italic !important;
    padding: 0.3em 3em 0.3em 0.5em !important;
    height: 34px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.header-recherche input[type="search"]::placeholder {
    color: rgba(44, 24, 16, 0.35) !important;
    font-style: italic !important;
}

.header-recherche button {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    width: 23px !important;
    height: 23px !important;
    background-image: url('../images/gorecherche.png') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
    font-size: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.header-compte a {
    font-family: 'OldNewspaperTypesALM', Georgia, serif !important;
    color: #4B3319 !important;
    padding: 3px 12px 3px 8px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    font-size: 1.1rem !important;
    background: rgba(218, 182, 136, 0.98) !important;
    border-radius: 20px !important;
    border: none !important;
    letter-spacing: -0.03em !important;
    white-space: nowrap !important;
}

.header-compte a:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #2C1810 !important;
}

.header-compte img {
    width: 24px !important;
    height: 24px !important;
    margin-right: 6px !important;
    opacity: 0.75 !important;
}

/* ============================================
   LISERON
   Valeurs SPIP originales : top:-37px, right:0, w:450px, h:607px
   Ajustées pour GP (session 4) :
   ============================================ */

.liseron-tete {
    position: fixed;
    top: -290px;
    right: 200px;
    width: clamp(350px, 30vw, 700px);
    height: clamp(490px, 42vw, 980px);
    background-image: url('../images/liseron-orange.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top right;
    pointer-events: none;
    z-index: 80;
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE HEADER
   ============================================ */

@media (max-width: 768px) {
    .liseron-tete { display: none; }
    .header-droite { display: none !important; }
    .main-navigation ul.menu > li,
    .main-navigation ul.nav-menu > li {
        width: 100% !important;
        margin: 0 !important;
        border-image: none !important;
        border: none !important;
        background: none !important;
        min-height: 48px;
    }
}

/* Liseron colonne — gauche, noir, retourné */
.liseron-colonne {
    position: fixed;
    top: 164px;
    left: -10%;
    width: 100%;
    height: 100%;
    max-width: 1750px;
    background-image: url('../images/liseron-orange.png');
    background-repeat: no-repeat;
    background-position: 180px 164px;
    background-size: 33%;
    transform: scaleX(-1);
    filter: contrast(130%) brightness(0);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
    display: none;
}

/* Liseron tête noir — version sombre en bas de page */
.liseron-tete-noir {
    position: fixed;
    top: -10px;
    right: -80px;
    width: clamp(300px, 26vw, 580px);
    height: clamp(420px, 36.4vw, 812px);
    background-image: url('../images/liseron-orange.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top right;
    filter: contrast(1%) brightness(1%);
    opacity: 0.8;
    pointer-events: none;
    z-index: 90;
}
