/* FMCH — compléments pour la navigation corrigée et les espaces en ligne.
   Chargé après style.css et experience.css ; reprend les couleurs et formes validées. */

/* ---------- Navigation : corrections ---------- */
/* L'ancien code masquait « Expériences » entre 760 et 1250 px : on masque plutôt « Accueil » (le logo y mène déjà). */
.desktop-nav a:nth-child(4), .desktop-nav a:nth-child(5) { display: inline; }
.desktop-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 3px; background: var(--gold); }
.desktop-nav a.active:not([aria-current]) { opacity: .86; }
.desktop-nav a.active:not([aria-current])::after { display: none; }
.header-account { display: none; align-items: center; min-height: 44px; padding: 0 14px; font-size: 14px; color: #fff; border: 1px solid #ffffff55; white-space: nowrap; }
.platform-on .header-account { display: inline-flex; }
.header-account:hover, .header-account.active { border-color: var(--gold); color: var(--gold); }
.mobile-menu nav a[aria-current="page"] { color: var(--gold); }
.mobile-menu .nav-account { display: none; }
.platform-on .mobile-menu .nav-account { display: block; }
@media (max-width: 1250px) { .desktop-nav .nav-home { display: none; } }
@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; margin-left: 0; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 760px) { .header-account { display: none !important; } }

