/* ==========================================================================
   Emploi BSM groupe — style.css
   Base du site : layout, header, footer, hero, cartes, badges, formulaires.
   S'appuie sur les tokens de marque (assets/brand/emploi-tokens.css) —
   aucune couleur/rayon/espacement ne doit être réinventé ici.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; display: block; }
html { scroll-behavior: smooth; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--emploi-blue-deep); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Boutons — extension (variante bloc pleine largeur mobile, tailles)
   -------------------------------------------------------------------------- */
.btn--block { width: 100%; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn svg { width: 18px; height: 18px; margin-right: 8px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex; align-items: center; gap: 28px;
  height: 76px;
}
.header__logo { flex-shrink: 0; line-height: 0; }
.header__logo .logo-symbol { display: none; }

.header__nav {
  display: none;
  align-items: center; gap: 4px;
  margin-right: auto;
}
.nav-link {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--ink); padding: 10px 14px; border-radius: var(--radius-sm);
}
.nav-link:hover, .nav-link.is-active { color: var(--emploi-blue); text-decoration: none; background: var(--emploi-blue-veil); }

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header__cta { display: none; }

.header__burger {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-sm);
}
.header__burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.header__burger span::before, .header__burger span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.header__burger span::before { top: -7px; }
.header__burger span::after { top: 7px; }
.header__burger[aria-expanded="true"] span { background: transparent; }
.header__burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.header__burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 2px;
  padding: 8px 24px 20px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav .nav-link { width: 100%; padding: 13px 14px; }
.mobile-nav__cta { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 860px) {
  .header__logo .logo-symbol { display: none; }
  .header__logo .logo-full { display: block; }
  .header__nav { display: flex; }
  .header__cta { display: inline-flex; }
  .header__burger { display: none; }
  .mobile-nav { display: none !important; }
}
@media (max-width: 859px) {
  .header__logo .logo-full { display: none; }
  .header__logo .logo-symbol { display: block; }
}

/* --------------------------------------------------------------------------
   Hero (accueil)
   -------------------------------------------------------------------------- */
.hero {
  background: var(--emploi-blue-deep);
  color: #fff;
  padding: 56px 0 0;
  overflow: hidden;
}
.hero__inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero .eyebrow { color: var(--emploi-orange); justify-content: center; display: flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.hero h1 { color: #fff; }
.hero__lead { color: var(--emploi-blue-soft); font-size: 18px; max-width: 560px; margin: 16px auto 0; }

/* Texte dynamique du hero — hauteur réservée sur 2 lignes (le message le
   plus long tient sur 2 lignes en mobile) pour ne jamais provoquer de saut
   de mise en page pendant l'animation (voir main.js). */
.hero__dynamic {
  min-height: 2.8em; display: flex; align-items: flex-start; justify-content: center;
  gap: 2px; margin: 14px auto 0; max-width: 620px; padding: 0 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: #fff; line-height: 1.4;
}
.hero__dynamic-cursor {
  display: inline-block; width: 2px; height: 1.1em; background: var(--emploi-orange);
  animation: hero-cursor-blink 1s step-end infinite; flex-shrink: 0; margin-top: .1em;
}
@keyframes hero-cursor-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero__dynamic-cursor { animation: none; }
}

.search-form {
  display: flex; gap: 10px; background: #fff; border-radius: var(--radius-sm);
  padding: 6px; margin: 32px auto 0; max-width: 640px;
  box-shadow: 0 20px 40px -20px rgba(15,31,61,.5);
}
.search-form__field {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 12px;
}
.search-form__field svg { flex-shrink: 0; color: var(--slate); }
.search-form__field input {
  border: 0; outline: 0; width: 100%; height: 44px; font-family: var(--font-body);
  font-size: 15px; color: var(--ink); background: transparent;
}
.search-form__field input::placeholder { color: var(--slate); }
.search-form .btn { flex-shrink: 0; }
@media (max-width: 479px) {
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; }
}

