/**
 * HCP AI Configurator - Styles du configurateur
 * 
 * @package HCP_AI_Configurator
 */

/* Variables CSS */
:root {
    --hcp-font-primary-family: 'Distinct Style', sans-serif;
    --hcp-font-secondary-family: 'Museo', sans-serif;
    --hcp-font-size-tiny: 12px;
    --hcp-font-size-small: 14px;
    --hcp-font-size-medium: 16px;
    --hcp-font-size-large: 20px;
    --hcp-button-size-tiny: 36px;
    --hcp-button-size-small: 44px;
    --hcp-button-size-medium: 52px;
    --hcp-button-size-large: 60px;
    --hcp-configurator: #7c3aed;
    --hcp-configurator-dark: #5b21b6;
    --hcp-configurator-bg: #f3effa;
    --hcp-configurator-gradient: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    --hcp-primary: #262626;
    --hcp-primary-dark: #131313;
    --hcp-secondary: #64748b;
    --hcp-success: #8ed3af;
    --hcp-error: #f49090;
    --hcp-warning: #ffd07d;
    --hcp-bg: #f8fafc;
    --hcp-bg-dark: #e2e8f0;
    --hcp-text: #1e293b;
    --hcp-text-light: #64748b;
    --hcp-border: #d9d9d9;
    --hcp-radius: 8px;
    --hcp-shadow-small: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hcp-shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --hcp-shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Liste des métadonnées produit (panier, checkout, commandes) */
ul.wc-item-meta {
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
    margin-right: 20px;
}

ul.wc-item-meta li p {
    margin: 8px 0 16px;
}

ul.wc-item-meta li a {
    overflow-wrap: anywhere;
}

ul.wc-item-meta li a:hover {
    color: var(--hcp-configurator-dark);
    text-decoration: underline;
}

/* Page du configurateur */
.hcp-configurator-page {
    background: var(--hcp-bg);
    min-height: 100vh;
}

.hcp-configurator {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hcp-configurator.hcp-ready {
    opacity: 1;
}

@media (max-width: 768px) {
    a.button.edit_order {
        max-width: 180px;
    }
}

/* Header */
.hcp-configurator-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
}

.hcp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--hcp-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.hcp-back-link:hover {
    color: var(--hcp-primary);
}

.hcp-product-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--hcp-text);
    margin: 0;
    font-family: var(--hcp-font-primary-family);
}

/* Layout principal */
.hcp-configurator-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .hcp-configurator-content {
        grid-template-columns: 1fr;
    }
}

/* Zone de prévisualisation */
.hcp-preview-area {
    position: sticky;
    top: 20px;
    background-color: #fff;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 1024px) {
    .hcp-preview-area {
        position: static;
    }
}

.hcp-canvas-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 30px;
    text-align: center;
}

.hcp-canvas-loader-text {
    display: none;
    font-size: 13px;
    color: var(--hcp-text-light);
}

.hcp-canvas-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Conteneur de prix flottant (desktop) - affiché quand hcp-total-price hors viewport */
.hcp-floating-price-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: var(--hcp-primary);
    opacity: 0;
    visibility: hidden;
    line-height: 1.5;
    font-family: var(--hcp-font-secondary-family);
    font-size: var(--hcp-font-size-medium);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

@media (max-width: 1024px) {
    .hcp-floating-price-container {
        font-size: 18px;
    }
}

.hcp-floating-price-container:focus {
    outline: none;
}

/* .hcp-floating-price-container:focus-visible {
    outline: 2px solid var(--hcp-configurator);
    outline-offset: 2px;
} */

.hcp-floating-price-container.hcp-floating-price-visible {
    opacity: 1;
    visibility: visible;
}

.hcp-floating-price-desktop {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    box-shadow: none;
}

.hcp-floating-price-desktop.hcp-floating-price-visible {
    transform: translateY(-50%);
}

.hcp-floating-price-icon {
    display: flex;
    align-items: center;
}

.hcp-floating-price-value {
    white-space: nowrap;
}

/* Mobile : conteneur prix en position fixed, aligné sur hcp-product-title (top défini en JS) */
.hcp-floating-price-mobile {
    position: fixed;
    right: 20px;
    top: 60px;
    transform: translateX(50%);
    opacity: 0;
}

.hcp-floating-price-mobile.hcp-floating-price-visible {
    transform: translateX(0);
    opacity: 1;
}

/* Masquer desktop sur mobile, masquer mobile sur desktop */
@media (max-width: 1024px) {
    .hcp-floating-price-desktop {
        display: none;
    }
}

@media (min-width: 1025px) {
    .hcp-floating-price-mobile {
        display: none;
    }
    .hcp-floating-price-desktop {
        display: flex;
    }
}

.konvajs-content {
    outline: 1px dashed var(--hcp-border);
    outline-offset: 4px;
}

