/* =============================================================================
   BATECH Cloud — Page vitrine
   Thème « bleu ciel & blanc », cohérent avec le panneau d'administration.
   Organisation : tokens → base → header → hero → sections → composants → footer.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
    --primary: #0EA5E9;
    --primary-dark: #0284C7;
    --primary-light: #E0F2FE;
    --ink: #0F2540;          /* titres */
    --body: #445A73;         /* texte courant */
    --muted: #6B7E95;        /* texte secondaire */
    --bg: #FFFFFF;
    --bg-soft: #F4F8FC;      /* fonds de sections alternés */
    --bg-tint: #EAF4FD;
    --border: #E4EBF3;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 40, 70, .06);
    --shadow: 0 8px 28px rgba(16, 40, 70, .08);
    --shadow-lg: 0 20px 50px rgba(16, 40, 70, .14);
    --ring: rgba(14, 165, 233, .18);
    --maxw: 1160px;
    color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--body);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }
.grad {
    background: linear-gradient(120deg, #0EA5E9, #0284C7);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- 3. Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
    cursor: pointer; border: 1px solid transparent; transition: transform .12s, box-shadow .2s, background .2s, filter .2s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(135deg, #0EA5E9, #0284C7); color: #fff; box-shadow: 0 6px 18px rgba(14, 165, 233, .32); }
.btn--primary:hover { box-shadow: 0 10px 26px rgba(14, 165, 233, .42); filter: brightness(1.04); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { background: var(--bg-soft); border-color: #CFDDEC; }
.btn--light { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow); }
.btn--light:hover { filter: brightness(.98); }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- 4. Header / navigation ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: inline-flex; }
.brand__name { font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.02em; }
.brand__name span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link { font-weight: 500; color: var(--body); font-size: 15px; transition: color .15s; }
.nav__link:hover { color: var(--primary-dark); }
.nav__cta { margin-left: 4px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
    padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
    background:
        radial-gradient(900px 460px at 82% -8%, var(--bg-tint), transparent),
        radial-gradient(700px 400px at 0% 10%, #F0F9FF, transparent);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px;
    background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 22px;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.hero__title { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin-bottom: 20px; }
.hero__lead { font-size: clamp(16px, 2vw, 19px); max-width: 46ch; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__badges { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; }
.hero__badges li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.ic { width: 18px; height: 18px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Aperçu produit (fenêtre stylisée) */
.hero__preview { perspective: 1400px; }
.window {
    background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
    box-shadow: var(--shadow-lg); transform: rotateY(-6deg) rotateX(3deg); transform-style: preserve-3d;
}
.window__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #FF5F57; } .dot--y { background: #FEBC2E; } .dot--g { background: #28C840; }
.window__url { margin-left: 10px; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.window__body { padding: 18px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mini-stat { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.mini-stat__label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.mini-stat__value { font-size: 20px; font-weight: 800; color: var(--ink); }
.mini-stat__value.ok { color: #059669; }
.mini-chart { display: flex; align-items: flex-end; gap: 7px; height: 90px; padding: 8px 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; }
.mini-chart span { flex: 1; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #38BDF8, #0EA5E9); }
.mini-rows { display: flex; flex-direction: column; gap: 8px; }
.mini-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink); }
.mini-row em { margin-left: auto; font-style: normal; color: var(--muted); font-family: ui-monospace, monospace; font-weight: 500; }
.status { display: inline-flex; padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.status--on { background: rgba(16, 185, 129, .12); color: #059669; }
.status--off { background: rgba(239, 68, 68, .12); color: #DC2626; }

/* ---------- 6. Bandeau confiance ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.trust__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 32px; padding: 22px 24px; }
.trust__item { font-size: 15px; color: var(--muted); }
.trust__item strong { color: var(--ink); font-weight: 800; }
.trust__sep { width: 1px; height: 20px; background: var(--border); }

/* ---------- 7. Sections génériques ---------- */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section--tint { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.section__title { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; margin-bottom: 14px; }
.section__sub { font-size: 17px; color: var(--muted); }

/* ---------- 8. Cartes services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
    box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D3E4F5; }
.card__icon {
    width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
    background: var(--primary-light); margin-bottom: 18px;
}
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--primary-dark); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card__text { font-size: 15px; color: var(--muted); }

/* ---------- 9. Section scindée (texte / visuel) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__text .section__title { text-align: left; }
.checklist { list-style: none; margin: 22px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; font-size: 15.5px; color: var(--body); }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284C7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.portal { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-width: 380px; margin: 0 auto; }
.portal__head { background: linear-gradient(135deg, #0EA5E9, #0284C7); color: #fff; font-weight: 700; padding: 18px 20px; }
.portal__tiers { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.tier { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; }
.tier span { color: var(--muted); font-size: 14px; }
.tier strong { color: var(--ink); font-size: 16px; }
.tier--hi { border-color: var(--primary); background: var(--primary-light); }
.portal__foot { text-align: center; padding: 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }

/* ---------- 10. Étapes ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.step__num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #0EA5E9, #0284C7); color: #fff; font-weight: 800; margin-bottom: 16px; }
.step__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step__text { font-size: 15px; color: var(--muted); }

/* ---------- 11. Tarifs ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 24px; justify-content: center; }
.plan { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-sm); }
.plan--featured { border-color: var(--primary); box-shadow: 0 20px 44px rgba(14, 165, 233, .18); }
.plan__badge { position: absolute; top: -12px; left: 32px; background: linear-gradient(135deg, #0EA5E9, #0284C7); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px; }
.plan__name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.plan__desc { font-size: 14.5px; color: var(--muted); margin-bottom: 18px; min-height: 42px; }
.plan__price { margin-bottom: 22px; }
.plan__amount { font-size: 30px; font-weight: 800; color: var(--ink); }
.plan__features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.plan__features li { position: relative; padding-left: 28px; font-size: 15px; color: var(--body); }
.plan__features li::before {
    content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284C7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.plans__note { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }

/* ---------- 12. FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; box-shadow: var(--shadow-sm); }
.faq__item summary { list-style: none; cursor: pointer; padding: 18px 34px 18px 0; font-weight: 600; color: var(--ink); position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--primary); transition: transform .2s; }
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { padding: 0 0 20px; color: var(--muted); font-size: 15px; }

/* ---------- 13. CTA final ---------- */
.cta-band { background: linear-gradient(135deg, #0EA5E9, #0284C7); }
.cta-band__inner { text-align: center; padding: clamp(48px, 7vw, 76px) 24px; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, .9); font-size: 17px; margin-bottom: 26px; }

/* ---------- 14. Contact ---------- */
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.contact-list li { display: flex; align-items: center; gap: 14px; font-size: 16px; color: var(--body); }
.contact-list a:hover { color: var(--primary-dark); }
.contact-list__ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-light); flex-shrink: 0; }
.contact-list__ic svg { width: 20px; height: 20px; fill: none; stroke: var(--primary-dark); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.contact-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 20px; margin-bottom: 10px; }
.contact-card p { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.contact-card .btn { margin-bottom: 12px; }
.contact-card .btn:last-child { margin-bottom: 0; }

/* ---------- 15. Footer ---------- */
.site-footer { background: #0B1C30; color: #A9BCCF; padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.brand--footer .brand__name { color: #fff; }
.footer__brand p { margin-top: 14px; font-size: 14.5px; max-width: 42ch; color: #8CA1B6; }
.footer__col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer__col a, .footer__col span { display: block; font-size: 14.5px; color: #A9BCCF; margin-bottom: 10px; transition: color .15s; }
.footer__col a:hover { color: var(--primary); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; font-size: 13px; color: #7A90A6; }

/* ---------- 16. Animations d'apparition ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .window { transform: none; }
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 960px) {
    .hero__grid { grid-template-columns: 1fr; gap: 40px; }
    .hero__preview { order: -1; max-width: 520px; }
    .window { transform: none; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; gap: 36px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .nav {
        position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
        background: #fff; border-bottom: 1px solid var(--border); padding: 16px 24px 24px;
        box-shadow: var(--shadow); transform: translateY(-140%); transition: transform .28s ease; visibility: hidden;
    }
    .nav.is-open { transform: none; visibility: visible; }
    .nav__link { padding: 12px 4px; border-bottom: 1px solid var(--border); }
    .nav__cta { margin-top: 10px; }
    .nav-toggle { display: flex; }
    .cards { grid-template-columns: 1fr; }
    .plans { grid-template-columns: 1fr; }
    .trust__sep { display: none; }
    .footer__grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   18. Pages internes, articles et blog (ajoutés en Phase 1)
   ========================================================================== */

/* Accessibilité & états de nav */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 200; }
.skip-link:focus { left: 0; }
.nav__link.is-active { color: var(--primary-dark); font-weight: 600; }
section[id] { scroll-margin-top: 84px; }

/* Lien « en savoir plus » et cartes cliquables */
.card__link { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--primary-dark); font-size: 14.5px; }
.card--clickable { display: block; color: inherit; }
.card--clickable:hover .card__link { text-decoration: underline; }

/* En-tête de page interne */
.page-hero {
    padding: clamp(48px, 7vw, 84px) 0 clamp(28px, 4vw, 44px);
    text-align: center;
    background: radial-gradient(800px 380px at 50% -20%, var(--bg-tint), transparent), var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.page-hero__title { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; margin-bottom: 14px; }
.page-hero__sub { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 62ch; margin: 0 auto; }
.page-hero .btn { margin-top: 26px; }

/* Fil d'ariane */
.breadcrumb { font-size: 13.5px; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb span { margin: 0 6px; color: #9AA9BC; }
.breadcrumb span:last-child { color: var(--ink); font-weight: 600; }

/* Article / contenu long (prose) */
.article { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 80px); }
.article__meta, .blog-card__meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.tag { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; font-size: 11px; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
.article__title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.article__lead { font-size: 19px; color: var(--body); margin-bottom: 32px; }
.prose { font-size: 16.5px; color: var(--body); }
.prose h2 { font-size: 22px; margin: 32px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code { background: var(--bg-soft); color: var(--primary-dark); padding: 2px 7px; border-radius: 6px; font-family: ui-monospace, monospace; font-size: 14px; }
.prose pre { background: #0B1220; padding: 18px 20px; border-radius: 12px; overflow-x: auto; margin: 0 0 20px; border: 1px solid #1E293B; }
.prose pre code { background: none; color: #7EE787; padding: 0; font-size: 13.5px; }
.callout { background: var(--primary-light); border: 1px solid rgba(14, 165, 233, .3); border-radius: 12px; padding: 16px 18px; margin: 8px 0 24px; font-size: 15.5px; color: var(--ink); }
.article__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); color: inherit; transition: transform .2s, box-shadow .2s; }
a.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card__cover { height: 140px; background: linear-gradient(135deg, #0EA5E9, #0284C7); display: grid; place-items: center; }
.blog-card__cover span { color: rgba(255, 255, 255, .92); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.blog-card__body { padding: 22px; }
.blog-card__title { font-size: 18px; margin-bottom: 8px; }
.blog-card__excerpt { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; }
.blog-card--soon { opacity: .72; }
.blog-card--soon .blog-card__cover { filter: grayscale(.4); }

@media (max-width: 960px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .blog-grid { grid-template-columns: 1fr; } .article__cta .btn { width: 100%; } }
