.recherche-hero {
    background-color: var(--couleur-beige);
    padding: 44px 0 32px;
}

[data-theme="sombre"] .recherche-hero {
    background-color: #171b1e;
}

.recherche-hero__titre {
    font-family: var(--police-exergue);
    font-size: 1.7rem;
    color: var(--couleur-anthracite);
    margin-bottom: 6px;
}

[data-theme="sombre"] .recherche-hero__titre {
    color: #f0ebe6;
}

.recherche-hero__resultat-info {
    font-size: 0.88rem;
    color: rgba(38, 53, 60, 0.55);
}

.recherche-onglets {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    border-bottom: 1px solid rgba(38, 53, 60, 0.1);
}

.recherche-onglet {
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(38, 53, 60, 0.5);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.recherche-onglet--actif {
    color: var(--couleur-corail);
    border-bottom-color: var(--couleur-corail);
}

.recherche-corps {
    padding: 32px 0 80px;
}

.recherche-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.recherche-filtres .select-inkwell {
    max-width: 180px;
}

.recherche-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 22px;
}

.recherche-liste-auteurs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
}

.recherche-auteur-carte {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #ffffff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(38, 53, 60, 0.06);
    text-decoration: none;
    transition: transform 0.15s ease;
}

.recherche-auteur-carte:hover {
    transform: translateY(-2px);
}

[data-theme="sombre"] .recherche-auteur-carte {
    background-color: #232a2f;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.recherche-auteur-carte__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--couleur-corail);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--police-exergue);
    font-size: 1.2rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.recherche-auteur-carte__nom {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--couleur-anthracite);
}

[data-theme="sombre"] .recherche-auteur-carte__nom {
    color: #f0ebe6;
}

.recherche-auteur-carte__meta {
    font-size: 0.78rem;
    color: rgba(38, 53, 60, 0.5);
}

.recherche-vide {
    text-align: center;
    padding: 60px 20px;
    color: rgba(38, 53, 60, 0.45);
}

.recherche-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.recherche-pagination button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--couleur-anthracite);
    box-shadow: 0 2px 8px rgba(38, 53, 60, 0.08);
}

.recherche-pagination button:disabled {
    opacity: 0.3;
    pointer-events: none;
}

[data-theme="sombre"] .recherche-pagination button {
    background-color: #232a2f;
    color: #f0ebe6;
}

.recherche-grille .carte-histoire--apercu {
    display: block;
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(38, 53, 60, 0.07);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recherche-grille .carte-histoire--apercu:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(38, 53, 60, 0.12);
}

.recherche-grille .carte-histoire__couverture {
    height: 240px;
    background-size: cover;
    background-position: center;
    background-color: rgba(38, 53, 60, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(38, 53, 60, 0.25);
    font-size: 1.8rem;
}

.recherche-grille .carte-histoire__contenu {
    padding: 16px;
}

[data-theme="sombre"] .recherche-grille .carte-histoire--apercu {
    background-color: #232a2f;
}

/* ==========================================================================
   COMPTEURS SUR LES ONGLETS
   ========================================================================== */

.recherche-onglet__compte {
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.6;
}

/* ==========================================================================
   CHIPS DE FILTRES ACTIFS
   ========================================================================== */

.recherche-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.recherche-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    border-radius: 999px;
    background-color: rgba(255, 103, 106, 0.1);
    color: var(--couleur-corail);
    font-size: 0.8rem;
    font-weight: 600;
}

.recherche-chip button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 103, 106, 0.2);
    font-size: 0.62rem;
}

.recherche-chip button:hover {
    background-color: var(--couleur-corail);
    color: #ffffff;
}

.recherche-chips__tout-effacer {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(38, 53, 60, 0.5);
    text-decoration: none;
}

[data-theme="sombre"] .recherche-chips__tout-effacer {
    color: rgba(240, 235, 230, 0.5);
}

/* ==========================================================================
   BASCULE VUE GRILLE/LISTE (histoires)
   ========================================================================== */

.recherche-vue-bascule {
    display: flex;
    gap: 2px;
    background-color: rgba(38, 53, 60, 0.05);
    border-radius: 10px;
    padding: 3px;
    margin-left: auto;
}

