/* =============================================================================
   Lot Dashboard — accueil, identité « Journal financier V1 » (maquette index.html).
   Les composants de la maquette (.desk, .vix, .clocks, .cote, .broker, .rubric…) sont dans journal.css ;
   ici : ce qui relie ces composants aux blocs vivants du site (widgets TradingView après accord, horloges
   calculées, calendrier, actualités). L'ancienne grille du tableau de bord sombre est retirée.
   ========================================================================== */

.mw-db { padding: 0; }

/* ------------------------------------------------------------------ emplacements TradingView (inchangés) */
.mw-db-tv { position: relative; min-width: 0; border-radius: var(--mw-r-md); background: var(--mw-bg-2); border: 1px solid var(--mw-line); overflow: hidden; }
.mw-db-tv__wait {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: var(--mw-s-2);
  padding: var(--mw-s-3); text-align: center; font-size: var(--mw-fs-sm); color: var(--mw-text-3);
}
.mw-db-tv__wait .mw-icon { flex: none; width: 18px; height: 18px; color: var(--mw-text-3); }
.mw-db-tv__frame { position: absolute; inset: 0; }
.mw-db-tv__frame:empty { display: none; }
.mw-db-tv.is-loaded .mw-db-tv__wait { display: none; }
.mw-db-tv.is-loading .mw-db-tv__wait .mw-icon { animation: mw-spin 1.2s linear infinite; }
.mw-db-tv.is-error .mw-db-tv__wait { color: var(--mw-text-2); }
.mw-db-tv.is-error .mw-db-tv__wait .mw-icon { color: var(--mw-warn); animation: none; }
.mw-db-tv .tradingview-widget-container, .mw-db-tv .tradingview-widget-container__widget { width: 100%; height: 100%; }
.mw-db-tv .tradingview-widget-copyright { position: absolute; right: 8px; bottom: 4px; font-size: 11px; line-height: 1; }
.mw-db-tv .tradingview-widget-copyright a { color: var(--mw-text-3); text-decoration: none; }
.mw-db-tv .tradingview-widget-copyright a:hover { color: var(--mw-text-2); }
.mw-db-tv iframe { display: block; border: 0; }
@media (prefers-reduced-motion: reduce) { .mw-db-tv.is-loading .mw-db-tv__wait .mw-icon { animation: none; } }
/* Les widgets transparents ont besoin de ce schéma de couleurs pour ne pas peindre un fond clair opaque. */
.mw-db-tv--tickers iframe, .mw-db-tv--mini iframe, .mw-db-tv--quotes iframe { color-scheme: light; }

/* ------------------------------------------------------------------ états (trades, calendrier) */
.mw-db-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--mw-s-3) 0 0; }
.mw-db-state__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mw-surface-2); border: 1px solid var(--mw-line); color: var(--mw-text-2); margin-bottom: 4px; }
.mw-db-state__icon .mw-icon { width: 20px; height: 20px; }
.mw-db-state__icon--warn { color: var(--mw-warn); }
.mw-db-state__title { font-weight: 600; color: var(--mw-text); }
.mw-db-state__text { font-size: var(--mw-fs-sm); color: var(--mw-text-2); max-width: 56ch; }
.mw-db-state .mw-link-arrow { min-height: 44px; font-size: var(--mw-fs-sm); }

/* ------------------------------------------------------------------ 1. premier écran */
.desk__grid--solo { grid-template-columns: minmax(0, 1fr); }
.desk__grid--solo .desk__main { padding-right: 0; }
.vix__src { margin: 0; font-size: 11px; font-style: italic; color: var(--on-navy-soft); text-align: right; max-width: 22ch; }
.chart-ph--vix { background: transparent; }
.chart-ph--vix .mw-db-tv { position: absolute; inset: 0; border: 0; background: transparent; }
.chart-ph--vix .mw-db-tv--mini { height: auto; }
.chart-ph--vix .tradingview-widget-copyright { display: none; } /* crédit TradingView écrit en bas de page */
.chart-ph__consent[hidden], .chart-ph__consent > [hidden] { display: none; }
.chart-ph--vix .chart-ph__consent { inset: 0; z-index: 3; background: rgba(7, 29, 58, .82); }
.vix__wait--static { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; }
@media (max-width: 900px) { .chart-ph--vix { height: 200px; } }