/* Mode zoom : curseur grab pour le drag-to-pan ; pas de scroll de page sur le même geste que le pan (voir syncZoomModeTouchScroll en JS) */
.hcp-canvas-container.hcp-zoom-mode .konvajs-content {
    cursor: grab;
    touch-action: none;
    overscroll-behavior: contain;
}
.hcp-canvas-container.hcp-zoom-mode .konvajs-content:active {
    cursor: grabbing;
}
.hcp-canvas-container.hcp-zoom-mode .konvajs-content canvas {
    touch-action: none;
}

/* Messages flottants (zoom, confirmation suppression, description option) */
.hcp-zoom-mode-message,
.hcp-delete-confirm-message,
.hcp-option-description-message {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}
.hcp-zoom-mode-message,
.hcp-delete-confirm-message {
    white-space: nowrap;
}
.hcp-option-description-message {
    max-width: 60%;
    white-space: normal;
    text-align: center;
    cursor: pointer;
}
@media (max-width: 768px) {
    .hcp-option-description-message {
        max-width: 80%;
        width: 80%;
    }
}
.hcp-zoom-mode-message {
    cursor: pointer;
}
.hcp-zoom-mode-message.visible,
.hcp-delete-confirm-message.visible,
.hcp-option-description-message.visible {
    opacity: 1;
    visibility: visible;
}

/* Outils du canvas */
.hcp-canvas-controls-wrapper {
    position: relative;
}
.hcp-canvas-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-image: url(../images/configurator-bg-bottom.jpg);
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
}

.hcp-canvas-tools {
    display: flex;
}

.hcp-tool-btn {
    height: var(--hcp-button-size-small);
    padding: 0 18px;
    background: rgba(247, 247, 247, 0.97);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--hcp-secondary);
}

@media (max-width: 768px) {
    .hcp-tool-btn {
        height: 42px;
    }
}

@media (max-width: 400px) {
    .hcp-tool-btn {
        padding: 0 16px;
        height: 40px;
    }
}

.hcp-tool-btn:hover:not(:disabled) {
    background: #fff;
    color: var(--hcp-primary);
}

.hcp-tool-btn:disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.hcp-tool-btn:disabled svg {
    fill: rgba(100, 116, 139, .35);
}

.hcp-zoom-controls {
    display: flex;
    align-items: center;
}

.hcp-zoom-btn:hover {
    background: var(--hcp-bg);
}

.hcp-zoom-level {
    font-size: 13px;
    color: var(--hcp-text-light);
    min-width: 60px;
    line-height: var(--hcp-button-size-small);
    text-align: center;
    background-color: rgba(247, 247, 247, 0.97);
    padding: 0 10px;
}

@media (max-width: 768px) {
    .hcp-zoom-level {
        line-height: 42px;
    }
}

@media (max-width: 400px) {
    .hcp-zoom-level {
        line-height: 40px;
    }
}

/* Slider d'arrière-plan */
.hcp-bg-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hcp-bg-slider-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hcp-bg-slider-btn:hover svg {
    fill: var(--hcp-configurator-dark);
    transform: scale(1.1);
}

.hcp-bg-slider-btn .ph {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--hcp-text);
    transition: color 0.2s ease, transform 0.2s ease;
}

.hcp-bg-slider-counter {
    font-size: 14px;
    font-weight: 500;
    color: var(--hcp-text);
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.hcp-bg-slider-current {
    color: var(--hcp-primary);
    font-weight: 600;
}

.hcp-bg-slider-controls-label {
    font-size: 13px;
    color: var(--hcp-text-light);
    text-align: center;
}

@media (max-width: 768px) {
    /* Zone des options */
    .hcp-options-area {
        margin-bottom: 15px;
    }
}

/* Groupes - Accordéon */
.hcp-group {
    margin-bottom: 15px;
    overflow: hidden;
    background: #fff;
}

.hcp-group:last-child {
    margin-bottom: 0;
}

.hcp-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hcp-group-header:hover {
    background: #f0f0f4;
}

.hcp-group.hcp-group-open .hcp-group-header {
    background: #f0f0f4;
}

.hcp-group-title {
    font-family: var(--hcp-font-primary-family);
    font-size: var(--hcp-font-size-medium);
    font-weight: 600;
    color: var(--hcp-primary);
    margin: 0;
    flex: 1;
}

/* Bulle de message (description de groupe) */
@keyframes hcp-group-description-float {
    0%,
    100% {
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(2px);
    }
}

.hcp-group-description {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    margin: 0 0 5px;
    padding: 14px 20px;
    font-family: var(--hcp-font-secondary-family);
    font-size: 13px;
    color: var(--hcp-text-light);
    outline: 1px solid var(--hcp-border);
    border-bottom: 4px solid var(--hcp-border);
    background: rgba(0, 0, 0, 0.01);
    border-radius: var(--hcp-radius);
    animation: hcp-group-description-float 3.2s ease-in-out infinite;
    will-change: transform;
    /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); */
}

