/* Espace candidat — compléments au design de www (style.css, copié du thème).
   Mêmes jetons (couleurs, rayons, ombres, courbes), mêmes principes : rien ne
   bouge sans raison, « réduire les animations » est respecté. */

/* ---------- En-tête : l'espace est la page en cours ---------- */
.header-ctas .btn-ghost[aria-current="page"] { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Haut de page ---------- */
.espace-compteur {
  position: absolute; left: -12%; bottom: 10%; z-index: 2;
  display: grid; gap: 4px; min-width: 214px; padding: 16px 20px 18px;
  border-radius: var(--radius-m); background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-m), 0 0 0 1px var(--line);
}
.espace-compteur strong { font-size: 30px; font-weight: 650; letter-spacing: -.035em; line-height: 1.05; }
.espace-compteur > span:last-child { font-size: 13.5px; color: var(--ink-soft); }
.js .espace-compteur { opacity: 0; }

.espace-annonce {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 14px 18px;
  border-radius: var(--radius-s); background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: 15px;
}
.espace-annonce a { color: var(--teal-ink); }
.espace-annonce-point { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2BA36B; animation: ping-green 2.2s var(--ease-out) infinite; }
.espace-annonce--alerte .espace-annonce-point { background: var(--coral); animation-name: ping; }

/* ---------- Liste des offres ---------- */
.offres-section { padding-block: clamp(28px, 4vw, 52px) clamp(80px, 10vw, 130px); scroll-margin-top: calc(var(--header-h) + 12px); }
.offres-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: clamp(28px, 4vw, 44px); }
.offres-head .kicker { margin-bottom: 14px; }
.offres-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.offres-recherche { position: relative; display: flex; align-items: center; }
.offres-recherche svg { position: absolute; left: 16px; width: 18px; height: 18px; fill: none; stroke: var(--ink-soft); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.offres-recherche input {
  width: min(320px, 100%); height: 48px; padding: 0 18px 0 44px; border: 0; border-radius: var(--pill);
  background: var(--white); box-shadow: 0 0 0 1px var(--line-strong); font: inherit; font-size: 15px; color: var(--ink);
  transition: box-shadow .3s var(--ease-out);
}
.offres-recherche input::placeholder { color: var(--ink-soft); opacity: .8; }
.offres-recherche input:focus { outline: none; box-shadow: 0 0 0 2px var(--teal-ink); }
.filtres { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--paper-2); }
.filtres button {
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding: 9px 14px; border-radius: var(--pill); cursor: pointer; transition: background-color .3s, color .3s, box-shadow .3s;
}
.filtres button span { margin-left: 6px; font-weight: 500; opacity: .7; }
.filtres button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-s); }

.offres { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.offre[hidden] { display: none !important; }
.offre-lien {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "haut action" "titre action" "meta action" "extrait action";
  column-gap: 32px; row-gap: 8px; padding: 24px 28px 26px;
  border-radius: var(--radius-m); background: var(--white); box-shadow: 0 0 0 1px var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}
.offre-lien::before { /* filet corail qui se déploie au survol */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--coral);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease-out);
}
.offre-lien:hover, .offre-lien:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-m), 0 0 0 1px var(--line); }
.offre-lien:hover::before, .offre-lien:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.offre-haut { grid-area: haut; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--ink-soft); }
.offre-titre { grid-area: titre; font-size: clamp(19px, 1.55vw, 23px); font-weight: 650; letter-spacing: -.022em; line-height: 1.22; text-wrap: balance; }
.offre-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 14.5px; color: var(--ink-soft); }
.offre-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 12px 2px; border-radius: 50%; background: var(--line-strong); vertical-align: middle; }
.offre-extrait {
  grid-area: extrait; margin-top: 4px; max-width: 62em; font-size: 15px; line-height: 1.55; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.offre-action {
  grid-area: action; align-self: center; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink); transition: background-color .4s, color .4s, transform .55s var(--ease-out);
}
.offre-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.offre-lien:hover .offre-action, .offre-lien:focus-visible .offre-action { background: var(--ink); color: var(--white); transform: translateX(4px); }

/* Badge « Avant-première » */
.offre-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: var(--pill);
  background: var(--sand-soft); color: var(--coral-deep); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
}
.offre-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: ping 2s var(--ease-out) infinite; }

