/* Page Blog — design moderne */

.page-blog {
    -webkit-font-smoothing: antialiased;
}

.page-blog .page-shell > .container {
    max-width: 1280px;
}

.page-blog .page-cover {
    padding: 3.5rem 1.5rem 3rem;
}

/* Intro */
.blog-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 1.75rem;
}

.blog-intro .section-title {
    font-size: clamp(1.375rem, 2.5vw, 1.625rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.blog-intro p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0;
}

/* Pills thématiques */
.blog-tips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.blog-tip {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.blog-tip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 166, 81, 0.35);
}

.blog-tip__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--sc-green-light);
    color: var(--sc-green);
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.blog-tip h3 {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.15rem;
}

.blog-tip p {
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.45;
}

/* À la une — grande mise en avant éditoriale sur desktop, compacte en dessous de 992px */
.blog-featured {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 42%) minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    max-width: 1080px;
    margin: 0 auto 2rem;
    border-radius: var(--card-r);
    overflow: hidden;
    border: 1.5px solid rgba(0, 166, 81, 0.28);
    box-shadow: 0 20px 48px rgba(0, 100, 50, 0.16);
    background: #fff;
}

.blog-featured__visual {
    position: relative;
    grid-row: 1 / 3;
    min-height: 360px;
    background: #0f172a;
}

.blog-featured__visual img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    max-height: none;
    object-fit: cover;
    display: block;
}

.blog-featured:hover .blog-featured__visual img {
    transform: scale(1.03);
    transition: transform 0.35s ease;
}

.blog-featured__badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--sc-orange);
    color: #fff;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.blog-featured__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.65rem;
    padding: 2.25rem 2.5rem 1rem;
    min-width: 0;
}

.blog-featured__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.blog-featured__meta i {
    color: var(--sc-green);
    margin-right: 0.2rem;
}

.blog-featured__title {
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-featured__excerpt {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-featured__actions {
    padding: 0.5rem 2.5rem 2.25rem;
    margin: 0;
    flex-shrink: 0;
}

.blog-featured__actions .btn {
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.6rem 1.35rem;
    white-space: nowrap;
}

/* Section grille */
.blog-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--line);
}

.blog-section__head > div {
    text-align: left;
}

.blog-section__head h2 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.2rem;
}

.blog-section__head p {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.blog-section__head .sc-section__eyebrow {
    margin-bottom: 0.25rem;
}

/* Grille articles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
    align-items: stretch;
}

/* Articles similaires — bas de page article */
.blog-article__related {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.blog-article__related-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.blog-grid--related {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.blog-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--card-r);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow);
    transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(0, 166, 81, 0.3);
}

.blog-card__media {
    height: 156px;
    overflow: hidden;
    background: var(--gray);
    position: relative;
}

.blog-card__media::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: var(--sc-green);
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.05);
}

.blog-card__body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.45rem;
}

.blog-card__meta {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.blog-card__meta i {
    color: var(--sc-green);
    margin-right: 0.25rem;
}

.blog-card__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    margin-top: auto;
    padding-top: 0.35rem;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--sc-green-dark);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s, gap 0.2s;
}

.blog-card__link:hover {
    color: var(--sc-orange);
    gap: 0.55rem;
}

/* CTA */
.blog-cta {
    background: linear-gradient(145deg, #007A3D, var(--sc-green-dark));
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    color: #fff;
    margin-top: 2.25rem;
    box-shadow: 0 16px 48px rgba(0, 100, 50, 0.22);
}

.blog-cta h3 {
    font-size: 1.375rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.blog-cta p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 520px;
    margin: 0 auto 1.25rem;
    font-size: 1rem;
    line-height: 1.6;
}

.blog-cta .btn {
    margin: 0.25rem;
}

/* Modals */
.blog-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.blog-modal .modal-header {
    background: var(--sc-green-light);
    border-bottom: 1px solid rgba(0, 166, 81, 0.15);
    padding: 1rem 1.25rem;
}

.blog-modal .modal-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--ink);
}

.blog-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 1rem;
}

.blog-modal__meta i {
    color: var(--sc-green);
    margin-right: 0.25rem;
}

