/* ============================================
   Palette officielle Papir V2 — Orthopus
   ============================================
   --col_1: #FFFFFF — Fond blanc principal · Texte sur fond dark
   --col_2: #212233 — Texte principal · Fond dark · Borders
   --col_3: #B399FF — Accent violet · Pilule catégorie · États actifs
   --col_4: #92FFAC — Accent vert · Pilule "Page"
   --col_5: #E1FFF9 — Accent menthe clair · Fonds doux · Placeholder image

   Règles de cohérence :
   - Sur fond blanc (--col_1) → texte --col_2
   - Sur fond dark (--col_2) → texte --col_1
   - Pas de var(--col_6), --col_7, --col_8 : INEXISTANTES dans la palette
   ============================================ */

/* ==============================================
   Editorial — composants partagés
   Single · Category · Search
   ============================================== */

/* ============================================
   Container centré (listing)
   ============================================ */

.editorial__container {
    max-width: var(--medium_width);
    margin-inline: auto;
    padding-inline: var(--global-edge-spacing);
    padding-block: var(--global-lg-spacing);
}

/* ============================================
   Hero — fond dark + séparateur SVG
   ============================================ */

.editorial__hero {
    position: relative;
    background: var(--col_2);             /* fond DARK */
    color: var(--col_1);                  /* texte CLAIR */
    overflow: hidden;
    text-align: center;
}

.editorial__hero-inner {
    max-width: var(--medium_width);
    margin-inline: auto;
    padding-inline: var(--global-edge-spacing);
    padding-block: var(--global-xl-spacing) var(--global-lg-spacing);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--global-md-spacing);
}

.editorial__hero-label {
    display: inline-block;
    font-size: var(--font-size-xxs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    color: var(--col_3);                  /* label accent VIOLET */
}

.editorial__hero-title {
    font-size: var(--font-size-xxxl);
    font-weight: var(--fw-bold);
    line-height: var(--line-height-tight);
    margin: 0;
    color: var(--col_1);                  /* titre BLANC sur fond dark */
}

.editorial__hero-description {
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    color: var(--col_1);
    opacity: 0.85;                        /* texte BLANC atténué */
    max-width: 60ch;
    margin: 0;
}

.editorial__hero-description p {
    margin: 0 0 var(--global-xs-spacing);
}

.editorial__hero-counter {
    font-size: var(--font-size-lg);
    color: var(--col_1);
    opacity: 0.85;
    margin: 0;
}

/* Séparateur SVG — vague blanche en bas du hero */
.editorial__hero-wave {
    position: absolute;
    bottom: -1px;                         /* évite le gap d'antialiasing */
    left: 0;
    right: 0;
    width: 100%;
    line-height: 0;
    pointer-events: none;
}

.editorial__hero-wave svg {
    display: block;
    width: 100%;
    height: 60px;
    fill: var(--col_1);                   /* vague BLANCHE = couleur du listing */
}

/* ============================================
   Formulaire de recherche (sur fond dark)
   ============================================ */

.editorial__search-form {
    display: flex;
    gap: var(--global-xs-spacing);
    max-width: 600px;
    width: 100%;
}

.editorial__search-input {
    flex: 1;
    padding: 0.75em 1.25em;
    font-size: var(--font-size-md);
    font-family: inherit;
    color: var(--col_2);                  /* texte SOMBRE dans l'input */
    background: var(--col_1);             /* fond BLANC de l'input */
    border: 2px solid var(--col_1);
    border-radius: 999px;
    transition: border-color 0.2s ease;
}

.editorial__search-input::placeholder {
    color: var(--col_2);
    opacity: 0.5;
}

.editorial__search-input:focus {
    outline: none;
    border-color: var(--col_3);           /* focus accent VIOLET */
}

.editorial__search-button {
    padding: 0.75em 1.5em;
    font-size: var(--font-size-md);
    font-weight: var(--fw-semibold);
    font-family: inherit;
    color: var(--col_2);                  /* texte SOMBRE sur bouton violet */
    background: var(--col_3);             /* bouton accent VIOLET */
    border: 2px solid var(--col_3);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.editorial__search-button:hover,
.editorial__search-button:focus {
    opacity: 0.85;
    outline: none;
}

/* ============================================
   Card article (partagée single / category / search)
   ============================================ */

.article-card {
    background: var(--col_1);             /* fond BLANC */
    border: 2px solid var(--col_2);       /* border SOMBRE */
    border-radius: 40px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(33, 34, 51, 0.12);
}

.article-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--col_2);                  /* texte SOMBRE par défaut */
    height: 100%;
}