.hero__quicklinks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  margin: 20px 0 0; padding: 0; list-style: none;
}
.hero__quicklinks a { color: var(--emploi-blue-soft); font-size: 14px; }
.hero__quicklinks a:hover { color: #fff; }

.hero__palier { margin-top: 44px; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.section--veil { background: var(--emploi-blue-veil); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 28px; flex-wrap: wrap;
}
.section__head .eyebrow { display: block; margin-bottom: 8px; }
.section__head h2 { margin: 0; }
.section__link {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.section__link svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Grilles
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1023px) { .grid--cards, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .grid--cards, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.hscroll {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; width: 280px; }
.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* --------------------------------------------------------------------------
   Carte offre — SANS image par conception (pas d'espace réservé)
   -------------------------------------------------------------------------- */
.card-offer {
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .15s ease, transform .15s ease;
}
.card-offer:hover { border-color: var(--emploi-blue-soft); transform: translateY(-2px); }
.card-offer__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.card-offer__title {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  line-height: 1.3; color: var(--emploi-blue-deep); margin: 0;
}
.card-offer__title a { color: inherit; }
.card-offer__title a:hover { color: var(--emploi-orange-deep); text-decoration: none; }
.card-offer__meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0;
  font-size: 13.5px; color: var(--slate);
}
.card-offer__meta li { display: flex; align-items: center; gap: 6px; list-style: none; }
.card-offer__meta svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--emploi-blue); }
.card-offer__excerpt { font-size: 14.5px; color: var(--slate); line-height: 1.55; margin: 0; }
.card-offer__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border);
}
.card-offer__date { font-family: var(--font-mono); font-size: 11.5px; color: var(--slate); letter-spacing: .04em; }

/* --------------------------------------------------------------------------
   Carte formation / bourse — variante annonce (sans image) & premium (avec image)
   -------------------------------------------------------------------------- */
.card-formation--annonce { composes: card-offer; } /* structure identique à card-offer, classes appliquées séparément en HTML */

.card-formation--premium { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-formation--premium .card-media {
  aspect-ratio: 16/9; background: var(--emploi-blue-veil); position: relative; overflow: hidden;
}
.card-formation--premium .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-formation--premium .card-media .tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); }
.card-formation--premium__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-formation--premium__title { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--emploi-blue-deep); margin: 0; }
.card-formation--premium p { font-size: 14.5px; color: var(--slate); line-height: 1.55; margin: 0; }

/* --------------------------------------------------------------------------
   Carte article (blog / conseils / actualités) — AVEC image mise en avant
   -------------------------------------------------------------------------- */
.card-article { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-article .card-media {
  aspect-ratio: 16/10; background: var(--emploi-blue-veil); overflow: hidden; position: relative;
}
.card-article .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-article__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-article .eyebrow { color: var(--emploi-orange-deep); }
.card-article__title { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 0; color: var(--emploi-blue-deep); }
.card-article__title a { color: inherit; }
.card-article__title a:hover { color: var(--emploi-orange-deep); text-decoration: none; }
.card-article__excerpt { font-size: 14px; color: var(--slate); line-height: 1.55; margin: 0; }
.card-article__meta { font-family: var(--font-mono); font-size: 11px; color: var(--slate); letter-spacing: .04em; margin-top: auto; padding-top: 10px; }

/* --------------------------------------------------------------------------
   Carte fiche métier — pictogramme, jamais de photo
   -------------------------------------------------------------------------- */
.card-fiche { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.card-fiche__icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--emploi-blue-veil); color: var(--emploi-blue);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-fiche__icon svg { width: 24px; height: 24px; }
.card-fiche__title { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0; color: var(--emploi-blue-deep); }
.card-fiche__title a { color: inherit; }
.card-fiche__title a:hover { color: var(--emploi-orange-deep); text-decoration: none; }
.card-fiche p { font-size: 14px; color: var(--slate); line-height: 1.5; margin: 0; }

/* --------------------------------------------------------------------------
   Étiquettes de contrat — extension des .tag des tokens
   -------------------------------------------------------------------------- */
.tag--cdi     { background: var(--emploi-blue-veil); color: var(--emploi-blue); }
.tag--cdd     { background: #EFEAFB; color: #5B3FA6; }
.tag--stage   { background: #E7F3EE; color: #1B7F5A; }
.tag--freelance { background: #FDF3E2; color: #8A5A00; }
.tag--formation { background: #EAF0FB; color: var(--emploi-blue); }
.tag--bourse  { background: #F3EFE7; color: #7A5B22; }
.tag--ville   { background: var(--sand); color: var(--slate); }
.tag--ville svg { width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }

/* --------------------------------------------------------------------------
   Emplacement publicitaire — clairement identifié, jamais intrusif
   -------------------------------------------------------------------------- */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  background: var(--sand); border: 1px dashed var(--border); border-radius: var(--radius-md);
  padding: 18px; min-height: 100px;
}
.ad-slot__label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--slate); opacity: .75;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rect { min-height: 250px; }
.ad-slot--inline { margin: 4px 0; }

/* Campagne active (plugin emploi-bsm-core) : vraie image, plus de pointillés */
.ad-slot--live {
  display: block; position: relative; padding: 0; background: none; border: 0;
  border-radius: var(--radius-md); overflow: hidden;
}
.ad-slot--live img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-slot--live::after {
  content: "Publicité"; position: absolute; top: 8px; left: 8px;
  background: rgba(15,31,61,.75); color: #fff; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Filtres (archive)
   -------------------------------------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 24px;
}
.filters__pills { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.pill {
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--slate); cursor: pointer;
}
.pill:hover { border-color: var(--emploi-blue-soft); color: var(--emploi-blue); }
.pill.is-active { background: var(--emploi-blue); border-color: var(--emploi-blue); color: #fff; }
.filters__select {
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; background: var(--surface);
}

.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; font-size: 14px; color: var(--slate); flex-wrap: wrap; gap: 10px;
}
.results-bar strong { color: var(--ink); }
.sort-select { font-family: var(--font-body); font-size: 13.5px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; background: var(--surface); }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 36px; font-family: var(--font-mono); font-size: 13px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--slate);
}
.pagination a:hover { background: var(--emploi-blue-veil); color: var(--emploi-blue); text-decoration: none; }
.pagination .is-current { background: var(--emploi-blue); color: #fff; }
.pagination .dots { color: var(--border); }

/* --------------------------------------------------------------------------
   Stats bar
   -------------------------------------------------------------------------- */
.stats-row { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.stats-row__item { text-align: center; }
.stats-row__num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--emploi-orange); }
.stats-row__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--emploi-blue-soft); }

