/* /template_v2/style_v2.css */

:root {
    --epai-blue: #2c3e50;
    --epai-light-blue: #34495e;
    --epai-accent: #2ecc71;
    --epai-bg: #f4f7f6;
    --header-height: 70px;
}

body {
    margin: 20px;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--epai-bg);
    color: #333;
    line-height: 1.5;
}

/* Structure Layout */
.v2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: #ffffff;
    height: var(--header-height);
    border-bottom: 3px solid var(--epai-blue);
    border-radius: 8px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.v2-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-nav {
    display: flex;
    gap: 15px;
    border-left: 1px solid #eee;
    padding-left: 20px;
}

.v2-nav a {
    color: var(--epai-light-blue);
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.v2-nav a:hover {
    background: #f0f2f5;
    color: var(--epai-accent);
    text-decoration: none;
}

.logout-link {
    color: #c0392b !important;
    font-weight: bold;
}

.v2-logo-epai { height: 45px; }

.v2-user-box {
    text-align: right;
    font-size: 0.85rem;
    color: var(--epai-light-blue);
}

.v2-impersonation-bar {
    background: #e67e22;
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.v2-user-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #2c3e50;
}

.v2-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* Astuce pour que le conteneur n'affecte pas le flexbox du header sur écran large */
.v2-nav-container { display: contents; }

@media (max-width: 768px) {
    .v2-user-menu-container {
        position: relative;
    }
    .v2-user-menu-toggle {
        display: block;
    }
    .v2-user-box {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 10px;
        background: white;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border: 1px solid #eee;
        z-index: 1000;
        text-align: right;
        min-width: 200px;
    }
    .v2-user-box.show-mobile {
        display: block !important;
    }

    .v2-nav-container {
        display: block;
        position: relative;
    }
    .v2-nav-toggle {
        display: block;
    }
    .v2-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 10px;
        background: white;
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border: 1px solid #eee !important;
        z-index: 1000;
        flex-direction: column;
        gap: 5px;
        min-width: 200px;
    }
    .v2-nav.show-mobile {
        display: flex !important;
    }
}

/* Conteneurs */
.container-v2 {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.container-fullscreen {
    padding: 20px 0;
    width: 100%;
}

/* Typographie & Liens */
h1, h2, h3 { color: var(--epai-blue); margin-top: 0; }
h1 { font-size: 160%; }

a { color: #3498db; text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* Footer */
.v2-footer {
    margin-top: 40px;
    padding: 20px;
    background: #fff;
    border-top: 1px solid #ddd;
    border-radius: 8px; 
    text-align: center;
    color: #7f8c8d;
    font-size: 0.7rem;
}

.v2-footer img { height: 50px; vertical-align: middle; margin-right: 15px; opacity: 0.8; }