/* ==========================================================
   ÉCHOS DU MONDE — CSS PRINCIPAL
   Design éditorial premium, minimaliste, respirant.
   ========================================================== */

:root {
	--edm-primary: #080B1A;
	--edm-secondary: #168DE2;
	--edm-accent: #F05A28;
	--edm-white: #FFFFFF;
	--edm-light-gray: #F5F6F8;
	--edm-text: #111827;
	--edm-border: #E5E7EB;
	--edm-radius: 6px;
	--edm-max-width: 1240px;
	--edm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--edm-transition: 0.25s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--edm-font);
	color: var(--edm-text);
	background: var(--edm-white);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; transition: color var(--edm-transition); }
a:hover { color: var(--edm-secondary); }

ul { list-style: none; margin: 0; padding: 0; }

.edm-container {
	max-width: var(--edm-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

.edm-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--edm-primary);
	color: var(--edm-white);
	padding: 12px 20px;
	z-index: 9999;
}
.edm-skip-link:focus { left: 12px; top: 12px; }

/* ================= TOP BAR ================= */
.edm-topbar {
	background: var(--edm-primary);
	color: var(--edm-white);
	font-size: 13px;
}
.edm-topbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 24px;
}
.edm-topbar-date { opacity: 0.85; }

.edm-social-icons { display: flex; gap: 14px; }
.edm-social-icons--header a { color: var(--edm-white); font-size: 12px; opacity: 0.85; }
.edm-social-icons--header a:hover { opacity: 1; color: var(--edm-secondary); }

/* ================= BRANDING ================= */
.edm-branding { padding: 24px 0; border-bottom: 1px solid var(--edm-border); }
.edm-branding-inner { text-align: center; }
.edm-logo-wrap img { margin: 0 auto; }
.edm-site-title {
	font-size: 32px;
	font-weight: 800;
	color: var(--edm-primary);
	letter-spacing: -0.5px;
}
.edm-slogan {
	margin: 6px 0 0;
	color: #6B7280;
	font-size: 14px;
	font-style: italic;
}

/* ================= NAV BAR ================= */
.edm-nav-bar {
	background: var(--edm-white);
	border-bottom: 1px solid var(--edm-border);
}
body.edm-header-sticky .edm-nav-bar {
	position: sticky;
	top: 0;
	z-index: 999;
	box-shadow: 0 1px 0 var(--edm-border);
}
.edm-nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
}
.edm-menu {
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
}
.edm-menu a {
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--edm-text);
}
.edm-menu a:hover,
.edm-menu li.current-menu-item > a { color: var(--edm-secondary); }

.edm-nav-actions { display: flex; align-items: center; gap: 12px; }
.edm-search-toggle,
.edm-menu-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 18px;
	padding: 6px;
	color: var(--edm-primary);
}
.edm-menu-toggle { display: none; }
.edm-hamburger,
.edm-hamburger::before,
.edm-hamburger::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--edm-primary);
	position: relative;
	transition: var(--edm-transition);
}
.edm-hamburger::before,
.edm-hamburger::after { content: ""; position: absolute; left: 0; }
.edm-hamburger::before { top: -7px; }
.edm-hamburger::after { top: 7px; }

/* État "ouvert" : la barre du milieu disparaît, les deux autres forment une croix. */
.edm-menu-toggle[aria-expanded="true"] .edm-hamburger { background: transparent; }
.edm-menu-toggle[aria-expanded="true"] .edm-hamburger::before { top: 0; transform: rotate(45deg); }
.edm-menu-toggle[aria-expanded="true"] .edm-hamburger::after { top: 0; transform: rotate(-45deg); }

.edm-search-panel {
	background: var(--edm-light-gray);
	padding: 16px 0;
	border-bottom: 1px solid var(--edm-border);
}
.edm-search-form { display: flex; gap: 8px; max-width: 600px; margin: 0 auto; }
.edm-search-field {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid var(--edm-border);
	border-radius: var(--edm-radius);
	font-size: 15px;
	font-family: var(--edm-font);
}
.edm-search-submit,
.edm-button {
	background: var(--edm-secondary);
	color: var(--edm-white);
	border: none;
	padding: 12px 22px;
	border-radius: var(--edm-radius);
	font-weight: 600;
	cursor: pointer;
	transition: background var(--edm-transition);
	display: inline-block;
}
.edm-search-submit:hover,
.edm-button:hover { background: var(--edm-primary); color: var(--edm-white); }

.edm-mobile-menu { display: none; }

