@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;600&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg:           #ffffff;
    --color-text:         #1a1a1a;
    --color-text-muted:   #888;
    --color-text-faint:   #bbb;
    --color-border:       rgba(0,0,0,0.08);
    --color-border-strong:rgba(0,0,0,0.15);
    --color-surface:      #f7f6f4;
    --color-gold:         #c8a96e;
    --font-sans:          'DM Sans', system-ui, sans-serif;
    --sidebar-width:      280px;
}

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   LAYOUT
   ============================================ */
.lqa-layout {
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
}

.lqa-main {
    flex: 1;
    min-width: 0;
    padding-bottom: 40px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.lqa-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    border-right: 0.5px solid var(--color-border);
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-bar .lqa-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

.lqa-logo-link { text-decoration: none; display: block; }

.lqa-logo {
    font-weight: 300;
    font-size: 20px;
    color: var(--color-text);
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.lqa-logo-image img {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}

.lqa-tagline {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    font-style: italic;
    margin-top: 6px;
}

/* NAV */
.lqa-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.lqa-nav-label {
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    padding: 0 10px;
    margin-bottom: 6px;
}

.lqa-nav a {
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 5px;
    display: block;
    letter-spacing: 0.01em;
    transition: background 0.15s, color 0.15s;
}

.lqa-nav a:hover { background: var(--color-surface); color: var(--color-text); }
.lqa-nav a.active { background: var(--color-surface); color: var(--color-text); font-weight: 400; }

.lqa-nav-section-title { font-weight: 400; color: var(--color-text) !important; font-size: 13px; }
.lqa-nav-section-header { color: var(--color-text) !important; }

.lqa-nav-divider { height: 0.5px; background: var(--color-border); margin: 10px 0; }

/* SIDEBAR BOTTOM */
.lqa-sidebar-bottom { margin-top: auto; }

.lqa-nav-socials {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.lqa-social-link {
    color: var(--color-text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.lqa-social-link:hover { color: var(--color-text); }

.lqa-lang { display: flex; gap: 10px; align-items: center; }

.lqa-lang span {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    cursor: pointer;
    transition: color 0.15s;
}

.lqa-lang span:hover,
.lqa-lang span.active { color: var(--color-text); }

.lqa-lang-sep { width: 0.5px; height: 11px; background: var(--color-border-strong); }

/* ============================================
   FOOTER
   ============================================ */
.lqa-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    padding: 10px 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 300;
    color: var(--color-text-faint);
    background: var(--color-bg);
    border-top: 0.5px solid var(--color-border);
    z-index: 10;
}

.lqa-footer-sep { color: var(--color-border-strong); }

.lqa-footer-email {
    color: var(--color-text-faint);
    text-decoration: none;
    transition: color 0.15s;
}
.lqa-footer-email:hover { color: var(--color-text); }

/* ============================================
   FILTER BAR
   ============================================ */
.lqa-filter-bar {
    display: flex;
    gap: 8px;
    padding: 24px 28px 0;
    flex-wrap: wrap;
}

.lqa-filter {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    border: 0.5px solid var(--color-border-strong);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
    font-weight: 300;
}
.lqa-filter:hover { border-color: var(--color-text-muted); color: var(--color-text); }
.lqa-filter.active { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }

/* DESCRIPTION DE CATÉGORIE */
.lqa-cat-description {
    display: none;
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 12px 28px 0;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* ============================================
   GRILLE PROJETS
   ============================================ */
.lqa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 16px 20px 24px;
}

.lqa-card {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 2px;
    background: var(--color-surface);
}

.lqa-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.lqa-card-media {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.lqa-card-media video,
.lqa-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lqa-card-placeholder { width: 100%; height: 100%; background: var(--color-surface); }

.lqa-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20,20,20,0);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 16px;
    transition: background 0.25s;
}

.lqa-card:hover .lqa-card-overlay { background: rgba(20,20,20,0.85); }

.lqa-card-title {
    font-size: 14px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s, transform 0.25s;
}

.lqa-card-meta {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s 0.05s, transform 0.2s 0.05s;
}

.lqa-card:hover .lqa-card-title,
.lqa-card:hover .lqa-card-meta { opacity: 1; transform: translateY(0); }

.lqa-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-gold);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}

.lqa-grid.is-loading { opacity: 0.5; pointer-events: none; transition: opacity 0.2s; }

/* ============================================
   PAGE PROJET
   ============================================ */
.lqa-project-page { min-height: 100vh; }

.lqa-project-body { padding: 24px 40px 56px; }

.lqa-back {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    transition: color 0.15s;
}
.lqa-back:hover { color: var(--color-text-muted); }
.lqa-back-arrow { font-size: 16px; }

.lqa-project-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 0.5px solid var(--color-border);
}

.lqa-project-title {
    font-weight: 300;
    font-size: 28px;
    color: var(--color-text);
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.lqa-project-cat {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-bg);
    background: var(--color-text);
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 6px;
}

.lqa-project-meta {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
}

.lqa-meta-item { text-align: right; }

