/* metiers.css : annuaire et fiches métier */
.metier-search { display: flex; gap: 8px; max-width: 620px; margin-bottom: 18px; }
.metier-search input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 11px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); color: var(--text-dark); }
.metier-search input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.metier-search button { font: inherit; font-size: 13px; background: var(--deep); color: var(--white); border: 0; border-radius: 12px; padding: 0 20px; cursor: pointer; }
.metier-secteurs .count { opacity: .65; font-size: 11px; margin-left: 4px; }

.metiers-section { padding: 18px 0 70px; }
.metier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.metier-card { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 20px; transition: border-color .2s, transform .2s; }
.metier-card:hover { border-color: var(--terracotta); transform: translateY(-2px); }
.metier-card h2 { font-family: 'Poppins', sans-serif; font-size: 19px; font-weight: 600; color: var(--deep); }
.metier-card p { font-size: 13px; color: var(--text-body); line-height: 1.55; }
.metier-secteur { align-self: flex-start; font-size: 11px; letter-spacing: .03em; background: var(--sage-light); color: var(--sage-text); padding: 4px 10px; border-radius: 12px; }
.metier-foot { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--terracotta); font-weight: 500; }

.fiche { padding-top: 32px; padding-bottom: 70px; }
.back-link { font-size: 13px; color: var(--text-muted); }
.back-link:hover { color: var(--terracotta); }
.fiche-head { margin: 18px 0 28px; display: flex; flex-direction: column; gap: 10px; }
.fiche-head h1 { font-family: 'Poppins', sans-serif; font-size: 36px; font-weight: 600; color: var(--deep); }
.fiche-accroche { font-size: 16px; color: var(--text-body); max-width: 680px; line-height: 1.6; }
.fiche-layout { display: flex; gap: 28px; align-items: flex-start; }
.fiche-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.fiche-side { width: 270px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }
.fiche-bloc { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.fiche-bloc h2 { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 600; color: var(--deep); margin-bottom: 12px; }
.fiche-bloc p { font-size: 14.5px; line-height: 1.7; color: var(--text-body); }
.fiche-bloc p + p { margin-top: 12px; }
.fiche-bloc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.6; color: var(--text-body); }
.fiche-bloc li::marker { color: var(--terracotta); }
.fiche-reconv { background: var(--terracotta-light); border-color: transparent; }
.fiche-salaire { font-size: 13px; color: var(--text-body); line-height: 1.6; margin-bottom: 10px; }
.fiche-salaire p + p { margin-top: 8px; }
.fiche-note a, .fiche-sources a { color: var(--terracotta-text); text-decoration: underline; }
.fiche-sources ul { gap: 6px; font-size: 13px; }
.fiche-sources .fiche-note { margin-bottom: 12px; }
.fiche-bloc p a { color: var(--terracotta-text); }
.fiche-note { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

.fiche-parcours { margin-top: 40px; }
.fiche-parcours h2, .fiche-autres h2 { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 600; color: var(--deep); margin-bottom: 6px; }
.fiche-sous { font-size: 14px; color: var(--text-body); margin-bottom: 16px; }
.fiche-more { margin-top: 18px; font-size: 14px; }
.fiche-more a:not(.btn-primary) { color: var(--terracotta); }
.fiche-autres { margin-top: 44px; }

@media (max-width: 860px) {
  .fiche-layout { flex-direction: column; }
  .fiche-side { width: 100%; position: static; order: -1; }
  .fiche-head h1 { font-size: 28px; }
  .fiche-bloc { padding: 20px; }
  .metier-search { flex-direction: column; }
  .metier-search button { padding: 11px 20px; }
}

/* ---- Fiche métier : mise en page éditoriale ---- */
.fiche-hero { background: var(--deep); color: var(--white); border-radius: 22px; padding: 36px 40px 32px; margin: 18px 0 24px; display: flex; flex-direction: column; gap: 12px; }
.fiche-hero h1 { font-family: 'Poppins', sans-serif; font-size: 42px; font-weight: 600; color: var(--white); line-height: 1.15; }
.fiche-hero .fiche-accroche { color: rgba(255,255,255,.82); font-size: 17px; max-width: 640px; }
.fiche-hero .metier-secteur { background: rgba(255,255,255,.14); color: var(--white); }
.chiffres { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; padding: 0; }
.chiffres li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.chiffres strong { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 600; color: #F4B59F; line-height: 1.1; }
.chiffres span { font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.78); }

.fiche-intro { background: transparent; border: 0; padding: 0 4px; }
.fiche-intro p { font-size: 17px; line-height: 1.75; color: var(--text-dark); }
.fiche-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--terracotta-text); font-weight: 600; margin-bottom: 4px; }

