/* ================================
   STYLES WOOCOMMERCE VOYAGES PARADIS
   ================================ */

/* === BOUTON PDF VOYAGE === */
.voyage-pdf-download {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.voyage-pdf-download a,
.voyage-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    color: white !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(44, 90, 160, 0.2);
    border: none;
    cursor: pointer;
}

.voyage-pdf-download a:hover,
.voyage-pdf-btn:hover {
    background: linear-gradient(135deg, #1e4080 0%, #2c5aa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
    text-decoration: none;
    color: white !important;
}

.voyage-pdf-download a::before {
    font-size: 1.2em;
}

/* === PRIX WOOCOMMERCE DANS MODULES === */
.vp-wc-price,
.wc-price {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
}

.vp-wc-price .woocommerce-Price-amount,
.wc-price .woocommerce-Price-amount {
    color: white;
    font-weight: 700;
    font-size: 1.2em;
}

.vp-wc-price .woocommerce-Price-currencySymbol,
.wc-price .woocommerce-Price-currencySymbol {
    font-size: 0.9em;
}

/* Styles pour les prix barrés (promos) */
.vp-wc-price del,
.wc-price del {
    opacity: 0.7;
    font-size: 0.9em;
}

.vp-wc-price ins,
.wc-price ins {
    text-decoration: none;
    font-weight: bold;
}

/* === PAGES PRODUIT VOYAGE === */
.single-product.postid-voyage {
    /* Styles spécifiques aux pages produit voyage */
}

.single-product .product-voyage-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2c5aa0;
}

.product-voyage-info h3 {
    color: #2c5aa0;
    margin-top: 0;
    font-size: 1.3em;
}

.voyage-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.voyage-detail-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.voyage-detail-item .icon {
    font-size: 1.5em;
    margin-bottom: 8px;
    display: block;
}

.voyage-detail-item .label {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 4px;
}

.voyage-detail-item .value {
    font-weight: 600;
    color: #2c5aa0;
}

/* === LISTE PRODUITS VOYAGE === */
.voyages-source-woocommerce .voyage-item {
    position: relative;
}

/* Badge pour les produits en promo */
.voyage-item.on-sale::before {
    content: "PROMO";
    position: absolute;
    top: 15px;
    left: 15px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    font-size: 0.7em;
    font-weight: bold;
    border-radius: 4px;
    z-index: 3;
}

/* === ONGLET PDF ADMIN === */
#voyage_pdf_data .form-field {
    margin-bottom: 20px;
}

#voyage_pdf_data .button {
    margin-top: 10px;
}

.woocommerce_options_panel h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

/* === STYLES ADMIN MIGRATION === */
.migration-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.migration-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.migration-stat-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.migration-stat-card .number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.migration-stat-card .label {
    font-size: 0.8em;
    color: #666;
}

