/* =========================================================
   Portail PME APME — interface publique
   ========================================================= */

:root {
    --ap-navy: #1c3a6b;
    --ap-navy-dark: #142c54;
    --ap-green: #2e7d32;
    --ap-green-dark: #256a29;
    --ap-green-soft: #e8f3e9;
    --ap-bg: #f4f2ed;
    --ap-sand: #ece7dd;
    --ap-line: #e2ddd2;
    --ap-text: #1b2333;
    --ap-muted: #5d6677;
    --ap-white: #fff;
    --ap-radius: 14px;
    --ap-radius-sm: 10px;
    --ap-shadow: 0 1px 2px rgba(20, 30, 50, .04);
    --ap-font: 'Figtree', 'Public Sans', system-ui, sans-serif;
}

.ap-body,
.ap-body button,
.ap-body input,
.ap-body select {
    font-family: var(--ap-font);
}

.ap-page {
    background: var(--ap-bg);
    color: var(--ap-text);
    font-family: var(--ap-font);
}

.ap-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.ap-page a,
.ap-header a,
.ap-footer a {
    text-decoration: none;
}

.ap-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Boutons ---------- */
.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 2px solid transparent;
    border-radius: var(--ap-radius-sm);
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
    white-space: nowrap;
}

.ap-btn-navy { background: var(--ap-navy); color: #fff !important; }
.ap-btn-navy:hover { background: var(--ap-navy-dark); }
.ap-btn-green { background: var(--ap-green); color: #fff !important; }
.ap-btn-green:hover { background: var(--ap-green-dark); }
.ap-btn-white { background: #fff; color: var(--ap-navy) !important; }
.ap-btn-white:hover { background: #e9eef6; }
.ap-btn-outline-white { border-color: #fff; color: #fff !important; background: transparent; }
.ap-btn-outline-white:hover { background: rgba(255, 255, 255, .1); }
.ap-btn-light { background: #fff; border: 1px solid var(--ap-line); color: var(--ap-navy) !important; font-weight: 600; }
.ap-btn-light:hover { border-color: var(--ap-navy); }
.ap-btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.ap-btn-block { width: 100%; }
.ap-label-short { display: none; }

.ap-icon { width: 20px; height: 20px; flex: none; }
.ap-icon-sm { width: 16px; height: 16px; flex: none; }

/* ---------- Pastilles ---------- */
.ap-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.ap-pill-green { background: var(--ap-green); color: #fff; }
.ap-pill-verified { background: #fff; color: var(--ap-green); }
.ap-pill-soft-green { background: var(--ap-green-soft); color: var(--ap-green); }
.ap-pill-soft { background: var(--ap-bg); color: var(--ap-muted); border: 1px solid var(--ap-line); }

/* =========================================================
   En-tête
   ========================================================= */
.ap-header {
    position: relative;
    z-index: 1030;
    background: #fff;
    font-family: var(--ap-font);
    color: var(--ap-text);
}

.ap-topbar {
    background: var(--ap-navy);
    color: #fff;
    font-size: 13px;
}

.ap-topbar .ap-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 16px;
}

.ap-topbar strong { font-weight: 700; }
.ap-topbar-muted { opacity: .8; margin-left: 12px; }
.ap-topbar-links { display: flex; align-items: center; gap: 20px; }
.ap-topbar-links a { color: #fff; opacity: .9; }
.ap-topbar-links a:hover { opacity: 1; text-decoration: underline; }

.ap-lang {
    display: inline-flex;
    padding: 2px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .12);
}

.ap-lang button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.ap-lang button.is-active { background: #fff; color: var(--ap-navy); }

.ap-header-main .ap-container {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 84px;
}

.ap-brand { display: flex; align-items: center; gap: 12px; color: var(--ap-navy) !important; flex: none; }
.ap-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
}
.ap-brand-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #9fb3d3;
    font-size: 10px;
    font-weight: 700;
    color: var(--ap-navy);
}
.ap-brand-img { display: block; height: 64px; width: auto; max-width: 140px; object-fit: contain; }
.ap-brand-img-chip { display: inline-flex; padding: 6px 10px; border-radius: 10px; background: #fff; }
.ap-brand-img-chip .ap-brand-img { height: 56px; }
.ap-brand-name { display: block; font-size: 22px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.ap-brand-tagline { display: block; font-size: 12px; color: var(--ap-muted); margin-top: 2px; }

.ap-search {
    position: relative;
    flex: 1;
    display: flex;
    align-items: stretch;
    height: 48px;
    border: 2px solid var(--ap-navy);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    overflow: visible;
}

.ap-search select,
.ap-search input {
    border: 0;
    background: transparent;
    color: var(--ap-text);
    font-size: 14px;
    outline: 0;
}

.ap-search select {
    padding: 0 28px 0 14px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c3a6b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.ap-search .ap-search-scope {
    background-color: #eef2f8;
    color: var(--ap-navy);
    border-radius: 7px 0 0 7px;
}

.ap-search .ap-search-region { border-left: 1px solid var(--ap-line); color: var(--ap-muted); font-weight: 500; }
.ap-search input { flex: 1; min-width: 0; padding: 0 14px; }
.ap-search input::placeholder { color: #8a92a1; }

.ap-search-submit {
    width: 56px;
    border: 0;
    background: var(--ap-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 7px 7px 0;
    cursor: pointer;
}

.ap-search-submit:hover { background: var(--ap-navy-dark); }

.ap-search .typed-search-box {
    top: calc(100% + 6px) !important;
    z-index: 1040;
    max-height: 460px;
    overflow-y: auto;
}

.ap-header-actions { display: flex; align-items: center; gap: 22px; flex: none; }

.ap-action {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ap-text) !important;
    font-size: 13px;
    line-height: 1.2;
}

.ap-action svg { color: var(--ap-navy); width: 24px; height: 24px; }
.ap-action > span { white-space: nowrap; }
.ap-action-icon { position: relative; display: inline-flex; }
.ap-action-icon .ap-badge { top: -9px; left: auto; right: -12px; }
.ap-action small { display: block; color: var(--ap-muted); font-size: 12px; }
.ap-action strong { display: block; font-weight: 700; color: var(--ap-navy); }

.ap-badge {
    position: absolute;
    top: -8px;
    left: 14px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: var(--ap-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.ap-badge-red { background: #d64534; }

.ap-nav { border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }
.ap-nav .ap-container { display: flex; align-items: center; gap: 24px; min-height: 56px; }

.ap-nav-categories {
    position: relative;
    flex: none;
}

.ap-nav-categories > button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--ap-navy);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.ap-nav-categories-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    box-shadow: 0 12px 32px rgba(20, 30, 50, .12);
    display: none;
}

.ap-nav-categories.is-open .ap-nav-categories-menu { display: block; }

.ap-nav-categories-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--ap-text) !important;
    font-size: 14px;
}

.ap-nav-categories-menu a:hover { background: var(--ap-bg); color: var(--ap-navy) !important; }

.ap-nav-links { display: flex; align-items: stretch; gap: 26px; margin: 0; padding: 0; list-style: none; flex: 1; }

.ap-nav-links a {
    display: flex;
    align-items: center;
    height: 56px;
    color: var(--ap-text) !important;
    font-weight: 600;
    font-size: 14.5px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.ap-nav-links a:hover { color: var(--ap-navy) !important; }
.ap-nav-links a.is-active { color: var(--ap-navy) !important; border-bottom-color: var(--ap-navy); font-weight: 700; }
.ap-nav .ap-btn { flex: none; min-height: 40px; font-size: 14px; }

/* En-tête mobile */
.ap-mobile-header { display: none; }

.ap-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--ap-navy) !important;
    cursor: pointer;
    padding: 0;
}

.ap-icon-btn .ap-badge { top: -2px; left: auto; right: -4px; }

/* Tiroir de navigation mobile */
.ap-drawer {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
    font-family: var(--ap-font);
}

.ap-drawer.is-open { transform: none; visibility: visible; }

.ap-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ap-line);
}

.ap-drawer-ctas { display: grid; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--ap-line); }
.ap-drawer-ctas .ap-btn { min-height: 46px; }

.ap-drawer-nav { flex: 1; overflow-y: auto; padding: 6px 0; margin: 0; list-style: none; }

.ap-drawer-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: var(--ap-text) !important;
    font-size: 16px;
    font-weight: 600;
}

.ap-drawer-nav a svg { color: var(--ap-muted); }

.ap-drawer-foot {
    display: grid;
    gap: 12px;
    padding: 18px 20px 24px;
    background: var(--ap-bg);
    font-size: 15px;
}

.ap-drawer-foot a { color: var(--ap-navy) !important; font-weight: 600; }
.ap-drawer-lang { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.ap-drawer-lang .ap-lang { background: var(--ap-sand); }
.ap-drawer-lang .ap-lang button { color: var(--ap-text); padding: 6px 14px; font-size: 14px; }
.ap-drawer-lang .ap-lang button.is-active { background: var(--ap-navy); color: #fff; }

body.ap-drawer-open { overflow: hidden; }

/* =========================================================
   Sections génériques
   ========================================================= */
.ap-section { padding: 28px 0; }
.ap-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.ap-section-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.015em; color: var(--ap-text); }
.ap-section-sub { margin: 4px 0 0; color: var(--ap-muted); font-size: 14px; }

.ap-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ap-navy) !important;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.ap-link:hover { text-decoration: underline !important; }

.ap-card {
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
}

.ap-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--ap-sand);
    color: #7c7768;
    font-size: 14px;
    text-align: center;
}

.ap-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Héro ---------- */
.ap-hero { padding-top: 28px; }

.ap-hero-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 28px;
    padding: 36px;
    border-radius: 20px;
    background: var(--ap-navy);
    color: #fff;
    overflow: hidden;
}

.ap-hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.ap-hero h1 {
    margin: 18px 0 16px;
    font-size: 48px;
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.025em;
    color: #fff;
}

.ap-hero p { max-width: 460px; margin: 0 0 26px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .85); }
.ap-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ap-hero-actions .ap-btn { min-height: 48px; }

