/* =============================================================================
 * Room View Art Gallery — CSS (Phase 8 L5.3.3)
 * -----------------------------------------------------------------------------
 * Toutes les classes sont préfixées `arv-` (Art-gallery Room View) pour
 * isoler totalement ce module du module Room View galeries classiques
 * (qui utilise le préfixe `rv-`).
 *
 * Palette Art Gallery :
 *   - Fond modal       #fafaf8
 *   - Surface          #ffffff
 *   - Accent beige     #f0ede5
 *   - Texte principal  #1a1a1a
 *   - Texte secondaire #555
 *   - Texte tertiaire  #888
 *   - Bordure          #d0d0c8
 *   - Bordure légère   #e5e5e0
 *
 * Polices : Playfair Display (titres œuvre uniquement), Inter (reste).
 * ============================================================================= */


/* =============================================================================
 * RESET + ROOT
 * ============================================================================= */

.arv-modal,
.arv-modal * {
    box-sizing: border-box;
}

.arv-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.arv-modal[hidden] {
    display: none !important;
}

.arv-modal.arv-modal--open {
    opacity: 1;
}

/* Container principal — la "boîte" qui contient header, body, footer.
   Format panoramique pour donner un maximum de largeur au viewport central
   où s'affiche le mur. Sur écrans larges, la modal occupe ~96% de la
   largeur disponible. */
.arv-modal__container {
    background: #fafaf8;
    border-radius: 8px;
    width: 100%;
    max-width: 96vw;
    height: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
    transform: scale(0.98);
    transition: transform 0.2s ease-out;
}

.arv-modal.arv-modal--open .arv-modal__container {
    transform: scale(1);
}


/* =============================================================================
 * HEADER
 * ============================================================================= */

.arv-modal__header {
    flex: 0 0 auto;
    background: #fff;
    border-bottom: 1px solid #e5e5e0;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.arv-modal__header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.arv-modal__header-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0ede5;
    border: 1px solid #d0d0c8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
}

.arv-modal__header-icon svg {
    width: 20px;
    height: 20px;
}

.arv-modal__header-text {
    min-width: 0;
}

.arv-modal__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arv-modal__subtitle {
    font-size: 0.75rem;
    color: #888;
    margin: 2px 0 0;
    line-height: 1.4;
}

.arv-modal__close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #d0d0c8;
    border-radius: 4px;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.arv-modal__close:hover {
    background: #f0ede5;
    border-color: #1a1a1a;
}

.arv-modal__close svg {
    width: 16px;
    height: 16px;
}


/* =============================================================================
 * BODY — Grille 3 colonnes
 * ============================================================================= */

.arv-modal__body {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 300px;
    overflow: hidden;
    min-height: 0;
}


/* =============================================================================
 * SIDEBARS (colonnes gauche & droite)
 * ============================================================================= */

.arv-modal__sidebar {
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.arv-modal__sidebar--left {
    border-right: 1px solid #e5e5e0;
}

.arv-modal__sidebar--right {
    border-left: 1px solid #e5e5e0;
    padding: 16px;
    overflow-y: auto;
}

.arv-modal__section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 12px;
}


/* =============================================================================
 * TABS (colonne gauche)
 * ============================================================================= */

.arv-modal__tabs {
    flex: 0 0 auto;
    display: flex;
    border-bottom: 1px solid #e5e5e0;
    background: #fff;
}

.arv-modal__tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.15s, background 0.15s;
    border-bottom: 2px solid transparent;
}

.arv-modal__tab svg {
    width: 18px;
    height: 18px;
}

.arv-modal__tab:hover:not(.arv-modal__tab--active) {
    color: #1a1a1a;
    background: #faf9f5;
}

.arv-modal__tab--active {
    color: #1a1a1a;
    background: #f0ede5;
    border-bottom-color: #1a1a1a;
    font-weight: 600;
}

.arv-modal__panel {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px;
    min-height: 0;
}

.arv-modal__panel[hidden] {
    display: none;
}


/* =============================================================================
 * DÉCORS (panneau gauche, onglet Décors)
 * ============================================================================= */

.arv-modal__decors-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.arv-modal__decors-category {
    /* généré par le JS — wrapper d'une catégorie */
}

