/*
Theme Name: عيون البصائر 2026
Theme URI: https://elbassair.net/
Description: Thème moderne, léger et en arabe (RTL) pour le site éducatif عيون البصائر. Couleurs historiques du site (vert, noir, liens bleus).
Version: 1.4.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: elbassair2026
License: GPL-2.0-or-later
*/

/* Polices hébergées localement (licence SIL OFL, voir assets/fonts). */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Readex Pro'; font-style: normal; font-weight: 160 700; font-display: swap; src: url('assets/fonts/readex-pro-arabic-wght-normal.woff2') format('woff2-variations'), url('assets/fonts/readex-pro-arabic-wght-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FEFC; }
@font-face { font-family: 'Readex Pro'; font-style: normal; font-weight: 160 700; font-display: swap; src: url('assets/fonts/readex-pro-latin-wght-normal.woff2') format('woff2-variations'), url('assets/fonts/readex-pro-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
	--green: #2E6E27;
	--green-2: #347C2C;
	--green-3: #255A20;
	--green-soft: #E3F0E0;
	--black: #111111;
	--link: #2F4FD0;
	--magenta: #C51162;
	--magenta-2: #A30E50;
	--magenta-soft: #FBE8F0;
	--ground: #F5F6F4;
	--ink: #1C1F1B;
	--muted: #4F5A4B;
	--line: #DDE2DA;
	--line-2: #ECEFEA;
	--chip: #EEF2EC;
	--radius: 16px;
	--font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
	--font-title: 'Readex Pro', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.75;
	overflow-wrap: break-word;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--green); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 3px solid var(--link);
	outline-offset: 2px;
}

img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.35; }

.eb-wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }

