/* =========================================================
   Pages articles (même style que la page d'accueil)
   ========================================================= */

.ar-page {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --blue: #2563eb;
    --c: #2563eb;              /* couleur du thème, définie par chaque page */

    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 40px;
    box-sizing: border-box;
    color: var(--ink);
}

.ar-page *, .ar-page *::before, .ar-page *::after { box-sizing: border-box; }

/* ---------- Fil d'Ariane ---------- */
.ar-crumb {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.ar-crumb a { color: var(--muted); text-decoration: none; }
.ar-crumb a:hover { color: var(--blue); text-decoration: underline; }
.ar-crumb span { margin: 0 6px; opacity: .6; }

/* ---------- En-tête de l'article ---------- */
.ar-head {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    border-top: 4px solid var(--c);
    margin-bottom: 18px;
}

.ar-tag {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--c);
}

.ar-head h1 {
    margin: 8px 0 12px;
    font-size: 2.1rem;
    line-height: 1.2;
    letter-spacing: -.02em;
    max-width: 820px;
}

.ar-lead {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.7;
    color: #334155;
    max-width: 820px;
}

.ar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ar-meta span {
    font-size: .75rem;
    color: var(--muted);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
}

/* ---------- Mise en page : texte + colonne ---------- */
.ar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.ar-body {
    background: #fff;
    border-radius: 16px;
    padding: 30px 36px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    font-size: 1rem;
    line-height: 1.75;
    color: #1e293b;
}

.ar-body > *:first-child { margin-top: 0; }

.ar-body h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    letter-spacing: -.01em;
    margin: 34px 0 10px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    scroll-margin-top: 20px;
}

.ar-body > h2:first-child { border-top: 0; padding-top: 0; }

.ar-body p { margin: 0 0 14px; }

.ar-body ul,
.ar-body ol { margin: 0 0 16px; padding-left: 0; list-style: none; }

.ar-body ul li,
.ar-body ol li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 6px;
}

.ar-body ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .68em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c);
}

.ar-body ol { counter-reset: ar-ol; }

.ar-body ol li::before {
    counter-increment: ar-ol;
    content: counter(ar-ol);
    position: absolute;
    left: 0;
    top: .2em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--c) 14%, #fff);
    color: var(--c);
    font-size: .7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.ar-body a { color: var(--blue); }

/* Tableau */
.ar-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 18px;
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
}

.ar-body th,
.ar-body td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.ar-body th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    background: var(--soft);
}

.ar-body td:last-child,
.ar-body th:last-child { text-align: right; font-weight: 600; }

