/*
Theme Name: Alqanooni Blog
Theme URI: https://alqanooni.com
Description: Theme enfant d'Astra qui applique l'identite visuelle d'alqanooni.com (navbar, footer, couleurs navy/gold/ivoire, typographie Raleway/Tajawal) au blog WordPress. Les variables --navy/--gold/--paper/--stroke/--muted/--ink et les classes .btn-gold, .footer-dark, .social-icon, .icon-chip proviennent de /assets/css/style.css du site principal, charge par functions.php. Garder ce fichier synchronise avec les regles .lang-ar / .lang-ar.long-text de ce meme fichier si elles evoluent.
Author: Alqanooni
Author URI: https://alqanooni.com
Template: astra
Version: 1.0.0
Requires at least: 5.3
Requires PHP: 7.4
Text Domain: alqanooni-blog
*/

/* =============================== */
/* TYPOGRAPHIE GENERALE */
/* =============================== */
body {
    font-family: var(--font-body, 'Raleway', sans-serif);
    background: var(--paper, #F8F5EC);
    color: var(--ink, #201C14);
}

.entry-title,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: var(--font-display, 'Raleway', sans-serif);
    font-weight: 700;
    color: var(--navy);
}

/* Arabe : TranslatePress bascule body_class() en "rtl" + is_rtl() */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}

body.rtl .entry-content,
body.rtl .entry-content p,
body.rtl .entry-content li {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.05em;
    line-height: 1.85;
    text-align: right;
}

/* =============================== */
/* NAVBAR (cf. templates/public_header.php) */
/* =============================== */
.alq-navbar .navbar-brand img {
    height: 50px;
}

/* =============================== */
/* FOOTER (cf. templates/public_footer.php) */
/* =============================== */

/* Astra force `img{max-width:100%;height:auto}` dans son CSS de base, ce qui ecrase
   l'attribut HTML height="40" du logo (meme cause que le correctif deja en place sur
   .alq-navbar .navbar-brand img ci-dessus, pour le meme symptome sur la navbar). */
.alq-footer img {
    height: 40px;
    width: auto;
}

.alq-footer.footer-dark a {
    color: rgba(255, 255, 255, 0.8);
}

.alq-footer .social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =============================== */
/* ZONE DE CONTENU (articles/pages) */
/* =============================== */
.site-content .ast-container {
    max-width: 1200px;
}

.single .entry-content,
.page .entry-content {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink, #201C14);
}

.entry-content img {
    border-radius: 0.5rem;
    height: auto;
    max-width: 100%;
}

