@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;700&display=swap');

/* --- 0. Variables & Reset --- */
:root {
    --brand-color: #B9A18A;
    --text-color: #333;
    --bg-color: #F8F5F1;
    --border-color: #E6E0D9;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Roboto', sans-serif;
}

.charm-builder-accordions button {
    margin: 0;
    padding: 0;
}

/* --- 1. Structure des Accordéons --- */
.charm-builder-accordions {
    margin: 0em 0;
    font-family: var(--font-sans);
}

.accordion-item {
    border: 1px solid var(--border-color);
}

.accordion-item:first-child {
    border-radius: 8px 8px 0 0;
}

.accordion-item:last-child {
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.accordion-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px 25px;
    background-color: var(--bg-color);
    border: none;
    cursor: pointer;
    text-align: left;
}

.accordion-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid var(--brand-color);
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.accordion-icon-circle {
    width: 12px;
    height: 12px;
    background-color: var(--brand-color);
    border-radius: 50%;
}

.accordion-title {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--text-color);
    font-weight: 700;
    flex-grow: 1;
    padding-top: 20px;
    padding-bottom: 20px;
}

.accordion-arrow {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    transition: transform 0.3s ease;
}

.accordion-toggle.is-open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 30px 25px;
    background-color: white;
}

.accordion-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 30px 0;
    max-width: 80ch;
}

.validate-selection-btn {
    display: block;
    background-color: #C09A7C;
    color: white;
    border: none;
    padding: 15px 60px !important;
    font-weight: 400;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 10px 0;
    width: auto;
    font-family: var(--font-sans);
    border-radius: 0;
}

.validate-selection-btn:hover {
    opacity: 0.9;
    background-color: var(--brand-color);
}

.price-display {
    font-size: 18px;
    font-weight: bold;
}

/* --- 2. Zone d'affichage des Charms sélectionnés --- */
.selected-charms-display-area {
    display: flex;
    flex-wrap: wrap;
    gap: 50px 10px;
    align-items: center;
    min-height: 100px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.open-charm-modal-btn {
    border: 2px dashed var(--border-color);
    background-color: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 5px;
}

.open-charm-modal-btn.is-initial {
    width: 130px;
    height: 130px;
}

.open-charm-modal-btn:not(.is-initial) {
    width: 100px;
    height: 100px;
}

.open-charm-modal-btn:hover {
    border-color: var(--brand-color);
    background-color: #f5f5f5;
}

.open-charm-modal-btn span {
    font-size: 40px;
    color: #ccc;
    font-weight: 300;
}

.selected-charm-item {
    position: relative;
    width: 100px;
    height: 100px;
    cursor: move;
}

.selected-charm-item img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
    display: block;
}

.remove-charm {
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    color: var(--brand-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.charm-sortable-placeholder {
    width: 100px;
    height: 100px;
    background-color: var(--bg-color);
    border: 2px dashed var(--brand-color);
    border-radius: 5px;
    flex-shrink: 0;
}

/* --- 3. Modale --- */
.charm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 245, 241, 0.9);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.charm-modal-overlay.is-visible {
    display: flex;
    opacity: 1;
}

.charm-modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 960px;
    height: 90vh;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.charm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 8px 8px 0 0;
}

.charm-modal-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.close-charm-modal-btn {
    background: none;
    border: none;
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
}

.charm-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 0 0 8px 8px;
}

.charm-modal-add-btn {
    background-color: var(--brand-color);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

/* --- 4. Liste des Charms disponibles (dans la modale) --- */
#available-charms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.charm-item.available-charm {
    cursor: pointer;
    text-align: center;
}

.charm-image-wrapper {
    position: relative;
}

