/* Page d'accueil publique (refaite le 29 septembre 2026). Le vert de la marque en version nuit pour le haut de page,
   un sable ocre en seul appoint chaud (décor, jamais d'action), Manrope seule. Une seule entrée orchestrée : la carte
   se dessine, puis l'argent circule des villes vers le village. */
.vitrine {
    --nuit: #0e3a2f;
    --nuit-2: #134a3c;
    --menthe: #7fd1b0;
    --sable: #f3c77b;
    --sable-doux: #fbf1df;
    background: var(--fond);
    color: var(--texte);
    overflow-x: clip;
}

/* ---------- Haut de page ---------- */
.vitrine__une {
    position: relative;
    padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(8rem, 16vw, 12rem);
    background: var(--nuit);
    color: #fff;
}

.vitrine__entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 76rem;
    margin: 0 auto;
    padding: 1.25rem 0;
}

.marque-claire {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
}

.vitrine__connexion {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

.vitrine__connexion:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.vitrine__une-grille {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
    max-width: 76rem;
    margin: 0 auto;
    padding-top: clamp(1.5rem, 5vw, 3rem);
}

/* Sans visuel à côté : le titre se centre, la scène de l'application vient chevaucher le bas du haut de page. */
.vitrine__une-grille {
    justify-items: center;
    text-align: center;
}

.vitrine__une-texte {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 58rem;
    padding-bottom: clamp(1rem, 3vw, 2rem);
}

.vitrine__une-texte .vitrine__chapo {
    margin-inline: auto;
}

.vitrine__une-texte .vitrine__actions {
    justify-content: center;
}

.vitrine__accroche {
    display: inline-flex;
    margin: 0 0 1.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgba(243, 199, 123, 0.14);
    color: var(--sable);
    font-size: 0.875rem;
    font-weight: 600;
}

.vitrine__titre {
    margin: 0;
    font-size: clamp(2.5rem, 7.2vw, 5.5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.vitrine__chapo {
    max-width: 36rem;
    margin: 1.5rem 0 0;
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    text-wrap: pretty;
}

.vitrine__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.vitrine__bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease-out, background-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.vitrine__bouton:active {
    transform: scale(0.97);
}

.vitrine__bouton--plein {
    background: #fff;
    color: var(--nuit);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.vitrine__bouton--plein:hover {
    background: var(--sable-doux);
    color: var(--nuit);
}

.vitrine__bouton--contour {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.vitrine__bouton--contour:hover {
    border-color: #fff;
    color: #fff;
}

@media (max-width: 29.99rem) {
    .vitrine__bouton {
        flex: 1 1 100%;
    }
}

/* ---------- L'application en action ----------
   Un cycle de 9 s, joué seulement quand la scène est à l'écran (classe demo--visible posée par le contrôleur
   `vitrine`) : 10–18 % le doigt touche « Payer », 18–22 % le paiement est reçu, 22–46 % la pièce file vers le
   tableau de bord, 47–50 % le collecté change, 50–58 % la barre du mois grandit, 55–60 % le fil annonce « un
   membre », 92–96 % tout revient doucement. Sans JavaScript ou en mouvement réduit : la scène reste immobile. */
.vitrine__demo {
    position: relative;
    max-width: 76rem;
    margin: clamp(-9rem, -12vw, -6rem) auto 0;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.demo {
    --cycle: 9s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.demo__telephone {
    position: relative;
    order: 2;
    display: flex;
    flex-direction: column;
    width: 15rem;
    height: 31rem;
    padding: 2rem 1rem 1rem;
    border: 8px solid #101828;
    border-radius: 36px;
    background: var(--fond);
    box-shadow: 0 30px 70px rgba(14, 58, 47, 0.35);
    box-sizing: border-box;
}

.demo__encoche {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 70px;
    height: 16px;
    border-radius: 10px;
    background: #101828;
    transform: translateX(-50%);
}

.demo__surtitre {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-texte);
}

.demo__titre-tel {
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.demo__du {
    display: flex;
    flex-direction: column;
    margin-top: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    background: #fff;
}

.demo__du small,
.demo__kpi small {
    font-size: 11px;
    color: var(--texte-3);
}

.demo__du b,
.demo__kpi b {
    display: grid;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* Deux valeurs superposées qui se relaient. */
.demo__du b > span,
.demo__kpi b > span,
.demo__bouton > span {
    grid-area: 1 / 1;
}

.demo__du-apres,
.demo__kpi-apres,
.demo__bouton-apres {
    opacity: 0;
}

.demo__liste {
    margin: 0.625rem 0 0;
    padding: 0 0.75rem;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    background: #fff;
    list-style: none;
}

.demo__liste li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 12px;
}

.demo__liste li + li {
    border-top: 1px solid var(--bordure);
}

.demo__liste b {
    white-space: nowrap;
}

.demo__bouton {
    position: relative;
    display: grid;
    place-items: center;
    height: 2.75rem;
    margin-top: auto;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.demo__bouton-apres {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.demo__doigt {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.25rem;
    height: 2.25rem;
    margin: -1.125rem 0 0 -1.125rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    opacity: 0;
    pointer-events: none;
}

.demo__note {
    margin: 0.625rem 0 0;
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--texte-3);
    text-align: center;
}

.demo__trajet {
    display: none;
}

.demo__tableau {
    order: 1;
    width: min(100%, 38rem);
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(14, 58, 47, 0.22), 0 2px 6px rgba(16, 24, 40, 0.05);
    overflow: hidden;
}

.demo__barre {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 2.25rem;
    padding: 0 0.875rem;
    border-bottom: 1px solid var(--bordure);
    background: var(--surface-3);
}

.demo__barre span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bordure-forte);
}

.demo__barre em {
    margin-left: 0.5rem;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    color: var(--texte-2);
}

.demo__contenu {
    padding: 1.25rem;
}

.demo__kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
}

.demo__kpi {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--bordure);
    border-radius: 10px;
}

.demo__kpi b {
    font-size: clamp(1rem, 2.4vw, 1.375rem);
}

.demo__graphique {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
    height: 6rem;
    margin-top: 1rem;
}

.demo__graphique span {
    height: var(--h);
    border-radius: 4px 4px 0 0;
    background: var(--accent);
    opacity: 0.85;
}

.demo__graphique .demo__barre-vivante {
    height: 22%;
    background: var(--accent);
    opacity: 1;
}

.demo__fil {
    display: flex;
    flex-direction: column;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.demo__fil li {
    display: grid;
    grid-template-columns: 0.625rem minmax(0, 1fr) auto;
    gap: 0.625rem;
    align-items: center;
    padding: 0.5rem 0;
    border-top: 1px solid var(--bordure);
    font-size: 12px;
}

.demo__fil i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--bordure-forte);
}

.demo__fil em {
    font-style: normal;
    color: var(--texte-3);
}

.demo__fil .demo__fil-nouveau {
    max-height: 0;
    padding-block: 0;
    overflow: hidden;
    opacity: 0;
    border-top-color: transparent;
}

.demo__fil-nouveau i {
    background: var(--sable);
}

.vitrine__legende {
    max-width: 34rem;
    margin: 2.5rem auto 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--texte-2);
    text-align: center;
    text-wrap: balance;
}

/* Écran large : téléphone à gauche, tableau à droite, la pièce vole de l'un à l'autre. */
@media (min-width: 62rem) {
    .demo {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 60rem;
        max-width: 100%;
        margin: 0 auto;
        gap: 0;
    }

    .demo__telephone {
        order: 0;
    }

    .demo__tableau {
        order: 0;
        width: 38rem;
        height: 24rem;
    }

    /* Point de départ : le bouton « Payer » du téléphone (7,5 rem ; 26,1 rem). */
    .demo__trajet {
        position: absolute;
        top: 26.1rem;
        left: 7.5rem;
        display: block;
        width: 0;
        height: 0;
        pointer-events: none;
    }

    .demo__piece {
        position: absolute;
        top: -0.625rem;
        left: -0.625rem;
        width: 1.25rem;
        height: 1.25rem;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #fff3d6, var(--sable) 55%, #d9a24a);
        box-shadow: 0 0 18px rgba(243, 199, 123, 0.9);
        opacity: 0;
    }
}

.demo--visible .demo__doigt { animation: demo-doigt var(--cycle) ease-out infinite; }
.demo--visible .demo__bouton-avant,
.demo--visible .demo__du-avant { animation: demo-sortir var(--cycle) ease-in-out infinite; }
.demo--visible .demo__bouton-apres,
.demo--visible .demo__du-apres { animation: demo-entrer var(--cycle) ease-in-out infinite; }
.demo--visible .demo__trajet { animation: demo-aller-x var(--cycle) linear infinite; }
.demo--visible .demo__piece { animation: demo-aller-y var(--cycle) cubic-bezier(0.15, 0.85, 0.35, 1) infinite; }
.demo--visible .demo__kpi-avant { animation: demo-kpi-sortir var(--cycle) ease-in-out infinite; }
.demo--visible .demo__kpi-apres { animation: demo-kpi-entrer var(--cycle) ease-in-out infinite; }
.demo--visible .demo__kpi--vivant { animation: demo-lueur var(--cycle) ease-out infinite; }
.demo--visible .demo__barre-vivante { animation: demo-barre var(--cycle) cubic-bezier(0.2, 0.8, 0.2, 1) infinite; }
.demo--visible .demo__fil-nouveau { animation: demo-fil var(--cycle) cubic-bezier(0.2, 0.8, 0.2, 1) infinite; }

@keyframes demo-doigt {
    0%, 9% { opacity: 0; transform: scale(0.3); }
    12% { opacity: 1; transform: scale(0.9); }
    18% { opacity: 0; transform: scale(1.8); }
    100% { opacity: 0; transform: scale(1.8); }
}

@keyframes demo-sortir {
    0%, 17% { opacity: 1; transform: translateY(0); }
    21%, 91% { opacity: 0; transform: translateY(-6px); }
    96%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes demo-entrer {
    0%, 17% { opacity: 0; transform: translateY(6px); }
    21%, 91% { opacity: 1; transform: translateY(0); }
    96%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes demo-aller-x {
    0%, 22% { transform: translateX(0); }
    46%, 100% { transform: translateX(21.5rem); }
}

@keyframes demo-aller-y {
    0%, 21% { opacity: 0; transform: translateY(0) scale(0.6); }
    23% { opacity: 1; transform: translateY(-0.5rem) scale(1); }
    44% { opacity: 1; transform: translateY(-17rem) scale(1); }
    48%, 100% { opacity: 0; transform: translateY(-17rem) scale(0.4); }
}

@keyframes demo-kpi-sortir {
    0%, 46% { opacity: 1; transform: translateY(0); }
    50%, 91% { opacity: 0; transform: translateY(-8px); }
    96%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes demo-kpi-entrer {
    0%, 46% { opacity: 0; transform: translateY(8px); }
    50%, 91% { opacity: 1; transform: translateY(0); }
    96%, 100% { opacity: 0; transform: translateY(8px); }
}

@keyframes demo-lueur {
    0%, 46% { box-shadow: 0 0 0 0 rgba(243, 199, 123, 0); border-color: var(--bordure); }
    50% { box-shadow: 0 0 0 6px rgba(243, 199, 123, 0.45); border-color: #e2b25f; }
    70%, 100% { box-shadow: 0 0 0 0 rgba(243, 199, 123, 0); border-color: var(--bordure); }
}

@keyframes demo-barre {
    0%, 50% { height: 22%; }
    58%, 91% { height: 48%; }
    96%, 100% { height: 22%; }
}

@keyframes demo-fil {
    0%, 54% { max-height: 0; opacity: 0; padding-block: 0; }
    60%, 91% { max-height: 2.5rem; opacity: 1; padding-block: 0.5rem; }
    96%, 100% { max-height: 0; opacity: 0; padding-block: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .demo--visible * {
        animation: none !important;
    }
}

/* ---------- Sections ---------- */
.vitrine__section {
    max-width: 76rem;
    margin: 0 auto;
    padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4rem);
}

.vitrine__h2 {
    max-width: 40rem;
    margin: 0 0 2.5rem;
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.vitrine__roles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 52rem) {
    .vitrine__roles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.role {
    padding: 1.75rem;
    border: 1px solid var(--bordure);
    border-radius: 18px;
    background: #fff;
}

.role:nth-child(2) {
    background: var(--nuit);
    border-color: var(--nuit);
    color: #fff;
}

.role__icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--accent-texte);
}

.role:nth-child(2) .role__icone {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sable);
}

.role h3 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.role p {
    margin: 0;
    line-height: 1.65;
    color: var(--texte-2);
    text-wrap: pretty;
}

.role:nth-child(2) p {
    color: rgba(255, 255, 255, 0.75);
}

.vitrine__regles {
    background: var(--sable-doux);
}

.regles {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--texte);
}

@media (min-width: 52rem) {
    .regles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 3rem;
    }
}

.regles li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(16, 24, 40, 0.14);
}

.regles strong {
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.regles span {
    max-width: 30rem;
    line-height: 1.6;
    color: var(--texte-2);
    text-wrap: pretty;
}

.etapes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: etape;
}

.etapes li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0 0 2rem 3.5rem;
    counter-increment: etape;
}

