/* Correctifs DA Diagnostic AOS / Cosmic LB pour les pages d'outils.
   Charge apres les styles locaux afin d'eviter les textes clairs sur fonds blancs. */

:root {
  --aos-ink: #F2F4F6;
  --aos-ink-strong: #ffffff;
  --aos-muted: rgba(242, 244, 246, 0.64);
  --aos-muted-soft: rgba(242, 244, 246, 0.46);
  --aos-paper: #0d0a0a;
  --aos-surface: rgba(242, 244, 246, 0.065);
  --aos-surface-strong: rgba(242, 244, 246, 0.10);
  --aos-field: rgba(8, 9, 10, 0.74);
  --aos-line: rgba(242, 244, 246, 0.13);
  --aos-line-strong: rgba(192, 160, 96, 0.36);
  --aos-gold: #c0a060;
  --aos-gold-soft: #d4b878;
  --aos-wine: #34141C;
  --aos-wine-soft: #4A1D28;
}

body,
body.min-h-screen,
.main,
.main.grid-bg {
  background:
    linear-gradient(135deg, rgba(52, 20, 28, 0.96) 0%, rgba(13, 10, 10, 0.98) 55%, rgba(23, 25, 27, 0.98) 100%) !important;
  color: var(--aos-ink) !important;
}

body.auth-body {
  background: #f6f1ea !important;
  color: var(--ink) !important;
}

body.auth-body .auth-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(192, 160, 96, 0.18), transparent 34%),
    linear-gradient(135deg, #34141C 0%, #0d0a0a 58%, #1c2330 100%) !important;
  color: #ffffff !important;
}

body.auth-body .auth-panel .panel,
body.auth-body .auth-panel .session-card {
  background: #ffffff !important;
  color: #0d0a0a !important;
  border-color: rgba(13, 10, 10, 0.10) !important;
}

body.auth-body .auth-panel h1,
body.auth-body .auth-panel h2,
body.auth-body .auth-panel h3,
body.auth-body .auth-panel strong,
body.auth-body .auth-panel label {
  color: #0d0a0a !important;
}

body.auth-body .auth-panel p,
body.auth-body .auth-panel small,
body.auth-body .auth-panel .panel-copy,
body.auth-body .auth-panel .empty {
  color: #5a5050 !important;
}

body.auth-body .auth-panel input,
body.auth-body .auth-panel select,
body.auth-body .auth-panel textarea {
  background: #ffffff !important;
  color: #0d0a0a !important;
  border-color: rgba(13, 10, 10, 0.14) !important;
}

body.auth-body .auth-panel input::placeholder {
  color: rgba(13, 10, 10, 0.35) !important;
}

.main h1,
.main h2,
.main h3,
.main h4,
.main strong,
.main .font-semibold,
.main .font-bold,
.topbar h2,
.topbar h3,
.panel h3,
.panel strong {
  color: var(--aos-ink-strong) !important;
}

.main p,
.main small,
.main .meta,
.main .empty,
.main .panel-copy,
.main .text-zinc-600,
.main .text-zinc-500,
.main .text-zinc-400,
.main .text-slate-600,
.main .text-gray-600,
.main .tool-card small,
.map-copy,
.synthese-copy,
.offer-copy,
.res-copy,
.prop-copy,
.editorial-copy,
.finance-copy {
  color: var(--aos-muted) !important;
}

.main .text-zinc-900,
.main .text-zinc-800,
.main .text-zinc-700,
.main .text-slate-900,
.main .text-gray-900,
.main .text-gray-800,
.main .text-gray-700 {
  color: var(--aos-ink) !important;
}

