/*
Theme Name:     Épargne Finance Retraite — Astra Child
Theme URI:      https://epargne-finance-retraite.fr
Description:    Child theme style "magazine senior" : palette chaleureuse (bleu marine warm + ocre + crème sépia), Lora sérif body pour lisibilité maximale 60+, Playfair Display titres. Ton éditorial accompagnement et guide pratique.
Author:         EFR
Author URI:     https://epargne-finance-retraite.fr
Template:       astra
Version:        2.0.0
*/

/* ─────────────────────────────────────────────────────────────
   Variables — palette "Magazine senior accompagnement"
   ─────────────────────────────────────────────────────────── */
:root {
    /* Bleu marine warm (moins froid, plus accueillant) */
    --efr-navy: #2C3E5F;
    --efr-navy-dark: #1F2E47;
    --efr-navy-night: #14213D;

    /* Ocre / brique : accent chaud secondaire (remplace le côté flashy) */
    --efr-ocher: #C8884A;
    --efr-ocher-dark: #A56F36;
    --efr-brick: #B85942;

    /* Or vieilli : pour signatures + détails */
    --efr-gold: #C9A66B;
    --efr-gold-dark: #A88847;

    /* Crème sépia chaleureuse */
    --efr-cream: #FAF5EB;
    --efr-cream-warm: #F3EAD7;
    --efr-cream-shadow: #ECE0C7;

    /* Texte : warm grays (pas du gris froid) */
    --efr-text-dark: #2A2520;
    --efr-text-medium: #4A4138;
    --efr-text-muted: #7A6F62;
    --efr-text-light: #A89C8B;

    --efr-gray-200: #E5DBC7;
    --efr-white: #FFFFFF;

    /* Fonts : sérif body pour lisibilité senior (style magazine) */
    --efr-font-heading: 'Playfair Display', Georgia, serif;
    --efr-font-body: 'Lora', Georgia, 'Times New Roman', serif;
    --efr-font-signature: 'Caveat', cursive;
    --efr-font-ui: 'Inter', -apple-system, sans-serif; /* pour menus, boutons, méta */

    --efr-radius: 6px;
    --efr-radius-lg: 12px;
    --efr-shadow: 0 4px 16px rgba(31, 46, 71, 0.08);
    --efr-shadow-lg: 0 12px 32px rgba(31, 46, 71, 0.14);
    --efr-container-max: 1180px;
}

/* ─────────────────────────────────────────────────────────────
   Reset / Base — typo magazine senior : 19px sérif body
   ─────────────────────────────────────────────────────────── */
body {
    font-family: var(--efr-font-body) !important;
    color: var(--efr-text-dark);
    background: var(--efr-cream);
    font-size: 19px;
    line-height: 1.85;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--efr-font-heading) !important;
    color: var(--efr-navy);
    font-weight: 700;
    line-height: 1.25;
}
a { color: var(--efr-navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--efr-ocher-dark); }
strong, b { color: var(--efr-text-dark); font-weight: 700; }

.ast-container { max-width: var(--efr-container-max); }
.ast-separate-container .site-main,
.ast-plain-container .site-main { padding-top: 0; padding-bottom: 0; }
.ast-no-sidebar #primary { width: 100%; max-width: 100%; }

/* ─────────────────────────────────────────────────────────────
   HEADER — sobre, magazine
   ─────────────────────────────────────────────────────────── */
.site-header {
    background: var(--efr-cream) !important;
    border-bottom: 1px solid var(--efr-cream-shadow);
    box-shadow: none !important;
}
.efr-header-inner {
    max-width: var(--efr-container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    gap: 24px;
}
.site-title, .site-title a {
    font-family: var(--efr-font-heading) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--efr-navy) !important;
    font-style: italic;
    letter-spacing: -0.01em;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
}
.efr-brand-icon svg {
    width: 38px;
    height: 38px;
    display: block;
}
.site-description { display: none !important; }

.efr-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 4px;
    align-items: center;
}
.efr-nav-menu li { margin: 0; }
.efr-nav-menu > li > a {
    display: inline-block;
    padding: 10px 14px;
    font-family: var(--efr-font-ui) !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--efr-text-medium);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.2s;
}
.efr-nav-menu > li > a:hover,
.efr-nav-menu .current-menu-item a {
    color: var(--efr-ocher-dark);
}
.efr-nav-menu > li > a::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: var(--efr-ocher);
    transition: width 0.25s;
    margin: 3px auto 0;
}
.efr-nav-menu > li:hover > a::after,
.efr-nav-menu .current-menu-item > a::after {
    width: 28px;
}

