* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --couleur-accent: #534AB7;
    --couleur-light: #AFA9EC;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F5F4FE;
    color: #1a1a2e;
    min-height: 100vh;
    padding-bottom: 80px
}

.header {
    padding: 40px 20px
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px
}

.logo-mark {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px
}

.logo-mark img {
}

.logo-title {
    font-size: 25px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #1a1a2e
}

.logo-title span {
    color: var(--couleur-accent);
}

.logo-acronym {
    font-size: 14px;
    color: #666;
    margin-top: 3px;
    line-height: 1.4
}

.logo-acronym b {
    color: var(--couleur-accent);
    font-weight: 500
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px
}

.wifi-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    background: #F5F4FE;
    border: 1px solid #E8E7FB;
    border-radius: 8px;
    padding: 4px 10px
}

.wifi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1D9E75
}

.wifi-dot.offline {
    background: #E24B4A
}

.export-btn {
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px
}

.export-btn:hover {
    border-color: #7F77DD;
    color: var(--couleur-accent)
}

.nav {
    display: flex;
    border-bottom: 1px solid #E8E7FB;
    border-radius: 10px;
}

.nav-container {
    padding: 0 20px;
}

.nav-btn {
    font-size: 13px;
    color: #666;
    padding: 10px 25px 9px;
    border: none;
    background: white;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
    flex: 1;
    justify-content: center;
}

.nav-btn:first-child {
    border-radius: 10px 0px 0px 10px;
}

.nav-btn:last-child {
    border-radius: 0px 10px 10px 0px;
}

.nav-btn.active {
    color: var(--couleur-accent);
    border-bottom-color: var(--couleur-accent);
    font-weight: 500
}

.content {
    padding: 16px 20px
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #E8E7FB
}

.stat-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px
}

.stat-value {
    font-size: 20px;
    font-weight: 500
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #E8E7FB;
    border-radius: 8px;
    padding: 0 12px
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    font-size: 13px;
    padding: 8px 0;
    outline: none;
    color: #1a1a2e
}

.search-bar input::placeholder {
    color: #aaa
}

.search-icon {
    color: #aaa;
    font-size: 15px
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap
}

.filter-btn {
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: none;
    cursor: pointer;
    color: #666;
    transition: all 0.12s
}

.filter-btn.active {
    background: #EEEDFE;
    border-color: var(--couleur-light);
    color: var(--couleur-accent)
}

.view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden
}

.view-btn {
    width: 28px;
    height: 26px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: all 0.12s
}

.view-btn.active {
    background: #EEEDFE;
    color: var(--couleur-accent)
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    background: var(--couleur-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-rfid {
	position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.upload-btn:hover {
    background: #3C3489
}

.album-list {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.album-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid #E8E7FB;
    border-radius: 8px;
    background: #fff;
    cursor: pointer
}

.album-row:hover {
    border-color: var(--couleur-light);
    background: #FAFAFE
}

.album-row.playing {
    border-color: var(--couleur-accent);
    background: #EEEDFE
}

.album-num {
    font-size: 11px;
    color: #aaa;
    min-width: 20px;
    text-align: right
}

.album-cover {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #E8E7FB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #F5F4FE
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.album-info {
    flex: 1;
    min-width: 0
}

.album-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.album-sub {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap
}

.collection-tag {
    font-size: 11px;
    padding: 0 5px;
    border-radius: 10px;
    background: #EEEDFE;
    color: var(--couleur-accent);
    border: none;
    cursor: pointer;
    line-height: 1.6
}

.collection-tag:hover {
    background: #CECBF6
}

.album-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0
}

.badge-music {
    background: #EEEDFE;
    color: var(--couleur-accent)
}

.badge-story {
    background: #E1F5EE;
    color: #0F6E56
}

.badge-mixed {
    background: #FAEEDA;
    color: #854F0B
}

.icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #E8E7FB;
    background: none;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center
}

.icon-btn:hover {
    border-color: var(--couleur-light);
    color: var(--couleur-accent);
    background: #EEEDFE
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px
}

.album-card {
    border: 1px solid #E8E7FB;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.12s
}

.album-card:hover {
    border-color: var(--couleur-light)
}

.album-card.playing {
    border-color: var(--couleur-accent);
    box-shadow: 0 0 0 2px #EEEDFE
}

.album-card-cover {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: relative;
    overflow: hidden;
    background: #F5F4FE
}

.album-card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.album-card-cover-emoji {
    position: relative;
    z-index: 1
}

.card-num {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 2
}

.playing-indicator {
    position: absolute;
    inset: 0;
    background: rgba(83, 74, 183, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    font-size: 28px
}

.album-card-body {
    padding: 8px 10px 10px
}

.album-card-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 3px
}

.album-card-sub {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px
}

.album-card-body .collection-tag {
    font-size: 10px;
    padding: 0 5px;
    display: inline-block;
    margin-bottom: 3px
}

.panel {
    display: none
}

.panel.visible {
    display: block
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: #666;
    font-size: 13px
}

.loading {
    text-align: center;
    padding: 32px;
    color: #666;
    font-size: 13px
}

.col-bar {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #EEEDFE;
    border-radius: 8px;
    border: 1px solid var(--couleur-light)
}

.col-bar.visible {
    display: flex
}

.col-bar-label {
    font-size: 12px;
    color: var(--couleur-accent);
    flex: 1
}

.col-bar-clear {
    border: none;
    background: none;
    cursor: pointer;
    color: #7F77DD;
    font-size: 12px
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px
}

.badge-card {
    border: 1px solid #E8E7FB;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.badge-card:hover {
    border-color: var(--couleur-light)
}

.badge-uid {
    font-size: 10px;
    color: #aaa;
    font-family: monospace
}

.badge-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3
}

.badge-folder {
    font-size: 11px;
    color: var(--couleur-accent)
}

.add-badge-btn {
    border: 1px dashed #ddd;
    border-radius: 12px;
    background: none;
    cursor: pointer;
    color: #666;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    font-size: 12px
}

.add-badge-btn:hover {
    border-color: #7F77DD;
    color: var(--couleur-accent)
}

.sync-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid #E8E7FB;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 8px
}

