/**
 * Styles pour le configurateur visuel
 */

/* Import de la police manuscrite (vous pouvez ajuster selon vos besoins) */
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Permanent+Marker&family=Roboto:wght@300;400;500;700&family=Source+Sans+Pro:wght@400;600&display=swap');

/* Configuration générale */

#cv-configurator button {
    box-shadow: none !important;
}

#cv-configurator button:focus {
    outline: none !important;
}

.cv-configurator {
    margin: 30px 0;
    padding: 0;
    background: transparent;
    font-family: 'Source Sans Pro', sans-serif;
}

.cv-configurator .form-group {
    margin-top: 0;
    justify-content: end;
}

.cv-configurator .row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 0;
}

/* === COLONNE GAUCHE : FORMULAIRE === */

.cv-configurator-form {
    flex: 0 0 65%;
    max-width: 65%;
    padding: 0 !important;
    background-color: #f7f8f9;
    border: solid 1px #dddddd !important;
    border-radius: 12px;
}

/* Titres principaux en style manuscrit */
.cv-configurator-form .h3,
.cv-configurator-form .h4 {
    font-family: 'Permanent Marker', cursive;
    color: #4A90E2;
    font-size: 18px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.cv-configurator-form .h4 {
    font-size: 16px;
    margin-top: 0;
}

/* Labels des champs */
.cv-configurator-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

/* Champs de formulaire */
.cv-configurator-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    background: #FAFAFA;
    transition: all 0.2s;
    text-align: center;
    color: #8488bf;
    background-color: #ebecf5;
    width: 100%;
    height: 50px;
}

.cv-configurator-form .form-control:focus {
    outline: none;
}

/* Texte d'aide */
.cv-configurator-form .form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.cv-char-count {
    font-weight: 600;
    color: #666;
}

.cv-required-mark {
    color: #e74c3c;
    font-weight: 600;
}

.cv-text-input-wrap {
    position: relative;
    width: 100%;
}

.cv-text-input-wrap .form-control,
.cv-text-input-wrap .cv-text-input {
    padding-right: 52px;
    padding-left: 15px;
    text-align: left;
}

.cv-char-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1;
    color: #8488bf;
    font-family: "Source Sans Pro", sans-serif;
    font-style: italic;
    font-weight: 400;
    pointer-events: none;
    user-select: none;
}

/* Base générique pour tous les blocs de personnalisation */
.cv-customize-block {
    display: inline-block;
    width: 100%;
    min-width: 326px;
    padding: 20px 40px;
    margin-bottom: 20px;
    box-shadow: none;
    border-left: 0;
}

.cv-customize-block .cv-block-title {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 24px;
    line-height: 1.3;
    color: #7d80c5;
    text-align: center;
    margin: 0 0 10px;
    font-weight: 600;
}

.cv-customize-block .cv-sub-pour,
.cv-customize-block .cv-sub-ou {
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

.cv-colors-block .cv-color-category {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1;
    color: #8488bf;
    font-family: "Source Sans Pro", sans-serif;
    text-align: center;
    font-weight: 600;
}

.cv-colors-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.cv-colors-groups-separator {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: -4px;
}

.cv-colors-groups-separator img {
    max-height: 36px;
    width: auto;
}

.cv-colors-group {
    border: 1px solid #e3e3ea;
    border-radius: 8px;
    background: url('../img/bg-colors.jpg') repeat-x top;
    padding-top: 15px;
    padding: 18px 14px 14px;
}

.cv-colors-block .cv-colors-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, 45px));
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 0;
}

.cv-illustrations-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cv-illustrations-actions-single {
    grid-template-columns: minmax(0, 1fr);
}

/* Boutons illustration : flèche à droite ; texte+icône centrés sur la largeur totale du bouton */
/* Même fond que .cv-font-select-trigger (#ebecf5) — le thème PS peut écraser les <button> sans !important */
.cv-illustration-btn {
    position: relative;
    width: 100%;
    min-height: 50px;
    height: 50px;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #d8d9e6;
    border-radius: 8px;
    background: #ebecf5 !important;
    background-color: #ebecf5 !important;
    display: block;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
    font-family: "Source Sans Pro", Arial, sans-serif;
    cursor: not-allowed;
    opacity: 1;
    text-align: center;
}

.cv-illustrations-block .cv-illustration-btn:hover,
.cv-illustrations-block .cv-illustration-btn:focus {
    background: #ebecf5 !important;
    background-color: #ebecf5 !important;
}

.cv-illustrations-block .cv-illustration-btn:disabled {
    opacity: 1;
    background: #ebecf5 !important;
    background-color: #ebecf5 !important;
}

.cv-illustrations-block .cv-illustration-btn:not(:disabled) {
    cursor: pointer;
}

.cv-illustrations-block .cv-illustration-btn--active {
    border-color: #b8b9d4;
    box-shadow: inset 0 0 0 1px rgba(45, 84, 145, 0.15);
    background: #e3e6f3 !important;
    background-color: #e3e6f3 !important;
    color: #2d5491;
}

.cv-illustrations-block .cv-illustration-btn--active:hover,
.cv-illustrations-block .cv-illustration-btn--active:focus {
    background: #e3e6f3 !important;
    background-color: #e3e6f3 !important;
}