[data-theme="sombre"] .recherche-vue-bascule {
    background-color: rgba(255, 255, 255, 0.06);
}

.recherche-vue-bouton {
    width: 36px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(38, 53, 60, 0.45);
    font-size: 0.85rem;
}

[data-theme="sombre"] .recherche-vue-bouton {
    color: rgba(240, 235, 230, 0.7);
}

.recherche-vue-bouton--actif {
    background-color: #ffffff;
    color: var(--couleur-corail);
    box-shadow: 0 2px 6px rgba(38, 53, 60, 0.1);
}

[data-theme="sombre"] .recherche-vue-bouton--actif {
    background-color: #232a2f;
}

.recherche-grille--liste {
    grid-template-columns: 1fr !important;
}

.recherche-grille--liste .carte-histoire--apercu {
    display: flex !important;
    align-items: center;
    gap: 16px;
}

.recherche-grille--liste .carte-histoire__couverture {
    width: 80px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 10px;
}

.recherche-grille--liste .carte-histoire__contenu {
    flex: 1;
    padding: 0;
}

/* ==========================================================================
   SURBRILLANCE DU TERME RECHERCHÉ
   ========================================================================== */

mark.recherche-surbrillance {
    background-color: rgba(255, 103, 106, 0.25);
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

/* ==========================================================================
   SQUELETTES DE CHARGEMENT
   ========================================================================== */

.recherche-squelette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 22px;
}

.recherche-squelette::before,
.recherche-squelette::after,
.recherche-squelette span {
    content: '';
    display: block;
    height: 300px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(38,53,60,0.05) 25%, rgba(38,53,60,0.09) 37%, rgba(38,53,60,0.05) 63%);
    background-size: 400% 100%;
    animation: recherche-scintillement 1.4s ease infinite;
}

.recherche-squelette::before { content: ''; }
.recherche-squelette::after { content: ''; }

@keyframes recherche-scintillement {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ==========================================================================
   CARTES AUTEURS ENRICHIES (repris du pattern Mes abonnements)
   ========================================================================== */

.recherche-auteur-carte {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(38, 53, 60, 0.07);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

.recherche-auteur-carte:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(38, 53, 60, 0.12);
}

[data-theme="sombre"] .recherche-auteur-carte {
    background-color: #232a2f;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.recherche-auteur-carte__entete {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.recherche-auteur-carte__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--couleur-corail);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--police-exergue);
    font-size: 1.3rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.recherche-auteur-carte__identite {
    flex: 1;
    min-width: 0;
}

.recherche-auteur-carte__nom {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--couleur-anthracite);
}

[data-theme="sombre"] .recherche-auteur-carte__nom {
    color: #f0ebe6;
}

.recherche-auteur-carte__badge-actif {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #01907c;
    margin-top: 2px;
}

.recherche-auteur-carte__badge-actif::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #01907c;
}

.recherche-auteur-carte__bio {
    font-size: 0.83rem;
    color: rgba(38, 53, 60, 0.6);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

[data-theme="sombre"] .recherche-auteur-carte__bio {
    color: rgba(240, 235, 230, 0.6);
}

.recherche-auteur-carte__meta {
    font-size: 0.78rem;
    color: rgba(38, 53, 60, 0.45);
    padding-top: 12px;
    border-top: 1px solid rgba(38, 53, 60, 0.06);
}

[data-theme="sombre"] .recherche-auteur-carte__meta {
    border-top-color: rgba(255, 255, 255, 0.06);
    color: rgba(240, 235, 230, 0.45);
}

/* ==========================================================================
   PAGINATION NUMÉROTÉE
   ========================================================================== */

.recherche-pagination-num {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.recherche-pagination-num button {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 9px;
    background-color: #ffffff;
    color: var(--couleur-anthracite);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(38, 53, 60, 0.08);
}

.recherche-pagination-num button:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.recherche-pagination-num button.recherche-pagination-num__actif {
    background-color: var(--couleur-corail);
    color: #ffffff;
}

.recherche-pagination-num span.recherche-pagination-num__ellipse {
    color: rgba(38, 53, 60, 0.35);
    padding: 0 2px;
}

[data-theme="sombre"] .recherche-pagination-num button {
    background-color: #232a2f;
    color: #f0ebe6;
}
/* ==========================================================================
   REFONTE ÉDITORIALE — hero
   ========================================================================== */

.recherche-hero {
    background-color: var(--couleur-beige);
    padding: 64px 0 44px;
    text-align: left;
    border-bottom: 1px solid rgba(38, 53, 60, 0.08);
}

[data-theme="sombre"] .recherche-hero {
    background-color: #171b1e;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.recherche-hero__eyebrow {
    font-family: var(--police-corps);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--couleur-corail);
    margin-bottom: 10px;
}

.recherche-hero__eyebrow::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 1px;
    background-color: var(--couleur-corail);
    margin-right: 10px;
    vertical-align: middle;
}

