/* ==================================================================
 * Page Weavy Life (/weavy-life/) : en-tête sur l'image, protocole du mois,
 * tableau de bord d'exemple, Weavy connecté. Les formules, le parrainage et
 * la FAQ qui suivent gardent les styles de site.css (.wls-*).
 * ================================================================== */

.wls-page-weavy-life {
    --wlf-accent: #7938bb;
    --wlf-accent-2: #764be9;
    --wlf-accent-soft: #f3ecfb;
    --wlf-ink: var(--wls-navy, #1c244b);
    --wlf-muted: #5d6280;
    --wlf-line: #e6e8ef;
    --wlf-radius: 20px;
    --wlf-shadow: 0 1px 2px rgba(28, 36, 75, 0.04), 0 12px 32px rgba(28, 36, 75, 0.08);
}

.wlf-icon {
    width: 22px;
    height: 22px;
    flex: none;
}

.wls-body .wlf-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* En-tête : même composition que la page Optimal Health -------------- */

.wsh.wlf-wsh {
    padding-bottom: 0;
}

.wsh-hero.wlf-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(480px, 42vw, 660px);
    padding: clamp(56px, 6vw, 88px) 0;
    background: url("../img/weavy-life.jpg") center / cover no-repeat, #f1ecfa;
}

.wsh-hero.wlf-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(42% 62% at 50% 50%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.55) 62%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%, rgba(28, 36, 75, 0.12));
}

.wlf-hero .wsh-hero__inner {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, 680px);
    isolation: isolate;
}

.wlf-hero .wsh-hero__inner::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 46%;
    width: 156%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 46%, rgba(255, 255, 255, 0.32) 66%, rgba(255, 255, 255, 0.12) 84%, rgba(255, 255, 255, 0) 100%);
    filter: blur(18px);
    pointer-events: none;
}