@media (prefers-reduced-motion: reduce) {
    .hcp-group-description {
        animation: none;
    }
}

.hcp-group-description svg {
    flex-shrink: 0;
}

/* Flèche en bas à gauche, orientée vers le bas (taille lisible) */
.hcp-group-description::after {
    content: "";
    position: absolute;
    bottom: -16px;
    left: 16px;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 16px solid var(--hcp-border);
}

.hcp-group-description p {
    margin: 0 0 0.65em;
}

.hcp-group-description p:last-child {
    margin-bottom: 0;
}

.hcp-group-description a {
    color: var(--hcp-configurator);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hcp-group-description a:hover {
    color: var(--hcp-configurator-dark);
}

.hcp-group-toggle {
    font-size: 20px;
    color: var(--hcp-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.hcp-group.hcp-group-open .hcp-group-toggle {
    transform: rotate(180deg);
}

.hcp-group-fields {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.hcp-group.hcp-group-open .hcp-group-fields {
    max-height: 8000px; /* Valeur suffisamment grande pour tout contenu */
    opacity: 1;
    padding: 20px;
}

.hcp-group:not(.hcp-group-open) .hcp-group-fields {
    padding-top: 0;
    padding-bottom: 0;
}

/* Champs */
.hcp-field {
    position: relative;
}

.hcp-field-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 5px;
}

.hcp-field-label {
    display: block;
    font-size: var(--hcp-font-size-medium);
    font-weight: 500;
    color: var(--hcp-text);
}

.hcp-required {
    color: var(--hcp-error);
}

.hcp-field-error .hcp-input,
.hcp-field-error .hcp-checkbox-group,
.hcp-field-error .hcp-radio-group {
    border-color: var(--hcp-error) !important;
}

/* Inputs */
.hcp-input {
    width: 100%;
    font-size: var(--hcp-font-size-small);
    color: var(--hcp-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.hcp-input:focus {
    outline: none;
    border-color: var(--hcp-primary);
}

.hcp-textarea-input {
    resize: vertical;
    min-height: 80px;
    border: 1px solid var(--hcp-border);
    padding: 10px 14px;
}

/* Options de texte */
.hcp-text-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.hcp-font-select-wrapper {
    display: flex;
    gap: 10px;
}

.hcp-font-select {
    flex: 1;
    min-width: 150px;
    font-size: var(--hcp-font-size-small);
    background-color: transparent;
}

/* Zone de prévisualisation de la police */
.hcp-font-preview {
    position: relative;
    padding: 5px 20px;
    background-color: #f8f8f8;
    font-size: 32px;
    text-align: center;
    color: #333;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    line-height: 1.2;
}

.hcp-font-preview-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 248, 248, 0.72);
    pointer-events: none;
}

.hcp-font-preview.is-placeholder {
    color: #999;
    font-style: italic;
}

/* Popup d'édition de texte sur le canvas */
.hcp-text-editor-popup {
    position: fixed;
    width: 320px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--hcp-shadow-medium);
    z-index: 10000;
    overflow: hidden;
}

.hcp-text-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--hcp-button-size-small);
    padding-left: 15px;
    background: var(--hcp-primary);
}

.hcp-text-editor-header-title {
    flex: 1;
    display: flex;
    font-family: var(--hcp-font-primary-family);
    font-size: var(--hcp-font-size-tiny);
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: #fff;
}

.hcp-text-editor-header-title-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.hcp-text-editor-header-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcp-text-editor-close {
    background: none;
    width: 45px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.hcp-text-editor-close:hover {
    opacity: 1;
}

.hcp-text-editor-body {
    padding: 15px;
}

.hcp-text-editor-input {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid var(--hcp-border);
    font-size: var(--hcp-font-size-small);
    resize: vertical;
    font-family: inherit;
    background: transparent
}

.hcp-text-editor-input:focus {
    outline: none;
    border-color: var(--hcp-primary);
}

.hcp-text-editor-options {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.hcp-text-editor-options label {
    font-size: 0;
    color: var(--hcp-text);
}

.hcp-text-editor-font-label {
    min-width: 120px;
    flex: 1;
}

.hcp-text-editor-font {
    width: 100%;
    padding: 8px 16px 8px 0px;
    font-size: var(--hcp-font-size-small);
    background: transparent;
    cursor: pointer;
    height: var(--hcp-button-size-small);
}

.hcp-text-editor-font:focus {
    outline: none;
    border-color: var(--hcp-primary);
}

.hcp-text-editor-font option {
    font-size: var(--hcp-font-size-medium);
    padding: 5px;
}

.hcp-text-editor-bold-label,
.hcp-text-editor-center-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: var(--hcp-button-size-small);
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    outline: 1px solid var(--hcp-primary);
    outline-offset: -1px;
}

.hcp-text-editor-bold-label:hover,
.hcp-text-editor-center-label:hover {
    background: #e9ecef;
}

.hcp-text-editor-bold-label:has(.hcp-text-editor-bold:checked),
.hcp-text-editor-center-label:has(.hcp-text-editor-center:checked) {
    background: var(--hcp-primary);
    border-color: var(--hcp-primary);
    outline: 1px solid var(--hcp-primary) !important;
}

.hcp-text-editor-bold-label:has(.hcp-text-editor-bold:checked) svg,
.hcp-text-editor-center-label:has(.hcp-text-editor-center:checked) svg {
    fill: #fff;
}

.hcp-text-editor-bold-label span,
.hcp-text-editor-center-label span {
    font-size: 20px;
    white-space: nowrap;
}

.hcp-text-editor-bold-label span b {
    font-size: 15px;
}

.hcp-text-editor-bold {
    display: none;
}

.hcp-text-editor-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 15px 10px;
}

