/**
 * Styles CSS pour l'interface frontend du plugin Agenda Customizer
 * Compatible avec Elementor et responsive design
 */

/* Variables CSS pour la cohérence */
:root {
    --ac-primary-color: #2c3e50;
    --ac-secondary-color: #3498db;
    --ac-accent-color: #e74c3c;
    --ac-success-color: #27ae60;
    --ac-warning-color: #f39c12;
    --ac-light-gray: #ecf0f1;
    --ac-dark-gray: #7f8c8d;
    --ac-border-radius: 8px;
    --ac-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --ac-transition: all 0.3s ease;
}

/* =====================================================
   STEP 0: Selection Screen Styles
   ===================================================== */

/* Container principal de sélection */
.step-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    min-height: 500px;
    background: #FAFAFA;
    width: 100%;
    box-sizing: border-box;
    margin: auto;
}

.selection-cards-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Carte de sélection */
.selection-card {
    flex: 1;
    max-width: 400px;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.selection-card:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Image de la carte */
.selection-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.selection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.selection-card:hover:not(.disabled) .selection-card-image img {
    transform: scale(1.05);
}

/* Contenu de la carte */
.selection-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.selection-card-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    text-align: center;
}

.selection-card-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 20px 0;
    text-align: center;
    flex: 1;
}

/* Bouton de la carte */
.selection-card-btn {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #FFFFFF;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
}

.selection-card-btn:hover:not(:disabled) {
    background: #333;
    transform: scale(1.02);
}

.selection-card-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Carte désactivée */
.selection-card.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.selection-card.disabled .selection-card-image {
    filter: grayscale(100%);
}

.disabled-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.disabled-overlay span {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Séparateur "ou" */
.selection-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.selection-separator span {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    text-transform: lowercase;
}

/* Responsive pour les cartes */
@media (max-width: 768px) {
    .selection-cards-container {
        flex-direction: column;
        gap: 15px;
    }

    .selection-card {
        max-width: 100%;
    }

    .selection-separator {
        padding: 10px 0;
    }

    .selection-separator span {
        position: relative;
    }

    .selection-separator span::before,
    .selection-separator span::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 80px;
        height: 1px;
        background: #ddd;
    }

    .selection-separator span::before {
        right: 100%;
        margin-right: 15px;
    }

    .selection-separator span::after {
        left: 100%;
        margin-left: 15px;
    }
}

/* =====================================================
   END: Selection Screen Styles
   ===================================================== */

/* Container principal de personnalisation */
.agenda-customizer-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--ac-border-radius);
    padding: 30px;
    margin: 20px 0;
    box-shadow: var(--ac-box-shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.agenda-customizer-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--ac-primary-color);
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid var(--ac-light-gray);
    padding-bottom: 15px;
}

/* Layout en deux colonnes */
.agenda-customizer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Section des options */
.agenda-customizer-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.agenda-option-group {
    background: var(--ac-light-gray);
    padding: 20px;
    border-radius: var(--ac-border-radius);
    border-left: 4px solid var(--ac-secondary-color);
}

