/* Blog - Page listing
   Banner + "feuille" blanche partages avec le reste du site, MAIS l'entete est un
   masthead magazine (bandeau violet + kicker orange) pour se demarquer de la page
   article, dont l'entete est tout blanc avec accent orange. */

/* BANNER */
.banner-section {
    max-width: 1280px;
    margin: 0 auto;
}

/* CONTAINER BLANC (pattern identique a blog-article) */
.main-blog {
    background-color: var(--white);
}

.blog-container {
    max-width: 1280px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 100px 100px 0 0;
    position: relative;
    z-index: 2;
    top: -50px;
    padding: 0 60px 60px 60px;
    box-shadow: 0px -250px 99px #0000001A;
}

/* BREADCRUMB : 60px container + 40px breadcrumb = 100px du bord (aligne autres pages) */
.blog-container > .breadcrumb {
    padding-inline: 0;
    padding-left: 40px;
}

/* HERO - masthead magazine : bandeau violet a coins arrondis (motif distinct de
   la page article qui reste tout blanc). Halo orange deco + kicker = identite blog. */
.blog-hero {
    margin: 24px 0 28px 0;
}

.blog-hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 48px 56px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--light-purple) 100%);
    color: var(--white);
}

/* Halo orange dans le coin (signature de marque, sous le texte) */
.blog-hero-panel::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 128, 0, 0.40) 0%, transparent 70%);
    pointer-events: none;
}

/* Kicker : etiquette orange majuscule -> identite "magazine" */
.blog-hero-kicker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--orange);
    margin-bottom: 16px;
}

.blog-hero-kicker::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--orange);
    border-radius: 1px;
}

/* Titre blanc sur le bandeau (plus d'underline orange : c'etait le motif de l'article) */
.blog-hero-title {
    position: relative;
    font-family: var(--font-head);
    font-size: 3.75rem;
    line-height: 1.02;
    margin: 0 0 18px 0;
    color: var(--white);
}

/* Lede SEO : blanc attenue, liens orange pour le pop */
.blog-hero-subtitle {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.0625rem;
    margin: 0;
    line-height: 1.65;
    max-width: 720px;
}

.blog-hero-subtitle a {
    color: var(--orange);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 128, 0, 0.45);
    transition: border-color 0.2s ease;
}

.blog-hero-subtitle a:hover {
    border-bottom-color: var(--orange);
}

/* TOOLBAR : compteur a gauche, tri a droite (pattern listing facon catalogue) */
.blog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(47, 21, 108, 0.10);
}

.blog-hero-sorter {
    flex-shrink: 0;
}

.blog-hero-count {
    color: var(--purple);
    opacity: 0.65;
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

.blog-hero-count strong {
    color: var(--green);
    font-weight: 700;
    font-style: normal;
    opacity: 1;
}

/* TRI (sorter) - aligne exactement sur catalog */
.sorter-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 50px 6px 12px;
    margin: 0;
    border: 2px solid var(--green);
    border-radius: 25px;
    font-family: var(--font-head);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    background: transparent;
}

.sorter-select-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.sorter-select-label { color: var(--green); }
.sorter-select-value { color: var(--purple); }

.sorter-select::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 12px;
    height: 7px;
    background-color: var(--green);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform: translateY(-50%);
    pointer-events: none;
}

.sorter-select-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    color: transparent;
    font: inherit;
    font-size: 1rem;
}

.sorter-select-input option {
    color: var(--purple);
    background-color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
}

/* GRILLE DES ARTICLES (3 par ligne, gap 15 aligne avec home .articles-blog) */
/* flex-start : cards orphelines en fin de grille collent a gauche au lieu de centrer */
.blog-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
    padding: 20px 0 40px 0;
}

/* Default desktop : (1160 content - 30 gaps) / 3 = ~376px */
.blog-grid .blog-card { width: calc((100% - 30px) / 3); min-width: 260px; }

@media (max-width: 1024px) {
    .blog-grid .blog-card { width: calc((100% - 15px) / 2); }
}
@media (max-width: 640px) {
    .blog-grid .blog-card { width: 100%; max-width: 400px; }
}

/* PAGINATION DOTS - copie de catalog.css */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 50px;
}

.pagination:empty { display: none; }

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(38, 210, 118, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pagination-dot:hover,
.pagination-dot.active {
    background: var(--green);
}

.pagination-dot:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

/* RESPONSIVE container */
@media (max-width: 1024px) {
    .blog-container {
        padding: 0 32px 50px 32px;
        border-radius: 60px 60px 0 0;
    }
    .blog-container > .breadcrumb { padding-left: 20px; }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 0 24px 40px 24px;
        border-radius: 40px 40px 0 0;
        top: -30px;
    }
    .blog-container > .breadcrumb { padding-left: 0; }
    .blog-hero { margin: 16px 0 24px 0; }
    .blog-hero-panel { padding: 32px 28px; border-radius: 22px; }
    .blog-hero-title { font-size: 2.75rem; margin-bottom: 16px; }
    .blog-toolbar { align-items: flex-start; }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 0 16px 30px 16px;
        border-radius: 24px 24px 0 0;
    }
    .blog-hero-panel { padding: 26px 20px; border-radius: 18px; }
    .blog-hero-title { font-size: 2.25rem; }
    .blog-hero-subtitle { font-size: 0.95rem; }
}