.ap-hero-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    min-height: 320px;
}

.ap-hero-tile {
    position: relative;
    border-radius: var(--ap-radius);
    overflow: hidden;
    border: 1.5px dashed rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
}

.ap-hero-tile.has-image { border: 0; }
.ap-hero-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-hero-tile-label { position: absolute; left: 14px; bottom: 12px; right: 14px; }
.ap-hero-tile-main { grid-row: span 2; }

.ap-hero-tile-pay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border: 0;
    background: var(--ap-green);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.ap-hero-tile-pay svg { margin-bottom: auto; }

/* Diaporama : les diapositives sont superposées dans la même cellule de grille
   (hauteur = la plus haute), seule la diapositive active est visible. */
.ap-hero-slider { position: relative; }
.ap-hero-track { display: grid; grid-template-columns: minmax(0, 1fr); }
.ap-hero-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.ap-hero-slide.is-active { opacity: 1; visibility: visible; }
.ap-hero-slide.no-media { grid-template-columns: 1fr; }
.ap-hero-title { margin: 18px 0 16px; font-size: 48px; line-height: 1.04; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.ap-hero-media.no-main { grid-template-columns: minmax(0, 1fr); }
.ap-hero-media.single-side > .ap-hero-tile:not(.ap-hero-tile-main) { grid-row: span 2; }
.ap-hero-media.no-side { grid-template-columns: minmax(0, 1fr); }
a.ap-hero-tile-pay:hover { background: var(--ap-green-dark); }
.ap-label-short { display: none; }

.ap-hero-nav { position: absolute; left: 36px; bottom: 10px; display: flex; align-items: center; gap: 2px; }
.ap-hero-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: rgba(255, 255, 255, .7); cursor: pointer;
}
.ap-hero-arrow:hover, .ap-hero-arrow:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
.ap-hero-dots { display: flex; align-items: center; }
.ap-hero-dots button { display: inline-flex; align-items: center; padding: 10px 3px; border: 0; background: transparent; cursor: pointer; }
.ap-hero-dots span { display: block; width: 8px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .45); transition: width .3s, background-color .3s; }
.ap-hero-dots button.is-active span { width: 24px; background: #fff; }
.ap-hero-arrow:focus-visible, .ap-hero-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
    .ap-hero-slide, .ap-hero-dots span { transition: none; }
}

