.ps-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.ps-main-area {
    flex: 1;
    min-width: 0; /* Évite les débordements Flexbox */
}

.ps-toolbar {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
}

.ps-input-new {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
}

.ps-btn-add {
    background-color: #27ae60;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.ps-container {
    position: relative;
    width: 100%;
    display: inline-block;
    user-select: none;
    overflow: hidden;
}

.ps-bg {
    width: 100%;
    height: auto;
    display: block;
}

/* Styles des blocs fluides et responsives */
.ps-item {
    position: absolute;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 2px;
    border-radius: 4px;
    border: 2px solid #2980b9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.is-visitor-user .ps-item {
    cursor: default;
}

.is-admin-user .ps-item {
    cursor: move;
}

.ps-item.ps-selected {
    border: 2px dashed #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

/* Le texte du bloc */
.ps-label {
    outline: none;
    color: #2c3e50;
    font-weight: bold;
    font-size: clamp(11px, 2vw + 6px, 17px);
    line-height: 1;  /* Modifié à 1 */
    text-align: center;
    opacity: 1 !important;
    word-break: break-word;
}

.is-admin-user .ps-label {
    cursor: text;
}

/* Poignée de redimensionnement responsive */
.ps-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #2980b9;
    right: 0;
    bottom: 0;
    cursor: se-resize;
    border-top-left-radius: 3px;
}

/* Sidebar du menu déporté */
.ps-sidebar {
    width: 280px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    height: fit-content;
    box-sizing: border-box;
}

.ps-sidebar h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.ps-no-selection {
    color: #7f8c8d;
    font-size: 13px;
    font-style: italic;
}

.ps-field {
    margin-bottom: 15px;
}

.ps-field label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ps-field input[type="text"],
.ps-field input[type="color"],
.ps-field input[type="range"] {
    width: 100%;
    box-sizing: border-box;
}

.ps-btn-delete {
    width: 100%;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.ps-btn-delete:hover {
    background-color: #c0392b;
}

/* RESPONSIVE DESIGN (MOBILES ET TABLETTES) */
@media screen and (max-width: 768px) {
    .ps-layout {
        flex-direction: column; /* Place le menu déporté sous le plan */
    }

    .ps-sidebar {
        width: 100%;
    }

    .ps-resize-handle {
        width: 14px;
        height: 14px; /* Plus grande zone tactile sur mobile */
    }
	
}