/* =========================================================
   Alsharidah Child — Blog (page des articles, puis articles)
   Valeurs relevées dans src/app/pages/Blog.tsx et BlogPost.tsx, puis
   confrontées au CSS réellement compilé (dist/assets/index-Bm-wdw9b.css,
   Tailwind 4.1.12).

   Points qui tiennent à Tailwind 4 et à theme.css :
   - les gris slate sont en oklch dans le CSS compilé ; ils sont
     repris tels quels plutôt qu'approchés en hexadécimal ;
   - les opacités sur var(--brand-green) passent par color-mix(),
     comme le fait le CSS compilé ;
   - les survols sont enveloppés dans @media (hover: hover) ;
   - theme.css pose, hors couche, `h3 { font-size: 1.2rem !important;
     line-height: 1.5 !important }` et `p { line-height: 2 !important }`
     sous 768px. style.css les reprend à l'identique : sous 768px ce
     sont eux qui s'appliquent, ici comme dans le source ;
   - `html[dir=rtl] span { letter-spacing: normal !important }` annule
     tracking-wider sur la catégorie : il n'est donc pas repris.

   Le mode sombre du source n'est pas repris : décision prise pour
   l'ensemble du site.
   ========================================================= */

.ash-blog {
	--ash-blog-slate-50: oklch(98.4% 0.003 247.858);
	--ash-blog-slate-100: oklch(96.8% 0.007 247.896);
	--ash-blog-slate-200: oklch(92.9% 0.013 255.508);
	--ash-blog-slate-300: oklch(86.9% 0.022 252.894);
	--ash-blog-slate-400: oklch(70.4% 0.04 256.788);
	--ash-blog-slate-500: oklch(55.4% 0.046 257.417);
	--ash-blog-slate-800: oklch(27.9% 0.041 260.031);

	/* bg-white sur l'enveloppe de la page */
	background: #fff;
}

/* max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 */
.ash-blog__container {
	max-width: 1152px;
	margin-inline: auto;
	padding-inline: 16px;
}

@media (min-width: 640px) {
	.ash-blog__container {
		padding-inline: 24px;
	}
}

@media (min-width: 1024px) {
	.ash-blog__container {
		padding-inline: 32px;
	}
}

.ash-blog svg {
	display: block;
	flex-shrink: 0;
}

/* =========================================================
   1. Page des articles
   ========================================================= */

/* py-12 md:py-20 */
.ash-blog__list {
	padding-block: 48px;
}

@media (min-width: 768px) {
	.ash-blog__list {
		padding-block: 80px;
	}
}

/* grid grid-cols-1 md:grid-cols-2 gap-5 md:gap-8 */
.ash-blog__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

@media (min-width: 768px) {
	.ash-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px;
	}
}

/* ---------- Carte ---------- */

/* group block … flex flex-col h-full justify-between
   `block` et `flex` sont tous deux présents : `.flex` vient après
   `.block` dans le CSS compilé, c'est donc flex qui s'applique.
   bg-white border border-slate-100 rounded-3xl overflow-hidden
   transition-all duration-300 */
.ash-blog__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--ash-blog-slate-100);
	border-radius: 24px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* hover:border-[var(--brand-green)]/40 hover:-translate-y-1.5 */
@media (hover: hover) {
	.ash-blog__card:hover {
		border-color: color-mix(in oklab, var(--brand-green) 40%, transparent);
		translate: 0 -6px;
	}
}

/* h-44 md:h-56 relative overflow-hidden */
.ash-blog__card-media {
	position: relative;
	height: 176px;
	overflow: hidden;
}

@media (min-width: 768px) {
	.ash-blog__card-media {
		height: 224px;
	}
}

/* w-full h-full object-cover scale-100
   transition-transform duration-700 ease-out */
.ash-blog__card-media img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	scale: 1;
	transition: transform 0.7s cubic-bezier(0, 0, 0.2, 1), translate 0.7s cubic-bezier(0, 0, 0.2, 1), scale 0.7s cubic-bezier(0, 0, 0.2, 1), rotate 0.7s cubic-bezier(0, 0, 0.2, 1);
}

/* group-hover:scale-103 */
@media (hover: hover) {
	.ash-blog__card:hover .ash-blog__card-media img {
		scale: 1.03;
	}
}

/* absolute inset-0 bg-gradient-to-t from-black/25 via-transparent
   to-transparent opacity-60
   Positions implicites de Tailwind 4 : 0 %, 50 %, 100 %. */
.ash-blog__card-veil {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(to top in oklab, rgba(0, 0, 0, 0.25) 0%, transparent 50%, transparent 100%);
	opacity: 0.6;
}

/* p-6 md:p-8 flex-1 flex flex-col justify-between */
.ash-blog__card-body {
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	justify-content: space-between;
	padding: 24px;
}

@media (min-width: 768px) {
	.ash-blog__card-body {
		padding: 32px;
	}
}

.ash-blog__card-text {
	text-align: start;
}

