/* Styles pour les boutons dans Fancybox */
#fancybox-buttons {
    position: relative;
    top: 10px;
    left: 7px !important;
    z-index: 2000;
    display: flex;
    align-items: center;
}

#selectShareButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 10px;
    background: black;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin-left: 17px;
}

#closeFancyboxButton {
    color: white;
    background: black;
    border: none;
    font-size: 35px;
    cursor: pointer;
    position: absolute;
    top: 1px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Styles pour la popup de sélection */
#selectionPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999999 !important;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 90%;
    width: 100%;
    box-sizing: border-box;
}

#closePopup {
    align-self: flex-end;
    color: white;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
}

#imageCaption {
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 100%;
    overflow-wrap: break-word;
}

#imageCanvas {
    border: 1px solid #fff;
    width: 100%;
}

#controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

#undoButton,
#downloadButton,
#emailButton,
#shareButton,
#helpIcon {
    width: 30px;
    height: 30px;
    cursor: pointer;
}

#helpTooltip {
    display: none;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-66%);
    padding: 15px;
    background: white;
    color: black;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 250px;
    text-align: left;
    font-size: 12px;
    line-height: 1;
}

#helpTooltip p {
    margin: 0;
}

#helpTooltip p strong {
    font-weight: bold;
}