/* Horloges : état écrit par dashboard.js dans data-state (open, closed, break, weekend, holiday, unknown). */
.clock__status { color: var(--down); }
.clock[data-state="open"] .clock__status { color: var(--up); }
.clock[data-state="holiday"] .clock__status, .clock[data-state="break"] .clock__status { color: var(--gold-ink); }
.clock[data-state="pending"] .clock__status, .clock[data-state="unknown"] .clock__status { color: var(--ink-soft); }
.clock__time { font-variant-numeric: tabular-nums; }
.clock__hours { line-height: 1.35; }
.clock__count { display: block; font-weight: 700; color: var(--ink); }
.clock__base { display: none; }   /* l'horaire local est rappelé par « … chez toi » ; texte gardé pour les lecteurs d'écran ci-dessous */
.clock__count:empty { display: none; }
.clock__local { display: block; }
.desk { padding-top: 14px; }
.desk__head { margin-bottom: 12px; }
.desk__grid { padding-top: 14px; }
.clocks--desk .clock { padding-top: 12px; padding-bottom: 10px; }
.clock__local:empty { display: none; }

/* ------------------------------------------------------------------ 2. calendrier (onglets) et actualités */
.mw-cal--tabs { gap: 0; }
.mw-cal--tabs .mw-cal__scroll { max-height: none; overflow: visible; padding: 0; }
/* Les lignes gardent la classe .mw-cal__row (lue par calendrier.js) : on annule sa mise en grille de la liste. */
.mw-cal--tabs tr.mw-cal__row { display: table-row; min-height: 0; padding: 0; border: 0; font-size: inherit; line-height: inherit; }
.mw-cal--tabs .cote td, .mw-cal--tabs .cote th { vertical-align: top; }
.cote__wrap { white-space: normal !important; }
.mw-cal--tabs tr.is-past td { color: var(--ink-soft); }
.mw-cal--tabs tr.is-next td { background: rgba(200, 168, 106, .16); font-weight: 700; }
.mw-cal--tabs .mw-cal__foot { border-top: 0; padding-top: 10px; }
.mw-cal--tabs .mw-cal__state { min-height: 120px; }

