/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Nov 13 2026 | 21:57:03 */
/* Ribat 4 — Menu principal et méga-menus
   Sections 5, 11, 12, 13 de l'ancien CSS additionnel (découpage du 30/10/2026).
   Ordre de chargement : priorité 4. */

/* ===== 5. Menu principal des catégories (barre bleue sous la bannière) =====
   Police, taille et graisse : réglées dans Theme Options → Typography
   (Primary menu Font Family / Main Navigation / Main Navigation sub menus).
   Ce bloc ne gère que : couleurs, espacement des flèches, trait or sous la
   rubrique active, icônes discrètes, méga-menu sans doublon, bouton « أرسل مقالك ». */

/* Liens */
html body #main-nav .main-menu > ul > li > a {
    color: #f1e9db !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 18px !important;
    position: relative;
    transition: color .2s;
}

/* Rubriques à sous-menu : espace pour la flèche */
#main-nav .main-menu > ul > li:is(.menu-item-has-children, .mega-menu) > a {
    padding-left: 36px !important;
}
#main-nav .main-menu > ul > li:is(.menu-item-has-children, .mega-menu) > a::before {
    left: 16px !important;
    opacity: .7;
}

/* Trait or sous la rubrique active ou survolée
   (width, top et margin-top annulent le petit trait centré de 20 px
   que Jannah dessine sur la rubrique active) */
#main-nav .main-menu > ul > li > a::after {
    content: '';
    position: absolute;
    right: 18px;
    left: 18px;
    bottom: 12px;
    height: 2px;
    background: #eec53a;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s;
    width: auto;
    top: auto;
    margin-top: 0;
}
#main-nav .main-menu > ul > li:is(.menu-item-has-children, .mega-menu) > a::after {
    left: 36px;
}
html body #main-nav .main-menu > ul > li:hover > a,
html body #main-nav .main-menu > ul > li.tie-current-menu > a {
    color: #eec53a !important;
}
#main-nav .main-menu > ul > li:hover > a::after,
#main-nav .main-menu > ul > li.tie-current-menu > a::after {
    transform: scaleX(1);
}
#main-nav .main-menu > ul > li.tie-current-menu:not(.menu-item-has-children):not(.mega-menu) > a::before {
    display: none !important;
}

/* Icônes à gauche (mode sombre…) : discrètes, sans rond or */
html body #main-nav .components > li > a {
    background: transparent !important;
    color: #d9cfbf !important;
}
html body #main-nav .components > li > a:hover {
    color: #eec53a !important;
}

/* Méga-menu : supprimer la ligne de sous-rubriques en double */
#main-nav .mega-menu-block > ul.mega-cat-more-links {
    display: none !important;
}
html body #main-nav .mega-cat-sub-categories a.is-active,
html body #main-nav .mega-cat-sub-categories a:hover {
    color: #eec53a !important;
    background: transparent !important;
}

/* Entrée « الدفاتر » en pastille or (classe CSS menu-dafatir).
   « أرسل مقالك » (classe btn-soumettre) redevient un lien ordinaire. */
html body #main-nav .main-menu > ul > li.menu-dafatir > a {
    background: #eec53a !important;
    color: #0f3a73 !important;
    border-radius: 20px;
    height: 36px;
    line-height: 36px !important;
    margin-top: 12px;
    padding: 0 20px !important;
}
html body #main-nav .main-menu > ul > li.menu-dafatir > a:hover {
    background: #f7d65c !important;
}
#main-nav .main-menu > ul > li.menu-dafatir > a::after {
    display: none;
}

#main-nav .main-menu > ul > li.menu-dafatir > a::before { display: none !important; }

/* Survol et rubrique active : pas de fond coloré (le réglage de couleur
   « Active and Mouse-over Links » de Jannah colorait tout le rectangle) */
html body #main-nav ul.menu > li > a,
html body #main-nav ul.menu > li:hover > a,
html body #main-nav ul.menu > li.tie-current-menu > a {
    background-color: transparent !important;
}
html body #main-nav ul.menu > li.menu-dafatir > a {
    background-color: #eec53a !important;
}
html body #main-nav ul.menu > li.menu-dafatir:hover > a {
    background-color: #f7d65c !important;
}

/* ===== 11. Sous-menus et méga-menus : fond légèrement décalé ===== */

/* Panneau qui s'ouvre au survol */
#main-nav .menu-sub-content,
#main-nav .comp-sub-menu {
    background-color: #1a4a8a !important;
    border-top: 2px solid #eec53a;
}