.eb-sr, .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.eb-skip {
	position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
	background: var(--black); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.eb-skip:focus { top: 12px; color: #fff; }

.eb-muted { color: var(--muted); margin: 0; }
.eb-clear { clear: both; }

/* ---------- Boutons, puces, badges ---------- */

.eb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
	font: inherit; font-weight: 600; font-size: 15px; line-height: 1.4; cursor: pointer;
	text-align: center; transition: background-color .15s, color .15s;
}
.eb-btn--green { background: var(--green); color: #fff; }
.eb-btn--green:hover { background: var(--green-3); color: #fff; }
.eb-btn--dark { background: var(--black); color: #fff; }
.eb-btn--dark:hover { background: #333; color: #fff; }
.eb-btn--light { background: #fff; color: var(--ink); border-color: var(--line); }
.eb-btn--light:hover { border-color: var(--green); color: var(--green); }
.eb-btn--fb { background: #1877F2; color: #fff; }
.eb-btn--yt { background: #D90000; color: #fff; }
.eb-btn--fb:hover, .eb-btn--yt:hover { color: #fff; opacity: .9; }

.eb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.eb-chip {
	display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--chip);
	color: var(--ink); font-size: 13px; font-weight: 500; border: 0; font-family: inherit; cursor: pointer; line-height: 1.6;
}
a.eb-chip:hover, button.eb-chip:hover { background: var(--green-soft); color: var(--green); }
.eb-chip--solid { background: var(--c, var(--green)); color: #fff; }
a.eb-chip--solid:hover { background: var(--c, var(--green)); color: #fff; opacity: .9; }
.eb-chips--boxed .eb-chip { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; font-size: 14px; color: var(--link); }

.eb-badge {
	display: inline-block; align-self: flex-start; padding: 1px 9px; border-radius: 6px;
	background: var(--magenta); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.7; flex: none;
}
.eb-badge--green { background: var(--green-soft); color: var(--green); }

.eb-pill { padding: 8px 16px; border-radius: 999px; background: var(--green-3); color: #fff; font-size: 14px; }
.eb-pill:hover { background: #1d4a19; color: #fff; }
.eb-pill--light { background: #fff; color: var(--green); font-weight: 600; }
.eb-pill--light:hover { background: var(--green-soft); color: var(--green); }

/* ---------- Titres de section (cadres verts, comme l'ancien site) ---------- */

.eb-label {
	display: inline-block; margin: 0; align-self: flex-start;
	font-family: var(--font-title); font-size: 22px; font-weight: 700; color: #fff;
	background: var(--green-2); padding: 6px 18px; border-radius: 8px; line-height: 1.5;
}
.eb-label--sm { font-size: 17px; padding: 4px 14px; margin-bottom: 12px; }
.eb-label--dark { background: var(--black); }
.eb-label--tab { font-size: 20px; border-radius: 8px 8px 0 0; }
.eb-tabhead {
	display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
	border-bottom: 3px solid var(--green-2); margin-bottom: 14px;
}
.eb-tabhead--dark { border-color: var(--black); }
.eb-more { font-weight: 600; font-size: 15px; padding-bottom: 4px; }

.eb-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.eb-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.eb-section { display: flex; flex-direction: column; gap: 18px; }

/* ---------- En-tête ---------- */

.eb-header { background: #fff; }
.eb-header__top {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
	padding-block: 12px;
}
.eb-logo, .custom-logo-link { display: block; line-height: 0; }
.eb-logo img, .custom-logo { width: 130px; height: auto; }

.eb-search {
	flex: 0 1 440px; min-width: 0; display: flex; gap: 6px; padding: 4px; background: #fff;
	border: 1px solid #D5DAD2; border-radius: 12px;
}
.eb-search input {
	flex: 1 1 0; width: 0; min-width: 0; border: 0; background: transparent; padding: 10px 12px;
	font: inherit; font-size: 15px; color: var(--ink);
}
.eb-search input:focus { outline: none; }
.eb-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.eb-search button {
	border: 0; border-radius: 9px; padding: 0 20px; background: var(--green); color: #fff;
	font: inherit; font-weight: 600; cursor: pointer;
}
.eb-search button:hover { background: var(--green-3); }

.eb-nav { background: var(--black); border-bottom: 5px solid var(--green-2); position: relative; z-index: 20; }
.eb-nav__toggle {
	display: none; align-items: center; gap: 10px; margin: 8px 0; padding: 8px 14px;
	background: transparent; color: #fff; border: 1px solid #444; border-radius: 10px;
	font: inherit; font-weight: 600; cursor: pointer;
}
.eb-burger, .eb-burger::before, .eb-burger::after {
	display: block; width: 18px; height: 2px; background: #fff; position: relative; content: '';
}
.eb-burger::before { position: absolute; top: -6px; }
.eb-burger::after { position: absolute; top: 6px; }

.eb-menu, .eb-menu ul { list-style: none; margin: 0; padding: 0; }
.eb-menu { display: flex; flex-wrap: wrap; }
.eb-menu > li { position: relative; display: flex; align-items: center; }
.eb-menu a { display: block; color: #fff; padding: 13px 14px; font-weight: 500; font-size: 15px; }
.eb-menu > li > a:hover, .eb-menu > li:hover > a, .eb-menu > li:focus-within > a,
.eb-menu > .current-menu-item > a, .eb-menu > .current-menu-ancestor > a,
.eb-menu > .current-menu-parent > a, .eb-menu > .current-post-ancestor > a {
	background: var(--green-2); color: #fff;
}
.eb-subtoggle { display: none; }
.eb-menu .sub-menu {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 230px; background: #fff;
	border: 1px solid var(--line); border-top: 3px solid var(--green-2); border-radius: 0 0 12px 12px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, .12); padding: 6px 0; display: none;
}
.eb-menu .sub-menu .sub-menu { top: -6px; inset-inline-start: 100%; border-radius: 12px; border-top-width: 1px; }
.eb-menu li:hover > .sub-menu, .eb-menu li:focus-within > .sub-menu, .eb-menu li.is-open > .sub-menu { display: block; }
.eb-menu .sub-menu li { position: relative; }
.eb-menu .sub-menu a { color: var(--ink); padding: 8px 16px; font-size: 14.5px; }
.eb-menu .sub-menu a:hover { background: var(--green-soft); color: var(--green); }
.eb-menu .sub-menu .menu-item-has-children > a::after { content: ' ›'; color: var(--muted); }

/* ---------- Accueil : bandeau ---------- */

.eb-hero { background: var(--green); color: #fff; }
.eb-hero__inner { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; padding-block: 52px 50px; }
.eb-hero__text { flex: 1 1 520px; display: flex; flex-direction: column; gap: 16px; }
.eb-hero__kicker { margin: 0; font-size: 15px; font-weight: 600; color: #CDE8C6; }
.eb-hero__title { margin: 0; font-size: clamp(28px, 4vw, 42px); font-weight: 700; }
.eb-hero__lead { margin: 0; font-size: 18px; color: #DDEBD9; max-width: 640px; }
.eb-hero__pills { display: flex; flex-wrap: wrap; gap: 10px; }
.eb-stats { flex: 1 1 320px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.eb-stat { background: var(--green-3); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.eb-stat b { font-family: var(--font-title); font-size: 30px; font-weight: 700; }
.eb-stat span { color: #DDEBD9; font-size: 14px; }

.eb-home { display: flex; flex-direction: column; gap: 52px; padding-block: 48px 64px; }

.eb-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.eb-level {
	background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius);
	padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.eb-level__name { font-family: var(--font-title); font-size: 23px; font-weight: 700; color: var(--ink); }
.eb-level__name:hover { color: var(--c); }
.eb-level__desc { color: var(--muted); font-size: 15px; }
.eb-level__count { margin-top: auto; font-size: 13px; color: var(--muted); }

.eb-exams { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.eb-exam { display: flex; flex-direction: column; gap: 14px; }
.eb-exam .eb-btn { align-self: flex-start; }
.eb-exam__title { margin: 0; font-size: 23px; }

.eb-split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.eb-split__main { flex: 999 1 560px; min-width: 0; }
.eb-split__aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; }
.eb-split__aside .eb-box + .eb-tabhead { margin-top: 26px; }

.eb-rows { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-direction: column; }
.eb-row { padding: 14px 20px; border-bottom: 1px solid var(--line-2); display: flex; gap: 14px; align-items: flex-start; }
.eb-row:last-child { border-bottom: 0; }
.eb-row__text { flex: 1 1 auto; min-width: 0; display: block; }
.eb-row__text .eb-badge { margin-inline-end: 6px; vertical-align: 2px; }
.eb-row__title { font-weight: 600; }
.eb-row__meta { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.eb-row__thumb { flex: none; width: 112px; display: block; }
.eb-row__media { display: block; aspect-ratio: 15 / 8; border-radius: 10px; overflow: hidden; background: var(--chip); }
.eb-row__media img, .eb-row__media .eb-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-row__media .eb-cover__label, .eb-row__media .eb-cover__brand { display: none; }
.eb-rows--compact .eb-row { padding: 10px 16px; }
.eb-rows--compact .eb-row__title { font-size: 15px; }

.eb-agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.eb-agenda li { display: flex; gap: 14px; align-items: flex-start; }
.eb-agenda__date {
	min-width: 78px; padding: 5px 4px; border-radius: 10px; background: var(--green-soft); color: var(--green);
	text-align: center; font-weight: 700; font-size: 14px; flex: none;
}
.eb-agenda__date--alt { background: var(--magenta-soft); color: var(--magenta-2); }

.eb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.eb-news { display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.eb-news__cat { font-size: 13px; color: var(--magenta-2); font-weight: 600; }
.eb-news__title { margin: 0; font-size: 18px; line-height: 1.55; }
.eb-news__date { font-size: 13px; color: var(--muted); margin-top: auto; }

.eb-teachers { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding: 30px; }
.eb-teachers__text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; }
.eb-teachers__title { margin: 0; font-size: 24px; }
.eb-tiles { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.eb-tile {
	padding: 16px; border-radius: 12px; background: var(--chip); font-weight: 600; text-align: center;
	color: var(--ink); display: flex; flex-direction: column; gap: 2px;
}
.eb-tile small { font-weight: 400; color: var(--muted); font-size: 13px; }
.eb-tile:hover { background: var(--green-soft); color: var(--green); }

/* ---------- Bandeau des pages internes ---------- */

.eb-band { background: var(--green); color: #fff; }
.eb-band__inner { padding-block: 26px 32px; display: flex; flex-direction: column; gap: 8px; }
.eb-band__title { margin: 0; font-size: clamp(26px, 3.4vw, 38px); }
.eb-band__desc { margin: 0; color: #DDEBD9; max-width: 760px; }
.eb-band__count { font-size: 14px; color: #CDE8C6; font-weight: 600; }
.eb-band__search { max-width: 560px; margin-top: 8px; }
.eb-band__search .eb-search { border-color: transparent; }
.eb-band .eb-crumbs, .eb-band .eb-crumbs span { color: #CDE8C6; }
.eb-band .eb-crumbs a { color: #fff; }

.eb-crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.eb-crumbs-wrap { padding-block: 18px 0; }

.eb-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-block: 32px 64px; }
.eb-layout__main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.eb-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.eb-subcats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.eb-subcat {
	background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 14px;
	padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink);
}
.eb-subcat:hover { border-color: var(--c); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.eb-subcat__name { font-family: var(--font-title); font-size: 19px; font-weight: 700; }
.eb-subcat__count { color: var(--muted); font-size: 14px; }

.eb-promo {
	background: var(--black); color: #fff; border-top: 5px solid var(--green-2); border-radius: var(--radius);
	padding: 28px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.eb-promo > div { flex: 1 1 360px; }
.eb-promo__title { margin: 0 0 6px; font-size: 24px; }
.eb-promo p { margin: 0; color: #D3D8D0; }

.eb-empty { color: var(--muted); }
.eb-empty p { margin: 0; }

.eb-levels-mini { display: flex; flex-direction: column; gap: 8px; }
.eb-levels-mini a {
	display: flex; justify-content: space-between; align-items: center; padding: 9px 14px;
	border-radius: 10px; background: var(--chip); color: var(--ink); font-weight: 600;
	border-inline-start: 4px solid var(--c);
}
.eb-levels-mini a:hover { background: var(--green-soft); color: var(--green); }
.eb-levels-mini small { color: var(--muted); font-weight: 400; }
.eb-follow { display: flex; flex-direction: column; gap: 10px; }
.eb-follow .eb-label { margin-bottom: 4px; }

/* Widgets */
.widget ul { margin: 0; padding-inline-start: 18px; }
.widget li { margin-block: 6px; }
.widget select { max-width: 100%; }

/* Pagination */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 20px; }
.page-numbers {
	min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 10px; background: #fff;
	border: 1px solid var(--line); color: var(--ink); font-weight: 600;
}
.page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }
a.page-numbers:hover { border-color: var(--green); color: var(--green); }
.page-numbers.dots { border: 0; background: transparent; }

/* ---------- Article ---------- */

.eb-article { padding: 28px; }
.eb-article__head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 22px; }
.eb-article__title { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.eb-article__meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }
.eb-article__foot { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.eb-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eb-share__label { font-weight: 600; font-size: 14px; color: var(--muted); }

.eb-prevnext { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.eb-prevnext__item { display: flex; flex-direction: column; gap: 2px; font-weight: 600; color: var(--ink); padding: 16px 18px; }
.eb-prevnext__item small { color: var(--muted); font-weight: 400; }
.eb-prevnext__item:hover { border-color: var(--green); color: var(--green); }
.eb-prevnext__item--prev { text-align: left; }

.eb-cards--related { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.eb-related { display: flex; flex-direction: column; gap: 8px; padding: 18px; color: var(--ink); border-top: 4px solid var(--green-2); }
.eb-related:hover { color: var(--green); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.eb-related__title { font-weight: 600; line-height: 1.6; }

/* Lecteur PDF */
.eb-pdf { margin: 22px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.eb-pdf__bar {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
	background: var(--black); color: #fff; padding: 10px 14px;
}
.eb-pdf__name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.eb-pdf__name::before {
	content: 'PDF'; font-size: 11px; font-weight: 700; background: var(--magenta); color: #fff;
	padding: 1px 6px; border-radius: 4px; flex: none;
}
.eb-pdf__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eb-pdf__actions .eb-btn { padding: 7px 14px; font-size: 14px; }
.eb-pdf__frame { display: block; width: 100%; height: 820px; max-height: 80vh; border: 0; background: #F0F2EF; }

/* ---------- Contenu des articles (y compris les anciens) ---------- */

.eb-content { font-size: 17px; line-height: 1.9; }
.eb-content > *:first-child { margin-top: 0; }
.eb-content p { margin: 0 0 1em; }
.eb-content h2, .eb-content h3, .eb-content h4 { margin: 1.4em 0 .6em; }
.eb-content table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.eb-content td, .eb-content th { border: 1px solid var(--line); padding: 8px 10px; }
.eb-content blockquote { margin: 1.2em 0; padding: 12px 18px; border-inline-start: 4px solid var(--green-2); background: var(--ground); border-radius: 8px; }
.eb-content .aligncenter { display: block; margin-inline: auto; }
.eb-content .alignright { float: right; margin: 0 0 1em 1em; }
.eb-content .alignleft { float: left; margin: 0 1em 1em 0; }
.eb-content .wp-caption { max-width: 100%; }
.eb-content .wp-caption-text { font-size: 14px; color: var(--muted); text-align: center; }

/* Les anciens blocs à largeur fixe ne doivent pas déborder sur mobile. */
.eb-content div[style*="width"] { max-width: 100% !important; }

/* Anciens boutons (btnVGreen, btnYellow, btnBleuDeg…) : style moderne et uniforme. */
.eb-content a.btn, .eb-content a[class^="btn"], .eb-content a[class*=" btn"], .eb-content .shortc-button {
	display: inline-flex !important; align-items: center; justify-content: center;
	margin: 4px !important; padding: 9px 18px !important; border-radius: 12px !important;
	background: var(--green) !important; background-image: none !important; color: #fff !important;
	border: 0 !important; box-shadow: none !important; text-shadow: none !important;
	font-weight: 600 !important; font-size: 15px !important; line-height: 1.5 !important; text-decoration: none !important;
}
.eb-content a.btnBleuDeg, .eb-content a.btnBlue, .eb-content a.btn-primary, .eb-content a.btn { background: var(--link) !important; }
.eb-content a.btnYellow, .eb-content a.btnOrange { background: #F2B705 !important; color: #1C1F1B !important; }
.eb-content a.btnBlanc { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
.eb-content a.btnPink, .eb-content a.btnRouge { background: var(--magenta) !important; }
.eb-content a[class*="btn"]:hover, .eb-content .shortc-button:hover { filter: brightness(.92); }
.eb-content a[class*="btn"] strong { font-weight: inherit; }

/* Barre de boutons « الموضوع / التصحيح » des anciens articles. */
.eb-content #Df {
	float: none !important; width: auto !important; height: auto !important; padding: 0 !important;
	border: 0 !important; margin: 18px 0 !important; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.eb-content #Dfalg { display: none; }

/* Bannières « التصحيح / الموضوع » */
.eb-content #farid4am, .eb-content #farid4am2 {
	float: none !important; width: auto !important; height: auto !important; transform: none !important;
	border: 0 !important; border-radius: 10px !important; margin: 20px 0 10px !important;
	text-shadow: none !important;
}
.eb-content #farid4am { background: var(--green) !important; padding: 8px 12px !important; font-size: 20px !important; }
.eb-content #farid4am span { color: #fff !important; font-size: inherit !important; }
.eb-content #farid4am2 { height: 3px !important; padding: 0 !important; background: var(--line) !important; max-width: 40%; margin-inline: auto !important; }
.eb-content .ThreeDFarid { font-family: var(--font-title); font-weight: 700; text-align: center; line-height: 1.5; margin: 4px 0; }

/* Étiquettes animées (#animated_div) : version sobre. */
.eb-content #animated_div {
	display: inline-block; width: auto !important; height: auto !important; min-width: 120px;
	transform: none !important; box-shadow: none !important; border: 0 !important; border-radius: 999px !important;
	padding: 4px 16px !important; margin: 4px !important; font-size: 15px !important; font-weight: 600;
}
.eb-content .farid3, .eb-content #farid3 { text-align: center; margin: 10px 0; }

/* Liens rapides latéraux (daghnouche…) : transformés en puces. */
.eb-content .daghnoucheblueT, .eb-content .daghnouchevertT, .eb-content .daghnoucherougeT,
.eb-content .daghnouchejauneT, .eb-content [class*="daghnouchejauneTY"], .eb-content .daghnouchejauneYT { display: none !important; }
.eb-content .daghnoucheblue, .eb-content .daghnouchevert, .eb-content .daghnoucherouge,
.eb-content .daghnouchejaune, .eb-content .daghnouchejauneY {
	position: static !important; display: inline-block !important; width: auto !important;
	margin: 4px !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
	background: none !important;
}
.eb-content [class^="daghnouche"] a {
	display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
	background: var(--chip); color: var(--ink) !important;
}
.eb-content .daghnoucheblue a { background: #E4EBFF; color: #1E3AA8 !important; }
.eb-content .daghnouchevert a { background: var(--green-soft); color: var(--green) !important; }
.eb-content .daghnoucherouge a { background: var(--magenta-soft); color: var(--magenta-2) !important; }
.eb-content .daghnouchejaune a { background: #FFF4C7; color: #6B5500 !important; }

/* Encadrés « تابعنا » (flip3D / flip3DYoutube). */
.eb-content .flip3D, .eb-content .flip3DYoutube {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
	margin: 20px 0; padding: 14px 18px; border-radius: 14px; background: var(--ground); border: 1px solid var(--line);
	text-align: center !important; color: var(--ink) !important; width: auto !important; height: auto !important;
}
.eb-content .flip3D .front, .eb-content .flip3DYoutube .front { display: none; }
.eb-content .flip3D .back, .eb-content .flip3DYoutube .back { position: static !important; transform: none !important; }
.eb-content .flip3DYoutube::before { content: 'تابع قناة عيون البصائر على يوتيوب'; font-weight: 600; }
.eb-content .flip3D:has(a[href*="facebook"])::before { content: 'تابع صفحة عيون البصائر على فيسبوك'; font-weight: 600; }
.eb-content .flip3D .back a[href*="facebook"] { background: #1877F2; }

/* Anciens articles entièrement enveloppés dans un <h3> : texte normal. */
.eb-content h3:has(#farid4am), .eb-content h3:has(.gde-frame), .eb-content h3:has(.eb-pdf) {
	font-family: var(--font); font-size: 17px; font-weight: 400; line-height: 1.9; margin: 0;
}
.eb-content .flip3DYoutube .back a {
	display: inline-block; padding: 6px 16px; border-radius: 10px; background: #D90000; color: #fff !important; font-weight: 600;
}
.eb-content .flip3D .back a {
	display: inline-block; padding: 6px 16px; border-radius: 10px; background: var(--green); color: #fff !important; font-weight: 600;
}

/* Encadrés de l'ancien thème (box). */
.eb-content .box, .eb-sc-box {
	margin: 18px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--ground);
}
.eb-content .box .tieicon-boxicon { display: none; }
.eb-content .box.info, .eb-sc-box--info { background: #E9EEFF; border-color: #C9D4FA; }
.eb-content .box.success, .eb-sc-box--success, .eb-content .box.download, .eb-sc-box--download { background: var(--green-soft); border-color: #C6DEC0; }
.eb-content .box.warning, .eb-sc-box--warning, .eb-content .box.note, .eb-sc-box--note { background: #FFF6D6; border-color: #F0DE9A; }
.eb-content .box.error, .eb-sc-box--error { background: var(--magenta-soft); border-color: #F2C3D5; }

.eb-sc-col { margin-bottom: 1em; }
@media (min-width: 760px) {
	.eb-sc-col { float: right; margin-inline-end: 4%; }
	.eb-sc-col--last { margin-inline-end: 0; }
	.eb-sc-col--one_half { width: 48%; }
	.eb-sc-col--one_third { width: 30.66%; }
	.eb-sc-col--two_third { width: 65.33%; }
	.eb-sc-col--one_fourth { width: 22%; }
	.eb-sc-col--three_fourth { width: 74%; }
	.eb-sc-col--one_fifth { width: 16.8%; }
	.eb-sc-col--two_fifth { width: 37.6%; }
	.eb-sc-col--three_fifth { width: 58.4%; }
	.eb-sc-col--four_fifth { width: 79.2%; }
	.eb-sc-col--one_sixth { width: 13.33%; }
	.eb-sc-col--five_sixth { width: 82.67%; }
}
.eb-sc-toggle { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.eb-sc-toggle summary { cursor: pointer; padding: 10px 16px; font-weight: 600; }
.eb-sc-toggle > div { padding: 0 16px 12px; }
.eb-sc-mark { background: #FFF1A8; padding: 0 3px; border-radius: 3px; }
.eb-sc-dropcap { float: right; font-size: 3em; line-height: 1; margin-inline-end: 8px; color: var(--green); font-weight: 700; }
.eb-sc-divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.eb-sc-padding { padding-inline: 5%; }
.eb-embed { width: 100%; border: 0; }

/* ---------- Commentaires ---------- */

.eb-comments { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.eb-comment-list, .eb-comment-list .children { list-style: none; margin: 0; padding: 0; }
.eb-comment-list .children { margin-inline-start: 28px; padding-inline-start: 16px; border-inline-start: 2px solid var(--line-2); }
.eb-comment__body { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.eb-comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.eb-comment__avatar {
	width: 36px; height: 36px; border-radius: 50%; background: var(--chip); color: var(--green);
	display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none;
}
.eb-comment--staff > .eb-comment__body .eb-comment__avatar { background: var(--green); color: #fff; }
.eb-comment__author { font-weight: 700; }
.eb-comment__date { font-size: 13px; color: var(--muted); }
.eb-comment__text { margin-top: 6px; padding-inline-start: 46px; }
.eb-comment__text p { margin: 0 0 .6em; }
.eb-comment__wait { margin: 6px 0 0; padding-inline-start: 46px; color: var(--magenta-2); font-size: 14px; }
.eb-comment__reply { padding-inline-start: 46px; font-size: 14px; font-weight: 600; }
.eb-form__title { margin: 12px 0 4px; font-size: 20px; }
.eb-form__title small { font-size: 14px; margin-inline-start: 10px; }
.eb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.eb-form > p { margin: 0; }
.eb-form__note, .eb-field--full, .eb-form .form-submit, .eb-form .comment-form-cookies-consent, .eb-form .logged-in-as { grid-column: 1 / -1; }
.eb-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.eb-field input, .eb-field textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #D5DAD2; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
.eb-field input:focus, .eb-field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.eb-form .form-submit { margin: 0; }

/* ---------- Pied de page ---------- */

.eb-footer { background: var(--black); color: #D3D8D0; border-top: 5px solid var(--green-2); }
.eb-footer__inner { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; padding-block: 36px; }
.eb-footer__about { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.eb-footer__name { font-family: var(--font-title); font-size: 20px; font-weight: 700; color: #fff; }
.eb-footer__cols { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
.eb-footer__col { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.eb-footer__col .menu-item { list-style: none; }
.eb-footer__title { color: #fff; font-weight: 700; margin-bottom: 4px; }
.eb-footer a { color: #E9ECE7; }
.eb-footer a:hover { color: #9FD893; }
.eb-footer__copy { flex: 1 1 100%; font-size: 13px; color: #A7AEA3; border-top: 1px solid #2A2A2A; padding-top: 16px; }

/* ---------- Bandeau « جديد » ---------- */

.eb-flash { background: #fff; border-bottom: 1px solid var(--line); }
.eb-flash__inner { display: flex; align-items: center; gap: 12px; padding-block: 9px; min-width: 0; }
.eb-flash__tag {
	flex: none; background: var(--magenta); color: #fff; font-size: 13px; font-weight: 700;
	padding: 2px 10px; border-radius: 6px; animation: eb-pulse 2.4s ease-in-out infinite;
}
.eb-flash__link { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-flash__link:hover { color: var(--green); }
.eb-flash__more { flex: none; font-size: 14px; font-weight: 600; }
@keyframes eb-pulse { 50% { opacity: .65; } }

/* ---------- Couvertures (articles sans image) ---------- */

.eb-cover {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
	width: 100%; height: 100%; padding: 14px 16px; overflow: hidden; color: #fff;
	background-color: var(--c);
	background:
		radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .18) 0 18%, transparent 19%),
		radial-gradient(circle at 85% 110%, rgba(0, 0, 0, .18) 0 35%, transparent 36%),
		linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000));
}
.eb-cover__icon { position: absolute; inset-block-start: 12%; inset-inline-start: 50%; transform: translateX(50%); width: 34%; max-width: 120px; opacity: .9; }
.eb-cover__icon svg { width: 100%; height: auto; display: block; }
.eb-cover__label { position: relative; font-family: var(--font-title); font-weight: 700; font-size: 15px; line-height: 1.4; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.eb-cover__brand { position: relative; font-size: 11px; opacity: .8; }
span.eb-cover { display: flex !important; }

/* ---------- Atouts ---------- */

.eb-perks { background: #fff; border-bottom: 1px solid var(--line); }
.eb-perks__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; padding-block: 18px; }
.eb-perk { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.eb-perk b { display: block; color: var(--ink); font-size: 16px; font-family: var(--font-title); }
.eb-perk__icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.eb-perk__icon svg { width: 26px; height: 26px; }

.eb-level { position: relative; overflow: hidden; }
.eb-level__icon { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; width: 54px; color: var(--c); opacity: .14; }
.eb-level__icon svg { width: 100%; height: auto; display: block; }
.eb-level:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .07); transform: translateY(-2px); transition: transform .15s, box-shadow .15s; }

/* ---------- Actualités façon magazine ---------- */

.eb-mag { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.eb-lead { min-width: 0; }
.eb-lead__link {
	position: relative; display: block; height: 100%; min-height: 380px; border-radius: 20px; overflow: hidden;
	color: #fff; background: var(--black); isolation: isolate;
}
.eb-lead__media { position: absolute; inset: 0; z-index: -2; display: block; }
.eb-lead__media img, .eb-lead__media .eb-cover { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.eb-lead__media .eb-cover__label, .eb-lead__media .eb-cover__brand { display: none; }
.eb-lead__link::after {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to top, rgba(10, 20, 9, .92) 0%, rgba(10, 20, 9, .55) 45%, rgba(10, 20, 9, 0) 75%);
}
.eb-lead__link:hover { color: #fff; }
.eb-lead__link:hover .eb-lead__media img { transform: scale(1.04); }
.eb-lead__body { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.eb-lead__title { font-family: var(--font-title); font-size: clamp(21px, 2.4vw, 28px); font-weight: 700; line-height: 1.4; }
.eb-lead__excerpt { color: #E3EBE1; font-size: 15px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eb-lead__meta { font-size: 13px; color: #CDE8C6; font-weight: 600; }

.eb-mag__side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.eb-mini { min-width: 0; }
.eb-mini__link {
	display: flex; gap: 14px; align-items: stretch; background: #fff; border: 1px solid var(--line);
	border-radius: 14px; padding: 10px; color: var(--ink); height: 100%;
}
.eb-mini__link:hover { border-color: var(--green-2); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.eb-mini__media { flex: none; width: 128px; aspect-ratio: 15 / 8; align-self: center; border-radius: 10px; overflow: hidden; display: block; background: var(--chip); }
.eb-mini__media img, .eb-mini__media .eb-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-mini__media .eb-cover__label, .eb-mini__media .eb-cover__brand { display: none; }
.eb-mini__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.eb-mini__cat { font-size: 12px; font-weight: 700; color: var(--magenta-2); }
.eb-mini__title { font-weight: 600; font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eb-mini__date { font-size: 12px; color: var(--muted); }

/* ---------- Grille d'articles avec image ---------- */

.eb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.eb-tcard { min-width: 0; }
.eb-tcard__link {
	display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line);
	border-radius: 16px; overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.eb-tcard__link:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .08); border-color: var(--green-2); }
.eb-tcard__media { display: block; aspect-ratio: 15 / 8; overflow: hidden; background: var(--chip); }
.eb-tcard__media img, .eb-tcard__media .eb-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-tcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.eb-tcard__cat { font-size: 12px; font-weight: 700; color: var(--green); }
.eb-tcard__title { font-weight: 600; font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eb-tcard__date { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--muted); }

.eb-exam { position: relative; overflow: hidden; }
.eb-exam__icon { position: absolute; inset-block-end: 18px; inset-inline-end: 22px; width: 86px; opacity: .1; pointer-events: none; }
.eb-exam--bac .eb-exam__icon { color: var(--magenta); }
.eb-exam--bem .eb-exam__icon { color: var(--green); }
.eb-exam__icon svg { width: 100%; height: auto; display: block; }

.eb-teachers { position: relative; overflow: hidden; }
.eb-teachers__icon { position: absolute; inset-block-end: -10px; inset-inline-start: -10px; width: 120px; color: var(--green); opacity: .06; }
.eb-teachers__icon svg { width: 100%; height: auto; display: block; }

/* ---------- Appel à suivre ---------- */

.eb-cta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px;
	padding: 30px 32px; border-radius: 20px; color: #fff;
	background: radial-gradient(circle at 10% 0%, #3F8C35 0 30%, transparent 31%), linear-gradient(120deg, var(--green-3), var(--green));
}
.eb-cta__text { flex: 1 1 340px; }
.eb-cta__title { margin: 0 0 6px; font-size: 26px; }
.eb-cta p { margin: 0; color: #DDEBD9; }
.eb-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.eb-cta .eb-btn { padding: 12px 20px; }

/* Image principale des actualités */
.eb-article__hero { margin: 0 0 22px; border-radius: 14px; overflow: hidden; }
.eb-article__hero img { display: block; width: 100%; height: auto; }

/* ---------- Anti-chevauchement (textes et images des anciens articles) ---------- */

.eb-content { display: flow-root; }               /* les éléments flottants restent dans l'article */
.eb-content::after { content: ''; display: block; clear: both; }
.eb-content img { height: auto !important; max-width: 100% !important; }
.eb-content img[style*="float"], .eb-content .alignleft, .eb-content .alignright { max-width: 50% !important; }
.eb-content figure, .eb-content .wp-caption { max-width: 100% !important; height: auto !important; }
/* Blocs de texte à hauteur fixe dans les anciens articles : la hauteur suit maintenant le texte. */
.eb-content div[style*="height"]:not([class*="eb-"]):not(:has(> iframe)) { height: auto !important; min-height: 0 !important; }
.eb-content p, .eb-content li, .eb-content h2, .eb-content h3, .eb-content h4 { overflow-wrap: anywhere; }
.eb-content .eb-pdf, .eb-content #Df, .eb-content .flip3D, .eb-content .flip3DYoutube, .eb-content .box { clear: both; }
.eb-content [style*="position: absolute"], .eb-content [style*="position:absolute"] { position: static !important; }



/* ---------- Suggestions de recherche ---------- */
.eb-search { position: relative; }
.eb-suggest {
	position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 60; background: #fff;
	border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 36px rgba(0, 0, 0, .14);
	padding: 6px; max-height: 70vh; overflow-y: auto; text-align: start;
}
.eb-suggest[hidden] { display: none; }
.eb-suggest__cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 6px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.eb-suggest__cat { padding: 4px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 600; }
.eb-suggest__cat small { color: var(--muted); font-weight: 400; }
.eb-suggest__item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; color: var(--ink); line-height: 1.5; }
.eb-suggest__item span { font-weight: 600; font-size: 14.5px; }
.eb-suggest__item small { color: var(--muted); font-size: 12px; }
.eb-suggest__item:hover, .eb-suggest__item:focus, .eb-suggest__cat:focus, .eb-suggest__all:focus { background: var(--green-soft); color: var(--green); outline: none; }
.eb-suggest__all { display: block; padding: 8px 10px; font-weight: 700; font-size: 14px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.eb-suggest__empty { padding: 12px; color: var(--muted); font-size: 14px; }
.eb-searchcats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 18px; }
.eb-searchcats .eb-chip--solid { --c: var(--green); }
.eb-row__title mark { background: #FFF1A8; color: inherit; padding: 0 2px; border-radius: 3px; }
.eb-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- « حول هذا الموضوع » ---------- */
.eb-intro { margin: 0 0 22px; padding: 16px 20px; border-radius: 14px; background: var(--green-soft); border-inline-start: 5px solid var(--green-2); }
.eb-intro__title { margin: 0 0 6px; font-size: 17px; color: var(--green); }
.eb-intro p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.85; color: var(--ink); }
.eb-intro p:last-child { margin-bottom: 0; }

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
	.eb-mag { grid-template-columns: 1fr; }
	.eb-nav__toggle { display: inline-flex; }
	.eb-menu { display: none; flex-direction: column; padding-bottom: 10px; }
	.eb-menu.is-open { display: flex; }
	.eb-menu > li { flex-wrap: wrap; border-top: 1px solid #262626; }
	.eb-menu > li > a { flex: 1 1 auto; }
	.eb-subtoggle {
		display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
		background: transparent; border: 0; color: #fff; cursor: pointer;
	}
	.eb-subtoggle::before { content: '▾'; font-size: 16px; transition: transform .15s; }
	.eb-subtoggle[aria-expanded="true"]::before { transform: rotate(180deg); }
	.eb-menu .sub-menu, .eb-menu .sub-menu .sub-menu {
		position: static; display: none; flex: 1 1 100%; min-width: 0; box-shadow: none;
		border: 0; border-radius: 0; background: #1B1B1B; padding: 0 0 6px;
	}
	.eb-menu li:hover > .sub-menu, .eb-menu li:focus-within > .sub-menu { display: none; }
	.eb-menu li.is-open > .sub-menu { display: block; }
	.eb-menu .sub-menu li { display: flex; flex-wrap: wrap; }
	.eb-menu .sub-menu a { color: #E9ECE7; padding: 9px 26px; flex: 1 1 auto; }
	.eb-menu .sub-menu .sub-menu a { padding-inline-start: 40px; }
	.eb-menu .sub-menu a:hover { background: #262626; color: #fff; }
	.eb-menu .sub-menu .menu-item-has-children > a::after { content: none; }
}

@media (max-width: 640px) {
	.eb-wrap { padding-inline: 16px; }
	.eb-header__top { justify-content: center; }
	.eb-logo img, .custom-logo { width: 104px; }
	.eb-search { flex: 1 1 100%; }
	.eb-hero__inner { padding-block: 34px; gap: 26px; }
	.eb-hero__lead { font-size: 16px; }
	.eb-stat b { font-size: 24px; }
	.eb-home { gap: 40px; padding-block: 32px 48px; }
	.eb-label { font-size: 19px; }
	.eb-card, .eb-article, .eb-comments { padding: 18px; }
	.eb-row { padding: 12px 14px; }
	.eb-content { font-size: 16px; }
	.eb-pdf__frame { height: 560px; }
	.eb-pdf__actions { width: 100%; }
	.eb-pdf__actions .eb-btn { flex: 1 1 auto; }
	.eb-comment__text, .eb-comment__wait, .eb-comment__reply { padding-inline-start: 0; }
	.eb-comment-list .children { margin-inline-start: 10px; }
	.eb-layout { padding-block: 24px 48px; }
	.eb-row__thumb { width: 84px; }
	.eb-row { padding: 12px 14px; gap: 12px; }
	.eb-lead__link { min-height: 300px; }
	.eb-lead__body { padding: 18px; }
	.eb-mini__media { width: 104px; }
	.eb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.eb-tcard__body { padding: 10px 11px 12px; }
	.eb-tcard__title { font-size: 14px; }
	.eb-flash__more { display: none; }
	.eb-exam__icon { display: none; }
	.eb-level__icon { width: 40px; }
	.eb-cta { padding: 24px 20px; }
	.eb-content img[style*="float"], .eb-content .alignleft, .eb-content .alignright { float: none !important; display: block; max-width: 100% !important; margin: 0 auto 1em !important; }
	.eb-content [style*="float"]:not(img) { float: none !important; width: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
