/*
Theme Name: GeneratePress Child
Theme URI: https://instalivre.fr
Template: generatepress
Version: 11.0
*/

/* ══════════════════════════════════════════════════════════════════
   VARIABLES GLOBALES
   ══════════════════════════════════════════════════════════════════ */
:root {
    --noir: #0e0d0b;
    --or: #c8943a;
    --or-clair: #e0b05a;
    --creme: #faf6ef;
    --blanc: #ffffff;
    --texte: #3a3328;
    --texte-mute: #6b5e50; /* lot 2 : était #9c8c7a (contraste 3,2:1, refusé par l'accessibilité) */
    --bord: #e8ddd0;
    /* Lot 2 : or lisible sur fond clair (texte, liens). L'or vif reste pour
       les fonds sombres et les décorations. */
    --or-texte: #8a6520;
    /* Polices : aucune à télécharger. Cormorant / DM Sans restent en tête
       de liste et servent si l'appareil les possède. */
    --f-titre: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --f-texte: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--f-texte);
    background: var(--creme);
    color: var(--texte);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--or);
    transition: color .2s;
}

a:hover {
    color: var(--or-clair);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER GLOBAL
   ══════════════════════════════════════════════════════════════════ */
.il-header {
    background: #1A1A1A;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.7rem 1rem;
    transition: box-shadow .2s ease;
}

/* Lot 2 : les anciennes fiches livres contiennent leur propre bloc <style>,
   qui repeint toute classe « .il-header » (coins arrondis, marges, halos).
   L'en-tête du site porte la même classe : on le protège ici. */
body > header.il-header {
    margin: 0;
    border-radius: 0;
    overflow: visible;
    color: #fff;
}
body > header.il-header::before,
body > header.il-header::after { content: none; display: none; }
@media (min-width: 769px) {
    body > header.il-header { padding: 0.7rem 1rem; }
}

.il-header.is-scrolled {
    box-shadow: 0 2px 30px rgba(0,0,0,0.18);
}

.il-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.il-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.il-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--or), #967536);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 8px 30px rgba(200,148,58,.2);
}

.il-logo-text {
    display: flex;
    flex-direction: column;
}

.il-logo-title {
    font-family: var(--f-titre);
    font-size: 1.6rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
}

.il-logo-title span {
    color: var(--or);
}

.il-logo-sub {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2px;
}

.il-search-header {
    flex: 1;
    max-width: 300px;
    margin: 0 0.8rem;
}

.il-search-header form {
    display: flex;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.il-search-header input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: #fff;
    outline: none;
    font-size: 0.85rem;
}

.il-search-header input::placeholder {
    color: rgba(255,255,255,0.5);
}

.il-search-header button {
    padding: 0.6rem 1.2rem;
    background: var(--or);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.il-search-header button:hover {
    background: #967536;
}

.il-nav-links {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    align-items: center;
}

.il-nav-links a {
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    padding: 0.4rem 0;
    transition: color 0.2s;
}

.il-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--or);
    transition: width 0.3s;
}

.il-nav-links a:hover,
.il-nav-links a.active {
    color: var(--or);
}

.il-nav-links a:hover::after,
.il-nav-links a.active::after {
    width: 100%;
}