.article-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--col_5);             /* fallback menthe clair si pas d'image */
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card__image img {
    transform: scale(1.03);
}

.article-card__category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    display: inline-block;
    padding: 0.5em 1em;
    background: var(--col_4);             /* accent VIOLET */
    color: var(--col_2);                  /* texte SOMBRE sur accent */
    font-size: var(--font-size-xxs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    border-radius: 999px;
    line-height: 1.2;
    margin: 0;
    border:solid 2px var(--col_2);
}

.article-card__body {
    padding: var(--global-md-spacing);
    display: flex;
    flex-direction: column;
    gap: var(--global-xs-spacing);
    flex: 1;
}

.article-card__title {
    font-size: var(--font-size-lg);
    font-weight: var(--fw-bold);
    line-height: var(--line-height-snug);
    margin: 0;
    color: var(--col_2);                  /* texte SOMBRE */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.article-card__excerpt {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--col_2);
    opacity: 0.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.article-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    align-items: center;
    font-size: var(--font-size-xs);
    color: var(--col_2);
    opacity: 0.6;
    margin-top: auto;
    padding-top: var(--global-xs-spacing);
}

.article-card__meta time,
.article-card__author,
.article-card__reading-time {
    white-space: nowrap;
}

/* ============================================
   État vide
   ============================================ */

.editorial__empty {
    text-align: center;
    padding: var(--global-xl-spacing) 0;
    max-width: 600px;
    margin: 0 auto;
}

.editorial__empty-title {
    font-size: var(--font-size-xxl);
    font-weight: var(--fw-bold);
    line-height: var(--line-height-tight);
    margin: 0 0 var(--global-sm-spacing);
    color: var(--col_2);
}

.editorial__empty-text {
    font-size: var(--font-size-lg);
    color: var(--col_2);
    opacity: 0.7;
    margin: 0 0 var(--global-md-spacing);
}

.editorial__empty-suggestions {
    display: flex;
    flex-direction: column;
    gap: var(--global-xs-spacing);
    list-style: none;
    margin: 0;
    padding: 0;
}

.editorial__empty-suggestions a {
    display: inline-block;
    padding: 0.6em 1.5em;
    font-size: var(--font-size-md);
    font-weight: var(--fw-semibold);
    color: var(--col_2);
    background: transparent;
    border: 2px solid var(--col_2);
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.editorial__empty-suggestions a:hover,
.editorial__empty-suggestions a:focus {
    background: var(--col_2);
    color: var(--col_1);
    outline: none;
}

/* ============================================
   Responsive — ≤ 1024px
   ============================================ */

@media (max-width: 1024px) {
    .editorial__hero-title {
        font-size: var(--font-size-xxl);
    }
}

/* ============================================
   Responsive — ≤ 767px
   ============================================ */

@media (max-width: 767px) {
    .editorial__hero-inner {
        padding-block: var(--global-lg-spacing) var(--global-md-spacing);
    }

    .editorial__hero-title {
        font-size: var(--font-size-xl);
    }

    .editorial__hero-wave svg {
        height: 40px;
    }

    .editorial__search-form {
        flex-direction: column;
    }

    .editorial__search-button {
        width: 100%;
    }
}