.wlf-hero .wsh-hero__intro {
    max-width: 580px;
    color: #3d4360;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Éléments communs --------------------------------------------------- */

.wlf-section {
    padding: clamp(56px, 7vw, 104px) 0;
    color: var(--wlf-ink);
    font-family: var(--wls-sf);
}

.wlf-eyebrow {
    margin: 0 0 12px !important;
    color: var(--wlf-accent-2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wlf-title {
    color: var(--wlf-ink);
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.wls-body .wlf-lead {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--wlf-muted);
    font-size: clamp(16px, 1.4vw, 18px);
    line-height: 1.65;
}

.wlf-head {
    max-width: 720px;
    margin: 0 auto clamp(32px, 4vw, 48px);
    text-align: center;
}

.wls-body .wlf-head .wlf-lead {
    margin-inline: auto;
}

.wls-body .wlf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 30px;
    border-radius: 999px;
    background: var(--wlf-accent-2);
    box-shadow: 0 10px 24px rgba(118, 75, 233, 0.28);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.wls-body .wlf-button:hover {
    background: #5b32c9;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(118, 75, 233, 0.34);
}

.wlf-button:focus-visible {
    outline: 3px solid rgba(118, 75, 233, 0.45);
    outline-offset: 3px;
}

.wlf-point__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 14px;
    background: var(--wlf-accent-soft);
    color: var(--wlf-accent);
}

.wlf-point__title {
    display: block;
    color: var(--wlf-ink);
    font-size: 17px;
    font-weight: 600;
}

.wlf-point__text {
    display: block;
    margin-top: 2px;
    color: var(--wlf-muted);
    font-size: 15px;
    line-height: 1.55;
}

/* Protocole du mois -------------------------------------------------- */

.wlf-month__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.wls-body .wlf-points {
    display: grid;
    gap: 20px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.wlf-point {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.wlf-program {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(240, 138, 36, 0.16), transparent 60%),
        radial-gradient(70% 70% at 0% 100%, rgba(58, 123, 213, 0.14), transparent 65%),
        linear-gradient(160deg, #faf6ff, #f1e9fc);
    box-shadow: var(--wlf-shadow);
}

.wlf-program::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(121, 56, 187, 0.14);
    border-radius: inherit;
    pointer-events: none;
}

.wls-body .wlf-program__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.wlf-program__body {
    padding: clamp(28px, 3.5vw, 44px);
}

.wls-body .wlf-program__badge {
    display: inline-flex;
    margin: 0 0 16px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--wlf-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wlf-program__title {
    color: var(--wlf-ink);
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.wlf-program__text {
    margin: 14px 0 26px;
    color: #3d4360;
    font-size: 16px;
    line-height: 1.65;
}

.wlf-program__text > :last-child {
    margin-bottom: 0;
}

.wlf-program__text ul,
.wlf-program__text ol {
    padding-left: 1.2em;
}

/* Assistant santé : e-mail de rappel d'exemple ------------------------ */

.wlf-assist {
    overflow: hidden;
    background:
        radial-gradient(50% 40% at 15% 100%, rgba(118, 75, 233, 0.08), transparent 70%),
        var(--wls-grey-bg, #f3f5f8);
}

.wlf-assist__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.wls-body .wlf-assist__quote {
    margin: 30px 0 32px;
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--wlf-accent-2);
    color: var(--wlf-ink);
    font-size: 17px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.55;
}

.wlf-assist__visual {
    position: relative;
    max-width: 480px;
    margin-left: auto;
    padding: 40px 0;
}

.wlf-mail {
    overflow: hidden;
    border: 1px solid var(--wlf-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(28, 36, 75, 0.14);
}

.wlf-mail__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--wlf-line);
    background: #fbfbfd;
}

.wlf-mail__app {
    color: var(--wlf-muted);
    font-size: 13px;
    font-weight: 600;
}

.wlf-mail__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 0;
}

.wlf-mail__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    background: var(--wlf-accent-soft);
}

.wls-body .wlf-mail__avatar img {
    width: 28px;
    height: auto;
}

.wlf-mail__from {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--wlf-muted);
    font-size: 13px;
}

.wlf-mail__from strong {
    color: var(--wlf-ink);
    font-size: 15px;
}

.wls-body .wlf-mail__subject {
    margin: 16px 24px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f1f5;
    color: var(--wlf-ink);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wlf-mail__body {
    padding: 18px 24px 26px;
}

.wls-body .wlf-mail__greeting {
    margin: 0 0 6px;
    color: var(--wlf-ink);
    font-size: 15px;
    font-weight: 600;
}

.wls-body .wlf-mail__intro {
    margin: 0 0 18px;
    color: #3d4360;
    font-size: 14px;
    line-height: 1.6;
}

.wls-body .wlf-mail__list {
    display: grid;
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.wlf-mail__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 14px;
    border: 1px solid var(--wlf-line);
    border-radius: 14px;
    background: #fbfbfd;
}

.wlf-mail__name {
    color: var(--wlf-ink);
    font-size: 14px;
    font-weight: 600;
}

.wlf-mail__status {
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff4e5;
    color: #b25e00;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.wlf-mail__item.is-complete .wlf-mail__status {
    background: #e6f6ee;
    color: #1f8a57;
}

.wlf-mail__sessions {
    display: flex;
    gap: 5px;
}

.wlf-mail__sessions i {
    max-width: 44px;
    height: 6px;
    flex: 1;
    border-radius: 999px;
    background: #e6e8ef;
}

.wlf-mail__sessions i.is-done {
    background: linear-gradient(90deg, var(--wlf-accent-2), #c05bd6);
}

.wlf-mail__item.is-complete .wlf-mail__sessions i.is-done {
    background: #1f9d63;
}

.wlf-mail__count {
    justify-self: end;
    color: var(--wlf-muted);
    font-size: 12px;
    white-space: nowrap;
}

.wlf-mail__button {
    display: inline-flex;
    padding: 11px 22px;
    border-radius: 999px;
    background: var(--wlf-accent-2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.wlf-notif.wlf-notif--mail {
    top: 0;
    right: -10%;
    left: auto;
    width: min(86%, 340px);
}

.wlf-notif.wlf-notif--cheer {
    right: auto;
    bottom: 4%;
    left: -10%;
}

/* Tableau de bord d'exemple ------------------------------------------- */

.wlf-dash,
#wlf-plans {
    background: #fff;
}

.wlf-board {
    padding: clamp(16px, 2.4vw, 28px);
    border: 1px solid var(--wlf-line);
    border-radius: 28px;
    background: #fbfbfd;
    box-shadow: 0 30px 80px rgba(28, 36, 75, 0.12);
}

.wlf-board__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wlf-line);
}

.wlf-board__dots {
    display: inline-flex;
    gap: 6px;
}

.wlf-board__dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #e3e5ec;
}

.wlf-board__dots i:first-child {
    background: #ff6159;
}

.wlf-board__dots i:nth-child(2) {
    background: #ffbd2e;
}

.wlf-board__dots i:nth-child(3) {
    background: #28c941;
}

.wlf-board__name {
    color: var(--wlf-ink);
    font-size: 15px;
    font-weight: 600;
}

.wlf-board__heading {
    margin-bottom: 14px !important;
    color: var(--wlf-ink);
    font-size: 18px;
}

.wlf-board__heading small {
    margin-left: 8px;
    color: var(--wlf-muted);
    font-size: 13px;
    font-weight: 500;
}

.wlf-card {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--wlf-line);
    border-radius: 18px;
    background: #fff;
}

.wlf-card__title {
    margin-bottom: 12px !important;
    color: var(--wlf-ink);
    font-size: 15px;
}

