/* =========================================================================
   tool-article-modern.css — 2026-04-21
   Estilos modernos para as páginas de ferramentas novas (prochain-jour-ouvre,
   dernier-jour-ouvre-du-mois). Complementa legal-visuals.css.
   ========================================================================= */

/* Wrapper principal do conteúdo abaixo do hero */
.tam-article {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
    color: #1f2937;
    line-height: 1.7;
    font-size: 1.02rem;
}
.tam-article p {
    margin: 0 0 1.1em;
}
.tam-article strong { color: #0b2545; }
.tam-article a {
    color: #0071e3;
    text-decoration: underline;
    text-decoration-color: rgba(0,113,227,0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}
.tam-article a:hover { text-decoration-color: #0071e3; }
.tam-article code {
    background: #f1f5f9;
    color: #0b2545;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, 'Roboto Mono', Monaco, Consolas, monospace;
    border: 1px solid #e2e8f0;
}
.tam-article pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 22px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 1.4em 0;
}
.tam-article pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* H2 moderno com barra lateral em gradiente */
.tam-article h2 {
    position: relative;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0b2545;
    margin: 2.4em 0 0.8em;
    padding: 10px 0 10px 22px;
    line-height: 1.3;
}
.tam-article h2::before {
    content: '';
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #0071e3 0%, #003f87 100%);
}

/* Tabelas modernas */
.tam-article .table-data,
.tam-article table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    background: #fff;
    border: 1px solid #e2e8f0;
}
.tam-article table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    color: #0b2545;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 2px solid #dbe3ed;
}
.tam-article table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}
.tam-article table tbody tr:last-child td { border-bottom: 0; }
.tam-article table tbody tr:hover { background: #f8fbff; }
.tam-article table tbody td strong { color: #0b2545; }

/* Callout boxes — diferenciadas por cor */
.tam-article .info-box--amber,
.tam-article .info-box--blue,
.tam-article .info-box--green,
.tam-article .info-box--red {
    margin: 1.6em 0;
    padding: 18px 22px 18px 60px;
    border-radius: 12px;
    position: relative;
    border-left: 4px solid;
    line-height: 1.6;
}
.tam-article .info-box--amber {
    background: #fffaeb;
    border-left-color: #d97706;
    color: #78350f;
}
.tam-article .info-box--blue {
    background: #eff6ff;
    border-left-color: #0071e3;
    color: #0b2545;
}
.tam-article .info-box--green {
    background: #ecfdf5;
    border-left-color: #059669;
    color: #064e3b;
}
.tam-article .info-box--red {
    background: #fef2f2;
    border-left-color: #dc2626;
    color: #7f1d1d;
}
.tam-article [class*='info-box--']::before {
    content: '';
    position: absolute;
    left: 18px; top: 20px;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    font-size: 0.95rem;
}
.tam-article .info-box--amber::before { background: #d97706; content: '!'; }
.tam-article .info-box--blue::before  { background: #0071e3; content: 'i'; }
.tam-article .info-box--green::before { background: #059669; content: '✓'; }
.tam-article .info-box--red::before   { background: #dc2626; content: '⚠'; }

.tam-article [class*='info-box--'] h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: inherit;
}
.tam-article [class*='info-box--'] p:last-child { margin-bottom: 0; }

/* Steps modernos v3 — grid numerado com gradiente */
.tam-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 2em 0;
    counter-reset: step;
}
.tam-steps__card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 26px 22px 22px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    counter-increment: step;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tam-steps__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.12);
    border-color: #0071e3;
}
.tam-steps__card::before {
    content: counter(step);
    position: absolute;
    top: -14px; left: 20px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0071e3 0%, #003f87 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
}
.tam-steps__title {
    margin: 6px 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b2545;
}
.tam-steps__desc {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
}

/* "What is" header com ícone grande e fundo em gradiente */
.tam-hero-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f1ff 50%, #ddeaff 100%);
    border: 1px solid #c7ddfa;
    border-radius: 18px;
    padding: 28px 30px;
    margin: 24px 0 32px;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.08);
}
.tam-hero-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.tam-hero-card__icon {
    width: 52px; height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #0071e3 0%, #003f87 100%);
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 6px 14px rgba(0, 113, 227, 0.25);
}
.tam-hero-card__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b2545;
}
.tam-hero-card__lead {
    margin: 0 0 18px;
    font-size: 1.08rem;
    line-height: 1.65;
    color: #1e3a5f;
}
.tam-hero-card__lead strong { color: #003f87; }

.tam-hero-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.tam-hero-card__fact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #d8e4f3;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.94rem;
}
.tam-hero-card__fact-icon {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #dff0ff;
    color: #0071e3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 900;
    margin-top: 1px;
}
.tam-hero-card__fact strong {
    display: block;
    color: #0b2545;
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 0.92rem;
}