/* ---------- Composants des espaces ---------- */
.app-shell { padding-top: 40px; }
.app-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.app-hello p { margin: 6px 0 0; color: #526471; font-size: 16px; }
.app-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 28px; border-bottom: 1px solid #dfe6eb; }
.app-tabs a { padding: 14px 18px; font-size: 15px; font-weight: 600; color: #233e51; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.app-tabs a[aria-current="true"] { border-color: var(--gold); color: #071b2c; }
.app-tabs .count[hidden] { display: none; }
.app-tabs .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; font-size: 12px; background: var(--gold); color: #071b2c; border-radius: 11px; }
.app-panel[hidden] { display: none; }
.app-panel > h2 { font-size: clamp(28px, 3vw, 40px) !important; margin-bottom: 8px !important; }
.app-panel > .lead { color: #526471; font-size: 17px; line-height: 1.7; max-width: 760px; margin: 0 0 24px; }

.item-list { display: grid; gap: 14px; }
.item-card { background: #fff; border: 1px solid #dfe6eb; padding: 22px 24px; display: grid; gap: 10px; }
.item-card.is-accent { border-left: 4px solid var(--gold); }
.item-card h3 { margin: 0; font: 600 21px/1.25 Arial, sans-serif; letter-spacing: -.02em; color: #071b2c; }
.item-card h3 a:hover { color: #805700; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: #546674; align-items: center; }
.item-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.item-actions .button { min-height: 42px; padding: 0 16px; font-size: 14px; }
.button-small { min-height: 40px !important; padding: 0 14px !important; font-size: 14px !important; }
.button-danger { border: 1px solid #a3261b; color: #a3261b; background: #fff; }
.button[disabled] { opacity: .55; pointer-events: none; }

.status-pill { display: inline-block; padding: 4px 10px; font-size: 13px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.tone-ok { color: #1d6b3a; border-color: #9fd0b0; background: #eef8f1; }
.tone-wait { color: #805700; border-color: #e8c66f; background: #fff8e4; }
.tone-no { color: #a3261b; border-color: #e2aaa4; background: #fdf1ef; }
.tone-neutral { color: #3d5466; border-color: #c7d1d9; background: #f4f7f9; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 4px 10px; font-size: 13px; background: #edf3f6; color: #233e51; }
.chips .is-missing { background: #fff; border: 1px dashed #c29534; color: #805700; }

.score { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.score b { font-size: 22px; color: #071b2c; font-variant-numeric: tabular-nums; }
.score-bar { height: 8px; background: #e4ebf0; position: relative; }
.score-bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.score small { grid-column: 1 / -1; color: #546674; font-size: 13px; }
.reasons { margin: 0; padding-left: 18px; color: #3d5466; font-size: 15px; line-height: 1.6; }
.why { font-size: 14px; color: #546674; }
.why summary { cursor: pointer; color: #805700; font-weight: 600; }

.app-form { max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.app-form label { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: #233e51; font-weight: 600; }
.app-form label small { font-weight: 400; color: #546674; font-size: 13px; line-height: 1.5; }
.app-form input, .app-form select, .app-form textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 12px; border: 1px solid #bac8d2; background: #fff; width: 100%; border-radius: 0; }
.app-form textarea { min-height: 110px; resize: vertical; }
.app-form input:focus, .app-form select:focus, .app-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: #c29534; }
.app-form .full, .app-form fieldset, .app-form .form-actions { grid-column: 1 / -1; }
.app-form fieldset { border: 1px solid #dfe6eb; padding: 16px 18px; margin: 0; display: grid; gap: 12px; }
.app-form legend { font-weight: 700; color: #071b2c; padding: 0 6px; }
.app-form .check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; line-height: 1.55; }
.app-form .check input { width: 20px; min-width: 20px; height: 20px; margin-top: 2px; }
.app-form .inline-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.app-form .inline-checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.app-form .inline-checks input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.form-help { font-size: 14px; color: #546674; line-height: 1.6; margin: 0; }

.auth-box { max-width: 560px; }
.auth-switch { display: flex; gap: 0; margin-bottom: 26px; border: 1px solid #bac8d2; width: max-content; max-width: 100%; }
.auth-switch button { font: inherit; font-size: 15px; padding: 12px 18px; border: 0; background: #fff; cursor: pointer; color: #233e51; }
.auth-switch button[aria-selected="true"] { background: #071b2c; color: #fff; }
.auth-box .app-form { grid-template-columns: 1fr; }
.role-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-choice label { border: 1px solid #bac8d2; padding: 14px; cursor: pointer; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 600; }
.role-choice label:has(input:checked) { border-color: #c29534; background: #fff8e4; }
.role-choice small { display: block; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #dfe6eb; border: 1px solid #dfe6eb; margin-bottom: 30px; }
.stats-grid div { background: #fff; padding: 20px; }
.stats-grid strong { display: block; font-size: 32px; font-weight: 500; color: #071b2c; font-variant-numeric: tabular-nums; }
.stats-grid span { font-size: 14px; color: #546674; }

.notif { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid #dfe6eb; }
.notif i { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: transparent; }
.notif.is-new i { background: var(--gold); }
.notif strong { display: block; font-size: 16px; color: #071b2c; }
.notif p { margin: 4px 0 0; font-size: 14px; color: #546674; }
.notif time { font-size: 13px; color: #7b8a95; white-space: nowrap; }

.app-empty { padding: 30px; border: 1px dashed #aabcc9; color: #526471; font-size: 16px; line-height: 1.7; }
.app-loading { padding: 30px 0; color: #546674; }
.offer-detail { max-width: 1100px; display: grid; grid-template-columns: 1.4fr .9fr; gap: 50px; align-items: start; }
.offer-detail aside { position: sticky; top: 110px; background: #edf3f6; padding: 26px; display: grid; gap: 16px; }
.offer-detail .body p { font-size: 17px; line-height: 1.8; color: #3d5466; white-space: pre-line; }
.offer-detail h2 { font-size: 26px !important; margin: 28px 0 10px !important; }

dialog.fmch-dialog { border: 0; padding: 0; max-width: 620px; width: calc(100% - 32px); box-shadow: 0 30px 80px #0006; }
dialog.fmch-dialog::backdrop { background: #071b2cb3; }
dialog.fmch-dialog form { padding: 28px; display: grid; gap: 18px; }
dialog.fmch-dialog h3 { margin: 0; font: 600 24px Arial, sans-serif; }

.fmch-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; background: #071b2c; color: #fff; padding: 14px 20px; font-size: 15px; max-width: calc(100% - 32px); box-shadow: 0 10px 30px #0004; border-left: 4px solid var(--gold); transition: opacity .4s; }
.fmch-toast.is-error { border-left-color: #e0574b; }
.fmch-toast.is-out { opacity: 0; }

.news-dynamic:empty { display: none; }
.article-body p { font-size: 19px; line-height: 1.8; }
.privacy p, .privacy li { font-size: 17px; line-height: 1.8; color: #3d5466; max-width: 860px; }

@media (max-width: 900px) {
  .offer-detail { grid-template-columns: 1fr; gap: 30px; }
  .offer-detail aside { position: static; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app-form { grid-template-columns: 1fr; }
  .app-form > * { grid-column: 1; }
  .app-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .app-tabs a { white-space: nowrap; padding: 12px 12px; }
  .role-choice { grid-template-columns: 1fr; }
  .item-card { padding: 18px; }
  .notif { grid-template-columns: 10px 1fr; }
  .notif time { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .fmch-toast { transition: none; } }
.profile-card.no-photo { display: block !important; }
