@import url("tokens.css");

*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    min-height: 100vh;
    overflow-x: clip;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4 { overflow-wrap: anywhere; }

h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 650; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 620; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }

p { margin: 0 0 1rem; color: var(--text-secondary); }
.lead { font-size: 1.125rem; color: var(--text-secondary); max-width: 42rem; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -40px;
    background: var(--primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 1000;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}
.container-wide {
    width: min(100% - 2rem, var(--container-wide));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 650;
    letter-spacing: -0.04em;
    font-size: 1.05rem;
}
.brand:hover { color: var(--text); }
.brand img, .brand svg { width: 32px; height: 32px; }

.nav-links {
    display: none;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.925rem;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 8px;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--text);
    background: var(--surface-2);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--text);
}
.icon-btn:hover { border-color: var(--border-strong); }

.menu-toggle { display: inline-grid; }
.nav-cta { display: none; }

.mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 12px 16px 20px;
}
.mobile-panel.is-open { display: block; }
.mobile-panel a {
    display: block;
    padding: 12px 8px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}
.mobile-panel .btn { margin-top: 12px; width: 100%; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { color: inherit; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, var(--shadow-xs);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-lg { min-height: 50px; padding: 0 22px; }
.btn-full { width: 100%; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: 1px solid transparent;
}
[data-theme="dark"] .badge { color: var(--primary); }
.badge-muted {
    background: var(--surface-2);
    color: var(--text-muted);
}

.section { padding: 72px 0; }
.section-header { max-width: 40rem; margin-bottom: 36px; }
.section-kicker {
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.hero {
    position: relative;
    padding: 48px 0 24px;
    overflow: hidden;
    background: var(--hero-glow), var(--background);
}
.hero-grid {
    display: grid;
    gap: 40px;
    align-items: center;
}
.hero-copy .badge { margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.hero-note { font-size: 0.9rem; color: var(--text-muted); }

.grid {
    display: grid;
    gap: 16px;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-strong);
}
.card-link { color: inherit; display: block; }
.card-link:hover { color: inherit; }

.icon-tile {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 14px;
}
.icon-tile svg { width: 22px; height: 22px; }

.product-card .meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.product-card h3 { margin-bottom: 8px; }
.feature-list {
    list-style: none;
    margin: 12px 0 16px;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.feature-list li {
    padding: 4px 0 4px 18px;
    position: relative;
}
.feature-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    position: absolute;
    left: 0;
    top: 0.7em;
}
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.why-item h3 { margin-bottom: 6px; }
.sector-card p { margin-bottom: 0; font-size: 0.95rem; }

.cta-band {
    background: linear-gradient(180deg, var(--surface) 0%, var(--primary-soft) 140%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 28px;
    text-align: center;
}
.cta-band p { margin-inline: auto; }

.site-footer {
    margin-top: 48px;
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
    background: var(--background-alt);
}
.footer-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr 1fr;
}
.footer-brand p { font-size: 0.95rem; max-width: 28rem; }
.footer-col h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a {
    display: inline-block;
    padding: 5px 0;
    color: var(--text-secondary);
    font-size: 0.925rem;
}
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; }
label { display: block; font-weight: 550; font-size: 0.9rem; margin-bottom: 6px; }
.req { color: var(--danger); }
.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    border-radius: 10px;
    padding: 11px 12px;
    min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field .error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.alert-success { background: var(--success-soft); color: var(--text); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.9rem; color: var(--text-secondary); }
.check input { margin-top: 4px; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 16px 0 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--border-strong);
}

.page-hero { padding: 28px 0 8px; }
.page-hero p { max-width: 40rem; }

.accordion details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 4px 16px;
}
.accordion summary {
    cursor: pointer;
    font-weight: 600;
    padding: 14px 0;
    list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion details p { padding-bottom: 12px; }

.steps { display: grid; gap: 12px; }
.step {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: start;
}
.step-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.mock {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.mock-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.mock-screen { padding: 16px; min-height: 280px; }
.mock-label {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 8px;
}
.mock-wrap { transition: transform 0.25s var(--ease); }
.mock-wrap:hover { transform: translateY(-4px) scale(1.01); }

.dash {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    min-height: 240px;
}
.dash-side {
    background: var(--primary-soft);
    border-radius: 12px;
    padding: 10px;
}
.dash-side span {
    display: block;
    height: 8px;
    border-radius: 99px;
    background: var(--primary);
    opacity: 0.35;
    margin-bottom: 10px;
}
.dash-main { display: grid; gap: 10px; }
.dash-row { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 10px; }
.dash-block {
    background: var(--surface-2);
    border-radius: 10px;
    min-height: 64px;
}
.dash-block.tall { min-height: 120px; }
.dash-title {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.devices { display: grid; gap: 16px; }
.device-phone {
    width: min(220px, 100%);
    border: 8px solid var(--text);
    border-radius: 28px;
    min-height: 320px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.finder-card { max-width: 720px; }
.finder-q { margin-bottom: 18px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 8px 12px;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    background: var(--surface);
}
.choices input { accent-color: var(--primary); }

.result-box {
    border: 1px solid var(--primary);
    background: var(--primary-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
}

.whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1aad57;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-md);
}
.whatsapp-float:hover { color: #fff; transform: scale(1.04); }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    display: none;
    max-width: 720px;
    margin-inline: auto;
}
.cookie-banner.is-visible { display: block; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.pricing-grid { display: grid; gap: 16px; }
.price-card.highlight {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.legal-content { max-width: 46rem; }
.legal-content h2 { margin-top: 1.6em; }
.muted { color: var(--text-muted); }

.admin-shell { display: grid; min-height: 100vh; }
.admin-side {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
}
.admin-side a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text-secondary); }
.admin-side a:hover, .admin-side a.is-active { background: var(--surface-2); color: var(--text); }
.admin-main { padding: 20px; }
.table-wrap { overflow-x: auto; }
table.data {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 12px;
}
table.data th, table.data td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.stat-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat strong { font-size: 1.6rem; display: block; }

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    background: var(--surface-2);
}
.status-new { background: var(--accent-soft); }
.status-converted { background: var(--success-soft); }

.login-card {
    max-width: 420px;
    margin: 12vh auto;
}

.reveal { animation: fade-up 0.6s var(--ease) both; }
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .form-row-2 { grid-template-columns: 1fr 1fr; }
    .hero { padding: 72px 0 48px; }
    .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
    .devices { grid-template-columns: 1.4fr 0.6fr; align-items: center; }
    .admin-shell { grid-template-columns: 240px 1fr; }
    .admin-side { border-bottom: 0; border-right: 1px solid var(--border); }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .cookie-banner { left: 24px; right: auto; width: 420px; }
}

@media (min-width: 1024px) {
    .nav-links { display: flex; }
    .menu-toggle { display: none; }
    .nav-cta { display: inline-flex; }
    .mobile-panel { display: none !important; }
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr 1fr; }
    .pricing-grid { grid-template-columns: 1fr 1fr 1fr; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .section { padding: 96px 0; }
}

@media (min-width: 1280px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .mock-wrap:hover, .card:hover { transform: none; }
}

/* EnAfrique V2 */
.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}
.hero-pills a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}
.hero-pills a:hover { color: var(--text); border-color: var(--border-strong); }
.hero-visual { min-width: 0; }
.section-alt { background: var(--background-alt); }
.section-alt .card { background: var(--surface); }

