/*
 * 321reduc.com - design (redesign 2026-09, Bootstrap 5.3).
 * Brand: deep plum header, magenta primary, orange accent for codes.
 */
:root {
    --brand-plum: #2b1133;
    --brand-plum-2: #4a1d57;
    --brand-magenta: #d83982;
    --brand-magenta-dark: #ae1878;
    --brand-orange: #ff8a00;
    --brand-teal: #008080;
    --surface: #f6f4f8;
    --card-radius: 14px;
    --shadow-soft: 0 1px 2px rgba(43, 17, 51, .06), 0 4px 16px rgba(43, 17, 51, .06);
    --shadow-hover: 0 2px 4px rgba(43, 17, 51, .08), 0 10px 28px rgba(43, 17, 51, .12);

    --bs-primary: var(--brand-magenta);
    --bs-primary-rgb: 216, 57, 130;
    --bs-link-color: var(--brand-magenta-dark);
    --bs-link-color-rgb: 174, 24, 120;
    --bs-link-hover-color: var(--brand-plum-2);
    --bs-body-bg: var(--surface);
    --bs-body-color: #22172a;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-border-radius: .6rem;
}

body { -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.text-accent { color: var(--brand-magenta); }
.bi { vertical-align: -.125em; }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2000; padding: .5rem 1rem; background: #fff; }

/* Buttons */
.btn-primary {
    --bs-btn-bg: var(--brand-magenta); --bs-btn-border-color: var(--brand-magenta);
    --bs-btn-hover-bg: var(--brand-magenta-dark); --bs-btn-hover-border-color: var(--brand-magenta-dark);
    --bs-btn-active-bg: var(--brand-magenta-dark); --bs-btn-active-border-color: var(--brand-magenta-dark);
}
.btn-outline-primary {
    --bs-btn-color: var(--brand-magenta-dark); --bs-btn-border-color: var(--brand-magenta);
    --bs-btn-hover-bg: var(--brand-magenta); --bs-btn-hover-border-color: var(--brand-magenta);
}
.btn-accent {
    --bs-btn-color: #fff; --bs-btn-bg: var(--brand-orange); --bs-btn-border-color: var(--brand-orange);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #e67a00; --bs-btn-hover-border-color: #e67a00;
    font-weight: 600;
}

/* Header */
.site-header { background: linear-gradient(90deg, var(--brand-plum), var(--brand-plum-2)); box-shadow: 0 2px 12px rgba(0, 0, 0, .15); }
.site-header .navbar { --bs-navbar-padding-y: .6rem; }
.site-header .navbar-brand { padding-block: 0; }
/* Brand logo (partial/_brand_logo.html.twig): height only, the 4:1 ratio is kept; nothing around it. */
.brand-logo { display: block; line-height: 0; }
.brand-logo img { display: block; width: auto; max-width: none; }
.site-header .brand-logo img { height: 42px; }
.footer-logo .brand-logo img { height: 40px; }
.site-header .navbar-nav { gap: .35rem; }
.site-header .nav-link { font-weight: 500; border-radius: .5rem; padding-inline: .75rem !important; }
.site-header .nav-link.active, .site-header .nav-link:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.site-header .quick-search { min-width: 18rem; }

/* Header search: translucent pill on the dark header, magnifier button inside */
.quick-search-header { width: 100%; max-width: 22rem; transition: max-width .2s ease; }
.quick-search-header:focus-within { max-width: 26rem; }
.quick-search-header .input-group { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 3px; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.quick-search-header .input-group:focus-within { background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(216, 57, 130, .35); }
.quick-search-header .form-control { background: transparent; border: 0; box-shadow: none; color: #fff; padding: .35rem .9rem; font-size: .92rem; border-radius: 999px !important; }
.quick-search-header .form-control::placeholder { color: rgba(255, 255, 255, .65); }
.quick-search-header .input-group:focus-within .form-control { color: #22172a; }
.quick-search-header .input-group:focus-within .form-control::placeholder { color: #9a8ea0; }
.quick-search-header .form-control::-webkit-search-cancel-button { filter: invert(1); }
.quick-search-header .btn { width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
@media (max-width: 991.98px) { .quick-search-header, .quick-search-header:focus-within { max-width: none; margin: .5rem 0; } }

/* Search with suggestions */
.quick-search-results {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1050; margin: 0; padding: .35rem;
    background: #fff; border-radius: .6rem; max-height: 22rem; overflow-y: auto; text-align: left;
}
.quick-search-results li a { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: .45rem; color: #22172a; }
.quick-search-results li a:hover, .quick-search-results li a.is-active { background: var(--surface); text-decoration: none; }
.quick-search-results img { width: 48px; height: 24px; object-fit: contain; }
.quick-search-results .qs-type { margin-left: auto; font-size: .75rem; color: #7a6d80; }
.quick-search-lg .form-control { border-radius: 999px 0 0 999px; padding-left: 1.4rem; }
.quick-search-lg .btn { border-radius: 0 999px 999px 0; padding-inline: 1.4rem; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 50% -10%, #6a2b7a 0%, var(--brand-plum) 60%); color: #fff; }
.hero-title { font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.02em; }
.hero-lead { opacity: .85; font-size: 1.1rem; margin-bottom: 1.5rem; }
.hero-links a { color: #fff; opacity: .9; font-size: .95rem; margin-inline: .5rem; }

/* Sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.section-link { white-space: nowrap; font-weight: 500; }
.page-title { font-weight: 800; letter-spacing: -.01em; }
.page-lead { color: #5b4f61; }
.page-lead p:last-child { margin-bottom: 0; }

/* Offer cards */
.deal-list { display: grid; gap: .9rem; }
.deal-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 32rem), 1fr)); }
.deal-card {
    position: relative; display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 1rem; align-items: center;
    background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1rem;
    transition: box-shadow .15s ease, transform .15s ease; cursor: pointer;
}
.deal-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.deal-card.is-expired { opacity: .7; cursor: default; }
.deal-card.is-expired:hover { transform: none; box-shadow: var(--shadow-soft); }
.deal-value { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }
.deal-logo { width: 96px; height: 48px; object-fit: contain; }
.deal-discount { font-size: 1.6rem; font-weight: 800; color: var(--brand-magenta); line-height: 1; }
.deal-discount small { font-size: .9rem; margin-left: 1px; }
.deal-price { display: flex; flex-direction: column; align-items: center; font-size: 1.25rem; font-weight: 800; color: var(--brand-plum-2); line-height: 1.1; }
.deal-price small { font-size: .65rem; font-weight: 500; color: #7a6d80; }
.deal-discount-icon { display: flex; flex-direction: column; align-items: center; color: var(--brand-magenta); font-size: 1.6rem; line-height: 1; }
.deal-discount-icon small { font-size: .7rem; margin-top: .25rem; color: #7a6d80; }
.deal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .8rem; margin-bottom: .2rem; }
.deal-type { text-transform: uppercase; font-weight: 700; letter-spacing: .04em; font-size: .7rem; padding: .15rem .5rem; border-radius: 999px; background: #f1e6f6; color: var(--brand-plum-2); }
.deal-type-code { background: #fff1e0; color: #b35f00; }
.deal-company { font-weight: 600; color: #22172a; }
.deal-verified { color: var(--brand-teal); font-weight: 600; }
.deal-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .25rem; }
.deal-title a { color: inherit; }
.deal-description { font-size: .88rem; color: #5b4f61; margin: 0 0 .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-expiry { font-size: .78rem; color: #7a6d80; margin: 0; }
.deal-action { min-width: 11rem; text-align: right; }
/* Offer with a picture: whole picture (promo banners carry text) with the value underneath */
.deal-card.has-image { grid-template-columns: 9.5rem 1fr auto; }
.deal-media { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.deal-thumb { display: block; width: 100%; border-radius: .6rem; overflow: hidden; background: var(--surface); }
.deal-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: contain; }
.deal-media .deal-discount { font-size: 1.3rem; }

/* "Voir le code": the end of the code peeks out from under the button */
.btn-code {
    position: relative; display: inline-flex; align-items: stretch; padding: 0; border: 2px dashed var(--brand-orange);
    border-radius: .6rem; overflow: hidden; background: #fff7ec; min-width: 11rem; font-weight: 700;
}
.btn-code-label { position: relative; z-index: 1; flex: 1; padding: .6rem 1rem; background: var(--brand-orange); color: #fff; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); padding-right: 1.6rem; }
.btn-code-peek { display: flex; align-items: center; padding: 0 .7rem 0 .2rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #b35f00; letter-spacing: .08em; }
.btn-code:hover .btn-code-label { background: #e67a00; }
.btn-offer { background: var(--brand-magenta); color: #fff; font-weight: 700; min-width: 11rem; padding: .6rem 1rem; border-radius: .6rem; }
.btn-offer:hover { background: var(--brand-magenta-dark); color: #fff; }
.is-expired .btn-code, .is-expired .btn-offer { filter: grayscale(1); }

@media (max-width: 767.98px) {
    .site-header .brand-logo img { height: 34px; }
    .deal-card { grid-template-columns: 4.5rem 1fr; padding: .85rem; }
    .deal-action { grid-column: 1 / -1; text-align: left; min-width: 0; }
    .deal-action .btn { width: 100%; }
    .deal-discount { font-size: 1.3rem; }
    .deal-logo { width: 64px; height: 32px; }
    .deal-card.has-image { grid-template-columns: 6.5rem 1fr; }
    .deal-media .deal-discount { font-size: 1.1rem; }
}

/* Merchant page */
.merchant-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1.25rem; }
.merchant-header-logo img { width: 140px; height: 70px; object-fit: contain; }
.merchant-header-body { flex: 1 1 18rem; }
.merchant-stats { color: #5b4f61; }
.merchant-lead { font-size: .92rem; color: #5b4f61; }
.deal-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-filter { background: #fff; border: 1px solid #e3d9e8; border-radius: 999px; font-weight: 600; padding: .35rem .9rem; }
.btn-filter span { color: #7a6d80; font-weight: 500; margin-left: .25rem; }
.btn-filter.active { background: var(--brand-plum-2); color: #fff; border-color: var(--brand-plum-2); }
.btn-filter.active span { color: rgba(255, 255, 255, .75); }
.expired-deals summary { cursor: pointer; font-weight: 600; color: #5b4f61; padding: .6rem 0; }

/* Deal page */
.deal-detail { background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1.5rem; }
.deal-detail-head { display: flex; align-items: center; gap: 1rem; }
.deal-detail-logo { width: 120px; height: 60px; object-fit: contain; }
.code-box { border: 2px dashed var(--brand-orange); background: #fff7ec; border-radius: var(--card-radius); padding: 1.25rem; text-align: center; }
.code-box-label { font-weight: 600; margin-bottom: .5rem; }
.code-box-code { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.code-box-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: .08em; background: #fff; border-radius: .5rem; padding: .35rem 1rem; user-select: all; }
.deal-facts { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; font-size: .88rem; }
.deal-facts dt { color: #7a6d80; font-weight: 500; }
.deal-facts dd { margin: 0; font-weight: 600; }

/* Sidebar */
.side-card { background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1.1rem 1.25rem; }
.side-card-title { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.side-links li a { display: block; padding: .35rem 0; color: #22172a; border-bottom: 1px solid #f1ecf3; }
.side-links li:last-child a { border-bottom: 0; }

/* Chips, tags, A-Z */
.category-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.category-chip { display: inline-block; background: #fff; border: 1px solid #e3d9e8; border-radius: 999px; padding: .4rem .9rem; color: #22172a; font-weight: 500; }
.category-chip:hover, .category-chip.active { border-color: var(--brand-magenta); color: var(--brand-magenta-dark); text-decoration: none; }
.category-chip-sm { padding: .2rem .7rem; font-size: .85rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; }
.tag-cloud-item { background: #fff; border-radius: 999px; padding: .3rem .8rem; box-shadow: var(--shadow-soft); color: #22172a; }
.tag-level-1 { font-size: .85rem; } .tag-level-2 { font-size: 1rem; } .tag-level-3 { font-size: 1.2rem; font-weight: 600; } .tag-level-4 { font-size: 1.45rem; font-weight: 700; color: var(--brand-magenta-dark); }
.az-index { display: flex; flex-wrap: wrap; gap: .25rem; background: #fff; border-radius: var(--card-radius); padding: .6rem; box-shadow: var(--shadow-soft); }
.sticky-az { position: sticky; top: 4.5rem; z-index: 10; }
.az-index a { display: inline-block; min-width: 2.2rem; text-align: center; padding: .3rem; border-radius: .4rem; font-weight: 700; }
.az-index a:hover { background: var(--surface); text-decoration: none; }
.az-group { scroll-margin-top: 8rem; margin-bottom: 1.5rem; }
.az-letter { font-size: 1.4rem; font-weight: 800; color: var(--brand-magenta); border-bottom: 2px solid #eadff0; padding-bottom: .25rem; }
.az-list { columns: 4 12rem; column-gap: 1.5rem; }
.az-list li { break-inside: avoid; padding: .15rem 0; }

/* Sliders (Swiper) */
.swiper { position: relative; padding-bottom: .25rem; }
.swiper:not(.swiper-initialized) .swiper-wrapper { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.swiper:not(.swiper-initialized) .swiper-slide { flex: 0 0 auto; scroll-snap-align: start; }
.merchant-slider .swiper-slide { width: 10rem; }
.merchant-tile { margin-bottom: .35rem; }
.offer-slider .swiper-slide { width: 18rem; }
.swiper-nav { position: absolute; top: 40%; z-index: 5; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: #fff; box-shadow: var(--shadow-hover); display: none; align-items: center; justify-content: center; }
.swiper-initialized .swiper-nav { display: flex; }
.swiper-nav-prev { left: -.6rem; } .swiper-nav-next { right: -.6rem; }
.swiper-nav.swiper-button-disabled { opacity: 0; pointer-events: none; }
.merchant-tile { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1rem .75rem; height: 100%; color: #22172a; }
.merchant-tile:hover { box-shadow: var(--shadow-hover); text-decoration: none; }
.merchant-tile-logo { display: flex; align-items: center; justify-content: center; height: 60px; }
.merchant-tile-logo img { width: 120px; height: 60px; object-fit: contain; }
.swiper-slide { height: auto; }
.merchant-tile-name { font-weight: 600; font-size: .9rem; text-align: center; }
.merchant-tile-count { font-size: .78rem; color: var(--brand-teal); font-weight: 600; }
.offer-tile { display: block; background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); overflow: hidden; height: 100%; color: #22172a; }
.offer-tile:hover { box-shadow: var(--shadow-hover); text-decoration: none; }
.offer-tile-image img { display: block; width: 100%; height: 10rem; object-fit: cover; }
.offer-tile-body { display: block; padding: .75rem 1rem; }
.offer-tile-company { display: block; font-size: .78rem; font-weight: 700; color: var(--brand-magenta-dark); text-transform: uppercase; }
.offer-tile-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: .95rem; }

/* Pagination, breadcrumb, FAQ, texts */
/* Pagination: round page numbers, pill-shaped previous / next, no borders */
.pagination { gap: .4rem; align-items: center; }
.pagination .page-link {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .6rem;
    border: 0; border-radius: 999px !important; background: #fff; color: #3b3040; font-weight: 600;
    box-shadow: var(--shadow-soft); transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.pagination .page-link:hover { background: #f7eef9; color: var(--brand-magenta-dark); box-shadow: var(--shadow-hover); text-decoration: none; }
.pagination .page-item.active .page-link { background: var(--brand-magenta); color: #fff; box-shadow: 0 4px 14px rgba(216, 57, 130, .35); }
.pagination .page-item.prev .page-link, .pagination .page-item.next .page-link { padding: 0 1.1rem; }
.pagination .page-item.disabled .page-link { background: transparent; box-shadow: none; color: #b3a8b8; }
.pagination .page-item:not(.prev):not(.next).disabled .page-link { min-width: 1.5rem; padding: 0; }
.breadcrumb a { color: #7a6d80; }
.faq .accordion-button:not(.collapsed) { background: #f7eef9; color: var(--brand-plum-2); }
.seo-text { background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1.5rem; color: #3b3040; }
.seo-text.row { margin-inline: 0; }
.static-page { background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); padding: 1.5rem; }
.ad-slot { min-height: 100px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--brand-magenta); line-height: 1; margin: 0; }
.account-card { border: 0; border-radius: var(--card-radius); }

/* Footer */
.site-footer { background: var(--brand-plum); color: rgba(255, 255, 255, .8); }
.site-footer a { color: #fff; }
.footer-title { color: #fff; font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; }
.site-footer li { padding: .15rem 0; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 1.1rem; }
.footer-bottom { background: rgba(0, 0, 0, .2); }

/* Click-out interstitial */
.redirect-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.redirect-box { display: flex; flex-direction: column; align-items: center; gap: .75rem; background: #fff; border-radius: var(--card-radius); box-shadow: var(--shadow-hover); padding: 2.5rem; max-width: 34rem; text-align: center; color: #22172a; }
.redirect-box:hover { text-decoration: none; }
.redirect-logos { display: flex; align-items: center; gap: 1.25rem; }
.redirect-logo-site { background: var(--brand-plum); border-radius: .5rem; padding: .4rem .6rem; height: 48px; width: auto; }
.redirect-logo-company { object-fit: contain; }
.redirect-arrow { font-size: 1.5rem; color: var(--brand-magenta); }
.redirect-title { font-size: 1.2rem; }
.redirect-text { color: #5b4f61; }
.redirect-box p { margin: 0; }
.redirect-partner-icon { font-size: 2.5rem; color: var(--brand-plum); }
.redirect-progress { width: 100%; max-width: 20rem; height: .4rem; border-radius: 1rem; background: #eee6f0; overflow: hidden; margin-top: .5rem; }
.redirect-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand-magenta), var(--brand-orange, #ff8a00)); animation: redirect-progress var(--redirect-delay, 2s) linear forwards; }
@keyframes redirect-progress { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .redirect-progress span { animation: none; width: 100%; } }
.redirect-note { color: #5b4f61; font-size: .9rem; }

/* Deal page: offer picture next to the code box */
.deal-detail-main { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.deal-detail-main .code-box { flex: 1 1 18rem; margin: 0; }
.deal-detail-image { width: 100%; max-width: 300px; height: auto; border-radius: var(--card-radius); box-shadow: var(--shadow-soft); }
