/* =========================================================
   odiscount - style.css  (mobile first)
   Base = mobile. Les media queries min-width enrichissent :
   640px (tablette) > 960px (portable) > 1200px (bureau, 1440px de référence)
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;900&display=swap");

/* ---------- Variables ---------- */
:root {
  --navy: #29235c;
  --navy-dark: #201b4a;
  --red: #c81019;
  --red-market: #c81019;
  --orange: #f28c1e;
  --green: #1b7a2e;
  --black: #080808;
  --text: #222222;
  --muted: #777777;
  --gold: #e6b86a;
  --link-footer: #b9d4f0;

  --font: Arial, Helvetica, sans-serif;
  --container: 1268px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: #ffffff;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #f5a623;
  outline-offset: 2px;
}

/* =========================================================
   EN-TÊTE
   ========================================================= */
.topbar { background: #ffffff; }

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, 100%);
  min-height: 68px;
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 54px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--navy);
}

.logo__image {
  display: block;
  width: 150px;
  height: 54px;
  object-fit: contain;
}

.logo__o {
  position: relative;
  top: 0.08em;
  font-size: 1.25em;
  color: var(--red);
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.2;
  color: #333333;
}

.topbar__links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.topbar__links svg {
  width: 22px;
  height: 22px;
  color: var(--red);
}

.topbar__links a:hover span { text-decoration: underline; }

/* =========================================================
   NAVIGATION PRINCIPALE
   ========================================================= */
.mainnav { background: var(--navy); }