/* ---------- Secteurs ---------- */
.ap-sectors { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }

.ap-sector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 8px 16px;
    color: var(--ap-text) !important;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    transition: border-color .15s, transform .15s;
}

.ap-sector:hover { border-color: var(--ap-navy); transform: translateY(-2px); }

.ap-sector-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid var(--ap-line);
    background: #fff;
    color: var(--ap-navy);
    font-size: 17px;
    font-weight: 800;
}

/* ---------- Onglets ---------- */
.ap-head-tools { display: flex; align-items: center; gap: 18px; }
.ap-tabs { display: inline-flex; gap: 6px; }

.ap-tab {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--ap-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ap-text);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.ap-tab.is-active { background: var(--ap-navy); border-color: var(--ap-navy); color: #fff; }
.ap-tab-pane { display: none; }
.ap-tab-pane.is-active { display: block; }

/* ---------- Cartes produit ---------- */
.ap-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.ap-product { display: flex; flex-direction: column; overflow: hidden; }

.ap-product-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--ap-sand); }
.ap-product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-product-media .ap-pill { position: absolute; top: 12px; left: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.ap-product-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.ap-product-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-muted); }

.ap-product-name {
    margin: 6px 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ap-text) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ap-product-seller { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ap-muted); }
.ap-product-price { margin: 10px 0 14px; font-size: 20px; font-weight: 800; color: var(--ap-navy); }
.ap-product-price del { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--ap-muted); }
.ap-product-actions { display: flex; gap: 8px; margin-top: auto; }
.ap-product-actions .ap-btn { flex: 1; min-height: 40px; padding: 0 12px; font-size: 14px; }

/* Contacter le vendeur : la plateforme ne prend pas de commande, l'achat se conclut sur WhatsApp */
.ap-btn-whatsapp { background: #25d366; color: #fff !important; }
.ap-btn-whatsapp:hover { background: #128c4b; }

.ap-empty {
    padding: 36px;
    text-align: center;
    color: var(--ap-muted);
    border: 1px dashed var(--ap-line);
    border-radius: var(--ap-radius);
    background: #fff;
}

/* ---------- PME à la une ---------- */
.ap-shops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ap-shop { display: flex; flex-direction: column; padding: 20px; }
.ap-shop-head { display: flex; gap: 14px; align-items: center; }

.ap-shop-logo {
    width: 58px;
    height: 58px;
    flex: none;
    border-radius: 10px;
    border: 1px solid var(--ap-line);
    background: var(--ap-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--ap-muted);
}

.ap-shop-logo img { width: 100%; height: 100%; object-fit: contain; }
.ap-shop-name { margin: 0; font-size: 17px; font-weight: 700; color: var(--ap-text); }
.ap-shop-meta { margin-top: 2px; font-size: 13px; color: var(--ap-muted); }
.ap-shop-desc { margin: 14px 0; font-size: 14px; line-height: 1.5; color: var(--ap-muted); flex: 1; }
.ap-shop-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ap-shop-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

/* ---------- Annuaire des PME ---------- */
.ap-directory-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 14px;
    padding: 18px;
    margin-bottom: 14px;
}

.ap-directory-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-directory-field label { margin: 0; font-size: 13px; font-weight: 700; color: var(--ap-text); }

.ap-directory-field input,
.ap-directory-field select {
    height: 44px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    font-family: var(--ap-font);
    font-size: 14px;
    color: var(--ap-text);
}

.ap-directory-field input:focus,
.ap-directory-field select:focus { outline: 0; border: 2px solid var(--ap-navy); }
.ap-directory-actions { display: flex; align-items: center; gap: 14px; }
.ap-directory-count { margin: 0 0 16px; font-size: 14px; color: var(--ap-muted); }
.ap-shop-contact { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--ap-muted); }
.ap-shop-contact li, .ap-shop-contact a { display: flex; align-items: center; gap: 6px; color: var(--ap-muted) !important; }

@media (max-width: 991.98px) {
    .ap-directory-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ap-directory-keyword, .ap-directory-actions { grid-column: 1 / -1; }
}

/* ---------- Carte des régions ---------- */
.ap-map-card { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; padding: 28px; }

.ap-map-box {
    min-height: 360px;
    border: 1.5px dashed #9fb3d3;
    border-radius: var(--ap-radius);
    background: #eef2f8;
    color: var(--ap-navy);
}

.ap-map-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.ap-map {
    position: relative;
    z-index: 0;
    isolation: isolate;
    flex: 1;
    min-height: 420px;
    border-radius: var(--ap-radius);
    overflow: hidden;
    background: #eef2f8;
}

.ap-map.is-ready { border: 1px solid var(--ap-line); }
.ap-map-fallback { position: absolute; inset: 0; min-height: 0; }
.ap-map .leaflet-container, .ap-map.leaflet-container { font-family: var(--ap-font); background: #f7f9fc; }
.ap-map path.leaflet-interactive { cursor: pointer; }

.leaflet-tooltip.ap-map-tooltip {
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: var(--ap-navy);
    color: #fff;
    font-family: var(--ap-font);
    font-size: 13px;
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(20, 44, 84, .25);
}

.leaflet-tooltip.ap-map-tooltip::before { border-top-color: var(--ap-navy); }

.ap-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-map-legend span { margin-right: 4px; font-weight: 600; color: var(--ap-text); }
.ap-map-legend i { display: inline-block; width: 14px; height: 14px; margin-left: 6px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .06); }

.leaflet-tooltip.ap-map-label {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ap-navy);
    font-family: var(--ap-font);
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
    pointer-events: none;
}

.leaflet-tooltip.ap-map-label::before { display: none; }
.ap-map.is-compact .leaflet-tooltip.ap-map-label.is-small { display: none; }

.ap-region.is-highlighted { border-color: var(--ap-green); background: var(--ap-green-soft); }

.ap-map-box strong { font-size: 15px; }
.ap-map-box span { font-size: 13px; color: var(--ap-muted); }
.ap-map-card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
.ap-map-card > div > p { margin: 0 0 20px; color: var(--ap-muted); font-size: 14.5px; }
.ap-regions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; }

