/* -------------------------------------------------------------------------
   NAVBAR – HEADER FIXE ET WRAPPER
------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: saturate(1.2) blur(8px);
    background: color-mix(in srgb, var(--surface-2) 85%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}

.wrap {
    max-width: 1340px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* -------------------------------------------------------------------------
   BRAND / LOGO
------------------------------------------------------------------------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.brand strong { 
    font-weight: 700; 
    letter-spacing: 0.3px; 
}

/* -------------------------------------------------------------------------
   NAVIGATION PRINCIPALE (DESKTOP)
------------------------------------------------------------------------- */
nav { 
    margin-left: auto; 
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item { 
    position: relative; 
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-2));
    outline: none;
    box-shadow: var(--ring);
}

.nav-cta {
    background: var(--cta-bg);
    color: var(--cta-text) !important;
    font-weight: 700;
    box-shadow: var(--shadow);
    margin-left: 6px;
}

.nav-cta:hover { 
    opacity: 0.85; 
    background: var(--cta-bg); 
}

.caret {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    transform: translateY(1px);
}

/* -------------------------------------------------------------------------
   PANELS DROPDOWN (MENUS DÉROULANTS)
------------------------------------------------------------------------- */
.panel {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 310px;
    background: var(--surface-2);
    border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-item[aria-expanded="true"] > .panel {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.panel li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}

.panel li a:hover,
.panel li a:focus-visible {
    background: color-mix(in srgb, var(--brand) 10%, transparent);
    outline: none;
}

.panel .icn {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.panel .icn svg { 
    width: 20px; 
    height: 20px; 
}

.label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
}

.sub {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 1px;
}

/* -------------------------------------------------------------------------
   BOUTON THÈME (DESKTOP)
------------------------------------------------------------------------- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px; 
    height: 38px;
    padding: 0 12px;
    gap: 8px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-2));
}

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon { 
    display: none; 
}

html[data-theme="dark"]  .theme-toggle .moon-icon { display: block; }
html[data-theme="light"] .theme-toggle .sun-icon  { display: block; }

@media (prefers-color-scheme: dark) {
    html:not([data-theme]) .theme-toggle .moon-icon { display: block; }
}
@media (prefers-color-scheme: light) {
    html:not([data-theme]) .theme-toggle .sun-icon  { display: block; }
}

/* -------------------------------------------------------------------------
   BURGER ET DRAWER MOBILE (BACKDROP ET PANNEAU)
------------------------------------------------------------------------- */
.burger {
    display: none;
    margin-left: auto;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
    color: var(--text);
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 8px;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    z-index: 1100;
}

.drawer-backdrop.open { 
    display: block; 
}

.drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(92vw, 420px);
    background: var(--surface-2);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    z-index: 1200;
    display: flex;
    flex-direction: column;
}

.drawer.open { 
    transform: translateX(0); 
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
    position: sticky;
    top: 0;
    background: var(--surface-2);
    z-index: 1;
}

.drawer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.drawer-close {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    color: var(--text);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.drawer-close:hover { 
    background: color-mix(in srgb, var(--brand) 10%, transparent); 
}

.drawer .section {
    padding: 16px 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--muted) 12%, transparent);
}

.drawer .section h4 {
    margin: 0 0 8px;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.drawer a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.97rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s;
}

.drawer a:last-child { margin-bottom: 0; }
.drawer a:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }

.drawer .icn {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.drawer .icn svg { 
    width: 20px; 
    height: 20px; 
}

/* -------------------------------------------------------------------------
   MEDIA QUERIES (BREAKPOINTS)
------------------------------------------------------------------------- */
@media (max-width: 1140px) {
    nav { display: none; }
    .theme-toggle { display: none; }
    .burger { display: inline-flex; }
}



/* -------------------------------------------------------------------------
   Icon (BREAKPOINTS)
------------------------------------------------------------------------- */

.social-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-2));
}

@media (max-width: 1140px) {
    .social-icons {
        display: none;
    }
}
