.aft-product-catalogue {
    --pc-ink: #10356D;
    --pc-ink-soft: #4e5366;
    --pc-accent: #f8a800;
    --pc-accent-soft: #fff4d6;
    --pc-rule: #e6e6e6;
    --pc-cream: #fdfcfa;

    padding: 80px 24px;
}

.aft-product-catalogue--cream { background: var(--pc-cream); }
.aft-product-catalogue--white { background: #ffffff; }
.aft-product-catalogue--ink {
    background: var(--pc-ink);
    color: #fff;
    --pc-ink: #ffffff;
    --pc-ink-soft: rgba(255, 255, 255, 0.78);
    --pc-rule: rgba(255, 255, 255, 0.14);
}

.aft-product-catalogue__inner {
    max-width: 1500px;
    margin: 0 auto;
}

.aft-product-catalogue__header {
    text-align: center;
    margin-bottom: 48px;
    max-width: 720px;
    margin-inline: auto;
}

.aft-product-catalogue__eyebrow {
    margin: 0 0 10px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 600;
    font-style: italic;
    color: var(--pc-accent);
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-transform: none;
}

.aft-product-catalogue__title {
    margin: 0 0 12px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 800;
    color: var(--pc-ink);
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.aft-product-catalogue__sous-titre {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--pc-ink-soft);
}

.aft-product-catalogue__notice {
    text-align: center;
    padding: 24px;
    background: rgba(248, 168, 0, 0.08);
    border: 1px dashed var(--pc-accent);
    border-radius: 8px;
    color: var(--pc-ink-soft);
}

/* ─── Grid ──────────────────────────────────────────────────────────── */

.aft-product-catalogue__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 24px;
}

.aft-product-catalogue--cols-2 .aft-product-catalogue__grid { grid-template-columns: repeat(2, 1fr); }
.aft-product-catalogue--cols-3 .aft-product-catalogue__grid { grid-template-columns: repeat(3, 1fr); }
.aft-product-catalogue--cols-4 .aft-product-catalogue__grid { grid-template-columns: repeat(4, 1fr); }
.aft-product-catalogue--cols-5 .aft-product-catalogue__grid { grid-template-columns: repeat(5, 1fr); }
.aft-product-catalogue--cols-6 .aft-product-catalogue__grid { grid-template-columns: repeat(6, 1fr); }

/* ─── Card ──────────────────────────────────────────────────────────── */

.aft-product-card {
    display: flex;
    background: #fff;
    border: 1px solid var(--pc-rule);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.aft-product-catalogue--ink .aft-product-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.aft-product-card:hover,
.aft-product-card:focus-within {
    transform: translateY(-4px);
    border-color: var(--pc-accent);
    box-shadow:
        0 18px 40px -20px rgba(16, 53, 109, 0.35),
        0 4px 12px -6px rgba(248, 168, 0, 0.18);
}

.aft-product-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* Document thumbnails letterbox-fit so the entire scan is visible
   (e.g. "Certificat de scolarité Dauphine PSL" — the university name AND
   the student detail area). `contain` shows the whole document; the
   cream backdrop fills the negative space without reading as broken. */
.aft-product-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    background:
        linear-gradient(135deg, rgba(248, 168, 0, 0.04) 0%, rgba(16, 53, 109, 0.03) 100%),
        var(--pc-cream);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.aft-product-catalogue--ink .aft-product-card__image {
    background:
        linear-gradient(135deg, rgba(248, 168, 0, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%),
        rgba(255, 255, 255, 0.05);
}

.aft-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.45s ease;
    filter: drop-shadow(0 6px 14px rgba(16, 53, 109, 0.18));
}

.aft-product-card:hover .aft-product-card__img,
.aft-product-card:focus-within .aft-product-card__img {
    transform: scale(1.03);
}

.aft-product-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-rule);
}

.aft-product-card__placeholder svg {
    width: 56px;
    height: 56px;
    opacity: 0.6;
}

.aft-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--pc-accent);
    color: var(--pc-ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}

.aft-product-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    gap: 8px;
}

.aft-product-card__title {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--pc-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
    min-height: 2.5em;
}

.aft-product-catalogue--ink .aft-product-card__title { color: #fff; }

.aft-product-card__price {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-accent);
    letter-spacing: -0.005em;
}

.aft-product-card__price del {
    color: var(--pc-ink-soft);
    font-weight: 400;
    margin-right: 6px;
    text-decoration: line-through;
}

.aft-product-card__price ins {
    text-decoration: none;
    color: var(--pc-accent);
    font-weight: 700;
}

.aft-product-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--pc-rule);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pc-ink);
    transition: color 0.25s ease, gap 0.25s ease;
}

.aft-product-catalogue--ink .aft-product-card__cta { color: #fff; }

.aft-product-card__cta-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.aft-product-card:hover .aft-product-card__cta,
.aft-product-card:focus-within .aft-product-card__cta {
    color: var(--pc-accent);
    gap: 12px;
}

.aft-product-card:hover .aft-product-card__cta-arrow,
.aft-product-card:focus-within .aft-product-card__cta-arrow {
    transform: translateX(2px);
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .aft-product-catalogue--cols-5 .aft-product-catalogue__grid,
    .aft-product-catalogue--cols-6 .aft-product-catalogue__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .aft-product-catalogue { padding: 56px 20px; }
    .aft-product-catalogue--cols-4 .aft-product-catalogue__grid,
    .aft-product-catalogue--cols-5 .aft-product-catalogue__grid,
    .aft-product-catalogue--cols-6 .aft-product-catalogue__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
    .aft-product-catalogue { padding: 44px 16px; }
    .aft-product-catalogue__grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px; }
    .aft-product-card__body { padding: 14px 14px 16px; }
    .aft-product-card__title { font-size: 15px; min-height: 2.4em; }
}

@media (max-width: 380px) {
    .aft-product-catalogue__grid { grid-template-columns: 1fr !important; }
}