.recherche-hero__titre {
    font-family: var(--police-exergue);
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 1.1;
    color: var(--couleur-anthracite);
    margin-bottom: 14px;
    max-width: 720px;
}

[data-theme="sombre"] .recherche-hero__titre {
    color: #f0ebe6;
}

.recherche-hero__resultat-info {
    font-family: var(--police-exergue);
    font-style: italic;
    font-size: 1rem;
    color: rgba(38, 53, 60, 0.55);
    margin-bottom: 28px;
}

[data-theme="sombre"] .recherche-hero__resultat-info {
    color: rgba(240, 235, 230, 0.55);
}

.recherche-onglets {
    border-bottom: 1px solid rgba(38, 53, 60, 0.12);
}

[data-theme="sombre"] .recherche-onglets {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.recherche-onglet {
    font-family: var(--police-corps);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 12px 20px;
}

[data-theme="sombre"] .recherche-onglet {
    color: rgba(240, 235, 230, 0.55);
}

[data-theme="sombre"] .recherche-onglet--actif {
    color: var(--couleur-corail);
}

/* ==========================================================================
   GRILLE ÉDITORIALE — histoires
   ========================================================================== */

.recherche-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 32px 26px;
}

.recherche-grille .carte-histoire--apercu {
    display: block;
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: none;
}

.recherche-grille .carte-histoire--apercu:hover {
    transform: none;
    box-shadow: none;
}

.recherche-grille .carte-histoire__couverture {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: rgba(38, 53, 60, 0.06);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(38, 53, 60, 0.25);
    font-size: 1.8rem;
    filter: grayscale(100%) contrast(1.02);
    transition: filter 0.45s ease;
}

.recherche-grille .carte-histoire--apercu:hover .carte-histoire__couverture {
    filter: grayscale(0%);
}

.recherche-grille .carte-histoire__contenu {
    padding: 16px 2px 0;
}

.recherche-grille .carte-histoire__genres {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--police-corps);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--couleur-corail);
    margin-bottom: 8px;
}

.recherche-grille .carte-histoire__genre-badge {
    background: none;
    padding: 0;
    color: inherit;
    font: inherit;
}

.recherche-grille .carte-histoire__genre-badge:not(:last-child)::after {
    content: '/';
    margin-left: 6px;
    opacity: 0.5;
}

.recherche-grille .carte-histoire__contenu h3 {
    font-family: var(--police-exergue);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--couleur-anthracite);
    margin-bottom: 8px;
    transition: color 0.15s ease;
}

[data-theme="sombre"] .recherche-grille .carte-histoire__contenu h3 {
    color: #f0ebe6;
}

.recherche-grille .carte-histoire--apercu:hover h3 {
    color: var(--couleur-corail);
}

.recherche-grille .carte-histoire__contenu p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(38, 53, 60, 0.6);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="sombre"] .recherche-grille .carte-histoire__contenu p {
    color: rgba(240, 235, 230, 0.6);
}

.recherche-grille .carte-histoire__pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(38, 53, 60, 0.1);
}

