/* Theme Name: UE5 Portfolio Theme
Author: Gemini & Xitrine
Description: UI Style Unreal Engine - Fix Définitif Mouvement Logo
Version: 3.0
*/

/* --- IMPORT POLICE --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

/* --- FORCE LE FOND NOIR ABSOLU --- */
html, body, #page, .site, #content, .elementor-section-wrap {
    background-color: #0b0b0d !important;
    color: #ffffff !important;
    margin: 0;
}

/* --- BASE TYPO --- */
body, button, input, select, textarea {
    font-family: 'Inter', sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* --- HEADER --- */
header.site-header {
    background-color: #0b0b0d !important;
    padding: 15px 40px !important;
    border-bottom: 1px solid #222 !important;
}

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

/* LOCK TOTAL DU LOGO ET DU TITRE */
.brand-box {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    /* On force une largeur minimum et on interdit le rétrécissement */
    flex: 0 0 auto !important; 
    min-width: 300px; 
}

.ue-logo-wrapper img, .custom-logo-link img {
    max-width: 25px !important;
    height: auto !important;
}

.site-title {
    color: #ffffff !important;
    font-size: 2.5rem !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

/* --- NAVIGATION HEADER --- */
.ue-menu { 
    list-style: none !important; 
    display: flex !important; 
    gap: 40px !important; /* Gap large pour que les scales ne se chevauchent pas */
    align-items: center;
    margin: 0;
    padding: 0;
    flex: 0 0 auto !important;
}

.ue-menu li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ue-menu li a {
    display: block !important;
    color: #ffffff !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 22px !important;
    position: relative;
    z-index: 2;
    text-decoration: none !important;
    /* FIX CRUCIAL : La taille du lien ne doit JAMAIS changer */
    transition: color 0.2s ease !important;
    transform: none !important; 
}

/* Le cadre visuel est totalement décoratif et ne pousse rien */
.ue-menu li a::before {
    content: "";
    position: absolute;
    /* On l'ancre au centre pour que le scale n'affecte pas les bords */
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid #ffffff !important;
    z-index: -1;
    transition: transform 0.2s cubic-bezier(0.1, 0.7, 0.1, 1), background 0.2s ease !important;
    transform: scale(1);
    pointer-events: none; /* Le cadre ne bloque pas le clic */
}

/* --- LOGIQUE DE SCALE --- */

/* 1. Bouton normal survolé : scale 1.1 */
.ue-menu li a:not(.current-menu-item):not(.current_page_item):hover::before {
    background: #ffffff !important;
    transform: scale(1.1); 
}

.ue-menu li a:hover {
    color: #000000 !important;
}

/* 2. Bouton actif : scale 1.2 (SANS survol) */
.ue-menu li.current-menu-item a::before, 
.ue-menu li.current_page_item a::before {
    background: #ffffff !important;
    border-color: #ffffff !important;
    transform: scale(1.2); 
}

.ue-menu li.current-menu-item a, 
.ue-menu li.current_page_item a {
    color: #000000 !important;
}

/* 3. Bouton actif survolé : scale 1 (Rétrécit) */
.ue-menu li.current-menu-item a:hover::before, 
.ue-menu li.current_page_item a:hover::before {
    transform: scale(1) !important;
}

/* --- AUTRES ELEMENTS --- */
.ue-card, .ue-project-card {
    background: #151515 !important;
    border: 1px solid #222 !important;
    padding: 35px !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.ue-card:hover {
    transform: translateY(-12px) !important;
    border-color: #ffffff !important;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1) !important;
}

.ue-project-card:hover {
    transform: translateX(20px) !important;
    border-color: #ffffff !important;
}