/* ============================================
   WAB OS — la carte WAB (accueil : services et offres)
   Une carte blanche à liseré net, sans ombre, qui contient une tuile :
   la tuile apporte la couleur et la preuve (un vrai aperçu), le corps
   apporte le sens, toujours dans le même ordre — bulles, titre,
   bénéfice, explication, trois puces, chute, touche.
   Sur ordinateur, les cartes d'une grille partagent les mêmes rangées
   (sous-grille) : chaque niveau de texte s'aligne d'une carte à
   l'autre, et les touches tombent sur la même ligne.
   Les aperçus posés dans les tuiles : home-tiles.css.
   ============================================ */

.wgrid {
    display: grid;
    gap: 12px;
}

.wcard {
    --pad: 20px;
    display: flex;
    flex-direction: column;
    padding: 6px;
    border-radius: var(--r-win);
    background: var(--paper);
    box-shadow: 0 0 0 var(--hair) var(--line);
}

.wcard > :not(.wcard__tile) {
    margin-inline: var(--pad);
}

/* ── La tuile ── Klein plein (.on-klein) ou Klein très clair. */
.wcard__tile {
    position: relative;
    height: 200px;
    padding: 16px 18px;
    border-radius: var(--r-ctl);
    background: var(--klein);
    overflow: hidden;
    isolation: isolate;
}

.wcard__tile--wash {
    background: var(--klein-wash);
    box-shadow: inset 0 0 0 var(--hair) var(--klein-tint);
}

.wcard__label {
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    line-height: 1.3;
    letter-spacing: var(--track-caps);
    text-transform: uppercase;
    color: var(--ink);
}

.wcard__tile--wash .wcard__label {
    color: var(--klein-ink);
}

/* ── Le corps ── */
.wcard .chat {
    width: auto;
    margin-top: 20px;
}

.wcard .chat__ask {
    font-size: 0.9375rem;
}

.wcard__title {
    margin-top: 20px;
    font-size: 1.375rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.wcard__promise {
    margin-top: 8px;
    font-size: 1.0625rem;
    line-height: 1.45;
    text-wrap: pretty;
}

.wcard__text {
    margin-top: 10px;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ink-muted);
    text-wrap: pretty;
}

/* Les puces : une coche Klein, un filet entre chaque ligne. */
.wcard__list {
    margin-top: 16px;
    list-style: none;
    border-top: var(--hair) solid var(--line);
}

.wcard__list li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    padding-block: 11px;
    border-bottom: var(--hair) solid var(--line);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.wcard__list li::before {
    content: '';
    width: 18px;
    height: 18px;
    background: var(--klein);
    -webkit-mask: url('../assets/icons/sym-check.svg') center / contain no-repeat;
    mask: url('../assets/icons/sym-check.svg') center / contain no-repeat;
}

/* La chute : masquée au téléphone, où elle ferait une petite ligne
   grise de plus sous le bloc. */
.wcard__end {
    display: none;
    margin-top: 16px;
    font-size: 0.9375rem;
    color: var(--ink-muted);
    text-wrap: balance;
}

.wcard__cta {
    width: auto;
    margin-top: 20px;
    margin-bottom: var(--pad);
}

/* ── L'échange : la question, puis la réponse 300 ms après, une seule
   fois, quand la carte arrive à l'écran (watch.js). ── */
html.js .wcard .chat > * {
    transition: opacity var(--dur-3) var(--ease-out), translate var(--dur-3) var(--ease-out);
    transition-delay: 250ms;
}

html.js .wcard .chat__reply {
    transition-delay: 550ms;
}

html.js .wcard:not(.is-visible) .chat > * {
    opacity: 0;
    translate: 0 6px;
}

@media (min-width: 600px) {
    .wcard__end {
        display: block;
    }
}

@media (min-width: 900px) {
    .wgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 0;
    }

    .wcard {
        --pad: 24px;
        display: grid;
        grid-row: span var(--rows, 8);
        grid-template-rows: subgrid;
        align-content: start;
    }

    .wcard__tile {
        height: 220px;
    }

    .wcard__cta {
        align-self: end;
    }
}
