/**
 * header.css
 * Header / menu principal du site public (préfixe fg-)
 * Remplace les anciens styles .header-container / .navbar de style.css
 */
:root {
    --fg-bg: #E7E5D3;
    --fg-text: #3f3f37;
    --fg-muted: #7a7a6c;
    --fg-accent: #577573;
    --fg-accent-dark: #435c5a;
    --fg-line: rgba(0, 0, 0, .08);
    --fg-h: 84px;
    --fg-h-scrolled: 64px;
}

/* Neutralise les anciennes règles "header" de style.css (padding, fixed mobile) */
header.fg-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0;
    background: var(--fg-bg);
    box-shadow: none;
    border-bottom: 1px solid var(--fg-line);
    transition: box-shadow .2s;
}
header.fg-header.is-scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }

.fg-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--fg-h);
    display: flex;
    align-items: center;
    gap: 32px;
    transition: height .2s;
}
.fg-header.is-scrolled .fg-wrap { height: var(--fg-h-scrolled); }

/* Logo */
.fg-logo { display: flex; align-items: center; gap: 12px; color: var(--fg-text); flex-shrink: 0; }
.fg-logo:hover { text-decoration: none; color: var(--fg-text); }
.fg-logo img { height: 60px; width: auto; border-radius: 8px; transition: height .2s; }
.fg-header.is-scrolled .fg-logo img { height: 44px; }
.fg-logo span { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; line-height: 1.15; }
.fg-logo small { display: block; font-family: inherit; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }

/* Navigation */
.fg-nav { flex: 1; display: flex; justify-content: center; }
.fg-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.fg-menu > li { position: relative; }
.fg-menu a,
.fg-menu button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--fg-text);
    white-space: nowrap;
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.fg-menu a:hover,
.fg-menu button:hover { background: rgba(0, 0, 0, .04); color: var(--fg-accent); text-decoration: none; }
.fg-menu button:focus { outline: none; }
.fg-menu button:focus-visible, .fg-menu a:focus-visible { outline: 2px solid var(--fg-accent); outline-offset: 2px; }
.fg-menu > li > a.is-active,
.fg-menu > li > button.is-active { color: var(--fg-accent); box-shadow: inset 0 -2px 0 var(--fg-accent); border-radius: 0; }
.fg-menu .fa-chevron-down { font-size: .65rem; transition: transform .2s; }
.fg-menu .fa-gift { font-size: .85em; }

/* Sous-menu Soins */
.fg-sub {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.fg-has-sub:hover .fg-sub,
.fg-has-sub.is-open .fg-sub { opacity: 1; visibility: visible; transform: none; }
.fg-has-sub:hover .fa-chevron-down,
.fg-has-sub.is-open .fa-chevron-down { transform: rotate(180deg); }
.fg-sub a { padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; }
.fg-sub a.is-active { color: var(--fg-accent); background: rgba(87, 117, 115, .08); }
.fg-sub a small { font-size: .78rem; color: var(--fg-muted); font-weight: 400; }

/* Actions à droite */
.fg-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fg-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-text); }
.fg-icon:hover { background: rgba(0, 0, 0, .05); color: var(--fg-accent); text-decoration: none; }
.fg-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--fg-accent);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .15s;
}
.fg-cta:hover { background: var(--fg-accent-dark); color: #fff; text-decoration: none; }

.fg-burger { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--fg-text); cursor: pointer; width: 40px; height: 40px; }
.fg-burger:focus { outline: none; }
.fg-mobile-extra { display: none; }

/* Tablette : on masque le nom à côté du logo avant de passer en burger */
@media (max-width: 1180px) {
    .fg-wrap { gap: 16px; }
    .fg-logo span { display: none; }
}

/* Mobile / tablette */
@media (max-width: 991px) {
    body { padding-top: 0; } /* annule l'ancien offset du header fixed */
    .fg-burger { display: block; order: 3; }
    .fg-actions { margin-left: auto; }
    .fg-actions .fg-icon { display: none; }
    .fg-nav {
        position: fixed;
        top: var(--fg-h);
        left: 0; right: 0; bottom: 0;
        background: var(--fg-bg);
        display: block;
        padding: 16px 24px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .25s;
    }
    .fg-header.is-scrolled .fg-nav { top: var(--fg-h-scrolled); }
    .fg-header.menu-open .fg-nav { transform: none; }
    .fg-menu { flex-direction: column; gap: 0; }
    .fg-menu > li { border-bottom: 1px solid var(--fg-line); }
    .fg-menu a, .fg-menu button { padding: 14px 4px; font-size: 1.05rem; width: 100%; justify-content: flex-start; }
    .fg-menu button { justify-content: space-between; }
    .fg-menu > li > a.is-active, .fg-menu > li > button.is-active { box-shadow: none; font-weight: 600; }
    .fg-sub { position: static; box-shadow: none; background: none; padding: 0 0 8px 12px; opacity: 1; visibility: visible; transform: none; display: none; }
    .fg-has-sub.is-open .fg-sub { display: block; }
    .fg-has-sub:hover .fa-chevron-down { transform: none; }
    .fg-has-sub.is-open .fa-chevron-down { transform: rotate(180deg); }
    .fg-mobile-extra { display: flex; gap: 12px; margin-top: 20px; }
    .fg-mobile-extra a { flex: 1; text-align: center; padding: 12px; border: 1px solid var(--fg-accent); border-radius: 8px; color: var(--fg-accent); }
    .fg-mobile-extra a:hover { background: var(--fg-accent); color: #fff; text-decoration: none; }
    body.fg-noscroll { overflow: hidden; }
}
@media (max-width: 420px) {
    .fg-wrap { padding: 0 16px; }
    .fg-cta span { display: none; }
    .fg-cta { padding: 11px 14px; }
}
