/* ==========================================================
   Price List Widget — Styles
   ========================================================== */

.price-list-widget {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: inherit;
    box-sizing: border-box;
}

.price-list-widget *,
.price-list-widget *::before,
.price-list-widget *::after {
    box-sizing: border-box;
}

/* ----------------------------------------------------------
   SLIDER
   ---------------------------------------------------------- */
.pl-slider-section {
    text-align: center;
    margin-bottom: 32px;
}

.pl-slider-label {
    font-size: 1rem;
    color: #555;
    margin: 0 0 8px;
    font-weight: 400;
}

.pl-slider-value-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pl-slider-value-label {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1A3D35;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pl-slider-value-suffix {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2D6A5E;
    opacity: 0.7;
}

.pl-slider-wrap {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 4px 0;
}

.pl-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #D0E8E2;
    outline: none;
    cursor: pointer;
    accent-color: #2D6A5E;
}

.pl-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1A3D35;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #1A3D35, 0 2px 8px rgba(0,0,0,0.2);
    transition: box-shadow 0.2s;
}

.pl-slider-input::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 3px #2D6A5E66, 0 2px 12px rgba(0,0,0,0.25);
}

.pl-slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1A3D35;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #1A3D35, 0 2px 8px rgba(0,0,0,0.2);
}

.pl-slider-input::-moz-range-track {
    background: #D0E8E2;
    height: 6px;
    border-radius: 3px;
}

.pl-slider-sublabel {
    font-size: 0.85rem;
    color: #888;
    margin: 10px 0 0;
    font-style: italic;
}

/* ----------------------------------------------------------
   BOÎTE D'INFORMATION
   ---------------------------------------------------------- */
.pl-infobox {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background-color: #E8F5F1;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 0 auto 36px;
    max-width: 680px;
    border: 1px solid #C5E0D8;
}

.pl-infobox-icon {
    flex-shrink: 0;
    color: #2D6A5E;
    margin-top: 2px;
}

.pl-infobox-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1A3D35;
    margin-bottom: 4px;
}

.pl-infobox-text p {
    font-size: 0.85rem;
    color: #3D5E56;
    margin: 0;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   TOGGLE MENSUEL / ANNUEL
   ---------------------------------------------------------- */
.pl-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}

.pl-billing-label {
    font-size: 0.95rem;
    color: #888;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pl-billing-label.active {
    color: #1A3D35;
    font-weight: 600;
}

.pl-toggle-label {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.pl-billing-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.pl-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #D0D0D0;
    border-radius: 26px;
    transition: background-color 0.25s;
}

.pl-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.pl-billing-input:checked + .pl-toggle-slider {
    background-color: #2D6A5E;
}

.pl-billing-input:checked + .pl-toggle-slider::before {
    transform: translateX(22px);
}

