/* ════════════════════════════════════════════════
   WISE FOOTER RGPD — v4.0
════════════════════════════════════════════════ */

/* ── Hero header global ── */
#wfr-hero{width:100%;overflow:hidden;line-height:0;margin:0}
#wfr-hero img{width:100%;display:block;height:clamp(200px,35vw,500px);object-fit:cover;object-position:center}

/* ── Header post-apo par article ── */
.wfr-post-hero{width:100%;overflow:hidden;margin:0 0 2rem;line-height:0}
.wfr-post-hero-img{width:100%;display:block;height:clamp(180px,30vw,460px);object-fit:cover;object-position:center}

/* ════════════════════════════════════════════════
   OVERLAY
════════════════════════════════════════════════ */
#wfr-overlay{
    position:fixed;inset:0;
    background:rgba(0,0,0,.78);
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    z-index:99998;
    animation:wfrFadeIn .3s ease both;
}
#wfr-overlay.wfr--out{animation:wfrFadeOut .38s ease forwards}

/* ════════════════════════════════════════════════
   BANDEAU RGPD — centré, 50% hauteur min
════════════════════════════════════════════════ */
#wfr-banner{
    position:fixed;
    left:50%;top:50%;
    transform:translate(-50%,-50%);

    width:min(740px,94vw);
    min-height:50vh;
    max-height:92vh;
    overflow-y:auto;

    background:#0f0f0f;
    border:1px solid #2a2a2a;
    border-radius:14px;
    z-index:99999;

    display:flex;
    flex-direction:column;
    padding:36px 44px 28px;
    gap:20px;

    box-shadow:0 28px 90px rgba(0,0,0,.85),0 0 0 1px rgba(255,255,255,.04);
    background-image:
        radial-gradient(ellipse at 10% 90%,rgba(184,115,51,.10) 0%,transparent 55%),
        radial-gradient(ellipse at 90% 10%,rgba(60,160,80,.07) 0%,transparent 55%);

    animation:wfrSlideIn .38s cubic-bezier(.34,1.4,.64,1) both;
}
#wfr-banner.wfr--out{animation:wfrSlideOut .38s ease forwards}