.lqa-meta-label {
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: 3px;
}

.lqa-meta-value { font-size: 14px; color: var(--color-text); font-weight: 300; }

.lqa-project-section { margin-bottom: 24px; }

.lqa-section-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: 14px;
}

/* Description + équipe côte à côte */
.lqa-project-description-team {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 24px;
}

.lqa-project-description {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.lqa-project-description p { margin-bottom: 1em; }

.lqa-project-description,
.lqa-project-description * { font-family: var(--font-sans) !important; }

/* Lien client */
.lqa-client-link {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 0.5px solid var(--color-border-strong);
    transition: border-color 0.15s;
}
.lqa-client-link:hover { border-bottom-color: var(--color-text); }

/* ============================================
   GALERIE MÉDIAS
   ============================================ */
.lqa-project-gallery {
    display: grid;
    gap: 12px;
    align-items: start;
}

.lqa-gallery-cols-1 { grid-template-columns: 1fr; }
.lqa-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lqa-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.lqa-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }

.lqa-gallery-item {
    display: block;
    background: #ffffff;
    line-height: 0;
    font-size: 0;
    overflow: hidden;
    outline: none;
}

.lqa-gallery-item video,
.lqa-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: bottom;
    outline: none;
}

/* Galerie pleine largeur */
.lqa-project-gallery[style*="width:100%"] {
    width: calc(100% + 40px) !important;
    margin-left: -40px !important;
    margin-right: 0 !important;
}

/* ============================================
   BANNIÈRES
   ============================================ */
.lqa-banner {
    width: 80%;
    margin: 0 auto 24px;
}

.lqa-banner-media { width: 100%; display: block; }

/* ============================================
   ÉQUIPE
   ============================================ */
.lqa-team-grouped { display: flex; flex-direction: column; gap: 8px; }

.lqa-team-row-grouped {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.lqa-group-role {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text);
    min-width: 160px;
    padding: 8px 12px;
    border: 0.5px solid var(--color-border);
    border-radius: 6px;
    flex-shrink: 0;
}

.lqa-group-names { display: flex; flex-wrap: wrap; gap: 8px; }

.lqa-group-name {
    font-size: 12px;
    font-weight: 300;
    color: var(--color-text-muted);
    padding: 8px 12px;
    border: 0.5px solid var(--color-border);
    border-radius: 6px;
}

a.lqa-group-name-link {
    text-decoration: none;
    color: var(--color-text-muted);
    border-bottom: 0.5px solid var(--color-border-strong);
    padding: 8px 12px;
    border: 0.5px solid var(--color-border);
    border-radius: 6px;
    transition: color 0.15s;
}
a.lqa-group-name-link:hover { color: var(--color-text); }

/* ============================================
   PAGE STATIQUE
   ============================================ */
.lqa-static-page { padding: 56px 40px; max-width: 720px; }

.lqa-static-title {
    font-weight: 300;
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 32px;
}

/* ============================================
   PAGE STUDIO
   ============================================ */
.lqa-studio-page { padding: 0; width: 100%; }

.lqa-studio-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    padding: 48px 0;
}

.lqa-studio-col-left {
    padding: 0 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-right: 0.5px solid var(--color-border);
    outline: none;
}

.lqa-studio-col-right {
    padding: 0 48px;
    display: flex;
    align-items: stretch;
    outline: none;
}

.lqa-studio-col-left *, .lqa-studio-col-right * { outline: none; }

.lqa-studio-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: top;
}

.lqa-studio-title { font-size: 24px; font-weight: 300; color: var(--color-text); }

.lqa-studio-lead { font-size: 15px; font-weight: 300; line-height: 1.7; color: var(--color-text); }

.lqa-studio-section p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-text-muted);
    font-weight: 300;
    margin-bottom: 8px;
}

.lqa-studio-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.lqa-studio-tag {
    font-size: 12px;
    font-weight: 300;
    color: var(--color-text-muted);
    padding: 4px 14px;
    border: 0.5px solid var(--color-border-strong);
    border-radius: 20px;
}

/* ============================================
   PAGE CONTACT
   ============================================ */
.lqa-contact-page {
    display: grid;
    grid-template-columns: 1fr 2fr;
    min-height: calc(100vh - 32px);
}

.lqa-contact-photo-col {
    overflow: hidden;
    border-right: 0.5px solid var(--color-border);
}

.lqa-contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.lqa-contact-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    gap: 28px;
}

.lqa-contact-phrase {
    font-size: 22px;
    font-weight: 300;
    color: var(--color-text);
    line-height: 1.4;
    max-width: 360px;
}

.lqa-contact-email {
    font-size: 14px;
    font-weight: 300;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 0.5px solid var(--color-text);
    padding-bottom: 2px;
    width: fit-content;
    transition: opacity 0.15s;
}
.lqa-contact-email:hover { opacity: 0.5; }

.lqa-contact-socials { display: flex; gap: 20px; align-items: center; }

/* ============================================
   COMPACTER L'EN-TÊTE DES PROJETS
   ============================================ */