.ap-region {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-text) !important;
    font-weight: 600;
    font-size: 14px;
    transition: border-color .15s, background-color .15s;
}

.ap-region:hover { border-color: var(--ap-navy); background: #f7f9fc; }
.ap-region span { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ap-muted); }

/* ---------- Comment ça marche ---------- */
.ap-center-title { text-align: center; margin-bottom: 22px; }
.ap-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ap-how-card { padding: 24px 26px; }

.ap-how-label {
    margin: 0 0 18px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--ap-navy);
}

.ap-how-card.is-green .ap-how-label { color: var(--ap-green); }
.ap-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.ap-step { display: flex; gap: 14px; }

.ap-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: var(--ap-navy);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.ap-how-card.is-green .ap-step-num { background: var(--ap-green); }
.ap-step strong { display: block; font-size: 15.5px; }
.ap-step p { margin: 2px 0 0; font-size: 14px; color: var(--ap-muted); }
.ap-how-card .ap-btn { margin-top: 20px; }

/* ---------- Bandeau de confiance ---------- */
.ap-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 20px 24px;
    border-radius: var(--ap-radius);
    background: #e6ebf3;
}

.ap-trust-item { display: flex; align-items: center; gap: 12px; }

.ap-trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    background: #fff;
    color: var(--ap-navy);
}

.ap-trust-item strong { display: block; font-size: 14.5px; }
.ap-trust-item span { font-size: 13px; color: var(--ap-muted); }

/* ---------- Chiffres clés ---------- */
.ap-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ap-stat { padding-top: 14px; border-top: 3px solid var(--ap-navy); }
.ap-stat strong { display: block; font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--ap-navy); }
.ap-stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--ap-muted); }

/* ---------- Services APME ---------- */
.ap-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.ap-service {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: var(--ap-radius);
    background: var(--ap-navy);
    color: #fff !important;
    min-height: 220px;
    transition: background-color .15s;
}

.ap-service:hover { background: var(--ap-navy-dark); }

.ap-service-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
    border-radius: 8px;
    background: var(--ap-green);
    font-weight: 800;
    font-size: 14px;
}

.ap-service h3 { margin: 18px 0 8px; font-size: 19px; font-weight: 800; line-height: 1.2; color: #fff; }
.ap-service p { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.ap-service .ap-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }

/* ---------- Actualités ---------- */
.ap-news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ap-news-item { overflow: hidden; color: var(--ap-text) !important; transition: border-color .15s; }
.ap-news-item:hover { border-color: var(--ap-navy); }
.ap-news-media { aspect-ratio: 16 / 9; }
.ap-news-body { padding: 16px 18px 20px; }
.ap-news-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ap-muted); }
.ap-news-item h3 { margin: 10px 0 0; font-size: 17px; font-weight: 700; line-height: 1.35; }

/* ---------- Partenaires ---------- */
.ap-partners-title { margin: 0 0 16px; text-align: center; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; color: var(--ap-muted); }
.ap-partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.ap-partner {
    flex: 0 0 calc((100% - 4 * 14px) / 5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 136px;
    margin: 0;
    padding: 16px 12px 12px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    font-size: 13px;
    color: #8a8577;
    transition: border-color .15s, box-shadow .15s;
}

.ap-partner:hover { border-color: var(--ap-navy); box-shadow: 0 4px 14px rgba(20, 44, 84, .08); }
.ap-partner:focus-visible { outline: 3px solid var(--ap-navy); outline-offset: 3px; }
.ap-partner img { display: block; width: auto; height: 76px; max-width: 100%; object-fit: contain; }
.ap-partner-name { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--ap-navy); }

/* ---------- Newsletter ---------- */
.ap-newsletter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    padding: 36px 40px;
    border-radius: 20px;
    background: var(--ap-green);
    color: #fff;
}

.ap-newsletter h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; color: #fff; }
.ap-newsletter p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 15px; }
.ap-newsletter form { display: flex; gap: 10px; }

.ap-newsletter input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--ap-radius-sm);
    font-size: 15px;
    color: var(--ap-text);
    outline: 0;
}

.ap-newsletter .ap-btn { min-height: 48px; }
.ap-newsletter small { display: block; margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .8); }

/* =========================================================
   Pied de page
   ========================================================= */
.ap-footer { margin-top: 48px; background: var(--ap-navy-dark); color: rgba(255, 255, 255, .78); font-family: var(--ap-font); font-size: 14px; }
.ap-footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 48px 0 36px; }
.ap-footer .ap-brand { color: #fff !important; }
.ap-footer .ap-brand-tagline { color: rgba(255, 255, 255, .65); }
.ap-footer-logo { display: inline-flex; padding: 10px 14px; border-radius: 12px; background: #fff; }
.ap-footer-logo img { display: block; width: auto; height: 96px; }
.ap-footer-about p { margin: 16px 0 12px; line-height: 1.6; max-width: 380px; }
.ap-footer-about address { font-style: normal; line-height: 1.7; }
.ap-footer h4 { margin: 0 0 14px; color: #fff; font-size: 15px; font-weight: 700; }
.ap-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ap-footer ul a, .ap-footer-bottom a { color: rgba(255, 255, 255, .78) !important; }
.ap-footer ul a:hover, .ap-footer-bottom a:hover { color: #fff !important; text-decoration: underline !important; }
.ap-socials { display: flex; gap: 8px; margin-top: 16px; }

.ap-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
}

.ap-socials a:hover { background: rgba(255, 255, 255, .2); }

.ap-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }

.ap-footer-bottom .ap-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    min-height: 60px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 13px;
}

.ap-footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.ap-footer-pay { display: flex; align-items: center; gap: 8px; }

/* ---------- Logo TresorPay ---------- */
.ap-tresorpay { display: block; width: auto; height: 100%; max-width: 100%; object-fit: contain; }
.ap-tresorpay-chip picture,
.ap-trust-logo picture { display: block; height: 100%; }

.ap-tresorpay-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #fff;
}