.cv-illustrations-block .cv-illustration-btn--active .cv-illustration-label {
    color: #2d5491;
}

.cv-illustrations-block .cv-illustration-btn:focus {
    outline: none;
}

.cv-illustrations-block .cv-illustration-btn:focus-visible {
    outline: 2px solid #2d5491;
    outline-offset: 2px;
}

.cv-illustration-btn-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    max-width: min(100%, calc(100% - 49px - 12px));
    padding: 0 6px;
    gap: 5px;
    box-sizing: border-box;
    color: #8488bf;
    background: transparent;
    pointer-events: none;
}

.cv-illustration-btn .cv-illustration-label {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    color: #8488bf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.cv-illustration-btn-picto-ico,
.cv-illustration-btn-photo-ico {
    width: 40px;
    height: 40px;
    min-width: 40px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    align-self: center;
}

.cv-illustration-btn-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 49px;
    min-width: 49px;
    border-left: 1px solid #bfc1cd;
    background: url('../img/select-arrow.gif') no-repeat center center;
    background-size: cover;
    display: block;
    pointer-events: none;
}

/* Panneau « Ma photo » : import + position + recadrer */
.cv-photo-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.cv-photo-panel {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.cv-photo-panel[hidden] {
    display: none;
}

.cv-photo-import-row {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.cv-photo-import-btn {
    display: inline-block;
    border: 1px solid #d0d1dc;
    border-radius: 10px;
    background: #f2f2f6;
    color: #4a4a55;
    font-size: 16px;
    font-weight: 600;
    font-family: "Source Sans Pro", Arial, sans-serif;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cv-photo-import-btn:hover {
    background: #e8e9f0;
    border-color: #c4c5d0;
}

.cv-photo-import-btn:focus-visible {
    outline: 2px solid #2d5491;
    outline-offset: 2px;
}

.cv-photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    min-height: 0;
}

.cv-photo-thumb-wrap {
    flex: 0 0 auto;
}

.cv-photo-thumb-btn {
    display: block;
    margin: 0;
    padding: 3px;
    border: 2px solid #d0d1dc;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    line-height: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cv-photo-thumb-btn img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.cv-photo-thumb-btn:hover {
    border-color: #8989c4;
}

.cv-photo-thumb-btn--selected {
    border-color: #2d5491;
    box-shadow: 0 0 0 1px rgba(45, 84, 145, 0.25);
}

.cv-photo-thumb-btn:focus-visible {
    outline: 2px solid #2d5491;
    outline-offset: 2px;
}

.cv-photo-controls {
    max-width: 320px;
    margin: 0 auto;
}

.cv-photo-controls-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #8488bf;
    font-family: "Source Sans Pro", Arial, sans-serif;
    text-align: center;
}

.cv-photo-controls-title-crop,
.cv-photo-controls-title-rotate {
    margin-top: 20px;
}

.cv-photo-nudge,
.cv-photo-crop,
.cv-photo-rotate {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
}

.cv-photo-nudge-btn,
.cv-photo-crop-btn,
.cv-photo-rotate-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: none;
    border-radius: 6px;
    background: #3b6fd8;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    font-family: "Source Sans Pro", Arial, sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
    transition: background 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.cv-photo-nudge-btn:hover,
.cv-photo-crop-btn:hover,
.cv-photo-rotate-btn:hover {
    background: #2f5cc4;
}

.cv-photo-nudge-btn:active,
.cv-photo-crop-btn:active,
.cv-photo-rotate-btn:active {
    transform: translateY(1px);
}

.cv-photo-nudge-btn:focus-visible,
.cv-photo-crop-btn:focus-visible,
.cv-photo-rotate-btn:focus-visible {
    outline: 2px solid #2d5491;
    outline-offset: 2px;
}

.cv-photo-nudge-btn:disabled,
.cv-photo-crop-btn:disabled,
.cv-photo-rotate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.cv-photo-remove-wrap,
.cv-picto-remove-wrap {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.cv-picto-remove-wrap {
    margin-top: 16px;
}

.cv-media-remove-btn {
    display: inline-block;
    max-width: 320px;
    width: 100%;
    padding: 10px 18px;
    border: 1px solid #c46a6a;
    border-radius: 8px;
    background: #fff;
    color: #b23b3b;
    font-size: 15px;
    font-weight: 600;
    font-family: "Source Sans Pro", Arial, sans-serif;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cv-media-remove-btn:hover {
    background: #fff5f5;
    border-color: #a84a4a;
    color: #901f1f;
}

.cv-media-remove-btn:focus-visible {
    outline: 2px solid #b23b3b;
    outline-offset: 2px;
}

.cv-picto-remove-btn.cv-media-remove-btn {
    width: auto;
    max-width: none;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #e31c23!important;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
}

.cv-picto-remove-btn.cv-media-remove-btn:hover {
    background: transparent!important;
    border: none;
    color: #b01018!important;
}

.cv-picto-remove-btn.cv-media-remove-btn:focus-visible {
    outline: 2px solid #e31c23!important;
    outline-offset: 2px;
}

.cv-picto-categories {
    margin-top: 18px;
    width: 100%;
}

.cv-picto-categories[hidden] {
    display: none;
}

.cv-picto-categories-label {
    margin: 0 0 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2f3155;
    font-family: "Source Sans Pro", Arial, sans-serif;
}

.cv-picto-categories-list {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 10px 12px;
}

.cv-picto-category-btn {
    min-height: 44px;
    min-width: 0;
    max-width: 200px;
    padding: 8px 14px;
    border: none;
    border-radius: 9px;
    background: #8989c4;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    font-family: "Source Sans Pro", Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cv-picto-category-btn:hover {
    background: #7a7ab8;
}

.cv-picto-category-btn--active,
.cv-picto-category-btn:focus-visible {
    background: #6c6ca8;
    outline: 2px solid #2d5491 !important;
}

.cv-picto-pools {
    margin-top: 16px;
    width: 100%;
}

.cv-picto-pool {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 12px;
    width: 100%;
}

.cv-picto-pool[hidden] {
    display: none;
}

.cv-illustrations-block .cv-picto-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background-color: transparent !important;
    cursor: pointer;
    line-height: 0;
    vertical-align: top;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cv-illustrations-block .cv-picto-thumb img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.cv-illustrations-block .cv-picto-thumb:hover {
    border-color: rgba(137, 137, 196, 0.45);
    background-color: transparent !important;
}

.cv-illustrations-block .cv-picto-thumb--selected {
    border-color: #2d5491;
    box-shadow: 0 0 0 1px rgba(45, 84, 145, 0.25);
}

.cv-illustrations-block .cv-picto-thumb:focus-visible {
    outline: 2px solid #2d5491;
    outline-offset: 2px;
}

.cv-text-font-block .cv-text-font-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.cv-text-font-block .cv-text-col,
.cv-text-font-block .cv-font-col {
    min-width: 0;
}

.cv-text-primary--hidden {
    display: none !important;
}

.cv-text-font-block--per-label .cv-text-font-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 640px;
    margin: 0 auto;
}

.cv-text-font-block--per-label .cv-text-col:empty,
.cv-text-font-block--per-label .cv-text-col--no-extra {
    display: none;
}

.cv-text-font-block--per-label .cv-text-font-grid:has(.cv-text-col--no-extra) {
    grid-template-columns: 1fr;
    max-width: 440px;
}

.cv-text-font-block--per-label .cv-font-col label {
    text-align: center;
}

.cv-text-font-block--pack-multi .cv-text-font-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
}

.cv-text-font-block--pack-multi .cv-font-col label {
    display: none;
}

/* === PACK MULTI-ÉTIQUETTES : config par scène === */

.cv-pack-scenes-config {
    margin-top: 8px;
}

.cv-pack-scene-config {
    margin-bottom: 20px;
}

.cv-pack-scene-config-header {
    text-align: center;
    margin-bottom: 4px;
}

.cv-pack-scene-config-title {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 14px;
}

.cv-pack-scene-config-title::before,
.cv-pack-scene-config-title::after {
    content: '';
    flex: 1 1 0;
    min-width: 16px;
    height: 5px;
    background-color: #fff;
}

.cv-pack-scene-config-title-text {
    flex: 0 1 auto;
    white-space: nowrap;
}

.cv-pack-scene-config-qty {
    font-weight: 600;
}

/* Grille pack : fond | texte 1, couleur texte | texte 2, texte 3 | texte 4 */
.cv-pack-scene-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 18px;
    align-items: start;
}