.migration-stat-card.total h4 { color: #2c5aa0; }
.migration-stat-card.migrated h4 { color: #28a745; }
.migration-stat-card.products h4 { color: #ffc107; }
.migration-stat-card.remaining h4 { color: #dc3545; }

/* === BOUTONS D'ACTION === */
.button.migration-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.button.migration-button:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.button.danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.button.danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

/* === NOTICES ADMIN === */
.notice.voyage-notice {
    border-left-color: #2c5aa0;
    padding: 15px 20px;
}

.notice.voyage-notice h3 {
    margin: 0 0 10px 0;
    color: #2c5aa0;
}

.notice.voyage-notice .notice-buttons {
    margin-top: 15px;
}

.notice.voyage-notice .button {
    margin-right: 10px;
}

/* === STYLES POUR MODULES DIVI === */
.vp-source-woocommerce {
    /* Styles spécifiques aux modules utilisant WooCommerce */
}

.vp-source-cpt {
    /* Styles spécifiques aux modules utilisant le CPT legacy */
}

/* Badge pour différencier les sources */
.vp-source-woocommerce::before {
    content: "WooCommerce";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #96588a;
    color: white;
    padding: 2px 6px;
    font-size: 0.7em;
    border-radius: 3px;
    z-index: 10;
    display: none; /* Masqué par défaut */
}

.vp-source-cpt::before {
    content: "Legacy";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #f39c12;
    color: white;
    padding: 2px 6px;
    font-size: 0.7em;
    border-radius: 3px;
    z-index: 10;
    display: none; /* Masqué par défaut */
}

/* Afficher les badges en mode debug */
body.debug-voyages .vp-source-woocommerce::before,
body.debug-voyages .vp-source-cpt::before {
    display: block;
}

/* === COMPATIBILITÉ AVEC STYLES EXISTANTS === */
.voyages-grid {
    /* Assurer la compatibilité avec les styles existants */
}

.voyage-item {
    /* Styles existants préservés */
}

.voyage-card-link {
    /* Styles existants préservés */
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .voyage-details-grid {
        grid-template-columns: 1fr;
    }
    
    .migration-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .voyage-pdf-download a,
    .voyage-pdf-btn {
        display: block;
        text-align: center;
        width: 100%;
    }
    
    .voyages-source-woocommerce .voyage-item::after {
        top: 5px;
        right: 5px;
        width: 25px;
        height: 25px;
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .migration-status-grid {
        grid-template-columns: 1fr;
    }
    
    .voyage-detail-item {
        padding: 10px;
    }
    
    .voyage-pdf-download {
        padding: 10px;
    }
    
    .voyage-pdf-download a,
    .voyage-pdf-btn {
        padding: 10px 16px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.migration-stat-card {
    animation: fadeInScale 0.5s ease forwards;
}

.migration-stat-card:nth-child(2) { animation-delay: 0.1s; }
.migration-stat-card:nth-child(3) { animation-delay: 0.2s; }
.migration-stat-card:nth-child(4) { animation-delay: 0.3s; }

.voyage-pdf-download {
    animation: fadeInScale 0.6s ease forwards;
}

/* === COMPATIBILITÉ DIVI === */
.et_pb_module .voyage-pdf-download {
    margin: 0;
}

.et_pb_section .voyage-pdf-download a {
    display: inline-flex;
}

.et_pb_module .vp-wc-price {
    margin-bottom: 12px;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .product-voyage-info {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .voyage-detail-item {
        background: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .migration-stat-card {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .voyage-pdf-download {
        background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    }
}

/* === ACCESSIBILITÉ === */
.voyage-pdf-download a:focus,
.voyage-pdf-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.button.migration-button:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

/* Améliorer le contraste */
.voyage-pdf-download a,
.voyage-pdf-btn {
    min-height: 44px; /* Taille minimum tactile */
}

@media (prefers-reduced-motion: reduce) {
    .voyage-pdf-download a,
    .voyage-pdf-btn,
    .button.migration-button,
    .migration-stat-card,
    .voyage-pdf-download {
        transition: none;
        animation: none;
    }
}

/* === STYLES DE DEBUG === */
.debug-voyages .vp-voyages-wrapper {
    position: relative;
    border: 2px dashed #ffc107;
    padding: 10px;
}

.debug-voyages .vp-voyages-wrapper::before {
    content: "Module Voyages - Source: " attr(class);
    position: absolute;
    top: -20px;
    left: 0;
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    font-size: 0.8em;
    border-radius: 3px;
}

/* === PRINT STYLES === */
@media print {
    .voyage-pdf-download,
    .migration-status,
    .notice,
    .voyages-source-woocommerce .voyage-item::after,
    .voyage-item.on-sale::before {
        display: none;
    }
    
    .voyage-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* === STYLES POUR COMPATIBILITÉ LEGACY === */
.voyage-legacy-mode .vp-source-cpt {
    border: 2px solid #f39c12;
    background: rgba(243, 156, 18, 0.1);
    padding: 10px;
    border-radius: 4px;
    position: relative;
}

.voyage-legacy-mode .vp-source-cpt::before {
    content: "⚠️ Mode Legacy - CPT voyage-groupe";
    display: block;
    position: absolute;
    top: -12px;
    left: 10px;
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 3px;
}

/* === STYLES POUR ADMINISTRATION === */
.wrap h1 {
    position: relative;
}

.wrap h1::before {
    margin-right: 10px;
}

.card {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.card h2 {
    margin-top: 0;
    color: #23282d;
}

.migration-status {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

/* =======================================
   AJOUT: HAUTEUR UNIFORME IMAGES VOYAGES
   ======================================= */

/* Container principal de l'image - HAUTEUR FIXE FORCÉE */
.voyage-image {
    height: 250px !important;
    overflow: hidden !important;
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

/* Wrapper de l'image */
.voyage-image .image-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* IMAGE - FORCER L'UNIFORMITÉ */
.voyage-image img,
.voyage-image .featured-image,
.voyage-image .wp-post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* RESPONSIVE pour les images */
@media (max-width: 768px) {
    .voyage-image {
        height: 200px !important;
    }
}

@media (max-width: 480px) {
    .voyage-image {
        height: 180px !important;
    }
}

/* =======================================
   AJOUT: TITRES ALIGNÉS EN HAUT
   ======================================= */

.voyage-titles {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 15px 0;
}

.voyage-titles h2,
.voyage-titles h3 {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    margin: 0 0 8px 0;
    line-height: 1.3;
    padding-top: 0;
}