/* 
 * Diametrie Premium Header Styles 
 * Ey-Style, Dark mode, Clean Typography
 */

 :root {
    --dph-bg: #1a1a1c; /* EY very dark gray */
    --dph-bg-dropdown: #222224; /* Slightly lighter for dropdown */
    --dph-text: #ffffff;
    --dph-text-muted: #a0a0a5;
    --dph-accent: #ffe600; /* EY Yellow accent */
    --dph-border: rgba(255, 255, 255, 0.15);
    --dph-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --dph-transition: 0.3s ease;
}

.diametrie-premium-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    background: var(--dph-bg);
    border-bottom: 1px solid var(--dph-border);
    font-family: var(--dph-font);
    color: var(--dph-text);
}

.dph-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.dph-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dph-text);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
}

/* Nav */
.dph-nav {
    display: flex;
    align-items: center;
    height: 100%;
}
.dph-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}
.dph-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.dph-nav-link {
    text-decoration: none;
    color: var(--dph-text-muted);
    font-size: 15px;
    font-weight: 500;
    padding: 0 18px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color var(--dph-transition);
}
.dph-nav-link:hover,
.dph-nav-item:hover > .dph-nav-link {
    color: var(--dph-text);
}

/* Yellow Active/Hover underline */
.dph-nav-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--dph-accent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transform-origin: left;
    z-index: 2;
}
.dph-nav-item:hover::after,
.dph-nav-item.active::after {
    transform: scaleX(1);
}

/* Right Actions */
.dph-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}
.dph-action-link {
    text-decoration: none;
    color: var(--dph-text);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--dph-transition);
}
.dph-action-link:hover {
    color: var(--dph-accent);
}
.dph-action-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mega Menu Dropdown */
.dph-mega-menu {
    position: fixed; /* Changed from absolute to fixed to span full viewport */
    top: 72px; /* Header height */
    left: 0;
    width: 100vw; /* Full viewport width */
    /* Liquid Glass Premium Background */
    background: rgba(20, 20, 22, 0.65);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Smoother animation */
    z-index: 99998;
    pointer-events: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
/* Affichage du mega menu au hover */
.dph-nav-item.has-mega:hover .dph-mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dph-mega-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 80px; /* Increased gap for breathing room */
}

/* 3 Columns Layout */
.dph-mega-left {
    flex: 0 0 300px;
}
.dph-mega-middle {
    flex: 0 0 380px;
    border-right: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider */
    padding-right: 40px;
}
.dph-mega-right {
    flex: 1;
    position: relative;
    padding-left: 20px;
}

/* Typography in Dropdown */
.dph-mega-left h2 {
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 16px;
    color: var(--dph-text);
}
.dph-mega-left p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--dph-text-muted);
    margin: 0 0 32px;
}
.dph-btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    border: 1px solid var(--dph-text);
    color: var(--dph-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.dph-btn-outline:hover {
    background: var(--dph-text);
    color: var(--dph-bg);
}

/* Middle List (Services) */
.dph-mega-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dph-mega-list li {
    border-bottom: 1px solid var(--dph-border);
}
.dph-mega-list li:last-child {
    border-bottom: none;
}
.dph-mega-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    color: var(--dph-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}
.dph-mega-list a svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}
.dph-mega-list li.active a,
.dph-mega-list a:hover {
    color: var(--dph-text);
}
.dph-mega-list li.active a svg,
.dph-mega-list a:hover svg {
    opacity: 1;
    transform: translateX(0);
}

/* Right List (Sub items / Useful Links) */
.dph-mega-title, .dph-mega-title-sub {
    color: var(--dph-accent);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dph-mega-title-sub svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}
.dph-mega-sub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dph-mega-sub-list li {
    margin-bottom: 16px;
}
.dph-mega-sub-list a {
    color: var(--dph-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.dph-mega-sub-list a:hover {
    color: var(--dph-accent);
}

/* Sub-panes logic */
.dph-sub-panes {
    position: relative;
    width: 100%;
}
.dph-sub-pane {
    display: none;
}
.dph-sub-pane.active {
    display: block;
}

/* Hide useful links if a sub-pane is active (handled by JS, but useful links is default) */
.dph-useful-links {
    display: none;
}
.dph-useful-links.active {
    display: block;
}

/* Reset Tatsu margins */
.tatsu-module .diametrie-premium-header {
    margin: 0;
}
body {
    padding-top: 72px;
}
