/* Offres, offre, candidature spontanée, merci, erreur, formulaire : le texte du site de base, l'habillage de B. */

/* ---------- En-tête de page (et de fiche métier) : le galet menthe du site, décoratif, à droite ---------- */

.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: var(--s-8) 0 var(--s-6); }
.page-hero::after, .metier-hero::after {
  content: ""; position: absolute; z-index: -1; right: -4.5rem; top: 50%;
  width: 12rem; height: 10rem; margin-top: -5rem;
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%; background: var(--menthe-claire);
}
@media (min-width: 768px) { .page-hero::after, .metier-hero::after { right: -5rem; width: 20rem; height: 16rem; margin-top: -8rem; } }
.page-hero .eyebrow { margin-bottom: var(--s-3); padding: 0 1rem; border-radius: var(--rayon-bouton); background: var(--menthe); color: var(--bleu); }
.page-hero h1 { max-width: 30ch; margin-bottom: var(--s-3); font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.5rem); }
.page-hero .hero-lead { margin-top: var(--s-3); }

/* ---------- Liste des offres ---------- */

.offers-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin-top: var(--s-6); }
.offer-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5);
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5);
  border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--ombre);
}
.offer-title { margin: 0; font: var(--poids-titre) 1.25rem / 1.3 var(--font-titre); overflow-wrap: anywhere; }
.offer-title a { display: inline-flex; align-items: center; min-height: var(--cible); color: var(--bleu); text-decoration-color: var(--menthe-fonce); }
.offer-title strong { font-weight: inherit; }
.offer-badge { margin-left: var(--s-3); }
.offer-meta { margin: var(--s-1) 0 0; color: var(--bleu-doux); font-size: var(--t-petit); }
.offer-salary { margin: var(--s-1) 0 0; font-weight: 700; }
/* La ville décide d'une candidature : elle se lit avant tout le reste. */
.offer-city { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-1) 0 0; font-size: var(--t-confort); font-weight: 700; }
.offer-city::before {
  content: ""; flex: none; width: 1.1em; height: 1.1em;
  background: var(--menthe-fonce);
  -webkit-mask: var(--pin) center / contain no-repeat; mask: var(--pin) center / contain no-repeat;
  --pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}
.offer-city--hero { margin: 0 0 var(--s-2); font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.offers-empty, .offers-other, .offers-more { margin-top: var(--s-6); max-width: var(--mesure); }
.offers-empty { padding: var(--s-5); border-radius: var(--rayon); background: var(--gris); }
.offers-other { color: var(--bleu-doux); }
.offers-more { margin-top: var(--s-5); max-width: none; }
.offer-card[hidden], .offers-empty[hidden], .spontaneous-card[hidden] { display: none; }

/* Filtres : champs ronds, étiquettes lisibles */
.offers-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4); margin-bottom: var(--s-5); }
.offers-filters label { display: flex; flex-direction: column; gap: var(--s-1); max-width: 100%; font-weight: 700; }
.offers-filters select { min-width: min(12rem, 100%); max-width: 100%; }

/* Candidature spontanée : un encart gris */
.spontaneous-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5);
  margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--rayon); background: var(--gris);
}
.spontaneous-card h2 { margin: 0 0 var(--s-2); font-size: 1.375rem; }
.spontaneous-card p { margin: 0; max-width: 34rem; color: var(--bleu-doux); }

/* ---------- Étiquettes ---------- */

.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.tag { display: inline-flex; align-items: center; padding: 0 0.8rem; border-radius: var(--rayon-bouton); background: var(--blanc); box-shadow: inset 0 0 0 1px var(--trait); font: 600 var(--t-petit) / 1.8 var(--font-texte); }
.tag--salary { background: var(--menthe-claire); }
.tag--remote { background: var(--blanc); }

/* ---------- Une offre ---------- */