[data-theme="sombre"] .recherche-grille .carte-histoire__pied {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.recherche-grille .carte-histoire__auteur {
    font-family: var(--police-exergue);
    font-style: italic;
    font-size: 0.82rem;
    color: rgba(38, 53, 60, 0.65);
}

.recherche-grille .carte-histoire__auteur::before {
    content: 'Par ';
    opacity: 0.6;
}

[data-theme="sombre"] .recherche-grille .carte-histoire__auteur {
    color: rgba(240, 235, 230, 0.65);
}

.recherche-grille .carte-histoire__stats {
    font-size: 0.74rem;
    color: rgba(38, 53, 60, 0.4);
}

/* Article vedette — premier résultat mis en avant façon "une" de magazine,
   uniquement à la 1ère page et sur écran large */
@media (min-width: 900px) {
    .recherche-grille:not(.recherche-grille--liste) .carte-histoire--apercu:first-child {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        gap: 30px;
        align-items: center;
    }

    .recherche-grille:not(.recherche-grille--liste) .carte-histoire--apercu:first-child .carte-histoire__couverture {
        height: 340px;
    }

    .recherche-grille:not(.recherche-grille--liste) .carte-histoire--apercu:first-child h3 {
        font-size: 2rem;
    }

    .recherche-grille:not(.recherche-grille--liste) .carte-histoire--apercu:first-child p {
        -webkit-line-clamp: 4;
    }
}

/* Animation d'apparition douce au chargement */
.recherche-grille .carte-histoire--apercu {
    animation: recherche-apparition 0.4s ease backwards;
}

.recherche-grille .carte-histoire--apercu:nth-child(1) { animation-delay: 0s; }
.recherche-grille .carte-histoire--apercu:nth-child(2) { animation-delay: 0.05s; }
.recherche-grille .carte-histoire--apercu:nth-child(3) { animation-delay: 0.1s; }
.recherche-grille .carte-histoire--apercu:nth-child(4) { animation-delay: 0.15s; }
.recherche-grille .carte-histoire--apercu:nth-child(5) { animation-delay: 0.2s; }
.recherche-grille .carte-histoire--apercu:nth-child(n+6) { animation-delay: 0.25s; }

@keyframes recherche-apparition {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Vue liste éditoriale */
.recherche-grille--liste {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-template-columns: unset !important;
}

.recherche-grille--liste .carte-histoire--apercu {
    display: flex !important;
    align-items: center;
    gap: 22px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(38, 53, 60, 0.08);
    grid-column: unset !important;
}

[data-theme="sombre"] .recherche-grille--liste .carte-histoire--apercu {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.recherche-grille--liste .carte-histoire__couverture {
    width: 90px;
    height: 118px;
    flex-shrink: 0;
}

.recherche-grille--liste .carte-histoire__contenu {
    flex: 1;
    padding: 0;
}

.recherche-grille--liste .carte-histoire__contenu p {
    display: none;
}

/* ==========================================================================
   CARTES AUTEURS ÉDITORIALES
   ========================================================================== */

.recherche-liste-auteurs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}

.recherche-auteur-carte {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 28px 20px;
    border: 1px solid rgba(38, 53, 60, 0.1);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.recherche-auteur-carte:hover {
    transform: translateY(-3px);
    border-color: var(--couleur-corail);
    box-shadow: none;
}

[data-theme="sombre"] .recherche-auteur-carte {
    border-color: rgba(255, 255, 255, 0.1);
}

.recherche-auteur-carte__entete {
    flex-direction: column;
    margin-bottom: 14px;
}

.recherche-auteur-carte__avatar {
    width: 74px;
    height: 74px;
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.recherche-auteur-carte__nom {
    font-family: var(--police-exergue);
    font-size: 1.15rem;
    font-weight: 400;
}

.recherche-auteur-carte__badge-actif {
    justify-content: center;
    margin-top: 6px;
}

.recherche-auteur-carte__bio {
    font-family: var(--police-exergue);
    font-style: italic;
    text-align: center;
}

.recherche-auteur-carte__meta {
    border-top: none;
    padding-top: 0;
    font-family: var(--police-corps);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ==========================================================================
   AJUSTEMENTS D'ENSEMBLE
   ========================================================================== */

.recherche-corps {
    padding: 44px 0 100px;
}

.recherche-filtres {
    padding-bottom: 24px;
    margin-bottom: 34px;
    border-bottom: 1px solid rgba(38, 53, 60, 0.08);
}

[data-theme="sombre"] .recherche-filtres {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}