.arv-modal__decors-category-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 8px;
}

.arv-modal__decors-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
}

.arv-modal__decor {
    aspect-ratio: 4 / 3;
    background: #ebe9e4;
    border-radius: 3px;
    border: 1px solid #d0d0c8;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    transition: border-color 0.15s, transform 0.1s;
    position: relative;
}

.arv-modal__decor:hover {
    border-color: #1a1a1a;
}

.arv-modal__decor--active {
    border-color: #1a1a1a;
    border-width: 2px;
}

.arv-modal__decor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.arv-modal__decor-label {
    position: absolute;
    inset: auto 0 0 0;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.625rem;
    padding: 3px 6px;
    line-height: 1.2;
    text-align: center;
}


/* =============================================================================
 * UPLOAD MUR PERSO (panneau gauche, onglet Mon mur)
 * ============================================================================= */

.arv-modal__upload {
    text-align: center;
    padding: 24px 16px;
    border: 2px dashed #d0d0c8;
    border-radius: 6px;
    background: #fafaf8;
}

.arv-modal__upload-icon {
    width: 32px;
    height: 32px;
    color: #888;
    margin: 0 auto 12px;
    display: block;
}

.arv-modal__upload-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.arv-modal__upload-hint {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 14px;
}

.arv-modal__upload-button {
    display: inline-block;
    padding: 8px 18px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.arv-modal__upload-button:hover {
    background: #000;
    transform: translateY(-1px);
}

.arv-modal__upload-button:active {
    transform: translateY(0);
}

.arv-modal__upload-meta {
    font-size: 0.6875rem;
    color: #888;
    margin: 12px 0 0;
}

.arv-modal__upload-progress {
    margin-top: 16px;
    text-align: center;
}

.arv-modal__upload-progress p {
    font-size: 0.75rem;
    color: #666;
    margin: 8px 0 0;
}

.arv-modal__progress-track {
    background: #e5e5e0;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.arv-modal__progress-fill {
    background: #1a1a1a;
    height: 100%;
    width: 0%;
    transition: width 0.2s ease-out;
    border-radius: 999px;
}

.arv-modal__upload-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 4px;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.arv-modal__walls {
    margin-top: 24px;
    border-top: 1px solid #e5e5e0;
    padding-top: 16px;
}

.arv-modal__walls-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
}

.arv-modal__wall {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #ebe9e4;
    border-radius: 3px;
    border: 1px solid #d0d0c8;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s;
}

.arv-modal__wall:hover {
    border-color: #1a1a1a;
}

.arv-modal__wall--active {
    border-color: #1a1a1a;
    border-width: 2px;
}

.arv-modal__wall img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.arv-modal__wall-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
    flex-shrink: 0;
}

.arv-modal__wall-delete:hover {
    background: rgba(170, 0, 0, 0.85);
}

.arv-modal__wall-delete svg {
    width: 12px;
    height: 12px;
}

.arv-modal__wall-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.arv-modal__wall-badge--needs-calib {
    background: rgba(184, 134, 11, 0.92);
    color: #fff;
}


/* =============================================================================
 * VIEWPORT (colonne centre)
 * ============================================================================= */

.arv-modal__viewport {
    position: relative;
    background: #1a1a1a;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.arv-modal__scene-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    color: #888;
}

.arv-modal__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    color: #888;
}

.arv-modal__loading[hidden] {
    display: none;
}

.arv-modal__scene-loading p,
.arv-modal__loading p {
    font-size: 0.8125rem;
    margin: 0;
}

.arv-modal__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e5e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: arv-spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

/* Scène = décor + œuvre placée */
.arv-modal__scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.arv-modal__scene[hidden] {
    display: none;
}

.arv-modal__scene-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

