body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: #f4f4f4 url(fond-2025.png) center no-repeat;
}

.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.canvas-wrapper {
      position: relative;
    width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    /* ... */
}

/* Le canvas affiche le modèle de fond */
#editorCanvas {
   position: absolute;
    top: 0;
    left: 0;
    z-index: 5; 
    background-color: transparent;
    width: 100%;
    height: auto; 
}

/* Le placeholder est la zone interactive où l'utilisateur manipule sa photo */
#userImagePlaceholder {
      position: absolute;
    width: 150px;
    height: 150px;
    cursor: move;
    border: 2px solid dodgerblue; /* Garde la bordure bleue visible pour l'interaction */
    box-sizing: border-box;
    overflow: hidden;
    background-color: rgba(30, 144, 255, 0.1); /* Très léger fond pour voir où on est */
    z-index: 10; /* Repasse au-dessus pour interagir */
}

#userImagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assure que l'image remplit la div */
    pointer-events: none; /* Important pour qu'interact.js capture les événements de la div parente */
}

/* Styles pour les poignées de redimensionnement */
.interact-resizing {
    border-color: #333 !important;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn, .controls input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1; /* Permet aux inputs de prendre l'espace disponible */
    max-width: 200px;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background-color: #0056b3;
}

.btn.primary {
    background-color: #28a745;
}

.btn.primary:hover {
    background-color: #218838;
}

.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