/* ================= BREAKING NEWS ================= */
.edm-breaking-news {
	background: var(--edm-primary);
	color: var(--edm-white);
}
.edm-breaking-news-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 24px;
	overflow: hidden;
}
.edm-breaking-badge {
	background: var(--edm-accent);
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
	flex-shrink: 0;
}
.edm-breaking-ticker { overflow: hidden; flex: 1; }
.edm-breaking-list { display: flex; gap: 40px; white-space: nowrap; }
.edm-breaking-list a { font-size: 14px; color: var(--edm-white); }
.edm-breaking-news--scroll .edm-breaking-list {
	animation: edm-scroll 12s linear infinite;
}
.edm-breaking-news--static .edm-breaking-list { flex-wrap: wrap; white-space: normal; }
@keyframes edm-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* ================= BADGES / CATEGORIES ================= */
.edm-badge {
	display: inline-block;
	background: var(--edm-secondary);
	color: var(--edm-white);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	padding: 4px 10px;
	border-radius: 4px;
	margin-bottom: 10px;
}
.edm-badge--large { font-size: 14px; padding: 8px 16px; margin-bottom: 16px; }

/* ================= HERO ================= */
.edm-hero-section {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 32px;
	padding: 40px 0;
	border-bottom: 1px solid var(--edm-border);
}
.edm-hero-secondary { display: flex; flex-direction: column; gap: 20px; }

/* ---- Carrousel hero (article principal défilant) ----
   L'image garde toujours la même taille : elle hérite du cadrage fixe
   .edm-card--featured .edm-card-image-link (aspect-ratio 3/2) déjà défini
   plus bas, qui recadre chaque image (object-fit: cover) quel que soit
   son format d'origine. Seul le contenu défile, jamais la taille du cadre. */
.edm-hero-carousel { position: relative; }
.edm-hero-carousel-track { position: relative; }
.edm-hero-slide {
	display: none;
	animation: edm-fade-in 0.5s ease;
}
.edm-hero-slide.is-active { display: block; }
@keyframes edm-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
.edm-hero-carousel-dots {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	gap: 8px;
	z-index: 2;
}
.edm-hero-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: rgba(255, 255, 255, 0.6);
	box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
	cursor: pointer;
	transition: background var(--edm-transition), transform var(--edm-transition);
}
.edm-hero-dot.is-active,
.edm-hero-dot:hover { background: var(--edm-white); transform: scale(1.25); }

/* ---- Emplacements publicitaires (Google AdSense) ---- */
.edm-ad-slot {
	margin: 24px 0;
	text-align: center;
	overflow: hidden;
}
.edm-ad-slot-label,
.edm-ad-label {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--edm-text-light, #9CA3AF);
	margin-bottom: 6px;
}
.edm-ad-slot--sidebar { margin-top: 0; }
.edm-ad-slot--footer { padding-top: 8px; }

/* ---- Overlay du titre sur l'image (uniquement dans le carrousel de la Une) ----
   Le texte (badge, titre réduit, extrait, méta) se superpose en bas de l'image
   avec un dégradé sombre, plutôt que de s'afficher en dessous. */
.edm-hero-carousel .edm-card--featured {
	position: relative;
	border-radius: var(--edm-radius);
	overflow: hidden;
}
.edm-hero-carousel .edm-card--featured .edm-card-image-link {
	border-radius: 0;
}
.edm-hero-carousel .edm-card--featured .edm-card-body {
	position: absolute;
	inset: auto 0 0 0;
	padding: 28px 24px 20px;
	padding-top: 60px;
	background: linear-gradient(to top, rgba(8, 11, 26, 0.95) 0%, rgba(8, 11, 26, 0.85) 45%, rgba(8, 11, 26, 0.45) 75%, rgba(8, 11, 26, 0) 100%);
}
.edm-hero-carousel .edm-card--featured .edm-card-title {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 8px;
	font-weight: 700;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.edm-hero-carousel .edm-card--featured .edm-card-title a { color: var(--edm-white); }
.edm-hero-carousel .edm-card--featured .edm-card-excerpt {
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	margin: 0 0 8px;
}
.edm-hero-carousel .edm-card--featured .edm-post-meta,
.edm-hero-carousel .edm-card--featured .edm-post-meta a {
	color: rgba(255, 255, 255, 0.75);
}

.edm-card { display: block; }
.edm-card-image-link {
	display: block;
	overflow: hidden;
	border-radius: var(--edm-radius);
	background: var(--edm-light-gray); /* évite un flash vide pendant le chargement */
}
/* Recadrage uniforme : toute image (quelle que soit sa taille/son ratio d'origine)
   remplit exactement le cadre prévu, sans jamais le déformer ni dépasser. */
.edm-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.4s ease;
}
.edm-card:hover .edm-card-image { transform: scale(1.04); }

