/* ---------- PRICING SECTION ---------- */
.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw + 1rem, 2rem);
    font-weight: 700;
    margin-bottom: 5rem;
}

.section-title .accent {
    color: var(--blue-off);
}

.pricing {
    padding-bottom: 70px;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
}

/* Chaque carte est une colonne flex : le haut (icône/titre/desc/taille) garde
   sa taille naturelle, le bas (.plan-card-bottom) grandit pour occuper le
   reste, ce qui permet au bouton de toujours coller en bas via margin-top:auto,
   sans avoir besoin de forcer 50%/50% ni de correctifs au cas par cas. */
.plan-card {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 28%;
    min-height: 656px;
    padding: 3rem 1.5rem 2rem;
    border-radius: var(--radius-lg);
    background: #fff;
    text-align: center;
    font-size: min(max(.9rem, 1vw), 1.1rem);
}

.plan-card.essentiel {
    border: 2px solid var(--green-card-stroke);
    background-color: var(--green-card-bckgd);
}

.plan-card.confort {
    border: 2px solid var(--blue);
    background-color: var(--blue-card-bckgd);
}

.plan-card.premium {
    border: 2px solid var(--orange-card-stroke);
    background-color: var(--orange-card-bckgd);
}

/* La carte "la plus demandée" ressort visuellement : légère élévation + ombre.
   L'icône reste positionnée exactement comme les 2 autres cartes (voir plus bas),
   c'est le décalage de la carte entière qui la fait "sortir" du lot. */
.plan-card.featured {
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    padding-top: 2rem;
}

.plan-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plan-card-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.bottom_adjust {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    width: 75%;
    align-items: center;
}

.bottom_adjust .plan-image-placeholder,
.bottom_adjust .plan-features,
.bottom_adjust .plan-price-label,
.bottom_adjust .plan-price,
.bottom_adjust .btn {
    width: 100%;
}

.bottom_adjust .btn {
    margin-top: auto;
}

.plan-tag {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    padding: 7px 18px;
    border-radius: 999px;
    white-space: nowrap;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .5px;
}

/* Essentiel & Premium : l'icône chevauche le haut de la carte */
.plan-card .icon-circle {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
}

/* Confort (featured) : l'icône reste dans le flux, sous le tag "LA PLUS DEMANDÉE" */
.plan-card.featured .icon-circle {
    position: static;
    transform: unset;
    /* margin-bottom: 10px; */
    margin-bottom: 0;
}
.plan-card.featured .plan-desc {
    margin-bottom: 1rem;
}

/* Les 2 cartes non-featured ont une icône absolute qui sort du flux :
   on ajoute un padding-top équivalent à la hauteur d'icône manquante
   pour que le contenu démarre au même niveau que sur la carte Confort. */
.plan-card:not(.featured) .plan-card-top {
    padding-top: 20px;
}

/* Hauteur réservée fixe pour le titre (2 lignes max, ex: "PREMIUM MULTI-PIÈCES")
   afin que les descriptions/tailles/images démarrent à la même hauteur
   sur les 3 cartes, que le titre fasse 1 ou 2 lignes. */
.plan-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4em;
    margin-bottom: 10px;
    font-size: min(max(1.2rem, 1.2vw), 1.5rem);
    font-weight: 700;
}
.plan-card.featured h3 {
    margin-bottom: 0;
}

.plan-card.essentiel h3 { color: var(--green-text); }
.plan-card.confort h3 { color: var(--blue); }
.plan-card.premium h3 { color: var(--orange); }

.plan-card .plan-desc {
    margin-bottom: 18px;
    min-height: 44px;
    color: var(--black);
    font-size: min(max(.9rem, 1vw), 1.1rem);
}

.plan-size {
    display: inline-block;
    margin-bottom: 24px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
}

.plan-card.essentiel .plan-size { background: var(--green-card-sc-bckgd); color: var(--green-text); }
.plan-card.confort .plan-size { background: var(--blue-light); color: var(--blue); }
.plan-card.premium .plan-size { background: var(--orange-card-sc-bckgd); color: var(--orange); }

.plan-image-placeholder {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* Hauteur réservée pour 4 items max (Confort/Premium en ont 4, Essentiel 3) :
   la liste la plus courte laisse un peu de vide en bas plutôt que de décaler
   tout ce qui suit (prix, bouton) plus haut. */
.plan-features {
    min-height: 148px;
    margin-bottom: 24px;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f2f5;
    font-size: .92rem;
    color: var(--text-dark);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li .dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Le "Sur devis" de Premium garde le même espace réservé que "À partir de"
   des 2 autres cartes (le &nbsp; du HTML occupe cette hauteur) : on ne masque
   plus le label en display:none, sinon le prix remonte et désaligne la ligne. */
.plan-price-label {
    min-height: 1.2em;
    margin-bottom: 4px;
    font-size: .85rem;
    color: var(--black);
}

.plan-price {
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 1.4vw + 1rem, 1.9rem);
    font-weight: 700;
}

.essentiel .plan-price,
.essentiel .plan-price .ttc {
    color: var(--green-text);
}

.confort .plan-price,
.confort .plan-price .ttc {
    color: var(--blue);
}

.plan-price .ttc {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .pricing-grid {
        flex-wrap: wrap;
        justify-content: center;
    }

    .plan-card {
        width: 45%;
    }

    .plan-card.premium {
        width: 70%;
    }

    .plan-card.featured {
        transform: none;
    }
}

@media (max-width: 640px) {
    .plan-card,
    .plan-card.premium {
        width: 100%;
        min-height: 0;
    }

    .plan-card.featured {
        transform: none;
    }
}