.available-charm .charm-image {
    background-color: white;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.available-charm .charm-image img {
    width: 100%;
    height: 110px;
    object-fit: contain;
}

.available-charm .charm-name {
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
    color: var(--text-color);
    display: block;
    /* S'assurer qu'il prend de la place */
}

.charm-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(185, 161, 138, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.charm-selection-overlay svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.available-charm.is-modal-selected .charm-image {
    border-color: var(--brand-color);
    box-shadow: 0 0 10px rgba(185, 161, 138, 0.5);
}

.available-charm.is-modal-selected .charm-selection-overlay {
    opacity: 1;
}


/* --- NOUVEAUX STYLES POUR LES FILTRES À FACETTES --- */

/* Ajuster le corps de la modale pour la disposition en 2 colonnes */
.charm-modal-body {
    display: flex;
    padding: 0;
    overflow: hidden;
    flex-grow: 1;
}

/* Barre latérale des filtres */
#charm-filters-sidebar {
    width: 250px;
    /* Un peu plus fin */
    flex-shrink: 0;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.filters-sidebar-title {
    font-family: var(--font-serif);
    font-size: 20px;
    margin: 0 0 20px 0;
    color: var(--text-color);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.filter-list label {
    font-size: 15px;
    cursor: pointer;
    margin-left: 10px;
    color: #555;
}

.filter-list input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid #ccc;
    border-radius: 0.15em;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
    cursor: pointer;
}

.filter-list input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--brand-color);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.filter-list input[type="checkbox"]:checked {
    border-color: var(--brand-color);
}

.filter-list input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.filter-group select.filter-control {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
}

.filter-groups-wrapper {
    flex-grow: 1;
    /* Pousse le bouton vers le bas */
}

.apply-filters-btn {
    width: 100%;
    background-color: var(--brand-color);
    color: white;
    border: none;
    padding: 12px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    margin-top: 20px;
}

.apply-filters-btn:hover {
    opacity: 0.9;
}

/* Zone des résultats des charms */
.charm-results-area {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: var(--bg-color);
}

/* Ancien panneau de filtres qui n'est plus utilisé */
#charm-filters-panel {
    display: none;
}



.charm-notification {
    position: relative;
    background: linear-gradient(135deg, #C09A7C, #C09A7C);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

.charm-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.charm-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.charm-notification-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.charm-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.charm-notification-text {
    flex: 1;
    font-weight: 500;
}

.charm-notification-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    line-height: 1;
}

.charm-notification-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Variantes de couleur */
.charm-notification.warning {
    background: linear-gradient(135deg, #a08570, #97765E);
    box-shadow: 0 4px 20px #97765E;
}

.charm-notification.info {
    background: linear-gradient(135deg, #42a5f5, #26c6da);
    box-shadow: 0 4px 20px rgba(66, 165, 245, 0.3);
}

.charm-notification.success {
    background: linear-gradient(135deg, #66bb6a, #26a69a);
    box-shadow: 0 4px 20px rgba(102, 187, 106, 0.3);
}

/* Animation de disparition */
.charm-notification.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .charm-notification {
        padding: 14px 16px;
        font-size: 13px;
        margin-bottom: 16px;
    }

    .charm-notification-content {
        gap: 50px 10px;
    }

    .charm-notification-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .charm-notification-close {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}






/*--------------------------------------------------------------------*/
.charm-builder-accordions button {
    margin: 0;
    padding: 0;
}

/* --- 1. Structure des Accordéons --- */
.charm-builder-accordions {
    margin: 2em 0;
    font-family: var(--font-sans);
    max-width: 100%;
}

.accordion-item {
    margin-top: -1px;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    background: white;
}

.accordion-item:first-child {
    border-radius: 8px 8px 0 0;
}

.accordion-item:last-child {
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Quand il n'y a qu'un seul accordéon */
.accordion-item:only-child {
    border-radius: 8px;
}

.accordion-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px 25px;
    background-color: white;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
}

.accordion-toggle:hover {
    background-color: #fafafa;
}

.accordion-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid var(--brand-color);
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    background: white;
}

.accordion-icon-circle {
    width: 14px;
    height: 14px;
    background-color: var(--brand-color);
    border-radius: 50%;
}

.accordion-title {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--text-color);
    font-weight: 400;
    flex-grow: 1;
    margin: 0;
    letter-spacing: 0.5px;
}

.accordion-arrow {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B9A18A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-toggle.is-open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 25px;
    background-color: white;
    border-top: 1px solid var(--border-color);
}

.accordion-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 25px 0;
    max-width: none;
}

/* --- 2. Zone d'affichage des Charms sélectionnés --- */
.selected-charms-display-area {
    display: flex;
    flex-wrap: wrap;
    gap: 50px 10px;
    align-items: center;
    min-height: 120px;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: #fafafa;
    margin: 20px 0;
    min-height: 120px;
    justify-content: flex-start;
}

.open-charm-modal-btn {
    border: 2px dashed var(--brand-color);
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 8px;
    position: relative;
}

.open-charm-modal-btn.is-initial {
    width: 100px;
    height: 100px;
}

.open-charm-modal-btn:not(.is-initial) {
    width: 80px;
    height: 80px;
}

.open-charm-modal-btn:hover {
    border-color: var(--brand-color);
    background-color: #f5f5f5;
    transform: scale(1.02);
}

.open-charm-modal-btn span {
    font-size: 32px;
    color: var(--brand-color);
    font-weight: 300;
}

.selected-charm-item {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: move;
    transition: transform 0.2s ease;
}

.selected-charm-item:hover {
    transform: scale(1.05);
}

.selected-charm-item img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    border: 2px solid var(--border-color);
}