.offer-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
@media (min-width: 960px) {
  .offer-layout { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; gap: var(--s-7); }
  .offer-aside { position: sticky; top: calc(var(--haut-entete) + var(--s-5)); }
}
.offer-lead { max-width: var(--mesure); margin-bottom: var(--s-5); font-size: var(--t-confort); line-height: 1.45; color: var(--bleu-doux); }
.offer-lead p { margin: 0 0 var(--s-3); }
.offer-lead strong { font-weight: inherit; }
.offer-blocks { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr)); }
.offer-block { padding: var(--s-5); border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--ombre); }
.offer-block h2, .offer-block h3 { margin: 0 0 var(--s-3); font-size: 1.375rem; }
.offer-block h4 { margin: var(--s-4) 0 var(--s-2); color: var(--menthe-fonce); }
.offer-block p { margin: 0 0 var(--s-3); }
.offer-block ul, .offer-block ol { margin: 0 0 var(--s-3); padding-left: 1.25rem; }
.offer-block li { margin-bottom: var(--s-2); }
.offer-block--missions, .offer-block--formation, .offer-block--process { grid-column: 1 / -1; }
.offer-note { grid-column: 1 / -1; margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--rayon); background: var(--menthe-claire); font-weight: 600; }
.offer-description h2, .offer-description h3, .offer-description h4 { margin-top: var(--s-5); }
.offer-description ul, .offer-description ol { padding-left: 1.25rem; }
.offer-aside { display: grid; gap: var(--s-4); }
.offer-salary-card { padding: var(--s-5); border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--ombre); }
.offer-salary-card .eyebrow { margin-bottom: var(--s-2); }
.offer-salary-figure { margin: 0 0 var(--s-2); font: var(--poids-titre) 1.375rem / 1.35 var(--font-titre); }
.offer-apply { width: 100%; }
/* Phones: the button follows the reader down the offer. On wide screens the aside is sticky. */
.sticky-apply {
  position: fixed; inset: auto 0 0; z-index: 15;
  padding: var(--s-3) var(--marge) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  background: var(--blanc); box-shadow: 0 -1px 0 var(--trait), var(--ombre-entete);
}
.sticky-apply[hidden] { display: none; }
.sticky-apply .btn { width: 100%; }
@media (min-width: 960px) { .sticky-apply { display: none; } }
.offer-teaser {
  display: grid; gap: var(--s-1); padding: var(--s-4) var(--s-5);
  border-radius: var(--rayon); background: var(--gris); color: var(--bleu); text-decoration: none;
  transition: box-shadow 0.2s;
}
.offer-teaser:hover { box-shadow: inset 0 0 0 2px var(--menthe); }
.offer-teaser span { color: var(--bleu-doux); font-size: var(--t-petit); }

/* ---------- Formulaire : champs ronds, étiquettes lisibles, erreurs dites avec calme ---------- */

.application h2 { margin-bottom: var(--s-3); }
.application-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); max-width: 40rem; margin-top: var(--s-5); }
.application-form > * { grid-column: 1 / -1; margin: 0; }
@media (min-width: 640px) {
  .application-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4); }
  .application-form > .half { grid-column: auto; }
}
.form-question { display: flex; flex-direction: column; gap: var(--s-1); }
.form-label { font-weight: 700; }
.required { color: var(--erreur); }
.optional { font-weight: 400; color: var(--bleu-doux); font-size: var(--t-petit); }
.field-hint, .form-description { margin: 0; color: var(--bleu-doux); font-size: var(--t-petit); }
.field-or { margin: 0; color: var(--bleu-doux); font-size: var(--t-petit); }
.field-error { margin: 0; color: var(--erreur); font-weight: 700; }

.application-form input[type="text"], .application-form input[type="email"], .application-form input[type="tel"], .application-form input[type="url"],
.application-form select, .application-form textarea, .offers-filters select {
  display: block; width: 100%; min-height: 3rem; padding: 0.6rem 1rem;
  border: 1.5px solid var(--bord-champ); border-radius: var(--rayon-champ);
  background: var(--blanc); color: var(--bleu);
  font: 400 1.0625rem / 1.5 var(--font-texte);
}
.offers-filters select { width: auto; }
.application-form textarea { min-height: 8rem; resize: vertical; }
.application-form input[type="file"] {
  display: block; width: 100%; padding: 0.55rem 0.75rem;
  border: 1.5px dashed var(--bord-champ); border-radius: var(--rayon-champ);
  background: var(--blanc); color: var(--bleu); font: 400 1.0625rem / 1.5 var(--font-texte);
}
.application-form input[type="file"]::file-selector-button {
  margin-right: var(--s-3); padding: 0.4rem 1.1rem; border: 0; border-radius: var(--rayon-bouton);
  background: var(--corail-fort); color: var(--blanc); font: 700 1rem / 1.3 var(--font-texte); cursor: pointer;
}
input::placeholder { color: var(--bleu-doux); }
.has-error input, .has-error select, .has-error textarea, [aria-invalid="true"] { border-color: var(--erreur); border-width: 2px; }
.checkbox { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--cible); padding-block: 0.4rem; cursor: pointer; }
.checkbox input { flex: none; width: 1.75rem; height: 1.75rem; margin: 0.05rem 0 0; accent-color: var(--menthe-fonce); }
.checkbox-group { display: grid; gap: var(--s-1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-summary {
  max-width: 40rem; margin-top: var(--s-4); padding: var(--s-4) var(--s-5);
  border: 2px solid var(--erreur); border-radius: var(--rayon); background: var(--erreur-fond); scroll-margin-top: var(--s-5);
}
.form-summary p { margin: 0 0 var(--s-2); }
.form-summary ul { margin: 0; padding-left: 1.25rem; }
.form-optional { border-radius: var(--rayon); background: var(--gris); padding: 0 var(--s-4); }
.form-optional summary { display: flex; align-items: center; min-height: 3.25rem; cursor: pointer; font-weight: 700; }
.form-optional[open] summary { margin-bottom: var(--s-2); }
.form-optional .form-question { padding-bottom: var(--s-4); }
.application-form button[type="submit"] { justify-self: start; }