.hcp-text-editor-cancel,
.hcp-text-editor-apply {
    font-family: var(--hcp-font-primary-family);
    padding: 0 10px;
    border: none;
    font-size: var(--hcp-font-size-tiny);
    cursor: pointer;
    line-height: var(--hcp-button-size-small);
    transition: background 0.2s;
    flex: 1;
}

.hcp-text-editor-cancel {
    background: #e9ecef;
    color: #495057;
}

.hcp-text-editor-cancel:hover {
    background: #dee2e6;
}

.hcp-text-editor-apply {
    background: var(--hcp-primary);
    color: #fff;
}

.hcp-text-editor-apply:hover {
    background: var(--hcp-primary-dark);
}

.hcp-font-size {
    width: 70px;
    font-size: var(--hcp-font-size-small);
    background-color: transparent;
    text-align: center;
}

.hcp-text-color,
.hcp-text-editor-color {
    width: 46px;
    height: var(--hcp-button-size-small);
    padding: 0px !important;
    border: 0 !important;
    cursor: pointer;
    outline: 1px solid var(--hcp-primary) !important;
    outline-offset: -1px;
}

/* Pseudo-element for Webkit browsers (Chrome, Safari, Opera, Edge) */
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
  }
  
  input[type="color"]::-webkit-color-swatch {
    border: none;
  }
  
  /* Pseudo-element for Firefox */
  input[type="color"]::-moz-color-swatch {
    border: none;
    padding: 0;
  }

.hcp-file-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 10px;
}

.hcp-field-content .hcp-add-text-to-canvas,
.hcp-field-content .hcp-add-to-canvas,
.hcp-field-content .hcp-ai-add-to-canvas,
.hcp-field-content .hcp-remove-file {
    display: flex;
    align-items: center;
    align-self: flex-start;
    gap: 3px;
    font-size: 11px;
    padding: 0;
    line-height: normal;
    background: none;
    color: var(--hcp-primary);
    border: none;
    padding: 6px 12px;
    outline: 1px solid var(--hcp-border);
    transition: none;
}

.hcp-field-content .hcp-add-text-to-canvas:hover,
.hcp-field-content .hcp-add-to-canvas:hover,
.hcp-field-content .hcp-ai-add-to-canvas:hover,
.hcp-field-content .hcp-remove-file:hover {
    outline: 2px solid var(--hcp-border);
    background: var(--hcp-bg);
}

.hcp-field-content .hcp-add-text-to-canvas:active,
.hcp-field-content .hcp-add-to-canvas:active,
.hcp-field-content .hcp-ai-add-to-canvas:active,
.hcp-field-content .hcp-remove-file:active {
    outline: 2px solid var(--hcp-primary);
}

/* Select */
.hcp-select-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}

/* Checkbox & Radio */

.hcp-mode-simple {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hcp-mode-with_image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 1024px) {
    .hcp-mode-with_image {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hcp-mode-with_image {
        grid-template-columns: 1fr 1fr;
    }
}

.hcp-checkbox-option,
.hcp-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    background: #f8f8f8;
    position: relative;
}

.hcp-checkbox-option:hover,
.hcp-radio-option:hover {
    outline: 2px solid var(--hcp-border);
    background: #f8fafc;
}

.hcp-checkbox-option:has(input:checked),
.hcp-radio-option:has(input:checked) {
    outline: 2px solid var(--hcp-primary);
    background: #f8fafc;
}

.hcp-checkbox-label-wrapper,
.hcp-radio-label-wrapper {
    line-height: 1.2;
}

.hcp-checkbox-label,
.hcp-radio-label {
    font-size: 14px;
    color: var(--hcp-text);
}