.panel,
.session-card,
.tool-card,
.tool-completed,
.summary-grid div,
.item,
.number-card,
.person-row,
.portal-choice,
.map-panel,
.dimension-card,
.check-option,
.priority-list div,
.blueprint-section,
.synthese-panel,
.blueprint-card,
.offer-panel,
.offer-tile,
.pilier-card,
.sous-row,
.sous-info,
.res-panel,
.res-card,
.person-list,
.assign-modal,
.prop-panel,
.prop-card,
.prop-password,
.settings-panel,
.offer-block,
.editorial-block,
.choice-card,
.series-group,
.post-card,
.editorial-details,
.finance-panel,
.finance-card,
.cash-month,
.forecast-month,
.main .bg-white,
.main .bg-zinc-50,
.main .card,
.main .card-check,
.main form#brief-form,
.main .shadow-sm,
.main .shadow-md {
  background: var(--aos-surface) !important;
  border-color: var(--aos-line) !important;
  color: var(--aos-ink) !important;
  box-shadow: none !important;
}

.main .bg-accent-soft,
.main .bg-cosmic-cream,
.main .bg-zinc-100,
.main .bg-zinc-200,
.editorial-details,
.offer-blueprint,
.blueprint-synthese,
.task-doc,
.task-time,
.modal .note-box {
  background: rgba(192, 160, 96, 0.10) !important;
  border-color: rgba(192, 160, 96, 0.22) !important;
  color: var(--aos-ink) !important;
}

.map-field input,
.map-field select,
.map-field textarea,
.synthese-field input,
.synthese-field select,
.synthese-field textarea,
.offer-field input,
.offer-field select,
.offer-field textarea,
.res-field input,
.res-field select,
.res-field textarea,
.prop-field input,
.prop-field select,
.prop-field textarea,
.settings-field input,
.settings-field select,
.settings-field textarea,
.editorial-field input,
.editorial-field select,
.editorial-field textarea,
.finance-field input,
.finance-field select,
.finance-field textarea,
.main input:not([type="checkbox"]):not([type="radio"]),
.main select,
.main textarea,
.prompt-output,
.content-output,
.finance-table input,
.finance-table select,
.month-status-select {
  background: var(--aos-field) !important;
  border-color: var(--aos-line) !important;
  color: var(--aos-ink) !important;
  box-shadow: none !important;
}

.map-field input::placeholder,
.map-field textarea::placeholder,
.synthese-field input::placeholder,
.synthese-field textarea::placeholder,
.offer-field input::placeholder,
.offer-field textarea::placeholder,
.res-field input::placeholder,
.res-field textarea::placeholder,
.prop-field input::placeholder,
.prop-field textarea::placeholder,
.settings-field input::placeholder,
.settings-field textarea::placeholder,
.editorial-field input::placeholder,
.editorial-field textarea::placeholder,
.finance-field input::placeholder,
.finance-field textarea::placeholder,
.main input::placeholder,
.main textarea::placeholder {
  color: rgba(242, 244, 246, 0.34) !important;
}

.map-field label,
.synthese-field label,
.offer-field label,
.res-field label,
.prop-field label,
.settings-field label,
.editorial-field label,
.finance-field label,
.main label,
.main .label,
.editorial-block-title,
.card-title {
  color: var(--aos-gold) !important;
}

.btn,
.primary,
.ctrl-btn.primary,
.main button[type="submit"],
.main .bg-zinc-900,
.main .bg-cosmic-dark,
.editorial-tab[aria-selected="true"],
.score-options input:checked + span,
.check-option:has(input:checked),
.choice-card:has(input:checked),
.offer-tile:has(input:checked),
.pilier-card:has(input:checked) {
  background: var(--aos-gold) !important;
  border-color: var(--aos-gold) !important;
  color: #0d0a0a !important;
}

.btn.secondary,
.btn.ghost,
.ctrl-btn,
.main a.inline-flex,
.main button,
.res-card-actions a,
.res-card-actions button,
.prop-card-actions a,
.prop-card-actions button,
.offer-mini-btn,
.sous-modal-close,
#prop-regen-pwd {
  background: rgba(242, 244, 246, 0.045) !important;
  border-color: var(--aos-line-strong) !important;
  color: var(--aos-gold-soft) !important;
}