/* --------------------------------------------------------------------------
   Bloc catégories (accueil)
   -------------------------------------------------------------------------- */
.cat-tile {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.cat-tile:hover { border-color: var(--emploi-blue-soft); text-decoration: none; }
.cat-tile__icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--emploi-blue-veil); color: var(--emploi-blue);
  display: flex; align-items: center; justify-content: center;
}
.cat-tile__icon svg { width: 22px; height: 22px; }
.cat-tile__title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); margin: 0 0 2px; }
.cat-tile__count { font-family: var(--font-mono); font-size: 12px; color: var(--slate); }

/* --------------------------------------------------------------------------
   Bandeau CTA (recruteurs / candidature spontanée)
   -------------------------------------------------------------------------- */
.cta-banner {
  background: var(--emploi-blue-deep); color: #fff; border-radius: var(--radius-lg);
  padding: 40px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.cta-banner h3 { color: #fff; font-size: 26px; margin: 0 0 8px; }
.cta-banner p { color: var(--emploi-blue-soft); margin: 0; max-width: 480px; }
.cta-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------------- */
.newsletter {
  background: var(--emploi-blue-veil); border-radius: var(--radius-lg);
  padding: 32px; text-align: center;
}
.newsletter form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; margin: 18px auto 0; }
.newsletter input {
  flex: 1; min-width: 140px; height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  padding: 0 14px; font-family: var(--font-body); font-size: 14px; background: #fff;
}
.newsletter input[name="email"] { flex: 1.6; }
.newsletter__feedback {
  max-width: 520px; margin: 14px auto 0; font-size: 13.5px; font-weight: 600;
}
.newsletter__feedback--ok { color: var(--success); }
.newsletter__feedback--error { color: var(--error); }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer { background: var(--emploi-blue-deep); color: var(--emploi-blue-soft); margin-top: 64px; }
.site-footer .container { padding-top: 56px; padding-bottom: 28px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer__brand p.tagline { color: var(--emploi-blue-soft); font-size: 14px; margin: 14px 0 0; }
.footer__brand address { font-style: normal; font-size: 14px; line-height: 1.8; margin-top: 14px; color: var(--emploi-blue-soft); }
.footer__brand address a { color: #fff; }
.footer__col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 14px; font-weight: 500; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--emploi-blue-soft); font-size: 14px; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: var(--emploi-blue-soft);
}
.footer__bottom a { color: var(--emploi-blue-soft); }

.footer__social { display: flex; gap: 12px; margin-top: 18px; }
.footer__social a {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: var(--emploi-blue-soft); transition: background .15s, color .15s;
}
.footer__social a:hover { background: var(--emploi-orange); color: var(--emploi-blue-deep); }

/* CTA WhatsApp — vert de la marque WhatsApp, volontairement distinct de la
   palette Emploi BSM : sert justement à être reconnu au premier coup d'œil
   comme un lien WhatsApp, pas comme un bouton du site. */
.whatsapp-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 10px 18px; border-radius: var(--radius-sm); background: #25D366; color: #06210F;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
}
.whatsapp-cta:hover { background: #1EBE5A; color: #06210F; text-decoration: none; }
.whatsapp-cta--newsletter { margin: 20px auto 0; }

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-banner { padding: 28px; }
  .newsletter form { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Fil d'ariane
   -------------------------------------------------------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--slate); margin-bottom: 20px; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--emploi-blue); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .is-current { color: var(--ink); }

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hide-mobile { display: none; }
@media (min-width: 640px) { .hide-mobile { display: initial; } .hide-desktop { display: none; } }
