/* ============================================================
   LOOMYA — PAGE BLOG (index/blog.blade.php)
   Direction « Magazine » : article à la une, filtres par thème,
   grille légère. Même langage que la page d'accueil (crème, orange
   uni, Inter, sans ombres). Front en Bootstrap 4.5 : grilles en CSS.
   ============================================================ */

#blog-root {
    --bl-orange:     #FF9500;
    --bl-orange-ink: #C26F00;
    --bl-cream:      #FFF8F0;
    --bl-ink:        #17140F;
    --bl-ink-2:      #5B544A;
    --bl-line:       #EDE4D6;
    --bl-radius:     20px;
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    color: var(--bl-ink);
}
#blog-root *, #blog-root *::before, #blog-root *::after { box-sizing: border-box; }
#blog-root h1, #blog-root h2, #blog-root h3 { text-wrap: balance; color: var(--bl-ink); }
#blog-root a { text-decoration: none; color: inherit; }
#blog-root a:focus-visible { outline: 3px solid var(--bl-orange); outline-offset: 3px; }
/* styles.css ajoute un padding vertical aux .container sur mobile : les sections gèrent le leur */
#blog-root .container { padding-top: 0 !important; padding-bottom: 0 !important; }

/* ── En-tête ─────────────────────────────────────── */
.bl-head {
    background: var(--bl-cream);
    /* la barre du haut (52px) est fixe ; body réserve déjà la barre d'état */
    padding: calc(52px + clamp(32px, 5vw, 56px)) 0 32px;
}
.bl-title {
    font-size: clamp(2.1rem, 5vw, 3.5rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em;
    line-height: 1.05 !important;
    margin: 0;
}
.bl-sub { color: var(--bl-ink-2); font-size: 1.125rem; margin: 10px 0 0; }

.bl-chips {
    display: flex;
    gap: 8px;
    margin-top: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}
.bl-chips::-webkit-scrollbar { display: none; }
.bl-chip {
    flex: none;
    border: 1.5px solid var(--bl-line);
    background: #fff;
    color: var(--bl-ink) !important;
    font-size: .875rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    transition: background-color .2s, color .2s, border-color .2s;
}
.bl-chip:hover { border-color: var(--bl-ink); }
.bl-chip.is-active { background: var(--bl-ink); border-color: var(--bl-ink); color: #fff !important; }

/* ── Méta (thème · date · lecture) ───────────────── */
.bl-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: .8125rem;
    color: var(--bl-ink-2);
}
.bl-meta__theme { color: var(--bl-orange-ink); font-weight: 700; }
.bl-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ── Images ──────────────────────────────────────── */
.bl-img {
    aspect-ratio: 16 / 10;
    max-width: 100%;
    overflow: hidden;
    background: var(--bl-line);
}
.bl-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2,.7,.2,1);
}