.ap-footer-pay .ap-tresorpay-chip { height: 32px; }
.ap-hero-tile-pay .ap-tresorpay-chip { align-self: flex-start; height: 56px; margin-bottom: auto; padding: 6px 12px; }
.ap-tresorpay-step { height: 28px; margin-top: 8px; }
.ap-trust-logo { width: 64px; border-radius: 10px; padding: 4px 6px; }

/* Barre de navigation mobile */
.ap-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ap-line);
    background: #fff;
    font-family: var(--ap-font);
}

.ap-bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    color: var(--ap-muted) !important;
    font-size: 11.5px;
    font-weight: 600;
}

.ap-bottom-nav a.is-active { color: var(--ap-navy) !important; font-weight: 800; }
.ap-bottom-nav svg { width: 24px; height: 24px; }
.ap-bottom-nav .ap-badge { top: -4px; left: calc(50% + 4px); }

/* Bouton WhatsApp flottant */
.ap-whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1036;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ap-font);
    text-decoration: none !important;
}

.ap-whatsapp-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 211, 102, .4);
    transition: transform .15s, box-shadow .15s;
}

.ap-whatsapp-float-label {
    padding: 8px 14px;
    border-radius: 10px;
    background: #fff;
    color: var(--ap-text);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(20, 44, 84, .15);
    white-space: nowrap;
}

.ap-whatsapp-float:hover .ap-whatsapp-float-icon { transform: scale(1.06); box-shadow: 0 8px 22px rgba(37, 211, 102, .5); }
.ap-whatsapp-float:focus-visible { outline: none; }
.ap-whatsapp-float:focus-visible .ap-whatsapp-float-icon { outline: 3px solid var(--ap-navy); outline-offset: 3px; }

/* Bouton « retour en haut » (au-dessus du widget WhatsApp) */
.ap-back-to-top {
    position: fixed;
    right: 30px;
    bottom: 98px;
    z-index: 1036;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ap-navy);
    color: #fff;
    box-shadow: 0 6px 18px rgba(20, 44, 84, .3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s, visibility .2s, transform .2s, background-color .15s;
}

.ap-back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.ap-back-to-top:hover { background: var(--ap-navy-dark); }
.ap-back-to-top:focus-visible { outline: 3px solid var(--ap-green); outline-offset: 3px; }
.ap-back-to-top svg { width: 22px; height: 22px; }

/* =========================================================
   Pages de connexion / inscription
   ========================================================= */
.ap-flip { transform: rotate(180deg); }

.ap-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ap-bg);
    color: var(--ap-text);
    font-family: var(--ap-font);
}

.ap-auth a { text-decoration: none; }
.ap-auth-header { background: #fff; border-bottom: 1px solid var(--ap-line); }
.ap-auth-header .ap-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.ap-auth-header .ap-brand-img { height: 54px; }
.ap-auth-main { flex: 1; display: flex; align-items: center; padding: 36px 0 48px; }

.ap-auth-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--ap-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(20, 44, 84, .06);
}

.ap-auth-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    background: #f7f8fa;
    border-right: 1px solid var(--ap-line);
}

/* L'image est affichée en entier, sans rognage */
.ap-auth-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    max-height: none;
    flex: none;
    border-radius: var(--ap-radius);
    background: #fff;
}

.ap-auth-perks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ap-auth-perks li { display: flex; align-items: center; gap: 12px; }
.ap-auth-perks strong { display: block; font-size: 14px; }
.ap-auth-perks span:not(.ap-trust-icon) { font-size: 13px; color: var(--ap-muted); }
.ap-auth-perks .ap-trust-icon { border: 1px solid var(--ap-line); }

.ap-auth-form { display: flex; flex-direction: column; justify-content: center; padding: 44px 48px; }
.ap-auth-titles h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ap-navy); }
.ap-auth-titles p { margin: 0 0 8px; font-size: 15px; color: var(--ap-muted); }

/* Formulaires (surcharge du thème, limitée à ces pages) */
.ap-auth label.fs-12 { font-size: 13.5px !important; font-weight: 700; color: var(--ap-text) !important; }
.ap-auth .form-group { margin-bottom: 18px; }

.ap-auth .form-control {
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-sm) !important;
    background: #fff;
    font-family: var(--ap-font);
    font-size: 15px;
    color: var(--ap-text);
}