/* Œuvre placée — drag & drop via transform: translate */
.arv-modal__artwork {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    user-select: none;
    transition: width 0.25s ease-out, height 0.25s ease-out;
    will-change: transform;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.arv-modal__artwork:active {
    cursor: grabbing;
}

.arv-modal__artwork-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* Passe-partout (overlay autour de l'image) */
.arv-modal__artwork-mat {
    position: absolute;
    inset: 0;
    background: #f5f5f0;
    z-index: 0;
}

/* Cadre (overlay extérieur) */
.arv-modal__artwork-frame {
    position: absolute;
    inset: 0;
    border-style: solid;
    border-color: #1a1a1a;
    border-width: 0;
    pointer-events: none;
    z-index: 2;
    /* `border-width` est défini en inline-style par le JS selon le cadre choisi */
}

/* HUD viewport */
.arv-modal__hud {
    position: absolute;
    inset: auto 0 0 0;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}

.arv-modal__hud[hidden] {
    display: none;
}

.arv-modal__hud-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.arv-modal__hud-hint {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.6875rem;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

.arv-modal__hud-hint svg {
    width: 14px;
    height: 14px;
}


/* =============================================================================
 * CALIBRATION (overlay viewport — apparait quand mur perso non calibré)
 * ============================================================================= */

.arv-modal__calibrate-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: crosshair;
}

.arv-modal__calibrate-overlay[hidden] {
    display: none;
}

.arv-modal__calibrate-point {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    transform: translate(-50%, -50%);
    pointer-events: none;
    flex-shrink: 0;
}

.arv-modal__calibrate-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.arv-modal__calibrate-panel {
    position: absolute;
    inset: 10px auto auto 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d0d0c8;
    border-radius: 6px;
    padding: 8px 14px;
    z-index: 11;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.arv-modal__calibrate-panel[hidden] {
    display: none;
}

.arv-modal__calibrate-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.arv-modal__calibrate-step {
    font-size: 0.8125rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 10px;
}

.arv-modal__calibrate-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.arv-modal__calibrate-input-row[hidden] {
    display: none;
}

.arv-modal__calibrate-input-row label {
    font-size: 0.8125rem;
    color: #1a1a1a;
    font-weight: 500;
}

.arv-modal__calibrate-input-row input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #d0d0c8;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8125rem;
    background: #fff;
    color: #1a1a1a;
}

.arv-modal__calibrate-input-row input[type="number"]:focus {
    outline: none;
    border-color: #1a1a1a;
}

.arv-modal__calibrate-input-row span {
    font-size: 0.8125rem;
    color: #666;
}


/* =============================================================================
 * VARIANTES (colonne droite)
 * ============================================================================= */

.arv-modal__variants {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arv-modal__variants[hidden] {
    display: none;
}

.arv-modal__variant {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #d0d0c8;
    border-radius: 4px;
    padding: 12px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    transition: all 0.15s;
}

.arv-modal__variant:hover:not(:disabled) {
    border-color: #1a1a1a;
    background: #fdfcf9;
}

.arv-modal__variant--active {
    border-color: #1a1a1a;
    border-width: 2px;
    background: #f0ede5;
    padding: 11px;
}

.arv-modal__variant--sold-out {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f4f0;
}

.arv-modal__variant--sold-out:hover {
    border-color: #d0d0c8;
    background: #f5f4f0;
}

.arv-modal__variant-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2px;
    line-height: 1.3;
}

.arv-modal__variant-sub {
    font-size: 0.6875rem;
    color: #666;
    margin: 0 0 6px;
    line-height: 1.4;
}

.arv-modal__variant-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.arv-modal__variant-stock {
    font-size: 0.625rem;
    color: #888;
}

.arv-modal__variant-stock--sold-out {
    color: #aa0000;
    font-weight: 600;
}

.arv-modal__variant-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}


/* =============================================================================
 * FOOTER
 * ============================================================================= */

.arv-modal__footer {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #e5e5e0;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.arv-modal__footer-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.arv-modal__footer-hint svg {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    color: #888;
}

.arv-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.arv-modal__btn--primary {
    background: #1a1a1a;
    color: #fff;
}

.arv-modal__btn--primary:hover:not(:disabled) {
    background: #000;
    transform: translateY(-1px);
}

.arv-modal__btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

.arv-modal__btn--primary:disabled {
    background: #888;
    cursor: not-allowed;
    opacity: 0.7;
}


/* =============================================================================
 * TOAST notifications
 * ============================================================================= */

.arv-modal__toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: arv-toast-in 0.25s ease-out;
}

.arv-modal__toast[hidden] {
    display: none;
}