.tuiles, .pastilles, .voies { list-style: none; padding: 0; }
.fiche-bloc ul.tuiles { padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tuiles li { display: flex; gap: 12px; align-items: flex-start; background: var(--cream, #FAF7F2); border-radius: 12px; padding: 14px; font-size: 14px; line-height: 1.5; }
.tuile-n { flex-shrink: 0; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--terracotta); }
.fiche-bloc ul.pastilles { padding: 0; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.pastilles li { background: var(--sage-light); color: var(--sage-text); border-radius: 20px; padding: 7px 14px; font-size: 13.5px; }

.voies { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.voies li { position: relative; padding: 14px 16px 14px 20px; display: flex; flex-direction: column; gap: 3px; background: var(--cream); border-radius: 12px; }
.voies li::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--terracotta); }
.voies strong { font-size: 15px; font-weight: 600; color: var(--deep); line-height: 1.4; }
.voies span { font-size: 13.5px; line-height: 1.6; color: var(--text-body); }

.fiche-plus { border-top: 1px solid var(--border); padding: 14px 0; }
.fiche-plus:last-child { padding-bottom: 0; }
.fiche-plus summary { cursor: pointer; font-weight: 500; font-size: 14.5px; color: var(--deep); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.fiche-plus summary::-webkit-details-marker { display: none; }
.fiche-plus summary::after { content: "+"; font-size: 20px; color: var(--terracotta); line-height: 1; }
.fiche-plus[open] summary::after { content: "−"; }
.fiche-plus[open] summary { margin-bottom: 10px; }
.fiche-plus p { font-size: 13.5px; line-height: 1.7; }
.fiche-reconv .fiche-plus { border-color: rgba(0,0,0,.1); }
.fiche-details h2 { margin-bottom: 4px; }

.side-cta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-cta .btn-primary { margin-top: 6px; }
.side-big { font-family: 'Poppins', sans-serif; font-size: 26px; color: var(--deep); }

@media (max-width: 860px) {
  .fiche-hero { padding: 26px 22px; border-radius: 18px; }
  .fiche-hero h1 { font-size: 30px; }
  .fiche-hero .fiche-accroche { font-size: 15.5px; }
  .chiffres strong { font-size: 24px; }
  .fiche-bloc ul.tuiles { grid-template-columns: 1fr; }
  .fiche-intro p { font-size: 16px; }
}

/* Fiche métier : rien ne suit le défilement (ni l'en-tête du site, ni la colonne de droite) */
body:has(.fiche) header { position: static; }
.fiche-side { position: static; }


/* =========================================================
   Annuaire des métiers : mosaïque (hero, secteurs, tuiles)
   ========================================================= */
.m-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 34px; align-items: center; padding-top: 54px; padding-bottom: 30px; }
.m-tag { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 7px 16px; border-radius: 999px; background: var(--sage-light); color: var(--terracotta-text); }
.m-hero h1 { font-family: 'Poppins', sans-serif; font-size: 50px; font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; color: var(--deep); margin: 14px 0 0; }
.m-hero h1 em { font-style: normal; color: var(--terracotta); }
.m-hero p { font-size: 17px; font-weight: 300; color: var(--text-body); margin: 16px 0 24px; max-width: 540px; line-height: 1.6; }
.m-hero .metier-search { max-width: 560px; margin-bottom: 0; }
.m-today { display: block; background: var(--degrade); color: var(--white); border-radius: 32px; padding: 32px 34px; box-shadow: var(--ombre-forte); position: relative; overflow: hidden; min-height: 240px; transition: transform .25s; }
.m-today:hover { transform: translateY(-4px); }
.m-today::after { content: ""; position: absolute; right: -90px; top: -100px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.1); pointer-events: none; }
.m-today > * { position: relative; z-index: 1; }
.m-lab { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.m-today h2 { font-family: 'Poppins', sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 8px; color: var(--white); }
.m-today p { font-size: 14.5px; color: rgba(255,255,255,.9); max-width: 400px; margin: 0 0 20px; line-height: 1.55; }
.m-today-btn { display: inline-block; background: var(--white); color: var(--terracotta-text); font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px; padding: 13px 28px; border-radius: 999px; box-shadow: 0 8px 24px rgba(20,18,58,.18); }

.m-rail { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 14px; scrollbar-width: none; }
.m-rail::-webkit-scrollbar { display: none; }
.m-sec { flex: 1 0 128px; background: var(--white); border: 1px solid #EEEDF7; border-radius: 22px; padding: 18px 10px; text-align: center; box-shadow: var(--ombre); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .2s, box-shadow .2s; }
.m-sec:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.m-sec .m-ic { width: 46px; height: 46px; border-radius: 15px; background: var(--sage-light); display: grid; place-items: center; font-size: 22px; margin-bottom: 8px; }
.m-sec b { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; line-height: 1.25; color: var(--deep); }
.m-sec .m-n { font-size: 11.5px; color: var(--text-muted); }
.m-sec.on { background: var(--terracotta); border-color: var(--terracotta); }
.m-sec.on b { color: var(--white); } .m-sec.on .m-n { color: rgba(255,255,255,.8); }
.m-sec.on .m-ic { background: rgba(255,255,255,.2); }

.m-bento { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 18px; margin-top: 14px; }
.m-b { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 24px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--ombre); border: 1px solid rgba(0,0,0,.03); transition: transform .25s, box-shadow .25s; }
.m-b:hover { transform: translateY(-5px); box-shadow: var(--ombre-forte); }
.m-b h3 { font-family: 'Poppins', sans-serif; font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--deep); margin: 8px 0 4px; letter-spacing: -0.02em; }
.m-b p { font-size: 12.5px; color: var(--text-body); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-em { position: absolute; right: 18px; top: 14px; font-size: 34px; line-height: 1; }
.m-sector { align-self: flex-start; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--text-body); max-width: 78%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-foot { font-size: 12px; font-weight: 600; color: var(--terracotta-text); margin-top: 6px; }
.m-c1 { background: #ECEBFF; } .m-c2 { background: #FFF1D3; } .m-c3 { background: #E3F7EE; } .m-c4 { background: #FFE6EE; } .m-c5 { background: #E5EEFF; }
.m-grande { grid-column: span 2; grid-row: span 2; background: var(--deep); }
.m-grande h3 { font-size: 30px; font-weight: 800; color: var(--white); }
.m-grande p { color: rgba(255,255,255,.78); font-size: 14px; -webkit-line-clamp: 4; }
.m-grande .m-em { font-size: 80px; right: 26px; top: 22px; }
.m-grande .m-sector { background: #FFF1D3; color: #8A5A00; }
.m-grande .m-foot { color: #FFD27D; }
.m-haute { grid-row: span 2; } .m-large { grid-column: span 2; }
.m-empty { grid-column: 1 / -1; }

@media (max-width: 960px) {
  .m-hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .m-hero h1 { font-size: 38px; }
  .m-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .m-hero h1 { font-size: 32px; }
  .m-bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .m-b { min-height: 150px; }
  .m-grande, .m-haute, .m-large { grid-column: auto; grid-row: auto; }
  .m-grande h3 { font-size: 24px; }
  .m-grande .m-em { font-size: 54px; }
}


/* =========================================================
   Fiche métier : tableau de bord (sommaire collant + tuiles)
   ========================================================= */
.fiche-toc { width: 190px; flex-shrink: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; align-self: flex-start; }
.fiche-toc .label { font-size: 11px; letter-spacing: .12em; color: var(--text-muted); margin: 0 0 8px 12px; }
.fiche-toc a { font-size: 13.5px; font-weight: 500; color: var(--text-body); padding: 9px 12px; border-radius: 12px; border-left: 3px solid transparent; transition: background .15s, color .15s; }
.fiche-toc a:hover { background: var(--sage-light); }
.fiche-toc a.on { background: var(--sage-light); color: var(--terracotta-text); border-left-color: var(--terracotta); font-weight: 600; }
.fiche-main { min-width: 0; flex: 1; }
.fiche-bloc { scroll-margin-top: 90px; }
.tuiles { counter-reset: t; }
.tuiles li { counter-increment: t; position: relative; background: #F3F2FF; border-radius: 18px; padding: 16px 16px 16px 54px; }
.tuiles li:nth-child(4n+2) { background: #FFF4DC; } .tuiles li:nth-child(4n+3) { background: #E6F7EF; } .tuiles li:nth-child(4n) { background: #FFE9F0; }
.tuiles .tuile-n { position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 10px; background: var(--white); display: grid; place-items: center; font: 700 13px 'Poppins', sans-serif; color: var(--terracotta-text); }
.tuiles .tuile-n::before { content: counter(t); }
.voies { counter-reset: v; position: relative; }
.voies li { counter-increment: v; background: var(--white); border: 1px solid #EEEDF7; border-radius: 18px; padding: 16px 18px 16px 62px; }
.voies li::before { content: counter(v); left: 16px; top: 14px; bottom: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--terracotta); color: var(--white); display: grid; place-items: center; font: 700 14px 'Poppins', sans-serif; }
@media (max-width: 1100px) {
  .fiche-toc { display: none; }
}
@media (max-width: 560px) { .m-grande h3 { padding-right: 52px; } .m-grande .m-em { font-size: 42px; right: 18px; top: 14px; } }