/* ─────────────────────────────────────────────────────────────
   HOME — Hero éditorial chaleureux
   ─────────────────────────────────────────────────────────── */
.efr-hero {
    background: var(--efr-cream-warm);
    color: var(--efr-text-dark);
    padding: 80px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--efr-cream-shadow);
}
.efr-hero::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 1px;
    background: var(--efr-ocher);
    opacity: 0.6;
}
.efr-hero-eyebrow {
    display: inline-block;
    font-family: var(--efr-font-signature);
    font-size: 24px;
    color: var(--efr-ocher-dark);
    margin-bottom: 8px;
    transform: rotate(-2deg);
}
.efr-hero h1 {
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.1;
    color: var(--efr-navy) !important;
    margin: 0 auto 22px;
    font-weight: 600;
    font-style: italic;
    max-width: 820px;
}
.efr-hero h1 em {
    font-style: normal;
    color: var(--efr-ocher-dark);
}
.efr-hero p {
    font-family: var(--efr-font-body);
    font-size: 20px;
    color: var(--efr-text-medium);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.efr-btn {
    display: inline-block;
    background: var(--efr-navy);
    color: var(--efr-cream);
    padding: 16px 36px;
    border-radius: 4px;
    font-family: var(--efr-font-ui);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.2s, transform 0.15s;
}
.efr-btn:hover {
    background: var(--efr-ocher-dark);
    color: var(--efr-white);
    transform: translateY(-1px);
}

/* Sections */
.efr-section {
    padding: 80px 24px;
}
.efr-section-inner {
    max-width: var(--efr-container-max);
    margin: 0 auto;
}
.efr-section-cream {
    background: var(--efr-cream-warm);
    padding: 80px 24px;
}
.efr-section-header {
    text-align: center;
    margin-bottom: 56px;
}
.efr-section-header h2 {
    font-size: clamp(28px, 4vw, 38px);
    font-style: italic;
    color: var(--efr-navy);
    margin: 0 0 14px;
    font-weight: 600;
}
.efr-section-header h2 em {
    font-style: normal;
    color: var(--efr-ocher-dark);
}
.efr-section-header p {
    color: var(--efr-text-muted);
    font-size: 18px;
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.65;
}

/* Catégorie cards */
.efr-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.efr-cat-card {
    background: var(--efr-white);
    border-radius: var(--efr-radius-lg);
    padding: 36px 32px;
    border-left: 3px solid var(--efr-ocher);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: block;
    color: inherit;
    box-shadow: var(--efr-shadow);
}
.efr-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--efr-shadow-lg);
    border-color: var(--efr-brick);
}
.efr-cat-num {
    font-family: var(--efr-font-heading);
    font-style: italic;
    font-size: 15px;
    color: var(--efr-ocher-dark);
    font-weight: 600;
    margin-bottom: 12px;
}
.efr-cat-card h3 {
    font-size: 24px;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--efr-navy);
}
.efr-cat-card p {
    color: var(--efr-text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}
.efr-cat-card-count {
    display: inline-block;
    margin-top: 18px;
    font-family: var(--efr-font-ui);
    font-size: 11px;
    color: var(--efr-ocher-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Articles cards */
.efr-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}
.efr-article-card {
    background: var(--efr-white);
    border-radius: var(--efr-radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: var(--efr-shadow);
}
.efr-article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--efr-shadow-lg);
}
.efr-article-card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    background-color: var(--efr-cream-warm);
}
.efr-article-card-body {
    padding: 26px 28px 28px;
}
.efr-card-cat {
    display: inline-block;
    background: var(--efr-cream-warm);
    color: var(--efr-ocher-dark);
    font-family: var(--efr-font-ui);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.efr-article-card h3 {
    font-size: 22px;
    margin: 0 0 14px;
    line-height: 1.3;
    color: var(--efr-navy);
    font-weight: 700;
    font-style: italic;
}
.efr-article-card p {
    color: var(--efr-text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 14px;
}
.efr-card-meta {
    font-family: var(--efr-font-ui);
    font-size: 12px;
    color: var(--efr-text-light);
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
   SINGLE — Article layout magazine
   ─────────────────────────────────────────────────────────── */
.efr-single {
    background: var(--efr-cream);
}
.efr-single-hero {
    background: var(--efr-cream-warm);
    color: var(--efr-text-dark);
    padding: 56px 24px 48px;
    text-align: left;
    border-bottom: 1px solid var(--efr-cream-shadow);
}
.efr-single-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}
.efr-single-cat {
    display: inline-block;
    background: var(--efr-navy);
    color: var(--efr-cream);
    font-family: var(--efr-font-ui);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
    text-decoration: none;
}
.efr-single-cat:hover {
    background: var(--efr-ocher-dark);
    color: var(--efr-white);
}
.efr-single-hero h1 {
    font-size: clamp(28px, 4.2vw, 44px);
    color: var(--efr-navy) !important;
    margin: 0 0 18px;
    font-weight: 600;
    font-style: italic;
    line-height: 1.18;
}
.efr-single-meta {
    font-family: var(--efr-font-ui);
    font-size: 14px;
    color: var(--efr-text-muted);
}
.efr-single-meta strong { color: var(--efr-ocher-dark); font-weight: 600; }

/* Bloc auteur en hero (signature humaine) */
.efr-author-strip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 8px 18px 8px 8px;
    background: var(--efr-white);
    border-radius: 50px;
    box-shadow: var(--efr-shadow);
}
.efr-author-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.efr-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}
.efr-author-name {
    font-family: var(--efr-font-heading);
    font-size: 16px;
    color: var(--efr-navy);
    font-weight: 600;
}
.efr-author-role {
    font-family: var(--efr-font-ui);
    font-size: 12px;
    color: var(--efr-text-muted);
}