/* Colonne des sous-rubriques dans le méga-menu (أدب ونقد، تاريخ…) */
#main-nav .mega-cat-wrapper ul.cats-vertical {
    background-color: #0f3a73 !important;
}
#main-nav ul.cats-vertical li a.is-active,
#main-nav ul.cats-vertical li a:hover {
    background-color: #1a4a8a !important;
}

/* Sous-menus simples (listes déroulantes sans articles) */
#main-nav .sub-menu .menu-item a:hover {
    background-color: #245a9e !important;
}

/* ===== 12. Méga-menu « 1st Post Highlighted » : titre mis en avant plus mesuré ===== */
#main-nav .mega-recent-post .post-box-title a {
    font-size: 17px !important;
    line-height: 1.6 !important;
}

/* ===== 13. Méga-menu : liste des sous-rubriques (الكل، أدب ونقد، تاريخ…)
   Alignée sur la police des rubriques de la barre (Alexandria),
   car Jannah ne lui applique pas « Primary menu Font Family ». ===== */
#main-nav .mega-cat-sub-categories a {
    font-family: 'Alexandria', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}


/* ===== 33. Barre du haut : zone de recherche lisible =====
   Champ clair (fond papier, filet or) sur la barre bleu nuit, texte bleu nuit,
   loupe or. La taille du menu de la barre du haut (17 px) est réglée dans
   Theme Options → Typography → « Top Menu ». */
#top-nav #search {
    background: #f8f3ea !important;
    border: 1px solid #eec53a !important;
    border-radius: 18px !important;
    width: 240px !important;
}
#top-nav #search-input {
    color: #0f3a73 !important;
    font-family: 'Alexandria', sans-serif !important;
    font-size: 13px !important;
    padding-right: 16px !important;
}
#top-nav #search-input::placeholder {
    color: #6b7a8a !important;
    opacity: 1;
}
#top-nav #search-submit,
#top-nav #search-submit .tie-search-icon {
    color: #9a7230 !important;
}
#top-nav #search:focus-within {
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(238, 197, 58, .35);
}

/* ===== 41. En-tête mobile (bannière pleine largeur + barre menu/recherche) ===== */
@media (max-width:991px) {
  #theme-header .logo-container { padding:8px 10px 0 !important; }
  #theme-header #logo { float:none !important; width:100% !important; margin:0 !important; text-align:center; }
  #theme-header #logo a { display:block !important; width:100% !important; }
  #theme-header #logo img { width:100% !important; max-width:100% !important; max-height:none !important; height:auto !important; }
  #theme-header .logo-container > .mobile-header-components,
  #theme-header #mobile-header-components-area_1 { margin-top:8px !important; }
  #theme-header #mobile-header-components-area_1,
  #theme-header #mobile-header-components-area_2 { display:flex !important; align-items:center; float:none !important; width:50% !important; height:44px !important; margin:8px 0 0 !important; padding:0 14px !important; background:#0f3a73; }
  #theme-header #mobile-header-components-area_2 { justify-content:flex-start; margin-right:-10px !important; }
  #theme-header #mobile-header-components-area_1 { justify-content:flex-end; margin-left:-10px !important; }
  #theme-header .logo-container { display:flex; flex-wrap:wrap; }
  #theme-header .logo-container #logo { flex:0 0 100%; }
  #theme-header .logo-container #mobile-header-components-area_1, #theme-header .logo-container #mobile-header-components-area_2 { flex:1 1 50%; }
  #theme-header #mobile-header-components-area_1 { order:2; direction:rtl; }
  #theme-header #mobile-header-components-area_2 { order:3; direction:rtl; }
  #theme-header #mobile-header-components-area_1 .components, #theme-header #mobile-header-components-area_2 .components { margin:0 !important; }
  #theme-header .mobile-header-components a, #theme-header .mobile-header-components .tie-icon, #theme-header .mobile-header-components .menu-text { color:#fff !important; }
  #theme-header .mobile-header-components .menu-text { font-family:'Alexandria',sans-serif !important; font-size:14px !important; margin-left:8px; }
  #theme-header .mobile-header-components .nav-icon, #theme-header .mobile-header-components .nav-icon:before, #theme-header .mobile-header-components .nav-icon:after { background-color:#fff !important; }
}