.etapes li::before {
    content: counter(etape);
    position: absolute;
    top: -0.25rem;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.etapes li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 2.5rem;
    bottom: 0;
    left: 1.25rem;
    width: 2px;
    background: var(--bordure-forte);
}

.etapes strong {
    font-size: 1.0625rem;
}

.etapes span {
    line-height: 1.6;
    color: var(--texte-2);
    text-wrap: pretty;
}

@media (min-width: 62rem) {
    .etapes {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .etapes li {
        padding: 3.5rem 0 0;
    }

    .etapes li::before {
        top: 0;
    }

    .etapes li:not(:last-child)::after {
        top: 1.25rem;
        right: -1.5rem;
        bottom: auto;
        left: 3rem;
        width: auto;
        height: 2px;
    }
}

.vitrine__final {
    max-width: 76rem;
    margin: 0 auto clamp(3rem, 6vw, 5rem);
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
    border-radius: 28px;
    background: var(--nuit);
    color: #fff;
}

@media (max-width: 76rem) {
    .vitrine__final {
        margin-inline: clamp(1rem, 4vw, 2.5rem);
    }
}

.vitrine__final h2 {
    max-width: 36rem;
    margin: 0;
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.vitrine__final > p {
    max-width: 38rem;
    margin: 1rem 0 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.vitrine__final .vitrine__actions {
    margin-top: 2rem;
}

.vitrine__membre {
    max-width: 44rem;
    margin: 2.5rem 0 0 !important;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.9375rem !important;
}

.vitrine__membre strong {
    color: var(--sable);
}

.vitrine__pied {
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem) 2rem;
}
