/* =========================================================
   Accueil — v1.46.0
   Hero « meilleures ventes », bandeau certifications en ligne,
   catalogue complet. Chargé sur la page d'accueil seulement.
   Cartes sans bordure, ombre douce et léger agrandissement au
   survol en thème clair ; bordure fine et soulèvement en sombre
   (--card-line, --card-line-hover et --lift : theme.css).
   ========================================================= */

/* ---------- Hero : liste des meilleures ventes ---------- */
.df-hero-best{
  width:100%; max-width:520px; margin-left:auto; padding:20px;
  background:var(--card); border:1px solid var(--card-line); border-radius:18px;
  box-shadow:var(--shadow);
}
.df-hero-best-head{display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:8px}
.df-hero-best-head h2{font-size:17px; font-weight:600; letter-spacing:-.01em}
.df-hero-best-head a{font-size:13px; font-weight:600; color:var(--amber-text)}
.df-hero-best-head a:hover{text-decoration:underline; text-underline-offset:3px}
.df-hero-best-list{list-style:none; margin:0; padding:0}
.df-hero-best-row{
  display:flex; align-items:center; gap:12px; min-height:64px; padding:10px 0;
  border-top:1px solid var(--line); color:var(--ink);
}
.df-hero-best-row:hover .df-hero-best-name{color:var(--amber-text)}
.df-hero-best-rank{flex:none; width:18px; font-size:12px; font-weight:700; color:var(--ink-3); font-variant-numeric:tabular-nums}
.df-hero-best-thumb{
  flex:none; width:64px; height:44px; border-radius:8px; overflow:hidden;
  background:repeating-linear-gradient(135deg, var(--bg-2) 0 8px, var(--bg-3) 8px 9px);
}
.df-hero-best-thumb img{display:block; width:100%; height:100%; object-fit:cover}
.df-hero-best-name{flex:1; min-width:0; font-size:14px; font-weight:600; line-height:1.3; transition:color .2s}
.df-hero-best-sub{display:block; font-size:12px; font-weight:400; color:var(--ink-3)}
.df-hero-best-price{flex:none; margin-left:auto; font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap}
.df-hero-best-price del{font-weight:400; color:var(--ink-3); margin-right:4px}
.df-hero-best-price small{font-weight:500; color:var(--ink-3); font-size:11px; margin-left:3px}

@media (max-width:820px){
  .df-hero-best{max-width:none; margin-left:0}
}

/* ---------- Certifications : bandeau en ligne ---------- */
.df-home-cert-band{padding-top:8px; padding-bottom:8px}
.df-about-certs-card--row{
  max-width:none; gap:28px; padding:22px 28px; flex-wrap:wrap;
  border-color:var(--card-line); box-shadow:var(--shadow);
}
.df-about-certs-card--row .df-certs--band{--df-cert-size:84px; gap:12px}
.df-about-certs-card--row .df-about-certs-copy{flex:1 1 320px}
.df-about-certs-card--row .df-about-certs-copy h2{margin:6px 0 0; font-size:clamp(21px, 2.2vw, 26px); line-height:1.15}
.df-cert-row-btn{flex:none}
@media (max-width:980px){
  .df-about-certs-card--row{gap:18px}
  .df-about-certs-card--row .df-about-certs-copy{flex-basis:100%}
}
@media (max-width:720px){
  .df-about-certs-card--row{padding:20px 18px}
  .df-about-certs-card--row .df-certs--band{--df-cert-size:68px}
  .df-cert-row-btn{width:100%; justify-content:center}
}

/* ---------- Catalogue ---------- */
.df-cata{padding:40px 0 24px}
.df-cata [hidden]{display:none !important}
.df-cata-head{display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap; padding-top:16px; padding-bottom:24px}
.df-cata-head h2{margin-top:14px}
.df-cata-head h2 em{font-style:italic; color:var(--amber-text)}
.df-cata-intro{margin:12px 0 0; color:var(--ink-2); max-width:62ch}