.remove-charm {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--brand-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.remove-charm:hover {
    transform: scale(1.1);
    background: #A08A7A;
}

.charm-sortable-placeholder {
    width: 80px;
    height: 80px;
    background-color: var(--bg-color);
    border: 2px dashed var(--brand-color);
    border-radius: 8px;
    flex-shrink: 0;
}


.price-display {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    font-family: var(--font-sans);
    padding-bottom: 10px;
}

/* --- Notification en dessous du nom --- */
.charm-name-display {
    margin: 15px 0 20px 0;
    font-size: 14px;
    color: black;
    font-style: normal;
    text-align: left;
    min-height: 20px;
}

/* --- 4. Modale --- */
.charm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.charm-modal-overlay.is-visible {
    display: flex;
    opacity: 1;
}

.charm-modal-content {
    background: white;
    width: 90%;
    max-width: 960px;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.charm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 12px 12px 0 0;
}

.charm-modal-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    margin: 0;
    color: var(--text-color);
}

.close-charm-modal-btn {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-charm-modal-btn:hover {
    background: #f5f5f5;
    color: var(--text-color);
}

.charm-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 0 0 12px 12px;
}

.charm-modal-add-btn {
    background-color: var(--brand-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.charm-modal-add-btn:hover {
    background-color: #A08A7A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(185, 161, 138, 0.3);
}

/* --- 5. FILTRES ET CORPS DE LA MODALE --- */
.charm-modal-body {
    display: flex;
    padding: 0;
    overflow: hidden;
    flex-grow: 1;
}

#charm-filters-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: #fafafa;
    border-right: 1px solid var(--border-color);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.filters-sidebar-title {
    font-family: var(--font-serif);
    font-size: 18px;
    margin: 0 0 20px 0;
    color: var(--text-color);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 400;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.filter-list label {
    font-size: 14px;
    cursor: pointer;
    margin-left: 12px;
    color: #555;
    font-family: var(--font-sans);
}

.filter-list input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-list input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--brand-color);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.filter-list input[type="checkbox"]:checked {
    border-color: var(--brand-color);
    background: var(--brand-color);
}

.filter-list input[type="checkbox"]:checked::before {
    transform: scale(1);
    box-shadow: inset 1em 1em white;
}

.filter-group select.filter-control {
    width: 100%;
    padding: 12px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B9A18A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-group select.filter-control:focus {
    border-color: var(--brand-color);
    outline: none;
}

.filter-groups-wrapper {
    flex-grow: 1;
}

.apply-filters-btn {
    width: 100%;
    background-color: var(--brand-color);
    color: white;
    border: none;
    padding: 15px 12px;
    font-weight: 600;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apply-filters-btn:hover {
    background-color: #A08A7A;
    transform: translateY(-1px);
}

/* Zone des résultats des charms */
.charm-results-area {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: white;
}

/* --- 6. Liste des Charms disponibles (dans la modale) --- */
#available-charms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.charm-item.available-charm {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease;
}

.charm-item.available-charm:hover {
    transform: translateY(-2px);
}

.charm-image-wrapper {
    position: relative;
}

.available-charm .charm-image {
    background-color: white;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.available-charm .charm-image img {
    width: 100%;
    height: 100px;
    object-fit: contain;
}

.available-charm .charm-name {
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
    color: var(--text-color);
    display: block;
    font-family: var(--font-sans);
}

.charm-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(185, 161, 138, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.charm-selection-overlay svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.available-charm.is-modal-selected .charm-image {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 2px rgba(185, 161, 138, 0.3);
    transform: scale(0.98);
}

.available-charm.is-modal-selected .charm-selection-overlay {
    opacity: 1;
}

/* --- 7. NOTIFICATIONS --- */
.charm-notification {
    position: relative;
    background: linear-gradient(135deg, #C09A7C, #97765E);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(192, 154, 124, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

.charm-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.charm-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.charm-notification-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.charm-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.charm-notification-text {
    flex: 1;
    font-weight: 500;
}

.charm-notification-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    line-height: 1;
}

.charm-notification-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Variantes de couleur */
.charm-notification.warning {
    background: linear-gradient(135deg, #C09A7C, #97765E);
    box-shadow: 0 4px 5px #C09A7C;
}

.charm-notification.info {
    background: linear-gradient(135deg, #42a5f5, #26c6da);
    box-shadow: 0 4px 5px rgba(66, 165, 245, 0.3);
}

.charm-notification.success {
    background: linear-gradient(135deg, #66bb6a, #26a69a);
    box-shadow: 0 4px 5px rgba(102, 187, 106, 0.3);
}

.charm-notification.error {
    background: linear-gradient(135deg, #ef5350, #e53935);
    box-shadow: 0 4px 5px rgba(239, 83, 80, 0.3);
}

/* Animation de disparition */
.charm-notification.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

/* --- 8. RESPONSIVE --- */
@media (max-width: 768px) {
    .charm-modal-content {
        width: 95%;
        height: 95vh;
    }

    .charm-modal-body {
        flex-direction: column;
    }

    #charm-filters-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .selected-charms-display-area {
        padding: 15px;
        min-height: 100px;
    }

    .selected-charm-item,
    .open-charm-modal-btn {
        width: 70px;
        height: 70px;
    }

    .accordion-title {
        font-size: 18px;
    }

    .charm-notification {
        padding: 14px 16px;
        font-size: 13px;
        margin-bottom: 16px;
    }

    .charm-notification-content {
        gap: 10px;
    }

    .charm-notification-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .charm-notification-close {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

#selected-charm-names {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Style pour quand un charm est sélectionné */
#selected-charm-names.has-selection {
    opacity: 1;
    font-weight: 500;
    color: var(--text-color);
}


.accordion-toggle {
    background-color: #f7f6f4;
    padding: 20px !important;
    border: solid 2px #97765E !important;
    border-radius: 0px 0px 0 0;
}

.accordion-content {
    border-left: solid 2px #97765E !important;
    border-right: solid 2px #97765E !important;
    border-bottom: solid 2px #97765E !important;
}


.charm-notification {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    max-width: 90vw !important;
    width: auto !important;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.charm-notification.show {
    opacity: 1;
    pointer-events: auto;
}

.charm-notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) !important;
}

.charm-notification-content {
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 500px;
}

.charm-notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.charm-notification-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
}

.charm-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.charm-notification-close:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .charm-notification {
        top: 10px !important;
        max-width: 95vw !important;
    }

    .charm-notification-content {
        min-width: auto;
        padding: 12px 15px;
    }

    .charm-notification-text {
        font-size: 13px;
    }
}



/* Styles pour l'affichage détaillé des prix */
.price-display {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.price-line.support-price {
    color: #666;
    font-size: 14px;
}

.price-line.charm-price {
    color: #666;
    font-size: 14px;
    padding-left: 10px;
    border-left: 2px solid #ddd;
    margin-left: 5px;
}

.price-line.total-price {
    border-top: 2px solid #333;
    padding-top: 10px;
    margin-top: 5px;
    font-weight: bold;
    color: #333;
}

.price-label {
    flex: 1;
}

.price-value {
    font-weight: 500;
    color: #333;
}

.charms-price-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Animation pour l'ajout/suppression des lignes de charm */
.charm-price-line {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.charm-price-line.show {
    opacity: 1;
    transform: translateY(0);
}

.charm-price-line.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .price-line {
        font-size: 13px;
    }

    .price-display {
        padding: 12px;
    }
}

.total-price.updated {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.total-price.updated .price-value {
    color: #28a745;
    transition: color 0.3s ease;
}


/* Styles pour l'affichage des charms dans le mini-panier */
.mini-cart-charm-details {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #f0f0f0;
}

.mini-cart-charm-details small {
    display: block;
    line-height: 1.4;
    margin-bottom: 2px;
}

/* Styles pour l'affichage détaillé dans le panier */
.cart-item-breakdown {
    font-size: 12px;
    margin-top: 5px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.cart-item-breakdown .base-product {
    color: #666;
    margin-bottom: 3px;
}

.cart-item-breakdown .charm-item {
    color: #666;
    margin-bottom: 2px;
    padding-left: 10px;
}

.cart-item-breakdown .total-line {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #ddd;
}

/* Masquer les détails sur mobile pour économiser l'espace */
@media (max-width: 768px) {
    .cart-item-breakdown {
        font-size: 11px;
        padding: 5px;
    }

    .mini-cart-charm-details small:last-child {
        display: none;
        /* Masquer la liste des noms sur mobile */
    }
}

/* Styles pour la page panier complète */
.woocommerce-cart .cart-item-breakdown {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13px;
}

/* Animation subtile pour les détails des charms */
.mini-cart-charm-details {
    opacity: 0;
    animation: fadeInCharmDetails 0.3s ease forwards;
}

@keyframes fadeInCharmDetails {
    to {
        opacity: 1;
    }
}


/* Styles pour la page panier - charms personnalisés */

/* Conteneur principal pour le détail des charms */
.cart-charm-breakdown {
    margin-top: 10px !important;
    padding: 12px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    border-left: 3px solid #007cba !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
}

/* Animation d'apparition */
.cart-charm-breakdown {
    opacity: 0;
    animation: fadeInCharmBreakdown 0.5s ease forwards;
}

@keyframes fadeInCharmBreakdown {
    to {
        opacity: 1;
    }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .cart-charm-breakdown {
        padding: 8px !important;
        font-size: 12px !important;
        margin-top: 8px !important;
    }

    .cart-charm-breakdown>div {
        font-size: 11px !important;
    }
}

/* Styles pour le prix avec détail */
.cart-price-breakdown {
    text-align: right;
}

.cart-price-breakdown .main-price {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 2px;
}

.cart-price-breakdown .price-detail {
    font-size: 11px !important;
    color: #666 !important;
    opacity: 0.8;
}

/* Badge de personnalisation */
.wc-block-cart-item__product [style*="background: #e8f4f8"] {
    background: #e8f4f8 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    font-size: 12px !important;
    margin-top: 6px !important;
}

/* Amélioration de l'affichage dans le contexte WooCommerce Blocks */
.wc-block-components-product-details__vos-charms {
    display: none !important;
    /* Masquer l'ancienne version */
}

/* Styles pour les hooks classiques WooCommerce (panier classique) */
.cart_item .cart-charm-breakdown {
    max-width: 100%;
    box-sizing: border-box;
}

/* Espacement amélioré */
.woocommerce-cart-form .cart-charm-breakdown {
    margin: 10px 0;
}

/* Styles pour les écrans très petits */
@media (max-width: 480px) {
    .cart-charm-breakdown {
        padding: 6px !important;
        border-left-width: 2px !important;
    }

    .cart-charm-breakdown>div {
        font-size: 10px !important;
        padding: 2px 0 !important;
    }

    .cart-price-breakdown .main-price {
        font-size: 14px !important;
    }

    .cart-price-breakdown .price-detail {
        font-size: 10px !important;
    }
}

/* Amélioration de la lisibilité */
.cart-charm-breakdown [style*="border-bottom"] {
    border-color: #e1e1e1 !important;
    margin: 2px 0 !important;
}

.cart-charm-breakdown [style*="border-top"] {
    border-color: #007cba !important;
    margin-top: 6px !important;
    padding-top: 8px !important;
}

/* Animation hover pour interactivité */
.cart-charm-breakdown:hover {
    background: #f0f8ff !important;
    transition: background-color 0.3s ease;
}

/* Amélioration du contraste */
.cart-charm-breakdown [style*="color: #666"] {
    color: #555 !important;
}

.cart-charm-breakdown [style*="color: #333"] {
    color: #222 !important;
}

.cart-charm-breakdown [style*="color: #007cba"] {
    color: #005a87 !important;
    font-weight: 600 !important;
}


.filter-item label input[value="charms"] {
    display: flex !important;
}


/* === STYLES POUR LES FLÈCHES MOBILES/TABLETTES === */

/* Conteneur des flèches mobiles */
.mobile-arrows {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    z-index: 10;
}

/* Flèches individuelles */
.mobile-arrow {
    background: var(--brand-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    margin: 0;
}

/* État hover */
.mobile-arrow:hover:not(:disabled) {
    background: #A08A7A;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(185, 161, 138, 0.4);
}

/* État actif */
.mobile-arrow:active:not(:disabled) {
    transform: scale(0.95);
}

/* État désactivé */
.mobile-arrow:disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Masquer les flèches sur desktop */
@media (min-width: 1025px) {
    .mobile-arrows {
        display: none !important;
    }
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    .mobile-arrows {
        bottom: -3px;
        padding: 3px 6px;
    }

    .mobile-arrow {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .mobile-arrows {
        bottom: -2px;
        padding: 2px 4px;
        gap: 3px;
    }

    .mobile-arrow {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Animation d'apparition des flèches */
.mobile-arrows {
    opacity: 0;
    animation: fadeInArrows 0.3s ease forwards;
}

@keyframes fadeInArrows {
    to {
        opacity: 1;
    }
}

/* Animation de feedback lors du déplacement */
.selected-charm-item.moved-feedback {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* S'assurer que le conteneur parent permet le positionnement absolu */
.selected-charm-item {
    position: relative;
}

/* Alternative - Si les flèches doivent être toujours visibles sur tablette */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-arrows {
        display: flex !important;
    }
}