/* text-[11px] font-extrabold uppercase text-[var(--brand-green)] mb-2.5 block
   text-[11px] ne fixe que la taille : la hauteur de ligne reste celle
   du corps de page, 2. */
.ash-blog__card-category {
	display: block;
	margin-bottom: 10px;
	color: var(--brand-green);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

/* font-extrabold text-[var(--brand-navy)] line-clamp-2 text-base
   md:text-lg leading-snug font-display transition-colors
   leading-snug fixe --tw-leading : text-base et text-lg gardent donc
   1.375. Sous 768px, la règle h3 de theme.css l'emporte (!important). */
.ash-blog__card-title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--brand-navy);
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.375;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
	.ash-blog__card-title {
		font-size: 18px;
	}
}

/* group-hover:text-[var(--brand-green)] */
@media (hover: hover) {
	.ash-blog__card:hover .ash-blog__card-title {
		color: var(--brand-green);
	}
}

/* text-xs sm:text-sm text-slate-500 mt-3.5 line-clamp-3 leading-relaxed
   leading-relaxed vaut 1.625 ; sous 768px, la règle
   `p, .leading-relaxed { line-height: 2 !important }` l'emporte. */
.ash-blog__card-excerpt {
	display: -webkit-box;
	margin: 14px 0 0;
	overflow: hidden;
	color: var(--ash-blog-slate-500);
	font-size: 12px;
	line-height: 1.625;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

@media (min-width: 640px) {
	.ash-blog__card-excerpt {
		font-size: 14px;
	}
}

/* mt-6 pt-4 border-t border-slate-100 flex items-center justify-between
   text-xs text-slate-400 font-bold
   text-xs porte sa hauteur de ligne : calc(1 / 0.75), soit 16px. */
.ash-blog__card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--ash-blog-slate-100);
	color: var(--ash-blog-slate-400);
	font-size: 12px;
	font-weight: 700;
	line-height: calc(1 / 0.75);
}

/* flex items-center gap-2.5 */
.ash-blog__card-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* flex items-center gap-1.5 ; icône text-[var(--brand-green)]/80 */
.ash-blog__card-date {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ash-blog__card-date svg {
	color: color-mix(in oklab, var(--brand-green) 80%, transparent);
}

/* w-1 h-1 rounded-full bg-slate-300 */
.ash-blog__card-dot {
	width: 4px;
	height: 4px;
	border-radius: 999px;
	background: var(--ash-blog-slate-300);
}

/* inline-flex items-center gap-1 text-[var(--brand-green)] font-bold
   group-hover:gap-2 transition-all duration-300 */
.ash-blog__card-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--brand-green);
	font-weight: 700;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
	.ash-blog__card:hover .ash-blog__card-more {
		gap: 8px;
	}
}

/* =========================================================
   2. Article
   Valeurs relevées dans src/app/pages/BlogPost.tsx, confrontées au
   CSS compilé et à la capture de l'original (cadre du contenu :
   704px de large, fond rgb(248 250 252), texte à 48px du bord).
   ========================================================= */

/* py-10 md:py-16 */
.ash-post {
	padding-block: 40px;
}

@media (min-width: 768px) {
	.ash-post {
		padding-block: 64px;
	}
}

/* max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 */
.ash-post__container {
	max-width: 768px;
	margin-inline: auto;
	padding-inline: 16px;
}

@media (min-width: 640px) {
	.ash-post__container {
		padding-inline: 24px;
	}
}

@media (min-width: 1024px) {
	.ash-post__container {
		padding-inline: 32px;
	}
}

/* ---------- 1. Barre d'actions ---------- */

/* flex items-center justify-between text-xs sm:text-sm
   text-muted-foreground mb-8 */
.ash-post__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 32px;
	color: var(--muted-foreground);
	font-size: 12px;
	line-height: calc(1 / 0.75);
}

@media (min-width: 640px) {
	.ash-post__bar {
		font-size: 14px;
		line-height: calc(1.25 / 0.875);
	}
}

/* inline-flex items-center gap-2 text-[var(--brand-green)] font-bold
   border border-[var(--brand-green)]/20 bg-[var(--brand-green)]/5
   px-4 py-2 rounded-full transition-all */
.ash-post__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border: 1px solid color-mix(in oklab, var(--brand-green) 20%, transparent);
	border-radius: 999px;
	background-color: color-mix(in oklab, var(--brand-green) 5%, transparent);
	color: var(--brand-green);
	font-weight: 700;
	text-decoration: none;
	transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* hover:text-[var(--brand-green-dark)] hover:bg-[var(--brand-green)]/10 */
@media (hover: hover) {
	.ash-post__back:hover {
		background-color: color-mix(in oklab, var(--brand-green) 10%, transparent);
		color: var(--brand-green-dark);
	}
}

/* inline-flex items-center gap-1.5 font-bold ; icône verte */
.ash-post__reading {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
}

.ash-post__reading svg {
	color: var(--brand-green);
}

/* ---------- 2. Bannière ---------- */

