/* ========================================
   HOME PAGE - LANDING PAGE
   Uses pm- design system variables from base.css
   ======================================== */

/* ----------------------------------------
   PROMOTIONAL BANNER & PROMO CARD ENHANCEMENTS
   ---------------------------------------- */

/* Announcement bar above pricing */
.promo-announcement-bar {
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    background: linear-gradient(120deg, #6B5B95 0%, #8B7AB8 35%, #c97d5a 70%, #FF9A76 100%);
    box-shadow: 0 6px 32px rgba(139, 122, 184, 0.32);
}

.promo-announcement-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    animation: promo-shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes promo-shimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

.promo-announcement-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.promo-announcement-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: white;
    animation: promo-pulse-icon 2.4s ease-in-out infinite;
}

@keyframes promo-pulse-icon {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.promo-announcement-text {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
}

.promo-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.28);
    padding: 3px 11px;
    border-radius: 20px;
    color: white;
    white-space: nowrap;
}

.promo-highlight {
    font-size: 0.98rem;
    color: white;
    font-weight: 500;
}

.promo-highlight strong {
    font-size: 1.15rem;
    font-weight: 800;
}

.promo-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.88);
}

.promo-announcement-cta {
    background: white;
    color: #6B5B95;
    padding: 8px 22px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.promo-announcement-cta:hover {
    color: #6B5B95;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

/* Pro card glowing variant when promo is active */
@keyframes promo-card-glow {
    0%, 100% { box-shadow: 0 4px 24px rgba(230, 126, 92, 0.22); }
    50%       { box-shadow: 0 6px 36px rgba(230, 126, 92, 0.44); }
}

.compact-plan-card.pro-plan.has-promo {
    border: 2px solid var(--pm-secondary);
    border-top: 4px solid var(--pm-secondary);
    animation: promo-card-glow 3s ease-in-out infinite;
}

/* Savings chip badge */
.promo-savings-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #E67E5C, #FF9A76);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(230, 126, 92, 0.45);
    margin-bottom: 6px;
}

/* Price display when promo active */
.promo-price-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.promo-old-price {
    font-size: 0.85rem;
    color: var(--pm-muted);
    text-decoration: line-through;
    font-weight: 500;
}

.promo-new-price {
    font-size: 1.95rem;
    font-weight: 800;
    color: var(--pm-secondary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.promo-free-label {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--pm-secondary);
    line-height: 1.1;
    letter-spacing: -1px;
}

/* Billing note — visible when promo active */
.billing-note.has-promo-note {
    visibility: visible;
    color: var(--pm-secondary);
    font-size: 0.78rem;
    font-style: italic;
    min-height: 20px;
    height: auto;
}

/* Below-table promo capsule */
.promo-footer-capsule {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(107, 91, 149, 0.07), rgba(255, 154, 118, 0.1));
    border: 1px solid rgba(255, 154, 118, 0.35);
    border-radius: 30px;
    padding: 9px 22px;
    font-size: 0.85rem;
    color: var(--pm-dark);
}

.promo-footer-badge {
    background: linear-gradient(135deg, #E67E5C, #FF9A76);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ----------------------------------------
   Scroll-triggered animations
   ---------------------------------------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------
   Hero Section
   ---------------------------------------- */
.hero-section {
    background: linear-gradient(135deg, var(--pm-primary) 0%, var(--pm-primary-dark) 100%);
    border-radius: var(--pm-radius-lg);
    padding: var(--pm-space-8) var(--pm-space-8);
    margin-top: var(--pm-space-6);
    margin-bottom: var(--pm-space-8);
    box-shadow: 0 8px 24px rgba(139, 122, 184, 0.35);
    position: relative;
    overflow: hidden;
}

/* Subtle decorative pattern overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: var(--pm-space-5);
    color: var(--pm-surface-1);
    position: relative;
}

.hero-section .lead {
    font-size: 1.625rem;
    line-height: 1.4;
    margin-bottom: var(--pm-space-5);
    color: var(--pm-surface-1);
    opacity: 0.95;
    position: relative;
}

/* Hero logo */
.hero-logo {
    height: 120px;
    width: auto;
    vertical-align: middle;
    animation: heroLogoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

@keyframes heroLogoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* PatrimApp title */
.patrimapp-title {
    position: relative;
    display: inline-block;
}

/* ----------------------------------------
   Démo vidéo — mise en page 2 colonnes (vidéo 2/3 + CTA iOS 1/3)
   ---------------------------------------- */
.demo-video-layout {
    display: flex;
    align-items: center;
    gap: var(--pm-space-6);
}

.demo-video-layout .demo-video-player {
    flex: 2 1 0;
    min-width: 0;
}

.demo-app-cta {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--pm-space-4);
}

.demo-app-cta__title {
    margin: 0;
    font-weight: 600;
    color: var(--pm-dark);
    font-size: 1rem;
}

.app-store-badge {
    display: inline-block;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.app-store-badge img {
    display: block;
    height: 52px;
    width: auto;
}

.demo-app-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--pm-space-2);
}

.demo-app-qr img {
    width: 128px;
    height: 128px;
    padding: 8px;
    background: var(--pm-surface-1);
    border: 1px solid var(--pm-border-light);
    border-radius: var(--pm-radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.demo-app-qr span {
    font-size: 0.8rem;
    color: var(--pm-muted);
}

/* ----------------------------------------
   Demo Video Section
   ---------------------------------------- */
.demo-video-section {
    max-width: 1140px;
    margin: 0 auto var(--pm-space-8) auto;
    padding: var(--pm-space-6);
    background: var(--pm-surface-1);
    border: 1px solid var(--pm-border-light);
    border-radius: var(--pm-radius-lg);
    box-shadow: var(--pm-shadow-sm);
}

.demo-video-player {
    border-radius: var(--pm-radius-lg);
    overflow: hidden;
    box-shadow: var(--pm-shadow-md);
}

.demo-video-player iframe {
    border: 0;
}

/* ----------------------------------------
   Compact Pricing / Plan Comparison
   ---------------------------------------- */
.compact-pricing-section {
    max-width: 900px;
    margin: 0 auto var(--pm-space-8) auto;
    padding: var(--pm-space-6);
}

.compact-pricing-section h2 {
    color: var(--pm-dark);
    font-weight: 600;
    margin-bottom: var(--pm-space-6);
    text-align: center;
}

.compact-pricing-section h2 i {
    color: var(--pm-secondary);
}

/* Comparison table */
.compact-pricing-section .table-responsive {
    border-radius: var(--pm-radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--pm-shadow-lg);
}

.compact-table {
    margin-top: var(--pm-space-4);
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.compact-table th {
    padding: 0;
    border-bottom: 3px solid var(--pm-border-light);
    vertical-align: top;
    background-color: transparent;
    height: 100%;
}

/* Table columns */
.compact-table .feature-column {
    width: 35%;
    min-width: 200px;
    background-color: var(--pm-surface-2);
    font-weight: 600;
    color: var(--pm-dark);
    padding: 15px;
    vertical-align: middle;
}

.compact-table .free-column,
.compact-table .pro-column {
    width: 32.5%;
    min-width: 160px;
    padding: 0;
}

.compact-table thead th.feature-column {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

/* Plan cards inside table headers */
.compact-plan-card {
    border-radius: var(--pm-radius-lg);
    padding: var(--pm-space-3);
    margin-bottom: 10px;
    box-shadow: var(--pm-shadow-xs);
    border: 1px solid var(--pm-border-light);
    transition: transform var(--pm-transition-base), box-shadow var(--pm-transition-base);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.compact-plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pm-shadow-md);
}

.compact-plan-card.free-plan {
    border-top: 3px solid var(--pm-primary);
}

.compact-plan-card.pro-plan {
    border-top: 3px solid var(--pm-secondary);
}

.compact-plan-header {
    text-align: center;
    margin-bottom: var(--pm-space-3);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Plan titles */
.compact-plan-header h4 {
    color: var(--pm-primary);
    font-weight: 700;
    margin-bottom: var(--pm-space-2);
    font-size: 1.65rem;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-plan-header .fa-gift,
.compact-plan-header .fa-crown {
    color: var(--pm-primary);
    font-size: 1rem;
}

/* Prices */
.compact-price {
    margin: var(--pm-space-2) 0;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-price .h4 {
    color: var(--pm-primary);
    font-weight: 700;
    font-size: 1.95rem;
    line-height: 1.2;
    margin: 0;
}

.compact-plan-card.pro-plan .compact-price .h4 {
    color: var(--pm-secondary);
}

.compact-plan-card.pro-plan .compact-plan-header h4,
.compact-plan-card.pro-plan .compact-plan-header .fa-crown {
    color: var(--pm-secondary);
}

/* Billing details */
.billing-details {
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    color: var(--pm-muted);
    line-height: 1.2;
    min-height: 35px;
}

.billing-period {
    font-size: 0.8rem;
    color: var(--pm-muted);
    line-height: 1.2;
    margin-bottom: 2px;
}

.annual-price {
    font-size: 0.8rem;
    color: var(--pm-dark);
    line-height: 1.2;
    font-weight: 600;
}

/* Spacer for alignment */
.billing-note {
    min-height: 35px;
    height: 35px;
    visibility: hidden;
}

/* Plan action buttons */
.compact-plan-body {
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
}

.compact-plan-body .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--pm-radius-sm);
    width: 100%;
    transition: all var(--pm-transition-fast);
}

/* Table body */
.compact-table tbody td {
    padding: var(--pm-space-3);
    vertical-align: middle;
    border-top: 1px solid var(--pm-border-light);
    border-color: var(--pm-border-light);
}

.compact-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.compact-table tbody tr:nth-child(even) {
    background-color: var(--pm-surface-2);
}

/* Check/cross icons in table */
.compact-table .fa-check.text-success {
    color: var(--pm-primary) !important;
    font-size: 1rem;
}

.compact-table .fa-check.text-primary {
    color: var(--pm-secondary) !important;
    font-size: 1rem;
}

.compact-table .fa-times.text-muted {
    color: var(--pm-border-medium) !important;
    font-size: 1rem;
}

/* Highlight first data row */
.compact-table tbody tr:first-child td {
    font-weight: 600;
    background-color: var(--pm-primary-light);
}

.compact-table tbody tr:first-child td:first-child {
    background-color: rgba(139, 122, 184, 0.15);
}

/* Titre section fonctionnalités */
#features h2 {
    text-align: center;
}

/* ----------------------------------------
   Feature Cards
   ---------------------------------------- */
.feature-card {
    border: none;
    background: var(--pm-surface-1);
    box-shadow: var(--pm-shadow-sm);
    border-radius: var(--pm-radius-lg);
    transition: transform var(--pm-transition-base), box-shadow var(--pm-transition-base);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pm-shadow-lg);
}

.feature-card .card-body {
    padding: var(--pm-space-6);
}

.feature-card .fa-3x {
    margin-bottom: var(--pm-space-4);
    color: var(--pm-secondary) !important;
}

.feature-card .pm-card__title {
    color: var(--pm-dark);
    font-weight: 600;
    margin-bottom: var(--pm-space-4);
    justify-content: center;
    text-align: center;
}

.feature-card .pm-card__body p {
    color: var(--pm-muted);
    line-height: 1.7;
    text-align: center;
}

/* ----------------------------------------
   Statistics Section
   ---------------------------------------- */
.stats-section {
    background-color: var(--pm-surface-2);
    border-radius: var(--pm-radius-lg);
    padding: var(--pm-space-8);
    margin-bottom: var(--pm-space-8);
    border: 1px solid var(--pm-border-light);
}

.stats-item h3 {
    font-weight: 700;
    margin-bottom: var(--pm-space-2);
    color: var(--pm-secondary);
}

.stats-item h3 i {
    color: var(--pm-secondary) !important;
}

.stats-item p {
    font-size: 1rem;
    margin: 0;
    color: var(--pm-muted);
}

/* ----------------------------------------
   FAQ Section
   ---------------------------------------- */
.faq-section {
    margin-top: var(--pm-space-8);
}

.faq-section h3 {
    color: var(--pm-dark);
    font-weight: 600;
    margin-bottom: var(--pm-space-6);
    text-align: center;
}

.accordion-item {
    border: 1px solid var(--pm-border-light);
    border-radius: var(--pm-radius-lg);
    margin-bottom: var(--pm-space-2);
    overflow: hidden;
    transition: box-shadow var(--pm-transition-base);
}

.accordion-item:hover {
    box-shadow: var(--pm-shadow-xs);
}

.accordion-button {
    background-color: var(--pm-surface-1);
    border: none;
    font-weight: 500;
    padding: var(--pm-space-4) var(--pm-space-5);
    transition: background-color var(--pm-transition-base), color var(--pm-transition-base);
}

.accordion-button:not(.collapsed) {
    background-color: var(--pm-primary);
    color: var(--pm-surface-1);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(139, 122, 184, 0.25);
}

.accordion-body {
    padding: var(--pm-space-5);
    line-height: 1.7;
    color: var(--pm-dark);
}

/* ----------------------------------------
   Button Overrides (scoped to home page)
   ---------------------------------------- */
.btn-success {
    background-color: var(--pm-primary);
    border-color: var(--pm-primary);
    color: var(--pm-surface-1);
}

.btn-success:hover {
    background-color: var(--pm-primary-dark);
    border-color: var(--pm-primary-dark);
    color: var(--pm-surface-1);
}

.btn-outline-success {
    border-color: var(--pm-primary);
    color: var(--pm-primary);
}

.btn-outline-success:hover {
    background-color: var(--pm-primary);
    border-color: var(--pm-primary);
    color: var(--pm-surface-1);
}

.btn-primary {
    background-color: var(--pm-primary);
    border-color: var(--pm-primary);
}

.btn-primary:hover {
    background-color: var(--pm-primary-dark);
    border-color: var(--pm-primary-dark);
}

.btn-secondary {
    background-color: var(--pm-secondary);
    border-color: var(--pm-secondary);
}

.btn-secondary:hover {
    background-color: var(--pm-secondary-dark);
    border-color: var(--pm-secondary-dark);
}

.btn-warning {
    background-color: var(--pm-secondary);
    border-color: var(--pm-secondary);
    color: var(--pm-surface-1);
}

.btn-warning:hover {
    background-color: var(--pm-secondary-dark);
    border-color: var(--pm-secondary-dark);
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */
@media (max-width: 992px) {
    .demo-video-section {
        padding: var(--pm-space-5);
    }

    /* Empilement : la vidéo repasse au-dessus, le CTA en dessous */
    .demo-video-layout {
        flex-direction: column;
    }

    /* En colonne, flex-basis:0 écraserait la hauteur de la vidéo : on le neutralise */
    .demo-video-layout .demo-video-player {
        flex: 0 0 auto;
        width: 100%;
    }

    .demo-app-cta {
        flex: 0 0 auto;
        width: 100%;
    }

    .compact-pricing-section {
        padding: 15px;
    }

    .compact-table .feature-column {
        width: 40%;
        min-width: 180px;
    }

    .compact-table .free-column,
    .compact-table .pro-column {
        width: 30%;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: var(--pm-space-6) var(--pm-space-5);
        margin-bottom: var(--pm-space-6);
    }

    .demo-video-section {
        padding: var(--pm-space-4);
        margin-bottom: var(--pm-space-6);
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.25rem;
    }

    .hero-logo {
        height: 50px;
    }

    /* QR inutile sur mobile : on garde uniquement le badge tapable */
    .demo-app-qr {
        display: none;
    }

    .stats-section {
        padding: var(--pm-space-6) var(--pm-space-5);
    }

    .feature-card .card-body {
        padding: var(--pm-space-5);
    }

    .compact-pricing-section {
        padding: 10px;
    }

    .compact-table {
        font-size: 0.85rem;
    }

    .compact-table .feature-column {
        width: 45%;
        min-width: 150px;
        padding: 10px;
    }

    .compact-table .free-column,
    .compact-table .pro-column {
        width: 27.5%;
    }

    .compact-plan-card {
        padding: var(--pm-space-2);
        min-height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: var(--pm-space-5) var(--pm-space-4);
    }

    .hero-section .btn {
        width: 100%;
        margin-bottom: var(--pm-space-2);
    }

    .hero-logo {
        height: 40px;
    }

    .compact-table {
        font-size: 0.8rem;
    }

    .compact-table .feature-column {
        min-width: 140px;
        font-size: 0.8rem;
        padding: var(--pm-space-2);
    }

    .compact-plan-card {
        padding: 6px;
        min-height: 160px;
    }

}