.hcp-option-price {
    font-size: 12px;
    color: var(--hcp-text-light);
}

/* Mode avec image */
.hcp-mode-with_image .hcp-checkbox-option,
.hcp-mode-with_image .hcp-radio-option {
    flex-direction: column;
    text-align: center;
    padding: 15px 10px;
}

/* Loader pendant l’ajout canvas (radio / checkbox avec image) */
.hcp-mode-with_image .hcp-radio-option .hcp-option-row-loader,
.hcp-mode-with_image .hcp-checkbox-option .hcp-option-row-loader {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    pointer-events: none;
}

.hcp-checkbox-hidden,
.hcp-radio-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hcp-checkbox-icon,
.hcp-radio-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--hcp-bg);
}

.hcp-checkbox-icon img,
.hcp-radio-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sélecteur de couleur */
.hcp-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hcp-color-input {
    width: 50px;
    height: 40px;
    padding: 3px;
    border: 1px solid var(--hcp-border);
    border-radius: 6px;
    cursor: pointer;
}

.hcp-color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--hcp-border);
}

.hcp-color-value {
    font-family: monospace;
    font-size: 13px;
    color: var(--hcp-text-light);
}

/* Téléversement de fichier */
.hcp-file-upload-wrapper {
    position: relative;
}

.hcp-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hcp-file-dropzone {
    border: 1px dashed var(--hcp-border);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.hcp-file-dropzone:hover,
.hcp-file-dropzone.dragover {
    border-color: var(--hcp-primary);
}

.hcp-file-dropzone p {
    margin: 0 0 8px;
    font-size: var(--hcp-font-size-small);
    color: var(--hcp-text);
}

.hcp-file-dropzone small {
    font-size: var(--hcp-font-size-tiny);
    color: var(--hcp-text-light);
    display: inline-block;
    padding: 8px 12px;
    border-top: 1px solid var(--hcp-border);
}

.hcp-file-preview {
    position: relative;
    text-align: center;
    padding: 15px 20px;
    border: 1px dashed var(--hcp-border);
}

.hcp-file-preview img {
    max-width: 200px;
    max-height: 200px;
}

/* Générateur IA */
.hcp-ai-generator-wrapper {
    background: var(--hcp-bg);
    border-radius: var(--hcp-radius);
    padding: 20px;
}

.hcp-ai-prompt-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hcp-ai-prompt-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--hcp-border);
    border-radius: 6px;
    font-size: var(--hcp-font-size-medium);
    resize: vertical;
    min-height: 80px;
}

.hcp-generate-ai-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
}

.hcp-ai-result {
    margin-top: 20px;
}

.hcp-ai-loading {
    text-align: center;
    padding: 30px;
}

.hcp-ai-loading .spinner {
    float: none;
    margin: 0 auto 10px;
    display: block;
}

.hcp-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--hcp-primary);
    border-radius: 50%;
    animation: hcp-spin 0.8s linear infinite;
    background: transparent;
    display: inline-block;
    flex-shrink: 0;
}

.hcp-spinner.md {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

.hcp-spinner.lg {
    width: 28px;
    height: 28px;
    border-width: 4px;
}

.hcp-spinner.xl {
    width: 32px;
    height: 32px;
    border-width: 4px;
}

.hcp-spinner.sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.hcp-spinner.white {
    border-color:rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
}

.hcp-ai-preview {
    text-align: center;
}

.hcp-ai-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    box-shadow: var(--hcp-shadow);
    margin-bottom: 15px;
}

.hcp-ai-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Modificateur de prix */
.hcp-field-price-modifier {
    color: var(--hcp-text-light);
    font-size: var(--hcp-font-size-small);
}

/* Résumé des prix */
.hcp-price-summary {
    background: #fff;
    padding: 12px 20px;
    margin: 25px 0;
    border: 1px solid var(--hcp-border);
}

.hcp-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.hcp-total-price {
    border-top: 1px solid var(--hcp-border);
}

.hcp-price-label {
    font-size: var(--hcp-font-size-medium);
    color: var(--hcp-text);
}

.hcp-price-value {
    font-size: var(--hcp-font-size-medium);
    font-weight: 500;
    color: var(--hcp-text);
}

.hcp-total-price .hcp-price-label {
    font-size: var(--hcp-font-size-large);
    font-weight: 600;
}

.hcp-total-price .hcp-price-value {
    font-size: var(--hcp-font-size-large);
    font-weight: 700;
    color: var(--hcp-primary);
}

.hcp-options-details:empty {
    display: none;
}

.hcp-option-price-row {
    padding: 6px 0;
    padding-left: 12px;
    position: relative;
}

.hcp-option-price-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--hcp-primary);
    border-radius: 50%;
}