/* w-full aspect-[16/9] md:aspect-[21/9] rounded-xl md:rounded-[2rem]
   overflow-hidden border border-slate-200 mb-8 md:mb-10
   rounded-xl = calc(var(--radius) + 4px), --radius valant 1rem. */
.ash-post__banner {
	width: 100%;
	margin-bottom: 32px;
	overflow: hidden;
	border: 1px solid var(--ash-blog-slate-200);
	border-radius: 20px;
	aspect-ratio: 16 / 9;
}

@media (min-width: 768px) {
	.ash-post__banner {
		margin-bottom: 40px;
		border-radius: 32px;
		aspect-ratio: 21 / 9;
	}
}

.ash-post__banner img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

/* ---------- 3. Contenu ---------- */

/* bg-slate-50 border border-slate-200/50 rounded-2xl md:rounded-[2.5rem]
   p-5 md:p-12 */
.ash-post__content {
	padding: 20px;
	border: 1px solid color-mix(in oklab, var(--ash-blog-slate-200) 50%, transparent);
	border-radius: 16px;
	background-color: var(--ash-blog-slate-50);
}

@media (min-width: 768px) {
	.ash-post__content {
		padding: 48px;
		border-radius: 40px;
	}
}

/* Paragraphe : mt-5 text-slate-800 leading-loose text-sm sm:text-base
   text-start. Chaque paragraphe porte sa marge, le premier compris :
   le cadre ayant un rembourrage, elle ne fusionne pas.
   leading-loose (2) doit être écrit : style.css pose 2.1 sur p. */
.ash-post__content p {
	margin: 20px 0 0;
	color: var(--ash-blog-slate-800);
	font-size: 14px;
	line-height: 2;
	text-align: start;
}

@media (min-width: 640px) {
	.ash-post__content p {
		font-size: 16px;
	}
}

/* Titre : mt-9 text-[var(--brand-green)] font-extrabold text-lg
   sm:text-xl font-display text-start
   text-lg et text-xl portent leur hauteur de ligne. Sous 768px, la
   règle h3 de theme.css l'emporte (1.2rem / 1.5, !important). */
.ash-post__content h3 {
	margin: 36px 0 0;
	color: var(--brand-green);
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 800;
	line-height: calc(1.75 / 1.125);
	text-align: start;
}

@media (min-width: 640px) {
	.ash-post__content h3 {
		font-size: 20px;
		line-height: calc(1.75 / 1.25);
	}
}

/* Gras : text-[var(--brand-green)] font-extrabold */
.ash-post__content strong {
	color: var(--brand-green);
	font-weight: 800;
}

/* ---------- 4. Mots-clés ---------- */

/* mt-12 pt-8 border-t border-slate-200/60 text-start */
.ash-post__keywords {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid color-mix(in oklab, var(--ash-blog-slate-200) 60%, transparent);
	text-align: start;
}

/* flex items-center gap-2.5 text-xs sm:text-sm text-muted-foreground
   mb-4.5 font-bold ; icône de 15px, verte */
.ash-post__keywords-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	color: var(--muted-foreground);
	font-size: 12px;
	font-weight: 700;
	line-height: calc(1 / 0.75);
}

@media (min-width: 640px) {
	.ash-post__keywords-title {
		font-size: 14px;
		line-height: calc(1.25 / 0.875);
	}
}

.ash-post__keywords-title svg {
	color: var(--brand-green);
}

/* flex flex-wrap gap-2.5 */
.ash-post__keywords-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* text-[10px] sm:text-xs bg-slate-100 text-[var(--brand-green)] px-4 py-2
   rounded-full font-bold border border-slate-200/50
   text-[10px] ne fixe que la taille : hauteur de ligne héritée (2) sous
   640px ; text-xs pose ensuite la sienne (16px). */
.ash-post__keyword {
	padding: 8px 16px;
	border: 1px solid color-mix(in oklab, var(--ash-blog-slate-200) 50%, transparent);
	border-radius: 999px;
	background-color: var(--ash-blog-slate-100);
	color: var(--brand-green);
	font-size: 10px;
	font-weight: 700;
}

@media (min-width: 640px) {
	.ash-post__keyword {
		font-size: 12px;
		line-height: calc(1 / 0.75);
	}
}

/* ---------- Accessibilité ---------- */

.ash-blog a:focus-visible {
	outline: 2px solid var(--brand-green);
	outline-offset: 2px;
}

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

/* ---------- Version anglaise ---------- */

/* tracking-* du source. La règle globale html[dir="rtl"] h1..h6,
   span, p, a, button { letter-spacing: normal !important } l'annule
   en arabe ; en anglais elle ne joue pas et la valeur du build
   s'applique (Tailwind 4.1.12 : tight -0.025em, wide 0.025em,
   wider 0.05em, widest 0.1em). Toutes les règles ci-dessous sont
   limitées à html[dir="ltr"] : la version arabe n'en reçoit aucune. */

/* Blog.tsx l.36 et Home.tsx l.479, 520 : tracking-wider. */
html[dir="ltr"] .ash-blog__card-category {
	letter-spacing: 0.05em;
}
