/* --- VARIABLES GLOBALES (À intégrer dans votre fichier principal si nécessaire) --- */
:root {
    --primary: #c21e1e;
    --primary-hover: #a11818;
    --background: #fcfbfb;
    --surface: #ffffff;
    --border: #e5e1e1;
    --text-main: #000000;
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

html.dark {
    --background: #171111;
    --surface: #261c1c;
    --border: #382929;
    --text-main: #ffffff;
}

/* --- UTILITAIRES --- */
.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}
.hidden { display: none !important; }
.fill-1 { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
a { text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* --- HEADER PRINCIPAL --- */
.site-header {
    position: sticky; 
    top: 0; 
    z-index: 50; 
    width: 100%;
    border-bottom: 1px solid var(--border);
    background-color: rgba(252, 251, 251, 0.95);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-family: var(--font-sans);
}

html.dark .site-header { 
    background-color: rgba(23, 17, 17, 0.95); 
}

.header-wrap { 
    display: flex; 
    height: 5rem; 
    align-items: center; 
    justify-content: space-between; 
}

/* --- LOGO --- */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.logo-icon { 
    display: flex; 
    height: 3rem; 
    width: 3rem; 
    align-items: center; 
    justify-content: center; 
    border-radius: 0.75rem; 
    background-color: var(--primary); 
    color: #fff; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.logo:hover .logo-icon { 
    transform: rotate(6deg); 
}
.logo-text-main { 
    font-family: var(--font-serif); 
    font-size: 1.5rem; 
    font-weight: 900; 
    color: var(--text-main); 
    letter-spacing: -0.05em; 
    line-height: 1; 
}
.logo-text-sub { 
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: 0.2em; 
    color: var(--primary); 
    font-weight: 900; 
    margin-top: 0.25rem; 
}

/* --- NAVIGATION DESKTOP --- */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}
.nav-link { 
    font-size: 0.875rem; 
    font-weight: 700; 
    color: var(--text-main); 
    transition: color 0.2s; 
}
.nav-link:hover { 
    color: var(--primary); 
}
.nav-link.active { 
    color: var(--primary); 
    position: relative; 
    font-weight: 900; 
}
.nav-link.active::after { 
    content: ''; 
    position: absolute; 
    bottom: -4px; 
    left: 0; 
    width: 100%; 
    height: 2px; 
    background-color: var(--primary); 
}

/* --- ACTIONS (Boutons et Icônes) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.btn-header-quote { 
    display: none; 
    font-size: 0.75rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    background-color: #000; 
    color: #fff; 
    padding: 0.75rem 1.25rem; 
    border-radius: 0.75rem; 
    transition: background-color 0.3s; 
}
html.dark .btn-header-quote { 
    background-color: var(--primary); 
}
.btn-header-quote:hover { 
    background-color: var(--primary); 
}
html.dark .btn-header-quote:hover { 
    background-color: var(--primary-hover); 
}

.btn-toggle-ui { 
    padding: 0.625rem; 
    border-radius: 0.75rem; 
    background-color: #f1f5f9; 
    border: 1px solid var(--border); 
    color: var(--text-main); 
    transition: border-color 0.2s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
html.dark .btn-toggle-ui { 
    background-color: var(--surface); 
}
.btn-toggle-ui:hover { 
    border-color: var(--primary); 
}

/* Gestion du changement d'icône Light/Dark mode */
html.dark #theme-light-icon { display: none !important; }
html.dark .btn-toggle-ui::before { 
    content: 'light_mode'; 
    font-family: 'Material Symbols Outlined'; 
    display: block; 
}

/* --- MENU MOBILE --- */
.mobile-menu { 
    border-top: 1px solid var(--border); 
    background-color: #fff; 
    padding: 2rem 1rem; 
    display: flex; 
    flex-direction: column; 
    gap: 1.25rem; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); 
}
html.dark .mobile-menu { 
    background-color: var(--surface); 
}
.mobile-link { 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--text-main); 
}
.mobile-link.active { 
    color: var(--primary); 
    font-weight: 900; 
}

/* Bouton principal dans le menu mobile */
.btn-primary { 
    background-color: var(--primary); 
    color: #fff; 
    font-weight: 900; 
    font-size: 0.875rem; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    padding: 1.25rem 2.5rem; 
    border-radius: 1rem; 
    transition: all 0.3s; 
}
.btn-primary:hover { 
    background-color: var(--primary-hover); 
    transform: translateY(-4px); 
    box-shadow: 0 10px 15px -3px rgba(194, 30, 30, 0.4); 
}

/* --- MEDIA QUERIES RESPONSIVES --- */
@media (min-width: 768px) {
    .desktop-nav { 
        display: flex; 
    }
    .md-hidden { 
        display: none !important; 
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Le bouton CTA n'apparaît qu'à partir de 1280px : entre 1024 et 1280px, le
   logo + les 7 liens du menu + ce bouton ne tenaient pas sur une seule ligne
   sans se chevaucher (le bouton recouvrait le dernier lien "Contact"). */
@media (min-width: 1280px) {
    .btn-header-quote {
        display: inline-flex;
    }
}