/* Fil d'actualités : balisage vivant du site (mis à jour par dashboard.js), allure de .newslist sans numéros. */
.mw-db-news__list { list-style: none; margin: 0; padding: 0; }
.mw-db-news__item { display: grid; grid-template-columns: 18px 1fr; gap: 0 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.mw-db-news__item:first-child { padding-top: 0; }
.mw-db-news__item::before { content: ""; width: 10px; height: 1px; background: var(--gold-ink); margin-top: .75em; }
.mw-db-news__link { display: grid; gap: 4px; text-decoration: none; color: inherit; }
.mw-db-news__title { order: 1; font-family: var(--f-display); font-size: 20px; line-height: 1.15; }
.mw-db-news__link:hover .mw-db-news__title { text-decoration: underline; text-decoration-color: var(--gold); }
.mw-db-news__meta { order: 2; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; }
.mw-db-news__state[hidden] { display: none; }
.mw-db-news__skel { display: grid; padding-block: 6px; }
.mw-db-news__credit { margin: 14px 0 12px; }
.mw-db-news__credit:empty { display: none; }

/* ------------------------------------------------------------------ 3. brokers partenaires */
.brokers-feature__legal { margin-top: 20px; }
.brokers-feature .broker .arrow-link { color: var(--ink); }
/* La carte est en papier crème dans une section navy : ses textes secondaires reprennent l'encre du papier. */
.sec--navy .broker .meta, .sec--navy .broker p { color: var(--ink-soft); }
.sec--navy .broker a { text-decoration-color: var(--gold-ink); }

/* ------------------------------------------------------------------ 4. indices (widget) */
.indices__in--widget { grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.indices__in--widget .mw-db-tv--tickers { height: 96px; border: 0; background: transparent; margin: 14px 0; }
.indices__in--widget .mw-db-tv--tickers .tradingview-widget-copyright { display: none; }
.indices__note { margin: 0; }
@media (max-width: 1100px) { .indices__in--widget { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 47.99rem) {
  .mw-db-tv--tickers { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .mw-db-tv--tickers::-webkit-scrollbar { display: none; }
  .mw-db-tv--tickers .mw-db-tv__frame { right: auto; width: 600px; }
}

/* ------------------------------------------------------------------ 5. marchés : graphique et cotes */
.chart-ph--main { aspect-ratio: auto; height: 420px; }
.chart-ph--main .mw-db-tv { position: absolute; inset: 40px 0 0; border: 0; border-radius: 0; background: transparent; }
.chart-ph--main .mw-db-tv--chart { height: auto; }
.chart-ph__foot { margin: 10px 0 0; }
.mw-db-tv--quotes { height: 420px; background: transparent; border: 1px solid var(--rule-strong); margin-bottom: 10px; }
.mw-db-tv--quotes .tradingview-widget-copyright { display: none; }
@media (max-width: 640px) { .chart-ph--main { height: 340px; } .mw-db-tv--quotes { height: 380px; } }

/* ------------------------------------------------------------------ 6. dossier du jour */
.sec--ruled { padding-top: 0; }
.lead-story h3 a { text-decoration: none; }
.lead-story h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.lead-story__media { display: block; margin: 0 0 18px; border: 1px solid var(--rule-strong); background: var(--paper-2); }
.lead-story__media img { display: block; width: 100%; height: auto; aspect-ratio: 2220 / 961; object-fit: cover; }
.une__side h2 a { text-decoration: none; }
.une__side h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }

/* ------------------------------------------------------------------ 9. derniers articles */
.art-card__img { display: grid; place-items: center; }
.art-card__img img { width: 100%; height: 100%; object-fit: cover; }
.art-card__img .art-card__mark { width: 26%; height: auto; color: var(--cream); }
.art-card__mark .lg-arc { color: var(--gold); }

/* ------------------------------------------------------------------ 10. communauté */
.bigquote--plain::before { content: none; }
.btn-row--top { margin-top: 32px; }
.salons b a { text-decoration: none; color: inherit; }
.salons b a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.figures--3 { grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
@media (max-width: 1100px) { .figures--3 { grid-template-columns: repeat(3, 1fr); } .figures--3 > div:nth-child(3) { border-left: 1px solid var(--rule-navy); padding-left: 24px; } .figures--3 > div:nth-child(n+3) { border-top: 0; } }
@media (max-width: 640px) { .figures--3 { grid-template-columns: 1fr; } .figures--3 > div, .figures--3 > div:nth-child(3) { border-left: 0; padding-left: 0; } .figures--3 > div + div { border-top: 1px solid var(--rule-navy); } }

/* ------------------------------------------------------------------ 11. live */
.live-frame__top { justify-content: flex-end; }
.live-frame__center .btn { margin-top: 6px; }
.live-pill--block { margin-bottom: 20px; }
.live-more { margin-top: 20px; }

/* ------------------------------------------------------------------ 13. FAQ sans numéros */
.faq--plain summary { grid-template-columns: 1fr 28px; }
.faq--plain .faq__a { padding-left: 0; }

/* ------------------------------------------------------------------ crédit des données de marché */
/* Bande navy collée au pied de page : le crédit ne coupe pas la page d'une bande crème. */
.mw-db__creditbar { background: var(--navy); color: var(--on-navy-soft); border-top: 1px solid var(--rule-navy); }
.mw-db__creditbar[hidden] { display: none; }
.mw-db__credit { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; min-height: 44px; font-size: 13px; }
.mw-db__credit p { margin: 0; }
.mw-db__credit a { color: var(--gold); }
.mw-db__creditbar .mw-db-consent__link { color: var(--gold); font-weight: 400; }
.mw-db__creditbar .mw-db-consent__link:hover { color: var(--cream); }
.mw-db-consent__link { min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 700; color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
.mw-db-consent__link:hover { color: var(--ink); }

/* ------------------------------------------------------------------ téléphone */
@media (max-width: 640px) {
  .vix__src { display: none; }
  .mw-cal--tabs .cote td.cote__wrap { min-width: 170px; }
}