/* Encadrés */
.ar-callout {
    background: color-mix(in srgb, var(--c) 7%, #fff);
    border: 1px solid color-mix(in srgb, var(--c) 22%, #fff);
    border-left: 4px solid var(--c);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 22px 0;
}

.ar-callout strong:first-child {
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c);
    margin-bottom: 4px;
}

.ar-callout p:last-child { margin-bottom: 0; }

/* ---------- Widget fiscalité en direct ---------- */
.ar-widget {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    margin: 10px 0 18px;
    background: var(--soft);
}

.ar-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.ar-widget-head b { font-size: 1.6rem; color: #b91c1c; letter-spacing: -.02em; }
.ar-widget-head small { color: var(--muted); font-size: .8rem; margin-left: 6px; }

.ar-seg-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-seg-label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.ar-seg {
    display: inline-flex;
    align-items: center;
    background: #e9edf3;
    border: 1px solid #d5dce6;
    border-radius: 11px;
    padding: 4px;
    gap: 3px;
    flex-wrap: wrap;
}

.ar-seg button {
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1px solid #d5dce6;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.ar-seg button:hover { color: #2563eb; border-color: #93b4f5; background: #f5f8ff; }
.ar-seg button.is-on { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, .35); }
.ar-seg button.is-on:hover { background: #1d4ed8; color: #fff; }
.ar-seg button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.ar-w-detail { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.ar-w-detail b { font-size: inherit; color: var(--ink); letter-spacing: 0; }
.ar-w-note { font-size: .74rem; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

.ar-bar {
    display: flex;
    height: 34px;
    border-radius: 9px;
    overflow: hidden;
}

.ar-bar div {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    transition: width .5s ease;
}

.ar-b-ht { background: #334155; }
.ar-b-acc { background: #dc2626; }
.ar-b-cee { background: repeating-linear-gradient(135deg, #9333ea 0 6px, #a855f7 6px 12px); }   /* hachuré = estimation */
.ar-b-tva { background: #f97316; }

.ar-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 10px;
    font-size: .8rem;
    color: var(--muted);
}

.ar-bar-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
}

.ar-bar-legend b { color: var(--ink); margin-left: 4px; }

/* ---------- Colonne de droite ---------- */
.ar-side {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ar-box {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05);
}

.ar-box-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.ar-toc { list-style: none; margin: 0; padding: 0; }

.ar-toc a {
    display: block;
    font-size: .85rem;
    line-height: 1.4;
    color: #334155;
    text-decoration: none;
    padding: 6px 0 6px 10px;
    border-left: 2px solid var(--line);
    transition: color .15s, border-color .15s;
}

.ar-toc a:hover { color: var(--ink); }
.ar-toc a.is-on { color: var(--c); border-left-color: var(--c); font-weight: 600; }

.ar-cta {
    display: block;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(120deg, #0b1730, #14295c 60%, #2563eb);
    border-radius: 14px;
    padding: 18px;
}

.ar-cta strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.ar-cta span { font-size: .82rem; opacity: .8; line-height: 1.5; }
.ar-cta em { display: block; font-style: normal; font-weight: 700; font-size: .85rem; margin-top: 10px; }

/* ---------- À lire également ---------- */
.ar-related { margin-top: 34px; }

.ar-related h2 {
    margin: 0 0 14px;
    font-size: 1.3rem;
    letter-spacing: -.01em;
}

.ar-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ar-rel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    text-decoration: none;
    color: var(--ink);
    border-top: 3px solid var(--rc, var(--blue));
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05);
    transition: transform .15s, box-shadow .15s;
}

.ar-rel:hover { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(15, 23, 42, .08), 0 14px 28px rgba(15, 23, 42, .09); }
.ar-rel-tag { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rc, var(--blue)); }
.ar-rel strong { font-size: .98rem; line-height: 1.35; }
.ar-rel span:last-child { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
    .ar-layout { grid-template-columns: 1fr; }
    .ar-side { position: static; order: -1; }
    .ar-side .ar-cta { display: none; }
    .ar-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ar-head { padding: 22px 20px; }
    .ar-head h1 { font-size: 1.6rem; }
    .ar-lead { font-size: 1rem; }
    .ar-body { padding: 22px 20px; }
    .ar-body h2 { font-size: 1.2rem; }
}

/* ---------- Encart « Brent en direct » ---------- */
.ar-live {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 6px 0 20px;
    font-variant-numeric: tabular-nums;
}

.ar-live-lbl {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.ar-live b {
    font-size: 1.5rem;
    letter-spacing: -.02em;
    margin-right: 8px;
}

.ar-l-var, .ar-l-fx { font-size: .8rem; font-weight: 600; color: var(--muted); }
.ar-l-var.up { color: #16a34a; }
.ar-l-var.down { color: #dc2626; }

.ar-live a {
    font-size: .82rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .ar-live { grid-template-columns: 1fr 1fr; }
    .ar-live a { grid-column: 1 / -1; }
}

/* =========================================================
   Page Actualités
   ========================================================= */
.nw-hero { margin: 4px 0 20px; }
.nw-hero h1 { margin: 0; font-size: 2rem; letter-spacing: -.02em; }
.nw-hero p { margin: 8px 0 0; color: var(--muted); max-width: 680px; line-height: 1.6; }

.nw-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .78rem;
    color: var(--muted);
}

.nw-tag {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--rc);
}

.nw-new {
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    background: var(--rc);
    border-radius: 999px;
    padding: 2px 9px;
}

.nw-more { font-size: .85rem; font-weight: 600; color: var(--blue); }

/* Article à la une */
.nw-une {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    text-decoration: none;
    color: var(--ink);
    border-left: 5px solid var(--rc);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    margin-bottom: 16px;
    transition: transform .15s, box-shadow .15s;
}

.nw-une h2 { margin: 10px 0 10px; font-size: 1.6rem; line-height: 1.25; letter-spacing: -.02em; }
.nw-une p { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.65; color: #334155; max-width: 820px; }

/* Grille des autres actualités */
.nw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.nw-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    color: var(--ink);
    border-top: 3px solid var(--rc);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05);
    transition: transform .15s, box-shadow .15s;
}

.nw-card h2 { margin: 10px 0 8px; font-size: 1.08rem; line-height: 1.35; }
.nw-card p { margin: 0 0 14px; font-size: .86rem; line-height: 1.6; color: var(--muted); flex: 1; }

.nw-une:hover,
.nw-card:hover { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(15, 23, 42, .08), 0 14px 28px rgba(15, 23, 42, .09); }

/* Pour aller plus loin */
.nw-learn {
    margin-top: 30px;
    background: #fff;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}

.nw-learn h2 { margin: 0; font-size: 1.2rem; }
.nw-learn > p { margin: 4px 0 14px; font-size: .85rem; color: var(--muted); }
.nw-learn-links { display: flex; flex-wrap: wrap; gap: 8px; }

.nw-learn-links a {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    background: var(--soft);
    border: 1px solid var(--line);
    border-left: 3px solid var(--rc);
    border-radius: 8px;
    padding: 8px 12px;
}

.nw-learn-links a:hover { border-color: #cbd5e1; border-left-color: var(--rc); color: var(--blue); }

@media (max-width: 960px) { .nw-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
    .nw-grid { grid-template-columns: 1fr; }
    .nw-une { padding: 22px 20px; }
    .nw-une h2 { font-size: 1.3rem; }
    .nw-hero h1 { font-size: 1.6rem; }
}

@media (max-width: 700px) {
    .ar-seg-label { display: none; }
    .ar-seg button { padding: 6px 9px; font-size: .78rem; }
}

/* ---------- Note sous tableau et sources ---------- */
.ar-note { font-size: .8rem; color: var(--muted); margin-top: -6px; }
.ar-sources { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.ar-sources strong { display: block; color: var(--ink); margin-bottom: 8px; }
.ar-sources ul { margin: 0; }
.ar-sources li { margin-bottom: 4px; }

/* ---------- Encart alertes prix (fin d'article) ---------- */
.ar-nl {
    margin-top: 34px;
    padding: 24px 26px;
    border-radius: 16px;
    background: linear-gradient(110deg, #0f172a, #1e3a8a);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 26px;
}
.ar-nl-txt { flex: 1 1 320px; }
.ar-nl h2 { margin: 0 0 6px; font-size: 1.15rem; color: #fff; }
.ar-nl p { margin: 0; color: #cbd5e1; font-size: .9rem; line-height: 1.5; }
.ar-nl-form { flex: 1 1 360px; display: flex; gap: 8px; flex-wrap: wrap; }
.ar-nl-form input {
    flex: 1 1 150px;
    min-width: 0;
    font: inherit;
    font-size: .92rem;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
.ar-nl-form input#ar-nl-cp { flex: 0 1 120px; }
.ar-nl-form input::placeholder { color: #cbd5e1; }
.ar-nl-form input:focus { outline: 2px solid #93c5fd; outline-offset: 1px; }
.ar-nl-form button {
    font: inherit;
    font-weight: 700;
    background: #fff;
    color: #0f172a;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
}
.ar-nl-form button:hover { background: #dbeafe; }
.ar-nl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .ar-nl-form button { flex: 1 1 100%; } }
