/**
 * H1Site Price Widget for Elementor
 * 3 Types: Simple, List, Image Flip
 */

/* ===== WRAPPER ===== */
.h1site-price-wrapper {
    width: 100%;
    max-width: 100%;
}

.h1site-price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

/* Type List - 1 colonne par défaut */
.h1site-price-grid.h1site-type-list {
    grid-template-columns: 1fr;
}

/* Type Image */
.h1site-price-grid.h1site-type-image {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== CARD CONTAINER ===== */
.h1site-price-card-container {
    border-radius: 24px;
    display: flex;
    width: 100%;
    min-width: 0;
}

.h1site-price-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    padding: 30px 24px;
}

.h1site-price-card-container:hover .h1site-price-card {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

/* ===== BADGE ===== */
.h1site-price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #C69E9C 0%, #d4b5b3 100%);
    color: #ffffff;
    padding: 6px 14px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(198, 158, 156, 0.4);
    z-index: 10;
}

/* ===== MEDIA (Icon/Image Circle) ===== */
.h1site-price-media {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(198, 158, 156, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.h1site-price-media i {
    font-size: 32px;
    color: #C69E9C;
}

.h1site-price-media svg {
    width: 32px;
    height: 32px;
    fill: #C69E9C;
}

.h1site-price-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== TITLE ===== */
.h1site-price-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* ===== DURATION ===== */
.h1site-price-duration {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.h1site-price-duration span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.h1site-price-duration span::before {
    content: '';
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* ===== PRICING ===== */
.h1site-price-pricing {
    text-align: center;
    padding: 0 0 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.h1site-price-amount {
    font-size: 28px;
    font-weight: 900;
    color: #C69E9C;
    line-height: 1;
    display: block;
}

.h1site-price-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-top: 6px;
    display: block;
}

/* ===== DESCRIPTION ===== */
.h1site-price-description {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin-bottom: 20px;
}

/* ===== CTA BUTTON ===== */
.h1site-price-cta {
    display: block;
    width: 100%;
    background: #ffffff;
    color: #1a1a2e;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    flex-shrink: 0;
}

.h1site-price-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(198, 158, 156, 0.5), transparent);
    transition: left 0.5s ease;
}

.h1site-price-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(198, 158, 156, 0.4);
}

.h1site-price-cta:hover::before {
    left: 100%;
}

/* ========================================
   LIST CARD STYLES
   ======================================== */
.h1site-list-container {
    width: 100%;
}

.h1site-list-card {
    align-items: stretch;
    padding: 30px 24px 24px;
    width: 100%;
}

.h1site-list-card .h1site-price-title {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.h1site-price-list {
    width: 100%;
    margin-bottom: 20px;
}

.h1site-list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.h1site-list-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.h1site-list-dots {
    flex-grow: 1;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
    margin: 0 10px 4px;
    min-width: 20px;
}

.h1site-list-price {
    color: #C69E9C;
    font-size: 16px;
    font-weight: 700;
}

.h1site-list-note {
    width: 100%;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    font-style: italic;
}

/* ========================================
   IMAGE FLIP CARD STYLES
   ======================================== */
.h1site-image-container {
    perspective: 1000px;
    height: 380px;
    width: 100%;
    min-width: 0;
}

.h1site-image-container:hover .h1site-price-card {
    transform: none;
    box-shadow: none;
}

.h1site-flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    padding: 0;
}

.h1site-image-container.has-flip:hover .h1site-flip-card {
    transform: rotateY(180deg);
}

.h1site-card-front,
.h1site-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
}

.h1site-card-front {
    z-index: 2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.h1site-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.h1site-image-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
    text-align: center;
}

.h1site-image-content .h1site-price-title {
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.h1site-image-content .h1site-price-amount {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.h1site-card-back {
    transform: rotateY(180deg);
    z-index: 1;
    padding: 30px 24px;
    align-items: center;
    justify-content: center;
}

.h1site-card-back .h1site-price-title {
    margin-bottom: 10px;
}

.h1site-card-back .h1site-price-amount {
    margin-bottom: 20px;
}

.h1site-card-back .h1site-price-description {
    margin-bottom: 20px;
}

.h1site-card-back .h1site-price-cta {
    margin-top: auto;
}

/* ========================================
   IMAGE HEADER CARD avec FLIP 3D
   ======================================== */
.h1site-card-header {
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
}

/* ===== FLIP ZONE ===== */
.h1site-flip-zone {
    width: 100%;
    height: 220px;
    perspective: 1000px;
    overflow: visible;
}

/* ===== FLIP INNER ===== */
.h1site-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s;
}

/* HOVER = Rotation 180deg */
.h1site-has-flip:hover .h1site-flip-inner {
    transform: rotateY(180deg);
}

/* ===== FRONT & BACK ===== */
.h1site-flip-front,
.h1site-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* FRONT */
.h1site-flip-front {
    background: transparent;
}

.h1site-flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.h1site-flip-front .h1site-price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
}

/* BACK - Fond blanc, texte noir */
.h1site-flip-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    background: #ffffff !important;
}

.h1site-flip-back p {
    color: #333333;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ===== CONTENU FIXE ===== */
.h1site-header-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

.h1site-header-content .h1site-price-pricing {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

.h1site-header-content .h1site-price-cta {
    margin-top: auto;
    width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .h1site-price-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .h1site-image-container {
        height: 340px;
    }
    .h1site-flip-zone {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .h1site-price-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .h1site-price-title {
        font-size: 16px;
    }
    .h1site-price-amount {
        font-size: 24px;
    }
    .h1site-image-container {
        height: 300px;
    }
    .h1site-flip-zone {
        height: 160px;
    }
}

/* ===== ANIMATIONS ===== */
.h1site-price-card-container {
    animation: cardFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.h1site-price-card-container:nth-child(1) { animation-delay: 0.05s; }
.h1site-price-card-container:nth-child(2) { animation-delay: 0.1s; }
.h1site-price-card-container:nth-child(3) { animation-delay: 0.15s; }
.h1site-price-card-container:nth-child(4) { animation-delay: 0.2s; }
.h1site-price-card-container:nth-child(5) { animation-delay: 0.25s; }
.h1site-price-card-container:nth-child(6) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Elementor Editor */
.elementor-editor-active .h1site-price-card-container {
    animation: none;
    opacity: 1;
}

.elementor-editor-active .h1site-flip-card,
.elementor-editor-active .h1site-flip-inner {
    transform: none !important;
}

.elementor-editor-active .h1site-card-back,
.elementor-editor-active .h1site-flip-back {
    display: none;
}