.cv-pack-scene-form-grid .cv-pack-scene-colors,
.cv-pack-scene-form-grid .cv-background-panel--solid,
.cv-pack-scene-form-grid .cv-solid-picker,
.cv-pack-scene-form-grid .cv-solid-picker-row,
.cv-pack-scene-form-grid .cv-pack-scene-text-fields {
    display: contents;
}

.cv-pack-scene-form-grid .cv-solid-picker-row {
    margin-top: 0;
    gap: 0;
}

.cv-pack-scene-form-grid .cv-solid-field--bg {
    grid-column: 1;
    grid-row: 1;
}

.cv-pack-scene-form-grid .cv-pack-scene-text-line--slot-1 {
    grid-column: 2;
    grid-row: 1;
}

.cv-pack-scene-form-grid--slots-1 .cv-solid-field--text {
    grid-column: 1 / -1;
    grid-row: 2;
}

.cv-pack-scene-form-grid--slots-2 .cv-solid-field--text,
.cv-pack-scene-form-grid--slots-3 .cv-solid-field--text,
.cv-pack-scene-form-grid--slots-4 .cv-solid-field--text {
    grid-column: 1;
    grid-row: 2;
}

.cv-pack-scene-form-grid--slots-2 .cv-pack-scene-text-line--slot-2 {
    grid-column: 2;
    grid-row: 2;
}

.cv-pack-scene-form-grid--slots-3 .cv-pack-scene-text-line--slot-2 {
    grid-column: 2;
    grid-row: 2;
}

.cv-pack-scene-form-grid--slots-3 .cv-pack-scene-text-line--slot-3 {
    grid-column: 1 / -1;
    grid-row: 3;
}