.sync-info {
    display: flex;
    align-items: center;
    gap: 10px
}

.sync-icon {
    font-size: 20px
}

.sync-title {
    font-size: 13px;
    font-weight: 500
}

.sync-sub {
    font-size: 11px;
    color: #666
}

.pill {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px
}

.pill-soon {
    background: #FAEEDA;
    color: #854F0B
}

.pill-ok {
    background: #EEEDFE;
    color: var(--couleur-accent)
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto
}

.modal {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ddd;
    width: 380px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #E8E7FB;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1
}

.modal-title {
    font-size: 14px;
    font-weight: 500
}

.modal-close {
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    border-radius: 6px;
    font-size: 16px
}

.modal-body {
    padding: 14px 16px
}

.cover-section {
    margin-bottom: 14px
}

.cover-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px
}

.cover-preview {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 1px solid #E8E7FB;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: #F5F4FE;
    flex-shrink: 0
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.cover-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1
}

.cover-btn {
    font-size: 11px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    transition: all 0.12s
}

.cover-btn:hover {
    border-color: #7F77DD;
    color: var(--couleur-accent)
}

.cover-url-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px
}

.cover-url-input {
    flex: 1;
    font-size: 11px;
    border-radius: 6px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    color: #1a1a2e;
    outline: none
}

.cover-url-input:focus {
    border-color: #7F77DD
}

.cover-url-btn {
    font-size: 11px;
    padding: 5px 10px;
    background: var(--couleur-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap
}

.itunes-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px
}

.itunes-result {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.12s
}

.itunes-result:hover {
    border-color: var(--couleur-light)
}

.itunes-result.selected {
    border-color: var(--couleur-accent)
}

.itunes-result img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block
}

.itunes-result-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #E1F5EE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px
}

.itunes-result-name {
    font-size: 9px;
    color: #666;
    padding: 3px 4px;
    text-align: center;
    line-height: 1.2;
    background: #fff
}

.itunes-msg {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 12px
}

.field {
    margin-bottom: 10px
}

.field label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 4px
}

.field input,
.field select {
    width: 100%;
    font-size: 13px;
    border-radius: 8px;
    padding: 7px 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #1a1a2e;
    outline: none
}

.field input:focus,
.field select:focus {
    border-color: #7F77DD
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px 14px;
    border-top: 1px solid #E8E7FB;
    position: sticky;
    bottom: 0;
    background: #fff
}

.btn-cancel {
    font-size: 13px;
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    color: #666
}

.btn-save {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    background: var(--couleur-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer
}

.badge-write-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    background: #F5F4FE;
    border-radius: 8px;
    font-size: 12px;
    color: var(--couleur-accent)
}

.badge-write-row span {
    flex: 1
}

.badge-write-btn {
    font-size: 12px;
    padding: 5px 12px;
    background: var(--couleur-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer
}

.play-modal-cover {
    width: 100%;
    aspect-ratio: 1;
    max-height: 180px;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #F5F4FE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    overflow: hidden
}

.play-modal-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.play-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px
}

.play-modal-sub {
    font-size: 12px;
    color: #666;
    margin-bottom: 14px
}

.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px
}

.mode-btn {
    padding: 10px 8px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.12s
}

.mode-btn:hover {
    border-color: var(--couleur-light);
    background: #F5F4FE
}