/* Layout 2 cols */
.efr-single-wrap {
    max-width: 1080px;
    margin: 48px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 260px minmax(0, 720px);
    gap: 56px;
    align-items: start;
}
@media (max-width: 900px) {
    .efr-single-wrap { grid-template-columns: 1fr; gap: 24px; }
}

.efr-single-toc {
    position: relative;
    align-self: start;
}
.efr-toc-inner {
    position: sticky;
    top: 96px;
    background: var(--efr-white);
    border-left: 3px solid var(--efr-ocher);
    border-radius: 0 var(--efr-radius) var(--efr-radius) 0;
    padding: 22px 24px;
    box-shadow: var(--efr-shadow);
}
@media (max-width: 900px) {
    .efr-toc-inner { position: static; }
}
.efr-toc-title {
    font-family: var(--efr-font-ui);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--efr-ocher-dark);
    margin: 0 0 14px;
}
.efr-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}
.efr-toc-list li {
    counter-increment: toc;
    margin: 0 0 12px;
    padding-left: 24px;
    position: relative;
    line-height: 1.4;
}
.efr-toc-list li::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 2px;
    font-family: var(--efr-font-heading);
    font-style: italic;
    font-size: 13px;
    color: var(--efr-ocher-dark);
    font-weight: 600;
}
.efr-toc-list a {
    color: var(--efr-text-medium);
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.2s;
}
.efr-toc-list a:hover {
    color: var(--efr-navy);
    text-decoration: underline;
    text-decoration-color: var(--efr-ocher);
    text-underline-offset: 3px;
}

