/* ==========================================================================
   Catalogue : bande « Prochaines entrées », pastilles de domaines, barre
   d'outils collante, cartes photo (grille) et lignes (liste).
   ========================================================================== */

.ifd-catalog { padding: clamp(36px, 4.5vw, 60px) 0 var(--ifd-section); }

/* ------------------------------ Prochaines entrées ------------------------------ */
.ifd-soon { margin-bottom: clamp(36px, 4vw, 52px); }
.ifd-soon[hidden] { display: none; }
.ifd-soon__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ifd-soon__title { font-size: clamp(19px, 1.7vw, 23px); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.ifd-soon__title::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ifd-accent); box-shadow: 0 0 0 0 rgba(250, 70, 22, .5); animation: ifd-live 2.2s ease-out infinite; }
@keyframes ifd-live { 0% { box-shadow: 0 0 0 0 rgba(250, 70, 22, .45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(250, 70, 22, 0); } }
.ifd-soon__all { font-size: 14.5px; font-weight: 600; color: var(--ifd-bleu); white-space: nowrap; }
.ifd-soon__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ifd-soon__card { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px 14px 14px; background: #fff; border: 1px solid var(--ifd-border); border-radius: 16px; color: var(--ifd-encre); transition: border-color .2s, box-shadow .25s, transform .25s; }
.ifd-soon__card:hover { color: var(--ifd-encre); border-color: var(--ifd-pervenche); box-shadow: 0 18px 40px -30px rgba(11, 11, 26, .45); transform: translateY(-2px); }
.ifd-soon__date { flex: 0 0 auto; width: 54px; height: 58px; border-radius: 12px; background: var(--ifd-encre); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ifd-soon__date b { font-family: var(--ifd-font-display); font-size: 22px; letter-spacing: -0.02em; }
.ifd-soon__date span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ifd-pervenche); margin-top: 4px; }
.ifd-soon__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ifd-soon__body strong { font-family: var(--ifd-font-display); font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ifd-soon__body small { font-size: 13px; color: var(--ifd-texte2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ifd-soon__go { color: var(--ifd-accent); transition: transform .2s; }
.ifd-soon__card:hover .ifd-soon__go { transform: translateX(3px); }

/* ------------------------------ Pastilles de domaines ------------------------------ */
.ifd-rail { position: relative; margin-bottom: 14px; }
.ifd-rail__track { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.ifd-rail__track::-webkit-scrollbar { display: none; }
.ifd-rail.has-next .ifd-rail__track { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.ifd-rail.has-prev .ifd-rail__track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
.ifd-rail.has-prev.has-next .ifd-rail__track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ifd-rail__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ifd-border); background: #fff; color: var(--ifd-encre); font-size: 20px; line-height: 1; box-shadow: 0 8px 20px -10px rgba(11, 11, 26, .35); }
.ifd-rail__nav[hidden] { display: none; }
.ifd-rail__nav--prev { left: -6px; }
.ifd-rail__nav--next { right: -6px; }
.ifd-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--ifd-border); background: #fff; color: var(--ifd-encre); font-family: var(--ifd-font-display); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.ifd-pill span { font-size: 12px; font-weight: 600; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: #F1F0EA; color: var(--ifd-texte2); text-align: center; }
.ifd-pill:hover { border-color: var(--ifd-encre); }
.ifd-pill[aria-pressed="true"] { background: var(--ifd-encre); border-color: var(--ifd-encre); color: #fff; }
.ifd-pill[aria-pressed="true"] span { background: rgba(255, 255, 255, .16); color: #fff; }

/* ------------------------------ Barre d'outils collante ------------------------------ */
.ifd-tools { position: sticky; top: 92px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; margin-bottom: 26px; background: rgba(252, 251, 247, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid transparent; border-radius: 18px; transition: box-shadow .25s, border-color .25s, background .25s; }
.ifd-tools.is-stuck { background: rgba(255, 255, 255, .94); border-color: var(--ifd-border); box-shadow: 0 16px 40px -26px rgba(11, 11, 26, .4); }
.ifd-tools__search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--ifd-border); border-radius: 12px; padding: 0 14px; min-height: 46px; }
.ifd-tools__search .ifd-ico { color: var(--ifd-texte2); }
.ifd-tools__search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 11px 0; color: var(--ifd-encre); }
.ifd-tools__search input:focus { outline: none; }
.ifd-tools__search:focus-within { border-color: var(--ifd-bleu); box-shadow: 0 0 0 3px rgba(26, 26, 230, .12); }
.ifd-tools__select { position: relative; }
.ifd-tools__select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 1.8px solid var(--ifd-texte2); border-bottom: 1.8px solid var(--ifd-texte2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.ifd-tools__select select { appearance: none; -webkit-appearance: none; min-height: 46px; padding: 0 38px 0 14px; border: 1px solid var(--ifd-border); border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ifd-encre); cursor: pointer; }
.ifd-tools__select select:focus { outline: none; border-color: var(--ifd-bleu); box-shadow: 0 0 0 3px rgba(26, 26, 230, .12); }
.ifd-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 14px; border: 1px solid var(--ifd-border); border-radius: 12px; background: #fff; font-size: 14.5px; cursor: pointer; user-select: none; }
.ifd-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ifd-toggle__ui { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #DAD8CE; transition: background .2s; flex: 0 0 auto; }
.ifd-toggle__ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.ifd-toggle input:checked + .ifd-toggle__ui { background: #00794a; }
.ifd-toggle input:checked + .ifd-toggle__ui::after { transform: translateX(14px); }
.ifd-toggle input:focus-visible + .ifd-toggle__ui { outline: 3px solid var(--ifd-accent); outline-offset: 2px; }
.ifd-tools__count { margin-left: auto; font-size: 14.5px; color: var(--ifd-texte2); white-space: nowrap; padding: 0 4px; }
.ifd-tools__count strong { font-family: var(--ifd-font-display); color: var(--ifd-encre); font-size: 16px; }
.ifd-tools .ifd-view { border-radius: 12px; }
.ifd-tools .ifd-view button { padding: 9px 11px; }

/* ------------------------------ Cartes (commun) ------------------------------ */
.ifd-fcs { list-style: none; margin: 0; padding: 0; }
.ifd-fc[hidden] { display: none !important; }
.ifd-fc__link { position: relative; display: flex; color: var(--ifd-encre); background: #fff; border: 1px solid var(--ifd-border); border-radius: 20px; overflow: hidden; transition: transform .3s var(--ifd-ease), box-shadow .3s, border-color .25s; }
.ifd-fc__link:hover { color: var(--ifd-encre); transform: translateY(-4px); border-color: #D9DAF3; box-shadow: 0 30px 60px -38px rgba(11, 11, 26, .5); }
.ifd-fc__media { position: relative; display: block; overflow: hidden; flex: 0 0 auto; }
.ifd-fc__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ifd-ease); }
.ifd-fc__link:hover .ifd-fc__media img { transform: scale(1.05); }
.ifd-fc__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ifd-fc__ph svg { position: absolute; right: 0; bottom: 0; width: 70%; height: auto; fill: none; stroke: currentColor; stroke-width: 1; opacity: .22; }
.ifd-fc__ph b { position: relative; font-family: var(--ifd-font-display); font-weight: 800; letter-spacing: -0.02em; }
.ifd-tone-1 { background: linear-gradient(140deg, #EEEEFD, #DCDDFA); color: var(--ifd-bleu); }
.ifd-tone-2 { background: linear-gradient(140deg, #FDF0EA, #F8DCCF); color: var(--ifd-accent2); }
.ifd-tone-3 { background: linear-gradient(140deg, #F3F3FB, #E3E4F7); color: #3B3E9E; }
.ifd-tone-4 { background: linear-gradient(140deg, #F5F4EE, #E8E6DC); color: var(--ifd-encre); }
.ifd-fc__chips { position: absolute; left: 12px; top: 12px; right: 12px; z-index: 2; display: flex; flex-wrap: nowrap; gap: 6px; }
.ifd-fc__chip { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ifd-encre); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ifd-fc__chip--cpf { background: #00794a; color: #fff; flex: 0 0 auto; }
.ifd-fc__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ifd-fc__cat { display: none; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ifd-accent2); }
.ifd-fc__title { font-size: 18px; font-weight: 600; line-height: 1.28; letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ifd-fc__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ifd-texte2); }
.ifd-fc__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ifd-fc__meta .ifd-ico { color: #9A9CC9; }
.ifd-fc__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ifd-fc__next { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-family: var(--ifd-font-display); font-weight: 600; color: var(--ifd-encre); }
.ifd-fc__next > .ifd-ico { color: var(--ifd-bleu); flex: 0 0 auto; }
.ifd-fc__next > span { display: flex; flex-direction: column; line-height: 1.25; }
.ifd-fc__next small { font-family: var(--ifd-font-body); font-weight: 400; font-size: 12px; color: var(--ifd-texte2); }
.ifd-fc__next.is-soon > .ifd-ico, .ifd-fc__next.is-soon small { color: var(--ifd-accent2); }
.ifd-fc__next.is-open { color: var(--ifd-texte2); }
.ifd-fc__go { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #F3F2FB; color: var(--ifd-encre); transition: background .25s, color .25s, transform .25s; }
.ifd-fc__link:hover .ifd-fc__go { background: var(--ifd-accent); color: #fff; transform: rotate(-45deg); }

/* ------------------------------ Vue grille ------------------------------ */
.ifd-fcs--grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 22px; }
.ifd-fcs--grille .ifd-fc__link { flex-direction: column; height: 100%; }
.ifd-fcs--grille .ifd-fc__media { aspect-ratio: 16 / 10; }
.ifd-fcs--grille .ifd-fc__ph b { font-size: 46px; }
.ifd-fcs--grille .ifd-fc__body { padding: 18px 20px 6px; flex: 1; }
.ifd-fcs--grille .ifd-fc__foot { padding: 14px 16px 16px 20px; margin-top: 8px; border-top: 1px solid #F0EEE6; }

/* ------------------------------ Vue liste ------------------------------ */
.ifd-fcs--liste { display: grid; gap: 10px; }
.ifd-fcs--liste .ifd-fc__link { align-items: center; gap: 20px; padding: 12px 16px 12px 12px; border-radius: 16px; }
.ifd-fcs--liste .ifd-fc__link:hover { transform: none; }
.ifd-fcs--liste .ifd-fc__media { width: 96px; height: 72px; border-radius: 12px; }
.ifd-fcs--liste .ifd-fc__ph b { font-size: 22px; }
.ifd-fcs--liste .ifd-fc__ph svg { width: 100%; }
.ifd-fcs--liste .ifd-fc__chips { display: none; }
.ifd-fcs--liste .ifd-fc__cat { display: block; }
.ifd-fcs--liste .ifd-fc__body { flex: 1; gap: 4px; }
.ifd-fcs--liste .ifd-fc__title { font-size: 16.5px; -webkit-line-clamp: 2; }
.ifd-fcs--liste .ifd-fc__foot { flex: 0 0 auto; gap: 18px; }
.ifd-fcs--liste .ifd-fc__next { min-width: 150px; }

/* ------------------------------ États ------------------------------ */
.ifd-cx__empty { text-align: center; padding: 56px 20px; border: 1px dashed #DAD8CE; border-radius: 20px; color: var(--ifd-texte2); }
.ifd-cx__empty[hidden] { display: none; }
.ifd-cx__empty svg { width: 90px; color: var(--ifd-pervenche); margin: 0 auto 10px; display: block; }
.ifd-cx__empty p { margin-bottom: 18px; font-size: 16px; }
.ifd-cx__more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 36px; }
.ifd-cx__progress { font-size: 13.5px; color: var(--ifd-texte2); }
.ifd-cx__progress:empty { display: none; }

/* ------------------------------ Page de domaine ------------------------------ */
.ifd-fcs--cat { grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1100px) {
  .ifd-soon__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ifd-soon__list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 calc(-1 * var(--ifd-gutter)); padding: 0 var(--ifd-gutter) 4px; scrollbar-width: none; }
  .ifd-soon__list::-webkit-scrollbar { display: none; }
  .ifd-soon__list li { flex: 0 0 82%; scroll-snap-align: start; }
  .ifd-rail { margin: 0 calc(-1 * var(--ifd-gutter)) 12px; }
  .ifd-rail__track { padding: 2px var(--ifd-gutter); }
  .ifd-rail__nav { display: none !important; }
  .ifd-tools { position: static; display: grid; grid-template-columns: 1fr 1fr; padding: 0; gap: 8px; margin-bottom: 18px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: none !important; }
  .ifd-tools__search { grid-column: 1 / -1; }
  .ifd-tools__select select { width: 100%; min-height: 44px; font-size: 14px; }
  .ifd-toggle { min-height: 44px; font-size: 14px; }
  .ifd-tools__count { margin: 0; align-self: center; justify-self: end; }
  .ifd-tools .ifd-view { display: none; }
  .ifd-fcs--liste .ifd-fc__link { flex-wrap: wrap; gap: 12px; }
  .ifd-fcs--liste .ifd-fc__media { width: 64px; height: 64px; }
  .ifd-fcs--liste .ifd-fc__body { flex: 1 1 calc(100% - 90px); }
  .ifd-fcs--liste .ifd-fc__foot { flex: 1 1 100%; justify-content: space-between; padding-top: 10px; border-top: 1px solid #F0EEE6; }
  .ifd-fcs--liste .ifd-fc__next { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .ifd-soon__title::before { animation: none; } }
.ifd-fc__ph b { opacity: .9; }
.ifd-fc__media:not(:has(img)) .ifd-fc__chip { background: #fff; }

/* Entrée permanente en cours : pavé orange « En cours » */
.ifd-soon__date.is-perm { background: var(--ifd-accent2); }
.ifd-soon__date.is-perm b { font-size: 15px; }
.ifd-soon__date.is-perm span { color: #FFE1D5; }
.ifd-date.is-perm .ifd-date__day { background: var(--ifd-accent2); color: #fff; }
.ifd-date.is-perm .ifd-date__day b { font-size: 13px; }
.ifd-date.is-perm .ifd-date__day span { color: #FFE1D5; }