.laptop { max-width: 100%; }
.laptop-lid {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 16px 16px 8px 8px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.laptop-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.laptop-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-strong);
}
.laptop-screen img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--surface-2);
}
.laptop-base {
    height: 10px;
    margin: 0 8% 0;
    border-radius: 0 0 10px 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-top: 0;
}

.showcase-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}
.showcase-card {
    color: inherit;
    display: grid;
    gap: 10px;
}
.showcase-card:hover { color: inherit; }
.showcase-card strong { letter-spacing: -0.03em; }
.showcase-card span { color: var(--text-muted); font-size: 0.85rem; }

.eco-card .btn { margin-top: 8px; }
.finder-teaser { text-align: left; }
.finder-form h2 { font-size: 1.05rem; }

.gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}
.gallery-item {
    position: relative;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
}
.gallery-item img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.gallery-cap {
    position: absolute;
    left: 10px;
    bottom: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--text-muted);
}
.lightbox {
    border: none;
    padding: 0;
    background: transparent;
    max-width: min(96vw, 1100px);
}
.lightbox::backdrop { background: rgba(12, 18, 34, 0.72); }
.lightbox img { width: 100%; height: auto; border-radius: 12px; }
.lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border: 0;
    background: var(--surface);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--surface);
    font-size: 1.4rem;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.product-video { margin-top: 20px; }
.video-poster {
    position: relative;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.video-poster img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.video-play {
    position: absolute;
    inset: auto auto 16px 16px;
    background: var(--primary);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 650;
}
.video-frame iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 16px; }

.whatsapp-float {
    width: auto;
    min-width: 56px;
    height: 56px;
    padding: 0 14px 0 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.whatsapp-label { font-size: 0.82rem; font-weight: 650; white-space: nowrap; }
.footer-grid-v2 { grid-template-columns: 1fr 1fr; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.product-hero { padding-bottom: 24px; }

@media (max-width: 359px) {
    .hero-actions .btn { width: 100%; }
    .whatsapp-label { display: none; }
    .whatsapp-float { width: 56px; padding: 0; justify-content: center; }
}

@media (min-width: 768px) {
    .showcase-grid { grid-template-columns: 1fr 1fr; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .footer-grid-v2 { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
    .showcase-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .laptop-lid { box-shadow: var(--shadow-sm); }
}