.mode-btn.selected {
    border-color: var(--couleur-accent);
    background: #EEEDFE
}

.mode-btn-icon {
    font-size: 20px;
    margin-bottom: 4px
}

.mode-btn-label {
    font-size: 11px;
    font-weight: 500;
    color: #1a1a2e
}

.mode-btn-desc {
    font-size: 10px;
    color: #666;
    margin-top: 2px
}

.btn-launch {
    width: 100%;
    padding: 12px;
    background: var(--couleur-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px
}

.btn-launch:hover {
    background: #3C3489
}

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #E8E7FB;
    padding: 10px 20px;
    z-index: 150;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08)
}

.player-bar.visible {
    display: flex
}

.player-cover {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    background: #F5F4FE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.player-info {
    flex: 1;
    min-width: 0
}

.player-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.player-meta {
    font-size: 10px;
    color: #aaa;
    margin-top: 1px
}

.player-status {
    font-size: 11px;
    color: #666;
    margin-top: 1px
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 4px
}

.ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--couleur-accent);
    transition: background 0.1s
}

.ctrl-btn:hover {
    background: #EEEDFE
}

.ctrl-btn.play-pause {
    width: 42px;
    height: 42px;
    background: var(--couleur-accent);
    color: #fff;
    font-size: 20px
}

.ctrl-btn.play-pause:hover {
    background: #3C3489
}

.volume-row {
    display: flex;
    align-items: center;
    gap: 6px
}

.vol-icon {
    font-size: 14px;
    color: #666
}

.vol-slider {
    width: 80px;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #E8E7FB;
    outline: none;
    cursor: pointer
}

.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--couleur-accent);
    cursor: pointer
}

.vol-val {
    font-size: 11px;
    color: #aaa;
    min-width: 18px;
    text-align: right
}

.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 20px;
    font-size: 12px;
    color: #fff;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.2s;
    z-index: 200
}

.status-bar.visible {
    transform: translateY(0)
}

.status-bar.success {
    background: #1D9E75
}

.status-bar.error {
    background: #E24B4A
}


/*  Page LOGIN  */

.wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.card {
    background: #fff;
    border: 1px solid #E8E7FB;
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(83, 74, 183, 0.06)
}

.card-icon {
    margin-bottom: 20px
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 6px
}

.card-desc {
    font-size: 13px;
    color: #999;
    margin: 0 0 28px
}

.field {
    text-align: left;
    margin-bottom: 16px
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #666;
    margin-bottom: 6px
}

.field input {
    width: 100%;
    border: 1.5px solid #E8E7FB;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 16px;
    outline: none;
    background: #F5F4FE;
    transition: border-color .15s, box-shadow .15s;
    letter-spacing: .1em
}

.field input:focus {
    border-color: var(--couleur-accent);
    box-shadow: 0 0 0 3px rgba(83, 74, 183, .1);
    background: #fff
}

.erreur {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    margin-bottom: 14px;
    text-align: left
}

.btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: var(--couleur-accent);
    color: #fff;
    cursor: pointer;
    margin-top: 4px;
    transition: background .12s
}

.btn:hover {
    background: #3C3489
}

@media(max-width:480px) {
    .card {
        padding: 28px 24px
    }
}
/* ── Responsive & Desktop max-width ─────────────────────────────────────────── */

/* Desktop : conteneur centré avec max-width */
@media (min-width: 768px) {
    body > .header,
    body > .nav,
    body > .nav-container,
    body > .content {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .header {
        max-width: 100%;
    }

    .header-top {
        max-width: 1200px;
        margin: 0 auto;
    }

    .player-bar {
        max-width: 1200px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 14px 14px 0 0;
        border-left: 1px solid #E8E7FB;
        border-right: 1px solid #E8E7FB;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .header {
        padding: 12px 16px;
    }

    .header-top {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    /* Masquer export JSON sur mobile */
    .export-btn {
        display: none;
    }

    .wifi-badge {
        flex: 1;
        justify-content: center;
    }

    /* Onglets : icône + texte à la ligne */
    .nav {
        padding: 0;
    }

    .nav-btn {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 4px;
        font-size: 10px;
        text-align: center;
    }

    /* Stats : 2 colonnes */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Volume masqué */
    .volume-row {
        display: none;
    }

    .player-bar {
        padding: 8px 12px;
        gap: 8px;
    }

    /* Onglet badges centré */
    #panel-badges > div {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    /* Sync rows en colonne */
    .sync-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sync-row > .upload-btn,
    .sync-row > button {
        align-self: stretch;
        justify-content: center;
    }

    /* Modal : bottom sheet */
    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 14px 14px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .modal-backdrop {
        align-items: flex-end;
    }

    /* Toolbar */
    .toolbar {
        flex-wrap: wrap;
    }
}