.cv-pack-scene-form-grid--slots-4 .cv-pack-scene-text-line--slot-2 {
    grid-column: 2;
    grid-row: 2;
}

.cv-pack-scene-form-grid--slots-4 .cv-pack-scene-text-line--slot-3 {
    grid-column: 1;
    grid-row: 3;
}

.cv-pack-scene-form-grid--slots-4 .cv-pack-scene-text-line--slot-4 {
    grid-column: 2;
    grid-row: 3;
}

.cv-pack-scene-form-grid--no-colors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cv-pack-scene-form-grid--no-colors .cv-pack-scene-text-fields {
    display: contents;
}

.cv-pack-scene-form-grid--no-colors.cv-pack-scene-form-grid--slots-1 .cv-pack-scene-text-line--slot-1 {
    grid-column: 1 / -1;
    grid-row: 1;
}

.cv-pack-scene-colors {
    margin-bottom: 0;
}

.cv-pack-scene-colors .cv-colors-group {
    margin: 0 auto;
    max-width: 100%;
}

.cv-pack-scene-colors .cv-color-category {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1;
    color: #8488bf;
    font-family: "Source Sans Pro", sans-serif;
    text-align: center;
    font-weight: 600;
}

.cv-pack-scene-colors .cv-colors-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, 45px));
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 0;
}

.cv-pack-scene-text-line label,
.cv-pack-scene-form-grid .cv-solid-field-label {
    display: block;
    text-align: left;
    font-size: 15px;
    color: #555;
    font-weight: 600;
    margin-bottom: 6px;
    font-family: "Source Sans Pro", Arial, sans-serif;
}

.cv-pack-scene-text-line .form-text {
    display: none;
}

/* Colonne preview sticky (pack multi) */
@media (min-width: 993px) {
    #cv-configurator.cv-configurator-pack-multi {
        overflow: visible;
    }

    #cv-configurator.cv-configurator-pack-multi>.row {
        display: grid;
        grid-template-columns: minmax(0, 65%) minmax(0, 35%);
        gap: 20px;
        align-items: stretch;
        overflow: visible;
    }

    #cv-configurator.cv-configurator-pack-multi .cv-configurator-form,
    #cv-configurator.cv-configurator-pack-multi .cv-configurator-preview {
        flex: none;
        max-width: none;
        width: auto;
        padding: 0 !important;
        min-width: 0;
    }

    #cv-configurator.cv-configurator-pack-multi .cv-configurator-form {
        grid-column: 1;
        grid-row: 1;
    }

    #cv-configurator.cv-configurator-pack-multi .cv-configurator-preview {
        grid-column: 2;
        grid-row: 1;
        align-self: stretch;
        height: 100%;
    }

    #cv-configurator.cv-configurator-pack-multi .cv-preview-sticky {
        position: sticky;
        top: 24px;
        width: 100%;
        z-index: 20;
    }

    #cv-configurator.cv-configurator-pack-multi .cv-preview-sticky--fixed {
        z-index: 120;
    }

    #cv-configurator.cv-configurator-pack-multi .cv-configurator-preview {
        position: relative;
    }
}

.cv-text-extra-label {
    color: #5b6582;
    font-size: 14px;
    text-align: center;
    margin-bottom: 6px;
}

.cv-text-extra-label .cv-extra-char-max {
    font-size: 12px;
    opacity: .7;
}

.cv-common-illustration-inline {
    margin-top: 18px;
}

.cv-common-illustration-label {
    display: block;
    text-align: center;
    font-size: 16px;
    color: #8488bf;
    font-weight: 600;
    margin: 0 0 6px;
}

.cv-per-label-block .cv-per-label-subtitle {
    text-align: center;
    margin: 0 0 12px;
    color: #8488bf;
    font-size: 34px;
    font-family: "Amatic SC", cursive;
    font-weight: 700;
}

.cv-per-label-block .cv-per-label-subtitle span {
    font-family: "Source Sans Pro", sans-serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
}

.cv-per-label-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px 22px;
    align-items: start;
}

.cv-per-label-row {
    display: grid;
    grid-template-columns: 34px 1fr 42px;
    align-items: center;
    gap: 0;
}

.cv-per-label-row-idx {
    color: #aaafc6;
    font-size: 18px;
    font-family: "Source Sans Pro", sans-serif;
}

.cv-per-label-row-input {
    height: 40px;
    border: 1px solid #dadbe7 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    background: #ebecf5 !important;
    color: #6c6f88 !important;
    text-align: left !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
}