.hcp-option-price-row .hcp-price-label {
    font-size: var(--hcp-font-size-small);
    color: var(--hcp-text-light);
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hcp-option-price-row .hcp-price-value {
    font-size: var(--hcp-font-size-small);
    font-weight: 500;
    /* color: #e74c3c; */
    color: var(--hcp-configurator);
}

.hcp-option-price-row:last-child {
    /* border-bottom: 1px solid var(--hcp-border); */
    margin-bottom: 4px;
}

/* Zone d'ajout au panier */
.hcp-add-to-cart-area {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.hcp-doc-acknowledgments {
    padding: 20px;
    border: 1px dashed var(--hcp-border);
    margin-bottom: 15px;
    width: 100%;
}

.hcp-doc-acknowledgments .hcp-doc-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--hcp-font-size-small);
    color: var(--hcp-text-light);
}

.hcp-doc-acknowledgments > * {
    margin-top: 10px;
}

.hcp-doc-acknowledgments > *:first-child,
.hcp-doc-acknowledgments > *:last-child {
    margin-top: 0;
}

.hcp-doc-acknowledgments .hcp-doc-checkbox a {
    text-decoration: underline;
    color: var(--hcp-configurator);
    text-underline-offset: .15em;
}

.hcp-doc-acknowledgments .hcp-doc-checkbox a:hover {
    color: var(--hcp-configurator-dark);
}

.hcp-quantity-wrapper {
    flex-shrink: 0;
}

.hcp-quantity-wrapper label {
    display: block;
    font-size: var(--hcp-font-size-medium);
    color: var(--hcp-text-light);
    margin-bottom: 6px;
}

.hcp-quantity-input {
    display: flex;
    border: 1px solid var(--hcp-border);
    overflow: hidden;
}

.hcp-qty-btn {
    width: var(--hcp-button-size-medium);
    height: var(--hcp-button-size-medium);
    border: none;
    cursor: pointer;
    color: var(--hcp-text-light); 
    padding: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.hcp-qty-btn:hover svg {
    fill: var(--hcp-primary);
}

.hcp-quantity-input input {
    width: var(--hcp-button-size-medium);
    height: var(--hcp-button-size-medium);
    flex: 1;
    border: none !important;
    text-align: center;
    font-size: var(--hcp-font-size-medium);
    background-color: transparent;
}

.hcp-quantity-input input::-webkit-outer-spin-button,
.hcp-quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hcp-add-to-cart-btn {
    flex: 1;
    padding: 12px 24px;
    font-size: var(--hcp-font-size-medium);
    font-weight: 600;
    background: var(--hcp-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.hcp-add-to-cart-btn:hover {
    background: var(--hcp-primary-dark);
}

.hcp-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hcp-message {
    padding: 8px 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    border-radius: var(--hcp-radius);
    line-height: 1.4;
}

.hcp-message-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hcp-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #43a047;
}

.hcp-message-error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #e53935;
}

.hcp-field-message .hcp-message-error,
.hcp-inline-message .hcp-message-error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #e53935;
}

/* Bouton Personnaliser sur la page produit */

.hcp-customize-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 30px;
    font-size: var(--hcp-font-size-medium);
    font-weight: 600;
    background: var(--hcp-primary);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    transition: background 0.2s;
}

.hcp-customize-button:hover {
    background: var(--hcp-primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hcp-configurator {
        padding: 15px;
    }
    
    .hcp-configurator-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hcp-canvas-controls {
        flex-direction: column;
    }
    
    .hcp-add-to-cart-area {
        flex-direction: column;
    }
    
    .hcp-quantity-wrapper {
        width: 100%;
    }
    
    .hcp-quantity-input {
        justify-content: center;
    }
    
    .hcp-add-to-cart-btn {
        width: 100%;
    }
    
    .hcp-text-options {
        flex-direction: column;
    }
    
    .hcp-font-select {
        min-width: auto;
    }
}

/* Animation spinner */
@keyframes hcp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hcp-ai-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--hcp-border);
    border-top-color: var(--hcp-primary);
    border-radius: 50%;
    animation: hcp-spin 0.8s linear infinite;
    background: transparent;
}

/* ============================================
   Bouton Personnaliser - Page Produit
   ============================================ */

/* Wrapper du bouton pour produits variables */
.hcp-customize-button-wrapper {
    border: 2px dashed #999;
    padding: 20px;
}

/* Bouton désactivé (avant sélection des variations) */
.hcp-customize-button.disabled {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
    color: #ccc !important;
    filter: grayscale(1);
}

/* Bouton Personnaliser */
#hcp-customize-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0 20px;
    height: 60px;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-image: linear-gradient(160deg, rgba(0,0,0,.1) 0%, var(--hcp-configurator-dark) 60%), url(../images/configurator-bg-top.jpg) !important;
    /* box-shadow: 0 0 0 1px var(--hcp-configurator-dark); */
    background-size: cover;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