.btn:hover,
.ctrl-btn:hover,
.main a.inline-flex:hover,
.main button:hover,
.res-card-actions a:hover,
.res-card-actions button:hover,
.prop-card-actions a:hover,
.prop-card-actions button:hover {
  background: rgba(192, 160, 96, 0.16) !important;
  border-color: var(--aos-gold) !important;
  color: var(--aos-ink-strong) !important;
}

.score-options span {
  background: var(--aos-field) !important;
  border-color: var(--aos-line) !important;
  color: var(--aos-muted) !important;
}

.score-options input:checked + span {
  color: #0d0a0a !important;
}

.badge,
.tag,
.status-pill,
.row-tags em,
.main .rounded-full,
.res-type,
.prop-status,
.editorial-badge,
.post-angle,
.finance-status,
.finance-chip {
  background: rgba(242, 244, 246, 0.07) !important;
  border-color: var(--aos-line) !important;
  color: var(--aos-gold-soft) !important;
}

.res-card-head strong,
.prop-card-head strong,
.editorial-block-title strong,
.series-head strong,
.post-head strong,
.blueprint-card .blueprint-meta strong,
.meta-lines strong,
.offer-output strong,
.sous-modal-title,
.sous-modal-section p,
.finance-table td,
.forecast-month strong,
.person-row label {
  color: var(--aos-ink) !important;
}

.finance-table,
.finance-table th,
.finance-table td,
.cash-table,
.cash-table th,
.cash-table td {
  background: transparent !important;
  border-color: var(--aos-line) !important;
}

.finance-table th,
.cash-table th {
  color: var(--aos-gold) !important;
}

.modal,
.sous-modal,
.assign-modal,
.main [style*="background:white"],
.main [style*="background: white"],
.main [style*="background:#fff"],
.main [style*="background: #fff"] {
  background: #15181d !important;
  border-color: var(--aos-line-strong) !important;
  color: var(--aos-ink) !important;
}

.main [style*="color:var(--ink)"],
.main [style*="color: var(--ink)"] {
  color: var(--aos-ink) !important;
}

.main .border-zinc-200,
.main .border-zinc-300,
.main .border-gray-200,
.main .border-slate-200 {
  border-color: var(--aos-line) !important;
}

.main .ring-accent,
.main .focus\:ring-accent:focus {
  --tw-ring-color: rgba(192, 160, 96, 0.38) !important;
}

.main input[type="checkbox"],
.main input[type="radio"] {
  accent-color: var(--aos-gold);
}

.main table,
.main th,
.main td {
  color: var(--aos-ink) !important;
  border-color: var(--aos-line) !important;
}

.main ::selection {
  background: rgba(192, 160, 96, 0.28);
  color: #fff;
}

.main .btn.primary,
.main .btn-primary,
.main .btn-gold,
.main .primary:not(.ctrl-btn),
.main button[type="submit"],
.main button.bg-zinc-900,
.main button.bg-cosmic-dark,
.main .bg-zinc-900[type="button"],
.main .bg-zinc-900[type="submit"] {
  background: var(--aos-gold) !important;
  border-color: var(--aos-gold) !important;
  color: #0d0a0a !important;
}

.main .btn.primary:hover,
.main .btn-primary:hover,
.main .btn-gold:hover,
.main .primary:not(.ctrl-btn):hover,
.main button[type="submit"]:hover,
.main button.bg-zinc-900:hover,
.main button.bg-cosmic-dark:hover {
  background: var(--aos-gold-soft) !important;
  border-color: var(--aos-gold-soft) !important;
  color: #0d0a0a !important;
}

@media (max-width: 760px) {
  .main,
  .main.grid-bg {
    background:
      linear-gradient(180deg, rgba(52, 20, 28, 0.98) 0%, rgba(13, 10, 10, 0.98) 72%, rgba(23, 25, 27, 0.98) 100%) !important;
  }
}