/* Dark mode */
body.dark-mode .tam-article { color: #cbd5e1; }
body.dark-mode .tam-article strong { color: #f1f5f9; }
body.dark-mode .tam-article h2 { color: #f1f5f9; }
body.dark-mode .tam-article code {
    background: #1e293b;
    color: #93c5fd;
    border-color: #334155;
}
body.dark-mode .tam-article table {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .tam-article table thead th {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f1f5f9;
    border-bottom-color: #334155;
}
body.dark-mode .tam-article table tbody td {
    border-bottom-color: #334155;
    color: #cbd5e1;
}
body.dark-mode .tam-article table tbody tr:hover { background: #273548; }
body.dark-mode .tam-article table tbody td strong { color: #f1f5f9; }
body.dark-mode .tam-steps__card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .tam-steps__title { color: #f1f5f9; }
body.dark-mode .tam-steps__desc  { color: #94a3b8; }
body.dark-mode .tam-hero-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}
body.dark-mode .tam-hero-card__title { color: #f1f5f9; }
body.dark-mode .tam-hero-card__lead { color: #cbd5e1; }
body.dark-mode .tam-hero-card__lead strong { color: #f1f5f9; }
body.dark-mode .tam-hero-card__fact {
    background: #273548;
    border-color: #3b4a61;
    color: #cbd5e1;
}
body.dark-mode .tam-hero-card__fact strong { color: #f1f5f9; }
body.dark-mode .tam-hero-card__fact-icon { background: #1d3a5f; color: #93c5fd; }

body.dark-mode .tam-article .info-box--amber { background: #3d2e05; color: #fcd34d; }
body.dark-mode .tam-article .info-box--blue  { background: #0a1d3a; color: #93c5fd; }
body.dark-mode .tam-article .info-box--green { background: #052e25; color: #6ee7b7; }
body.dark-mode .tam-article .info-box--red   { background: #3a0a0a; color: #fca5a5; }

/* =========================================================================
   lv-what-is — upgrade visuel moderne (fiches info + résumé « Zoom »).
   Remplace les puces plates par des cartes individuelles avec icône colorée,
   fond dégradé, effet hover et meilleure hiérarchie typographique.
   ========================================================================= */

.lv-what-is {
    position: relative;
    margin: 28px 0;
    padding: 28px 30px;
    background: linear-gradient(140deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}
.lv-what-is::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #0071e3 0%, #0b57d0 50%, #003f87 100%);
}

.lv-what-is__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.lv-what-is__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0071e3 0%, #003f87 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
    flex-shrink: 0;
}
.lv-what-is__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0b2545;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.01em;
}
.lv-what-is__lead {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #334155;
    margin: 0 0 18px;
}
.lv-what-is__lead strong {
    color: #0071e3;
    font-weight: 700;
}

/* Cartes d'info individuelles — la vraie amélioration visuelle */
.lv-what-is__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.lv-what-is__fact {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #0071e3;
    border-radius: 10px;
    font-size: 0.93rem;
    line-height: 1.5;
    color: #475569;
    transition: transform 0.18s, box-shadow 0.18s, border-left-color 0.18s;
}
.lv-what-is__fact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.1);
    border-left-color: #003f87;
}
.lv-what-is__fact-icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #0071e3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    margin-top: 1px;
}
.lv-what-is__fact > div {
    flex: 1;
    min-width: 0;
}
.lv-what-is__fact strong {
    display: block;
    color: #0b2545;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    line-height: 1.25;
}

/* Variations de couleur par position (accent visuel doux sans surcharger) */
.lv-what-is__fact:nth-child(4n+1) { border-left-color: #0071e3; }
.lv-what-is__fact:nth-child(4n+1) .lv-what-is__fact-icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #0b57d0; }
.lv-what-is__fact:nth-child(4n+2) { border-left-color: #059669; }
.lv-what-is__fact:nth-child(4n+2) .lv-what-is__fact-icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
.lv-what-is__fact:nth-child(4n+3) { border-left-color: #d97706; }
.lv-what-is__fact:nth-child(4n+3) .lv-what-is__fact-icon { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.lv-what-is__fact:nth-child(4n+4) { border-left-color: #7c3aed; }
.lv-what-is__fact:nth-child(4n+4) .lv-what-is__fact-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }

/* Dark mode */
body.dark-mode .lv-what-is {
    background: linear-gradient(140deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}
body.dark-mode .lv-what-is__title { color: #f1f5f9; }
body.dark-mode .lv-what-is__lead { color: #cbd5e1; }
body.dark-mode .lv-what-is__lead strong { color: #60a5fa; }
body.dark-mode .lv-what-is__facts { border-top-color: #334155; }
body.dark-mode .lv-what-is__fact {
    background: #273548;
    border-color: #3b4a61;
    color: #cbd5e1;
}
body.dark-mode .lv-what-is__fact strong { color: #f1f5f9; }
body.dark-mode .lv-what-is__fact-icon {
    background: linear-gradient(135deg, #1d3a5f, #1e3a8a);
    color: #93c5fd;
}

/* Mobile — single column, less padding */
@media (max-width: 640px) {
    .lv-what-is { padding: 22px 18px; margin: 22px 0; }
    .lv-what-is__title { font-size: 1.15rem; }
    .lv-what-is__icon { width: 42px; height: 42px; font-size: 1.2rem; }
    .lv-what-is__lead { font-size: 0.95rem; }
    .lv-what-is__facts { grid-template-columns: 1fr; gap: 10px; }
    .lv-what-is__fact { padding: 12px 14px; }
}

/* =========================================================================
   Standardized Hero Result — applies outside #resultAreaCalc too.
   Used by /dans-*, /il-y-a-* programmatic pages where the original styles
   were scoped only to the main calculator.
   ========================================================================= */
.result-box-highlight {
    width: 100%;
    margin: 0 auto 28px;
}
.result-box-highlight .screen-result-layout {
    width: 100%;
}
.result-summary-block.standardized-result-hero.prazo-standardized-hero {
    width: 100%;
    max-width: 100%;
    min-height: 186px;
    border-radius: 18px;
    border: 1px solid rgba(18, 89, 170, 0.24);
    background: linear-gradient(138deg, #e7f1ff 0%, #f1f7ff 52%, #fbfdff 100%);
    box-shadow: 0 16px 34px rgba(18, 57, 108, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 32px 28px;
    text-align: center;
    box-sizing: border-box;
}
.result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-prelude {
    font-size: 1.05rem;
    font-weight: 600;
    color: #355c88;
    text-align: center;
    line-height: 1.4;
}
.result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-main-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.result-summary-block.standardized-result-hero.prazo-standardized-hero .highlight-value-refactored {
    font-family: "Noto Sans", "Segoe UI", Roboto, sans-serif;
    font-size: clamp(2.4rem, 5.2vw, 3.5rem);
    font-weight: 800;
    color: #0d47a1;
    line-height: 1;
    letter-spacing: -0.02em;
}
.result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-unit,
.result-summary-block.standardized-result-hero.prazo-standardized-hero .weekday-small {
    font-size: 1.08rem;
    font-weight: 700;
    color: #275083;
}
.result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-hint {
    font-size: 0.95rem;
    color: #6b84a5;
    font-weight: 500;
}
body.dark-mode .result-summary-block.standardized-result-hero.prazo-standardized-hero {
    background: linear-gradient(138deg, #0f2033 0%, #142a42 52%, #0b1b2e 100%);
    border-color: rgba(147, 197, 253, 0.2);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}
body.dark-mode .result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-prelude { color: #93c5fd; }
body.dark-mode .result-summary-block.standardized-result-hero.prazo-standardized-hero .highlight-value-refactored { color: #dbeafe; }
body.dark-mode .result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-unit,
body.dark-mode .result-summary-block.standardized-result-hero.prazo-standardized-hero .weekday-small { color: #bfdbfe; }
body.dark-mode .result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-hint { color: #9cb4d1; }

@media (max-width: 640px) {
    .result-summary-block.standardized-result-hero.prazo-standardized-hero {
        padding: 24px 18px;
        min-height: 160px;
    }
    .result-summary-block.standardized-result-hero.prazo-standardized-hero .result-hero-prelude { font-size: 0.95rem; }
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .tam-article { padding: 0 16px; font-size: 1rem; }
    .tam-article h2 { font-size: 1.35rem; margin-top: 2em; padding-left: 18px; }
    .tam-hero-card { padding: 22px 18px; }
    .tam-hero-card__header { gap: 12px; }
    .tam-hero-card__icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .tam-hero-card__title { font-size: 1.25rem; }
    .tam-hero-card__lead { font-size: 1rem; }
    .tam-article table thead th,
    .tam-article table tbody td { padding: 10px 12px; font-size: 0.92rem; }
    .tam-steps__card { padding: 22px 18px 18px; }
}
