/* ============================================================
   Menu.css — Header, Footer & Language popup — Maltadvice
   ============================================================ */

/* ---- Site Header ---- */

.site-header {
    position: relative;
    width: 100%;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--color-light-grey);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 68px;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ---- Logo ---- */

.header-logo {
    flex-shrink: 0;
    line-height: 0;
}

.header-logo a {
    display: block;
}

.header-logo svg {
    width: 140px;
    display: block;
}

/* ---- Desktop Nav ---- */

.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 7px;
    white-space: nowrap;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.nav-link:hover,
.nav-item:hover > .nav-link {
    background: var(--color-white-grey);
    color: var(--color-primary);
}

/* Chevron */
.nav-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: currentColor;
}

.has-dropdown:hover .nav-chevron {
    transform: rotate(180deg);
}

/* ---- Dropdown Panel ---- */

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--color-light-grey);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.11);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 500;
}

.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.dropdown-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ---- Search Bar ---- */

.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--color-grey);
    pointer-events: none;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 0 18px 0 40px;
    border: 1.5px solid var(--color-light-grey);
    border-radius: 999px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    background: var(--color-white-grey);
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

.search-input::placeholder {
    color: var(--color-grey);
}

.search-input:focus {
    background: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

/* Autocomplete dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--color-light-grey);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.13);
    overflow: hidden;
    z-index: 600;
    display: none;
    opacity: 1;
}

.search-suggestions.is-open {
    display: block;
}

.search-suggestion {
    display: block;
    padding: 11px 16px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    text-decoration: none;
    background: #ffffff;
    transition: background 0.12s;
    border-bottom: 1px solid var(--color-light-grey);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.is-active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.search-suggestion mark {
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
}

/* Bouton loupe (mobile uniquement) */
.hdr-icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-light-grey);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    color: var(--color-dark);
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.hdr-icon-btn:hover {
    background: var(--color-white-grey);
    border-color: #d1d5db;
}

.hdr-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Panneau de recherche mobile (slide-down) */
.header-search-mobile {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-top: 1px solid transparent;
    transition: max-height 0.25s ease, border-color 0.25s;
}

.header-search-mobile.is-open {
    max-height: 72px;
    border-top-color: var(--color-light-grey);
}

.search-mobile-inner {
    padding: 10px 16px;
}

@media (max-width: 992px) {
    .header-search  { display: none; }
    .hdr-search-btn { display: flex; }
}

/* ---- Header Actions ---- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Shared button base */
.hdr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    height: 40px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s,
                box-shadow 0.15s, transform 0.15s;
    line-height: 1;
}

.hdr-btn--ghost {
    background: transparent;
    color: var(--color-dark);
    border-color: var(--color-light-grey);
}

.hdr-btn--ghost:hover {
    background: var(--color-white-grey);
    border-color: #d1d5db;
    color: var(--color-dark);
}

.hdr-btn--primary {
    background: var(--color-primary);
    color: #fff;
    border-color: transparent;
}

.hdr-btn--primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

.hdr-btn--lang {
    padding: 0 12px;
    background: transparent;
    color: var(--color-dark);
    border-color: var(--color-light-grey);
    font-size: 0.875rem;
    font-weight: 600;
    gap: 5px;
}

.hdr-btn--lang:hover {
    background: var(--color-white-grey);
    border-color: #d1d5db;
}

.hdr-btn--lang svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    flex-shrink: 0;
}

.hdr-btn--full {
    width: 100%;
}

/* ---- Burger ---- */

.hdr-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-light-grey);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    color: var(--color-dark);
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.hdr-burger:hover {
    background: var(--color-white-grey);
    border-color: #d1d5db;
}

.hdr-burger svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

/* ---- Mobile Drawer ---- */

.header-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-light-grey);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.11);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900;
}

.header-drawer.is-open {
    max-height: 85vh;
    overflow-y: auto;
}

.drawer-body {
    padding: 12px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Drawer nav links */
.drawer-link {
    display: block;
    padding: 11px 12px;
    font-size: 0.9625rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s;
}

.drawer-link:hover {
    background: var(--color-white-grey);
}

.drawer-link--parent {
    font-weight: 600;
}

.drawer-sub {
    margin: 2px 0 4px 14px;
    padding-left: 14px;
    border-left: 2px solid var(--color-light-grey);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.drawer-sub-link {
    display: block;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.drawer-sub-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.drawer-divider {
    height: 1px;
    background: var(--color-light-grey);
    margin: 8px 0;
}

.drawer-ctas {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.drawer-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    margin-top: 8px;
    background: transparent;
    border: 1px solid var(--color-light-grey);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.drawer-lang-btn:hover {
    background: var(--color-white-grey);
    border-color: #d1d5db;
}

.drawer-lang-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================================
   Language Popup
   ============================================================ */

.language-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.language-popup.is-open {
    display: flex;
}

.language-popup-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.language-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-light);
    transition: background 0.15s;
}

.language-popup-close:hover {
    background: var(--color-white-grey);
}

.language-popup-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.language-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-light-grey);
}

.language-popup-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.language-popup-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--color-primary);
}

.language-popup-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    color: var(--color-dark);
    margin: 0;
}

/* Language grid */
.language-options-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.language-options-list li {
    border: 1.5px solid var(--color-light-grey);
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    cursor: pointer;
}

.language-options-list li:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    transform: translateY(-2px);
}

.language-options-list li.current-lang {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.language-options-list li a {
    display: block;
    padding: 16px 10px;
    text-align: center;
    color: var(--color-dark);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.language-options-list li.current-lang a {
    color: #fff;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 50px 0 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.footer-column {
    color: #fff;
}

.footer-column-title {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 16px;
    color: #fff;
}

.footer-column-title a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.15s;
}

.footer-column-title a:hover {
    opacity: 0.85;
}

.footer-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-language {
    margin-top: 20px;
}

/* Footer language button */
.footer-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.footer-lang-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.footer-lang-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.footer-social {
    margin-top: 24px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-links svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.footer-bottom {
    margin-top: var(--space-lg);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    font-family: 'Roboto', sans-serif;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablettes et petits écrans */
@media (max-width: 992px) {
    .header-nav {
        display: none;
    }


    .hdr-burger {
        display: flex;
    }

    .language-options-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobiles */
@media (max-width: 640px) {
    .header-inner {
        height: 60px;
        gap: var(--space-sm);
    }

    .header-logo svg {
        width: 122px;
    }

    .drawer-ctas {
        flex-direction: column;
    }

    .language-options-list {
        grid-template-columns: 1fr;
    }

    .language-popup-content {
        padding: 20px;
        border-radius: 12px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* Très petits écrans */
@media (max-width: 380px) {
    .header-inner {
        height: 56px;
        padding: 0 var(--space-sm);
    }

    .header-logo svg {
        width: 105px;
    }
}
