/* Style pour l'outil de recadrage */
.wprg-cropper-container {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.wprg-cropper-preview {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wprg-cropper-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wprg-no-image {
    color: #999;
    font-size: 14px;
    text-align: center;
}

.wprg-cropper-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wprg-cropper-dimensions {
    margin-top: 10px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    color: #1976d2;
    text-align: center;
}

/* Zone de recadrage */
#wprg-crop-area {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.wprg-crop-wrapper {
    position: relative;
    max-height: 300px;
    overflow: hidden;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #000;
    cursor: default;
    user-select: none;
}

.wprg-crop-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* Overlay de recadrage */
.wprg-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Zone de sélection */
.wprg-crop-selection {
    position: absolute;
    border: 2px solid #e1306c;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
    display: none;
    z-index: 10;
}

/* Poignées de redimensionnement */
.wprg-crop-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border: 2px solid #e1306c;
    border-radius: 50%;
    z-index: 11;
}

.wprg-crop-handle.nw {
    top: -5px;
    left: -5px;
    cursor: nw-resize;
}

.wprg-crop-handle.ne {
    top: -5px;
    right: -5px;
    cursor: ne-resize;
}

.wprg-crop-handle.sw {
    bottom: -5px;
    left: -5px;
    cursor: sw-resize;
}

.wprg-crop-handle.se {
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
}

/* Boutons d'action */
.wprg-crop-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.wprg-crop-actions .button {
    flex: 1;
    text-align: center;
    justify-content: center;
}

/* Désactiver la sélection de texte */
.wprg-crop-wrapper * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}