/* 41b. Panneau du menu mobile aux couleurs de la charte */
.side-aside.normal-side { background:#0a2a55 !important; }
#mobile-menu li a { font-family:'Alexandria',sans-serif !important; font-size:15px !important; color:#fff !important; }
#mobile-menu li li a { font-size:14px !important; color:#d7e2f0 !important; }
#mobile-menu li a:hover, #mobile-menu li.current-menu-item > a { color:#eec53a !important; }
#mobile-menu li { border-color:rgba(255,255,255,.08) !important; }

/* 41c. Bannière sur ordinateur : centrée, pleine largeur du cadre, marges réduites */
@media (min-width:992px) {
  #theme-header .logo-container { padding:0 15px !important; }
  #theme-header #logo { float:none !important; width:100% !important; margin:16px 0 !important; text-align:center; }
  #theme-header #logo a { display:block !important; }
  #theme-header #logo img { display:block; width:100% !important; max-width:100% !important; max-height:none !important; height:auto !important; margin:0 auto; }
}

/* ===== 61. Menu principal — bouton « الملفات » (classe menu-malafat), à côté de « الدفاتر »
   Remplace « أرسل مقالك » (item 7036 réutilisé ; « شروط النشر » reste dans le menu du haut).
   Pastille crème, texte bleu, même forme que الدفاتر. Ajoutée le 13/11/2026. ===== */
html body #main-nav .main-menu > ul > li.menu-malafat > a {
    border-radius: 20px;
    height: 36px;
    line-height: 36px;
    margin-top: 12px;
    margin-right: 8px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    background: #f1e9db !important;
    color: #0f3a73 !important;
}
html body #main-nav .main-menu > ul > li.menu-malafat > a:hover { background: #ffffff !important; }
html body #main-nav .main-menu > ul > li.menu-malafat > a::before,
html body #main-nav .main-menu > ul > li.menu-malafat > a::after { display: none !important; }

/* ===== 62. Méga-menu du bouton « الملفات » (snippet 34)
   Au survol (écrans ≥ 992px) : colonne « ملفات المجلة » + les 5 derniers dossiers.
   Même habillage que le méga-menu « الدفاتر ». Sur mobile : simple lien.
   Ajoutée le 13/11/2026. ===== */
.malafat-mega { position: absolute; top: 100%; right: 0; left: 0; z-index: 200; display: none; flex-direction: row; background: #1a4a8a; border-top: 2px solid #eec53a; box-shadow: 0 12px 28px rgba(0,0,0,.2); text-align: right; }
.malafat-mega[hidden] { display: none; }
@media (min-width: 992px) {
    #main-nav .main-menu > ul > li.menu-malafat { position: static; }
    #main-nav li.menu-malafat:hover > .malafat-mega,
    #main-nav li.menu-malafat:hover > .malafat-mega[hidden] { display: flex; }
}
.malafat-mega-cote { width: 210px; flex: none; box-sizing: border-box; padding: 22px 20px; background: #0f3a73; display: flex; flex-direction: column; gap: 12px; }
.malafat-mega-titre { font-family: 'Alexandria', sans-serif; font-size: 17px; font-weight: 600; color: #eec53a; line-height: 1.4; }
.malafat-mega-texte { font-family: 'Markazi Text', serif; font-size: 17px; line-height: 1.5; color: #dbe4f0; }
#main-nav a.malafat-mega-tous { margin-top: auto; display: inline-block; align-self: flex-start; font-family: 'Alexandria', sans-serif; font-size: 13.5px; font-weight: 600; line-height: 1.4; padding: 8px 16px; border-radius: 20px; background: #f1e9db; color: #0f3a73 !important; }
#main-nav a.malafat-mega-tous:hover { background: #ffffff; }
.malafat-mega-grille { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 20px; }
#main-nav a.malafat-mega-carte { display: flex; flex-direction: column; gap: 6px; padding: 0; line-height: 1.4; color: #ffffff !important; background: none !important; }
.malafat-mega-img { display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #0f3a73; }
.malafat-mega-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
#main-nav a.malafat-mega-carte:hover .malafat-mega-img img { transform: scale(1.05); }
.malafat-mega-num { font-family: 'Alexandria', sans-serif; font-size: 12px; font-weight: 500; color: #eec53a; }
.malafat-mega-nom { font-family: 'Alexandria', sans-serif; font-size: 14px; font-weight: 600; line-height: 1.5; color: #ffffff; }
#main-nav a.malafat-mega-carte:hover .malafat-mega-nom { color: #eec53a; }
.malafat-mega-nb { font-family: 'Alexandria', sans-serif; font-size: 12px; color: #c9d4e4; }