/* Body article — typo magazine senior */
.efr-single-body {
    max-width: none;
    margin: 0;
    padding: 0;
}
.efr-single-featured-img {
    aspect-ratio: 21 / 9;
    max-height: 320px;
    background-size: cover;
    background-position: center;
    border-radius: var(--efr-radius-lg);
    box-shadow: var(--efr-shadow);
    margin: 0 0 40px;
}
.efr-single-body p,
.efr-single-body ul,
.efr-single-body ol {
    font-size: 19px;
    line-height: 1.85;
    color: var(--efr-text-dark);
    margin: 0 0 24px;
}
.efr-single-body ul,
.efr-single-body ol { padding-left: 28px; }
.efr-single-body li { margin-bottom: 10px; padding-left: 6px; }
.efr-single-body li::marker { color: var(--efr-ocher-dark); }
.efr-single-body h2 {
    font-size: 32px;
    color: var(--efr-navy);
    margin: 56px 0 20px;
    font-style: italic;
    font-weight: 600;
    line-height: 1.2;
    scroll-margin-top: 80px;
}
.efr-single-body h3 {
    font-size: 24px;
    color: var(--efr-navy);
    margin: 40px 0 14px;
    font-weight: 600;
    scroll-margin-top: 80px;
}
.efr-single-body blockquote {
    border-left: 4px solid var(--efr-ocher);
    background: var(--efr-cream-warm);
    padding: 22px 28px;
    margin: 36px 0;
    font-style: italic;
    color: var(--efr-text-medium);
    border-radius: 0 var(--efr-radius) var(--efr-radius) 0;
    font-family: var(--efr-font-heading);
    font-size: 20px;
}
.efr-single-body img {
    border-radius: var(--efr-radius);
    margin: 28px 0;
}
.efr-single-body a {
    color: var(--efr-navy);
    text-decoration: underline;
    text-decoration-color: var(--efr-ocher);
    text-underline-offset: 3px;
}
.efr-single-body a:hover {
    color: var(--efr-ocher-dark);
    text-decoration-color: var(--efr-ocher-dark);
}

/* Tables — design "fiche pratique" */
.efr-single-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    border-radius: var(--efr-radius);
    overflow: hidden;
    box-shadow: var(--efr-shadow);
    background: var(--efr-white);
    font-family: var(--efr-font-body);
}
.efr-single-body th {
    background: var(--efr-navy);
    color: var(--efr-cream);
    padding: 16px 20px;
    text-align: left;
    font-family: var(--efr-font-ui);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.efr-single-body td {
    padding: 14px 20px;
    border-top: 1px solid var(--efr-cream-shadow);
    font-size: 16px;
    line-height: 1.55;
}
.efr-single-body tr:nth-child(even) td { background: var(--efr-cream); }

/* ─────────────────────────────────────────────────────────────
   FOOTER — sobre + signature manuscrite
   ─────────────────────────────────────────────────────────── */
.efr-footer {
    background: var(--efr-navy-night);
    color: var(--efr-cream);
    padding: 64px 24px 32px;
}
.efr-footer-inner {
    max-width: var(--efr-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr;
    gap: 56px;
}
@media (max-width: 768px) {
    .efr-footer-inner { grid-template-columns: 1fr; gap: 32px; }
}
.efr-footer h4 {
    color: var(--efr-ocher);
    font-family: var(--efr-font-ui) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 20px;
}
.efr-footer p {
    font-family: var(--efr-font-body);
    font-size: 15px;
    line-height: 1.7;
    color: rgba(250, 245, 235, 0.78);
    margin: 0 0 14px;
}
.efr-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.efr-footer ul li { margin-bottom: 12px; }
.efr-footer a {
    color: rgba(250, 245, 235, 0.85);
    font-size: 15px;
    transition: color 0.2s;
    font-family: var(--efr-font-body);
}
.efr-footer a:hover { color: var(--efr-ocher); }
.efr-footer-bottom {
    border-top: 1px solid rgba(250, 245, 235, 0.1);
    padding-top: 28px;
    margin-top: 44px;
    text-align: center;
    font-family: var(--efr-font-body);
    font-size: 13.5px;
    color: rgba(250, 245, 235, 0.55);
    line-height: 1.6;
}
.efr-footer-brand {
    font-family: var(--efr-font-heading);
    font-style: italic;
    font-size: 24px;
    color: var(--efr-white);
    margin: 0 0 16px;
}
.efr-footer-signature {
    font-family: var(--efr-font-signature);
    font-size: 26px;
    color: var(--efr-ocher);
    margin: 10px 0 4px;
    transform: rotate(-2deg);
    display: inline-block;
}

/* Breadcrumb */
.efr-breadcrumb {
    font-family: var(--efr-font-ui);
    font-size: 13px;
    color: var(--efr-text-muted);
    max-width: var(--efr-container-max);
    margin: 24px auto 0;
    padding: 0 24px;
    text-align: left;
}
.efr-breadcrumb a {
    color: var(--efr-text-muted);
    text-decoration: none;
}
.efr-breadcrumb a:hover { color: var(--efr-ocher-dark); }