/* En-tete d'article centre, dans le style de article.php */
.single .entry-header,
.single .entry-meta {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

body.rtl .single .entry-header,
body.rtl .single .entry-meta,
body.rtl .single .entry-content,
body.rtl .page .entry-content {
    text-align: right;
}

/* =============================== */
/* BLOG HERO / BREADCRUMB */
/* Gabarits : home.php (index du blog), archive.php (categories) */
/* =============================== */
.alq-blog-hero {
    background: var(--paper, #F8F5EC);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.alq-blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/Q-01.svg');
    background-repeat: no-repeat;
    background-position: right -10vw bottom -18vw;
    background-size: 40vw;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}

.alq-blog-hero .container {
    position: relative;
    z-index: 1;
}

.alq-blog-hero h1 {
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.alq-blog-hero .lead {
    color: var(--muted);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.alq-blog-hero--compact {
    padding: 2.75rem 0 2rem;
}

.alq-blog-hero--compact h1 {
    font-size: 1.85rem;
    margin-bottom: 0;
}

.alq-breadcrumb,
.alq-breadcrumb-bar {
    font-size: 0.85rem;
    color: var(--muted);
}

.alq-breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--stroke);
    padding: 0.65rem 0;
}

.alq-breadcrumb a,
.alq-breadcrumb-bar a {
    color: var(--muted);
    text-decoration: none;
}

.alq-breadcrumb a:hover,
.alq-breadcrumb-bar a:hover {
    color: var(--gold-ink);
}

.alq-breadcrumb span[aria-hidden],
.alq-breadcrumb-bar span[aria-hidden] {
    margin: 0 0.4rem;
    opacity: 0.5;
}

.alq-breadcrumb {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Dates WordPress (get_the_date()) restent en anglais faute de pack de langue arabe
   installe sur ce WordPress — meme symptome de reordonnancement bidi que corrige deja
   .stat-number sur le site principal ("10 000" -> "000 10"), applique ici aux memes
   contenus mixtes lettres latines + chiffres affiches en contexte RTL. */
.alq-bidi-isolate {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Filtres de categories (liens reels vers les archives de categorie) */
.alq-blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.alq-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill, 999px);
    border: 1px solid var(--stroke);
    color: var(--navy);
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.alq-chip:hover {
    border-color: var(--gold);
    color: var(--gold-ink);
}

.alq-chip--active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.alq-chip--active:hover {
    color: #fff;
}

/* Badge de categorie, reutilise sur les cartes et l'en-tete d'article */
.alq-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill, 999px);
    background: var(--navy);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

a.alq-badge--link:hover {
    background: var(--gold);
    color: var(--navy);
}

/* Icones directionnelles (fleches "suivant"/"retour") : un seul jeu d'icones,
   miroir en RTL via transform plutot que d'inverser la classe Phosphor par langue. */
.icon-directional {
    display: inline-block;
}

body.rtl .icon-directional {
    transform: scaleX(-1);
}

/* =============================== */
/* GRILLE D'ARTICLES / CARTES */
/* =============================== */
.alq-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.alq-blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md, 14px);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.alq-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
}

.alq-blog-card__media {
    display: block;
    height: 190px;
    flex-shrink: 0;
}

.alq-blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alq-blog-card__media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gradient-navy, linear-gradient(135deg, var(--navy) 0%, #2d3f6b 100%));
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.35);
}

.alq-blog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}

.alq-blog-card__meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.alq-blog-card__date {
    font-size: 0.78rem;
    color: var(--muted);
}

.alq-blog-card__title {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.alq-blog-card__title a {
    color: var(--navy);
    text-decoration: none;
}

.alq-blog-card__title a:hover {
    color: var(--gold-ink);
}

.alq-blog-card__excerpt {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.25rem;
}

.alq-blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--stroke);
}

.alq-blog-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold-ink);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}

.alq-blog-card__more:hover {
    color: var(--navy);
}

.alq-blog-card__readtime {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--muted);
    font-size: 0.78rem;
}

/* Pagination */
.alq-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.alq-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--stroke);
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.alq-pagination .page-numbers:hover {
    border-color: var(--gold);
    color: var(--gold-ink);
}

.alq-pagination .page-numbers.current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.alq-pagination .page-numbers.dots {
    border: none;
}

/* =============================== */
/* ARTICLE (single.php) */
/* =============================== */
.alq-article-header {
    background: #fff;
    border-bottom: 1px solid var(--stroke);
    padding: 3rem 0;
}

.alq-article-header__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.alq-article-title {
    color: var(--navy);
    margin: 1rem 0;
}

.alq-article-lead {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.alq-article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.alq-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.alq-article-meta i {
    color: var(--gold-ink);
}

.alq-article-cover {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-md, 14px);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.alq-article-cover img {
    width: 100%;
    height: auto;
    max-height: 440px;
    object-fit: cover;
}

.alq-article-cta {
    max-width: 760px;
    margin: 3rem auto 0;
    padding: 2.25rem;
    border-radius: var(--radius-md, 14px);
    text-align: center;
    background: var(--gradient-navy, linear-gradient(135deg, var(--navy) 0%, #2d3f6b 100%));
    color: #fff;
}

.alq-article-cta h4 {
    margin-bottom: 0.6rem;
}

.alq-article-cta p {
    opacity: 0.85;
    margin-bottom: 1.25rem;
}

.alq-article-back {
    max-width: 760px;
    margin: 2rem auto 0;
}

.alq-article-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    text-decoration: none;
}

.alq-article-back a:hover {
    color: var(--gold-ink);
}
