/* Répertoire histoires érotiques — /histoires-erotiques/*
   (SPEC_HISTOIRES_EROTIQUES §3). Direction « revue littéraire », pas grille
   SaaS : titres et prose en serif, chapeaux en italique, cartes SANS boîte
   (un filet de couleur de catégorie + du blanc tournant), signature de plume
   sur chaque carte. Tout est à variables → les deux thèmes marchent. */

.histoires-hub, .histoires-categorie, .histoires-histoire {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 8px 0 48px;
    --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
}

/* ─── Accent par catégorie (filets, kickers, plumes) ───
   Teintes claires sur thème sombre (défaut), assombries en thème clair pour
   garder le contraste sur fond crème. */
[data-cat="premiere-fois"] { --cat: #d08d6b; }
[data-cat="bdsm"]          { --cat: #c76d90; }
[data-cat="gay"]           { --cat: #86a7cc; }
[data-cat="confessions"]   { --cat: #c9a45c; }
[data-theme="light"] [data-cat="premiere-fois"] { --cat: #a05a3a; }
[data-theme="light"] [data-cat="bdsm"]          { --cat: #8e3a5c; }
[data-theme="light"] [data-cat="gay"]           { --cat: #3f6491; }
[data-theme="light"] [data-cat="confessions"]   { --cat: #8a6a2e; }

/* ─── Petites pièces typographiques partagées ─── */
.h-kicker {
    display: block;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--cat, var(--accent-light));
    margin-bottom: 6px;
}
.h-meta {
    display: block;
    font-size: 0.8em;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.h-plume {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05em;
    color: var(--cat, var(--text-secondary));
}
.h-sep { margin: 0 7px; color: var(--text-dim); }

/* ─── Chapeau d'accueil ─── */
.histoires-pitch {
    font-family: var(--serif);
    font-size: 1.12em;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 10px 0 34px;
}
.histoires-pitch strong { color: var(--text); font-size: 1.15em; }
.histoires-pitch em { color: var(--accent-light); font-style: italic; }

/* ─── À la une ─── */
.histoire-une {
    border-left: 3px solid var(--cat, var(--accent));
    padding: 6px 0 10px 26px;
    margin: 0 0 44px;
    max-width: 780px;
}
.histoire-une-titre {
    font-family: var(--serif);
    font-size: 1.9em;
    font-weight: 600;
    line-height: 1.2;
    margin: 2px 0 12px;
}
.histoire-une-titre a { color: var(--text); text-decoration: none; }
.histoire-une-titre a:hover { color: var(--cat, var(--accent-light)); }
.histoire-une-chapeau {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.08em;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.histoire-une-lire {
    margin-left: 14px;
    color: var(--cat, var(--accent-light));
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.histoire-une-lire:hover { text-decoration: underline; }

/* ─── Sections ─── */
.histoires-section { margin: 44px 0 0; }
.histoires-section-titre {
    font-family: var(--serif);
    font-size: 1.35em;
    font-weight: 600;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.histoires-section-titre::after { content: ''; }
.histoires-section-titre a { color: inherit; text-decoration: none; }
.histoires-section-titre a:hover { color: var(--cat, var(--accent-light)); }
.histoires-section-more { margin: 4px 0 0; font-size: 0.9em; }
.histoires-section-more a { color: var(--cat, var(--accent-light)); text-decoration: none; }
.histoires-section-more a:hover { text-decoration: underline; }

/* ─── Sommaire : des LIGNES, pas des cartes — le répertoire se lit comme une
   table des matières. Titre serif + chapeau une ligne à gauche, plume et
   durée à droite, tick de couleur de catégorie au bord. ─── */
.histoires-liste {
    list-style: none;
    margin: 0;
    padding: 4px 0 0;
}
.histoire-ligne {
    border-bottom: 1px solid var(--border);
}
.histoire-ligne:last-child { border-bottom: none; }
.histoire-ligne > a {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 13px 0 13px 14px;
    border-left: 2px solid var(--cat, var(--accent));
    text-decoration: none;
    color: var(--text);
}
.hl-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hl-titre {
    font-family: var(--serif);
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.15s ease;
}
.histoire-ligne > a:hover .hl-titre { color: var(--cat, var(--accent-light)); }
.hl-chapeau {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.92em;
    color: var(--text-muted);
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hl-meta {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 0.82em;
    color: var(--text-muted);
    text-align: right;
}
.hl-cat {
    font-size: 0.88em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cat, var(--accent-light));
}
.hl-duree {
    min-width: 48px;
    font-variant-numeric: tabular-nums;
}
/* Sur la page catégorie (liste pleine page), un peu plus d'air par ligne. */
.histoires-liste-categorie .histoire-ligne > a { padding-top: 16px; padding-bottom: 16px; }

/* ─── Breadcrumb ─── */
.histoires-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.85em;
    color: var(--text-muted);
    margin: 0 0 20px;
}
.histoires-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.histoires-breadcrumb a:hover { color: var(--accent-light); }
.histoires-breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 46ch;
}

/* ─── Catégorie ─── */
.histoires-intro {
    font-family: var(--serif);
    max-width: 680px;
    font-size: 1.04em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 10px;
}
.histoires-intro p { margin: 0 0 14px; }

.histoires-pagination {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    margin: 36px 0 0;
}
.histoires-pagination a { color: var(--accent-light); text-decoration: none; }
.histoires-pagination a:hover { text-decoration: underline; }
.histoires-pagination-etat { color: var(--text-muted); font-size: 0.9em; }

/* ─── Histoire : la page de lecture ─── */
.histoire-chapeau {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.14em;
    color: var(--text-secondary);
    max-width: 66ch;
    line-height: 1.6;
    margin: 0 0 16px;
}
.histoire-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    font-size: 0.85em;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    margin: 0 0 30px;
}
.histoire-meta-cat {
    color: var(--accent-light);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.08em;
}
.histoire-meta-cat:hover { text-decoration: underline; }
.histoire-meta-tags { color: var(--text-dim); }

.histoire-corps {
    font-family: var(--serif);
    max-width: 66ch;
    font-size: 1.12em;
    line-height: 1.8;
}
.histoire-corps p { margin: 0 0 1.2em; }
/* Lettrine sur le premier paragraphe : le marqueur « nouvelle » immédiat. */
.histoire-corps > p:first-child::first-letter {
    font-size: 3.1em;
    line-height: 0.85;
    float: left;
    padding: 4px 8px 0 0;
    color: var(--accent-light);
    font-weight: 600;
}

.histoire-cta-discret {
    margin: 1.8em 0;
    padding: 12px 18px;
    border-left: 3px solid var(--accent);
    background: var(--accent-bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--serif);
    font-style: italic;
}
.histoire-cta-discret a { color: var(--accent-light); text-decoration: none; }
.histoire-cta-discret a:hover { text-decoration: underline; }

.histoire-signature {
    max-width: 66ch;
    margin: 30px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9em;
}
.histoire-signature strong {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-secondary);
}

.histoire-cta-fort, .histoires-cta-final {
    max-width: 720px;
    margin: 34px 0;
    padding: 26px 28px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    background: var(--accent-bg);
}
.histoire-cta-fort h2, .histoires-cta-final h2 {
    font-family: var(--serif);
    margin: 0 0 10px;
    font-size: 1.35em;
}
.histoire-cta-fort p, .histoires-cta-final p { margin: 0 0 14px; color: var(--text-secondary); line-height: 1.55; }
.histoires-cta-final p:last-child { margin-bottom: 0; }
.histoire-cta-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}
.histoire-cta-btn:hover { background: var(--accent-hover); }

/* ─── Plumes ─── */
.histoires-plumes-intro { max-width: 680px; color: var(--text-secondary); margin: 14px 0 4px; line-height: 1.55; }
.histoires-plumes-list { list-style: none; padding: 0; margin: 0; max-width: 680px; }
.histoires-plumes-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.histoires-plumes-list li:last-child { border-bottom: none; }
.histoires-plume-nom {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.08em;
    color: var(--text);
}
.histoires-plume-tagline { color: var(--text-muted); font-size: 0.92em; line-height: 1.45; }

.histoires-vide { color: var(--text-muted); margin: 30px 0; }

/* ─── Gate 18+ (D2) : overlay client-side, localStorage ───
   Le contenu reste dans le DOM (crawlable) ; l'overlay bloque la LECTURE
   humaine tant que la majorité n'est pas confirmée. */
.age-gate-18-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 8, 14, 0.96);
}
.age-gate-18-box {
    max-width: 430px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
}
.age-gate-18-box h2 { margin: 0 0 12px; font-size: 1.3em; }
.age-gate-18-box p { color: var(--text-secondary); margin: 0 0 18px; line-height: 1.5; }
.age-gate-18-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.age-gate-18-enter {
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
}
.age-gate-18-enter:hover { background: var(--accent-hover); }
.age-gate-18-leave {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
}

/* ─── Mobile : la ligne de sommaire s'empile, le chapeau passe sur 2 lignes ─── */
@media (max-width: 640px) {
    .histoire-ligne > a { flex-direction: column; gap: 6px; }
    .hl-chapeau {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .hl-meta { text-align: left; }
    .histoire-une { padding-left: 18px; }
    .histoire-une-titre { font-size: 1.5em; }
    .histoire-une-lire { display: block; margin: 8px 0 0; }
    .histoire-corps { font-size: 1.08em; }
}