.il-mobile-btn {
    display: none;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 1.5rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER GLOBAL
   ══════════════════════════════════════════════════════════════════ */
.il-footer {
    background: var(--noir);
    color: #fff;
    padding: 3rem 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.il-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.il-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.il-footer-brand {
    max-width: 400px;
}

.il-footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.il-footer-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--or), #967536);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.il-footer-logo-name {
    font-family: var(--f-titre);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.il-footer-logo-name span {
    color: var(--or);
}

.il-footer-logo-sub {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
}

.il-footer-brand p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.il-footer-affil {
    background: rgba(255,255,255,0.05);
    border-left: 3px solid var(--or);
    padding: 0.8rem 1rem;
    border-radius: 0 6px 6px 0;
}

.il-footer-affil h4 {
    font-size: 0.7rem;
    color: var(--or);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.il-footer-affil p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}

.il-footer-col h4 {
    font-family: var(--f-titre);
    font-size: 1rem;
    color: var(--or);
    margin-bottom: 1rem;
}

.il-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.il-footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.il-footer-links a:hover {
    color: var(--or);
}

.il-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════
   RECHERCHE DE L'EN-TÊTE — lisible partout (lot 2)
   Le texte d'exemple « Livre ou auteur… » était blanc sur fond blanc :
   un style de GeneratePress repeignait le champ. On fixe tout ici.
   ══════════════════════════════════════════════════════════════════ */
.il-header .il-search-header input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.il-header .il-search-header input[type="search"]::placeholder { color: rgba(255,255,255,0.72); opacity: 1; }
.il-header .il-search-header input[type="search"]:focus { background: rgba(255,255,255,0.14); }
.il-header .il-search-header input[type="search"]::-webkit-search-cancel-button { filter: invert(1); }
.il-header .il-search-header form:focus-within { border-color: var(--or); }
.il-header .il-search-header button { color: #1a1208; }
.il-search-btn { display: none; }

/* ══════════════════════════════════════════════════════════════════
   MOBILE — en-tête compact (lot 2)
   Avant : logo + barre de recherche pleine largeur, soit environ 150 px
   collés en haut de l'écran pendant toute la lecture. Maintenant une
   seule ligne de 64 px ; la recherche s'ouvre avec la loupe.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .il-header,
    body > header.il-header { padding: 0 1rem; }
    .il-header-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
        min-height: 64px;
        padding: 10px 0;
    }
    .il-logo { margin-right: auto; gap: 0.6rem; }
    .il-logo-icon { width: 36px; height: 36px; font-size: 1.1rem; box-shadow: none; }
    .il-logo-title { font-size: 1.35rem; }
    .il-logo-sub { font-size: 0.55rem; letter-spacing: 1.5px; color: rgba(255,255,255,0.7); }

    .il-search-btn,
    .il-mobile-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.22);
        border-radius: 10px;
        color: #fff;
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
    }
    .il-mobile-btn { font-size: 1.45rem; }
    .il-search-btn[aria-expanded="true"] { background: var(--or); border-color: var(--or); }

    .il-search-header {
        display: none;
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        margin: 0.1rem 0 0.2rem;
    }
    .il-header.search-open .il-search-header { display: block; }
    .il-search-header input[type="search"] { font-size: 16px !important; } /* 16 px : iPhone ne zoome plus sur le champ */

    /* Menu mobile - CACHÉ par défaut */
    .il-nav-links {
        display: none !important;
        position: fixed;
        top: var(--il-header-height, 64px);
        left: 0;
        right: 0;
        background: #1a1a1a;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1.5rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 8px 30px rgba(0,0,0,0.4);
        z-index: 9999;
    }
    .il-nav-links.open {
        display: flex !important;
    }
    .il-nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .il-nav-links li:last-child {
        border-bottom: none;
    }
    .il-nav-links a {
        display: block;
        padding: 0.9rem 0;
        font-size: 1rem;
        font-weight: 600;
        color: rgba(255,255,255,0.9);
    }

    /* Footer mobile : tout centré (les titres de colonnes restaient à gauche) */
    .il-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .il-footer-brand {
        text-align: center;
        max-width: 100%;
    }
    .il-footer-logo-wrap {
        justify-content: center;
    }
    .il-footer-col { text-align: center; }
    .il-footer-col h4 { font-size: 1.15rem; margin-bottom: 0.8rem; }
    .il-footer-links {
        align-items: center;
        text-align: center;
        gap: 0;
    }
    .il-footer-links a { display: inline-block; padding: 0.55rem 0.5rem; } /* zones tactiles de 44 px */
    .il-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Pied de page : le bas de page était trop pâle (contraste 2,4:1). */
.il-footer-bottom { color: rgba(255,255,255,0.6); }

/* ═══════════════════════════════════════════════════════════════════════════
   InstaLivre — Bloc d'écoute audio                       DÉBUT — ne pas couper
   ---------------------------------------------------------------------------
   Ajouté le 28 septembre 2026.

   Sert les blocs « HTML personnalisé » de classe .ilsa-audio posés sur les
   guides, les fiches auteurs, les fiches livres et les articles.

   Tout est préfixé « ilsa-audio » : aucune collision possible avec les
   sélecteurs hérités des anciennes fiches.

   Pour retirer ce bloc un jour : supprimer de cette ligne jusqu'au marqueur
   FIN, tout en bas. Ne rien supprimer au-dessus de cette ligne.
   ═══════════════════════════════════════════════════════════════════════════ */

.ilsa-audio {
	--ilsa-audio-fond:    #14181f;
	--ilsa-audio-texte:   #e8eaed;
	--ilsa-audio-doux:    #a9b0bb;
	--ilsa-audio-accent:  #f5a623;
	--ilsa-audio-encre:   #14181f;

	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin: 32px 0;
	padding: 26px 28px;
	border-radius: 14px;
	background: var(--ilsa-audio-fond);
	color: var(--ilsa-audio-texte);
	border: 1px solid rgba(245, 166, 35, .28);
	line-height: 1.6;
}

.ilsa-audio__icone {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	color: var(--ilsa-audio-accent);
}

.ilsa-audio__icone svg { width: 100%; height: 100%; display: block; }

.ilsa-audio__corps { flex: 1 1 auto; min-width: 0; }

.ilsa-audio__titre {
	margin: 0 0 10px;
	font-size: 1.22rem;
	line-height: 1.3;
	font-weight: 700;
	color: var(--ilsa-audio-texte);
}

.ilsa-audio__texte {
	margin: 0 0 14px;
	color: var(--ilsa-audio-texte);
}

.ilsa-audio__texte strong { color: var(--ilsa-audio-accent); font-weight: 600; }

.ilsa-audio__faits {
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.ilsa-audio__faits li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 6px;
	color: var(--ilsa-audio-doux);
	font-size: .96rem;
}

.ilsa-audio__faits li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .58em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ilsa-audio-accent);
}

