/* ========================================
   HEADER - Navigation principale
   ======================================== */

.header {
    height: 70px;
    padding: 0;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 16px;
}

/* -------------- LOGO -------------- */
.logo-link {
    display: flex;
    gap: 8px;
    align-items: center;
    text-decoration: none;
    color: #1a1a2e;
    flex-shrink: 0;
}

.logo img {
    width: 48px;
    height: 48px;
}

.view-counter {
    font-size: 0.82rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

/* -------------- SEARCH -------------- */
.search-container {
    flex: 1;
    display: flex;
    max-width: 320px;
}

.search-form {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 30px;
    border: 1px solid transparent;
    transition: all 0.2s;
    width: 100%;
}

.search-form:focus-within {
    border-color: #a049cc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(160, 73, 204, 0.1);
}

.search-input {
    flex: 1;
    padding: 8px 14px;
    border: none;
    border-radius: 25px;
    outline: none;
    background: transparent;
    color: #333;
    font-size: 0.88rem;
    font-family: inherit;
    min-width: 0;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 6px;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #a049cc;
}

/* -------------- NAV LINKS -------------- */
#main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links > li > a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links > li > a:hover {
    color: #1a1a2e;
    background: #f0f2f5;
}

.nav-cta {
    background: #a049cc !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    gap: 5px !important;
    box-shadow: 0 2px 8px rgba(160, 73, 204, 0.25);
}

.nav-cta:hover {
    background: #8a3aad !important;
    box-shadow: 0 4px 14px rgba(160, 73, 204, 0.4) !important;
    transform: translateY(-1px);
}

.nav-cta i {
    font-size: 1rem;
}

.nav-btn {
    background: #1a1a2e !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
}

.nav-btn:hover {
    background: #a049cc !important;
}

/* -------------- DROPDOWN -------------- */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    padding: 6px 0;
    list-style: none;
    z-index: 200;
    padding-top: 12px;
}

/* Pont invisible entre le lien et le menu pour garder le hover */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    width: 100%;
    height: 14px;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 16px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    z-index: 1;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.dropdown-menu li a:hover {
    background: #f0f2f5;
    color: #1a1a2e;
}

.dropdown-separator {
    height: 1px;
    background: #eee;
    margin: 4px 10px;
    list-style: none;
}

/* -------------- PROFILE ICON -------------- */
.header-icon-profile {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    vertical-align: middle;
}

/* -------------- HAMBURGER BUTTON -------------- */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 150;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a1a2e;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* -------------- RESPONSIVE: TABLET -------------- */
@media (max-width: 1100px) {
    .nav-links > li > a {
        font-size: 0.78rem;
        padding: 6px 8px;
    }

    .search-container {
        max-width: 220px;
    }
}

/* -------------- RESPONSIVE: MOBILE -------------- */
@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex;
    }

    #main-nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: #fff;
        z-index: 99;
        overflow-y: auto;
        padding: 16px;
    }

    #main-nav.open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }

    .nav-links > li {
        width: 100%;
    }

    .nav-links > li > a {
        font-size: 0.95rem;
        padding: 13px 16px;
        border-radius: 10px;
        width: 100%;
        color: #1a1a2e;
    }

    .nav-links > li > a:hover,
    .nav-links > li > a:active {
        background: #f5f3fa;
        color: #a049cc;
    }

    .nav-cta {
        width: 100%;
        justify-content: center !important;
        margin-top: 6px;
        border-radius: 10px !important;
        padding: 14px 18px !important;
        font-size: 1rem !important;
    }

    .nav-btn {
        text-align: center;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    /* Disable hover-open on mobile */
    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }

    /* Dropdown toggle arrow rotation */
    .nav-dropdown .dropdown-toggle .ri-arrow-down-s-line {
        transition: transform 0.2s;
    }

    .nav-dropdown.open .dropdown-toggle .ri-arrow-down-s-line {
        transform: rotate(180deg);
    }

    .nav-dropdown.open > a {
        background: #f5f3fa;
        color: #a049cc;
    }

    /* Dropdown submenu on mobile */
    .nav-dropdown .dropdown-menu {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin: 0;
        padding: 4px 0 4px 12px;
        min-width: unset;
        background: transparent;
    }

    .nav-dropdown .dropdown-menu::before,
    .nav-dropdown .dropdown-menu::after {
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 11px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
        color: #555;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .dropdown-menu li a i {
        font-size: 1.05rem;
        color: #a049cc;
        width: 20px;
        text-align: center;
    }

    .dropdown-menu li a:hover,
    .dropdown-menu li a:active {
        background: #f5f3fa;
        color: #a049cc;
    }

    /* Separator before dropdown sections */
    .nav-dropdown {
        border-top: 1px solid #f0f0f0;
        margin-top: 4px;
        padding-top: 4px;
    }

    .search-container {
        max-width: none;
        flex: 1;
    }

    .view-counter {
        display: none;
    }
}

/* -------------- RESPONSIVE: SMALL MOBILE -------------- */
@media (max-width: 480px) {
    .header {
        height: 60px;
    }

    #main-nav {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    .search-input {
        font-size: 0.82rem;
        padding: 6px 10px;
    }

    .search-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* ========================================
   FEEDBACK BUBBLE & FORM
   ======================================== */

#feedback-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #a049cc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 22px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(160, 73, 204, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

#feedback-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(160, 73, 204, 0.6);
}

#feedback-form-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 330px;
    padding: 20px;
    z-index: 5;
    background: white;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

#feedback-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

#feedback-close:hover {
    color: #333;
    background: #f0f0f0;
    z-index: 9998;
}

.hidden-hj {
    display: none;
}

#feedback-form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    margin-top: 10px;
}

.required-hj {
    color: #dc3545;
}

#feedback-form textarea,
#feedback-form input {
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

#feedback-form textarea:focus,
#feedback-form input:focus {
    border-color: #a049cc;
    outline: none;
}

#feedback-form button {
    margin-top: 14px;
    width: 100%;
    padding: 10px;
    background: #a049cc;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: opacity 0.2s;
}

#feedback-form button:hover {
    opacity: 0.9;
}

/* ========================================
   COOKIE BANNER
   ======================================== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #1a1a2e;
    color: #ccc;
    padding: 16px 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.88rem;
}

#cookie-banner p {
    margin: 0;
}

#cookie-banner button {
    margin-left: 8px;
    padding: 6px 16px;
    background: #fff;
    color: #1a1a2e;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s;
}

#cookie-banner button:hover {
    background: #e0e0e0;
}