.arv-modal__toast svg {
    width: 16px;
    height: 16px;
}

.arv-modal__toast--error {
    background: #991b1b;
}

@keyframes arv-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, 12px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* =============================================================================
 * EMPTY STATES
 * ============================================================================= */

.arv-modal__empty {
    padding: 32px 16px;
    text-align: center;
}

.arv-modal__empty[hidden] {
    display: none;
}

.arv-modal__empty p {
    font-size: 0.8125rem;
    color: #888;
    line-height: 1.5;
    margin: 0;
}


/* =============================================================================
 * RESPONSIVE
 * -----------------------------------------------------------------------------
 * Breakpoints :
 *   - > 1024px : desktop (3 colonnes 280 / 1fr / 300)
 *   - 768-1024 : tablette (passage à 2 colonnes, sidebar gauche au-dessus)
 *   - < 768px  : mobile (tout empilé verticalement)
 * ============================================================================= */

@media (max-width: 1024px) {
    .arv-modal {
        padding: 12px;
    }

    .arv-modal__container {
        max-height: 96vh;
    }

    .arv-modal__body {
        grid-template-columns: 240px minmax(0, 1fr) 260px;
    }
}

@media (max-width: 860px) {
    .arv-modal {
        padding: 0;
    }

    .arv-modal__container {
        max-height: 100vh;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .arv-modal__header {
        padding: 12px 16px;
    }

    .arv-modal__title {
        font-size: 1rem;
    }

    .arv-modal__close span {
        display: none;
    }

    .arv-modal__close {
        padding: 8px;
    }

    /* Body : empilage vertical sur mobile/tablette */
    .arv-modal__body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 1fr auto;
        overflow-y: auto;
    }

    .arv-modal__sidebar--left {
        order: 3;
        border-right: none;
        border-top: 1px solid #e5e5e0;
        max-height: 240px;
    }

    .arv-modal__viewport {
        order: 1;
        min-height: 320px;
        aspect-ratio: 4 / 3;
    }

    .arv-modal__sidebar--right {
        order: 2;
        border-left: none;
        border-bottom: 1px solid #e5e5e0;
        padding: 12px 16px;
        max-height: 220px;
        overflow-y: auto;
    }

    .arv-modal__variants {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }

    .arv-modal__variant {
        flex: 0 0 200px;
        min-width: min(200px, 100%);
    }

    .arv-modal__footer {
        padding: 10px 16px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .arv-modal__footer-hint {
        font-size: 0.6875rem;
        justify-content: center;
        text-align: center;
    }

    .arv-modal__btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .arv-modal__title {
        font-size: 0.875rem;
    }

    .arv-modal__subtitle {
        display: none;
    }

    .arv-modal__header-icon {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
    }

    .arv-modal__header-icon svg {
        width: 16px;
        height: 16px;
    }

    .arv-modal__variant {
        flex: 0 0 180px;
        min-width: min(180px, 100%);
    }

    .arv-modal__decors-grid,
    .arv-modal__walls-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    }
}


/* =============================================================================
 * SCROLLBARS (cohérence visuelle)
 * ============================================================================= */

.arv-modal__panel::-webkit-scrollbar,
.arv-modal__sidebar--right::-webkit-scrollbar,
.arv-modal__variants::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.arv-modal__panel::-webkit-scrollbar-thumb,
.arv-modal__sidebar--right::-webkit-scrollbar-thumb,
.arv-modal__variants::-webkit-scrollbar-thumb {
    background: #d0d0c8;
    border-radius: 3px;
}

.arv-modal__panel::-webkit-scrollbar-thumb:hover,
.arv-modal__sidebar--right::-webkit-scrollbar-thumb:hover,
.arv-modal__variants::-webkit-scrollbar-thumb:hover {
    background: #1a1a1a;
}

.arv-modal__panel::-webkit-scrollbar-track,
.arv-modal__sidebar--right::-webkit-scrollbar-track,
.arv-modal__variants::-webkit-scrollbar-track {
    background: transparent;
}


/* =============================================================================
 * UTILITIES
 * ============================================================================= */

/* Force le scroll vertical sur le body pendant que la modal est ouverte */
body.arv-modal-open {
    overflow: hidden;
}
