/*
 * Header global de rgpd.lepotager.org.
 * Une structure unique, trois habillages : commun, Potager, Prestadmin.
 * Ne pas recréer de header spécifique dans les pages : modifier ce fichier
 * et includes/site-header.php.
 */

.rgpd-global-header{
    --rgpd-brand:#33413b;
    --rgpd-brand-deep:#27312d;
    --rgpd-brand-soft:#eef0ed;
    --rgpd-brand-line:#d6dad6;
    position:relative !important;
    top:auto !important;
    z-index:50;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    background:#f4f3ee !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    color:#202522;
}

.rgpd-global-header::after{
    content:none !important;
    display:none !important;
}

.rgpd-global-header[data-brand="potager"]{
    --rgpd-brand:#23483a;
    --rgpd-brand-deep:#19382d;
    --rgpd-brand-soft:#eef4f0;
    --rgpd-brand-line:#cbd9d0;
}

.rgpd-global-header[data-brand="prestadmin"]{
    --rgpd-brand:#9b304b;
    --rgpd-brand-deep:#82243d;
    --rgpd-brand-soft:#fbf0f3;
    --rgpd-brand-line:#ead1d8;
}

.rgpd-global-header .shell{
    width:min(1160px,calc(100% - 36px));
    margin-inline:auto;
}

/* 1. Identité RGPD commune */
.rgpd-global-identity{
    background:#f4f3ee;
    border-bottom:1px solid #d9dad5;
}

.rgpd-global-identity-row{
    min-height:142px;
    display:flex;
    align-items:center;
}

.rgpd-global-home{
    display:inline-flex;
    align-items:center;
    gap:24px;
    color:#202522;
    text-decoration:none;
    min-width:0;
}

.rgpd-global-mark{
    width:92px;
    height:92px;
    flex:0 0 92px;
    display:grid;
    place-items:center;
}

.rgpd-global-mark img{
    display:block;
    width:92px;
    height:92px;
    object-fit:contain;
}

.rgpd-global-title-wrap{
    min-width:0;
}

.rgpd-global-title-wrap strong,
.rgpd-global-title-wrap small{
    display:block;
}

.rgpd-global-title-wrap strong{
    color:#202522;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    font-size:clamp(2rem,4.2vw,3.75rem);
    font-weight:850;
    line-height:1;
    letter-spacing:-.04em;
}

.rgpd-global-title-wrap small{
    margin-top:10px;
    color:#626862;
    font-size:clamp(.82rem,1.6vw,1.05rem);
    font-weight:750;
    letter-spacing:.02em;
}

/* 2. Bandeau de marque + CTA unique */
.rgpd-global-brandbar{
    background:var(--rgpd-brand);
    color:#fff;
}

.rgpd-global-brandrow{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:stretch;
    gap:32px;
}