/* Barre de filtres : collée sous la navigation du site (hauteur posée par le script). */
.df-cata-bar{
  position:sticky; top:var(--df-cata-top, 64px); z-index:30;
  background:var(--bg); border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
.df-cata-bar-in{display:flex; align-items:center; gap:12px 16px; flex-wrap:wrap; padding-top:10px; padding-bottom:10px}
.df-cata-seg{display:inline-flex; gap:2px; padding:4px; border-radius:12px; background:var(--bg-2)}
.df-cata-tab{
  display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 14px;
  border-radius:9px; font-size:14px; font-weight:600; color:var(--ink-2);
}
.df-cata-n{font-size:12px; font-weight:600; color:var(--ink-3); font-variant-numeric:tabular-nums}
.df-cata-tab .df-cata-n{padding:1px 7px; border-radius:99px; background:var(--bg-3)}
.df-cata-tab.is-on{background:var(--card); color:var(--ink); box-shadow:var(--shadow)}
.df-cata-tab.is-on .df-cata-n{background:color-mix(in oklch, var(--amber) 16%, transparent); color:var(--amber-text)}
.df-cata-search{
  flex:1 1 260px; display:flex; align-items:center; gap:10px; min-height:48px; padding:0 14px;
  border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink-3);
}
.df-cata-search:focus-within{border-color:var(--amber-text)}
.df-cata-search svg{flex:none; width:18px; height:18px}
.df-cata-search input{
  flex:1; min-width:0; height:44px; padding:0; border:0; outline:0; background:transparent;
  font:inherit; font-size:15px; color:var(--ink);
}
.df-cata-search input::placeholder{color:var(--ink-3)}
.df-cata-pills{display:flex; gap:6px; flex-wrap:wrap}
.df-cata-pill{
  min-height:44px; padding:0 14px; border-radius:99px; border:1px solid var(--line);
  background:var(--card); font-size:13px; font-weight:600; color:var(--ink-2);
}
.df-cata-pill:hover{border-color:var(--ink-3)}
.df-cata-pill.is-on{background:var(--ink); color:var(--bg); border-color:var(--ink)}
.df-cata-view{width:44px; height:44px; display:grid; place-items:center; border-radius:9px; color:var(--ink-3)}
.df-cata-view.is-on{background:var(--card); color:var(--ink); box-shadow:var(--shadow)}

/* Panneau d'une plateforme : sommaire des catégories + contenu. */
.df-cata-panel{display:flex; gap:40px; align-items:flex-start; padding-top:28px; padding-bottom:32px}
.df-cata-side{
  flex:0 0 232px; position:sticky; top:calc(var(--df-cata-top, 64px) + 86px);
  max-height:calc(100vh - var(--df-cata-top, 64px) - 110px); overflow:auto;
}
.df-cata-side-title{padding:0 10px 8px; font-size:12px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3)}
.df-cata-side a{
  display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:40px;
  padding:0 10px; border-radius:8px; font-size:14px; font-weight:500; color:var(--ink-2);
}
.df-cata-side a:hover{background:var(--bg-2); color:var(--ink)}
.df-cata-chips{display:none}
.df-cata-main{flex:1; min-width:0}
.df-cata-status{margin:0 0 8px; font-size:13px; color:var(--ink-3)}
.df-cata-empty{padding:56px 24px; text-align:center; border:1px dashed var(--line); border-radius:16px; color:var(--ink-2)}
.df-cata-empty h3{font-size:24px; margin-bottom:8px}
.df-cata-empty p{margin:0 0 18px}
.df-cata-more{margin:8px 0 0}

.df-cata-cat{padding:26px 0 30px; border-top:1px solid var(--line); scroll-margin-top:calc(var(--df-cata-top, 64px) + 84px)}
.df-cata-status + .df-cata-empty + .df-cata-cat{border-top:0; padding-top:8px}
.df-cata-cat-head{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:16px}
.df-cata-cat-head h3{font-size:26px; line-height:1.15}
.df-cata-cat-count{font-size:13px; color:var(--ink-3); font-variant-numeric:tabular-nums}
.df-cata-cat-all{margin-left:auto; display:inline-flex; align-items:center; gap:6px; min-height:44px; font-size:14px; font-weight:600; color:var(--amber-text)}
.df-cata-cat-all:hover{text-decoration:underline; text-underline-offset:3px}
.df-cata-cat-all svg{width:14px; height:14px; flex:none}

/* Un seul gabarit d'élément : grande carte pour .is-head (les 4 premiers
   visibles de la catégorie), tuile compacte pour les suivants. */
.df-cata-grid{display:grid; grid-template-columns:repeat(12, minmax(0, 1fr)); gap:10px 16px}
/* position:relative — les prix barrés contiennent un texte pour lecteurs d'écran
   en position absolue ; sans ancre, il sortait du rail mobile et élargissait la page. */
