/*
 * Accueil public (index.php) : présentation commerciale pour les réseaux.
 * Chargée uniquement par la page d'accueil, après app.css (mêmes variables).
 * La charte reprend celle du hero : bleu nuit, accent rose, Poppins.
 */

/* Ancres de la page : défilement doux (page d'accueil seulement). */
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

/* ----- Bouton WhatsApp de l'en-tête (retour de Tommy du 26/11) ----- */
/* La ligne d'aide reste centrée : le bouton est posé à droite du bandeau,
   qui s'élargit pour l'accueillir. */
.topbar { position: relative; }
.topbar__inner { min-height: 61px; }
.wa-btn {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; gap: 9px;
    height: 45px; padding: 0 16px; border-radius: 999px;
    background: #25D366; color: #fff; font-size: 14px; font-weight: 700; line-height: 1;
    text-decoration: none;
}
.wa-btn:hover, .wa-btn:focus-visible { background: #1DA851; color: #fff; text-decoration: none; }
.wa-btn__icon { display: block; flex: 0 0 auto; }
@media (max-width: 640px) {
    .wa-btn { width: 40px; height: 40px; padding: 0; justify-content: center; right: 10px; }
    .wa-btn__label { display: none; }
    .topbar__inner { padding-right: 56px; }
}

/* ----- Accroche sous la carte de connexion ----- */
.home-teaser { text-align: center; padding: 34px 16px 10px; }
.home-teaser p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.home-teaser__links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ----- Bandeau de réassurance ----- */
.reassurance {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
    margin: 26px auto 0; padding: 14px 16px; max-width: 1080px;
    font-size: 13px; font-weight: 600; color: var(--ink);
}
.reassurance span { display: inline-flex; align-items: center; gap: 6px; }

/* ----- Sections ----- */
.hsec { padding: 64px 16px; background: var(--card); }
.hsec--soft { background: var(--bg); }
.hsec--dark {
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
}
.hsec__inner { max-width: 1080px; margin: 0 auto; }
.hsec__inner--narrow { max-width: 760px; }
.hsec__kicker {
    margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .18em;
    text-transform: uppercase; color: var(--brand-text);
}
.hsec__title {
    margin: 0 0 18px; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800;
    line-height: 1.15; color: var(--ink);
}
.hsec__title .text-brand { color: var(--brand-text); }
.hsec__title--center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.hsec__lead { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hsec__transition { margin: 30px 0 0; text-align: center; font-weight: 700; color: var(--ink); }
.hsec__cta { margin: 30px 0 0; text-align: center; }
.hsec--dark .hsec__title { color: #fff; }
.hsec--dark .hsec__title .text-brand { color: #FF7CA1; }
.hsec--dark .hsec__lead { color: #C8CFDB; }

/* Sections alternant texte et visuel */
.hsec__row {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
}
.hsec__row--flip .hsec__visual { order: -1; }
.hsec__visual { display: flex; justify-content: center; }

/* ----- Listes à coches ----- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 6px 0 6px 30px; color: var(--ink); font-size: 14px; }
.checklist li::before {
    content: "✔"; position: absolute; left: 0; top: 6px;
    color: var(--brand-text); font-weight: 700;
}
.checklist--wide { max-width: 760px; }

/* ----- Constat : trois colonnes ----- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 28px; }
.pillars__item {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.hsec--soft .pillars__item { background: var(--card); }
.pillars__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft);
    font-size: 20px; margin-bottom: 12px;
}
.pillars__item h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.pillars__item p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ----- Carte contact (section interlocuteur) ----- */
.contact-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    padding: 28px; text-align: center; width: 100%; max-width: 340px;
    box-shadow: 0 0 30px #e9ddddc2;
}
.contact-card__avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff; font-size: 26px; font-weight: 800; margin-bottom: 12px;
}
.contact-card__name { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.contact-card__role { margin: 2px 0 10px; color: var(--muted); font-size: 13px; }
.contact-card__phone { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.contact-card__phone a { color: var(--brand-text); text-decoration: none; }
.contact-card__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ----- Aperçus (fenêtres de démonstration, sans marque de réseau) ----- */
.mock {
    margin: 0; width: 100%; max-width: 460px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    overflow: hidden; box-shadow: 0 0 30px #e9ddddc2;
}
.mock__bar {
    display: flex; gap: 6px; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.mock__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock__bar span:first-child { background: var(--brand); }
.mock__body { padding: 18px; }
.mock__heading { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mock__kpi { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.mock__kpi small { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mock__kpi strong { display: block; margin-top: 2px; font-size: 18px; font-weight: 800; color: var(--ink); }
.mock__chart { display: flex; align-items: flex-end; gap: 8px; height: 64px; margin-bottom: 14px; }
.mock__chart span {
    flex: 1; height: var(--h, 50%); border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%); opacity: .85;
}
.mock__list { list-style: none; margin: 0; padding: 0; }
.mock__list li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 12.5px; color: var(--ink); font-weight: 600;
}
.mock__list li + li { margin-top: 8px; }
.mock__list li small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.mock__tag {
    white-space: nowrap; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.mock__tag--ok { background: #E8F6EE; color: var(--success); }
.mock__tag--info { background: var(--network-soft); color: var(--network-text); }
.mock__tag--wait { background: #FFF4E0; color: #B25E00; }
.mock__tag--late { background: #FDECEC; color: var(--danger); }
.mock figcaption { padding: 10px 16px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); }

/* ----- Vitrine produits ----- */
.vitrine { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.vitrine__card {
    position: relative; display: flex; flex-direction: column; gap: 8px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
    padding: 14px; text-decoration: none; transition: border-color .15s, transform .15s;
}
.vitrine__card:hover { border-color: var(--brand); transform: translateY(-2px); }
.vitrine__media {
    display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 10px; aspect-ratio: 1 / 1; overflow: hidden;
}
.vitrine__media img { width: 100%; height: 100%; object-fit: contain; }
.vitrine__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.vitrine__badge {
    position: absolute; top: 22px; left: 22px;
    background: var(--brand); color: #fff; border-radius: 999px;
    padding: 3px 10px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}

/* ----- Compteurs (expertise) ----- */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 28px 0; }
.counters__item { text-align: center; padding: 20px 12px; background: var(--bg); border-radius: 14px; }
.counters__item strong { display: block; font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--brand-text); }
.counters__item > span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* ----- Engagements ----- */
.engagements {
    list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    margin: 0; padding: 0;
}
.engagements li {
    background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
    padding: 7px 16px; font-size: 12.5px; font-weight: 600; color: var(--ink);
}

/* ----- Pour qui ----- */
.who-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.who-cards__item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.who-cards__item h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.who-cards__item p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ----- FAQ ----- */
.faq { margin-top: 24px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.faq__item + .faq__item { margin-top: 10px; }
.faq__item summary { cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: 14px; color: var(--ink); }
.faq__item summary:hover { color: var(--brand-text); }
.faq__item p { margin: 0; padding: 0 18px 15px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

/* ----- CTA final et formulaire « Demander une démo » ----- */
.hsec__contact { margin: 26px 0 0; text-align: center; font-size: 14px; color: #C8CFDB; }
.hsec__contact a { color: #fff; }
.lead-form {
    background: var(--card); border-radius: 16px; padding: 26px;
    margin-top: 26px; box-shadow: 0 0 30px rgba(0, 0, 0, .25);
}
.lead-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.lead-form .field--full { grid-column: 1 / -1; }
.lead-form .field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.lead-form .field input, .lead-form .field select, .lead-form .field textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 14px; font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.lead-form .field textarea { resize: vertical; }
.lead-form .field--inline { margin: 14px 0; }
.lead-form .field--inline label { font-size: 13px; color: var(--ink); }
.field-error { margin: 6px 0 0; font-size: 12.5px; color: var(--danger); font-weight: 600; }
/* Case RGPD : taille fixe au lieu de la largeur de la colonne, alignée avec son libellé. */
.lead-form #lead_rgpd { width: 30px; height: 30px; flex: 0 0 auto; }
/* Champ-piège anti-robots : hors écran, jamais visible. */
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.lead-confirm {
    margin: 26px 0 0; padding: 18px 22px; text-align: center; font-weight: 700;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px; color: #fff;
}

/* ----- Apparition au scroll (activée par home.js, jamais sans JS) ----- */
[data-reveal] { transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-pending { opacity: 0; transform: translateY(16px); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-reveal] { transition: none; }
    [data-reveal].is-pending { opacity: 1; transform: none; }
}

/* ----- Pied de page : suit directement la section sombre de la démo ----- */
.footer { margin-top: 0; }

/* ----- Étapes (réutilise .steps de app.css, resserrées ici) ----- */
#etapes .steps { margin-top: 30px; }

/* ----- Responsive ----- */
@media (max-width: 960px) {
    .hsec { padding: 48px 16px; }
    .hsec__row { grid-template-columns: 1fr; gap: 26px; }
    .hsec__row--flip .hsec__visual { order: 0; }
    .pillars, .who-cards, .counters { grid-template-columns: repeat(2, 1fr); }
    .vitrine { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .hsec { padding: 40px 14px; }
    .reassurance { flex-direction: column; align-items: center; gap: 8px; }
    .lead-form__grid { grid-template-columns: 1fr; }
    .counters { grid-template-columns: 1fr; }
    .vitrine, .who-cards { grid-template-columns: 1fr; }
    .lead-form { padding: 18px; }
}
