/* ==========================================================
   SNF Marques - Page publique "Nos marques"
   ========================================================== */

:root {
    --snf-brand-blue: #20aeea;
    --snf-brand-blue-dark: #067fbd;
    --snf-brand-ink: #17223b;
    --snf-brand-muted: #697386;
    --snf-brand-line: #dcebf5;
    --snf-brand-soft: #eef9ff;
    --snf-brand-pink: #ff68b4;
    --snf-brand-orange: #ff8b3d;
    --snf-brand-violet: #6c6ff6;
    --snf-card-shadow: 0 8px 22px rgba(26, 52, 82, .08);
}

.snf-marques-section {
    background: #fff;
    color: var(--snf-brand-ink);
    padding-bottom: 56px;
}

.snf-marques-hero {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    padding: 42px 20px 34px;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(237, 249, 255, .95), rgba(255, 255, 255, .92)),
        #edf9ff;
    border-top: 1px solid #d9f1fc;
    border-bottom: 1px solid #d9f1fc;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.snf-marques-hero::before,
.snf-marques-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: .7;
}

.snf-marques-hero::before {
    left: 5%;
    top: 58px;
    width: 86px;
    height: 130px;
    border: 20px solid rgba(255, 255, 255, .82);
    border-radius: 48px;
    transform: rotate(-14deg);
}

.snf-marques-hero::after {
    right: 9%;
    top: 34px;
    width: 96px;
    height: 96px;
    border: 14px solid rgba(255, 181, 214, .65);
    border-radius: 50%;
    box-shadow: inset 0 0 0 12px rgba(255, 255, 255, .72);
}

.snf-marques-hero.snf-revealed {
    opacity: 1;
    transform: translateY(0);
}

.snf-marques-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
}

.snf-marques-hero__visual {
    position: absolute;
    z-index: 1;
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 14px 20px rgba(63, 130, 170, .18));
}

.snf-marques-hero__visual--left {
    left: 38px;
    bottom: 18px;
    transform: rotate(-9deg);
}

.snf-marques-hero__visual--right {
    right: 44px;
    bottom: 16px;
    transform: rotate(8deg);
}

.snf-marques-hero__title {
    margin: 0 0 10px;
    color: var(--snf-brand-ink);
    font-size: 2.55rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0;
}

.snf-marques-hero__text {
    max-width: 560px;
    margin: 0 auto 22px;
    color: var(--snf-brand-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Search : cadre unique, icône intégrée, reset styles thème --- */
.snf-marques-search {
    display: flex;
    align-items: center;
    width: min(100%, 470px);
    height: 50px;
    margin: 0 auto 24px;
    padding: 0 20px;
    border: 1.5px solid #cfe6f3;
    border-radius: 999px;
    background: #fff;
    cursor: text;
    transition: border-color .2s;
}

.snf-marques-search:focus-within {
    border-color: var(--snf-brand-blue);
}

/* Icône loupe construite en CSS pur dans le préfixe */
.snf-marques-search__icon {
    flex: 0 0 auto;
    position: relative;
    width: 16px;
    height: 16px;
    margin-right: 11px;
    color: #97a5b5;
}

.snf-marques-search__icon::before {
    content: "";
    position: absolute;
    inset: 0 4px 4px 0;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.snf-marques-search__icon::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 2px;
    height: 7px;
    background: currentColor;
    border-radius: 1px;
    transform: rotate(45deg);
    transform-origin: top center;
}

/* Reset complet des styles thème sur l'input */
.snf-marques-search input[type="search"],
.snf-marques-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    color: var(--snf-brand-ink);
    font-size: .95rem;
    outline: 0;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.snf-marques-search input[type="search"]::-webkit-search-decoration,
.snf-marques-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

/* --- Stats : flat, intégrées au fond hero, pas de shadow --- */
.snf-marques-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 680px;
    margin: 0 auto;
}

.snf-marques-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid rgba(32, 174, 234, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    color: var(--snf-brand-muted);
    backdrop-filter: blur(4px);
}

.snf-marques-stat__icon {
    width: 22px;
    height: 22px;
    border: 2px solid var(--snf-brand-blue);
    border-radius: 6px;
    transform: rotate(-10deg);
    opacity: .75;
    flex: 0 0 auto;
}

.snf-marques-stat strong {
    display: block;
    color: var(--snf-brand-blue-dark);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.snf-marques-stat span:last-child {
    display: block;
    color: var(--snf-brand-muted);
    font-size: .78rem;
    line-height: 1.2;
}

.snf-marques-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 0;
}

.snf-marques-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 22px;
}