#hcp-customize-btn:hover {
    box-shadow: 0 0 0 1px var(--hcp-configurator-dark);
}

/* Message d'instruction pour les variations */
p.hcp-variation-notice {
    font-size: 0.85em;
    color: #000 !important;
    margin: 10px 0 0 0;
    text-align: center;
}

/* Masquer le bouton WooCommerce par défaut pour les produits avec configurateur */
.hcp-has-configurator form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button,
.hcp-has-configurator form.variations_form .woocommerce-variation-add-to-cart .quantity {
    display: none !important;
}

/* ============================================
   Section Variations - Configurateur
   ============================================ */

.hcp-variations-summary {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #c5ddf5;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.hcp-variations-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #c5ddf5;
}

.hcp-variations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.hcp-variation-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--hcp-font-size-small);
    line-height: 1;
    padding-right: 10px;
    border-right: 1px solid var(--hcp-border);
}

.hcp-variation-item:last-child {
    border-right: none;
    padding-right: 0;
}

.hcp-variation-label {
    font-weight: 500;
    color: #555;
}

.hcp-variation-value {
    color: #1e3a5f;
    font-weight: 600;
}

.hcp-change-variation {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85em;
    color: #2271b1;
    text-decoration: none;
}

.hcp-change-variation:hover {
    text-decoration: underline;
}

/* ============================================
   Modale de finalisation
   ============================================ */

.hcp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hcp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.hcp-modal-content {
    position: relative;
    display: flex;
    /* flex-direction: column; */
    /* justify-content: space-between; */
    background: #fff;
    max-width: 60%;
    width: 60%;
    max-height: 90vh;
    overflow: hidden;
    animation: hcp-modal-appear 0.3s ease;
}

.hcp-modal-content > svg {
    position: absolute;
    top: -45px;
    left: -70px;
    z-index: 1;
}

@media (max-width: 768px) {
    .hcp-modal-content > svg {
        left: -80px;
    }
}

.hcp-modal-content:after {
    content: '';
    width: 180px;
    height: 180px;
    background-color: var(--hcp-configurator-dark);
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    border-radius: 50%;
    position: absolute;
    top: -10px;
    left: -35px;
}

@media (max-width: 768px) {
    .hcp-modal-content:after {
        left: -55px;
    }
}

.hcp-modal-content-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 50%;
    position: relative;
    z-index: 1;
}

.hcp-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    padding: 15px;
}

.hcp-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 10px 30px 10px 90px;
    font-size: 16px;
    color: var(--hcp-text-light);
}

@media (max-width: 768px) {
    .hcp-modal-body {
        padding: 10px 15px 10px 65px;
    }
}

.hcp-modal-body p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hcp-modal-body p svg {
    flex-shrink: 0;
}

.hcp-modal-warning-links a {
    text-decoration: underline;
    color: var(--hcp-configurator);
    text-underline-offset: .15em;
}

.hcp-modal-warning-links a:hover {
    color: var(--hcp-configurator-dark);
}