.blog-modal__cover {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.blog-modal__content {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.75;
}

.blog-modal__content h4 {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--ink);
    margin: 1.25rem 0 0.65rem;
}

.page-blog .blog-card,
.page-blog .blog-tip,
.page-blog .blog-featured {
    pointer-events: auto !important;
    opacity: 1 !important;
}

@media (max-width: 991px) {
    .blog-tips {
        grid-template-columns: 1fr;
    }
    .blog-featured {
        grid-template-columns: 88px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }
    .blog-featured__visual {
        width: 88px;
        height: 88px;
        min-height: 0;
        grid-row: 1 / 3;
    }
    .blog-featured__visual img {
        min-height: 88px;
    }
    .blog-featured__badge {
        top: 0.35rem;
        left: 0.35rem;
        gap: 0.25rem;
        font-size: 0.5625rem;
        padding: 0.2rem 0.45rem;
    }
    .blog-featured__body {
        padding: 0.85rem 1rem;
        gap: 0.3rem;
    }
    .blog-featured__title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
    }
    .blog-featured__excerpt {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
    }
    .blog-featured__actions {
        grid-column: 2;
        padding: 0 1rem 0.85rem;
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .blog-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .blog-grid .blog-card {
        max-width: 340px;
        width: 100%;
    }
    .blog-featured {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        max-width: 100%;
    }
    .blog-featured__visual {
        width: 100%;
        height: 140px;
        min-height: 0;
        grid-row: auto;
    }
    .blog-featured__visual img {
        min-height: 140px;
        width: 100%;
    }
    .blog-featured__body {
        padding: 0.85rem 1rem 0.5rem;
    }
    .blog-featured__actions {
        grid-column: 1;
        padding: 0 1rem 1rem;
    }
}

/* ─── Page article individuel ─── */
.page-blog-article .site-main {
    background: linear-gradient(180deg, #f0f4f8 0%, #f8fafc 100%);
}

[data-theme="dark"] .page-blog-article .site-main {
    background: var(--bg);
}

.blog-article__hero-wrap {
    max-width: min(1140px, 100% - 2rem);
    margin: 1.5rem auto 0;
}

.blog-article__hero-img {
    display: block;
    width: 100%;
    height: clamp(200px, 32vw, 340px);
    object-fit: cover;
    border-radius: var(--card-r);
}

.blog-article__header {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.75rem clamp(1rem, 4vw, 1.5rem) 0;
}

.blog-article__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--sc-green-dark);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-article__back:hover {
    color: var(--sc-green);
}

.blog-article__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.65rem;
}

.blog-article__title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.02em;
}

.blog-article__layout {
    max-width: 780px;
    padding: 2.25rem clamp(1rem, 4vw, 1.5rem) 3.5rem;
}

/* Panneaux contenu — espacement confortable */
.blog-article__prose.legal-doc-v2 {
    padding: clamp(1.75rem, 5vw, 2.5rem) clamp(1.5rem, 5.5vw, 2.75rem);
    border-radius: 18px;
    margin-bottom: 1.5rem;
}

.blog-article__prose {
    box-shadow: var(--shadow);
}

.blog-article__prose p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.blog-article__prose h4 {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--sc-green-dark);
    margin: 1.75rem 0 0.75rem;
}

.blog-article__prose h4:first-child {
    margin-top: 0;
}

.blog-article__prose p,
.blog-article__prose li {
    font-size: 1rem;
    line-height: 1.85;
}

.blog-article__prose p {
    margin-bottom: 1.1rem;
}

.blog-article__prose p:last-child {
    margin-bottom: 0;
}

.blog-article__prose ul,
.blog-article__prose ol {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
}

.blog-article__prose li + li {
    margin-top: 0.35rem;
}

.blog-card__title a {
    color: inherit;
    text-decoration: none;
}

.blog-card__title a:hover {
    color: var(--sc-green-dark);
}

.blog-card__media-link {
    display: block;
    text-decoration: none;
}

.blog-article__gallery {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(1.5rem, 5vw, 2rem) clamp(1.5rem, 5.5vw, 2.5rem);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.blog-article__gallery h2 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 1.15rem;
}

.blog-article__gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
}