/* Entête */
.wfr-b-head{display:flex;flex-direction:column;gap:6px}
.wfr-b-brand{font-size:11px;letter-spacing:3px;text-transform:uppercase;color:#b87333;font-weight:800}
.wfr-b-title{font-size:clamp(17px,2.6vw,24px);font-weight:700;color:#f0ead6;margin:0;line-height:1.25}

/* Texte & liens */
.wfr-b-body{display:flex;flex-direction:column;gap:8px}
.wfr-b-text{font-size:13.5px;color:#aaa;line-height:1.75;margin:0}
.wfr-b-links{margin:0;font-size:12px}
.wfr-b-links a{color:#b87333;text-decoration:underline;margin:0 4px}
.wfr-b-links a:hover{color:#d4924a}

/* ── Catégories ── */
.wfr-categories{
    display:flex;flex-direction:column;gap:12px;
    border:1px solid #222;border-radius:10px;
    padding:16px 20px;background:#0a0a0a;
}
.wfr-cat{
    display:flex;align-items:flex-start;
    justify-content:space-between;gap:16px;
    padding:10px 0;
    border-bottom:1px solid #1e1e1e;
}
.wfr-cat:last-child{border-bottom:none;padding-bottom:0}
.wfr-cat:first-child{padding-top:0}
.wfr-cat-info{display:flex;flex-direction:column;gap:3px;flex:1}
.wfr-cat-info strong{font-size:13px;color:#e0dcd2;font-weight:600}
.wfr-cat-info span{font-size:12px;color:#666;line-height:1.5}

/* Badge "Toujours actif" */
.wfr-toggle-locked{
    font-size:11px;color:#4caf50;font-weight:700;
    white-space:nowrap;margin-top:2px;flex-shrink:0;
}

/* Toggle switch */
.wfr-toggle{position:relative;display:inline-block;width:44px;height:24px;flex-shrink:0;margin-top:2px;cursor:pointer}
.wfr-toggle input{opacity:0;width:0;height:0}
.wfr-slider{
    position:absolute;inset:0;
    background:#333;border-radius:24px;
    transition:background .2s;
}
.wfr-slider::before{
    content:'';position:absolute;
    height:18px;width:18px;
    left:3px;bottom:3px;
    background:#fff;border-radius:50%;
    transition:transform .2s;
}
.wfr-toggle input:checked + .wfr-slider{background:#4caf50}
.wfr-toggle input:checked + .wfr-slider::before{transform:translateX(20px)}
.wfr-toggle input:focus-visible + .wfr-slider{outline:2px solid #4caf50;outline-offset:2px}

/* ── Boutons d'action ── */
.wfr-b-actions{
    display:flex;flex-wrap:wrap;gap:10px;
    justify-content:flex-end;
    margin-top:4px;
}
.wfr-btn{
    padding:11px 22px;border:none;border-radius:8px;
    cursor:pointer;font-size:14px;font-weight:700;
    letter-spacing:.3px;
    transition:transform .15s,opacity .2s,box-shadow .2s;
    flex-shrink:0;
}
.wfr-btn:hover {transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.4)}
.wfr-btn:active{transform:translateY(0)}
/* Boutons secondaires (Refuser / Enregistrer) — même taille que le principal */
.wfr-btn--secondary{
    background:transparent;color:#aaa;
    border:1px solid #333;
}
.wfr-btn--secondary:hover{color:#ddd;border-color:#666}
/* Bouton principal */
.wfr-btn--primary{background:#4caf50;color:#fff}

/* Mention légale */
.wfr-b-legal{
    font-size:10.5px;color:#3a3a3a;
    line-height:1.6;margin:0;
    border-top:1px solid #1a1a1a;
    padding-top:14px;
}

/* ── Bouton flottant "Gérer mes préférences" ── */
#wfr-reopen{
    position:fixed;bottom:14px;left:14px;
    width:38px;height:38px;
    background:#1a1a1a;border:1px solid #333;
    border-radius:50%;font-size:18px;
    cursor:pointer;z-index:9999;
    display:flex;align-items:center;justify-content:center;
    transition:transform .2s,box-shadow .2s;
    box-shadow:0 2px 8px rgba(0,0,0,.4);
}
#wfr-reopen:hover{transform:scale(1.1);box-shadow:0 4px 14px rgba(0,0,0,.5)}

/* ── Footer discret ── */
#wfr-footer-nav{
    text-align:center;padding:16px 20px 20px;
    font-size:11px;color:#999;
    border-top:1px solid #eee;margin-top:30px;
    line-height:2.2;background:#fafafa;
}
#wfr-footer-nav a{color:#999;text-decoration:none;margin:0 8px;white-space:nowrap;transition:color .2s}
#wfr-footer-nav a:hover{color:#555;text-decoration:underline}

/* ── Animations ── */
@keyframes wfrFadeIn {from{opacity:0}to{opacity:1}}
@keyframes wfrFadeOut{from{opacity:1}to{opacity:0}}
@keyframes wfrSlideIn{
    from{opacity:0;transform:translate(-50%,-46%) scale(.95)}
    to  {opacity:1;transform:translate(-50%,-50%) scale(1)}
}
@keyframes wfrSlideOut{
    from{opacity:1;transform:translate(-50%,-50%) scale(1)}
    to  {opacity:0;transform:translate(-50%,-54%) scale(.95)}
}

/* ── Responsive ── */
@media(max-width:600px){
    #wfr-banner{padding:24px 18px 20px;min-height:50vh}
    .wfr-b-actions{flex-direction:column}
    .wfr-btn{width:100%;text-align:center}
}
