/* ELSELP : ajouts au thème Taste, séparés pour faciliter ses mises à jour */

/* Design system */
:root {
    --elselp-fond: #E8E6DF;
    --elselp-encre: #1A1A18;
    --elselp-terracotta: #C8602A;        /* marque : boutons, gros titres */
    --elselp-terracotta-fonce: #A34A1F;  /* fonds de blocs et petit texte coloré */
    --elselp-sauge: #8B9E7A;             /* filets et décor, jamais en texte */
    --elselp-sauge-clair: #D3DACB;       /* fonds de blocs */
    --elselp-creme: #F5F3EE;             /* texte sur terracotta foncé */

    --color-darker-gray: var(--elselp-encre);
    /* Texte secondaire de Taste (copyright, champ d'inscription) : 2,8:1 à l'origine, 6,2:1 ici */
    --color-secondary-text-dark: rgba(0, 0, 0, .64);
}

/* html:root et non :root : ghost_head arrive après ce fichier et déclare ces deux variables
   avec les polices choisies dans l'admin. Il faut une priorité plus forte pour passer devant. */
html:root {
    --gh-font-heading: "Fraunces", Georgia, serif;
    --gh-font-body: "Figtree", system-ui, sans-serif;
}

/* Titres */
h1, h2, h3,
.gh-article-title, .gh-list-item-title, .gh-list-title,
.gh-header-primary, .gh-cta-title, .gh-archive-title {
    font-family: var(--gh-font-heading);
    font-weight: 900;
    letter-spacing: -.01em;
}
:is(h1, h2, h3, .gh-article-title, .gh-list-item-title, .gh-list-title,
    .gh-header-primary, .gh-cta-title, .gh-archive-title) em {
    font-weight: 400;
    font-style: italic;
}

/* Petit texte coloré : --ghost-accent-color de Taste trop clair à cette taille.
   Les boutons et les gros titres gardent l'accent. */
.gh-content a,
figcaption a,
.gh-head-btn:not(.gh-btn),
.gh-list-item-primary-tag,
.gh-article-meta-tag,
.gh-content .kg-cta-link-accent .kg-cta-text a,
.gh-content .kg-cta-link-accent .kg-cta-sponsor-label a {
    color: var(--elselp-terracotta-fonce);
}

html { scroll-behavior: smooth; }
.gh-content #recette { scroll-margin-top: 24px; }

.elselp-jump {
    display: inline-block;
    justify-self: start;
    width: fit-content;
    padding: 8px 20px;
    border: 2px solid var(--ghost-accent-color);
    border-radius: 100px;
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}
.gh-content a.elselp-jump { color: var(--elselp-encre); }
.elselp-jump:hover { background: var(--ghost-accent-color); }

.elselp-related { margin-top: 64px; }
.elselp-empty { margin: 48px 0; text-align: center; }

/* Champ d'inscription : le bouton "S'abonner" ne se coupe plus sur mobile */
.gh-header-input, .gh-cta-input { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-header-input span, .gh-cta-input span { white-space: nowrap; }
@media (max-width: 480px) {
    .gh-header-input, .gh-cta-input { font-size: 1.5rem; }
}

/* Bloc FAQ : <details> sans classe (anciennes FAQ), details.elselp-faq, carte toggle de Ghost.
   Les questions qui se suivent forment un seul bloc, dans l'esprit du bloc transparence :
   filet terracotta à gauche, fond terracotta transparent, trait fin entre deux questions. */
.gh-content details,
.gh-content .kg-toggle-card {
    --elselp-faq-trait: rgba(163, 74, 31, .25);
    padding: 16px 22px;
    color: var(--elselp-encre);
    background: rgba(200, 96, 42, .10);
    border-left: 6px solid var(--elselp-terracotta);
    border-radius: 0;
    box-shadow: none;
}
/* Première question d'une série */
.gh-content :is(details, .kg-toggle-card):not(:is(details, .kg-toggle-card) + *) {
    padding-top: 20px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}
/* Dernière question d'une série */
.gh-content :is(details, .kg-toggle-card):not(:has(+ :is(details, .kg-toggle-card))) {
    padding-bottom: 20px;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}
/* Entre deux questions : collées, séparées par un trait */
.gh-content :is(details, .kg-toggle-card) + :is(details, .kg-toggle-card) {
    margin-top: 0;
    border-top: 1px solid var(--elselp-faq-trait);
}

.gh-content details summary,
.gh-content .kg-toggle-card h4.kg-toggle-heading-text {
    font-family: var(--gh-font-heading);
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--elselp-encre);
}
.gh-content details summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
}
.gh-content details summary::-webkit-details-marker { display: none; }

