/*
Theme Name: JNPerformance EMS
Author: NANCOMCY
Author URI: https://www.nancomcy.fr
Description: Landing page JNPerformance — Coaching EMS à domicile.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: jnp
*/

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

button[data-paperform-id] {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

body.admin-bar header.sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header.sticky {
        top: 46px;
    }
}

.text-gradient {
    background: linear-gradient(135deg, #FFC700 0%, #FFE566 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-brand {
    background: linear-gradient(135deg, #FFC700 0%, #FFE566 100%);
}

.grid-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(-3deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes float-slow-reverse {
    0%, 100% { transform: translateY(0px) rotate(3deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

.animate-float-1 {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-float-2 {
    animation: float-slow-reverse 7s ease-in-out infinite;
}

.plug-container {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 0;
}

.plug-container.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.plug-svg {
    display: inline-block;
    transform: rotate(180deg);
    transform-origin: center;
}

.plug-pins {
    transform: translateY(-8px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

.plug-container.is-visible .plug-pins {
    transform: translateY(0);
}

/* Apparition légère des cards */
.reveal-card {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}

.reveal-card.is-inview {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
}

.reveal-card:nth-child(2) { transition-delay: 0.06s; }
.reveal-card:nth-child(3) { transition-delay: 0.12s; }
.reveal-card:nth-child(4) { transition-delay: 0.18s; }

/* Étapes — accent barre */
.etape-card {
    position: relative;
    overflow: hidden;
}

.etape-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #FFC700 0%, #FFE566 100%);
}

.etape-card__num {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: clamp(3rem, 8vw, 4.5rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

@keyframes merci-pop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.merci-check {
    animation: merci-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .merci-check {
        animation: none;
    }
}

.site-footer a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer a:hover {
    color: #fff;
}

.legal-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
}

.legal-content > * + * {
    margin-top: 1rem;
}

.legal-content h2 {
    font-weight: 800;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.25;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    color: #0A0A0A;
}

.legal-content .legal-lead {
    margin-top: 0;
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.legal-content ul ul {
    margin-top: 0.5rem;
    list-style: circle;
}

.legal-content a {
    color: #0A0A0A;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content a:hover {
    color: #FFC700;
}

.legal-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid rgba(20, 23, 94, 0.12);
    border-radius: 1rem;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 520px;
}

.legal-content th,
.legal-content td {
    text-align: left;
    vertical-align: top;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(20, 23, 94, 0.1);
}

.legal-content thead th {
    background: #0A0A0A;
    color: #fff;
    font-weight: 700;
    border-bottom: none;
}

.legal-content tbody tr:last-child td {
    border-bottom: none;
}

.legal-content td p + p {
    margin-top: 0.65rem;
}

.benefices-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60M15 15l30 30M45 15L15 45' stroke='%2314175E' stroke-width='0.8' stroke-opacity='0.04' fill='none'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%23F9791D' fill-opacity='0.15'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

/* Perf mobile / reduced motion */
@media (max-width: 767px) {
    .animate-float-1,
    .animate-float-2 {
        animation: none !important;
        transform: none !important;
    }

    .grid-pattern,
    .benefices-pattern {
        background-image: none;
    }

    header.sticky {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: #ffffff;
    }

    .plug-svg {
        transform: rotate(90deg);
    }

    .hero-mobile-media img {
        max-height: 8.5rem;
    }

    .reveal-card {
        transition-duration: 0.35s;
        transition-delay: 0s !important;
    }

    .backdrop-blur-md,
    .backdrop-blur-sm {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .cv-auto {
        content-visibility: visible;
        contain-intrinsic-size: auto;
    }

    .energy-arcs {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }

    .hero-shell {
        margin-top: 0 !important;
    }

    .hero-section {
        min-height: 0;
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-float-1,
    .animate-float-2,
    .plug-container,
    .plug-pins,
    .reveal-card {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Contenu hors viewport : moins de travail au paint */
.cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

/* Arcs de courant — fond sections bleues (sans éclairs) */
.energy-arcs {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: paint;
}

.energy-arcs__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.energy-arcs__line {
    opacity: 0;
    stroke-dasharray: 220 480;
    stroke-dashoffset: 700;
}

.energy-arcs__line--1 {
    animation: energy-line 6s linear infinite;
}

.energy-arcs__line--2 {
    animation: energy-line 7s linear 0.6s infinite;
}

.energy-arcs__line--3 {
    animation: energy-line 6.5s linear 1.2s infinite;
}

@keyframes energy-line {
    0% {
        opacity: 0;
        stroke-dashoffset: 700;
    }
    6% {
        opacity: 0.6;
    }
    40% {
        opacity: 0.45;
        stroke-dashoffset: 80;
    }
    58% {
        opacity: 0;
        stroke-dashoffset: -120;
    }
    100% {
        opacity: 0;
        stroke-dashoffset: -120;
    }
}

@media (prefers-reduced-motion: reduce) {
    .energy-arcs {
        display: none !important;
    }
}

/* Paperform popup — centré largeur + hauteur */
.Paperform__popup {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
}

.Paperform__popupcontent {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: auto !important;
    max-width: min(560px, calc(100vw - 2rem)) !important;
    max-height: min(90vh, 900px) !important;
    max-height: min(90dvh, 900px) !important;
    width: 100% !important;
    overflow-y: auto !important;
}

.site-header {
    background: transparent;
    border-bottom-color: transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(10, 10, 10, 0.55);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