.lqa-project-meta { flex-direction: row; gap: 32px; align-items: flex-start; }

/* ============================================
   NAVIGATION — SECTIONS PLIABLES
   ============================================ */
.lqa-nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.15s;
}

.lqa-nav-section-header:hover { background: var(--color-surface); }

.lqa-nav-arrow {
    font-size: 14px;
    color: var(--color-text-faint);
    transition: transform 0.2s;
    display: inline-block;
}

.lqa-nav-section.is-open .lqa-nav-arrow { transform: rotate(90deg); }

.lqa-nav-project-list {
    display: none;
    flex-direction: column;
    padding-left: 10px;
}

.lqa-nav-section.is-open .lqa-nav-project-list { display: flex; }

.lqa-nav-project {
    font-size: 12px;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    letter-spacing: 0.01em;
}

.lqa-nav-project:hover { color: var(--color-text); background: var(--color-surface); }
.lqa-nav-project.active { color: var(--color-text); background: var(--color-surface); font-weight: 400; }

/* ============================================
   ADMIN — META BOXES
   ============================================ */
.lqa-meta-table { width: 100%; border-collapse: collapse; }
.lqa-meta-table th { text-align: left; padding: 8px 10px 8px 0; width: 180px; color: #555; font-weight: 400; vertical-align: top; }
.lqa-meta-table td { padding: 6px 0; }
.lqa-meta-table input[type="text"],
.lqa-meta-table input[type="number"],
.lqa-meta-table input[type="email"],
.lqa-meta-table select,
.lqa-meta-table textarea { width: 100%; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; }
.lqa-btn-add { background: #0073aa; color: #fff; border: none; border-radius: 4px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.lqa-btn-add:hover { background: #005a87; }
.lqa-btn-remove { background: #dc3545; color: #fff; border: none; border-radius: 4px; padding: 5px 10px; cursor: pointer; }
.lqa-team-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.lqa-gallery-preview { position: relative; display: inline-block; }

/* Cacher le header mobile sur desktop */
.lqa-mobile-sticky { display: none; }

/* ============================================
   MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

    /* Cache la sidebar */
    .lqa-sidebar { display: none; }

    /* Espace en haut pour le header fixe */
    .lqa-main { padding-top: 96px; padding-bottom: 56px; }

    /* Bloc sticky = logo + filter-bar */
    .lqa-mobile-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: var(--color-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 0 0;
    }

    .admin-bar .lqa-mobile-sticky { top: 46px; }

    .lqa-mobile-logo-link {
        display: flex;
        justify-content: center;
        text-decoration: none;
        margin-bottom: 8px;
    }

    .lqa-mobile-logo-img { height: 36px; width: auto; display: block; }

    .lqa-mobile-logo-txt {
        font-size: 17px;
        font-weight: 300;
        color: var(--color-text);
        letter-spacing: 0.02em;
    }

    /* Cacher la filter-bar originale sur mobile */
    .lqa-filter-bar { display: none; }

    /* Nouvelle filter-bar dans le bloc sticky */
    .lqa-mobile-filterbar {
        display: flex;
        gap: 6px;
        padding: 0 16px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .lqa-mobile-filterbar::-webkit-scrollbar { display: none; }

    .lqa-mobile-filterbar .lqa-filter {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 10px;
        padding: 5px 12px;
    }

    /* Grille 1 colonne */
    .lqa-grid {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 2px 0;
    }

    .lqa-card { aspect-ratio: 16/9; }

    /* Footer */
    .lqa-footer { left: 0; padding: 10px 16px; font-size: 10px; }

    /* Projet */
    .lqa-project-body { padding: 16px 20px 40px; }
    .lqa-project-header { grid-template-columns: 1fr; gap: 12px; }
    .lqa-project-meta { flex-direction: row; gap: 20px; }
    .lqa-meta-item { text-align: left; }
    .lqa-project-title { font-size: 22px; }
    .lqa-project-description-team { grid-template-columns: 1fr; gap: 24px; }
    .lqa-gallery-cols-2,
    .lqa-gallery-cols-3,
    .lqa-gallery-cols-4 { grid-template-columns: 1fr; }

    /* Studio */
    .lqa-studio-cols { grid-template-columns: 1fr; padding: 0; }
    .lqa-studio-col-right { display: none; }
    .lqa-studio-col-left { padding: 24px 20px; border-right: none; gap: 24px; }
    .lqa-studio-section { padding-bottom: 24px; border-bottom: 0.5px solid var(--color-border); }
    .lqa-studio-section:last-child { border-bottom: none; padding-bottom: 0; }

    /* Contact */
    .lqa-contact-page { grid-template-columns: 1fr; }
    .lqa-contact-photo-col { display: none; }
    .lqa-contact-text-col { padding: 40px 28px; min-height: calc(100vh - 96px); }
    .lqa-contact-phrase { font-size: 20px; max-width: 100%; }
}

/* SÉLECTEUR DE LANGUE — liens Polylang */
.lqa-lang a {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.lqa-lang a:hover,
.lqa-lang a.active { color: var(--color-text); }
