/* Carrière 221 · listing, offer and tools pages. */
.page { padding-top: var(--bar-h); background: var(--bg-soft); min-height: 100vh; }

/* ---------- Page head (navy band) ---------- */
.phead { background: var(--navy); color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 5.5rem); }
.phead h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.4rem); color: #fff; }
.phead p { margin: 12px 0 0; color: #D4DEEA; max-width: 46rem; font-size: 1.08rem; }
.phead__count { color: var(--green-bright); }

/* ---------- Listing ---------- */
.lbody { margin-top: -2.75rem; padding-bottom: var(--sc-9); }
.lsearch { display: flex; gap: 8px; padding: 8px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lift); }
.lsearch input { flex: 1; min-width: 0; height: 52px; border: 0; padding: 0 12px; font-size: 1.02rem; background: transparent; color: #0B1220; }
.lsearch input:focus { outline: none; }
.lsearch:focus-within { box-shadow: 0 0 0 3px rgba(0, 128, 74, 0.35), var(--shadow-lift); }
.lsearch .icon { align-self: center; margin-left: 10px; color: #4F5B6B; width: 20px; height: 20px; }
.lsearch .btn--filters { display: none; }

.lgrid { display: grid; grid-template-columns: 17.5rem 1fr; gap: var(--sc-6); align-items: start; margin-top: var(--sc-6); }
.filters { position: sticky; top: calc(var(--bar-h) + var(--sc-5)); display: grid; gap: var(--sc-5); padding: var(--sc-5); background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.filters h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.filters .field label, .filters legend { font-size: 0.9rem; font-weight: 700; color: #0B1220; margin-bottom: 4px; padding: 0; }
.filters select { min-height: 46px; padding: 0 12px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line-strong); font-size: 0.88rem; font-weight: 700; color: #0B1220; transition: background-color 140ms var(--sc-ease-out), color 140ms var(--sc-ease-out), border-color 140ms var(--sc-ease-out); }
.chips input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips input:focus-visible + span { outline: 3px solid #00804A; outline-offset: 2px; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 0.95rem; font-weight: 600; color: #0B1220; }
.toggle input { width: 20px; height: 20px; margin: 0; accent-color: #00804A; flex: none; }
.filters__close { display: none; }

.lbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--sc-4); }
.lbar__count { font-weight: 800; font-size: 1.05rem; }
.lsort { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 600; color: #3D4A5C; }
.lsort select { min-height: 42px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff; padding: 0 12px; font-weight: 600; color: #0B1220; }
.lmore { margin-top: var(--sc-6); display: flex; justify-content: center; }
.lempty { padding: var(--sc-7); text-align: center; background: #fff; border-radius: var(--r); border: 1px dashed var(--line-strong); color: #3D4A5C; }
.lpromo { margin-top: var(--sc-6); padding: var(--sc-6); border-radius: 18px; background: var(--navy); color: #fff; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sc-4); --sc-accent: var(--green-bright); --sc-accent-ink: #062014; }
.lpromo h2 { font-size: 1.35rem; color: #fff; }
.lpromo p { margin: 6px 0 0; max-width: 46ch; color: #C3CEDC; }

@media (max-width: 980px) {
  .lgrid { grid-template-columns: 1fr; }
  .lsearch .btn--filters { display: inline-flex; }
  .filters {
    position: fixed; inset: auto 0 0 0; z-index: 80; max-height: 85vh; overflow: auto; border-radius: 20px 20px 0 0;
    padding: var(--sc-6) var(--sc-gutter) calc(var(--sc-6) + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lift); transform: translateY(105%); visibility: hidden; transition: transform 280ms var(--sc-ease-drawer), visibility 0s 280ms;
  }
  .filters.is-open { transform: none; visibility: visible; transition: transform 280ms var(--sc-ease-drawer); }
  .filters__close { display: inline-flex; }
  .scrim-drawer { position: fixed; inset: 0; z-index: 79; background: rgba(7, 26, 48, 0.5); }
}
@media (prefers-reduced-motion: reduce) { .filters { transition: none !important; } }

/* ---------- Offer page ---------- */
.offer-head { background: var(--navy); color: #fff; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(4.5rem, 9vw, 6rem); }
.offer-head__back { display: inline-flex; align-items: center; gap: 8px; color: #C3CEDC; text-decoration: none; font-weight: 600; font-size: 0.95rem; margin-bottom: var(--sc-5); }
.offer-head__back .icon { transform: rotate(180deg); }
.offer-head__back:hover { color: #fff; }
.offer-head__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sc-4); }
.offer-head h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3rem); color: #fff; max-width: 52rem; }
.offer-head__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: var(--sc-5); color: #D4DEEA; font-weight: 600; }
.offer-head__meta span { display: inline-flex; align-items: center; gap: 8px; }
.offer-head__meta .icon { color: var(--green-bright); }

.offer { display: grid; grid-template-columns: 1fr 22rem; gap: var(--sc-6); align-items: start; margin-top: -3rem; padding-bottom: var(--sc-9); }
.offer__main { background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); padding: clamp(1.25rem, 4vw, 3rem); min-width: 0; }
.offer__facts { margin: 0 0 var(--sc-6); display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 12px; }
.offer__facts div { padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); }
.offer__facts dt { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #4F5B6B; }
.offer__facts dd { margin: 4px 0 0; font-weight: 700; color: #0B1220; }
.offer__body { font-size: 1.04rem; line-height: 1.75; color: #1E2A3A; overflow-wrap: anywhere; }
.offer__body > :first-child { margin-top: 0; }
.offer__body p { margin: 0 0 1em; }
.offer__body h3, .offer__body h4 { font-size: 1.18rem; margin: 1.6em 0 0.6em; color: #0B1220; letter-spacing: -0.015em; }
.offer__body h4 { font-size: 1.05rem; }
.offer__body ul, .offer__body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.offer__body li { margin: 0.3em 0; }
.offer__body li::marker { color: #00804A; }
.offer__body strong, .offer__body b { color: #0B1220; }
.offer__body a { color: #00663B; font-weight: 600; }
.offer__source { margin-top: var(--sc-6); padding-top: var(--sc-5); border-top: 1px solid var(--line); font-size: 0.92rem; color: #4F5B6B; }
.offer__source a { color: #0B1220; font-weight: 700; }

.offer__side { position: sticky; top: calc(var(--bar-h) + var(--sc-5)); display: grid; gap: 16px; }
.panel { background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); padding: var(--sc-5); display: grid; gap: 12px; }
.panel h2 { font-size: 1.15rem; }
.panel p { margin: 0; color: #3D4A5C; font-size: 0.95rem; }
.panel .btn { width: 100%; white-space: normal; text-align: center; }
.panel--ia { background: var(--navy); color: #fff; --sc-accent: var(--green-bright); --sc-accent-ink: #062014; }
.panel--ia h2 { color: #fff; display: flex; align-items: center; gap: 8px; }
.panel--ia h2 .icon { color: var(--green-bright); }
.panel--ia p { color: #C3CEDC; }
.panel--ia .btn--line { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.panel--warn { background: #FFF4E0; box-shadow: none; }
.panel--warn p { color: #3B2604; }
@media (max-width: 980px) {
  .offer { grid-template-columns: 1fr; }
  .offer__side { position: static; }
}

/* ---------- Tools page (CV + letter) ---------- */
.tabs-ia { display: inline-flex; gap: 6px; padding: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 14px; margin-top: var(--sc-5); }
.tabs-ia a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.tabs-ia a[aria-selected="true"] { background: #fff; color: var(--navy); }
.tool { margin-top: -2.75rem; padding-bottom: var(--sc-9); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sc-6); align-items: start; }
.tool[hidden] { display: none; }
.tool__form { background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: var(--sc-5); }
.tool__form h2 { font-size: 1.35rem; }
.tool__form .lede { margin: 0; color: #3D4A5C; }
.tool__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-4); }
.tool__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: var(--sc-4); border-top: 1px solid var(--line); }
.tool__status { margin: 0; font-size: 0.95rem; font-weight: 600; color: #3D4A5C; }
.tool__status.is-err { color: #B42318; }
.tool__note { margin: 0; font-size: 0.86rem; color: #4F5B6B; }
.picked { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg-soft); }
.picked strong { display: block; }
.picked span { color: #4F5B6B; font-size: 0.9rem; }

.result { position: sticky; top: calc(var(--bar-h) + var(--sc-5)); display: grid; gap: 12px; }
.result__bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.result__empty { background: #fff; border: 2px dashed var(--line-strong); border-radius: 20px; padding: var(--sc-7); text-align: center; color: #4F5B6B; display: grid; gap: 10px; justify-items: center; }
.result__empty .icon { width: 40px; height: 40px; color: #00804A; }

/* The CV sheet: A4 proportions on screen, exact A4 in print. */
.cv { background: #fff; border-radius: 6px; box-shadow: var(--shadow-lift); aspect-ratio: 210 / 297; overflow: auto; display: grid; grid-template-columns: 34% 1fr; font-size: 0.78rem; line-height: 1.5; color: #1E2A3A; }
.cv__side { background: var(--navy); color: #E6ECF3; padding: 9% 8%; display: grid; align-content: start; gap: 18px; }
.cv__name { font-size: 1.55rem; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -0.02em; }
.cv__role { color: var(--green-bright); font-weight: 700; font-size: 0.92rem; }
.cv__side h3 { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.25); padding-bottom: 4px; margin-bottom: 6px; }
.cv__side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cv__main { padding: 8% 7%; display: grid; align-content: start; gap: 16px; }
.cv__main h3 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); border-bottom: 2px solid #00804A; padding-bottom: 4px; margin-bottom: 4px; }
.cv__main p { margin: 0; }
.cv__item { display: grid; gap: 2px; margin-bottom: 8px; }
.cv__item b { color: #0B1220; font-size: 0.86rem; }
.cv__item span { color: #4F5B6B; }
.cv__item ul { margin: 4px 0 0; padding-left: 1.1em; }

.cv, .letter { scroll-margin-top: calc(var(--bar-h) + 16px); }
.letter { background: #fff; border-radius: 6px; box-shadow: var(--shadow-lift); padding: clamp(1.5rem, 5vw, 3.5rem); font-size: 0.98rem; line-height: 1.7; color: #1E2A3A; white-space: pre-wrap; min-height: 30rem; }
.letter[contenteditable="true"]:focus { outline: 3px solid rgba(0, 128, 74, 0.35); }

@media (max-width: 980px) {
  .tool { grid-template-columns: 1fr; }
  .tool__row { grid-template-columns: 1fr; }
  .result { position: static; }
  .cv { aspect-ratio: auto; grid-template-columns: 1fr; }
}

@media print {
  .bar, .phead, .foot-wrap, .tool__form, .result__bar, .tabs-ia, .skip { display: none !important; }
  .page { padding: 0; background: #fff; }
  .tool { margin: 0; display: block; }
  .result { position: static; }
  .cv, .letter { box-shadow: none; border-radius: 0; }
  .cv { width: 210mm; height: 297mm; aspect-ratio: auto; overflow: hidden; font-size: 9.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 0; }
  body.print-letter .letter { padding: 20mm; }
  body.print-letter @page { margin: 0; }
}

/* Advice under the generated CV: shown on screen, never printed. */
.tips { background: #FFF4E0; border-radius: 16px; padding: var(--sc-5); color: #3B2604; }
.tips h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; color: #3B2604; margin-bottom: 8px; }
.tips h3 .icon { color: #9A5B00; }
.tips ul { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 6px; }
.tips p { margin: 0; font-size: 0.9rem; color: #6B4A12; }
@media print { .tips { display: none !important; } }

.price-hint { font-size: 0.88rem; font-weight: 700; color: #00663B; }

/* The address an application goes to, shown so people can trust or copy it. */
.apply-to { font-size: 0.88rem !important; font-weight: 700; color: #0B1220 !important; overflow-wrap: anywhere; text-align: center; }

/* Other offers at the end of an offer page. */
.similar { margin-top: var(--sc-6); padding-top: var(--sc-5); border-top: 1px solid var(--line); }
.similar h2 { font-size: 1.15rem; margin: 0 0 12px; }
.similar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.similar li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #F4F6F9; }
.similar a { color: #0B1220; font-weight: 700; text-decoration: none; }
.similar a:hover { text-decoration: underline; }
.similar span { color: #4F5B6B; font-size: 0.9rem; }

/* Pages thématiques */
.crumbs { font-size: 0.88rem; margin-bottom: 10px; opacity: .85; }
.crumbs a { color: inherit; }
.tbody { padding-top: var(--sc-6); padding-bottom: var(--sc-8); display: grid; gap: var(--sc-5); }
.tupdated { margin: 0; font-size: 0.88rem; color: var(--ink-soft, #5B6577); }
.tall { margin: 0; }
.tthemes h2 { font-size: 1.15rem; margin-bottom: 12px; }
.tthemes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tthemes a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #E2E7EF; text-decoration: none; color: inherit; font-size: 0.92rem; }
.tthemes a:hover { border-color: currentColor; }

/* Fiche rédigée par Carrière 221 : extrait cité de l'annonce */
.offer__quote { margin: 0 0 0.6em; padding: 0.9em 1.1em; border-left: 3px solid #00804A; background: #F3F8F5; border-radius: 0 10px 10px 0; color: #34404F; font-style: italic; }
.offer__quote p { margin: 0; }
