/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999 !important;
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, #DD9933, #c4872d, #DD9933) 1;
}

.header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height 0.3s ease, padding 0.3s ease;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-logo img {
    height: 60px;
    width: auto;
    transition: height 0.3s ease;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link,
.nav-link:visited,
.nav-link:link {
    font-family: 'Abril Fatface', serif;
    font-size: 16px;
    color: #222222 !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #DD9933;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #DD9933 !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Bouton Contact */
.nav-btn {
    font-family: 'Abril Fatface', serif;
    font-size: 16px;
    color: white !important;
    text-decoration: none !important;
    padding: 12px 28px;
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(221, 153, 51, 0.3);
    margin-left: 15px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(221, 153, 51, 0.4);
    color: white !important;
}

/* Menu burger mobile */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: transparent;
    border: none;
}

.burger-line {
    width: 28px;
    height: 3px;
    background: #222222;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background: #DD9933;
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background: #DD9933;
}

/* ==================== RESPONSIVE ==================== */

/* Desktop large (1100px - 1400px) */
@media (max-width: 1200px) {
    .header-container {
        padding: 0 30px;
    }

    .nav-link {
        padding: 10px 16px;
        font-size: 15px;
    }

    .nav-btn {
        padding: 10px 22px;
        font-size: 15px;
        margin-left: 10px;
    }
}

/* Tablette (601px - 1000px) - Menu burger */
@media (min-width: 601px) and (max-width: 1000px) {
    .burger-menu {
        display: flex;
        padding: 8px;
    }

    .burger-line {
        width: 24px;
        height: 2.5px;
    }

    .header-container {
        padding: 0 20px;
        height: 65px;
    }

    .header-logo img {
        height: 48px;
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 22px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 35px 20px;
    }

    .header-nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 17px;
        padding: 10px 22px;
        width: 90%;
        text-align: center;
    }

    .nav-link::after {
        bottom: 7px;
        left: 22px;
        right: 22px;
    }

    .nav-btn {
        margin-left: 0;
        margin-top: 12px;
        font-size: 15px;
        padding: 11px 28px;
        width: auto;
    }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 999;
        backdrop-filter: blur(2px);
        animation: fadeIn 0.25s ease;
    }

    .nav-overlay.active {
        display: block;
    }
}

/* Tablette (601px - 768px) - Menu burger */
@media (min-width: 601px) and (max-width: 768px) {
    .burger-menu {
        display: flex;
        padding: 8px;
    }

    .burger-line {
        width: 24px;
        height: 2.5px;
    }

    .header-container {
        padding: 0 20px;
        height: 60px;
    }

    .header-logo img {
        height: 42px;
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 65%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 30px 20px;
    }

    .header-nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 17px;
        padding: 10px 20px;
        width: 90%;
        text-align: center;
    }

    .nav-link::after {
        bottom: 7px;
        left: 20px;
        right: 20px;
    }

    .nav-btn {
        margin-left: 0;
        margin-top: 12px;
        font-size: 15px;
        padding: 11px 28px;
        width: auto;
    }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 999;
        backdrop-filter: blur(2px);
        animation: fadeIn 0.25s ease;
    }

    .nav-overlay.active {
        display: block;
    }
}

/* Mobile (max 600px) */
@media (max-width: 600px) {
    .burger-menu {
        display: flex;
        padding: 6px;
        gap: 5px;
    }

    .header-container {
        padding: 0 12px;
        height: 55px;
    }

    .header-logo img {
        height: 38px;
    }

    .burger-line {
        width: 22px;
        height: 2px;
    }

    .burger-menu.active .burger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .burger-menu.active .burger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 260px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 18px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 25px 15px;
    }

    .header-nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 15px;
        padding: 9px 18px;
        width: 90%;
        text-align: center;
    }

    .nav-link::after {
        bottom: 5px;
        left: 18px;
        right: 18px;
    }

    .nav-btn {
        margin-left: 0;
        margin-top: 8px;
        font-size: 14px;
        padding: 10px 24px;
        width: auto;
    }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
        animation: fadeIn 0.25s ease;
    }

    .nav-overlay.active {
        display: block;
    }
}

/* Très petit mobile (max 400px) */
@media (max-width: 400px) {
    .header-container {
        padding: 0 10px;
        height: 52px;
    }

    .header-logo img {
        height: 35px;
    }

    .burger-menu {
        padding: 5px;
    }

    .burger-line {
        width: 20px;
        height: 2px;
    }

    .header-nav {
        width: 80%;
        max-width: 240px;
        gap: 16px;
        padding: 20px 12px;
    }

    .nav-link {
        font-size: 14px;
        padding: 8px 15px;
    }

    .nav-btn {
        font-size: 13px;
        padding: 9px 20px;
    }
}

/* Animation pour l'overlay */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==================== BOUTON DARK MODE ==================== */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #e8e8e8;
    background: #f6eedc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
    position: relative;
    z-index: 1002;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: #DD9933;
    background: #DD9933;
    transform: scale(1.1);
}

.theme-toggle:hover svg {
    fill: white;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: #666666;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle .moon-icon {
    display: none;
}

body.dark-mode .theme-toggle .sun-icon {
    display: block;
}

body.dark-mode .theme-toggle {
    background: #0f3460;
    border-color: #DD9933;
}

body.dark-mode .theme-toggle svg {
    fill: #DD9933;
}

body.dark-mode .theme-toggle:hover {
    background: #DD9933;
}

body.dark-mode .theme-toggle:hover svg {
    fill: white;
}

/* Responsive toggle */
@media (max-width: 1000px) {
    .theme-toggle {
        width: 38px;
        height: 38px;
        margin-left: 0;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 600px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
}