.cv-per-label-color-btn {
    height: 40px;
    width: 42px;
    border: 0;
    border-radius: 0 8px 8px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-transform: lowercase;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.cv-per-label-color-btn span {
    font-size: 12px;
}

.cv-per-label-row.is-active .cv-per-label-row-input {
    border-color: #c4c7df !important;
    box-shadow: inset 0 0 0 1px rgba(45, 84, 145, 0.12);
}

.cv-per-label-color-popover {
    position: fixed;
    z-index: 300;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cv-per-label-color-popover-inner {
    width: clamp(280px, 90vw, 480px);
    max-width: calc(100vw - 40px);
    background: #fff;
    border: 1px solid #d7d7df;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    padding: 16px 20px 20px;
    position: relative;
    display: block;
}

.cv-per-label-color-popover-inner .h5 {
    margin: 0 0 14px;
    font-family: "Amatic SC", cursive;
    font-size: 50px;
    line-height: 1;
    color: #2d5491;
}

#cv-per-label-color-popover .cv-per-label-color-close {
    padding: 0;
}

.cv-per-label-color-close {
    position: absolute;
    right: 16px;
    top: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #ecedf6;
    color: #6c6f88;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.cv-per-label-color-options {
    display: block;
    width: 100%;
}

.cv-per-label-pop-color {
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    font-family: "Source Sans Pro", sans-serif;
    cursor: pointer;
    padding: 0;
}

.cv-text-font-block .cv-text-col label,
.cv-text-font-block .cv-font-col label {
    text-align: center;
    font-size: 16px;
    color: #8488bf;
    font-weight: 600;
}

.cv-text-font-block .form-text {
    margin-top: 10px;
    text-align: center;
    color: #8488bf;
    font-style: italic;
    font-family: "Source Sans Pro", sans-serif;
}

/* Select custom Police */
.cv-font-select-native {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
}

.cv-font-select-custom {
    position: relative;
    width: 100%;
}

.cv-font-select-trigger {
    width: 100%;
    height: 50px;
    border: 1px solid #d8d9e6;
    border-radius: 8px;
    background: #ebecf5;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    box-shadow: none !important;
}

.cv-font-select-trigger:focus {
    outline: none !important;
}

.cv-font-select-label {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 7px 37px 7px 18px;
    color: #555555;
    font-size: 18px;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #ebecf5;
    font-weight: 400;
}

.cv-font-select-arrow {
    width: 49px;
    flex: 0 0 49px;
    border-left: 1px solid #bfc1cd;
    background: url('../img/select-arrow.gif') no-repeat center center;
    background-size: cover;
    display: block;
}

.cv-font-select-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #b6b7bf;
    border-radius: 0 0 4px 4px;
    z-index: 50;
    max-height: 380px;
    overflow: auto;
    display: none;
}

.cv-font-select-custom.open .cv-font-select-dropdown {
    display: block;
}

.cv-font-option {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #d7d8df;
    background: #ffffff !important;
    text-align: left;
    padding: 8px 20px 8px 8px;
    font-size: 22px;
    color: #222222 !important;
    line-height: 1;
    cursor: pointer;
    font-weight: 400;
    border-radius: 0;
}

.cv-font-option:last-child {
    border-bottom: 0;
}

.cv-font-option:hover,
.cv-font-option.active {
    background: #f2f2f2;
}

/* === SECTION COULEURS === */

/* Sous-titre catégorie */
.cv-color-category {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin: -5px 0 15px 0;
    font-weight: 300;
}