.ap-auth .form-control:focus { border: 2px solid var(--ap-navy) !important; box-shadow: none; }
.ap-auth .form-control::placeholder { color: #8a92a1; }
.ap-auth .password-toggle { color: var(--ap-muted); }

.ap-auth .btn-primary {
    min-height: 48px;
    border: 0;
    border-radius: var(--ap-radius-sm) !important;
    background: var(--ap-navy);
    font-family: var(--ap-font);
    font-size: 15px;
    font-weight: 700;
}

.ap-auth .btn-primary:hover,
.ap-auth .btn-primary:focus,
.ap-auth .btn-primary:active { background: var(--ap-navy-dark) !important; }
.ap-auth .btn-primary:disabled { background: #8d9ab0; opacity: 1; cursor: not-allowed; }
.ap-auth .text-primary,
.ap-auth a.animate-underline-primary,
.ap-auth .aiz-checkbox a { color: var(--ap-navy) !important; }
.ap-auth .hov-text-primary:hover { color: var(--ap-navy) !important; }
.ap-auth .aiz-checkbox input:checked ~ .aiz-square-check { background: var(--ap-navy); border-color: var(--ap-navy); }
.ap-auth .aiz-checkbox { font-size: 13.5px; color: var(--ap-muted); }
.ap-auth p.fs-12 { font-size: 14px !important; color: var(--ap-muted) !important; }

@media (max-width: 991.98px) {
    .ap-auth-card { grid-template-columns: 1fr; }
    .ap-auth-visual { border-right: 0; border-bottom: 1px solid var(--ap-line); padding: 16px; }
    .ap-auth-perks { display: none; }
    .ap-auth-form { padding: 28px 20px 32px; }
    .ap-auth-titles h1 { font-size: 26px; }
    .ap-auth-main { align-items: flex-start; padding: 16px 0 32px; }
    .ap-auth-header .ap-brand-img { height: 44px; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1199.98px) {
    .ap-header-main .ap-container { gap: 18px; }
    .ap-brand-tagline { display: none; }
    .ap-search .ap-search-region { display: none; }
    .ap-nav-links { gap: 18px; }
    .ap-nav-links a { font-size: 13.5px; }
    .ap-sectors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ap-hero h1, .ap-hero-title { font-size: 40px; }
}

@media (max-width: 991.98px) {
    .ap-container { padding: 0 16px; }
    .ap-topbar, .ap-header-main, .ap-nav { display: none; }

    .ap-mobile-header { display: block; border-bottom: 1px solid var(--ap-line); background: #fff; }
    .ap-mobile-header-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; min-height: 60px; }
    .ap-mobile-header .ap-brand { justify-self: center; }
    .ap-mobile-header .ap-brand-name { font-size: 20px; }
    .ap-mobile-header .ap-brand-logo { width: 36px; height: 36px; }
    .ap-mobile-header .ap-brand-img, .ap-drawer .ap-brand-img { height: 42px; }
    .ap-mobile-header-actions { display: flex; gap: 2px; }
    .ap-mobile-header .ap-search { margin-bottom: 12px; height: 46px; }

    .ap-page { padding-bottom: 72px; }
    .ap-bottom-nav { display: grid; }
    .ap-back-to-top { right: 21px; bottom: 156px; width: 44px; height: 44px; }
    .ap-whatsapp-float { right: 16px; bottom: 84px; }
    .ap-whatsapp-float-label { display: none; }
    .ap-footer { padding-bottom: 72px; }

    .ap-section { padding: 20px 0; }
    .ap-section-title { font-size: 22px; }

    .ap-hero { padding-top: 16px; }
    .ap-hero-card { grid-template-columns: 1fr; padding: 24px 20px 20px; border-radius: 18px; }
    .ap-hero-media { display: none; }
    .ap-hero h1, .ap-hero-title { font-size: 32px; margin: 14px 0 20px; }
    .ap-hero p { display: none; }
    .ap-hero-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
    .ap-hero-actions .ap-btn { min-height: 46px; padding: 0 10px; }
    .ap-hero-actions .ap-label-full { display: none; }
    .ap-hero-actions .ap-label-short { display: inline; }
    .ap-hero-slider.is-multi .ap-hero-card { padding-bottom: 48px; }
    .ap-hero-nav { left: 14px; bottom: 6px; }

    .ap-sectors {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .ap-sectors::-webkit-scrollbar { display: none; }
    .ap-sector { flex: 0 0 76px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 12.5px; }
    .ap-sector:hover { transform: none; }
    .ap-sector-mark { width: 60px; height: 60px; font-size: 18px; }
    .ap-sector-more { display: none; }

    .ap-head-tools .ap-tabs { display: none; }
    .ap-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ap-product-body { padding: 12px; }
    .ap-product-cat { display: none; }
    .ap-product-name { font-size: 14.5px; margin-top: 0; }
    .ap-product-price { font-size: 16px; margin: 6px 0 10px; }
    .ap-product-actions .ap-btn { min-height: 36px; font-size: 13px; padding: 0 8px; }
    .ap-product-actions .ap-label-long { display: none; }
    .ap-product-actions .ap-label-short { display: inline; }

    .ap-shops, .ap-news { grid-template-columns: 1fr; }
    .ap-map-card { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .ap-map-box { min-height: 200px; }
    .ap-map { min-height: 320px; }
    .ap-how { grid-template-columns: 1fr; }
    .ap-trust, .ap-stats, .ap-services { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ap-stat strong { font-size: 34px; }
    .ap-partner { flex-basis: calc((100% - 2 * 14px) / 3); }
    .ap-newsletter { grid-template-columns: 1fr; padding: 26px 20px; }
    .ap-footer-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
    .ap-footer-about { grid-column: 1 / -1; }
}

@media (max-width: 575.98px) {
    .ap-section-head { align-items: center; }
    .ap-section-sub { display: none; }
    .ap-regions { grid-template-columns: 1fr; }
    .ap-trust { grid-template-columns: 1fr; }
    .ap-services { grid-template-columns: 1fr; }
    .ap-service { min-height: 0; }
    .ap-newsletter form { flex-direction: column; }
    .ap-footer-main { grid-template-columns: 1fr; }
    .ap-partner { flex-basis: calc((100% - 14px) / 2); min-height: 120px; }
    .ap-partner img { height: 60px; }
}

/* Masque l'ancienne barre de navigation mobile du thème */
.aiz-mobile-bottom-nav { display: none !important; }

.ap-footer address a { color: #fff !important; }

/* =========================================================
   Pages éditoriales : Services APME, À propos
   ========================================================= */
.ap-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 13.5px; color: var(--ap-muted); }
.ap-breadcrumb a { color: var(--ap-navy) !important; font-weight: 600; }
.ap-breadcrumb a:hover { text-decoration: underline !important; }

.ap-page-hero {
    padding: 44px 40px;
    border-radius: 20px;
    background: var(--ap-navy);
    color: #fff;
}
.ap-page-hero h1 { max-width: 760px; margin: 16px 0 14px; font-size: 42px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.ap-page-hero p { display: block; max-width: 680px; margin: 0 0 26px; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .85); }

.ap-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--ap-green-soft);
    color: var(--ap-green);
}

.ap-service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ap-service-detail { display: flex; flex-direction: column; padding: 24px; scroll-margin-top: 140px; }
.ap-service-detail-head { display: flex; align-items: center; justify-content: space-between; }
.ap-service-detail .ap-service-num { color: #fff; }
.ap-service-detail h3 { margin: 18px 0 6px; font-size: 19px; font-weight: 800; line-height: 1.25; color: var(--ap-text); }
.ap-service-detail > p { margin: 0 0 14px; font-size: 14.5px; color: var(--ap-muted); }

.ap-checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ap-checklist li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.45; }
.ap-checklist .ap-icon-sm { flex: 0 0 auto; margin-top: 2px; color: var(--ap-green); }

.ap-about-intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ap-about-intro p { margin: 14px 0 0; font-size: 15.5px; line-height: 1.65; color: var(--ap-text); }
.ap-about-facts { padding: 24px 26px; }

.ap-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ap-value { padding: 24px; }
.ap-value h3 { margin: 16px 0 6px; font-size: 18px; font-weight: 800; }
.ap-value p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ap-muted); }

.ap-about-apme { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 30px; }
.ap-about-apme p:not(.ap-how-label) { max-width: 780px; margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--ap-muted); }
.ap-about-apme .ap-btn { flex: 0 0 auto; }

.ap-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 36px 40px;
    border-radius: 20px;
    background: var(--ap-green);
    color: #fff;
}
.ap-cta h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; }
.ap-cta p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 15px; }
.ap-cta .ap-btn-white { color: var(--ap-green) !important; }
.ap-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex: 0 0 auto; }