.agenda-option-label {
    display: block;
    font-weight: 600;
    color: var(--ac-primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.agenda-option-description {
    font-size: 14px;
    color: var(--ac-dark-gray);
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Styles pour les selects */
.agenda-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--ac-border-radius);
    font-size: 16px;
    background: white;
    transition: var(--ac-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.agenda-select:focus {
    outline: none;
    border-color: var(--ac-secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Palette de couleurs */
.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--ac-transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.color-option.selected {
    border-color: var(--ac-secondary-color);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--ac-secondary-color);
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

/* Champ de texte personnalisé */
.agenda-text-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--ac-border-radius);
    font-size: 16px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: var(--ac-transition);
}

.agenda-text-input:focus {
    outline: none;
    border-color: var(--ac-secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.text-counter {
    text-align: right;
    font-size: 12px;
    color: var(--ac-dark-gray);
    margin-top: 5px;
}

.text-counter.warning {
    color: var(--ac-warning-color);
}

.text-counter.error {
    color: var(--ac-accent-color);
}

/* Sélection de symboles */
.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.symbol-option {
    position: relative;
    width: 60px;
    height: 60px;
    border: 2px solid #ddd;
    border-radius: var(--ac-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--ac-transition);
    background: white;
}

.symbol-option:hover {
    border-color: var(--ac-secondary-color);
    background: var(--ac-light-gray);
}

.symbol-option.selected {
    border-color: var(--ac-secondary-color);
    background: var(--ac-secondary-color);
    color: white;
}

.symbol-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.symbol-icon {
    font-size: 24px;
    pointer-events: none;
}

/* Section de prévisualisation */
.agenda-preview-section {
    position: sticky;
    top: 20px;
}

.agenda-preview-container {
    background: white;
    border: 2px solid #ddd;
    border-radius: var(--ac-border-radius);
    padding: 20px;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ac-box-shadow);
}

.agenda-preview-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ac-primary-color);
    margin-bottom: 20px;
}

.agenda-preview-mockup {
    width: 200px;
    height: 280px;
    border: 2px solid #333;
    border-radius: 8px;
    position: relative;
    background: #f8f9fa;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--ac-transition);
}

.agenda-preview-cover {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.agenda-preview-text {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    font-weight: 500;
    color: #95a5a6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.agenda-preview-text .symbol-line {
    font-size: 18px;
    margin-bottom: 3px;
}

.agenda-preview-text .text-line {
    font-size: 14px;
    line-height: 1.2;
}


/* Informations de prix */
.agenda-pricing-info {
    background: var(--ac-light-gray);
    padding: 20px;
    border-radius: var(--ac-border-radius);
    margin-top: 20px;
    border-left: 4px solid var(--ac-success-color);
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.pricing-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
    color: var(--ac-primary-color);
}

.pricing-label {
    color: var(--ac-dark-gray);
}

.pricing-value {
    font-weight: 500;
    color: var(--ac-primary-color);
}

/* Option charité */
.charity-option {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px;
    border-radius: var(--ac-border-radius);
    margin-top: 20px;
    text-align: center;
}

.charity-checkbox {
    margin-right: 10px;
    transform: scale(1.2);
}

/* Messages d'erreur et de succès */
.agenda-message {
    padding: 12px 15px;
    border-radius: var(--ac-border-radius);
    margin: 10px 0;
    font-weight: 500;
}

.agenda-message.error {
    background: #fee;
    color: var(--ac-accent-color);
    border: 1px solid #fcc;
}

.agenda-message.success {
    background: #efe;
    color: var(--ac-success-color);
    border: 1px solid #cfc;
}

.agenda-message.warning {
    background: #fff3cd;
    color: var(--ac-warning-color);
    border: 1px solid #ffeaa7;
}

/* Bouton de personnalisation */
.agenda-customizer-button-container {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Intégration avec le bouton d'achat WooCommerce */
.single-product .summary .cart {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.single-product .summary .cart .quantity {
    margin-bottom: 0;
    margin-right: 10px;
}

.single-product .summary .cart .single_add_to_cart_button {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

/* Wrapper du bouton de personnalisation */
.agenda-customizer-button-wrapper {
    display: inline-block;
    margin: 0 0 0 10px;
    vertical-align: top;
}

/* Intégration directe dans la zone cart */
.cart .agenda-customizer-button-container {
    display: inline-flex !important;
    margin: 0 !important;
    align-items: center !important;
}

/* Bouton déplacé dans la zone cart */
.agenda-customizer-button-container.moved {
    display: inline-flex !important;
}

/* Wrapper pour les boutons dans la zone cart */
.cart-buttons-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-top: 0 !important;
}

/* Style pour s'adapter au thème actuel */
#open-agenda-customizer {
    margin-left: 10px !important;
    vertical-align: middle !important;
    height: auto !important;
    line-height: normal !important;
}

/* S'assurer que les deux boutons ont la même hauteur */
.cart-buttons-wrapper .button {
    height: auto !important;
    min-height: 45px !important;
    line-height: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Styles spécifiques pour le bouton Personnaliser */
#open-agenda-customizer:hover {
    opacity: 0.9;
}

/* Assurer la compatibilité avec différents thèmes */
.woocommerce div.product form.cart .cart-buttons-wrapper .button {
    margin-left: 10px;
    vertical-align: middle;
}

/* Styles pour les petits écrans */
@media (max-width: 768px) {
    .cart-buttons-wrapper {
        flex-direction: row !important;
        width: 100% !important;
    }

    .cart-buttons-wrapper .button {
        flex: 1 !important;
        margin: 0 5px !important;
        text-align: center !important;
        justify-content: center !important;
    }

    #open-agenda-customizer {
        margin-left: 5px !important;
    }
}

/* Quand le bouton est dans la zone cart */
form.cart .agenda-customizer-button-container {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

form.cart .agenda-customizer-button {
    margin: 0 !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.agenda-customizer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #0d0d0d !important;
}

.agenda-customizer-button .button-text {
    font-family: inherit;
}

/* Résumé de personnalisation */
.customization-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.customization-summary h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.summary-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.edit-customization {
    background: #171717;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit-customization:hover {
    background: #0d0d0d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 23, 23, 0.3);
}

.summary-items {
    display: grid;
    gap: 8px;
}

.summary-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    min-width: 100px;
    margin-right: 15px;
    color: #34495e;
    font-weight: 600;
    font-size: 14px;
}

.color-preview {
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Styles pour le body quand la popup est ouverte */
body.popup-open {
    overflow: hidden !important;
}

/* Popup de personnalisation - Style moderne */
.agenda-customizer-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.popup-content {
    position: absolute;
    top: 2vh;
    left: 2vw;
    right: 2vw;
    bottom: 2vh;
    transform: none;
    transform-origin: center center;
    background: #FFFCF8;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(33, 29, 29, 0.15);
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    overflow: hidden;
    animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-header {
    background: #FFFFFF;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F4F2EF;
    flex-shrink: 0;
}

.popup-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #211D1D;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-title::before {
    content: "← Retour";
    font-size: 14px;
    font-weight: 400;
    color: #767373;
    cursor: pointer;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.popup-title::before:hover {
    color: #2c3e50;
    border-bottom-color: #2c3e50;
}

.popup-close {
    background: transparent;
    border: none;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.popup-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    background: #FAFAFA;
}

/* Layout principal avec prévisualisation et options */
.agenda-customizer-layout {
    display: flex;
    width: 100%;
    min-height: 100%;
    gap: 0;
}

/* Section de prévisualisation (gauche) */
.agenda-preview-section {
    flex: 0 0 45%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
}

.agenda-preview-container {
    background-image: url('https://www.moleskine.com/dw/image/v2/BFRN_PRD/on/demandware.static/-/Sites-masterCatalog_Moleskine/default/dw21fab882/images/large-PDP/gtin_8056999274573_01.png?sh=600');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 10px;
    padding: 25px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 250px;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    margin: 0 auto;
}

.agenda-preview-content {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
}

.agenda-preview-symbol {
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Section des options (droite) */
.agenda-customizer-options {
    flex: 1;
    padding: 15px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Style des barres de défilement */
.popup-body::-webkit-scrollbar {
    width: 8px;
}

.popup-body::-webkit-scrollbar-track {
    background: #F4F2EF;
    border-radius: 4px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: #A6A4A4;
    border-radius: 4px;
}

.popup-body::-webkit-scrollbar-thumb:hover {
    background: #767373;
}

/* Groupes d'options stylisés */
.agenda-option-group {
    margin-bottom: 12px;
    background: #F4F2EF;
    border-radius: 6px;
    padding: 12px;
    position: relative;
}

.agenda-option-group h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #211D1D;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agenda-option-group h3::before {
    content: counter(option-counter) ". ";
    counter-increment: option-counter;
    font-weight: 600;
    color: #FB603A;
}

.agenda-customizer-options {
    counter-reset: option-counter;
}

/* Bouton Modifier */
.option-modify-btn {
    background: transparent;
    border: none;
    color: #767373;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-modify-btn:hover {
    background: #F4F2EF;
    color: #211D1D;
}

/* État Valider */
.option-modify-btn.validate-mode {
    background: #FB603A;
    color: white;
}

.option-modify-btn.validate-mode:hover {
    background: #e55a36;
    color: white;
}

/* État Validé */
.option-modify-btn.validated-mode {
    background: #767373;
    color: white;
    cursor: not-allowed;
}

.option-modify-btn.validated-mode:hover {
    background: #767373;
    color: white;
}

/* Mise en évidence de l'option suivante */
.agenda-option-group.highlight-next {
    animation: highlightPulse 2s ease-in-out;
    border: 2px solid #FB603A;
}

/* Interface Accordéon */
.accordion-item {
    border: 1px solid #F4F2EF;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #FFFFFF;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background: #FFFCF8;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: #F4F2EF;
}

.accordion-header.active {
    background: #F4F2EF;
    border-bottom-color: #F4F2EF;
}

.option-title {
    font-size: 16px;
    font-weight: 500;
    color: #211D1D;
    margin: 0;
}

.accordion-toggle {
    width: 32px;
    height: 32px;
    border: 2px solid #FB603A;
    border-radius: 50%;
    background: #FFFFFF;
    color: #FB603A;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.accordion-toggle.active {
    background: #FB603A;
    color: #FFFFFF;
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-content.active {
    padding: 15px !important;
    max-height: 500px !important;
    display: block !important;
    overflow-y: auto !important;
}

/* États désactivés pour accordéon */
.accordion-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.accordion-item.disabled .accordion-toggle {
    border-color: #767373;
    color: #767373;
}

.accordion-item.disabled .option-title {
    color: #767373;
}

/* Option Logo */
.logo-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.logo-option.disabled .option-modify-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.logo-option.disabled h3 {
    color: #767373;
}

.logo-option.disabled {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Option Logo Activée */
.logo-option:not(.disabled) .option-modify-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.logo-option .option-modify-btn {
    background: #767373;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.logo-option .option-modify-btn:hover {
    background: #4A4444;
}

.quantity-warning {
    color: #767373;
    font-style: italic;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-warning .dashicons {
    font-size: 16px;
}

/* Éditeur de logo */
.logo-editor {
    padding: 15px;
    border: 1px solid #F4F2EF;
    border-radius: 6px;
    background: #FFFFFF;
}

.logo-upload-area {
    border: 2px dashed #A6A4A4;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #FFFCF8;
    transition: all 0.3s ease;
}

.logo-upload-area:hover {
    border-color: #FB603A;
    background: #F4F2EF;
}

.logo-upload-area.dragover {
    border-color: #FB603A;
    background: #F4F2EF;
}

.logo-preview {
    max-width: 150px;
    max-height: 100px;
    margin: 10px auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-upload {
    background: #FB603A;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #e55a36;
}

.btn-remove-logo {
    background: #767373;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

.btn-remove-logo:hover {
    background: #4A4444;
}

.upload-content {
    cursor: pointer;
}

.logo-preview-container {
    text-align: center;
}

/* Debug et test */
.logo-debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
    color: #6c757d;
}

.btn-test-logo {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 5px;
}

.btn-test-logo:hover {
    background: #138496;
}

/* Styles des éditeurs d'accordéon */
.text-editor-accordion p {
    margin-bottom: 10px;
    font-size: 13px;
}

.text-editor-accordion .input-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.text-editor-accordion .text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #F4F2EF;
    border-radius: 4px;
    font-size: 13px;
    height: 36px;
}

.text-editor-accordion .char-count {
    margin-left: 8px;
    color: #767373;
    font-size: 11px;
    min-width: 30px;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
    max-width: 210px;
    margin-left: auto;
    margin-right: auto;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
}

.symbol-option {
    width: 50px;
    height: 50px;
    border: 2px solid #F4F2EF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    background: linear-gradient(135deg, #85714D, #6B5A3D);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(133, 113, 77, 0.3);
}

.color-option {
    width: 45px;
    height: 45px;
    border: 2px solid #F4F2EF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.symbol-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.5);
    border-color: #f39c12;
}

.color-option:hover {
    border-color: #FB603A;
}

.symbol-option.selected {
    border-color: #FB603A;
    border-width: 3px;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(251, 96, 58, 0.5);
}

.color-option.selected {
    border-color: #FB603A;
    border-width: 3px;
    transform: scale(1.05);
}

.font-list {
    margin-bottom: 15px;
}

.font-option {
    padding: 12px 16px;
    border: 2px solid #F4F2EF;
    border-radius: 8px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    background: #FFFCF8;
    font-family: Arial, sans-serif;
}

.font-option:hover {
    border-color: #FB603A;
}

.font-option.selected {
    border-color: #FB603A;
    background: rgba(251, 96, 58, 0.1);
}

.font-price {
    color: #FB603A;
    font-size: 12px;
    font-weight: bold;
}

.font-default {
    color: #767373;
    font-size: 12px;
    font-style: italic;
}

.editor-actions {
    text-align: center;
    margin-top: 15px;
}

.btn-validate {
    background: #FB603A;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-validate:hover {
    background: #e55a36;
}

/* Boutons finaux */
.final-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #F4F2EF;
}

.final-buttons .button-secondary,
.final-buttons .button-primary {
    flex: 1;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.final-buttons .button-secondary {
    background: #F4F2EF;
    color: #767373;
}

.final-buttons .button-secondary:hover {
    background: #E8E6E3;
    color: #211D1D;
}

.final-buttons .button-primary {
    background: #FB603A;
    color: white;
}

.final-buttons .button-primary:hover {
    background: #e55a36;
}

@keyframes highlightPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(251, 96, 58, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(251, 96, 58, 0.1);
    }
}

.option-modify-btn::after {
    content: "✓";
    background: #28a745;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Valeur actuelle de l'option */
.option-current-value {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 400;
}

/* Sélecteurs de couleur */
.color-options {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-option.selected {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #2c3e50;
}

.color-option:hover {
    transform: scale(1.1);
}

/* Section de pricing dans les options */
.pricing-summary-in-options {
    margin-top: 10px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 2px solid #2c3e50;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
}

.pricing-summary-in-options .pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    color: #2c3e50;
}

.pricing-summary-in-options .pricing-line.total {
    border-top: 2px solid #2c3e50;
    margin-top: 6px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 14px;
}

.pricing-summary-in-options .pricing-label {
    color: #6c757d;
}

.pricing-summary-in-options .pricing-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Boutons dans la partie droite */
.footer-buttons-in-options {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px;
    margin: 0 -15px -15px -15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
}

.footer-buttons-in-options .button-primary {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.footer-buttons-in-options .button-primary:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.footer-buttons-in-options .button-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.footer-buttons-in-options .button-secondary:hover {
    background: #f8f9fa;
    color: #2c3e50;
    border-color: #dee2e6;
}

/* Éditeurs d'options */
.option-editor {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Éditeur de texte moderne */
.modern-text-editor {
    background: #f8f9fa;
    border: none;
    padding: 20px;
    border-radius: 12px;
}

.editor-header {
    margin-bottom: 15px;
}

.editor-subtitle {
    font-size: 13px;
    color: #6c757d;
    font-weight: 400;
}

.text-fields-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.text-field-group {
    position: relative;
}

.text-field-label {
    display: block;
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.modern-text-input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.modern-text-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.char-counter {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #6c757d;
    margin-top: 16px;
}

/* Éditeur de symboles moderne */
.modern-symbol-editor {
    background: #f8f9fa;
    border: none;
    padding: 20px;
    border-radius: 12px;
}

.symbol-carousel {
    display: flex;
    align-items: center;
    gap: 15px;
}

.carousel-arrow {
    background: #e9ecef;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 18px;
    color: #495057;
}

.carousel-arrow:hover:not(:disabled) {
    background: #dee2e6;
}

.carousel-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.symbol-grid-container {
    flex: 1;
    overflow: hidden;
}

.symbol-grid-modern {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.symbol-option-modern {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.symbol-option-modern:hover {
    border-color: #007bff;
    transform: translateY(-2px);
}

.symbol-option-modern.selected {
    border-color: #dc3545;
    border-width: 3px;
    background: #fff5f5;
}

.symbol-icon {
    font-size: 24px;
}

/* Éditeur de couleur moderne */
.modern-color-editor {
    background: #f8f9fa;
    border: none;
    padding: 20px;
    border-radius: 12px;
}

.color-options-modern {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.color-option-modern {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-option-modern:hover {
    transform: scale(1.1);
}

.color-option-modern.selected {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px white, 0 0 0 5px #2c3e50;
}

.text-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-save {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
}

.btn-save {
    background: #2c3e50;
    color: white;
}

.btn-save:hover {
    background: #34495e;
}

/* Grille de symboles */
.symbol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.symbol-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    min-height: 60px;
    background: #fff;
}

.symbol-option:hover {
    border-color: #007cba;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.symbol-option.selected {
    border-color: #007cba;
    background: #007cba;
    color: white;
}

/* Styles spécifiques pour les Dashicons */
.dashicons-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.dashicon-option {
    flex-direction: column;
    padding: 12px 8px;
    min-height: 80px;
    text-align: center;
}

.dashicon-option .dashicons {
    font-size: 20px;
    margin-bottom: 5px;
    display: block;
}

.dashicon-option .icon-name {
    font-size: 11px;
    line-height: 1.2;
    color: #666;
    font-weight: 500;
}

.dashicon-option:hover .icon-name {
    color: #007cba;
}

.dashicon-option.selected .icon-name {
    color: white;
}

.dashicons-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    margin-bottom: 15px;
}

.dashicons-info p {
    margin: 0;
    display: flex;
    align-items: center;
}

.dashicons-info .dashicons {
    color: #007cba;
}

/* Styles pour les Dashicons dans la prévisualisation */
#preview-text .symbol-line .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

/* Assurer que les Dashicons sont visibles dans la prévisualisation */
.agenda-preview-text .dashicons,
.preview-text .dashicons,
#preview-text .dashicons {
    font-family: dashicons;
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    font-weight: normal;
    font-style: normal;
    vertical-align: top;
    text-align: center;
    -webkit-transition: color .1s ease-in;
    transition: color .1s ease-in;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ligne de symbole dans la prévisualisation */
.symbol-line {
    text-align: center;
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.2;
}

.symbol-line .dashicons {
    color: inherit;
}

/* Liste de polices */
.font-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.font-option {
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.font-option:hover {
    border-color: #2c3e50;
    background: white;
}

.popup-footer {
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

/* Section de pricing */
.pricing-summary {
    margin-bottom: 15px;
}

.pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #2c3e50;
}

.pricing-line.total {
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
    padding-top: 10px;
    font-weight: 600;
    font-size: 16px;
}

.pricing-label {
    color: #6c757d;
}

.pricing-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Boutons du footer */
.footer-buttons {
    display: flex;
    gap: 10px;
}

.footer-buttons .button-primary {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.footer-buttons .button-primary:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.footer-buttons .button-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.footer-buttons .button-secondary:hover {
    background: #f8f9fa;
    color: #2c3e50;
    border-color: #dee2e6;
}

.popup-footer .button-secondary {
    background: var(--ac-gray);
    color: var(--ac-text-color);
    border: 1px solid var(--ac-border-color);
    padding: 12px 24px;
    border-radius: var(--ac-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.popup-footer .button-secondary:hover {
    background: var(--ac-border-color);
}

.popup-footer .button-primary {
    background: var(--ac-accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--ac-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-footer .button-primary:hover {
    background: var(--ac-accent-dark);
    transform: translateY(-1px);
}

.popup-footer .button-primary:disabled {
    background: var(--ac-gray);
    cursor: not-allowed;
    transform: none;
}

/* Ajustements pour la popup */
.agenda-customizer-popup .agenda-customizer-layout {
    max-height: none;
}

.agenda-customizer-popup .agenda-preview-section {
    position: static;
    background: var(--ac-light-gray);
    border-radius: var(--ac-border-radius);
    padding: 20px;
}

.agenda-customizer-popup .pricing-section {
    background: white;
    border: 1px solid var(--ac-border-color);
    border-radius: var(--ac-border-radius);
    padding: 20px;
    margin-top: 20px;
}

/* Styles pour les options de couleur et forme */
.inline-color-option {
    box-sizing: border-box;
    border: 3px solid transparent !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.inline-color-option.selected {
    border-color: var(--ac-accent-color) !important;
    box-shadow: inset 0 0 0 2px #fff !important;
}

.shape-preview {
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.shape-preview.selected,
.shape-option.selected .shape-preview {
    border-color: var(--ac-accent-color) !important;
    box-shadow: 0 0 0 1px var(--ac-accent-color);
}

/* Responsive design pour la popup */
@media (max-width: 1024px) {
    .popup-content {
        max-width: 95%;
        margin: 10px;
    }

    .agenda-customizer-popup .agenda-customizer-layout {
        flex-direction: column;
    }

    .agenda-customizer-popup .agenda-customizer-options {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .popup-content {
        max-height: 95vh;
    }

    .popup-header {
        padding: 15px 20px;
    }

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

    .popup-body {
        padding: 20px;
    }

    .popup-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .popup-footer .button-secondary,
    .popup-footer .button-primary {
        width: 100%;
        justify-content: center;
    }

    /* Responsive pour le bouton de personnalisation */
    .single-product .summary .cart {
        flex-direction: column;
        align-items: stretch;
    }

    /* Responsive pour le résumé de personnalisation */
    .customization-summary {
        margin: 15px 0;
        padding: 15px;
        font-size: 14px;
        background: #ffffff;
        border: 1px solid #dee2e6;
    }

    .customization-summary h4 {
        font-size: 16px;
        margin-bottom: 12px;
        text-align: center;
        color: #2c3e50;
    }

    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
        gap: 5px;
        border-bottom: 1px solid #f1f3f4;
    }

    .summary-item strong {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 3px;
        font-size: 13px;
        color: #495057;
        font-weight: 600;
    }

    .summary-item .color-preview {
        margin-top: 3px;
    }

    /* Styles pour les boutons en responsive */
    .customization-summary .btn-modify,
    .customization-summary .edit-customization {
        width: 100%;
        margin-top: 15px;
        padding: 12px;
        font-size: 14px;
        text-align: center;
        background: #171717;
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .customization-summary .btn-modify:hover,
    .customization-summary .edit-customization:hover {
        background: #0d0d0d;
    }

    .cart-buttons-wrapper {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .agenda-customizer-button-container {
        order: 2;
        /* Afficher après le bouton d'achat sur mobile */
        margin: 0;
        width: 100%;
    }

    .agenda-customizer-button {
        padding: 12px 20px !important;
        font-size: 13px !important;
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    /* Responsive popup */
    .popup-content {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
    }

    .agenda-customizer-layout {
        flex-direction: column !important;
    }

    .agenda-preview-section {
        flex: 0 0 auto !important;
        width: 100% !important;
        padding: 15px !important;
    }

    .agenda-preview-container {
        width: 180px !important;
        height: 250px !important;
        padding: 20px 15px !important;
    }

    .agenda-customizer-options {
        padding: 20px !important;
    }

    .popup-footer {
        padding: 20px !important;
    }

    .footer-buttons {
        flex-direction: column !important;
    }

    .color-palette {
        grid-template-columns: repeat(4, 1fr);
    }

    .symbol-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animation de fermeture */
.agenda-customizer-popup.closing .popup-content {
    animation: popupSlideOut 0.3s ease-in forwards;
}

@keyframes popupSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* Responsive design pour écrans moyens */
@media (max-width: 1200px) and (min-width: 769px) {
    .popup-content {
        top: 1vh !important;
        left: 1vw !important;
        right: 1vw !important;
        bottom: 1vh !important;
    }

    .agenda-preview-container {
        width: 300px !important;
        height: 450px !important;
        padding: 40px 30px !important;
    }

    .agenda-preview-year {
        font-size: 24px !important;
    }

    .agenda-preview-text {
        font-size: 16px !important;
    }

    .agenda-preview-symbol {
        font-size: 20px !important;
    }
}

/* Responsive Design pour tablette */
@media (max-width: 1024px) and (min-width: 769px) {
    .customization-summary {
        padding: 18px;
        margin: 20px 0;
    }

    .summary-item {
        padding: 8px 0;
        flex-direction: row;
        align-items: center;
    }

    .summary-item strong {
        min-width: 120px;
        font-size: 14px;
    }

    .customization-summary h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* Responsive Design pour mobile */
@media (max-width: 768px) {
    .agenda-customizer-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .agenda-customizer-container {
        padding: 20px;
        margin: 10px 0;
    }

    .color-palette {
        grid-template-columns: repeat(5, 1fr);
    }

    .symbol-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .agenda-preview-mockup {
        width: 150px;
        height: 210px;
    }

    .agenda-preview-section {
        position: static;
    }
}

@media (max-width: 480px) {
    .agenda-customizer-title {
        font-size: 20px;
    }

    .color-palette {
        grid-template-columns: repeat(4, 1fr);
    }

    .symbol-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .agenda-preview-mockup {
        width: 120px;
        height: 168px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.agenda-customizer-container {
    animation: fadeIn 0.5s ease-out;
}

/* Compatibilité Elementor */
.elementor-widget-container .agenda-customizer-container {
    margin: 0;
}

.elementor-section .agenda-customizer-container {
    box-shadow: none;
    border: none;
    background: transparent;
}

/* Loading state */
.agenda-customizer-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.agenda-customizer-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--ac-light-gray);
    border-top: 3px solid var(--ac-secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Styles pour le monogramme */
.monogram-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.monogram-box {
    width: 40px;
    height: 40px;
    border: 2px solid currentColor;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    background: transparent;
}

/* Aperçu dans la prévisualisation */
#preview-text .monogram-container {
    margin: 20px auto;
}

#preview-text .monogram-box {
    width: 35px;
    height: 35px;
    font-size: 20px;
    border-width: 2px;
}

/* Style pour l'éditeur de monogramme */
.monogram-editor-accordion .monogram-input {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 15px;
}

/* Styles pour les formes de monogramme (rond/carré) */
.monogram-box.monogram-round {
    border-radius: 50% !important;
}

.monogram-box.monogram-square {
    border-radius: 5px !important;
}

/* Sélecteur de forme dans l'éditeur */
.monogram-shape-selector {
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* S'assurer que le bouton de validation est visible */
.monogram-editor-accordion .editor-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.shape-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.shape-option {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease;
}

.shape-option:hover {
    transform: scale(1.05);
}

.shape-preview {
    width: 60px;
    height: 60px;
    border: 2px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
    background: #f5f5f5;
    color: #333;
}

/* Fix for logo quantity input when option is disabled */
.agenda-option-group.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Override for the notice section to ensure it remains interactive */
.agenda-option-group.disabled .logo-quantity-notice {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.agenda-option-group.disabled .customizer-quantity-control {
    pointer-events: auto !important;
}

.agenda-option-group.disabled .customizer-qty-input {
    pointer-events: auto !important;
    cursor: text !important;
    background-color: #fff !important;
    border-color: #ccc !important;
    color: #333 !important;
}

.shape-preview.selected {
    border-color: #85714D;
    border-width: 3px;
    background: #85714D;
    color: white;
    box-shadow: 0 2px 8px rgba(133, 113, 77, 0.3);
}

.shape-preview.shape-round {
    border-radius: 50%;
}

.shape-preview.shape-square {
    border-radius: 5px;
}