/* layout.css */

/* Custom elements must be block-level for proper document flow */
app-header, app-footer, kyoku-processus { display: block; }

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-sm, 1rem);
    max-width: 1200px;
}

/* Header Sticky */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-fast, 0.2s ease-in-out);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo {
    font-family: var(--font-heading, 'Oswald', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-black, #111111);
}

.logo span {
    color: var(--color-red, #E60000);
}

.main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    background: white;
    padding: 2rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    gap: 1.5rem;
}

.main-nav.active {
    display: flex;
}

@media (max-width: 991px) {
    .mobile-toggle {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .main-nav {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        gap: var(--spacing-md, 2rem);
        align-items: center;
    }

    .main-nav a {
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
        transition: var(--transition-fast, 0.2s ease-in-out);
        position: relative;
    }


    .main-nav a.btn {
        padding: 0.8rem 1.5rem;
        border-radius: 4px;
        color: white !important;
        background-color: var(--color-red, #E60000);
        transition: all 0.3s ease;
    }
    .main-nav a.btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(230,0,0,0.3);
    }
    .main-nav a:hover {
        color: var(--color-red, #E60000);
    }
}

/* Footer styles managed by app-footer.js component */

.footer-section h3 {
    color: var(--color-red, #E60000);
    margin-bottom: var(--spacing-sm, 1rem);
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    transition: var(--transition-fast, 0.2s ease-in-out);
}

.footer-section a:hover {
    color: var(--color-red, #E60000);
}

/* Dropdown CSS - Global */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-header a {
    cursor: pointer;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
}

@media (min-width: 992px) {
    .dropdown-header a {
        border-bottom: 2px solid var(--color-red, #E60000);
        padding-bottom: 2px;
    }
    .nav-dropdown:hover .dropdown-header a {
        color: var(--color-red, #E60000);
    }
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-white, #ffffff);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1000;
    top: 100%;
    left: 0;
    padding: 0;
    border-top: 2px solid var(--color-red, #E60000);
    flex-direction: column;
}

/* Survol Desktop -> Afficher */
@media (min-width: 992px) {
    .nav-dropdown:hover .dropdown-content {
        display: flex;
    }
    .nav-dropdown:hover .desktop-arrow {
        transform: rotate(180deg);
    }
    .dropdown-toggle {
        display: none !important;
    }
}

/* Cacher la flèche desktop sur mobile */
@media (max-width: 991px) {
    .desktop-arrow {
        display: none !important;
    }
}

/* Comportement mobile de la zone déroulante géré en JS */
.dropdown-content.mobile-active {
    display: flex;
    position: static;
    box-shadow: none;
    border-top: none;
    border-left: 2px solid var(--color-red, #E60000);
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.dropdown-content a {
    color: var(--color-black, #111111) !important; /* Force la couleur pour ecrase le main-nav a */
    padding: 1rem 1.2rem;
    text-decoration: none;
    text-transform: none !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    border-bottom: 1px solid #eee;
    display: block;
    width: 100%;
    transition: all 0.2s;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f9f9f9;
    color: var(--color-red, #E60000) !important;
    padding-left: 1.5rem; /* Petit effet au survol */
}

.dropdown-all-link {
    border-top: 1px solid #eee;
    padding-top: 8px;
    font-weight: 600;
}

kyoku-simulator,
kyoku-simulator-enduit { display: block !important; width: 100% !important; box-sizing: border-box !important; margin: 0 !important; max-width: 100% !important; }

