/* =========================================================
   redesign.css : habillage « moderne » du site (chargé en dernier).
   Titres très gras, violet vif sur fond clair, grandes cartes
   arrondies avec ombres douces, boutons en pilule.
   ========================================================= */

body { font-family: 'Inter', sans-serif; background: var(--cream); color: var(--text-dark); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: 'Poppins', sans-serif; letter-spacing: -0.02em; }

/* ---------- En-tête ---------- */
header { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
header .wrap { padding: 14px 32px; }
.logo { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -0.04em; color: var(--terracotta); }
.logo span { color: var(--accent-jaune); }
.nav-links a, .nav-links .link-button { font-family: 'Poppins', sans-serif; font-size: 14.5px; font-weight: 500; color: var(--deep); }
.nav-links a:not(.btn-primary):hover, .nav-links .link-button:hover { color: var(--terracotta); }
.nav-links a.active { color: var(--terracotta); font-weight: 600; }
.nav-links .btn-primary, .nav-links .btn-primary:hover { color: var(--white); }
.nav-links .btn-secondary { color: var(--deep); }
.nav-links .btn-primary { padding: 11px 22px; }
.hamburger { background: var(--sage-light); }
.hamburger .bar { background: var(--terracotta); }

/* ---------- Boutons : pilules ---------- */
.btn-primary, .btn-secondary, .btn-light, .btn-ghost, .btn-fav, .btn-submit {
  font-family: 'Poppins', sans-serif; font-weight: 600; border-radius: 999px;
}
.btn-primary { background: var(--terracotta); color: var(--white); font-size: 14px; padding: 12px 26px; box-shadow: 0 6px 18px rgba(91,77,245,.28); transition: transform .2s ease, box-shadow .2s ease, background .2s; }
.btn-primary:hover { background: #4A3DE3; box-shadow: 0 10px 24px rgba(91,77,245,.36); }
.btn-secondary { background: var(--white); border: 1.5px solid var(--deep); color: var(--deep); font-size: 14px; padding: 11px 26px; }
.btn-secondary:hover { background: var(--deep); color: var(--white); }
.btn-light { background: var(--white); color: var(--terracotta-text); font-size: 14px; padding: 14px 32px; box-shadow: 0 8px 24px rgba(20,18,58,.18); }
.btn-ghost { border: 1.5px solid var(--deep); color: var(--deep); font-size: 13.5px; padding: 10px 24px; }
.btn-ghost:hover { background: var(--deep); color: var(--white); }
.btn-lg { font-size: 15.5px; padding: 15px 34px; }
.btn-submit { background: var(--terracotta); border-radius: 999px; padding: 14px 32px; box-shadow: 0 6px 18px rgba(91,77,245,.25); font-family: 'Poppins', sans-serif; }
.btn-menu-primary { border-radius: 999px; background: var(--terracotta); font-family: 'Poppins', sans-serif; font-weight: 600; }
.btn-menu-secondary { border-radius: 999px; }
.btn-deep { background: var(--deep); }
.btn-danger { background: #D6334C; }
.prose a.btn-primary { background: var(--terracotta); color: var(--white); }
.prose a.btn-primary:hover { background: #4A3DE3; }
.prose a.btn-ghost:hover { background: var(--deep); color: var(--white); }
.btn-manage { background: var(--terracotta); border-radius: 999px; }
.btn-mini { border-radius: 999px; }
.btn-ghost-dark, .btn-ghost-white { border-radius: 999px; }

/* ---------- Accueil : hero clair ---------- */
.hero { background: var(--white); color: var(--deep); padding: 72px 0 84px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -180px; top: -140px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(closest-side, rgba(124,116,240,.22), rgba(124,116,240,0)); pointer-events: none; }
.hero .wrap { position: relative; }
.hero-grid { display: grid !important; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { background: var(--sage-light); color: var(--terracotta-text); font-weight: 500; font-size: 12.5px; padding: 7px 16px; letter-spacing: 0; border-radius: 999px; display: inline-block; }
.hero h1 { font-family: 'Poppins', sans-serif; font-size: 54px; font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; color: var(--deep); margin-bottom: 22px; }
.hero h1 .accent { color: var(--terracotta); }
.hero p.lead { font-size: 18px; color: var(--text-body); max-width: 540px; line-height: 1.65; font-weight: 300; margin-bottom: 32px; }
.hero-ctas { gap: 14px; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 14px; color: var(--text-body); }
.hero-note-dot { width: 10px; height: 10px; border-radius: 50%; background: #2DBE7E; box-shadow: 0 0 0 4px rgba(45,190,126,.18); }

.hero-visual { position: relative; padding: 26px 0 40px 24px; }
.mock { background: var(--white); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--ombre-forte); padding: 22px 24px 18px; }
.mock-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #E3E2F2; }
.mock-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17px; color: var(--deep); margin-bottom: 14px; }
.mock-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid #F0EFF8; }
.mock-row .avatar { width: 42px; height: 42px; border-radius: 12px; }
.mock-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mock-row-text strong { font-size: 13.5px; font-weight: 600; color: var(--deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row-text span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { position: absolute; background: var(--white); border-radius: 20px; box-shadow: var(--ombre-forte); padding: 14px 20px; display: flex; flex-direction: column; border: 1px solid var(--border); }
.chip strong { font-family: 'Poppins', sans-serif; font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--terracotta); }
.chip span { font-size: 12px; color: var(--text-body); }
.chip-a { left: -14px; bottom: -26px; }
.chip-b { right: -10px; top: -6px; background: var(--terracotta); border-color: var(--terracotta); }
.chip-b strong, .chip-b span { color: var(--white); }

/* ---------- Accueil : comment ça marche ---------- */
.how { background: var(--cream); border: 0; padding: 78px 0 70px; }
.section-label { color: var(--terracotta); font-weight: 600; letter-spacing: .14em; margin-bottom: 14px; }
.section-title { font-family: 'Poppins', sans-serif; text-align: center; font-size: 38px; font-weight: 800; letter-spacing: -0.03em; color: var(--deep); max-width: 720px; margin: 0 auto 44px; line-height: 1.15; }
.how-grid { gap: 22px; }
.how-item { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: var(--white); border-radius: 28px; padding: 32px 30px 28px; box-shadow: var(--ombre); border: 1px solid #EEEDF7; transition: transform .25s, box-shadow .25s; }
.how-item:hover { transform: translateY(-5px); box-shadow: var(--ombre-forte); }
.how-icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 0 26px; font-size: 28px; }
.how-icon-sage { background: var(--sage-light); color: var(--terracotta); }
.how-icon-terracotta { background: #FFF1D3; color: #B97A00; }
.how-icon-share { background: #E3F7EE; color: #17895B; }
.how-item h3 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.how-item p { font-size: 15px; max-width: none; margin: 0 0 22px; line-height: 1.6; }
.how-link { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--deep); text-decoration: underline; text-underline-offset: 4px; }
.how-item:hover .how-link { color: var(--terracotta); }

/* ---------- Accueil : fil + colonne latérale ---------- */
.content { padding: 28px 0 80px; }
.feed-header h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.feed-header .sort, .load-more { font-weight: 600; color: var(--terracotta); }
.filter-pill { border-radius: 999px; padding: 9px 16px; font-size: 13px; }
.filter-pill.active { background: var(--terracotta); }
.sector-item:hover { color: var(--terracotta); }

/* ---------- Cartes en général ---------- */
.card, .side-card, .simple-card, .formation-card, .metier-card, .fkey, .finfos, .flinks, .fsearch, .fdetail-head,
.empty-state, .fiche-bloc, .tuile, .parcours-page .card, .profile-card, .stat-box {
  border-radius: 24px; border: 1px solid #EEEDF7; box-shadow: var(--ombre);
}
.card { padding: 26px; }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.card-name { font-family: 'Poppins', sans-serif; font-weight: 600; }
.avatar { border-radius: 14px; }
.card-actions { border-top-color: #F0EFF8; }
.metier-card, .formation-card { transition: transform .25s, box-shadow .25s, border-color .2s; }
.metier-card:hover, .formation-card:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); border-color: #DAD7F7; }
.empty-state { border-style: dashed; box-shadow: none; }
.badge { border-radius: 999px; font-weight: 600; }

/* ---------- Titres de pages (Découvrir, Métiers, Écoles…) ---------- */
.page-header { padding-top: 56px; }
.page-header h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; margin-bottom: 12px; }
.page-header p { font-size: 16.5px; font-weight: 300; color: var(--text-body); max-width: 640px; }
.page-hero { background: var(--degrade); }
.page-hero h1 { font-weight: 800; letter-spacing: -0.03em; }
.page-hero p { color: rgba(255,255,255,.85); }

/* ---------- Onglets, pastilles, filtres ---------- */
.type-tab, .tab, .page-num { border-radius: 999px; font-family: 'Poppins', sans-serif; font-weight: 500; }
.type-tab { padding: 9px 20px; font-size: 13.5px; border-color: var(--border); }
.type-tab:hover { border-color: var(--terracotta); color: var(--terracotta-text); }
.type-tab.active, .page-num.active { background: var(--terracotta); border-color: var(--terracotta); color: var(--white); }
.apply-filters, .metier-search button, .ffilters-apply, .fsearch-go { background: var(--terracotta); border-radius: 999px; font-family: 'Poppins', sans-serif; font-weight: 600; }
.fsearch-go { box-shadow: 0 6px 18px rgba(91,77,245,.28); }
.fsearch-go:hover { background: #4A3DE3; }
.ffilters-apply { padding: 10px 24px; }
.metier-search input, .fsearch-field input, .ffilters select { border-radius: 14px; }
.metier-search input { padding: 14px 20px; }
.metier-search button { padding: 0 26px; }
.fsearch { border-radius: 28px; padding: 22px; }
.fsearch-field input, .ffilters select { background: #FAFAFE; }
.fsearch-field input:focus, .ffilters select:focus, .metier-search input:focus { outline: 2px solid var(--terracotta); border-color: transparent; }
.tag, .ftag, .metier-secteur { border-radius: 999px; }
.ftag-type, .metier-secteur { background: var(--sage-light); color: var(--sage-text); }
.ftag { background: #FFF1D3; color: #8A5A00; }
.ftag-soft { background: var(--cream); color: var(--text-body); }

/* ---------- Champs de formulaire ---------- */
.field-group input:not([type=radio]):not([type=checkbox]), .field-group select, .field-group textarea { border-radius: 14px; padding: 13px 16px; background: #FAFAFE; }
.field-group input:focus, .field-group select:focus, .field-group textarea:focus { outline: 2px solid var(--terracotta); border-color: transparent; background: var(--white); }
.choice { border-radius: 14px; }
.choice input:focus, .choice input:focus-visible { outline: none; box-shadow: none; }

/* ---------- Bandeaux ---------- */
.cta-band { background: var(--degrade); padding: 84px 0; position: relative; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.cta-band::before { width: 420px; height: 420px; left: -120px; top: -160px; }
.cta-band::after { width: 360px; height: 360px; right: -90px; bottom: -170px; }
.cta-band .wrap { position: relative; }
.cta-band h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; max-width: 760px; margin: 0 auto 14px; line-height: 1.15; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 16px; margin-bottom: 30px; }
.quote-band { background: var(--white); padding: 84px 0; }
.quote-band blockquote { font-family: 'Poppins', sans-serif; font-style: normal; font-weight: 600; font-size: 30px; letter-spacing: -0.02em; line-height: 1.35; max-width: 780px; color: var(--deep); }
.quote-band cite { color: var(--terracotta); font-weight: 600; font-size: 14px; }

/* ---------- Pied de page clair ---------- */
footer { background: var(--white); color: var(--text-body); border-top: 1px solid var(--border); padding: 40px 0; }
footer .logo { color: var(--terracotta); }
footer .links { font-size: 13.5px; gap: 10px 28px; }
footer .links a:hover { color: var(--terracotta); }

/* ---------- Cookies, notifications, divers ---------- */
.cookie-banner { border-radius: 22px; box-shadow: var(--ombre-forte); }
.cookie-banner .btn-primary { box-shadow: none; }
.notif-panel { border-radius: 22px; box-shadow: var(--ombre-forte); }
.pagination .page-num { border-radius: 999px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-text, .hero-visual { min-width: 0; }
  .hero h1 { font-size: 42px; }
  .hero { padding: 48px 0 56px; }
  .hero-visual { padding: 20px 0 38px; }
  .chip-a { left: 8px; } .chip-b { right: 8px; top: -2px; }
}
@media (max-width: 860px) {
  .section-title { font-size: 28px; }
  .cta-band h2 { font-size: 28px; }
  .quote-band blockquote { font-size: 22px; }
  .page-header h1 { font-size: 34px; }
  footer .wrap { text-align: center; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 34px; }
  .hero p.lead { font-size: 16px; }
  .btn-lg { width: 100%; text-align: center; }
  .hero-ctas { flex-direction: column; }
}

/* ---------- Connexion / inscription ---------- */
.auth-visual { background: var(--degrade); position: relative; overflow: hidden; }
.auth-visual::after { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; right: -160px; bottom: -180px; background: rgba(255,255,255,.08); pointer-events: none; }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.reason-icon { background: rgba(255,255,255,.16); color: var(--white); border-radius: 14px; }
.reason-item .title { font-weight: 600; font-size: 15px; }
.reason-item .desc { color: rgba(255,255,255,.8); }
.quote-block { background: rgba(255,255,255,.14); border-radius: 22px; }
.quote-block .q { font-style: normal; font-weight: 500; }
.quote-block cite { color: rgba(255,255,255,.8); }
.auth-form h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.btn-outline { border-radius: 999px; border: 1.5px solid var(--deep); font-family: 'Poppins', sans-serif; font-weight: 600; padding: 9px 22px; }
.btn-outline:hover { background: var(--deep); color: var(--white); }

/* ---------- Fiche métier ---------- */
.fiche-hero { background: var(--degrade); border-radius: 32px; padding: 44px 46px 40px; box-shadow: var(--ombre-forte); position: relative; overflow: hidden; }
.fiche-hero::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -150px; background: rgba(255,255,255,.08); pointer-events: none; }
.fiche-hero > * { position: relative; z-index: 1; }
.fiche-hero h1 { font-weight: 800; font-size: 46px; letter-spacing: -0.035em; }
.chiffres li { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); border-radius: 20px; }
.chiffres strong { color: var(--white); font-weight: 800; font-size: 30px; }
.fiche-intro { padding: 0 6px; }

/* ---------- Fiche d'un parcours, profil, réglages ---------- */
.profile-cover, .profil-cover, .cover { background: var(--degrade); }

.empty-state .empty-title, .empty-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 20px; color: var(--deep); }
.tab.active { color: var(--terracotta-text); border-bottom-color: var(--terracotta); }

.filter-demo span.active { background: var(--terracotta); border-color: var(--terracotta); color: var(--white); }
.side-card-dark { background: var(--degrade); color: rgba(255,255,255,.88); border: 0; }
.side-card-dark .btn-primary { background: var(--white); color: var(--terracotta-text); box-shadow: none; }
.step-n, .step-num { background: var(--sage-light); color: var(--terracotta-text); }


/* =========================================================
   Retouches (liste de corrections d'octobre)
   ========================================================= */
/* Icônes SVG : même rendu sur mobile et ordinateur (les flèches texte deviennent des emojis sur iPhone) */
.ico { width: 1.05em; height: 1.05em; vertical-align: -0.14em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.card-actions .icon { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.btn-ghost .ico { margin-left: 6px; }
.how-icon .ico { width: 26px; height: 26px; }

/* Onglets du profil : pastilles pleines, texte jamais collé au bord */
.tabs { border-bottom: 0; gap: 8px; padding: 2px 0 6px; margin-bottom: 18px; }
.tab { padding: 10px 18px; margin-bottom: 0; border: 1px solid transparent; font-size: 14px; }
.tab:hover { background: var(--sage-light); }
.tab.active { background: var(--terracotta); color: var(--white); border-color: var(--terracotta); }

/* Fiche métier */
.fiche-intro { background: #F3F2FF; border: 1px solid #E6E3FA; border-radius: 28px; padding: 28px 32px; }
.fiche-main, .fiche-bloc, .fiche-layout > * { min-width: 0; }
.fiche-bloc, .fiche-hero h1, .fiche-accroche, .voies li, .tuiles li { overflow-wrap: anywhere; }
.reconv-d > summary { list-style: none; cursor: pointer; position: relative; padding-right: 36px; }
.reconv-d > summary::-webkit-details-marker { display: none; }
.reconv-d > summary::after { content: "+"; position: absolute; right: 0; top: 4px; font: 600 24px/1 'Poppins', sans-serif; color: var(--terracotta); }
.reconv-d[open] > summary::after { content: "–"; }
.reconv-d > summary h2 { margin-bottom: 0; }
.reconv-d[open] > summary { margin-bottom: 14px; }
.m-autres { grid-auto-rows: 188px; }
.m-autres .m-b { justify-content: flex-end; }

/* Écoles : mosaïque (cartes de hauteurs variées, imbriquées) */
.formation-list { display: block; column-count: 3; column-gap: 20px; }
.formation-list > .formation-card { break-inside: avoid; margin-bottom: 20px; display: flex; }
.formation-list > .formation-card:nth-child(3n+1) .fc-banner { height: 148px; }
.formation-list > .formation-card:nth-child(3n+2) .fc-banner { height: 104px; }
.formation-list > .formation-card:nth-child(3n) .fc-banner { height: 126px; }
.formation-list .empty-state { column-span: all; }
.back-fav { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; padding: 10px 20px; border-radius: 999px; background: var(--white); border: 1px solid #DAD7F7; color: var(--terracotta-text); font: 600 14px 'Poppins', sans-serif; box-shadow: var(--ombre); }
.back-fav:hover { background: var(--sage-light); }

/* Fiche école : blocs qui ne bougent plus */
.fd-side { position: static; }
.fd-pill { position: static; transform: none; width: fit-content; max-width: 100%; margin: 34px auto 0; background: var(--white); color: var(--deep); border: 1px solid #DAD7F7; box-shadow: var(--ombre); }
.fd-pill span { max-width: 420px; }
.fd-pill button.on { background: var(--sage-light); }

/* Filtres de « Découvrir » : bouton dans sa propre zone, bien séparé des listes */
.filter-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.filter-actions .apply-filters { margin-top: 0; padding: 14px; font-size: 14px; }

@media (max-width: 960px) { .formation-list { column-count: 2; } }
@media (max-width: 700px) {
  /* Recherche des métiers : champ pleine largeur, bouton sous le champ (plus écrasé) */
  .metier-search { flex-direction: column; align-items: stretch; }
  .metier-search button { padding: 14px 20px; width: 100%; }
  .m-hero .metier-search button { padding: 14px 20px; }
  /* Rangées de types / secteurs : une seule ligne qu'on fait défiler */
  .type-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .type-tabs::-webkit-scrollbar { display: none; }
  .type-tab { flex-shrink: 0; white-space: nowrap; }
  .fdomaines-label { flex-shrink: 0; align-self: center; }
  .fiche-intro { padding: 22px 22px; border-radius: 22px; }
  .fd-side { margin-top: 32px; margin-bottom: 8px; }
  .m-autres { grid-auto-rows: auto; }
}
@media (max-width: 600px) { .formation-list { column-count: 1; } }
@media (max-width: 560px) { .fd-pill span { display: inline; } .fd-pill { padding: 8px 8px 8px 20px; flex-wrap: wrap; justify-content: center; border-radius: 28px; } }

/* Bouton « Autour de moi » */
.geo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.geo-btn { margin: 0; background: var(--sage-light); color: var(--terracotta-text); border: 0; border-radius: 999px; padding: 8px 16px; font: 600 12.5px 'Poppins', sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.geo-btn:hover { background: #E2DFFF; }
.geo-msg { font-size: 12px; color: var(--text-muted); margin-top: 4px; min-height: 0; }

/* Glossaire des types de formation */
.gloss { margin: 0 0 22px; }
.gloss h2 { font: 700 18px 'Poppins', sans-serif; color: var(--deep); margin-bottom: 12px; }
.gloss-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gloss-card { background: var(--white); border: 1px solid #EEEDF7; border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--ombre); }
.gloss-card:nth-child(6n+1) { background: #F3F2FF; } .gloss-card:nth-child(6n+2) { background: #FFF4DC; } .gloss-card:nth-child(6n+3) { background: #E6F7EF; }
.gloss-card:nth-child(6n+4) { background: #FFE9F0; } .gloss-card:nth-child(6n+5) { background: #E5EEFF; } .gloss-card:nth-child(6n) { background: #F3E8FF; }
.gloss-card b { font: 600 14.5px 'Poppins', sans-serif; color: var(--deep); }
.gloss-card span { font-size: 13px; line-height: 1.5; color: var(--text-body); }
@media (max-width: 700px) {
  .gloss-row { display: flex; overflow-x: auto; scrollbar-width: none; gap: 10px; margin-right: -16px; padding-right: 16px; scroll-snap-type: x proximity; }
  .gloss-row::-webkit-scrollbar { display: none; }
  .gloss-card { flex: 0 0 240px; scroll-snap-align: start; }
}

/* Profil : champ « précisez » quand le secteur choisi est « Autre » */
.precisions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.precision-champ { min-width: 0; }
.precision-champ[hidden] { display: none; }
.precision-champ[data-pour*="arrivee"] { grid-column: 2; }
@media (max-width: 700px) { .precisions { display: block; } }

/* Parcours : cartes imbriquées en mosaïque (hauteurs différentes) plutôt qu'alignées */
.content .feed-col .feed, .fiche-parcours .feed { display: block; column-count: 2; column-gap: 18px; }
.content .feed-col .feed > .card, .fiche-parcours .feed > .card { break-inside: avoid; margin-bottom: 18px; }
.content .feed-col .feed > .empty-state { column-span: all; }
@media (max-width: 760px) { .content .feed-col .feed, .fiche-parcours .feed { column-count: 1; } }

/* Fiche métier sur mobile : le titre et les cadres doivent tenir dans l'écran */
.fiche-hero h1 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 700px) {
  .fiche-hero { padding: 26px 22px; border-radius: 26px; }
  .fiche-hero h1 { font-size: 30px; line-height: 1.12; }
  .chiffres strong { font-size: 24px; }
  .m-hero h1 { font-size: 32px; }
}

/* Cases de chiffres de la fiche métier : un petit titre fixe au-dessus de chaque valeur */
.chiffres li em { font: 600 11px 'Poppins', sans-serif; font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }

/* ---------- Formulaires : champs côte à côte alignés, choix centrés ---------- */
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; gap: 0 16px; }
.field-row .field-group { display: grid; grid-template-rows: subgrid; grid-row: span 4; align-content: start; }
.field-row[hidden] { display: none; }
.field-row .field-group > label { align-self: end; }   /* les cases de saisie restent sur la même ligne, même si une étiquette passe sur 2 lignes */
@media (max-width: 600px) {
  .field-row { display: block; }
  .field-row .field-group { display: block; }
}
.choices { align-items: center; gap: 12px; }
.field-group .choice { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; padding: 12px 20px 12px 16px; font-size: 14px; font-weight: 500; line-height: 1; }
.field-group .choice input { margin: 0; flex: none; width: 18px; height: 18px; }
.field-group .choice span { display: block; line-height: 1.2; }

/* ---------- Listes déroulantes (tout le site) : flèche bien rentrée vers l'intérieur ---------- */
.field-group select, .dbar select, .ffilters select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236A6886' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 24px center; background-size: 12px 8px;
  padding-right: 52px; text-overflow: ellipsis;
}
.field-group select:focus, .dbar select:focus, .ffilters select:focus { background-color: var(--white); }

/* ---------- Notifications : texte à la ligne, marges intérieures ---------- */
.notif-panel { width: 380px; max-height: min(520px, 80vh); overflow-y: auto; right: -40px; }
.notif-head { padding: 18px 22px; gap: 16px; }
.notif-readall { white-space: nowrap; font-size: 12.5px; }
.notif-panel .notif-item, .nav-links .notif-panel .notif-item { white-space: normal; font-weight: 400; display: flex; padding: 15px 22px; gap: 14px; text-align: left; }
.notif-text { min-width: 0; flex: 1; overflow-wrap: anywhere; word-break: normal; line-height: 1.5; }
.notif-text small { margin-top: 5px; }
.notif-empty { padding: 24px 22px; }
@media (max-width: 1000px) { .notif-panel { right: -20px; } }

/* ---------- Carte de parcours entièrement cliquable ----------
   Le lien du titre s'étend sur toute la carte ; les autres liens et boutons passent au-dessus. */
.card { position: relative; transition: border-color .2s ease, box-shadow .2s ease; }
.card:has(.card-title a):hover { border-color: #DAD7F7; box-shadow: var(--ombre); }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card .card-name a, .card .card-actions a, .card .card-actions button, .card .like-form { position: relative; z-index: 2; }
.card-title a:focus-visible::after { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* Page d'un parcours : un peu d'air entre l'icône et le texte des actions (commentaires, partage…) */
.detail-action .icon { margin-right: 8px; }
.detail-actions .like-btn .icon { margin-right: 8px; }

/* Commentaires : la photo de profil mène aussi au profil */
.comment-avatar { display: flex; flex-shrink: 0; align-self: flex-start; border-radius: 8px; }
.comment-avatar:hover .avatar { opacity: .85; }

/* Découvrir : cartes en grille (3 par ligne sur grand écran, 2 puis 1 en réduisant), bien séparées */
.content-colonne .feed-col .feed { display: grid; column-count: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.content-colonne .feed-col .feed > .card { margin-bottom: 0; height: 100%; display: flex; flex-direction: column; }
.content-colonne .feed-col .feed > .card .card-body { display: flex; flex-direction: column; flex: 1; }
.content-colonne .feed-col .feed > .card .card-actions { margin-top: auto; }
.content-colonne .feed-col .feed > .empty-state { grid-column: 1 / -1; }
@media (max-width: 1080px) { .content-colonne .feed-col .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .content-colonne .feed-col .feed { grid-template-columns: minmax(0, 1fr); } }

/* Fiche métier : le résumé (au-dessus de « Une journée type ») aéré et facile à lire */
.fiche-intro { background: var(--white); border: 1px solid #E6E3FA; border-radius: 24px; padding: 28px 34px 30px; box-shadow: var(--ombre); }
.fiche-intro .intro-label { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--terracotta-text); margin: 0 0 14px; }
.fiche-intro p.intro-lead { font-family: 'Poppins', sans-serif; font-size: 19px; font-weight: 500; line-height: 1.6; color: var(--deep); max-width: 62ch; margin: 0; letter-spacing: -0.005em; }
.fiche-intro .intro-suite { margin-top: 22px; padding: 4px 0 4px 18px; border-left: 3px solid #D9D5FB; max-width: 66ch; }
.fiche-intro .intro-suite + .intro-suite { margin-top: 16px; }
.fiche-intro .intro-suite-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.fiche-intro .intro-suite p { font-size: 15.5px; line-height: 1.8; color: var(--text-body); margin: 0; }
@media (max-width: 760px) {
  .fiche-intro { padding: 22px 20px 24px; border-radius: 20px; }
  .fiche-intro p.intro-lead { font-size: 17px; }
  .fiche-intro .intro-suite { padding-left: 14px; }
  .fiche-intro .intro-suite p { font-size: 15px; }
}
.fiche-intro p.intro-corps { font-size: 16px; line-height: 1.8; color: var(--text-body); max-width: 66ch; margin: 14px 0 0; }
.fiche-intro p.intro-lead { font-size: 20px; line-height: 1.5; }
@media (max-width: 760px) { .fiche-intro p.intro-lead { font-size: 18px; } .fiche-intro p.intro-corps { font-size: 15px; } }

/* Écoles : « Réinitialiser » à côté d'« Appliquer » */
.ffilters-reset { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; color: var(--terracotta-text); padding: 10px 14px; border-radius: 999px; border: 1px solid #DAD7F7; background: var(--white); align-self: flex-end; }
.ffilters-reset:hover { background: #F3F2FF; }
.ffilters label { flex: 1 1 120px; }
.ffilters-reset, .ffilters-apply { white-space: nowrap; flex: 0 0 auto; }
.ffilters label { flex: 1 1 100px; min-width: 0; }
.ffilters select { width: 100%; min-width: 0; }
.ffilters select { padding-left: 12px; padding-right: 38px; background-position: right 16px center; }
.ffilters { gap: 10px; }
.ffilters-reset { padding: 10px 12px; }
.ffilters-apply { padding: 10px 20px; }

/* Types de formation en bref : 8 cartes, 8 couleurs bien distinctes */
.gloss-card:nth-child(1) { background: #ECEBFF; }
.gloss-card:nth-child(2) { background: #FFF0C9; }
.gloss-card:nth-child(3) { background: #DDF5E8; }
.gloss-card:nth-child(4) { background: #DCEEFF; }
.gloss-card:nth-child(5) { background: #FFE5D6; }
.gloss-card:nth-child(6) { background: #FFE0EC; }
.gloss-card:nth-child(7) { background: #EFE0FF; }
.gloss-card:nth-child(8) { background: #D9F3F2; }

/* Couleurs de cartes supplémentaires : CAP, BEP, Titre professionnel */
.fc-t6 { --fc-bg: #E8F3CE; --fc-fg: #6B8E10; } .fc-t7 { --fc-bg: #F3E6D3; --fc-fg: #A0652A; } .fc-t8 { --fc-bg: #E1E6EE; --fc-fg: #4A5A78; }

/* Types de formation en bref : 4 cartes de plus (CAP, BEP, titre professionnel, alternance) */
.gloss-card:nth-child(9) { background: #E8F3CE; }
.gloss-card:nth-child(10) { background: #F3E6D3; }
.gloss-card:nth-child(11) { background: #E1E6EE; }
.gloss-card:nth-child(12) { background: #FFD9D4; }
.empty-state a:not(.btn-primary) { color: var(--terracotta-text); font-weight: 600; text-decoration: underline; }
.empty-state a.btn-primary, .empty-state a.btn-primary:hover { color: var(--white); text-decoration: none; }

/* Fiche formation : toute la carte « établissement » ouvre Google Maps (pas seulement le lien) */
.fd-side { position: relative; transition: box-shadow .2s ease, border-color .2s ease; }
.fd-side:has(.fd-where a):hover { border-color: #DAD7F7; box-shadow: var(--ombre-forte); }
.fd-where a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.fd-where a:focus-visible::after { outline: 2px solid var(--terracotta); outline-offset: -2px; }

/* Fiche formation : parcours liés (au-dessus des métiers liés) */
.fd-parcours { margin-top: 36px; }
.fd-parcours h2 { font-family: 'Poppins', sans-serif; font-size: 24px; color: var(--deep); margin-bottom: 6px; }
.fd-parcours-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.fd-parcours-grid > .card { margin: 0; height: 100%; display: flex; flex-direction: column; }
.fd-parcours-grid > .card .card-body { display: flex; flex-direction: column; flex: 1; }
.fd-parcours-grid > .card .card-actions { margin-top: auto; }
@media (max-width: 1000px) { .fd-parcours-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .fd-parcours-grid { grid-template-columns: minmax(0, 1fr); } }

/* Formulaire de parcours : choix d'une formation de l'annuaire */
.formation-picker { position: relative; }
.picker-results { list-style: none; margin: 4px 0 0; padding: 6px; position: absolute; left: 0; right: 0; z-index: 20; background: var(--white); border: 1px solid #DAD7F7; border-radius: 16px; box-shadow: var(--ombre-forte); max-height: 280px; overflow-y: auto; }
.picker-results li { padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--text-body); cursor: pointer; }
.picker-results li:hover, .picker-results li:focus { background: #F3F2FF; color: var(--deep); outline: none; }
.formation-picker .link-button { margin-left: 6px; }

/* Fiche formation : le bouton « Ajouter aux favoris » du bas s'anime au survol pour donner envie de cliquer */
.fd-pill { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.fd-pill:has(button:not(.on)):hover { transform: translateY(-3px); border-color: var(--terracotta); box-shadow: 0 16px 36px rgba(91,77,245,.28); }
.fd-pill button { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.fd-pill button:not(.on):hover, .fd-pill button:not(.on):focus-visible { transform: scale(1.06); box-shadow: 0 8px 20px rgba(91,77,245,.45); background: #4A3CE0; }
.fav-coeur { font-style: normal; display: inline-block; margin-right: 8px; }
.fav-coeur::before { content: "\2661"; }
@media (prefers-reduced-motion: reduce) { .fd-pill, .fd-pill button { transition: none; } }

/* Champs mot de passe : œil pour afficher / masquer */
.mdp-champ { position: relative; display: block; }
.mdp-champ input { width: 100%; padding-right: 50px; }
.mdp-oeil { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--text-muted); border-radius: 50%; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.mdp-oeil:hover, .mdp-oeil:focus-visible { color: var(--terracotta-text); background: #F3F2FF; outline: none; }

/* Inscription : règles du mot de passe qui se cochent en direct */
.mdp-regles { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-muted); }
.mdp-regles li { display: flex; align-items: center; gap: 8px; transition: color .2s ease; }
.mdp-regles li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid #CFCCE6; background: var(--white); transition: all .2s ease; }
.mdp-regles li.ok { color: #1E7F58; font-weight: 600; }
.mdp-regles li.ok::before { background: #1E9E6A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: #1E9E6A; }
.mdp-regles li.ko::before { border-color: #E0457B; }

/* Formulaire « Partager mon parcours » en quiz : une question à la fois */
.publish-form .etape[data-masque="1"] { display: none; }
.publish-form.quiz .etape:not(.active) { display: none; }
.etape-question { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 22px; color: var(--deep); letter-spacing: -0.02em; margin: 0 0 18px; }
.quiz-progression { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; }
.quiz-rail { height: 6px; border-radius: 99px; background: #ECEAFB; overflow: hidden; margin-bottom: 26px; }
.quiz-rail span { display: block; height: 100%; border-radius: 99px; background: var(--degrade, var(--terracotta)); transition: width .35s ease; }
.quiz-boutons { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; }
.quiz-boutons .quiz-precedent { background: none; border: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; padding: 10px 4px; }
.quiz-boutons .quiz-precedent:hover { color: var(--terracotta); }
.quiz-boutons .btn-submit { margin-left: auto; }
.quiz-message:empty { display: none; }
.quiz-message { margin: 10px 0 0; }
.picker-results .picker-autre { color: var(--terracotta); font-weight: 600; border-top: 1px solid #EEEDFB; border-radius: 10px; margin-top: 4px; }
.picker-secteur[hidden] { display: none; }
.publish-form .etape .choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (prefers-reduced-motion: reduce) { .quiz-rail span { transition: none; } }
.form-actions[hidden], .quiz-boutons [hidden] { display: none; }
.etape[data-etape="type"] .field-label, .etape[data-etape="nom"] .field-label { display: none; }

/* Recherche des métiers sur tablette : champ pleine largeur, bouton à côté (pas écrasé sous le champ) */
@media (min-width: 701px) and (max-width: 1024px) {
  .metier-search, .m-hero .metier-search { max-width: none; flex-direction: row; align-items: stretch; }
  .metier-search button, .m-hero .metier-search button { width: auto; padding: 0 30px; flex: none; }
  .m-hero p { max-width: 620px; }
}

/* Fiche métier sur tablette et mobile : les cards « Ils l'ont fait » et « Pour aller plus loin » ne s'intercalent plus entre l'en-tête et le contenu */
@media (max-width: 860px) {
  .fiche-layout > .fiche-side { display: none; }
}

/* Types de formation sans résultat avec les filtres actuels : toujours là, en plus discret */
.type-tab.sans-resultat { opacity: .55; }
.type-tab.sans-resultat:hover { opacity: 1; }

/* Accueil sur mobile : même esprit que sur ordinateur (pastilles qui mordent un peu sur les coins du bloc),
   mais sans jamais recouvrir le texte de « Parcours récents » */
@media (max-width: 600px) {
  .hero-visual { padding: 38px 0 52px; }
  .mock { padding: 22px 20px 14px; }
  .chip { padding: 10px 16px; border-radius: 18px; }
  .chip strong { font-size: 22px; }
  .chip-b { top: 0; right: 4px; }
  .chip-a { bottom: 0; left: 4px; }
}

/* Fiche métier sur mobile : le bouton « Partager mon parcours » (et le lien « Voir tous ») sont centrés */
@media (max-width: 600px) {
  .fiche-more { text-align: center; }
}

/* Écoles sur mobile : « Autour de moi » est décalé sous le bouton Rechercher (son ombre ne le colle plus) */
@media (max-width: 600px) {
  .geo-row { margin-top: 22px; }
}

/* Card « Votre parcours n'est pas encore publié » : bouton blanc sur fond violet, pour bien ressortir */
.side-card-dark .btn-menu-primary { background: var(--white); color: var(--terracotta-text); box-shadow: 0 6px 16px rgba(20, 14, 80, .25); }
.side-card-dark .btn-menu-primary:hover { background: #F3F2FF; color: var(--deep); }

/* Partager mon parcours (mobile) : les 3 choix de type alignés, même largeur */
@media (max-width:600px){
  .publish-form .etape[data-etape="type"] .choices{grid-template-columns:1fr;gap:10px}
  .publish-form .etape[data-etape="type"] .choice{justify-content:flex-start;width:100%;box-sizing:border-box}
}