.blog-article__gallery-item {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.blog-article__gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-article__comments {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(1.75rem, 5vw, 2.25rem) clamp(1.5rem, 5.5vw, 2.75rem);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
}

.blog-article__comments h2 {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-article__comments-note {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.75;
    margin: 0 0 1.25rem;
}

.blog-article__comments-note a {
    font-weight: 600;
}

.blog-article__comment-placeholder {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: clamp(1rem, 3.5vw, 1.25rem) clamp(1.15rem, 4vw, 1.5rem);
    border-radius: 12px;
    background: var(--gray);
    border: 1px dashed var(--line);
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
}

.blog-article__comment-placeholder i {
    font-size: 1.25rem;
    color: var(--sc-green);
}

.blog-article__comments-count {
    font-weight: 700;
    color: var(--sc-green);
}

.blog-article__comment-alert {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-comment-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-comment {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: var(--gray);
    border: 1px solid var(--line);
}

.blog-comment__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--sc-green), var(--sc-green-dark));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.blog-comment__body {
    min-width: 0;
    flex: 1;
}

.blog-comment__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.35rem;
}

.blog-comment__author {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--ink);
}

.blog-comment__date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}

.blog-comment__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text);
    word-break: break-word;
}

.blog-comment-form-wrap {
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.blog-comment-form__title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.85rem;
}

.blog-comment-form__hint {
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: 0.75rem;
    font-weight: 600;
}

.blog-comment-form--compact {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
}

.blog-comment-form--compact .blog-comment-form__name {
    flex: 1 1 100%;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
}

.blog-comment-form--compact .blog-comment-form__input {
    flex: 1;
    min-width: 0;
    resize: vertical;
    min-height: 48px;
    font-size: 0.9375rem;
}

.blog-comment-form--compact .blog-comment-form__submit {
    align-self: flex-end;
    flex-shrink: 0;
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .blog-comment-form--compact {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-comment-form--compact .blog-comment-form__submit {
        align-self: stretch;
        width: 100%;
    }
}

.blog-article__nav {
    margin-top: 2.5rem;
}

.blog-article__nav .btn {
    font-weight: 700;
}

[data-theme="dark"] .blog-article__comments,
[data-theme="dark"] .blog-article__prose.legal-doc-v2,
[data-theme="dark"] .blog-article__gallery {
    background: var(--card-bg);
    border-color: var(--card-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .blog-article__prose h4 {
    color: #86efac;
}

[data-theme="dark"] .blog-article__gallery h2,
[data-theme="dark"] .blog-article__comments h2 {
    color: #f1f5f9;
}

[data-theme="dark"] .blog-article__prose p,
[data-theme="dark"] .blog-article__prose li,
[data-theme="dark"] .blog-article__comments-note {
    color: #cbd5e1;
}

[data-theme="dark"] .blog-article__comments-note a {
    color: #f1f5f9;
}

[data-theme="dark"] .blog-article__comments-note a:hover {
    color: #4ade80;
}

[data-theme="dark"] .blog-article__comment-placeholder {
    background: var(--surface-2);
    border-color: var(--card-border);
    color: #94a3b8;
}

[data-theme="dark"] .blog-comment {
    background: rgba(15, 23, 42, 0.6);
    border-color: var(--card-border);
}

[data-theme="dark"] .blog-comment__author {
    color: #f1f5f9;
}

[data-theme="dark"] .blog-comment__text {
    color: #cbd5e1;
}

[data-theme="dark"] .blog-comment-form-wrap {
    border-top-color: var(--card-border);
}

[data-theme="dark"] .blog-comment-form__title {
    color: #f1f5f9;
}

@media (max-width: 575px) {
    .blog-article__hero-wrap {
        margin-top: 1rem;
    }

    .blog-article__header {
        padding: 1.25rem 1.5rem 0;
    }

    .blog-article__layout {
        padding: 1.5rem 1.5rem 2.5rem;
    }

    .blog-article__prose.legal-doc-v2,
    .blog-article__comments,
    .blog-article__gallery {
        padding: 1.5rem 1.35rem;
        border-radius: 16px;
    }

    .blog-article__nav {
        padding-left: 1.35rem;
        padding-right: 1.35rem;
    }
}