.rgpd-global-brandcopy{
    min-width:0;
    min-height:154px;
    padding:30px 0 31px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.rgpd-global-brandname,
.rgpd-global-tagline{
    display:block;
    color:#fff;
}

.rgpd-global-brandname{
    line-height:1;
}

.rgpd-global-brandname-potager{
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(2.45rem,5vw,4.25rem);
    font-weight:800;
    letter-spacing:-.025em;
}

.rgpd-global-brandname-prestadmin{
    font-family:Arial,Helvetica,sans-serif;
    font-size:clamp(2.05rem,4.4vw,3.55rem);
    font-weight:850;
    letter-spacing:.12em;
}

.rgpd-global-brandname-common{
    display:flex;
    align-items:baseline;
    gap:.38em;
    flex-wrap:wrap;
    font-size:clamp(2rem,4vw,3.3rem);
}

.rgpd-global-common-prestadmin{
    font-family:Arial,Helvetica,sans-serif;
    font-size:.76em;
    font-weight:850;
    letter-spacing:.09em;
}

.rgpd-global-common-times{
    font-family:Inter,system-ui,sans-serif;
    font-size:.66em;
    opacity:.65;
}

.rgpd-global-common-potager{
    font-family:Georgia,"Times New Roman",serif;
    font-weight:800;
    letter-spacing:-.02em;
}

.rgpd-global-tagline{
    margin-top:13px;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    font-size:clamp(.98rem,1.8vw,1.35rem);
    font-weight:800;
    line-height:1.25;
    letter-spacing:.015em;
    opacity:.93;
}

.rgpd-global-header[data-brand="prestadmin"] .rgpd-global-tagline{
    font-family:Arial,Helvetica,sans-serif;
    letter-spacing:.13em;
}

.rgpd-global-diagnostic{
    align-self:stretch;
    min-width:300px;
    margin:24px 0;
    padding:20px 30px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;
    border:0;
    border-radius:16px;
    background:var(--rgpd-brand-deep);
    color:#fff;
    font-family:inherit;
    font-size:clamp(1.05rem,2vw,1.35rem);
    font-weight:850;
    line-height:1.2;
    text-decoration:none;
    cursor:pointer;
    box-shadow:none;
    transition:transform .16s ease,filter .16s ease;
}

.rgpd-global-diagnostic:hover{
    transform:translateY(-1px);
    filter:brightness(.94);
}

.rgpd-global-diagnostic:focus-visible{
    outline:3px solid rgba(255,255,255,.72);
    outline-offset:3px;
}

/* L'éclair reprend le glyphe déjà utilisé dans l'ancien bouton Potager. */
.rgpd-global-diagnostic-bolt{
    display:inline-block;
    flex:0 0 auto;
    color:#fff;
    font-family:Georgia,"Times New Roman",serif;
    font-size:1.45em;
    font-weight:900;
    line-height:.7;
    transform:translateY(-1px);
}

.rgpd-global-diagnostic-arrow{
    display:inline-block;
    flex:0 0 auto;
    font-size:1.2em;
    line-height:1;
}

/* 3. Navigation secondaire conservée, mais séparée de l'identité. */
.rgpd-global-subnav{
    background:var(--rgpd-brand-soft);
    border-bottom:1px solid var(--rgpd-brand-line);
}

.rgpd-global-nav{
    min-height:52px;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:28px !important;
    flex-wrap:nowrap !important;
    overflow-x:auto;
    scrollbar-width:thin;
}

.rgpd-global-nav a{
    flex:0 0 auto;
    padding:14px 0;
    color:#303934 !important;
    font-size:.92rem !important;
    font-weight:750 !important;
    text-decoration:none !important;
    white-space:nowrap;
}

.rgpd-global-nav a:hover,
.rgpd-global-nav a:focus-visible,
.rgpd-global-nav a.active{
    color:var(--rgpd-brand) !important;
}

.rgpd-global-nav a.active{
    font-weight:900 !important;
}

@media (max-width:820px){
    .rgpd-global-identity-row{
        min-height:112px;
    }

    .rgpd-global-mark,
    .rgpd-global-mark img{
        width:72px;
        height:72px;
    }

    .rgpd-global-mark{
        flex-basis:72px;
    }

    .rgpd-global-home{
        gap:17px;
    }

    .rgpd-global-brandrow{
        grid-template-columns:1fr;
        gap:0;
    }

    .rgpd-global-brandcopy{
        min-height:0;
        padding:25px 0 22px;
    }

    .rgpd-global-diagnostic{
        min-width:0;
        width:100%;
        margin:0 0 22px;
        min-height:64px;
        justify-content:flex-start;
    }
}

@media (max-width:620px){
    .rgpd-global-header .shell{
        width:min(100% - 24px,1160px);
    }

    .rgpd-global-identity-row{
        min-height:94px;
    }

    .rgpd-global-mark,
    .rgpd-global-mark img{
        width:60px;
        height:60px;
    }

    .rgpd-global-mark{
        flex-basis:60px;
    }

    .rgpd-global-home{
        gap:13px;
    }

    .rgpd-global-title-wrap strong{
        font-size:clamp(1.6rem,8vw,2.25rem);
    }

    .rgpd-global-title-wrap small{
        margin-top:6px;
        font-size:.72rem;
    }

    .rgpd-global-brandname-potager{
        font-size:clamp(2rem,10vw,3rem);
    }

    .rgpd-global-brandname-prestadmin{
        font-size:clamp(1.65rem,8vw,2.5rem);
    }

    .rgpd-global-brandname-common{
        gap:.28em;
        font-size:clamp(1.55rem,7.2vw,2.3rem);
    }

    .rgpd-global-tagline{
        font-size:.88rem;
    }

    .rgpd-global-diagnostic{
        padding:17px 20px;
        border-radius:13px;
        font-size:1rem;
    }

    .rgpd-global-nav{
        gap:20px !important;
    }
}

@media (prefers-reduced-motion:reduce){
    .rgpd-global-diagnostic{transition:none}
}