.ilsa-audio__action { margin: 0 0 12px; }

.ilsa-audio__bouton {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 8px;
	background: var(--ilsa-audio-accent);
	color: var(--ilsa-audio-encre) !important;
	font-weight: 700;
	font-size: 1.02rem;
	text-decoration: none !important;
	transition: transform .12s ease, filter .12s ease;
}

.ilsa-audio__bouton:hover,
.ilsa-audio__bouton:focus {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: var(--ilsa-audio-encre) !important;
}

.ilsa-audio__bouton:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}

.ilsa-audio__mention {
	margin: 0;
	font-size: .82rem;
	line-height: 1.5;
	color: var(--ilsa-audio-doux);
}

/* Téléphone — plus de la moitié de votre trafic. */
@media (max-width: 600px) {
	.ilsa-audio {
		flex-direction: column;
		gap: 14px;
		padding: 22px 20px;
		margin: 26px 0;
	}
	.ilsa-audio__icone { width: 32px; height: 32px; }
	.ilsa-audio__titre { font-size: 1.12rem; }
	.ilsa-audio__bouton { display: block; text-align: center; }
}

/* Version claire, si un jour vous en voulez une : ajoutez la classe
   « ilsa-audio--clair » sur le <aside>. */
.ilsa-audio--clair {
	--ilsa-audio-fond:  #fdf6e9;
	--ilsa-audio-texte: #1f2430;
	--ilsa-audio-doux:  #5b6472;
	background: var(--ilsa-audio-fond);
	color: var(--ilsa-audio-texte);
	border-color: rgba(245, 166, 35, .55);
}

/* ═══════════════════════════════════════════════════════════════════════════
   InstaLivre — Bloc d'écoute audio                                         FIN
   ═══════════════════════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════════
   COMPLIANZ — onglet « Gérer le consentement » (lot 3)
   Cet onglet flottant restait collé en bas de l'écran sur toutes les
   pages et cachait les boutons d'achat. Le droit de retirer son
   consentement reste garanti par le lien « Gérer les cookies » du pied
   de page (classe cmplz-show-banner, qui rouvre le bandeau).
   ══════════════════════════════════════════════════════════════════ */
#cmplz-manage-consent .cmplz-manage-consent,
#cmplz-manage-consent { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   BOUTONS D'ACHAT — communs à tout le site (lot 4)
   Mêmes boutons sur les fiches livres, les guides et les fiches
   auteurs. Texte foncé sur fond coloré : contraste 8:1 et plus.
   ══════════════════════════════════════════════════════════════════ */
.ilsl-buy-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 44px; padding: .6rem 1.1rem; border-radius: 10px;
    font-size: .92rem; font-weight: 700; line-height: 1.2;
    text-decoration: none !important; color: #14110c !important;
    font-family: var(--f-texte) !important;
    transition: filter .15s, transform .15s;
}
.ilsl-buy-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.ilsl-buy-btn:focus-visible { outline: 3px solid #8a6520; outline-offset: 2px; }
.ilsl-buy-audible { background: #ff8a4c; }
.ilsl-buy-amazon  { background: #ff9900; }
.ilsl-buy-fnac    { background: #f2b705; }
.ilsl-buy-icon { font-size: 1rem; }