/* Le "+" et le "−". La seconde valeur de content les rend muets pour les lecteurs d'écran. */
.gh-content details summary::after,
.gh-content .kg-toggle-card-icon::before {
    flex: none;
    width: 1em;
    margin-left: 16px;
    font-family: var(--gh-font-heading);
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.1;
    color: var(--elselp-terracotta-fonce);
    text-align: center;
    content: "+";
    content: "+" / "";
}
.gh-content details[open] summary::after,
.gh-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon::before {
    content: "\2212";
    content: "\2212" / "";
}
.gh-content .kg-toggle-card-icon svg { display: none; }
.gh-content .kg-toggle-card-icon::before { margin-left: 0; font-size: 1.32em; }

/* L'écart passe par le summary pour marcher avec ou sans <p> dans la réponse */
.gh-content details[open] summary { margin-bottom: 8px; }
.gh-content details > p { margin: 0; }
.gh-content details > p + p { margin-top: .8em; }
.gh-content details,
.gh-content .kg-toggle-content { font-size: .95em; line-height: 1.55; }
.gh-content .kg-toggle-card .kg-toggle-content p { font-size: 1em; }

.gh-content details :is(h1, h2, h3, h4, h5, h6, strong, em, li),
.gh-content .kg-toggle-content :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
/* Le terracotta foncé ne fait que 4,3:1 sur ce fond : les liens restent en encre */
.gh-content details a,
.gh-content .kg-toggle-card a {
    color: inherit;
    text-decoration: underline;
}

.gh-content details summary:focus-visible,
.gh-content .kg-toggle-card-icon:focus-visible {
    outline: 2px solid var(--elselp-terracotta-fonce);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Bloc transparence */
.elselp-transparence {
    padding: 18px 22px;
    font-size: .92em;
    line-height: 1.5;
    color: var(--elselp-encre);
    background: var(--elselp-sauge-clair);
    border-left: 6px solid var(--elselp-sauge);
    border-radius: 14px;
}
.elselp-transparence > strong:first-child {
    display: block;
    font-family: var(--gh-font-body);
    font-weight: 700;
    font-variant-caps: small-caps;
    letter-spacing: .12em;
}
/* Le terracotta foncé ne fait que 4,1:1 sur ce fond : les liens restent en encre */
.gh-content .elselp-transparence a { color: inherit; }

/* Texte des articles justifié (paragraphes et listes, ni titres ni chapô).
   La césure évite les grands trous entre les mots, surtout sur mobile. */
.gh-content > p,
.gh-content > :is(ul, ol) li,
.gh-content details > p,
.elselp-transparence {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Titres plus petits (11 novembre 2026). Chaque règle reprend la taille de Taste
   (assets/built/screen.css, même sélecteur) moins une réduction : 4 pt pour les grands titres,
   2 pt pour les petits (h3 du texte, titres des cartes d'articles), qui restent lisibles.
   Pour ajuster, changer seulement ces deux valeurs. À reporter si Taste change ses tailles. */
:root {
    --elselp-titre-reduction: 4pt;
    --elselp-petit-titre-reduction: 2pt;
}
.gh-article-title { font-size: calc(clamp(3.2rem, 1.59vw + 2.56rem, 4.6rem) * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
.gh-content h2 { font-size: calc(1.8em * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
.gh-content h3 { font-size: calc(1.2em * var(--font-multiplier, 1) - var(--elselp-petit-titre-reduction)); }
.gh-archive-title { font-size: calc(3.6rem * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
.gh-header-primary { font-size: calc(clamp(3rem, 2.05vw + 3rem, 6rem) * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
.gh-list-title { font-size: calc(3.8rem - var(--elselp-titre-reduction)); }
.gh-list-item-title { font-size: calc(2rem * var(--font-multiplier, 1) - var(--elselp-petit-titre-reduction)); }
.gh-list.grid:not(.magazine)[data-column="2"] .gh-list-item-title { font-size: calc(2.6rem - var(--elselp-titre-reduction)); }
.gh-list.grid.magazine .gh-list-item:first-child .gh-list-item-title { font-size: calc(clamp(3rem, 1.36vw + 2.45rem, 4.2rem) * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
.gh-list.simple .gh-list-item-title { font-size: calc(3.2rem * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
.gh-cta-title { font-size: calc(clamp(2.4rem, 1.36vw + 1.85rem, 3.6rem) * var(--font-multiplier, 1) - var(--elselp-titre-reduction)); }