/* « Pour vous » : l'offre correspond aux critères déclarés (classement rendu par Diane) */
.offre-pour-vous {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: var(--pill);
  background: rgba(38, 140, 150, .12); color: var(--teal-ink); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
}
.offre-pour-vous::before { content: ""; width: 7px; height: 4px; margin-top: -2px; border: solid currentColor; border-width: 0 0 1.8px 1.8px; transform: rotate(-45deg); }
.offre-communs { grid-area: communs; font-size: 14px; font-weight: 550; color: var(--teal-ink); }
.is-pour-vous .offre-lien { grid-template-areas: "haut action" "titre action" "communs action" "meta action" "extrait action"; }
.offres-pour-vous { margin-top: 12px; font-size: 15.5px; color: var(--ink-soft); }

/* Offre verrouillée (avant-première, visiteur non inscrit) */
.is-verrou .offre-lien { background: linear-gradient(180deg, var(--white) 40%, #FFF7EF); }
.offre-voile { grid-area: extrait; display: grid; gap: 10px; margin-top: 4px; }
.offre-voile-lignes { display: grid; gap: 8px; }
.offre-voile-lignes i {
  display: block; height: 10px; border-radius: var(--pill);
  background: linear-gradient(90deg, var(--paper-2) 0%, #EADFD0 50%, var(--paper-2) 100%); background-size: 200% 100%;
  animation: voile 2.6s linear infinite;
}
.offre-voile-lignes i:first-child { width: 88%; }
.offre-voile-lignes i:last-child { width: 62%; }
.offre-voile-texte { font-size: 14px; font-weight: 600; color: var(--coral-deep); }
@keyframes voile { from { background-position: 200% 0; } to { background-position: 0 0; } }
.is-verrou .offre-action { background: var(--coral); color: var(--ink); }
.is-verrou .offre-lien:hover .offre-action { background: var(--ink); color: var(--white); transform: none; }
.offre-action .lock-shackle { transform-box: view-box; transform-origin: 16px 11px; transition: transform .55s var(--ease-out); }
.offre-lien:hover .lock-shackle, .offre-lien:focus-visible .lock-shackle { transform: translateY(-3px) rotate(18deg); }

/* Grille (« D'autres offres ») */
.offres--grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offres--grille .offre-lien { height: 100%; grid-template-columns: minmax(0, 1fr); grid-template-areas: "haut" "titre" "meta" "extrait" "action"; align-content: start; }
.offres--grille .is-pour-vous .offre-lien { grid-template-areas: "haut" "titre" "communs" "meta" "extrait" "action"; }
.offres--grille .offre-action { justify-self: start; align-self: end; margin-top: 12px; width: 44px; height: 44px; }

.offres-vide { padding: 28px; border-radius: var(--radius-m); background: var(--paper-2); color: var(--ink-soft); text-align: center; }
.offres-vide a { color: var(--teal-ink); }
.offres-vide button.link-arrow { margin-left: 6px; }
.offres > .offres-vide { margin-top: 14px; }

/* ---------- Vision du cabinet ---------- */
.espace-vision-texte { margin-top: 30px; display: grid; gap: 14px; max-width: 40em; font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Fin de page ---------- */
.espace-deja { margin: 48px auto 0; max-width: 640px; padding: 24px 28px; border-radius: var(--radius-m); background: var(--white); box-shadow: 0 0 0 1px var(--line); text-align: left; scroll-margin-top: calc(var(--header-h) + 24px); }
.espace-deja h3 { margin: 0 0 8px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.espace-deja p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.espace-deja a { color: var(--teal-ink); }
.espace-fin { padding-block: 36px 72px; }
.espace-fin-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 15px; color: var(--ink-soft); }
.espace-fin a { color: var(--teal-ink); }

/* ---------- Page d'une offre ---------- */
.offre-hero .page-title { font-size: clamp(2.2rem, 4.1vw, 3.9rem); max-width: 15em; text-wrap: balance; }
.offre-hero .page-hero-grid { min-height: min(58svh, 540px); }
.offre-hero .page-hero-visual { width: min(100%, 340px); }
.offre-hero .page-kicker .offre-badge { font-size: 12px; }
.offre-puces { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.offre-puces li { padding: 7px 14px; border-radius: var(--pill); background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: 14.5px; color: var(--ink); }
.offre-puces + .page-lead { margin-top: 18px; }

.offre-corps { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(36px, 6vw, 90px); align-items: start; padding-block: clamp(16px, 3vw, 36px) clamp(70px, 9vw, 120px); }
.offre-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.offre-fiche { display: grid; gap: 18px; padding: 26px; border-radius: var(--radius-l); background: var(--white); box-shadow: var(--shadow-s), 0 0 0 1px var(--line); }
.offre-fiche-titre { font-size: 12.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); }
.offre-fiche dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; font-size: 14.5px; }
.offre-fiche dt { color: var(--ink-soft); }
.offre-fiche dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.offre-fiche .btn { width: 100%; justify-content: center; }
.offre-fiche-note { font-size: 13.5px; color: var(--ink-soft); text-align: center; }

/* Texte de l'annonce, rédigé dans Diane : intertitres en paragraphes « tout gras », sauts de ligne superflus */
.offre-description { max-width: 46em; font-size: 17px; line-height: 1.7; color: var(--ink); }
.offre-description > br { display: none; }
.offre-description p { margin: 0; }
.offre-description p + p, .offre-description ul + p, .offre-description ol + p { margin-top: 14px; }
.offre-description p > strong:only-child { display: block; margin-top: 22px; font-size: clamp(20px, 1.7vw, 23px); font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.offre-description > p:first-child > strong:only-child { margin-top: 0; }
.offre-description h2, .offre-description h3, .offre-description h4 { margin: 34px 0 12px; font-size: clamp(20px, 1.7vw, 23px); font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.offre-description ul, .offre-description ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.offre-description li { position: relative; padding-left: 26px; }
.offre-description ul > li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.offre-description ol { counter-reset: point; }
.offre-description ol > li { counter-increment: point; }
.offre-description ol > li::before { content: counter(point) "."; position: absolute; left: 0; font-weight: 650; color: var(--teal-ink); }
.offre-description a { color: var(--teal-ink); }

/* Annonce verrouillée */
.offre-verrou { position: relative; padding: 40px 0 28px; }
.offre-verrou-lignes { position: absolute; inset: 0; overflow: hidden; display: grid; align-content: start; gap: 14px; padding-top: 6px; filter: blur(2.5px); opacity: .75; }
.offre-verrou-lignes i { display: block; height: 14px; border-radius: var(--pill); background: var(--paper-2); }
.offre-verrou-carte {
  position: relative; margin-inline: auto; max-width: 520px;
  display: grid; justify-items: center; gap: 14px; padding: 34px 30px; text-align: center;
  border-radius: var(--radius-l); background: rgba(255, 255, 255, .93); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-l), 0 0 0 1px var(--line);
}
.offre-verrou-carte h2 { font-size: 24px; font-weight: 650; letter-spacing: -.022em; line-height: 1.2; }
.offre-verrou-carte p { color: var(--ink-soft); }
.lock--grand { width: 46px; height: 46px; fill: none; stroke: var(--coral); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.lock--grand .lock-shackle { transform-box: view-box; transform-origin: 16px 11px; animation: cadenas 3.8s var(--ease-out) infinite; }
@keyframes cadenas { 0%, 52%, 100% { transform: none; } 66%, 84% { transform: translateY(-3px) rotate(18deg); } }

.offre-engagement { padding-block: clamp(60px, 8vw, 100px); background: var(--paper-2); }
.offre-engagement-inner { max-width: 760px; text-align: center; }
.offre-engagement-phrase { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.2; letter-spacing: -.025em; font-weight: 620; }
.offre-engagement-phrase em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--teal-ink); letter-spacing: -.01em; }
.offre-engagement p + p { margin-top: 16px; font-size: 15px; color: var(--ink-soft); }
.offre-autres { padding-block: clamp(70px, 9vw, 120px); }
.offre-autres-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 30px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 1023px) {
  .espace-compteur { left: 50%; bottom: -26px; transform: translateX(-50%); min-width: 0; width: max-content; max-width: calc(100vw - 48px); }
  .offre-corps { grid-template-columns: minmax(0, 1fr); }
  .offre-aside { position: static; }
  .offres--grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .offres-outils, .offres-recherche, .offres-recherche input { width: 100%; }
  .filtres { width: 100%; }
  .filtres button { flex: 1; }
  .offre-lien { grid-template-columns: minmax(0, 1fr); grid-template-areas: "haut" "titre" "meta" "extrait"; padding: 20px 20px 22px; }
  .is-pour-vous .offre-lien { grid-template-areas: "haut" "titre" "communs" "meta" "extrait"; }
  .offre-action { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; }
  .offre-haut { padding-right: 46px; min-height: 26px; }
  .offres--grille .offre-action { position: static; }
  .offre-verrou-carte { padding: 28px 22px; }
  .offre-description { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .offre-lien, .offre-lien::before, .offre-action, .offre-action .lock-shackle { transition: none; }
  .lock--grand .lock-shackle, .offre-voile-lignes i, .offre-badge::before, .espace-annonce-point { animation: none; }
  .js .espace-compteur { opacity: 1; }
}
