/**
 * Section « Ils nous font confiance » (homepage).
 *
 * UI/UX 2026 — grille auto-fit, micro-interactions, désaturation par défaut,
 * couleur au survol, soft shadow + halo doré au hover. Respecte la DA :
 *   - fond cream
 *   - eyebrow doré encadré de filets
 *   - titre Playfair navy
 *   - nom de marque en small caps tracking large
 *
 * Scopé à la home via enqueue conditionnel (cf. functions.php).
 */

.sfc-trust {
    position: relative;
    overflow: hidden;
}

/* Halo gradient discret en arrière-plan pour casser le bloc cream. */
.sfc-trust::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(201, 169, 97, 0.10), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(26, 38, 64, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.sfc-trust .sfc-container {
    position: relative;
    z-index: 1;
}

/* ============ HEADER ============ */
.sfc-trust__header {
    margin-bottom: 56px;
}

.sfc-trust__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 14px;
}

.sfc-trust__eyebrow::before,
.sfc-trust__eyebrow::after {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--color-gold);
}

.sfc-trust__title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 14px;
    line-height: 1.15;
}

.sfc-trust__subtitle {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text-muted);
    margin: 0 auto;
    max-width: 560px;
    line-height: 1.65;
}

/* ============ GRID ============ */
.sfc-trust__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin-inline: auto;
    justify-items: center;
}

/* Quand peu d'items, on garde des « cartes » bien dimensionnées sans étirer
   à toute la rangée — d'où le max-width sur l'item. */
.sfc-trust__item {
    width: 100%;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 24px 24px;
    background: var(--color-white);
    border: 1px solid rgba(26, 38, 64, 0.06);
    border-radius: var(--radius-ui);
    box-shadow: 0 1px 2px rgba(26, 38, 64, 0.04);
    transition:
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 320ms ease-in-out;
    position: relative;
}

/* Liseré doré au hover (pseudo-élément pour ne pas pousser le contenu). */
.sfc-trust__item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-ui);
    border: 1px solid transparent;
    pointer-events: none;
    transition: border-color 320ms ease-in-out;
}

.sfc-trust__item:hover,
.sfc-trust__item:focus-within {
    transform: translateY(-4px);
    box-shadow:
        0 12px 28px rgba(26, 38, 64, 0.10),
        0 0 0 4px rgba(201, 169, 97, 0.10);
    border-color: rgba(201, 169, 97, 0.35);
}

.sfc-trust__item:hover::after,
.sfc-trust__item:focus-within::after {
    border-color: rgba(201, 169, 97, 0.55);
}

/* ============ MEDIA ============ */
.sfc-trust__media {
    width: 100%;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.sfc-trust__logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) contrast(0.95);
    opacity: 0.78;
    transition:
        filter 360ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 360ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sfc-trust__item:hover .sfc-trust__logo,
.sfc-trust__item:focus-within .sfc-trust__logo {
    filter: grayscale(0%) contrast(1);
    opacity: 1;
    transform: scale(1.03);
}

.sfc-trust__logo--placeholder {
    display: block;
    width: 120px;
    height: 60px;
    border-radius: var(--radius-ui);
    background:
        linear-gradient(135deg, rgba(26, 38, 64, 0.08), rgba(201, 169, 97, 0.18));
}

/* ============ NAME ============ */
.sfc-trust__name {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    transition: color 320ms ease-in-out;
}

.sfc-trust__item:hover .sfc-trust__name,
.sfc-trust__item:focus-within .sfc-trust__name {
    color: var(--color-primary);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .sfc-trust__header { margin-bottom: 40px; }
    .sfc-trust__grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 14px;
    }
    .sfc-trust__item {
        padding: 22px 18px 20px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .sfc-trust__grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 360px;
    }
    .sfc-trust__item { max-width: none; }
    .sfc-trust__name { font-size: 10px; letter-spacing: 0.18em; }
}

/* Respect du prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
    .sfc-trust__item,
    .sfc-trust__logo,
    .sfc-trust__name,
    .sfc-trust__item::after {
        transition: none;
    }
    .sfc-trust__item:hover,
    .sfc-trust__item:focus-within {
        transform: none;
    }
    .sfc-trust__item:hover .sfc-trust__logo,
    .sfc-trust__item:focus-within .sfc-trust__logo {
        transform: none;
    }
}