/* Grille de couleurs */
.cv-colors-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Boutons de couleur ronds */
.cv-color-btn {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.cv-color-btn:focus {
    outline: none !important;
}

.cv-color-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cv-color-btn.active {
    border-color: #005695;
}

/* Lien "plus de couleurs" */
.cv-more-colors {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.cv-more-colors:hover {
    color: #4A90E2;
    text-decoration: underline;
}

/* === COLONNE DROITE : PRÉVISUALISATION === */

.cv-configurator-preview {
    flex: 0 0 35%;
    max-width: 35%;
    padding: 0 !important;
}

.cv-preview-container {
    background: #f7f8f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    border: solid 1px #dddddd !important;
}

/* Banner diagonal "Prévisualisation" */
.cv-preview-banner {
    position: absolute;
    top: 15px;
    left: -5px;
    background: linear-gradient(135deg, #3B5998 0%, #5B7BB8 100%);
    color: #fff;
    padding: 6px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transform: rotate(-3deg);
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.cv-preview-badge-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 116px;
    height: auto;
    z-index: 10;
}

.cv-pack-header {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.cv-pack-title,
.cv-pack-label-count {
    color: #7d80c5;
    line-height: 1.15;
    margin: 0;
    text-align: center;
}

.cv-per-label-preview-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.cv-per-label-preview-nav span::before {
    border-style: solid;
    border-width: 5px 5px 0 0;
    content: '';
    display: inline-block;
    height: 15px;
    left: 0;
    position: relative;
    top: 7px;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    vertical-align: top;
    width: 15px;
    cursor: pointer;
    color: #23B9CE;
}

.cv-per-label-preview-nav .cv-chevron-bottom::before {
    top: 0;
    transform: rotate(135deg);
}

.cv-per-label-preview-nav button {
    border: 0;
    background: transparent;
    color: #25b1d0;
    font-size: 50px;
    line-height: 1;
    cursor: pointer;
}

.cv-per-label-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.cv-per-label-snap-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.cv-per-label-snap-row[hidden] {
    display: none !important;
}

.cv-per-label-snap-row--side {
    opacity: 0.45;
}

.cv-per-label-snap-row--active {
    opacity: 1;
}

.cv-per-label-snap-idx {
    color: #a9aec3;
    font-size: 18px;
    text-align: right;
    font-family: "Source Sans Pro", sans-serif;
    min-width: 28px;
    flex-shrink: 0;
}

.cv-per-label-snap-row--active .cv-per-label-snap-idx {
    color: #2f3155;
}

.cv-per-label-snap-wrap {
    position: relative;
    overflow: hidden;
    line-height: 0;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.cv-per-label-snap-canvas {
    display: block;
}

.cv-per-label-snap-qty {
    color: #2f3155;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.cv-per-label-snap-badge {
    display: inline-block;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.cv-per-label-canvas-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

@keyframes cvPerLabelStackSlide {
    0% {
        transform: translateY(8px);
    }

    100% {
        transform: translateY(0);
    }
}

.cv-per-label-preview-stack--anim .cv-per-label-snap-row--active {
    animation: cvPerLabelStackSlide 0.28s ease;
}

.cv-per-label-preview-stack--anim .cv-per-label-snap-row--side {
    animation: cvPerLabelStackSlide 0.32s ease;
}

.cv-pack-title {
    width: 215px;
    margin: 0 auto;
    font-family: "Amatic SC", cursive;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cv-pack-label-count {
    margin-top: 8px;
    font-family: "Source Sans Pro", sans-serif;
    font-size: 18px;
    font-weight: 400;
}

/* Wrapper de la prévisualisation */
.cv-preview-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
}

/* Uniformisation mode produit simple avec le rendu pack */
.cv-configurator-single .cv-preview-wrapper {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    min-height: 0;
    box-shadow: none;
    line-height: 0;
}

.cv-configurator-single .canvas-container {
    margin: 0 auto !important;
    padding: 0 !important;
    filter: none;
    line-height: 0;
    display: block;
    overflow: hidden;
}

.cv-configurator-single .lower-canvas,
.cv-configurator-single .upper-canvas {
    display: block;
}

/* Container du canvas */
.canvas-container {
    position: relative;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15));
}

/* Canvas */
.lower-canvas,
.upper-canvas {
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.lower-canvas {
    background: transparent;
}

.upper-canvas {
    pointer-events: none;
}

/* Disclaimer */
.cv-preview-disclaimer {
    font-size: 12px;
    color: #1f1f55;
    font-family: "Source Sans Pro", sans-serif;
    margin-top: 10px;
    font-style: italic;
    text-align: center;
}

/* Sélecteur de déclinaisons */
.cv-combination-selector {
    margin-top: 0;
    margin-bottom: 18px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cv-combination-selector label {
    display: inline-block;
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    color: #2f3155;
}

.cv-product-attribute-select {
    width: auto;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #11153b;
    background: #fff;
    cursor: pointer;
}

.cv-product-attribute-select:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.cv-product-attribute-select option:disabled {
    color: #999;
    font-style: italic;
}

/* Prix total configurateur (synchro PrestaShop) */
#cv-price {
    margin-bottom: 18px;
    text-align: right;
}

#cv-price .cv-priceTotal {
    text-transform: uppercase;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #8488bf;
}

#cv-priceContainer {
    font-size: 36px;
    font-weight: bold;
    color: #8488bf;
    margin-left: 15px;
    line-height: 32px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Bouton Ajouter au panier */
.cv-add-to-cart-wrapper {
    margin-top: 0;
    text-align: center;
}

#cv-add-to-cart-btn {
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    line-height: 1;
    letter-spacing: 0.4px;
    padding: 8px 22px;
}

#cv-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#cv-add-to-cart-btn img {
    margin-left: 13px;
}

/* === STYLES POUR LES PACKS === */

.cv-configurator-pack .cv-preview-container-pack {
    min-height: 400px;
}

.cv-preview-actions-below {
    margin: 40px 15px 22px 21px;
}

.cv-pack-previews {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 10px 0 14px;
}

.cv-pack-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    line-height: 0;
}

.cv-pack-preview-item .cv-preview-wrapper {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    line-height: 0;
}

.cv-pack-preview-item .canvas-container {
    margin: 0 !important;
    padding: 0 !important;
    filter: none;
    line-height: 0;
    display: block;
}

.cv-pack-preview-item .lower-canvas,
.cv-pack-preview-item .upper-canvas {
    display: block;
}

.cv-pack-preview-info {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
}

.cv-sticker-settings {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

.cv-sticker-qty {
    font-size: 14px;
    font-weight: 600;
    color: #2f3155;
    font-family: "Source Sans Pro", sans-serif;
}

.cv-sticker-type {
    width: 47px;
    height: 47px;
    display: inline-block;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.cv-pack-size-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 6px 11px;
    border-radius: 20px;
    background: #007bff;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Variantes de badges de taille par position */
.cv-pack-preview-item:nth-child(1) .cv-pack-size-badge {
    background: #ff9800;
}

.cv-pack-preview-item:nth-child(2) .cv-pack-size-badge {
    background: #8bc34a;
}

.cv-pack-preview-item:nth-child(3) .cv-pack-size-badge {
    background: #00bcd4;
}

.cv-pack-preview-item:nth-child(4) .cv-pack-size-badge {
    background: #e91e63;
}

.cv-pack-preview-item:nth-child(5) .cv-pack-size-badge {
    background: #3f51b5;
}

/* === RESPONSIVE === */

@media (max-width: 992px) {

    .cv-configurator-form,
    .cv-configurator-preview {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .cv-configurator .row {
        flex-direction: column;
    }

    .cv-configurator-preview {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .cv-pack-preview-item {
        flex-direction: column;
        text-align: center;
    }

    .cv-pack-preview-info {
        justify-content: center;
    }

    .cv-text-font-block .cv-text-font-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cv-text-font-block--per-label .cv-text-font-grid:not(:has(.cv-text-col--no-extra)) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .cv-customize-block {
        min-width: 0;
    }

    .cv-pack-scene-form-grid,
    .cv-pack-scene-form-grid--no-colors {
        grid-template-columns: 1fr;
    }

    .cv-pack-scene-form-grid .cv-solid-field--bg,
    .cv-pack-scene-form-grid .cv-solid-field--text,
    .cv-pack-scene-form-grid .cv-pack-scene-text-line--slot-1,
    .cv-pack-scene-form-grid .cv-pack-scene-text-line--slot-2,
    .cv-pack-scene-form-grid .cv-pack-scene-text-line--slot-3,
    .cv-pack-scene-form-grid .cv-pack-scene-text-line--slot-4,
    .cv-pack-scene-form-grid--no-colors .cv-pack-scene-text-line--slot-1 {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .cv-pack-scene-text-line .form-text {
        display: none;
    }

    .cv-configurator-pack-multi .cv-text-input-wrap .form-control,
    .cv-configurator-pack-multi .cv-text-input-wrap .cv-text-input {
        text-align: left;
    }

    .cv-configurator-pack-multi .cv-preview-sticky {
        position: static;
    }

    #cv-configurator.cv-configurator-pack-multi>.row {
        display: flex;
        flex-direction: column;
    }

    .cv-combination-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .cv-product-attribute-select {
        min-width: 0;
        width: 100%;
    }

    .cv-add-to-cart-btn {
        font-size: 40px;
        max-width: 100%;
    }

    .cv-pack-title {
        font-size: 34px;
    }

    .cv-pack-label-count {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .cv-colors-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .cv-color-btn {
        min-width: 40px;
        font-size: 12px;
    }

    .cv-configurator-form .form-group {
        padding: 20px;
    }

    .cv-preview-badge-img {
        width: 92px;
    }

    .cv-pack-title {
        font-size: 30px;
        width: 100%;
    }

    .cv-pack-label-count {
        font-size: 16px;
    }

    .cv-combination-selector label {
        font-size: 16px;
    }

    .cv-product-attribute-select {
        font-size: 15px;
    }

    .cv-add-to-cart-btn {
        font-size: 34px;
        border-radius: 12px;
    }
}

/* === ANIMATIONS === */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cv-configurator-form .form-group {
    animation: fadeIn 0.4s ease-out;
}

.cv-configurator-form .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.cv-configurator-form .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

[type=email],
[type=file],
[type=number],
[type=password],
[type=search],
[type=tel],
[type=text],
select,
textarea {
    outline: none;
    text-align: left;
    border: 1px solid #d9d9d9;
    background-color: #fff;
    color: #00003c;
    margin: 0;
    width: 100%;
    max-width: 100%;
    font-family: Source Sans Pro, sans-serif;
    font-size: 16px;
    font-size: 1.6rem;
    padding: 5px;
    padding: .5rem
}

[type=email]:focus,
[type=email]:hover,
[type=file]:focus,
[type=file]:hover,
[type=number]:focus,
[type=number]:hover,
[type=password]:focus,
[type=password]:hover,
[type=search]:focus,
[type=search]:hover,
[type=tel]:focus,
[type=tel]:hover,
[type=text]:focus,
[type=text]:hover,
select:focus,
select:hover,
textarea:focus,
textarea:hover {
    color: #434a5f !important;
    border-color: #a6a6a6 !important;
}

/* Fonds à motif */
.cv-background-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: stretch;
}

.cv-background-tab {
    border: none;
    background: #8989c4;
    border-radius: 9px;
    padding: 8px 14px;
    min-height: 40px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    color: #fff;
    font-family: "Source Sans Pro", Arial, sans-serif;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cv-background-tab:hover {
    background: #7a7ab8;
}

.cv-background-tab.is-active {
    color: #fff;
    background: #6c6ca8;
    box-shadow: 0 0 0 2px #2d5491;
}

.cv-background-tab--category.is-active {
    background: #6c6ca8;
}

.cv-background-panel--pattern {
    margin-top: 4px;
}

.cv-pattern-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.cv-pattern-thumb-btn {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f8;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cv-pattern-thumb-btn:hover {
    border-color: #c5d8f0;
}

.cv-pattern-thumb-btn.is-active {
    border-color: #2d5491;
    box-shadow: 0 0 0 1px #2d5491;
}

.cv-pattern-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cv-pattern-text-colors-label {
    font-size: 14px;
    margin: 0 0 8px;
    font-weight: 600;
}

.cv-pattern-text-colors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-pattern-text-color-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}

.cv-pattern-text-color-btn.is-active {
    border-color: #6ec6d9;
    box-shadow: 0 0 0 1px #6ec6d9;
}

.cv-pattern-empty {
    font-size: 13px;
    color: #777;
    margin: 0;
}

.cv-solid-picker-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.cv-solid-field {
    position: relative;
    width: 100%;
}

.cv-solid-field-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
    font-family: "Source Sans Pro", Arial, sans-serif;
}

.cv-solid-select {
    position: relative;
    width: 100%;
}

.cv-solid-picker-trigger {
    width: 100%;
    height: 50px;
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    border: 1px solid #d8d9e6;
    border-radius: 8px;
    background: #fff !important;
    background-color: #fff !important;
    color: inherit !important;
    box-shadow: none !important;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    font-weight: 400;
}

.cv-solid-picker-trigger:hover,
.cv-solid-picker-trigger:focus {
    background: #fff !important;
    background-color: #fff !important;
    outline: none;
}

.cv-solid-picker-trigger:focus-visible {
    outline: 2px solid #2d5491;
    outline-offset: 2px;
}

.cv-solid-picker-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cv-solid-picker-trigger--bg .cv-solid-picker-swatch {
    flex: 1 1 auto;
    min-height: 100%;
    min-width: 0;
    border: none;
    border-radius: 7px 0 0 7px;
    background: #f3f4f8;
}

.cv-solid-picker-trigger--bg.has-value .cv-solid-picker-swatch {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.cv-solid-picker-trigger--bg.has-pattern .cv-solid-picker-swatch {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cv-solid-picker-trigger--text .cv-solid-picker-swatch {
    flex: 1 1 auto;
    min-height: 100%;
    min-width: 0;
    border: none;
    border-radius: 7px 0 0 7px;
    background: #f3f4f8;
}

.cv-solid-picker-trigger--text.has-value .cv-solid-picker-swatch {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.cv-solid-picker-arrow {
    width: 49px;
    flex: 0 0 49px;
    border-left: 1px solid #bfc1cd;
    background: #ebecf5 url('../img/select-arrow.gif') no-repeat center center;
    background-size: cover;
}

.cv-solid-popover {
    display: none;
    position: fixed;
    z-index: 10050;
    background: #fff;
    border: 1px solid #b6b7bf;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.cv-solid-select.is-open .cv-solid-popover {
    display: block;
}

.cv-fond-popover {
    min-width: 480px;
    max-width: min(560px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
}

.cv-fond-popover::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 28px;
    width: 14px;
    height: 14px;
    background: #f0f0f0;
    border-left: 1px solid #b6b7bf;
    border-top: 1px solid #b6b7bf;
    transform: rotate(45deg);
}

.cv-fond-popover-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e8e9ef;
    background: #fafafc;
}

.cv-fond-popover-tab {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #d8d9e6;
    border-radius: 999px;
    background: #fff !important;
    color: #333 !important;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    box-shadow: none !important;
}

.cv-fond-popover-tab.is-active {
    color: #2d9aaa !important;
    border-color: #2d9aaa;
    background: #fff !important;
}

.cv-fond-popover-body {
    padding: 14px 16px 16px;
    max-height: 320px;
    overflow: auto;
    background: #f0f0f0;
}

.cv-fond-color-grid,
.cv-text-color-grid {
    display: grid;
    grid-template-columns: repeat(10, 36px);
    gap: 8px;
    justify-content: center;
}

.cv-fond-pattern-grid {
    display: grid;
    grid-template-columns: repeat(10, 36px);
    gap: 8px;
    justify-content: center;
}

.cv-solid-popover--text.cv-fond-popover {
    padding: 0;
    min-width: 480px;
    max-width: min(560px, calc(100vw - 24px));
}

.cv-solid-popover-empty {
    margin: 0;
    padding: 6px 4px;
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

.cv-solid-bg-swatch,
.cv-solid-text-color-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background-image: none !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 36px;
}

.cv-fond-pattern-thumb {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: #f3f4f8 !important;
    box-shadow: none !important;
    overflow: hidden;
}

.cv-fond-pattern-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cv-solid-bg-swatch:hover,
.cv-solid-text-color-btn:hover,
.cv-fond-pattern-thumb:hover {
    border-color: #bbb;
}

.cv-solid-bg-swatch.is-active,
.cv-solid-text-color-btn.is-active,
.cv-fond-pattern-thumb.is-active {
    border-color: #6ec6d9;
    box-shadow: 0 0 0 1px #6ec6d9, inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.cv-pack-scene-colors,
.cv-background-panel--solid,
.cv-colors-block {
    overflow: visible;
}

@media (max-width: 600px) {

    .cv-fond-color-grid,
    .cv-text-color-grid {
        grid-template-columns: repeat(6, 36px);
    }

    .cv-fond-pattern-grid {
        grid-template-columns: repeat(5, 64px);
    }

    .cv-fond-popover {
        min-width: 0;
        width: calc(100vw - 24px) !important;
    }
}

.cv-per-label-color-step-label {
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 6px;
}

.cv-per-label-color-bg-grid,
.cv-per-label-color-text-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.cv-per-label-pop-bg.is-active,
.cv-per-label-pop-text.is-active {
    outline: 2px solid #6ec6d9;
    outline-offset: 2px;
}