.mainnav__inner {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mainnav__inner::-webkit-scrollbar { display: none; }

.mainnav__home {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 50px;
  background: var(--red);
  color: #ffffff;
}

.mainnav__home svg { width: 22px; height: 22px; }

.mainnav__list { display: flex; }

.mainnav__list a,
.mainnav__market {
  display: block;
  padding: 0 14px;
  font-size: 17px;
  line-height: 52px;
  white-space: nowrap;
  color: #ffffff;
  transition: background-color 0.15s ease;
}

.mainnav__list a:hover { background: var(--navy-dark); }

.mainnav__list a.mainnav__link--active {
  background: var(--red);
  box-shadow: inset 0 -4px 0 #ffffff;
}

.mainnav__list a.mainnav__link--active:hover { background: #b80d18; }

.mainnav__market {
  background: var(--red-market);
}

.mainnav__market:hover { background: #b80d18; }

/* =========================================================
   HERO / RECHERCHE
   ========================================================= */
.hero {
  min-height: 420px;
  padding: 58px 16px 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    url("/images/banniere/font01.jpg")
    center / cover no-repeat;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__title {
  margin-bottom: 28px;
  font-size: clamp(26px, 3.3vw, 60px);
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.search {
  display: flex;
  flex-wrap: wrap;
  width: min(100%, 980px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.search__select,
.search__input {
  flex: 1 1 33%;
  min-width: 0;
  height: 72px;
  border: 0;
  border-right: 1px solid #d9d9d9;
  border-bottom: 1px solid #d9d9d9;
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.96);
  font-family: var(--font);
  font-size: 18px;
  color: #333333;
}

.search__select {
  padding: 0 42px 0 18px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23333' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.search__input { padding: 0 18px; }
.search__input::placeholder { color: #555555; opacity: 1; }

.search__btn {
  flex: 0 0 180px;
  height: 72px;
  border: 0;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font);
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search__btn:hover { background: var(--navy-dark); }

/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */
.main { padding: 32px 16px 56px; }

.main__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
}

/* ---------- Catégories (affichées en premier sur mobile) ---------- */
.categories { order: -1; width: 100%; min-width: 0; }

.categories__title {
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  color: #111111;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.cat-grid--second { margin-top: 14px; }

.cat {
  --strip: 7px;
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  border-radius: 8px;
  background: #555555;
}

.cat img {
  width: 100%;
  height: calc(100% - var(--strip));
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cat:hover img { transform: scale(1.04); }

/* Assombrissement progressif du bas de l'image (au-dessus de la bande sombre) */
.cat::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: var(--strip);
  left: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.66) 100%);
  pointer-events: none;
}

/* Cartes sans image : fond gris dégradé */
.cat--empty::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: var(--strip);
  left: 0;
  background: linear-gradient(to bottom, #555555 0%, #555555 45%, #2c2c2c 100%);
}

.cat--empty::after { display: none; }

.cat__label {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: var(--strip);
  padding: 0 8px 1px;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  color: #ffffff;
}

/* ---------- Colonne gauche (sous les catégories sur mobile) ---------- */
.sidebar { width: 100%; }

.promo {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 324px;
  height: 482px;
  overflow: hidden;
  background: #e9f4f4;
  text-align: center;
}

.promo__head {
  padding: 16px 0 10px;
  line-height: 1;
  color: #111111;
}

.promo__logo {
  display: block;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 1px;
}

.promo__logo-sub {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
}

.promo__city {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.promo__title {
  margin: 6px 22px 0;
  padding: 7px 4px;
  border: 3px solid var(--green);
  background: #ffffff;
  font-size: 17px;
  font-weight: 900;
  color: var(--green);
}

.promo__body {
  padding: 12px 22px 8px;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  color: #1a1a1a;
}

.promo__body ul { margin-top: 8px; }

.promo__body li {
  position: relative;
  padding-left: 18px;
  font-weight: 700;
}

.promo__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 2.5px #e9f4f4, inset 0 0 0 6px var(--green);
}

.promo__free {
  padding: 8px 22px 0;
  background: var(--orange);
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  color: #c4161c;
}

.promo__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 22px 10px;
  background: var(--orange);
  color: #ffffff;
}

.promo__contact span { font-size: 12px; font-weight: 700; }
.promo__contact strong { margin: 2px 0 0 34px; font-size: 18px; font-weight: 900; }
.promo__contact em { margin-top: 2px; font-size: 15px; font-weight: 700; font-style: italic; }

.promo__img {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
}

/* ---------- Avantages ---------- */
.perks { margin-top: 32px; }

.perk { margin-bottom: 24px; }

.perk__title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #222222;
}

.perk__text {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

/* =========================================================
   BANNIÈRE
   ========================================================= */
.banner { background: #14100a; }

.banner__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.banner__bar { height: 10px; background: var(--red); }

/* =========================================================
   PAGE CATÉGORIE
   ========================================================= */
.category-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 16px 36px;
}

.category-page__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-page__title {
  font-size: 24px;
  line-height: 1.2;
  color: #111111;
}

.category-page__back {
  flex: 0 0 auto;
  padding: 9px 10px;
  background: var(--red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.category-page__back:hover { background: #b80d18; }

.listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.listing-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e6e8ed;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(19, 27, 44, 0.1);
}

.listing-card__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 86px;
  overflow: hidden;
  background-color: #b7bbc7;
  background-image: linear-gradient(135deg, rgba(41, 35, 92, 0.25), rgba(17, 22, 38, 0.85));
}

.listing-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card__image::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.07) 18px 36px);
  content: "";
}

.listing-card__discount {
  position: absolute;
  z-index: 1;
  top: 7px;
  left: 7px;
  padding: 4px 6px;
  background: var(--red);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

.listing-card__placeholder-label {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.listing-card__body { padding: 8px; }

.listing-card__name {
  min-height: 2.4em;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111111;
}

.listing-card__location {
  display: table;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 20px;
  background: #f0eff7;
  color: var(--navy);
  font-size: 0.8125rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.listing-card__offer {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-top: 10px;
  padding: 8px 9px;
  border-left: 2px solid var(--red);
  background: #f7f7f9;
  color: #626775;
  font-size: 0.875rem;
  line-height: 1.45;
  text-transform: uppercase;
}

.listing-card__details {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.5;
}

.listing-card__details div { display: flex; flex-wrap: wrap; gap: 3px; }
.listing-card__details dt { font-weight: 700; }
.listing-card__details dd { margin: 0; overflow-wrap: anywhere; }
.listing-grid__empty { grid-column: 1 / -1; padding: 28px 16px; text-align: center; color: var(--muted); }

/* =========================================================
   PIED DE PAGE
   ========================================================= */
.footer {
  background: var(--black);
  color: #ffffff;
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 16px 28px;
}

.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 28px;
}

.footer__title {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 400;
  color: #ffffff;
}

.footer__col li { margin-bottom: 10px; font-size: 13px; }

.footer__col a { color: var(--link-footer); }
.footer__col a:hover { text-decoration: underline; }
.footer__col a.footer__link--gold { color: var(--gold); }

.footer__col--social { grid-column: 1 / -1; }

.social { display: flex; gap: 12px; }

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.social a:hover { background: #ffffff; color: #000000; }

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-top: 28px;
}

.footer__post {
  font-size: 15px;
  text-decoration: underline;
  color: #ffffff;
}

.footer__copy {
  font-size: 11px;
  line-height: 1.7;
  text-align: left;
  color: #ffffff;
}

/* =========================================================
   TABLETTE  (≥ 640px)
   ========================================================= */
@media (min-width: 640px) {
  .topbar__links { gap: 30px; }
  .logo { font-size: 34px; }
  .logo__image { width: 180px; height: 65px; }
  .logo { height: 65px; }

  .mainnav__home { flex-basis: 56px; }
  .mainnav__list a,
  .mainnav__market { font-size: 15px; padding: 0 16px; }

  .hero { min-height: 360px; padding: 110px 24px 0; }
  .hero__title { margin-bottom: 28px; font-size: 28px; line-height: 36px; }

  .search { flex-wrap: nowrap; height: 56px; width: 100%; max-width: 836px; }
  .search__select,
  .search__input { flex: 1 1 auto; height: 100%; border-bottom: 0; }
  .search__select { flex: 0 0 40%; border-right: 1px solid #dddddd; padding-left: 20px; }
  .search__input { padding: 0 20px; }
  .search__btn { flex: 0 0 120px; height: 100%; }

  .main { padding: 40px 24px 72px; }

  .categories__title { margin-bottom: 22px; font-size: 24px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .cat-grid--second { margin-top: 32px; }
  .cat { height: 160px; }
  .cat__label { font-size: 15px; }

  .banner__img { aspect-ratio: 1440 / 476; }
  .banner__bar { height: 12px; }
  .category-page { padding: 38px 24px 16px; }
  .category-page__heading { align-items: center; }
  .category-page__title { font-size: 28px; }
  .category-page__back { padding: 10px 16px; font-size: 14px; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .listing-card__image { height: 90px; }
  .listing-card__body { padding: 8px; }
  .listing-card__details { font-size: 0.8125rem; }
  .listing-card__offer { min-height: 54px; }

  .footer__inner { padding: 40px 24px 32px; }
  .footer__cols { grid-template-columns: 1fr 1fr auto; row-gap: 0; }
  .footer__title { font-size: 17px; }
  .footer__col li { font-size: 14px; }
  .footer__col--social { grid-column: auto; justify-self: end; }
  .social { gap: 14px; }

  .footer__bottom {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 34px;
  }

  .footer__copy { text-align: right; }
}

/* =========================================================
   PORTABLE  (≥ 960px)
   ========================================================= */
@media (min-width: 960px) {
  .mainnav__inner { padding-left: max(24px, calc((100% - 1296px) / 2)); }
  .mainnav__home { flex-basis: 58px; }
  .mainnav__home svg { width: 25px; height: 25px; }

  .hero { min-height: 428px; padding-top: 144px; }
  .hero__title { margin-bottom: 34px; font-size: 32px; line-height: 40px; }
  .search { height: 64px; }
  .search__select,
  .search__input,
  .search__btn { font-size: 16px; }
  .search__btn { flex-basis: 140px; }

  .main { padding: 56px 24px 88px; }
  .main__inner { flex-direction: row; align-items: flex-start; gap: 48px; }

  .sidebar { flex: 0 0 280px; width: 280px; }
  .promo { max-width: none; }
  .perks { margin-top: 48px; }

  .categories { order: 0; flex: 1 1 auto; max-width: 828px; }
  .cat-grid { gap: 20px; }
  .cat { height: 180px; }
  .listing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .listing-card__image { height: 110px; }
  .listing-card__body { padding: 10px 11px 12px; }
  .listing-card__details { font-size: 0.8125rem; }

  .footer__cols { grid-template-columns: 1fr 1fr 1fr; }
}

/* =========================================================
   BUREAU  (≥ 1200px, mesures de référence 1440px)
   ========================================================= */
@media (min-width: 1200px) {
  .logo { font-size: 40px; }

  .mainnav__list a { padding: 0 18.7px; font-size: 16px; }
  .mainnav__market { padding: 0 18px; font-size: 16px; }

  .hero__title { font-size: 36px; line-height: 44px; }

  .main { padding: 64px 20px 96px; }
  .main__inner { gap: 116px; }

  .sidebar { flex-basis: 324px; width: 324px; }
  .perk__title { font-size: 13px; }
  .perk__text { font-size: 11.5px; }

  .categories { max-width: 760px; }
  .categories__title { margin-bottom: 24px; font-size: 32px; line-height: 36px; }
  .cat-grid { gap: 16px; }
  .cat-grid--second { margin-top: 48px; }
  .cat { --strip: 8.5px; height: 192px; }
  .cat__label { font-size: 16px; }

  .footer__inner { padding: 44px 20px 34px; }
  .footer__cols { grid-template-columns: 444px 444px 1fr; }
  .footer__col--social { padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