.wlf-indicators {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.wlf-indicator__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wlf-indicator .wlf-card__title {
    margin-bottom: 0 !important;
    font-size: 14px;
}

.wlf-indicator__delta {
    padding: 3px 8px;
    border-radius: 999px;
    background: #fdecef;
    color: #c42d52;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.wlf-indicator__delta.is-good {
    background: #e6f6ee;
    color: #1f8a57;
}

.wls-body .wlf-indicator__value {
    margin: 8px 0 4px;
    color: var(--wlf-ink);
}

.wlf-indicator__value strong {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.wlf-indicator__value span {
    margin-left: 2px;
    color: var(--wlf-muted);
    font-size: 14px;
}

.wlf-chart {
    position: relative;
    height: 220px;
}

.wlf-chart--sm {
    height: 84px;
    margin: 0 -6px -6px;
}

.wlf-board__row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.wlf-history {
    margin-top: 14px;
}

.wlf-history__wrap {
    overflow-x: auto;
}

.wlf-history__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wlf-history__table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--wlf-line);
    color: var(--wlf-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.wlf-history__table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0f1f5;
    color: #3d4360;
    white-space: nowrap;
}

.wlf-history__table tbody tr:last-child td {
    border-bottom: 0;
}

.wlf-history__table tbody tr:hover td {
    background: #faf8fe;
}

.wlf-history__date {
    font-variant-numeric: tabular-nums;
}

.wlf-history__table .wlf-history__protocol {
    color: var(--wlf-ink);
    font-weight: 600;
}

.wlf-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff4e5;
    color: #b25e00;
    font-size: 12px;
    font-weight: 600;
}

.wlf-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.wlf-status.is-done {
    background: #e6f6ee;
    color: #1f8a57;
}

.wls-body .wlf-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
    margin: clamp(36px, 4vw, 56px) 0 0;
    padding: 0;
    list-style: none;
}

.wlf-feature__title {
    margin: 14px 0 6px !important;
    color: var(--wlf-ink);
    font-size: 18px;
}

.wls-body .wlf-feature__text {
    margin: 0;
    color: var(--wlf-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Weavy connecté ----------------------------------------------------- */

.wlf-connect,
.wls-community {
    background:
        radial-gradient(50% 40% at 85% 0%, rgba(118, 75, 233, 0.08), transparent 70%),
        var(--wls-grey-bg, #f3f5f8);
}

.wlf-connect {
    overflow: hidden;
}

.wlf-connect__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.wls-body .wlf-steps {
    display: grid;
    gap: 18px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.wlf-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.wlf-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wlf-accent-2), #c05bd6);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.wls-body .wlf-checks {
    display: grid;
    gap: 10px;
    margin: 28px 0 32px;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--wlf-accent-soft);
    list-style: none;
}

.wlf-checks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--wlf-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.wlf-checks .wlf-icon {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--wlf-accent);
}

.wlf-connect__visual {
    position: relative;
    max-width: 480px;
    margin-left: auto;
}

.wlf-connect__visual > img {
    display: block;
    width: 100%;
    border-radius: 28px;
    background: #f2f2f4;
    box-shadow: var(--wlf-shadow);
}

.wlf-notif {
    position: absolute;
    left: -12%;
    top: 16%;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(92%, 380px);
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 50px rgba(28, 36, 75, 0.18);
    backdrop-filter: blur(10px);
    animation: wlf-float 6s ease-in-out infinite;
}

.wlf-notif__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--wlf-accent-2), #c05bd6);
    color: #fff;
}

.wlf-notif__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.wlf-notif__body strong {
    color: var(--wlf-ink);
    font-size: 14px;
}

.wlf-notif__body span {
    overflow: hidden;
    color: var(--wlf-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wlf-notif__button {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--wlf-accent-2);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.wlf-notif--done {
    top: auto;
    left: auto;
    right: -6%;
    bottom: 14%;
    width: auto;
    animation-delay: -3s;
}

.wlf-notif--done .wlf-notif__icon {
    background: #1f9d63;
}

@keyframes wlf-float {
    50% {
        transform: translateY(-8px);
    }
}

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

/* Formules : la section suit les présentations ---------------------- */

#wlf-plans {
    scroll-margin-top: 24px;
}

html:has(.wls-page-weavy-life) {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html:has(.wls-page-weavy-life) {
        scroll-behavior: auto;
    }
}

/* Responsive ---------------------------------------------------------- */

@media (max-width: 1024px) {
    .wlf-indicators {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .wlf-month__grid,
    .wlf-assist__grid,
    .wlf-connect__grid,
    .wlf-board__row {
        grid-template-columns: minmax(0, 1fr);
    }

    .wlf-assist__visual,
    .wlf-connect__visual {
        margin: 0 auto;
    }

    .wlf-notif.wlf-notif--mail {
        right: -4%;
    }

    .wlf-notif.wlf-notif--cheer {
        left: -4%;
    }

    .wlf-notif {
        left: -4%;
    }

    .wlf-notif--done {
        right: -2%;
    }

    .wls-body .wlf-features {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .wsh-hero.wlf-hero {
        min-height: 0;
        padding: 64px 0 56px;
        background-position: 30% center;
    }

    .wsh-hero.wlf-hero::before {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.76) 60%, rgba(255, 255, 255, 0.62));
    }

    .wlf-hero .wsh-hero__intro {
        text-shadow: none;
    }

    .wlf-indicators {
        gap: 10px;
    }

    .wlf-card {
        padding: 14px;
    }

    .wlf-indicator__value strong {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .wlf-indicators {
        grid-template-columns: minmax(0, 1fr);
    }

    .wlf-notif__button {
        display: none;
    }
}