/* Ratios fixes par format de carte — alignés sur les tailles générées par le thème
   (edm-hero 900x600 = 3/2, edm-card 500x320 = 25/16, edm-card-small 160x120 = 4/3). */
.edm-card--featured .edm-card-image-link { aspect-ratio: 3 / 2; }
.edm-card--standard .edm-card-image-link { aspect-ratio: 25 / 16; }
.edm-card--horizontal .edm-card-image-link,
.edm-card--small .edm-card-image-link { aspect-ratio: 4 / 3; }

.edm-card--featured .edm-card-body { padding-top: 18px; }
.edm-card--featured .edm-card-title { font-size: 30px; line-height: 1.25; margin: 0 0 10px; font-weight: 800; }
.edm-card--featured .edm-card-title a:hover { color: var(--edm-secondary); }
.edm-card-excerpt { color: #4B5563; font-size: 15px; margin: 0 0 10px; }

.edm-card--horizontal { display: flex; gap: 14px; }
.edm-card--horizontal .edm-card-image-link { width: 110px; flex-shrink: 0; }
.edm-card--horizontal .edm-card-title { font-size: 15px; margin: 0 0 6px; line-height: 1.35; font-weight: 700; }

.edm-post-meta {
	font-size: 12px;
	color: #6B7280;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.edm-meta-sep { opacity: 0.5; }

/* ================= RUBRIC BAR ================= */
.edm-rubric-bar {
	border-bottom: 1px solid var(--edm-border);
	padding: 14px 0;
}
.edm-rubric-bar ul { display: flex; gap: 26px; flex-wrap: wrap; }
.edm-rubric-bar a {
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	color: var(--edm-primary);
}
.edm-rubric-bar a:hover { color: var(--edm-secondary); }

/* ================= SECTIONS ================= */
.edm-section { padding: 44px 0; border-bottom: 1px solid var(--edm-border); }
.edm-section-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 24px;
	border-bottom: 3px solid var(--edm-primary);
	padding-bottom: 10px;
}
.edm-section-title { font-size: 22px; font-weight: 800; margin: 0; color: var(--edm-primary); }
.edm-section-more { font-size: 13px; font-weight: 600; color: var(--edm-secondary); white-space: nowrap; }

.edm-card-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.edm-card--standard .edm-card-title { font-size: 16px; margin: 0 0 8px; line-height: 1.35; font-weight: 700; }
.edm-card--standard .edm-card-body { padding-top: 12px; }

.edm-card-grid--category { grid-template-columns: 1.4fr 1fr 1fr; }
.edm-card-grid--category .edm-card--featured { grid-row: span 2; }

/* ================= LES PLUS LUS ================= */
.edm-most-read-list { display: flex; flex-direction: column; gap: 16px; }
.edm-most-read-list--wide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; }
.edm-most-read-item { display: flex; gap: 14px; align-items: flex-start; }
.edm-most-read-rank {
	font-size: 24px;
	font-weight: 800;
	color: var(--edm-border);
	width: 40px;
	flex-shrink: 0;
	line-height: 1;
}
.edm-most-read-content { display: flex; gap: 12px; align-items: flex-start; }
.edm-most-read-thumb { width: 64px; aspect-ratio: 1 / 1; flex-shrink: 0; border-radius: 4px; overflow: hidden; background: var(--edm-light-gray); }
.edm-most-read-thumb img { width: 100%; height: 100%; object-fit: cover; }
.edm-most-read-title { font-weight: 700; font-size: 14px; display: block; }
.edm-most-read-views { font-size: 12px; color: #6B7280; }

/* ================= LAYOUT AVEC SIDEBAR ================= */
.edm-layout-with-sidebar {
	display: grid;
	grid-template-columns: 2.4fr 1fr;
	gap: 40px;
	padding: 40px 0;
}
.edm-layout-full { padding: 40px 0; }

.edm-sidebar { display: flex; flex-direction: column; gap: 32px; }
.edm-widget-title {
	font-size: 15px;
	font-weight: 800;
	text-transform: uppercase;
	border-bottom: 2px solid var(--edm-primary);
	padding-bottom: 8px;
	margin: 0 0 16px;
}
.edm-card--small { display: flex; gap: 10px; margin-bottom: 14px; }
.edm-card--small .edm-card-image-link { width: 70px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.edm-card--small .edm-card-title { font-size: 13px; margin: 0 0 4px; font-weight: 700; }

.edm-category-list li { border-bottom: 1px solid var(--edm-border); padding: 8px 0; font-size: 14px; }

.edm-newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.edm-newsletter-form input {
	padding: 12px 14px;
	border: 1px solid var(--edm-border);
	border-radius: var(--edm-radius);
	font-family: var(--edm-font);
}
.edm-newsletter-form button {
	background: var(--edm-accent);
	color: var(--edm-white);
	border: none;
	padding: 12px;
	border-radius: var(--edm-radius);
	font-weight: 700;
	cursor: pointer;
}
.edm-newsletter-message { font-size: 13px; margin-top: 8px; }
.edm-newsletter-success { color: #16A34A; }
.edm-newsletter-error { color: var(--edm-accent); }

/* ================= ARTICLE ================= */
.edm-breadcrumb { font-size: 13px; color: #6B7280; margin-bottom: 16px; }
.edm-breadcrumb a { color: #6B7280; }
.edm-breadcrumb a:hover { color: var(--edm-secondary); }

.edm-article-title { font-size: 36px; line-height: 1.2; font-weight: 800; margin: 10px 0 12px; color: var(--edm-primary); }
.edm-article-subtitle { font-size: 18px; color: #4B5563; margin: 0 0 14px; }
.edm-article-image { margin: 24px 0; }
.edm-article-image figcaption { font-size: 13px; color: #6B7280; margin-top: 8px; }
.edm-article-content { font-size: 18px; line-height: 1.8; max-width: 760px; }
.edm-article-content p { margin: 0 0 22px; }
.edm-article-content h2 { font-size: 26px; margin: 36px 0 16px; font-weight: 800; }
.edm-article-content h3 { font-size: 21px; margin: 28px 0 14px; font-weight: 700; }
.edm-article-content img { border-radius: var(--edm-radius); margin: 20px 0; }
.edm-article-content blockquote {
	border-left: 4px solid var(--edm-secondary);
	padding-left: 20px;
	margin: 24px 0;
	color: #4B5563;
	font-style: italic;
}

.edm-share { display: flex; gap: 14px; align-items: center; margin: 28px 0; flex-wrap: wrap; }
.edm-share-label { font-weight: 700; font-size: 13px; }
.edm-share a {
	font-size: 13px;
	font-weight: 600;
	border: 1px solid var(--edm-border);
	padding: 6px 14px;
	border-radius: 20px;
}
.edm-share a:hover { background: var(--edm-secondary); color: var(--edm-white); border-color: var(--edm-secondary); }

/* ================= COMMENTAIRES ================= */
.edm-comments { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--edm-border); }
.edm-comments-title { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.edm-comment-list li { margin-bottom: 20px; }

/* ================= FOOTER ================= */
.edm-site-footer { background: var(--edm-primary); color: #D1D5DB; padding-top: 50px; }
.edm-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 32px;
	padding-bottom: 40px;
}
.edm-footer-col h4 { color: var(--edm-white); font-size: 14px; text-transform: uppercase; margin: 0 0 16px; }
.edm-footer-title { color: var(--edm-white); font-size: 22px; font-weight: 800; }
.edm-footer-slogan { font-style: italic; font-size: 13px; margin: 6px 0 12px; }
.edm-footer-description { font-size: 13px; line-height: 1.7; }
.edm-footer-menu li { margin-bottom: 10px; font-size: 14px; }
.edm-footer-menu a:hover { color: var(--edm-secondary); }
.edm-social-icons--footer { flex-wrap: wrap; margin-bottom: 20px; }
.edm-social-icons--footer a { font-size: 13px; color: #D1D5DB; }
.edm-footer-newsletter-title { margin-top: 20px; }
.edm-footer-widgets { border-top: 1px solid rgba(255,255,255,0.1); padding: 24px 0; }
.edm-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; }
.edm-footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.edm-footer-legal-menu { display: flex; gap: 18px; }

/* ================= 404 / NO RESULTS ================= */
.edm-404, .edm-no-results { text-align: center; padding: 60px 20px; }
.edm-404-title { font-size: 80px; font-weight: 800; color: var(--edm-secondary); margin: 0; }
.edm-404-text { font-size: 18px; margin: 10px 0 24px; }

.edm-archive-title { font-size: 28px; font-weight: 800; color: var(--edm-primary); margin: 0 0 20px; }

/* ================= NUAGE DE TAGS : MASQUÉ PARTOUT =================
   Filet de sécurité : même si un nuage de tags est réinséré (bloc Gutenberg,
   widget existant), il reste invisible sur le site. Le widget classique
   "Nuage de tags" est en plus désactivé côté PHP (voir functions.php). */
.tagcloud,
.widget_tag_cloud,
.wp-block-tag-cloud {
	display: none !important;
}
