/* ==============================================
   RNF Carnet de Bord — Magazine Layout
   DA RAF — Rose&Fly
   ============================================== */

/* Reset Astra container sur ces pages */
.rnf-carnet-wrap .ast-container,
.post-type-archive-rnf_article .ast-container,
.taxonomy-rnf_article_rubrique .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* ── HERO ──────────────────────────────────── */
.rnf-carnet-hero {
    background: linear-gradient(135deg, #6B2D5B 0%, #8B2252 50%, #C1526E 100%);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rnf-carnet-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.rnf-carnet-hero--taxo {
    background: linear-gradient(135deg, color-mix(in srgb, var(--rubrique-accent) 80%, #1a0010) 0%, var(--rubrique-accent) 100%);
}

.rnf-carnet-hero__inner {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.rnf-carnet-hero__back {
    display: inline-block;
    color: rgba(255,255,255,0.7);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.rnf-carnet-hero__back:hover { color: #fff; }

.rnf-carnet-hero__eyebrow {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin-bottom: 12px;
}

.rnf-carnet-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.1;
}

.rnf-carnet-hero__subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* ── FILTRES ───────────────────────────────── */
.rnf-carnet-filters {
    background: #fff;
    border-bottom: 1px solid #f0dde3;
    top: 0;
    box-shadow: 0 2px 12px rgba(139,34,82,0.06);
}

.rnf-carnet-filters__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.rnf-carnet-filters__inner::-webkit-scrollbar { display: none; }

.rnf-filter-btn {
    display: inline-block;
    padding: 14px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}
.rnf-filter-btn:hover,
.rnf-filter-btn.active {
    color: #8B2252;
    border-bottom-color: #8B2252;
}

/* ── CONTENU ────────────────────────────────── */
.rnf-carnet-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

/* ── ARTICLE FEATURED ───────────────────────── */
.rnf-article-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 40px rgba(139,34,82,0.1);
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .rnf-article-featured { grid-template-columns: 1fr; }
}

.rnf-article-featured__img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.rnf-article-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.rnf-article-featured:hover .rnf-article-featured__img {
    transform: scale(1.04);
}

.rnf-article-featured__body {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(160deg, #fdf8f9 0%, #fff 100%);
}

.rnf-article-featured__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.rnf-article-featured__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
}
.rnf-article-featured__title a {
    color: #2d1a2e;
    text-decoration: none;
    transition: color 0.2s;
}
.rnf-article-featured__title a:hover { color: #8B2252; }

.rnf-article-featured__excerpt {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin: 0 0 28px;
}

/* ── BADGES ────────────────────────────────── */
.rnf-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f0dde3;
    color: #8B2252;
}
.rnf-badge--featured {
    background: linear-gradient(90deg, #8B2252, #C1526E);
    color: #fff;
}

.rnf-read-time {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #999;
}

/* ── BOUTONS ───────────────────────────────── */
.rnf-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(90deg, #8B2252, #C1526E);
    color: #fff !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 16px rgba(139,34,82,0.25);
}
.rnf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139,34,82,0.35);
}

/* ── GRILLE ARTICLES ────────────────────────── */
.rnf-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 960px) {
    .rnf-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .rnf-articles-grid { grid-template-columns: 1fr; }
}

/* ── CARTE ARTICLE ──────────────────────────── */
.rnf-article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(139,34,82,0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.rnf-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(139,34,82,0.14);
}

.rnf-article-card__img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/10;
    position: relative;
}

.rnf-article-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.rnf-article-card:hover .rnf-article-card__img {
    transform: scale(1.06);
}

.rnf-article-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(139,34,82,0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rnf-article-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rnf-article-card__meta {
    display: flex;
    gap: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #aaa;
    margin-bottom: 10px;
}

.rnf-article-card__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}
.rnf-article-card__title a {
    color: #2d1a2e;
    text-decoration: none;
    transition: color 0.2s;
}
.rnf-article-card__title a:hover { color: #8B2252; }

.rnf-article-card__excerpt {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #666;
    margin: 0 0 auto;
    padding-bottom: 16px;
}

.rnf-article-card__cta {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8B2252;
    text-decoration: none;
    margin-top: 12px;
    transition: gap 0.2s;
}
.rnf-article-card__cta:hover { color: #C1526E; }

/* ── ÉTAT VIDE ──────────────────────────────── */
.rnf-carnet-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-family: 'DM Sans', sans-serif;
}
.rnf-carnet-empty img { margin-bottom: 16px; opacity: 0.6; }

/* Override Astra container sur archive CPT */
.post-type-archive-rnf_article #content,
.post-type-archive-rnf_article #primary,
.post-type-archive-rnf_article .ast-container,
.post-type-archive-rnf_article .site-content,
.post-type-archive-rnf_article .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

/* Override Astra sur taxonomie aussi */
.tax-rnf_article_rubrique #content,
.tax-rnf_article_rubrique #primary,
.tax-rnf_article_rubrique .ast-container,
.tax-rnf_article_rubrique .site-content,
.tax-rnf_article_rubrique .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

/* Fil d'Ariane */
.rnf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
}
.rnf-breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}
.rnf-breadcrumb a:hover { color: #fff; }
.rnf-breadcrumb span { color: rgba(255,255,255,0.5); }
.rnf-breadcrumb span:last-child { color: #fff; font-weight: 600; }

/* Hero taxo accent dynamique */
.rnf-carnet-hero--taxo {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--rubrique-accent) 70%, #1a0010) 0%,
        var(--rubrique-accent) 100%
    ) !important;
}

.rnf-carnet-wrap{margin: 0 auto;}

/* =========================================================
   Carnet de Bord — Badges article vedette
   ========================================================= */

.rnf-article-featured__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .5rem;

  margin: 0 0 .9rem;
}

.rnf-article-featured__meta .rnf-badge {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0;
}