/* Cabine d'essayage — plein écran */

html.cabine-page,
body.cabine-body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #6090be;
}

.cabine-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    font-family: Verdana, Arial, sans-serif;
    color: #284555;
}

.cabine-top {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(180deg, #7eb8e8 0%, #5a9fd4 100%);
    border-bottom: 2px solid #3e7eb5;
    box-shadow: 0 2px 12px rgba(40, 69, 85, 0.2);
    z-index: 10;
}

.cabine-top h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-shadow: 1px 1px 0 #2a5578;
}

.cabine-top-meta {
    font-size: 10px;
    color: #e8f4fc;
    font-style: italic;
}

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

.cabine-link {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    color: #3e6891;
    background: #fff;
    border: 1px solid #9ebdd4;
}

.cabine-link:hover {
    background: #eef5fb;
    text-decoration: none;
    color: #3e6891;
}

.cabine-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(255, 244, 213, 0.35) 0%, transparent 55%),
        linear-gradient(180deg, #87b8e0 0%, #6090be 40%, #4a7fad 100%);
    overflow: hidden;
}

.cabine-mirror {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(92vw, 520px);
    height: min(72vh, 680px);
    background: linear-gradient(180deg, #fffaf0 0%, #fff4d6 50%, #f8e8c8 100%);
    border: 3px solid #e8c97a;
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 20px 60px rgba(40, 69, 85, 0.25);
}

.cabine-mirror::before {
    content: 'Cabine d\'essayage';
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a7b3c;
    z-index: 1;
    pointer-events: none;
}

.cabine-mirror.is-loading::after {
    content: '';
    position: absolute;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 3px solid #e8c97a;
    border-top-color: #6090be;
    border-radius: 50%;
    animation: cabine-spin 0.8s linear infinite;
}

.cabine-mirror.is-ready::after {
    display: none;
}

@keyframes cabine-spin {
    to { transform: rotate(360deg); }
}

.cabine-avatar-host {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-top: 24px;
}

.cabine-avatar-host ruffle-player,
.cabine-avatar-host #cabine-ruffle-player {
    display: block !important;
    margin: 0 auto;
    background: transparent !important;
}

.cabine-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 18%;
    background: linear-gradient(180deg, transparent, rgba(255, 244, 214, 0.15));
    pointer-events: none;
}

.cabine-panel {
    flex-shrink: 0;
    background: #fff4d5;
    border-top: 2px solid #e8c97a;
    padding: 12px 16px 16px;
    max-height: 38vh;
    overflow-y: auto;
    box-shadow: 0 -8px 24px rgba(40, 69, 85, 0.12);
}

.cabine-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cabine-preset {
    padding: 7px 14px;
    border: 1px solid #9ebdd4;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #e8f2fa 100%);
    color: #3e6891;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.cabine-preset:hover {
    background: #dceaf5;
}

.cabine-preset.active {
    border-color: #6090be;
    background: #c5dff5;
}

.cabine-cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.cabine-cat {
    display: grid;
    grid-template-columns: 1fr 36px 56px 36px;
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #c5d9e8;
    border-radius: 10px;
}

.cabine-cat-label {
    font-size: 11px;
    font-weight: 600;
    color: #284555;
}

.cabine-nav {
    width: 36px;
    height: 36px;
    border: 1px solid #9ebdd4;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #e8f2fa 100%);
    color: #3e6891;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cabine-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cabine-cat-val {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #3e6891;
}

.cabine-cat-pos {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: #6b879c;
}

.cabine-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.cabine-code {
    font-family: Consolas, monospace;
    font-size: 10px;
    color: #6b879c;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.cabine-status {
    font-size: 11px;
    font-weight: 600;
    color: #2d8a4e;
}

@media (max-width: 640px) {
    .cabine-mirror {
        width: 96vw;
        height: 58vh;
        border-radius: 14px;
    }

    .cabine-panel {
        max-height: 42vh;
    }

    .cabine-cats {
        grid-template-columns: 1fr;
    }
}