@media (max-width: 991.98px) {
    .ap-page-hero { padding: 28px 22px; border-radius: 18px; }
    .ap-page-hero h1 { font-size: 30px; }
    .ap-page-hero p { font-size: 15px; }
    .ap-service-list, .ap-values { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ap-about-intro { grid-template-columns: 1fr; }
    .ap-about-apme, .ap-cta { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
}

@media (max-width: 575.98px) {
    .ap-page-hero h1 { font-size: 26px; }
    .ap-service-list, .ap-values { grid-template-columns: 1fr; }
    .ap-cta-actions { width: 100%; }
    .ap-cta-actions .ap-btn { flex: 1 1 auto; }
}

/* ---------- Page Contact ---------- */
.ap-channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ap-channel { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; color: var(--ap-text) !important; transition: border-color .15s; }
.ap-channel:hover { border-color: var(--ap-navy); }
.ap-channel .ap-service-icon { margin-bottom: 10px; }
.ap-channel strong { font-size: 15.5px; }
.ap-channel span:last-child { font-size: 14px; color: var(--ap-muted); overflow-wrap: anywhere; }

.ap-contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ap-contact-form { padding: 28px 30px; scroll-margin-top: 140px; }
.ap-contact-form form { margin-top: 20px; }
.ap-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ap-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ap-field label { margin: 0; font-size: 14px; font-weight: 700; color: var(--ap-text); }
.ap-field label span { color: var(--ap-green); }
.ap-field input,
.ap-field select,
.ap-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--ap-text);
    transition: border-color .15s, box-shadow .15s;
}
.ap-field input, .ap-field select { height: 48px; }
.ap-field textarea { resize: vertical; min-height: 140px; }
.ap-field input:focus,
.ap-field select:focus,
.ap-field textarea:focus { outline: 0; border-color: var(--ap-navy); box-shadow: 0 0 0 3px rgba(28, 58, 107, .12); }
.ap-form-error { margin-bottom: 16px; padding: 10px 14px; border-radius: var(--ap-radius-sm); background: #fdecea; color: #b42318; font-size: 14px; }
.ap-form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.ap-form-foot .ap-btn { min-height: 48px; padding: 0 28px; }
.ap-form-foot small { font-size: 13px; color: var(--ap-muted); }

.ap-offices { display: grid; gap: 18px; }
.ap-office { padding: 22px 24px; transition: border-color .15s; }
.ap-office.is-active { border-color: var(--ap-navy); box-shadow: 0 4px 14px rgba(20, 44, 84, .08); }
.ap-office .ap-how-label { margin-bottom: 4px; }
.ap-office h3 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.ap-office-lines { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 9px; }
.ap-office-lines li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ap-text); }
.ap-office-lines .ap-icon-sm { flex: 0 0 auto; margin-top: 2px; color: var(--ap-green); }
.ap-office-lines a { color: var(--ap-navy) !important; font-weight: 600; }
.ap-office-lines a:hover { text-decoration: underline !important; }
.ap-office-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-office-social { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 700; font-size: 14px; color: var(--ap-navy) !important; }
.ap-office-social:hover { border-color: var(--ap-navy); }

.ap-contact-map { overflow: hidden; }
.ap-contact-map iframe { display: block; width: 100%; height: 420px; border: 0; }

.ap-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ap-faq-item { padding: 0 22px; }
.ap-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; font-size: 15.5px; font-weight: 700; cursor: pointer; list-style: none; }
.ap-faq-item summary::-webkit-details-marker { display: none; }
.ap-faq-item summary .ap-icon-sm { flex: 0 0 auto; color: var(--ap-navy); transition: transform .15s; }
.ap-faq-item[open] summary .ap-icon-sm { transform: rotate(45deg); }
.ap-faq-item p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; color: var(--ap-muted); }
.ap-faq-item .ap-link { display: inline-flex; margin-bottom: 18px; white-space: normal; }

@media (max-width: 991.98px) {
    .ap-channels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ap-contact-grid, .ap-faq { grid-template-columns: 1fr; }
    .ap-contact-form { padding: 22px 20px; }
    .ap-contact-map iframe { height: 320px; }
}

@media (max-width: 575.98px) {
    .ap-form-row { grid-template-columns: 1fr; gap: 0; }
    .ap-form-foot .ap-btn { width: 100%; }
}

/* ---------- Contacter le vendeur sur WhatsApp (cartes produit de l'ancien thème) ---------- */
/* La plateforme ne prend plus de commande : c'est l'unique action de la carte.
   La carte sert de conteneur : le libellé se raccourcit quand elle est étroite (grilles 5-6 colonnes) */
.ap-card-actions { container-type: inline-size; margin-top: 10px; }
.ap-card-actions-inner { display: flex; gap: 6px; }