.pl-discount-badge,
.pl-annual-badge {
    display: inline-flex;
    align-items: center;
    background-color: #FDE8D0;
    color: #C0560A;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

/* ----------------------------------------------------------
   GRILLE DES OFFRES
   ---------------------------------------------------------- */
.pl-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

@media (min-width: 900px) {
    .pl-offers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ----------------------------------------------------------
   CARD
   ---------------------------------------------------------- */
.pl-offer-card {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.pl-offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}

.pl-offer-card.highlighted {
    border-color: #2D6A5E;
    box-shadow: 0 8px 32px rgba(45, 106, 94, 0.2);
    transform: translateY(-6px);
}

.pl-offer-card.highlighted:hover {
    transform: translateY(-10px);
    box-shadow: 0 14px 40px rgba(45, 106, 94, 0.25);
}

/* Header */
.pl-card-header {
    padding: 28px 24px 22px;
    text-align: center;
    position: relative;
}

/* Couleurs par défaut des headers — surchargées via l'onglet Style Elementor */
.pl-offer-card:nth-child(1) .pl-card-header { background-color: #A8D5C6; color: #1A3D35; }
.pl-offer-card:nth-child(2) .pl-card-header { background-color: #2D6A5E; color: #ffffff; }
.pl-offer-card:nth-child(3) .pl-card-header { background-color: #1A3D35; color: #ffffff; }

.pl-badge {
    display: inline-block;
    background-color: #FBBF74;
    color: #7C3A00;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.pl-offer-name {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.1;
    color: inherit;
}

.pl-offer-subtitle {
    font-size: 0.88rem;
    margin: 0;
    opacity: 0.8;
    color: inherit;
}

/* Body */
.pl-card-body {
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #fff;
}

/* Prix */
.pl-price-wrap {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 4px;
}

.pl-price-amount {
    font-size: 3rem;
    font-weight: 900;
    color: #1A3D35;
    line-height: 1;
    letter-spacing: -0.03em;
}

.pl-price-meta {
    display: flex;
    flex-direction: column;
    padding-top: 4px;
}

.pl-price-currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1A3D35;
    line-height: 1.2;
}

.pl-price-period {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.2;
}

.pl-price-annual {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pl-annual-total {
    font-weight: 600;
    color: #555;
}

/* Prix en mode annuel — masqué par défaut, affiché par JS */
.pl-price-annual-monthly-label {
    font-size: 0.78rem;
    color: #2D6A5E;
    font-weight: 500;
    display: none;
}

/* Features */
.pl-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
    flex: 1;
}

.pl-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
    font-size: 0.88rem;
}

.pl-feature:last-child {
    border-bottom: none;
}

.pl-feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.pl-feature.included .pl-feature-icon {
    color: #2D6A5E;
}

.pl-feature.excluded .pl-feature-icon {
    color: #C0C0C0;
}

.pl-feature.excluded {
    opacity: 0.55;
}

.pl-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pl-feature-title {
    font-weight: 600;
    color: #1A3D35;
    line-height: 1.3;
}

.pl-feature.excluded .pl-feature-title {
    color: #999;
}

.pl-feature-desc {
    font-size: 0.8rem;
    color: #2D6A5E;
    font-weight: 400;
    line-height: 1.3;
}

/* Bouton */
.pl-offer-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 24px;
    cursor: pointer;
}

.pl-offer-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.pl-offer-btn.secondary {
    border: 2px solid #1A3D35;
    color: #1A3D35;
    background: transparent;
}

.pl-offer-btn.secondary:hover {
    background: #1A3D3508;
}

.pl-offer-btn.primary {
    background-color: #2D6A5E;
    border: 2px solid #2D6A5E;
    color: #ffffff;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .pl-offer-card.highlighted {
        transform: none;
        order: -1;
    }

    .pl-offer-card.highlighted:hover {
        transform: translateY(-4px);
    }

    .pl-slider-value-label {
        font-size: 2.2rem;
    }

    .pl-price-amount {
        font-size: 2.4rem;
    }
}

@media (max-width: 480px) {
    .price-list-widget {
        padding: 24px 12px;
    }

    .pl-offers-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------
   TABLEAU RÉCAPITULATIF — Flexbox
   ---------------------------------------------------------- */
.pl-price-table-wrap {
    margin-top: 48px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Conteneur flex vertical */
.pl-price-table {
    display: flex;
    flex-direction: column;
    min-width: 460px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

/* ---- Ligne ---- */
.pl-pt-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.13s;
}
.pl-pt-row:last-child {
    border-bottom: none;
}

/* ---- Cellule de base ---- */
.pl-pt-cell {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 11px 20px;
    font-size: 0.9rem;
    line-height: 1.3;
    min-width: 0;
    white-space: nowrap;
}

/* Colonne label (1ère colonne) — légèrement plus large */
.pl-pt-label {
    flex: 1.5;
    font-weight: 700;
}

/* Colonnes offres — prix alignés à droite */
.pl-pt-offer {
    justify-content: flex-end;
    font-weight: 500;
    color: #333;
}

/* ---- En-tête ---- */
.pl-pt-head .pl-pt-cell {
    background-color: var(--hdr-bg, #2B5BE0);
    color: var(--hdr-text, #fff);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 13px 20px;
}
.pl-pt-head .pl-pt-offer {
    justify-content: center; /* centré dans les en-têtes */
}

/* ---- Alternance de lignes ---- */
.pl-pt-row:not(.pl-pt-head):not(.pl-pt-average):nth-child(even) {
    background-color: #FAFAFA;
}

/* ---- Ligne active (palier du slider) ---- */
.pl-table-row {
    cursor: pointer;
}
.pl-table-row:hover {
    background-color: #F5FAF8 !important;
}
.pl-table-row.active {
    background-color: #EAF5F1 !important;
}
.pl-table-row.active .pl-pt-label {
    font-weight: 800;
}

/* ---- Ligne moyenne ---- */
.pl-pt-average {
    background-color: #F5F5F5;
    border-top: 2px solid #E0E0E0;
}
.pl-pt-average .pl-pt-cell {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1A3D35;
    padding: 13px 20px;
}
.pl-pt-average .pl-pt-offer {
    color: #333;
}

@media (max-width: 600px) {
    .pl-price-table-wrap { margin-top: 32px; }
    .pl-pt-cell { padding: 9px 14px; font-size: 0.82rem; }
    .pl-pt-head .pl-pt-cell { padding: 11px 14px; }
    .pl-pt-average .pl-pt-cell { padding: 11px 14px; }
}
