/* ============================================================
   LAYOUT.CSS — PARTIE 1/3
   Structure globale + Header + Main
   ============================================================ */

/* ============================================================
   1. STRUCTURE GLOBALE
   ============================================================ */

body {
    background: #f1f5f9; /* gris premium */
    color: #1f2937;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Thèmes */
body[data-login-theme="macos"],
body[data-login-theme="glass"],
body[data-login-theme="ios17"] {
    backdrop-filter: blur(12px);
}


/* ============================================================
   2. WRAPPER PRINCIPAL
   ============================================================ */

.layout-wrapper {
    min-height: 100vh;
    background: #f3f4f6;
    overflow: visible;
}

/* Thèmes */
body[data-login-theme="macos"] .layout-wrapper {
    background: rgba(255,255,255,0.55);
}

body[data-login-theme="glass"] .layout-wrapper {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(22px);
}

body[data-login-theme="ios17"] .layout-wrapper {
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(28px) saturate(180%);
}


/* ============================================================
   3. HEADER — NAVIGATION JETSTREAM
   ============================================================ */

.layout-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Thèmes */
body[data-login-theme="macos"] .layout-nav {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
}

body[data-login-theme="glass"] .layout-nav {
    background: rgba(255,255,255,0.20);
    border-bottom: 1px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(30px);
}

body[data-login-theme="ios17"] .layout-nav {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(22px) saturate(180%);
}


/* ============================================================
   4. HEADER INTERNE (Jetstream $header)
   ============================================================ */

.layout-header {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem 1rem;
}

/* Thèmes */
body[data-login-theme="macos"] .layout-header {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
}

body[data-login-theme="glass"] .layout-header {
    background: rgba(255,255,255,0.20);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255,255,255,0.35);
}


/* ============================================================
   5. MAIN CONTENT
   ============================================================ */

.layout-main {
    padding: 1rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Thèmes */
body[data-login-theme="macos"] .layout-main {
    backdrop-filter: blur(12px);
}

body[data-login-theme="glass"] .layout-main {
    backdrop-filter: blur(18px);
}


/* ============================================================
   6. RESPONSIVE PREMIUM
   ============================================================ */

@media (max-width: 767px) {

    .layout-header {
        padding: 1rem 0.75rem;
    }

    .layout-main {
        padding: 0.75rem;
    }
}
/* ============================================================
   7. NAVIGATION DESKTOP
   ============================================================ */

.layout-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

/* Logo */
.layout-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.layout-nav-logo img {
    height: 32px;
}

/* Liens desktop */
.layout-nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.layout-nav-links a {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.375rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.layout-nav-links a:hover {
    background: #f3f4f6;
    color: #111;
}

.layout-nav-links a.active {
    background: #e0f2f1;
    color: #0d9488;
    font-weight: 600;
}


/* ============================================================
   8. NAVIGATION MOBILE
   ============================================================ */

.layout-mobile-menu {
    display: none;
    flex-direction: column;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem;
    gap: 0.5rem;
}

.layout-mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.375rem;
    transition: background 0.2s ease;
}

.layout-mobile-menu a:hover {
    background: #f3f4f6;
    color: #111;
}

.layout-mobile-menu a.active {
    background: #e0f2f1;
    color: #0d9488;
    font-weight: 600;
}


/* ============================================================
   9. BOUTON MOBILE (HAMBURGER)
   ============================================================ */

.layout-nav-mobile-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    padding: 0.25rem;
    cursor: pointer;
    color: #374151;
    transition: opacity 0.25s ease;
}

.layout-nav-mobile-btn:hover {
    opacity: 0.7;
}


/* ============================================================
   10. RESPONSIVE PREMIUM
   ============================================================ */

@media (max-width: 767px) {

    /* Navigation desktop disparaît */
    .layout-nav-links {
        display: none;
    }

    /* Bouton mobile apparaît */
    .layout-nav-mobile-btn {
        display: block;
    }

    /* Menu mobile visible quand Alpine l’ouvre */
    .layout-mobile-menu[x-show="mobileOpen"] {
        display: flex;
    }

    /* Navigation */
    .layout-nav {
        padding: 0.75rem 0.75rem;
    }

    /* Logo */
    .layout-nav-logo img {
        height: 28px;
    }
}
/* ============================================================
   11. HARMONISATION AVEC LES THÈMES
   ============================================================ */

/* ---------- Thème NEUTRE ---------- */
body[data-login-theme="neutre"] .layout-nav,
body[data-login-theme="neutre"] .layout-header {
    background: #ffffff;
    border-color: #e5e7eb;
}

/* ---------- Thème macOS ---------- */
body[data-login-theme="macos"] .layout-nav,
body[data-login-theme="macos"] .layout-header {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
    border-color: rgba(255,255,255,0.4);
}

/* ---------- Thème iOS 17 ---------- */
body[data-login-theme="ios17"] .layout-nav,
body[data-login-theme="ios17"] .layout-header {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(22px) saturate(180%);
    border-radius: 0.75rem;
}

/* ---------- Thème Material ---------- */
body[data-login-theme="material"] .layout-nav,
body[data-login-theme="material"] .layout-header {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-radius: 0.5rem;
}

/* ---------- Thème Mica ---------- */
body[data-login-theme="mica"] .layout-nav,
body[data-login-theme="mica"] .layout-header {
    background: rgba(255,255,255,0.60);
    backdrop-filter: blur(14px);
    border-radius: 0.5rem;
}

/* ---------- Thème Glass ---------- */
body[data-login-theme="glass"] .layout-nav,
body[data-login-theme="glass"] .layout-header {
    background: rgba(255,255,255,0.20);
    backdrop-filter: blur(30px);
    border-color: rgba(255,255,255,0.35);
    border-radius: 0.75rem;
}

/* ---------- Thème Minimal ---------- */
body[data-login-theme="minimal"] .layout-nav,
body[data-login-theme="minimal"] .layout-header {
    background: #ffffff;
    border-color: #d1d5db;
}


/* ============================================================
   12. OMBRES & TRANSITIONS PREMIUM
   ============================================================ */

.layout-nav,
.layout-header {
    transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.layout-nav {
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.layout-header {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.layout-main {
    transition: padding 0.25s ease;
}


/* ============================================================
   13. SPACING GLOBAL
   ============================================================ */

.layout-main > * + * {
    margin-top: 1.25rem;
}

.layout-header > * + * {
    margin-top: 0.75rem;
}


/* ============================================================
   14. AJUSTEMENTS TABLETTE (768px–1023px)
   ============================================================ */

@media (min-width: 768px) and (max-width: 1023px) {

    .layout-nav {
        padding: 0.75rem 1rem;
    }

    .layout-nav-links a {
        padding: 0.4rem 0.65rem;
        font-size: 0.9rem;
    }

    .layout-header {
        padding: 1.25rem 1rem;
    }

    .layout-main {
        padding: 1rem;
    }
}


/* ============================================================
   15. FINITIONS GLOBALES
   ============================================================ */

.layout-nav-links a,
.layout-mobile-menu a {
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.layout-nav-links a:hover,
.layout-mobile-menu a:hover {
    transform: translateY(-1px);
}

.layout-nav-mobile-btn {
    transition: opacity 0.25s ease, transform 0.2s ease;
}

.layout-nav-mobile-btn:hover {
    transform: scale(1.05);
}