.df-cata-item{
  position:relative; grid-column:span 4; display:flex; align-items:center; gap:12px; min-height:76px;
  padding:9px 12px 9px 9px; color:var(--ink);
  background:var(--card); border:1px solid var(--card-line); border-radius:14px; box-shadow:var(--shadow);
  transition:transform .3s cubic-bezier(0,0,.5,1), box-shadow .3s cubic-bezier(0,0,.5,1), border-color .3s;
}
.df-cata-item:hover{transform:var(--lift); box-shadow:var(--shadow-lg); border-color:var(--card-line-hover)}
.df-cata-thumb{
  flex:none; width:56px; height:56px; border-radius:9px; overflow:hidden; display:grid; place-items:center;
  background:repeating-linear-gradient(135deg, var(--bg-2) 0 8px, var(--bg-3) 8px 9px);
}
.df-cata-thumb img{display:block; width:100%; height:100%; object-fit:cover}
.df-cata-thumb picture{display:block; width:100%; height:100%} /* v1.49.0 : icône sur grand écran, image sur mobile */
.df-cata-thumb .df-glyph{
  width:26px; height:26px; border-radius:7px; display:grid; place-items:center;
  background:var(--amber); color:#1a1506; font-size:12px; font-weight:700;
}
.df-cata-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px}
.df-cata-name{
  font-size:13.5px; font-weight:600; line-height:1.3;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
.df-cata-tag{display:none; font-size:12.5px; line-height:1.4; color:var(--ink-3)}
.df-cata-meta{display:flex; align-items:center; gap:6px; min-height:22px; margin-top:auto}
.df-cata-bdg{display:inline-flex; align-items:center; gap:3px; padding:2px 7px; border-radius:99px; font-size:11px; font-weight:600; white-space:nowrap}
.df-cata-bdg-new{background:color-mix(in oklch, var(--amber) 16%, transparent); color:var(--amber-text)}
.df-cata-bdg-best{background:var(--ink); color:var(--bg)}
.df-cata-bdg-star{background:var(--chip); color:var(--ink-2)}
.df-cata-price{margin-left:auto; font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap}
.df-cata-price del{font-weight:400; color:var(--ink-3); margin-right:4px}
.df-cata-price small{font-weight:500; color:var(--ink-3); font-size:11px; margin-left:3px}

/* Carte (affichage par défaut, 4 premiers de chaque catégorie). */
.df-cata:not(.is-dense) .df-cata-item.is-head{
  grid-column:span 3; flex-direction:column; align-items:stretch; gap:10px;
  padding:12px; border-radius:18px; margin-bottom:6px;
}
.df-cata:not(.is-dense) .is-head .df-cata-thumb{width:auto; height:auto; aspect-ratio:16/9}
.df-cata:not(.is-dense) .is-head .df-glyph{width:40px; height:40px; border-radius:11px; font-size:17px; box-shadow:0 0 0 5px var(--card)}
.df-cata:not(.is-dense) .is-head .df-cata-body{gap:8px}
.df-cata:not(.is-dense) .is-head .df-cata-name{font-size:14.5px; min-height:38px}
.df-cata:not(.is-dense) .is-head .df-cata-tag{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; min-height:35px;
}
.df-cata:not(.is-dense) .is-head .df-cata-price{font-size:14px}

@media (max-width:1100px){
  .df-cata-item{grid-column:span 6}
  .df-cata:not(.is-dense) .df-cata-item.is-head{grid-column:span 6}
}

/* Téléphone : barre non collante, catégories en pastilles collantes,
   chaque catégorie en rail de cartes à faire défiler. */
@media (max-width:860px){
  .df-cata{padding-top:24px}
  .df-cata-bar{position:static}
  .df-cata-bar-in{gap:10px}
  .df-cata-plats{width:100%}
  .df-cata-plats .df-cata-tab{flex:1; justify-content:center; padding:0 6px; font-size:13px; gap:6px}
  .df-cata-search{flex:1 1 100%}
  .df-cata-pills{flex:1 1 0; min-width:0; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none}
  .df-cata-pills::-webkit-scrollbar{display:none}
  .df-cata-pill{flex:none}
  .df-cata-panel{display:block; padding-top:0}
  .df-cata-side{display:none}
  .df-cata-chips{
    display:flex; gap:8px; overflow-x:auto; scrollbar-width:none;
    position:sticky; top:var(--df-cata-top, 64px); z-index:20;
    margin:0 -15px; padding:10px 15px; background:var(--bg); border-bottom:1px solid var(--line);
  }
  .df-cata-chips::-webkit-scrollbar{display:none}
  .df-cata-chips a{
    flex:none; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px;
    border-radius:99px; border:1px solid var(--line); background:var(--card);
    font-size:13px; font-weight:600; white-space:nowrap; color:var(--ink);
  }
  .df-cata-status{margin:14px 0 0}
  .df-cata-cat{padding:22px 0 6px; scroll-margin-top:calc(var(--df-cata-top, 64px) + 72px)}
  .df-cata-cat-head{margin-bottom:10px; gap:4px 10px}
  .df-cata-cat-head h3{font-size:22px}

  .df-cata:not(.is-dense) .df-cata-grid{
    display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-left:15px;
    margin:0 -15px; padding:4px 15px 20px; scrollbar-width:none;
  }
  .df-cata:not(.is-dense) .df-cata-grid::-webkit-scrollbar{display:none}
  .df-cata:not(.is-dense) .df-cata-item,
  .df-cata:not(.is-dense) .df-cata-item.is-head{
    flex:0 0 232px; scroll-snap-align:start; flex-direction:column; align-items:stretch; gap:10px;
    padding:12px; border-radius:18px; margin-bottom:0;
  }
  .df-cata:not(.is-dense) .df-cata-thumb{width:auto; height:auto; aspect-ratio:16/9}
  .df-cata:not(.is-dense) .df-cata-body{gap:8px}
  .df-cata:not(.is-dense) .df-cata-name{font-size:14.5px; min-height:38px}
  .df-cata:not(.is-dense) .df-cata-tag{
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; min-height:35px;
  }
  .df-cata.is-dense .df-cata-grid{grid-template-columns:minmax(0, 1fr); margin-bottom:16px}
  .df-cata.is-dense .df-cata-item{grid-column:auto}
}

@media (prefers-reduced-motion:reduce){
  .df-cata-item{transition:none}
  .df-cata-item:hover{transform:none}
}