.hcp-modal-footer {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes hcp-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hcp-modal-close {
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: 1px dashed #999;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hcp-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.hcp-modal-header-title {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hcp-modal-header-icon {
    font-size: 28px;
    width: auto;
    height: auto;
}

.hcp-modal-preview {
    text-align: center;
    font-size: 0;
    overflow-y: auto;
    flex: 50%;
    display: none;
}

.hcp-modal-preview img {
    max-width: 100%;
}

.hcp-modal-actions {
    display: flex;
    gap: 10px;
}

.hcp-modal-btn {
    font-family: var(--hcp-font-primary-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0px 24px;
    border: none;
    line-height: 48px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.hcp-modal-btn span {
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.hcp-modal-btn.hcp-cart-btn {
    flex: 1;
    background-color: var(--hcp-primary);
    color: #fff;
}

.hcp-modal-btn.hcp-cart-btn:hover {
    background-color: var(--hcp-primary-dark);
    color: #fff;
}

.hcp-modal-btn.hcp-download-btn,
.hcp-modal-btn.hcp-no-customization-back {
    flex: 1;
    background-color: #f0f0f0;
    color: #333;
}

.hcp-modal-btn.hcp-download-btn:hover,
.hcp-modal-btn.hcp-no-customization-back:hover {
    background-color: #e0e0e0;
    color: #333;
}

.hcp-cart-btn:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
}

.hcp-modal-messages .hcp-message {
    text-align: left;
    justify-content: center;
    margin-top: 0;
    max-width: 100%;
}

/* Empêcher le scroll du body quand la modale est ouverte */
body.hcp-modal-open {
    overflow: hidden;
}

/* Style du bouton Terminer */
#hcp-finish-btn {
    width: 100%;
    padding: 0px 20px;
    font-size: var(--hcp-font-size-small);
    color: #fff;
    line-height: var(--hcp-button-size-medium);
    background-color: var(--hcp-primary);
    border: 1px solid var(--hcp-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Badge Personnalisé dans le panier */
.hcp-customized-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

/* Forcer le fill de l'icône SVG (WooCommerce/theme peuvent appliquer fill: currentColor) */
.hcp-customized-badge svg {
    fill: #fff;
}

/* Image personnalisée dans le panier */
.hcp-cart-custom-image {
    max-width: 100%;
    height: auto;
}

/* Responsive modale */
@media (max-width: 1024px) {
    .hcp-modal-content {
        margin: 10px;
        max-width: 90%;
        width: 90%;
    }
}

@media (max-width: 768px) {
    .hcp-modal-actions {
        flex-direction: column;
    }
}

/* ============================================
   Badges d'options
   ============================================ */

.hcp-option-badge {
    display: inline-block;
    padding: 0 8px;
    font-size: var(--hcp-font-size-tiny);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 20px;
    border-radius: 4px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Bande oblique : balayage sur 2 s, puis pause 6 s (cycle 8 s) */
.hcp-option-badge::before,
.hcp-floating-nav-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -120%;
    width: 80%;
    min-width: 40px;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-28deg);
    pointer-events: none;
    animation: hcp-option-badge-sweep 8s linear infinite;
}

.hcp-floating-nav-btn::before {
    width: 100%;
}

@keyframes hcp-option-badge-sweep {
    0% {
        left: -120%;
    }

    /* 2/8 du cycle : fin du balayage */
    25% {
        left: 140%;
    }

    /* 6/8 du cycle : pause sur la position finale */
    100% {
        left: 140%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hcp-option-badge::before,
    .hcp-floating-nav-btn::before {
        animation: none;
    }
}

/* Badge Nouveau */
.hcp-badge-new {
    background-color: #00b894;
    color: #fff;
}

/* Badge Spécial */
.hcp-badge-special {
    background-color: #6c5ce7;
    color: #fff;
}

/* Badge Tendances */
.hcp-badge-trending {
    background-color: #e84393;
    color: #fff;
}

/* Badge Limité */
.hcp-badge-limited {
    background-color: #f39c12;
    color: #fff;
}

/* Positionnement du badge dans les options radio/checkbox avec images */
.hcp-radio-option,
.hcp-checkbox-option {
    position: relative;
}

.hcp-mode-with_image .hcp-option-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    margin-left: 0;
}

.hcp-radio-option:hover .hcp-option-badge,
.hcp-checkbox-option:hover .hcp-option-badge {
    transform: scale(1.05);
}

/* ============================================
   Navigation mobile canvas/options
   ============================================ */

/* Bouton flottant de navigation */
.hcp-floating-nav-btn {
    position: fixed;
    bottom: 69px;
    height: 60px;
    line-height: 60px;
    width: 60px;
    left: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    background: linear-gradient(135deg, var(--hcp-primary, #3498db) 0%, var(--hcp-primary-dark, #2980b9) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    overflow: hidden;
    transform: translateX(-100px);
    transition: all 0.3s ease;
}

.hcp-floating-nav-btn.hcp-floating-visible {
    opacity: 1;
    transform: translateX(0);
}

.hcp-floating-nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.hcp-floating-nav-btn:active {
    transform: scale(0.98);
}

.hcp-floating-nav-btn span {
    white-space: nowrap;
}

/* Style spécifique pour le bouton "vers options" */
.hcp-floating-to-trigger {
    background: linear-gradient(135deg, #6c5ce7 0%, #5b4cdb 100%);
}

/* Style spécifique pour le bouton "vers canvas" */
.hcp-floating-to-canvas {
    background: linear-gradient(135deg, #00b894 0%, #00a885 100%);
}

/* Effet de surbrillance : double clignotement rapide */
.hcp-highlight-trigger {
    animation: hcp-highlight-blink 0.5s ease-in-out;
}

@keyframes hcp-highlight-blink {
    0%,
    100% {
        opacity: 1;
        outline: 2px solid var(--hcp-primary);
    }
    12.5% {
        opacity: 0.2;
        outline: none;
    }
    25% {
        opacity: 1;
        outline: 2px solid var(--hcp-primary);
    }
    37.5% {
        opacity: 0.2;
        outline: none;
    }
    50% {
        opacity: 1;
        outline: 2px solid var(--hcp-primary);
    }
}

/* Masquer sur desktop */
@media (min-width: 1025px) {
    .hcp-floating-nav-btn {
        display: none !important;
    }
}

/* ===========================================
   MODE MODIFICATION COMMANDE
   =========================================== */

/* Badge de modification commande dans le header */
.hcp-order-edit-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 6px;
}

.hcp-cart-edit-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