.ap-wa-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 36px;
    padding: 0 8px;
    border: 1.5px solid #25d366;
    border-radius: 8px;
    background: #25d366;
    color: #fff !important;
    font-family: var(--ap-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.ap-wa-order:hover { border-color: #128c4b; background: #128c4b; }
.ap-wa-order:focus-visible { outline: 3px solid rgba(18, 140, 75, .35); outline-offset: 2px; }

.ap-card-actions .ap-label-short { display: none; }

@container (max-width: 185px) {
    .ap-card-actions .ap-label-long { display: none; }
    .ap-card-actions .ap-label-short { display: inline; }
}

/* Très étroit (6 colonnes) : bouton-icône, le libellé reste dans l'infobulle */
@container (max-width: 135px) {
    .ap-card-actions .ap-label-short { display: none; }
    .ap-wa-order { padding: 0; }
    .ap-wa-order .ap-icon-sm { width: 18px; height: 18px; }
}

/* ---------- Showroom : filtre des catégories ---------- */
.ap-cat-filter {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #d6e0ef;
    border-radius: var(--ap-radius-sm);
    background: #eef3fa;
}
.ap-cat-filter > .fs-16 { background: var(--ap-navy); }
.ap-cat-filter > .fs-16 .filter-section,
.ap-cat-filter > .fs-16 .filter-section::after { color: #fff !important; border-color: #fff !important; }
.ap-cat-filter #general_cagegories_box,
.ap-cat-filter #preorder_cagegories_box { padding-top: 12px; }

/* Le script de l'arbre pose un fond blanc en ligne sur chaque libellé */
.ap-cat-filter .hummingbird-treeview label { background: transparent !important; width: auto !important; max-width: 100%; min-width: 0; }
.ap-cat-filter .hummingbird-treeview label .hover-effect-list-item { flex: 1 1 auto; min-width: 0; white-space: normal !important; }

/* La flèche d'ouverture est en position absolue : on lui réserve de la place pour ne plus chevaucher le libellé */
.ap-cat-filter .hummingbird-treeview li { position: relative; padding-right: 26px; }
.ap-cat-filter .hummingbird-treeview li > i.las {
    top: 1px !important;
    right: 0 !important;
    width: 24px;
    height: 24px;
    padding: 0 !important;
    border-radius: 6px;
    line-height: 24px;
    text-align: center;
    color: var(--ap-navy);
    cursor: pointer;
}
.ap-cat-filter .hummingbird-treeview li > i.las:hover { background: #fff; }
.ap-cat-filter .hummingbird-treeview label .hover-effect-list-item { line-height: 1.35; overflow-wrap: anywhere; }
.ap-cat-filter .hummingbird-treeview label:hover .hover-effect-list-item { color: var(--ap-navy) !important; }
.ap-cat-filter .aiz-square-check { background: #fff; }

/* Liste défilante : barre visible, pour montrer qu'il y a d'autres catégories */
.ap-cat-scroll { scrollbar-width: thin; scrollbar-color: #9fb3d3 transparent; }
.ap-cat-scroll::-webkit-scrollbar { width: 6px; }
.ap-cat-scroll::-webkit-scrollbar-thumb { border-radius: 3px; background: #9fb3d3; }

/* ---------- Bannière cookies ---------- */
.ap-cookie-alert { overflow: hidden; border: 1px solid var(--ap-line); border-radius: var(--ap-radius); box-shadow: 0 10px 30px rgba(20, 30, 50, .14); font-family: var(--ap-font); }
.ap-cookie-alert > div { border-radius: 0 !important; font-size: 14px; line-height: 1.5; }
.ap-cookie-alert a { color: var(--ap-navy); font-weight: 700; text-decoration: underline; }
.ap-cookie-alert .btn { border: 0; border-radius: var(--ap-radius-sm); background: var(--ap-navy) !important; font-weight: 700; }
.ap-cookie-alert .btn:hover { background: var(--ap-navy-dark) !important; }

/* ---------- Bouton « ? » du guide d'utilisation (en-tête) ---------- */
.ap-guide-btn { align-self: center; }
.ap-guide-btn-sm { width: 34px; height: 34px; font-size: 16px; }

/* ---------- Inscription d'une PME (gabarit ap-auth) ---------- */
/* Image du bloc gauche : entière, centrée horizontalement et verticalement, jamais rognée */
.ap-auth-visual { align-items: center; }
.ap-auth-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 600px;
    aspect-ratio: auto;
    margin: 0 auto;
    object-position: center;
    background: transparent;
    box-shadow: 0 10px 30px rgba(20, 44, 84, .10);
}
.ap-auth-perks { width: 100%; max-width: 420px; margin: 0 auto; }
/* Place réservée à l'icône « afficher le mot de passe » */
.ap-auth .position-relative > .form-control { padding-right: 46px; }

.ap-auth-titles .ap-pill { margin-bottom: 12px; }
.ap-auth-section { min-width: 0; margin: 0 0 6px; padding: 0; border: 0; }
.ap-auth-section legend {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--ap-line);
    font-size: 15px;
    font-weight: 800;
    color: var(--ap-text);
}
.ap-auth-section legend span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ap-navy);
    color: #fff;
    font-size: 13px;
}
.ap-auth-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.ap-auth-hint { margin: -8px 0 18px; font-size: 13px; color: var(--ap-muted); }
.ap-auth .ap-required { color: var(--ap-green); }
.ap-auth .form-control[readonly] { background: #f4f6f9; }

@media (max-width: 575.98px) {
    .ap-auth-row { grid-template-columns: 1fr; }
}

/* =========================================================
   Grands écrans : le contenu s'élargit avec la fenêtre
   (plafonné pour garder des lignes de texte lisibles)
   ========================================================= */
/* Cartes supplémentaires chargées pour les grands écrans, masquées en dessous */
/* (.ap-one-row : blocs de l'accueil limités à une ligne ; l'annuaire des PME, lui, affiche tout) */
.ap-products.ap-one-row > .ap-product:nth-child(n+5),
.ap-shops.ap-one-row > .ap-shop:nth-child(n+4) { display: none; }

@media (min-width: 1400px) {
    .ap-container,
    .container,
    .container-xxl { max-width: min(92vw, 1760px); }
}

@media (min-width: 1600px) {
    .ap-hero-card { padding: 48px; gap: 40px; }
    .ap-hero h1, .ap-hero-title { font-size: 58px; }
    .ap-hero-nav { left: 48px; bottom: 14px; }
    .ap-hero p { max-width: 560px; font-size: 18px; }
    .ap-page-hero h1 { max-width: 900px; font-size: 48px; }
    .ap-page-hero p { max-width: 800px; font-size: 17px; }
    .ap-products { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .ap-products.ap-one-row > .ap-product:nth-child(5) { display: flex; }
    .ap-shops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ap-shops.ap-one-row > .ap-shop:nth-child(4) { display: flex; }
}

@media (min-width: 1900px) {
    .ap-products { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .ap-products.ap-one-row > .ap-product:nth-child(6) { display: flex; }
}