/* ── Article à la une ────────────────────────────── */
.bl-feat-wrap { background: var(--bl-cream); padding-bottom: 56px; }
.bl-feat {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--bl-line);
    border-radius: 28px;
    padding: 16px;
    transition: border-color .25s;
}
.bl-feat:hover { border-color: var(--bl-orange); }
.bl-feat .bl-img { border-radius: var(--bl-radius); }
.bl-feat:hover .bl-img img { transform: scale(1.04); }
.bl-feat__txt { padding: 8px 24px 8px 0; min-width: 0; }
.bl-label { display: inline-block; font-size: .8125rem; font-weight: 700; margin-bottom: 14px; }
.bl-feat h2 {
    font-size: clamp(1.6rem, 3vw, 2.35rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em;
    line-height: 1.12 !important;
    margin: 12px 0 14px;
}
.bl-feat p { color: var(--bl-ink-2); font-size: 1.0625rem; line-height: 1.65; margin: 0 0 24px; }
.bl-more { display: inline-flex; align-items: center; font-weight: 700; }
.bl-more i { margin-left: 8px; transition: transform .2s; }
.bl-feat:hover .bl-more i { transform: translateX(4px); }

/* ── Grille ──────────────────────────────────────── */
.bl-list { padding: 64px 0 80px; background: #fff; }
.bl-sec { font-size: 1.5rem !important; letter-spacing: -0.02em; margin: 0 0 28px; }
.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 28px;
}
.bl-card { display: block; min-width: 0; }
.bl-card .bl-img { border-radius: 16px; margin-bottom: 16px; }
.bl-card:hover .bl-img img { transform: scale(1.05); }
.bl-card h3 {
    font-size: 1.1875rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em;
    line-height: 1.3 !important;
    margin: 8px 0;
    transition: color .2s;
}
.bl-card:hover h3 { color: var(--bl-orange-ink); }
.bl-card p {
    color: var(--bl-ink-2);
    font-size: .9375rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bl-empty { color: var(--bl-ink-2); font-size: 1.0625rem; margin: 0; }

/* ── Pagination (vue bootstrap-4 de Laravel) ─────── */
.bl-pager { margin-top: 56px; }
.bl-pager .pagination { justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.bl-pager .page-link {
    min-width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--bl-line) !important;
    border-radius: 50px !important;
    margin: 0 !important;
    color: var(--bl-ink) !important;
    background: #fff;
    font-weight: 700;
    box-shadow: none !important;
}
.bl-pager .page-link:hover { border-color: var(--bl-ink) !important; background: #fff; }
.bl-pager .page-item.active .page-link { background: var(--bl-ink) !important; border-color: var(--bl-ink) !important; color: #fff !important; }
.bl-pager .page-item.disabled .page-link { opacity: .45; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE ARTICLE (index/post.blade.php)
   Colonne de lecture ≈680px, image un peu plus large (vignettes en
   650px : pas d'agrandissement au-delà de 820px).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bp-article { background: #fff; padding-bottom: 8px; }
.bp-read { max-width: 680px; margin: 0 auto; }
.bp-wide { max-width: 680px; margin: 0 auto; }

.bp-top { padding: calc(52px + clamp(20px, 3vw, 32px)) 0 20px; background: #fff; }
.bp-back {
    display: inline-flex;
    align-items: center;
    font-size: .875rem;
    font-weight: 600;
    color: var(--bl-ink-2) !important;
    margin-bottom: 16px;
    transition: color .2s;
}
.bp-back i { margin-right: 6px; transition: transform .2s; }
.bp-back:hover { color: var(--bl-ink) !important; }
.bp-back:hover i { transform: translateX(-3px); }
.bp-meta { font-size: .875rem; }
.bp-title {
    font-size: clamp(1.25rem, 1.8vw, 1.5rem) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    line-height: 1.25 !important;
    margin: 8px 0 0;
}

.bp-cover { border-radius: 16px; overflow: hidden; aspect-ratio: 65 / 43; max-width: 100%; background: var(--bl-line); }
.bp-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Contenu (HTML de l'éditeur, restructuré par Blogs::contentHtml) */
.bp-content {
    padding-top: 28px;
    color: #2E2A24;
    font-size: 1.125rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}
.bp-content > :first-child { margin-top: 0; }
.bp-content p { margin: 0 0 1.2em; }
.bp-content > p:first-child { font-size: 1.1875rem; line-height: 1.6; color: var(--bl-ink); margin-bottom: 1.4em; }
.bp-content h2, .bp-content h3, .bp-content h4 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    line-height: 1.25 !important;
    margin: 1.6em 0 .5em;
}
.bp-content h3, .bp-content h4 { font-size: 1.125rem !important; }
.bp-content ul, .bp-content ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.bp-content li { margin: 0 0 .45em; padding-left: .3em; }
/* styles.css retire les puces de tous les li du site (li { list-style:none }) */
.bp-content ul > li { list-style: disc; }
.bp-content ol > li { list-style: decimal; }
.bp-content ul li::marker { color: var(--bl-orange); }
.bp-content ol li::marker { color: var(--bl-orange-ink); font-weight: 700; }
.bp-content a { color: var(--bl-orange-ink); text-decoration: underline; text-underline-offset: 3px; }
.bp-content img { max-width: 100%; height: auto; border-radius: 16px; margin: 1.5em 0; }
.bp-content table { display: block; max-width: 100%; overflow-x: auto; }
.bp-content strong { color: var(--bl-ink); }

/* Partage */
.bp-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--bl-line);
    margin-top: 28px;
    padding-top: 20px;
}
.bp-share__label { font-size: .875rem; font-weight: 600; color: var(--bl-ink-2); margin-right: 4px; }
.bp-sh {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 50px;
    border: 1.5px solid var(--bl-line);
    background: #fff;
    color: var(--bl-ink) !important;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}
.bp-sh i { margin-right: 8px; }
.bp-sh:hover { border-color: var(--bl-ink); }
.bp-sh:focus-visible { outline: 3px solid var(--bl-orange); outline-offset: 2px; }
.bp-sh--wa { background: var(--bl-ink); border-color: var(--bl-ink); color: #fff !important; }
.bp-sh--wa:hover { background: #000; }
.bp-copied { font-size: .875rem; font-weight: 600; color: #1F7A45; }

/* Encadré final (visiteurs) */
.bp-cta {
    margin-top: 32px;
    background: var(--bl-orange);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.bp-cta h2 { color: #fff !important; font-size: 1.5rem !important; letter-spacing: -0.02em; margin: 0; }
.bp-cta p { color: #FFF1DC; margin: 6px 0 0; }
.bp-cta a {
    background: #fff;
    color: var(--bl-ink) !important;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 50px;
    transition: transform .2s;
}
.bp-cta a:hover { transform: translateY(-2px); }

/* Autres publications */
.bp-related { background: var(--bl-cream); margin-top: 48px; padding: 40px 0 56px; }
/* tablette (2 colonnes) : pas de 3e carte seule sur sa ligne */
@media (min-width: 577px) and (max-width: 991px) {
    .bp-related .bl-card:nth-child(3) { display: none; }
}

/* ── Apparition au défilement (amélioration progressive) ── */
@supports (animation-timeline: view()) {
    .bl-card {
        animation: blRise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
    }
    @keyframes blRise { from { transform: translateY(16px); opacity: .01; } }
}
@media (prefers-reduced-motion: reduce) {
    #blog-root *, #blog-root *::before, #blog-root *::after { animation: none !important; transition: none !important; }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 991px) {
    .bl-feat { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .bl-feat__txt { padding: 0 8px 12px; }
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    .bl-head { padding-bottom: 24px; }
    .bl-feat { border-radius: 22px; padding: 10px; }
    .bl-feat-wrap { padding-bottom: 40px; }
    .bl-list { padding: 48px 0 64px; }
    .bl-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }

    .bp-top { padding-bottom: 16px; }
    .bp-back { margin-bottom: 12px; }
    .bp-cover { border-radius: 14px; }
    .bp-content { padding-top: 22px; font-size: 1.0625rem; }
    .bp-content > p:first-child { font-size: 1.125rem; }
    .bp-content h2 { font-size: 1.125rem !important; }
    .bp-cta { padding: 26px 22px; }
    .bp-cta a { width: 100%; text-align: center; }
    .bp-related { margin-top: 40px; padding: 32px 0 44px; }
}
