/* ============================================================
   islam.bf — feuille de style

   Parti pris :
   - aucune police téléchargée. Georgia pour les titres (présente
     partout, excellente avec les accents), police système pour le
     texte. Zéro octet de police à charger en 3G.
   - les types de contenu se distinguent par leur forme : l'audio
     en tuiles avec portrait, les articles en liste avec filets.
   - une seule couleur d'accent, l'or, réservée à ce qui est
     cliquable ou mis en avant.
   ============================================================ */

:root {
    --vert-profond: #0b5440;
    --vert:         #0f6b4f;
    --vert-pale:    #eaf3ef;
    --or:           #b2791a;
    --or-pale:      #fdf6e8;
    --encre:        #16211e;
    --encre-doux:   #5d6b66;
    --papier:       #fafbfa;
    --pierre:       #e4e9e7;
    --blanc:        #ffffff;
    --rouge:        #a8352a;

    --serif: Georgia, "Times New Roman", "Noto Serif", serif;
    --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --large: 1100px;
    --texte-large: 68ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--papier);
    color: var(--encre);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--vert); }
a:hover { color: var(--vert-profond); }

:focus-visible {
    outline: 3px solid var(--or);
    outline-offset: 2px;
}

.invisible {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.saut-contenu {
    position: absolute; left: -9999px;
    background: var(--vert-profond); color: #fff;
    padding: 10px 16px; z-index: 100;
}
.saut-contenu:focus { left: 8px; top: 8px; }

/* ---------- En-tête ---------- */
.site-entete {
    background: var(--vert-profond);
    color: #fff;
}
.rang {
    max-width: var(--large);
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.marque {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
/* Le logo est un JPEG, sans transparence : on l'encadre en pastille
   blanche pour que ce fond paraisse voulu sur le bandeau sombre.
   Hauteur fixe, largeur libre : tient quelles que soient ses proportions. */
/* On vise aussi l'image par sa place dans le bandeau, et pas seulement
   par sa classe : si jamais le HTML perd la classe, la règle générale
   « img { height: auto } » reprendrait la main et le logo s'afficherait
   à sa taille réelle, en écrasant la mise en page. */
.marque img,
.marque-logo {
    height: 46px;
    width: auto;
    max-width: 150px;
    display: block;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    flex: 0 0 auto;
}
.marque-textes { display: block; min-width: 0; }
.marque-nom {
    display: block;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.marque-note {
    display: block;
    font-size: .78rem;
    color: #a9c9bd;
    margin-top: 2px;
}

.bouton-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    border-radius: 7px;
    padding: 8px 12px;
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
}
.bouton-menu-barres { display: inline-block; width: 16px; }
.bouton-menu-barres span {
    display: block; height: 2px; background: #fff;
    margin: 3px 0; border-radius: 2px;
}

/* ---------- Navigation ---------- */
.navigation { display: none; border-top: 1px solid rgba(255,255,255,.14); }
.navigation.ouverte { display: block; }
body.menu-ouvert { overflow: hidden; }

.menu { list-style: none; margin: 0; padding: 6px 0; }
.menu > li { position: relative; border-bottom: 1px solid rgba(255,255,255,.08); }
.menu > li:last-child { border-bottom: 0; }
.menu a {
    display: block;
    padding: 13px 18px;
    color: #eaf3ef;
    text-decoration: none;
    font-size: 1rem;
}
.menu a:hover, .menu a:focus { background: rgba(255,255,255,.08); color: #fff; }
.menu > li.actif > a { color: #fff; box-shadow: inset 3px 0 0 var(--or); }

.ouvrir-sous-menu {
    position: absolute; top: 4px; right: 8px;
    background: transparent; border: 0; color: #a9c9bd;
    font-size: 1.1rem; padding: 8px 12px; cursor: pointer;
}
.sous-menu { display: none; list-style: none; margin: 0; padding: 0 0 6px; }
.menu > li.deploye .sous-menu { display: block; }
.sous-menu a { padding: 10px 18px 10px 34px; font-size: .94rem; color: #bcd6cb; }

.recherche {
    display: flex; gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.recherche input {
    flex: 1; min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 7px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font: inherit; font-size: .95rem;
}
.recherche input::placeholder { color: #9dbdb1; }
.recherche button {
    padding: 10px 14px; border: 0; border-radius: 7px;
    background: var(--or); color: #fff; font: inherit; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
.note-admin { padding: 0 18px 14px; margin: 0; font-size: .88rem; }
.note-admin a { color: var(--or-pale); }

/* ---------- Contenu ---------- */
main {
    max-width: var(--large);
    margin: 0 auto;
    padding: 0 18px 48px;
}

.section { margin: 36px 0; }

h1 {
    font-family: var(--serif);
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 26px 0 10px;
    font-weight: 700;
}

.titre-section {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pierre);
}

.accueil-ouverture { margin-top: 28px; }
.ouverture-note {
    color: var(--encre-doux);
    max-width: var(--texte-large);
    margin: 0 0 4px;
}
.chiffre-doux { color: var(--vert); font-weight: 600; }

.section-suite { margin-top: 18px; }
.lien-fort {
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--or);
    padding-bottom: 2px;
}
.lien-fort:hover { border-bottom-color: var(--vert); }

.vide { color: var(--encre-doux); }
.compte-articles { color: var(--encre-doux); font-size: .92rem; margin: 6px 0 0; }
.petit { font-size: .87rem; color: var(--encre-doux); }

/* ---------- Les voix : dossiers de prêches ---------- */
.voix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.voix-carte {
    display: block;
    text-decoration: none;
    color: var(--encre);
}
.voix-image {
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--vert-pale);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.voix-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voix-initiale {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: 2.6rem; color: var(--vert);
}
.voix-carte:hover .voix-image { box-shadow: 0 0 0 3px var(--or); }
.voix-nom {
    display: block;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.25;
    margin-top: 9px;
}
.voix-compte { display: block; font-size: .84rem; color: var(--encre-doux); }

/* ---------- Liste d'articles ---------- */
.liste-articles { list-style: none; margin: 0; padding: 0; }
.liste-articles li { border-top: 1px solid var(--pierre); }
.liste-articles li:last-child { border-bottom: 1px solid var(--pierre); }
.liste-articles a {
    display: block;
    padding: 16px 0;
    text-decoration: none;
    color: var(--encre);
}
.liste-articles a:hover { background: var(--vert-pale); }
.liste-articles a:hover .art-titre { color: var(--vert-profond); }

.art-date {
    display: block;
    font-size: .82rem;
    color: var(--encre-doux);
    margin-bottom: 3px;
}
.art-titre {
    display: block;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    max-width: var(--texte-large);
}
.art-extrait {
    display: block;
    color: var(--encre-doux);
    font-size: .93rem;
    margin-top: 5px;
    max-width: var(--texte-large);
}
.art-rubrique {
    display: inline-block;
    margin-top: 8px;
    font-size: .8rem;
    color: var(--vert);
    border: 1px solid var(--pierre);
    border-radius: 999px;
    padding: 2px 10px;
}
.liste-articles li.epingle { background: var(--or-pale); }
.liste-serree a { padding: 11px 0; }
.liste-serree .art-titre { font-size: 1.02rem; }

.sous-rubriques { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sous-rubriques a {
    display: flex; justify-content: space-between; gap: 10px; align-items: center;
    padding: 12px 14px; background: var(--blanc);
    border: 1px solid var(--pierre); border-radius: 9px;
    text-decoration: none; color: var(--encre); font-weight: 600;
}
.sous-rubriques a:hover { border-color: var(--vert); }
.sr-compte { color: var(--encre-doux); font-weight: 400; font-size: .86rem; }

/* ---------- Fil d'Ariane ---------- */
.fil {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin-top: 18px; font-size: .88rem; color: var(--encre-doux);
}
.fil a { color: var(--vert); text-decoration: none; }
.fil a:hover { text-decoration: underline; }
.fil-sep { color: #9aa8a3; }

/* ---------- Article ---------- */
.article { margin: 20px 0 40px; }
.article-entete { max-width: var(--texte-large); }
.article-surtitre { color: var(--or); font-weight: 600; margin: 0; font-size: .93rem; }
.article-soustitre {
    font-family: var(--serif); font-size: 1.15rem;
    color: var(--encre-doux); margin: 6px 0 0; font-style: italic;
}
.article-reperes { color: var(--encre-doux); font-size: .9rem; margin: 10px 0 0; }
.repere-sep { margin: 0 4px; }
.etiquette-brouillon {
    display: inline-block; margin-left: 8px;
    background: var(--or-pale); color: var(--or);
    border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600;
}
.barre-admin { margin: 14px 0 0; }

.article-image { margin: 24px 0; }
.article-image img { border-radius: 10px; width: 100%; }

.article-chapo {
    max-width: var(--texte-large);
    font-size: 1.08rem;
    color: var(--encre);
    border-left: 3px solid var(--or);
    padding-left: 16px;
    margin: 22px 0;
}
.article-chapo p { margin: 0 0 10px; }

.article-texte {
    max-width: var(--texte-large);
    font-size: 1.04rem;
    line-height: 1.75;
}
.article-texte p { margin: 0 0 1.1em; }
.article-texte h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    margin: 1.8em 0 .5em;
}
.article-texte ul, .article-texte ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.article-texte li { margin-bottom: .4em; }
.article-texte blockquote {
    margin: 1.4em 0;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--pierre);
    color: var(--encre-doux);
    font-style: italic;
}
.article-texte img { border-radius: 8px; margin: 14px 0; }
.article-texte .img-gauche { float: left; margin: 4px 18px 10px 0; max-width: 45%; }
.article-texte .img-droite { float: right; margin: 4px 0 10px 18px; max-width: 45%; }
.article-texte .img-centre { display: block; margin: 18px auto; }
.article-texte hr { border: 0; border-top: 1px solid var(--pierre); margin: 2em 0; }
.article-texte a { text-decoration: underline; text-underline-offset: 2px; }

.article-source {
    max-width: var(--texte-large);
    margin-top: 28px; padding-top: 14px;
    border-top: 1px solid var(--pierre);
    font-size: .9rem; color: var(--encre-doux);
}

pre.code {
    background: #f1f4f3; border: 1px solid var(--pierre);
    border-radius: 8px; padding: 12px; overflow-x: auto; font-size: .88rem;
}

/* ---------- Facebook ---------- */
.section-facebook .facebook-cadre { margin-bottom: 12px; }
.section-facebook iframe { max-width: 100%; border-radius: 10px; }

/* ---------- Boutons, formulaires, alertes ---------- */
.bouton {
    display: inline-block;
    padding: 11px 18px;
    background: var(--vert);
    color: #fff;
    border: 0; border-radius: 8px;
    font: inherit; font-weight: 600;
    text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--vert-profond); color: #fff; }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton-petit { padding: 7px 13px; font-size: .9rem; }
.bouton-clair { background: var(--blanc); color: var(--vert); border: 1px solid var(--vert); }
.bouton-clair:hover { background: var(--vert-pale); color: var(--vert-profond); }
.bouton-rouge { background: var(--rouge); }
.bouton-rouge:hover { background: #8a2b22; }

.recherche-large {
    padding: 0; border: 0; margin: 16px 0;
    max-width: 520px;
}
.recherche-large input {
    background: var(--blanc);
    border: 1px solid var(--pierre);
    color: var(--encre);
}
.recherche-large input::placeholder { color: #93a19c; }

.alerte { border-radius: 9px; padding: 12px 14px; margin: 16px 0; font-size: .95rem; }
.alerte-succes { background: #e7f4ec; color: #14653f; }
.alerte-erreur { background: #fbeae8; color: var(--rouge); }
.alerte-info   { background: var(--or-pale); color: var(--or); }

.pagination {
    display: flex; align-items: center; gap: 14px;
    margin-top: 26px; flex-wrap: wrap;
}
.pagination a {
    padding: 9px 16px; border: 1px solid var(--pierre);
    border-radius: 8px; text-decoration: none; background: var(--blanc);
}
.pagination a:hover { border-color: var(--vert); }
.pagination-etat { color: var(--encre-doux); font-size: .9rem; }

/* ---------- Pied de page ---------- */
.site-pied {
    background: var(--vert-profond);
    color: #cfe2da;
    margin-top: 50px;
    padding: 34px 18px 22px;
}
.pied-colonnes {
    max-width: var(--large); margin: 0 auto;
    display: grid; gap: 26px;
    grid-template-columns: 1fr;
}
.pied-titre {
    font-family: var(--serif); font-size: 1.05rem;
    color: #fff; margin: 0 0 8px; font-weight: 700;
}
.site-pied p { margin: 4px 0; font-size: .92rem; }
.site-pied a { color: #fff; }
.pied-liens { list-style: none; margin: 0; padding: 0; }
.pied-liens li { margin-bottom: 6px; font-size: .92rem; }
.pied-bas {
    max-width: var(--large); margin: 26px auto 0;
    padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15);
    font-size: .85rem; color: #9dbdb1;
}

/* ============================================================
   Grand écran
   ============================================================ */
@media (min-width: 760px) {
    body { font-size: 17px; }

    .bouton-menu { display: none; }
    .navigation {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        max-width: var(--large);
        margin: 0 auto;
        padding: 0 18px;
        border-top: 1px solid rgba(255,255,255,.14);
    }
    .menu { display: flex; flex-wrap: wrap; padding: 0; }
    .menu > li { border-bottom: 0; }
    .menu a { padding: 14px 13px; font-size: .95rem; }
    .menu > li.actif > a { box-shadow: inset 0 -3px 0 var(--or); }

    .ouvrir-sous-menu { display: none; }
    .menu > li.a-sous-menu > a::after { content: " ▾"; color: #9dbdb1; font-size: .8em; }
    .sous-menu {
        position: absolute; top: 100%; left: 0; z-index: 30;
        min-width: 230px;
        background: var(--vert-profond);
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 0 0 9px 9px;
        padding: 6px 0;
        box-shadow: 0 10px 24px rgba(0,0,0,.22);
    }
    .menu > li.a-sous-menu:hover .sous-menu,
    .menu > li.a-sous-menu:focus-within .sous-menu { display: block; }
    .sous-menu a { padding: 10px 16px; }

    .recherche { border-top: 0; padding: 0; max-width: 300px; }
    .note-admin { padding: 0; }

    h1 { font-size: 2.5rem; }
    .titre-section { font-size: 1.5rem; }

    .voix { grid-template-columns: repeat(4, 1fr); gap: 18px; }

    .pied-colonnes { grid-template-columns: 2fr 1fr 1fr; }

    .liste-articles a { padding: 18px 0; }
    .art-titre { font-size: 1.22rem; }
}

@media (min-width: 1040px) {
    .voix { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Respect des préférences ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Impression ---------- */
@media print {
    .site-entete, .site-pied, .barre-admin, .section-facebook { display: none; }
    body { font-size: 12pt; background: #fff; }
    .article-texte { max-width: none; }
}

@media (max-width: 480px) {
    .marque { gap: 9px; }
    .marque img,
    .marque-logo { height: 36px; max-width: 108px; }
    .marque-nom { font-size: 1.3rem; }
}

/* ---- Résultats de recherche : prêches, dossiers et livres ---- */
.titre-resultats {
    font-family: var(--serif);
    font-size: 1.35rem;
    margin: 0 0 6px;
}
.compte-pastille {
    display: inline-block;
    background: #e9efec;
    color: #5d6b66;
    font-family: system-ui, sans-serif;
    font-size: .78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 9px;
    margin-left: 6px;
    vertical-align: middle;
}
.note-recherche { color: #5d6b66; font-size: .88rem; margin: 0 0 14px; }

.liste-preches-trouves { list-style: none; padding: 0; margin: 0; }
.liste-preches-trouves > li { margin-bottom: 8px; }
.liste-preches-trouves a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #dfe4e2;
    border-radius: 10px;
    padding: 11px 14px;
}
.liste-preches-trouves a:hover { border-color: #0f6b4f; }

.trouve-type {
    flex: 0 0 auto;
    min-width: 62px;
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 4px 8px;
    border-radius: 5px;
    background: #eef1f0;
    color: #5d6b66;
}
.trouve-type-dossier { background: #eaf3ef; color: #0f6b4f; }
.trouve-type-audio   { background: #fdf4e2; color: #9a6a12; }
.trouve-type-livre   { background: #fbeceb; color: #b23b2e; }

.trouve-corps { flex: 1 1 auto; min-width: 0; }
.trouve-titre { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.trouve-chemin { display: block; font-size: .8rem; color: #78857f; margin-top: 2px; }

.trouve-libre {
    flex: 0 0 auto;
    background: #0f6b4f; color: #fff;
    font-size: .7rem; font-weight: 700;
    padding: 3px 8px; border-radius: 999px;
}
.trouve-verrou { flex: 0 0 auto; opacity: .55; }
.appel-abonnement { margin-top: 16px; }

@media (max-width: 480px) {
    .liste-preches-trouves a { flex-wrap: wrap; gap: 8px; }
    .trouve-corps { flex: 1 1 100%; order: 2; }
}

/* ---- Badge « Accès libre » sur les dossiers de l'accueil ---- */
.voix-gratuit {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: #0f6b4f;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
