/* Liste des offres — design 2027 (offres/resultats-offres-2027.phtml).
   Les cartes reprennent .carte-offre de site.css ; ce fichier ne porte que les différences :
   bandeau, colonne de filtres (formulaire #bloc-affiner existant rhabillé), logo et extrait des cartes,
   blocs insérés dans la liste, anciens article.offer renvoyés par « Charger plus d'offres ». */

/* Bandeau */
.bandeau-liste { background: linear-gradient(180deg, var(--brand-tint) 0%, #fff 100%); }
.bandeau-liste .wrap { padding-block: var(--entete-haut) 26px; }
.titre-liste { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-top: 10px; }
.titre-liste h1 { font-size: var(--fs-xl); font-weight: 800; line-height: 1.15; }
.titre-liste h1 span { color: var(--brand); }
.titre-liste .intro { color: var(--ink-soft); margin-top: 6px; font-size: var(--fs-sm); }
.titre-liste .intro strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Deux colonnes */
.disposition-liste { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 32px; padding-block: 28px 56px; align-items: start; }
.tete-panneau { display: none; }

/* Formulaire de filtres existant (partials/form-recherche-offres-results.phtml) : annule la barre horizontale de site.css */
.d27 #bloc-affiner { display: block; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.d27 #bloc-affiner > h2 { font-size: var(--fs-md); font-weight: 800; padding-bottom: 10px; }
.d27 #bloc-affiner .hidden-device { display: block; }
.d27 #bloc-affiner fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0; min-width: 0; }
.d27 #bloc-affiner label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: block; margin: 0 0 8px; font: 700 var(--fs-sm) var(--font-body); color: var(--ink); }
.d27 #bloc-affiner label.no-label { margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-soft); }
.d27 #bloc-affiner input[type=text], .d27 #bloc-affiner select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background-color: var(--mist); padding: 0 12px; font: 500 var(--fs-sm) var(--font-body); color: var(--ink); }
.d27 #bloc-affiner #keywords, .d27 #bloc-affiner #localisation { padding-left: 38px; background-position: 12px center; background-size: 16px; }
.d27 #bloc-affiner input[type=text]:focus, .d27 #bloc-affiner select:focus { outline: 2px solid var(--brand); background-color: #fff; }
.d27 #bloc-affiner select:disabled { opacity: .55; cursor: not-allowed; }
.d27 #bloc-affiner .localisation-options { display: block; }
.d27 #bloc-affiner .suggests-results { margin: 0 0 4px; }
.d27 #bloc-affiner .suggests-results button { max-width: 100%; text-align: left; }
.d27 #bloc-affiner .suggests-results button::after { content: "×"; font-size: 1rem; line-height: 1; margin-left: 2px; }
.d27 #bloc-affiner .check-content > strong { display: block !important; margin-bottom: 8px; font-size: var(--fs-sm); }
.d27 #bloc-affiner .ul-contrats li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.d27 #bloc-affiner input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }
.d27 #bloc-affiner .check-content li label { display: inline; margin: 0; font-weight: 500; cursor: pointer; }
.d27 #bloc-affiner input.submit { width: 100%; min-height: 46px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font: 600 var(--fs-sm) var(--font-body); cursor: pointer; }
.d27 #bloc-affiner input.submit:hover { background: var(--brand-deep); }

/* En-tête des résultats : nombre, alerte, tri */
.tete-resultats { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.tete-resultats .compte { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tete-resultats .compte small { font-weight: 500; color: var(--ink-soft); font-size: var(--fs-sm); }
.outils-liste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.d27 .button-alerte .form-inline { margin: 0; }
.d27 .button-alerte .button-blue, .d27 .button-alerte .button-green { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 600 var(--fs-sm) var(--font-body); cursor: pointer; }
.d27 .button-alerte .button-blue:hover { border-color: var(--brand); color: var(--brand); }
.d27 .button-alerte .button-green, .d27 .button-alerte [disabled] { background: var(--mint-tint); border-color: var(--mint-tint); color: var(--mint-deep); cursor: default; }
.d27 .form-offres-search select { min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 12px; font: 600 var(--fs-sm) var(--font-body); color: var(--ink); cursor: pointer; }

/* Popin d'alerte e-mail (contenu chargé depuis /offres/form-alerte-email) : fenêtre commune, voir site.css */

/* Liste et cartes (différences avec .carte-offre de site.css) */
.liste-offres { display: grid; gap: 12px; }
.carte-offre.carte-liste { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 16px; align-content: start; }
.carte-liste:hover { transform: none; }
.carte-liste > * { grid-column: 2; }
.carte-liste .logo-offre { grid-column: 1; grid-row: 1 / span 4; width: 72px; height: 72px; }
.carte-liste .meta { margin-top: 0; padding-top: 0; border-top: 0; }
/* Date d'actualisation (liste.js l'écrit en relatif) */
.date-offre { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: var(--fs-xs); color: var(--ink-soft); white-space: nowrap; }
.date-offre::before { content: ""; width: 13px; height: 13px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat; }
.date-offre.recente { color: var(--mint-deep); font-weight: 600; }
.d27 #listing-offres .h3-ul li:nth-child(3):has(.date-offre) { margin-left: auto; }
.carte-liste .extrait { font-size: var(--fs-sm); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Offres enrichies (RAZ) : contour et coin « macaron » comme l'ancien design (sans aplat : fond blanc) */
.carte-offre.mise-en-avant, .d27 #listing-offres article.offer.offer-enrich { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; overflow: hidden; }
.carte-offre.mise-en-avant::before, .d27 #listing-offres article.offer.offer-enrich::before { content: ""; position: absolute; top: 0; right: 0; width: 46px; height: 46px; background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 100%); pointer-events: none; }
.carte-offre.mise-en-avant::after, .d27 #listing-offres article.offer.offer-enrich::after { content: ""; position: absolute; top: 5px; right: 5px; width: 17px; height: 17px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 12.9 17 22l-5-3-5 3 1.5-9.1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 12.9 17 22l-5-3-5 3 1.5-9.1'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.carte-offre.mise-en-avant h3, .d27 #listing-offres article.offer.offer-enrich h2 { padding-right: 30px; }

/* Blocs insérés dans la liste */
.alerte-liste { background: var(--brand); color: #fff; border-radius: var(--r-md); padding: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.alerte-liste h3 { font-size: var(--fs-md); font-weight: 800; }
.alerte-liste p { color: var(--brand-pale); font-size: var(--fs-sm); margin-top: 4px; }
.alerte-liste .alerte-ok { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-weight: 700; color: #fff; }
.alerte-liste .btn[disabled] { opacity: .5; cursor: default; }
/* Bandeau des vignettes partenaires (_design2027/liste-vignettes.phtml) : une rangée défilante */
.vignettes-liste { margin-bottom: 18px; }
.vignettes-liste-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.vignettes-liste-tete h3 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.vignettes-liste-tete a { font-size: var(--fs-xs); font-weight: 600; }
.vignettes-liste-rangee { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: thin; }
.vignettes-liste-rangee a { flex: 0 0 132px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); scroll-snap-align: start; transition: border-color .15s, transform .15s; }
.vignettes-liste-rangee a:hover { border-color: var(--brand); transform: translateY(-2px); }
.vignettes-liste-rangee img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) { .vignettes-liste-rangee a { flex-basis: 112px; } }
.ils-recrutent { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 14px; background: var(--mist); }
.ils-recrutent h3 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.ils-recrutent ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ils-recrutent a { display: grid; gap: 4px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; color: var(--ink); font-size: var(--fs-xs); }
.ils-recrutent a:hover { border-color: var(--brand); text-decoration: none; }
.ils-recrutent .vignette { display: grid; place-items: center; height: 56px; overflow: hidden; }
.ils-recrutent .vignette img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.ils-recrutent strong { line-height: 1.3; }
.ils-recrutent small { color: var(--ink-soft); }

/* « Charger plus d'offres » et pagination */
.d27 #listing-offres .text-center { margin-top: 12px; }
.d27 #show-more-jobs { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--brand); color: #fff; font: 600 var(--fs-sm) var(--font-body); text-decoration: none; }
.d27 #show-more-jobs:hover { background: var(--brand-deep); }
.d27 #show-more-jobs.disabled { opacity: .5; pointer-events: none; }
.d27 #spinner-loading, .d27 #spinner { text-align: center; padding: 8px; }

/* Anciennes cartes article.offer (réponse XHR de « Charger plus d'offres ») */
.d27 #listing-offres article.offer { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; }
.d27 #listing-offres article.offer:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.d27 #listing-offres article.offer > a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 16px; padding: 18px; color: var(--ink); text-decoration: none; }
.d27 #listing-offres .offer-description { display: contents; }
.d27 #listing-offres .offer-img { grid-column: 1; grid-row: 1 / span 3; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; padding: 6px; overflow: hidden; }
.d27 #listing-offres .offer-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.d27 #listing-offres article.offer h2 { grid-column: 2; grid-row: 1; font-size: var(--fs-md); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.d27 #listing-offres article.offer:hover h2 { color: var(--brand); }
.d27 #listing-offres .h3-ul { grid-column: 2; display: grid; gap: 6px; }
.d27 #listing-offres .h3-ul h3 { font: 600 var(--fs-sm) var(--font-body); color: var(--ink-soft); letter-spacing: 0; }
.d27 #listing-offres .h3-ul ul { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--fs-xs); color: var(--ink-soft); }
/* Date d'actualisation des offres de « Charger plus » (ancien partiel) : mise en forme par liste.js comme celle des cartes */
.d27 #listing-offres article.offer > a > p { grid-column: 2; font-size: var(--fs-sm); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d27 #listing-offres .picto-favorite, .d27 #listing-offres .picto-apply { display: inline-flex; margin-left: 6px; font: 800 .72rem var(--font-body); padding: 2px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); vertical-align: middle; }
.d27 #listing-offres .picto-apply { background: var(--mint-tint); color: var(--mint-deep); }

/* Aucune offre et « Élargissez votre recherche » (partiel _design2027/liste-elargir.phtml) */
.aucune-offre { text-align: center; padding: 32px 16px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--ink-soft); margin-bottom: 20px; }
.aucune-offre strong { display: block; color: var(--ink); font-size: var(--fs-md); margin-bottom: 4px; }
.colonne-resultats > h2 { font-size: var(--fs-lg); font-weight: 800; margin-bottom: 12px; }
.d27 .elargissez-recherche { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; margin-bottom: 16px; }
.d27 .elargissez-recherche .recherche-plus a { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.d27 .elargissez-recherche .recherche-plus a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.d27 .elargissez-recherche .button-green a, .d27 .elargissez-btn .button-green a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.d27 .elargissez-logo img { max-height: 40px; width: auto; }
.d27 .elargissez-txt { flex: 1 1 200px; font-weight: 600; }

/* Autres recherches */
.autres-recherches h2 { font-size: var(--fs-lg); font-weight: 800; margin-bottom: 18px; }
.grille-autres { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.grille-autres h3 { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; margin-bottom: 10px; letter-spacing: 0; }
.grille-autres .chips a { font-size: var(--fs-xs); padding: 6px 12px; }
.grille-autres .tous { margin-top: 10px; }

/* Barre d'actions collante (mobile) */
.barre-mobile { display: none; }

@media (max-width: 900px) {
  .disposition-liste { grid-template-columns: minmax(0, 1fr); padding-top: 18px; padding-bottom: 96px; }
  .colonne-filtres { position: fixed; inset: 0; z-index: 40; background: #fff; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(16px, env(safe-area-inset-left, 0px)); transform: translateY(100%); visibility: hidden; transition: transform .25s, visibility .25s; }
  .colonne-filtres.ouvert { transform: none; visibility: visible; }
  .tete-panneau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
  .tete-panneau p { font: 800 var(--fs-lg) var(--font-display); }
  .tete-panneau .fermer { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
  html.panneau-ouvert, html.panneau-ouvert body { overflow: hidden; }
  .barre-mobile { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 30; gap: 8px; }
  .barre-mobile .btn { box-shadow: 0 6px 20px rgba(14,34,51,.25); }
  .barre-mobile .btn[disabled] { display: none; }
  .titre-liste [data-modifier-recherche] { display: none; }
}
@media (max-width: 640px) {
  .titre-liste h1 { font-size: var(--fs-lg); }
  .tete-resultats { position: relative; }
  .carte-offre.carte-liste, .d27 #listing-offres article.offer > a { grid-template-columns: 52px minmax(0, 1fr); gap: 6px 12px; padding: 14px; }
  .carte-liste .logo-offre, .d27 #listing-offres .offer-img { width: 52px; height: 52px; padding: 4px; }
  .alerte-liste .btn { width: 100%; }
}

/* Recherche relancée après le retrait d'une pastille de filtre (liste.js) : la liste se grise le temps du rechargement */
#bloc-affiner.filtres-envoi { pointer-events: none; opacity: .6; }

/* Vignettes vendues (jusqu'à 12) : sur ordinateur, toutes visibles, à 1/7 de la largeur ; une rangée jusqu'à 7,
   sinon deux rangées équilibrées (nombre de colonnes calculé par la vue : --vignettes-colonnes) ;
   sur téléphone, la rangée défilante reste */
@media (min-width: 641px) {
  .vignettes-liste-rangee { display: grid; grid-template-columns: repeat(var(--vignettes-colonnes, 7), calc((100% - 60px) / 7)); overflow-x: visible; }
  .vignettes-liste-rangee a { flex: none; }
}