.snf-marques-filter {
    min-width: 104px;
    min-height: 34px;
    padding: 8px 18px;
    border: 1px solid #dbe6ee;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(28, 55, 82, .04);
}

.snf-marques-filter.is-active {
    border-color: var(--snf-brand-blue);
    background: var(--snf-brand-blue);
    color: #fff;
}

.snf-marques-grid {
    display: grid;
    grid-template-columns: repeat(var(--snf-columns, 4), minmax(0, 1fr));
    gap: 18px 26px;
}

.snf-marque-card {
    min-height: 172px;
    border: 1px solid #e7edf2;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--snf-card-shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 260ms ease, transform 260ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.snf-marque-card[hidden] {
    display: none;
}

.snf-marque-card.snf-card-visible {
    opacity: 1;
    transform: translateY(0);
}

.snf-marque-card:hover {
    border-color: #c9e6f7;
    box-shadow: 0 12px 30px rgba(26, 52, 82, .12);
    transform: translateY(-2px);
}

.snf-marque-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 18px 14px;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.snf-marque-card__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    margin-bottom: 12px;
}

.snf-marque-card__logo {
    max-width: 126px;
    max-height: 62px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.snf-marque-card__logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--snf-brand-soft);
    border: 1px solid #ccebf9;
    color: var(--snf-brand-blue-dark);
    font-size: 1.15rem;
    font-weight: 800;
}

.snf-marque-card__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.snf-marque-card__name {
    max-width: 100%;
    color: var(--snf-brand-ink);
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.snf-marque-card__count,
.snf-marque-card__desc {
    color: var(--snf-brand-muted);
    font-size: .82rem;
    line-height: 1.25;
}

.snf-marque-card__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 22px;
}

.snf-marque-card__tags span {
    padding: 3px 9px;
    border-radius: 999px;
    background: #e7f5ff;
    color: var(--snf-brand-blue-dark);
    font-size: .72rem;
    font-weight: 700;
}

.snf-marque-card__tags span:nth-child(2n) {
    background: #fff0f8;
    color: #c53d87;
}

.snf-marque-card__cta {
    margin-top: 3px;
    color: var(--snf-brand-blue-dark);
    font-size: .78rem;
    font-weight: 800;
}

.snf-marque-card__cta::after {
    content: ">";
    margin-left: 6px;
}

.snf-marques-empty,
.snf-marques-no-result {
    text-align: center;
    color: var(--snf-brand-muted);
    padding: 34px 0;
    font-size: .95rem;
}

.snf-marques-empty a {
    color: var(--snf-brand-blue-dark);
    font-weight: 700;
}

.snf-marques-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 740px;
    margin: 28px auto 0;
    padding: 16px 22px;
    border: 1px solid #cfe8fb;
    border-radius: 8px;
    background: #f2f9ff;
    color: var(--snf-brand-ink);
}

.snf-marques-contact strong,
.snf-marques-contact span {
    display: block;
    line-height: 1.35;
}

.snf-marques-contact span {
    color: var(--snf-brand-blue-dark);
    font-size: .9rem;
}

.snf-marques-contact a {
    flex: 0 0 auto;
    min-width: 150px;
    padding: 9px 18px;
    border: 1px solid var(--snf-brand-blue);
    border-radius: 999px;
    color: var(--snf-brand-blue-dark);
    background: #fff;
    text-align: center;
    text-decoration: none;
    font-size: .86rem;
    font-weight: 800;
}

.snf-marque-card__link:focus-visible,
.snf-marques-filter:focus-visible,
.snf-marques-contact a:focus-visible {
    outline: 3px solid rgba(32, 174, 234, .35);
    outline-offset: 3px;
}

@media (max-width: 1080px) {
    .snf-marques-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .snf-marques-hero__visual {
        max-width: 130px;
        opacity: .82;
    }
}

@media (max-width: 760px) {
    .snf-marques-hero {
        min-height: 0;
        padding: 34px 16px 28px;
    }

    .snf-marques-hero::before,
    .snf-marques-hero::after,
    .snf-marques-hero__visual {
        display: none;
    }

    .snf-marques-hero__title {
        font-size: 2rem;
    }

    .snf-marques-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 360px;
    }

    .snf-marques-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .snf-marques-filter {
        min-width: 0;
        flex: 1 1 120px;
    }

    .snf-marques-contact {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .snf-marques-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .snf-marques-grid {
        gap: 10px;
    }

    .snf-marque-card__link {
        padding: 16px 10px 12px;
    }

    .snf-marque-card__logo {
        max-width: 105px;
    }
}
