/*
 * Embajada de la República de Malí en La Habana
 * Feuille de style partagée (multi-pages)
 * DA malienne : vert #0F8A38, jaune/or #FCD116, rouge #CE1126, vert foncé nav #0A5A28
 * Polices : Fraunces (titres) + Inter (corps)
 * Bilingue ES / FR
 */

:root {
  --red: #CE1126;
  --red-dark: #A50D1E;
  --green: #0F8A38;
  --navy: #0A5A28;
  --navy-dark: #073D1C;
  --gold: #FCD116;
  --terracotta: #B5572B;
  --terracotta-dark: #8F4220;
  --cream: #F7EFE1;
  --cream-soft: #F0E4CF;
  --bg: #ffffff;
  --text: #1E2330;
  --text-soft: #5A6175;
  --border: #E6E0D3;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --shadow-sm: 0 1px 3px rgba(14,42,71,0.06);
  --shadow-md: 0 4px 12px rgba(14,42,71,0.10);
  --shadow-lg: 0 12px 30px rgba(14,42,71,0.14);
  --radius: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.2; color: var(--navy); letter-spacing: -0.01em; }
a { color: var(--red); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--red-dark); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ===== Bandeau d'actualités défilant ===== */
.ticker { background: var(--green); color: #fff; font-size: 0.82rem; overflow: hidden; border-bottom: 2px solid var(--gold); }
.ticker .container { display: flex; align-items: center; gap: 1rem; }
.ticker .label { flex-shrink: 0; background: var(--red); color: #fff; padding: 0.45rem 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; margin-left: calc(-1 * var(--space-lg)); }
.ticker .track-wrap { overflow: hidden; flex: 1; }
.ticker .track { display: inline-flex; gap: 3rem; white-space: nowrap; padding: 0.45rem 0; animation: tickerScroll 32s linear infinite; }
.ticker a { color: #fff; opacity: 0.95; }
.ticker a:hover { color: var(--gold); }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html[dir="rtl"] .ticker .label { margin-left: 0; margin-right: calc(-1 * var(--space-lg)); }
html[dir="rtl"] .ticker .track { animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* ===== HEADER niveau 1 : emblème + ministère + langue ===== */
.header-top { background: #fff; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.header-top .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.header-brand { display: flex; align-items: center; gap: 1.25rem; }
.header-brand img.seal { width: 145px; height: 145px; flex-shrink: 0; }
.header-brand .ministry .country { font-size: 0.92rem; color: var(--text-soft); font-weight: 400; line-height: 1.3; }
.header-brand .ministry .embassy { font-weight: 700; color: var(--text); font-size: 1.4rem; line-height: 1.25; margin-top: 1px; }

.lang-switch { display: flex; gap: 0.3rem; flex-shrink: 0; }
.lang-switch button {
  background: transparent; color: var(--navy);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem; font-size: 0.8rem; border-radius: var(--radius);
  transition: all 200ms ease; font-weight: 500;
}
.lang-switch button:hover { border-color: var(--navy); }
.lang-switch button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ===== NAV niveau 2 : barre navy avec sous-menus ===== */
.nav-main { background: var(--navy); position: sticky; top: 0; z-index: 200; box-shadow: var(--shadow-sm); }
.nav-main .container { display: flex; align-items: center; justify-content: space-between; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block; color: #fff; padding: 0.95rem 1.05rem;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em;
  text-transform: uppercase; transition: background 200ms ease; white-space: nowrap;
}
.nav-list > li > a:hover, .nav-list > li.open > a { background: rgba(255,255,255,0.1); color: var(--gold); }
.nav-list > li > a.current { box-shadow: inset 0 -3px 0 var(--gold); }

/* Dropdown */
.nav-list .dropdown {
  position: absolute; top: 100%;
  left: 0; min-width: 240px;
  background: #fff; border-top: 3px solid var(--red);
  box-shadow: var(--shadow-lg); list-style: none;
  padding: 0.4rem 0; opacity: 0; visibility: hidden;
  transform: translateY(6px); transition: all 180ms ease; z-index: 210;
}
.nav-list > li:hover .dropdown, .nav-list > li.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-list .dropdown li a {
  display: block; padding: 0.6rem 1.2rem; color: var(--navy);
  font-size: 0.85rem; font-weight: 500; transition: all 150ms ease;
}
.nav-list .dropdown li a:hover { background: var(--cream); color: var(--red); padding-left: 1.45rem; }

.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; padding: 0.7rem 0; }

/* ===== RTL (arabe) ===== */
html[dir="rtl"] body { font-family: 'Inter', 'Tahoma', sans-serif; }
html[dir="rtl"] .header-top .container,
html[dir="rtl"] .nav-main .container { flex-direction: row-reverse; }
html[dir="rtl"] .header-brand { flex-direction: row-reverse; }
html[dir="rtl"] .nav-list .dropdown { left: auto; right: 0; }
html[dir="rtl"] .nav-list .dropdown li a:hover { padding-left: 1.2rem; padding-right: 1.45rem; }
html[dir="rtl"] .hero .inner { margin-right: 0; }

/* ===== HERO slider ===== */
.hero { position: relative; min-height: 72vh; display: flex; align-items: center; overflow: hidden; color: #fff; padding: 5rem 0; }
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slider .slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; animation: heroFade 18s infinite ease-in-out; animation-fill-mode: both;
}
.hero-slider .slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(48,26,13,0.86) 0%, rgba(20,74,38,0.55) 55%, rgba(181,87,43,0.42) 100%); }
.hero-slider .slide.s1 { background-image: url('../assets/photos/djenne-mosquee.webp'); animation-delay: 0s; }
.hero-slider .slide.s2 { background-image: url('../assets/photos/bandiagara.webp'); animation-delay: -9s; }
@keyframes heroFade { 0%{opacity:1} 45%{opacity:1} 55%{opacity:0} 95%{opacity:0} 100%{opacity:1} }
@media (prefers-reduced-motion: reduce) { .hero-slider .slide{animation:none;opacity:1} .hero-slider .slide.s2{display:none} }
.hero .container { position: relative; z-index: 2; }
.hero .inner { max-width: 640px; }
.hero .eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--space-md); font-weight: 700; }
.hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.5rem); margin-bottom: var(--space-md); }
.hero .lede { font-size: 1.05rem; opacity: 0.92; margin-bottom: var(--space-xl); }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.5rem; border-radius: var(--radius); font-weight: 700; font-size: 0.9rem; transition: all 200ms ease; border: 0; text-transform: uppercase; letter-spacing: 0.03em; }
.btn-primary { background: var(--gold); color: var(--navy-dark) !important; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }

/* ===== Sections ===== */
section { padding: var(--space-3xl) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--space-2xl); }
.eyebrow-s { color: var(--green); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; display: inline-block; margin-bottom: 0.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.section-head h2::after { content: ''; display: block; width: 56px; height: 7px; margin: 0.75rem auto 0; background: repeating-linear-gradient(45deg, var(--terracotta) 0 3px, transparent 3px 8px); border-bottom: 2px solid var(--gold); opacity: 0.7; }
.feature-news .section-head h2::after { opacity: 0.85; }
.section-head p { color: var(--text-soft); margin-top: 0.8rem; }

/* ACCESO RÁPIDO (Quiero) — barra que monta sobre el hero (firma Malí) */
.quick-access { padding: 0 0 var(--space-3xl); position: relative; z-index: 5; margin-top: -4.5rem; }
.qa-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border-top: 4px solid var(--terracotta); padding: 1.4rem 1.6rem 1.6rem; }
.qa-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.1rem; }
.qa-head h2 { font-size: 1.45rem; color: var(--terracotta-dark); margin: 0; }
.qa-motif { flex: 1; height: 10px; background: repeating-linear-gradient(45deg, var(--terracotta) 0 3px, transparent 3px 8px), repeating-linear-gradient(135deg, var(--gold) 0 1px, transparent 1px 8px); opacity: 0.45; border-radius: 2px; }
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.qa-grid a { display: flex; align-items: center; gap: 0.55rem; padding: 0.8rem 0.9rem; color: var(--navy); font-weight: 500; font-size: 0.9rem; line-height: 1.3; border: 1px solid var(--border); border-radius: var(--radius); background: var(--cream); transition: all 180ms ease; }
.qa-grid a::before { content: ''; width: 7px; height: 7px; flex-shrink: 0; background: var(--terracotta); transform: rotate(45deg); transition: background 180ms ease; }
.qa-grid a:hover { background: #fff; border-color: var(--terracotta); color: var(--terracotta-dark); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.qa-grid a:hover::before { background: var(--green); }
@media (max-width: 880px) { .qa-grid { grid-template-columns: repeat(2, 1fr); } .quick-access { margin-top: -2rem; } }
@media (max-width: 520px) { .qa-grid { grid-template-columns: 1fr; } .quick-access { margin-top: 0; } }

/* Actualités de l'Ambassade (À la une) */
.feature-news { background: var(--navy); color: #fff; }
.feature-news .section-head h2 { color: #fff; }
.feature-news .eyebrow-s { color: var(--gold); }
.feature-news .section-head p { color: rgba(255,255,255,0.75); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.news-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); overflow: hidden; transition: all 200ms ease; }
.news-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-3px); }
.news-card .img { aspect-ratio: 16/9; background-size: cover; background-position: center; }
.news-card .body { padding: var(--space-lg); }
.news-card .date { font-size: 0.74rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.news-card h3 { color: #fff; font-size: 1.02rem; margin: 0.4rem 0; }
.news-card p { color: rgba(255,255,255,0.75); font-size: 0.88rem; }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.service-item { display: flex; gap: 0.9rem; padding: var(--space-md); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); border-left: 3px solid var(--green); }
html[dir="rtl"] .service-item { border-left: 1px solid var(--border); border-right: 3px solid var(--green); }
.service-item h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.service-item p { font-size: 0.86rem; color: var(--text-soft); }
.visa-table { width: 100%; border-collapse: collapse; margin: var(--space-md) 0; font-size: 0.9rem; }
.visa-table th, .visa-table td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.visa-table th { background: var(--cream); color: var(--navy); font-weight: 700; }
html[dir="rtl"] .visa-table th, html[dir="rtl"] .visa-table td { text-align: right; }

/* Ambassadeur */
.amb-grid { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-3xl); align-items: center; }
.amb-photo { aspect-ratio: 3/4; background: linear-gradient(180deg, var(--navy), var(--navy-dark)); border-radius: var(--radius); position: relative; box-shadow: var(--shadow-lg); }
.amb-photo .ribbon { position: absolute; top: 0; left: 0; background: var(--gold); color: var(--navy-dark); padding: 0.35rem 0.9rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.amb-photo::after { content: 'FOTO OFICIAL'; position: absolute; bottom: 1rem; left: 1rem; color: rgba(255,255,255,0.4); font-size: 0.66rem; letter-spacing: 0.12em; }
.amb-text .title { color: var(--green); font-weight: 700; margin: 0.3rem 0 1.2rem; }
.amb-text blockquote { border-left: 3px solid var(--gold); padding-left: 1.1rem; font-style: italic; color: var(--text-soft); margin: 1.1rem 0; }
html[dir="rtl"] .amb-text blockquote { border-left: 0; border-right: 3px solid var(--gold); padding-left: 0; padding-right: 1.1rem; }
.signature { font-weight: 700; color: var(--navy); margin-top: var(--space-lg); }

/* Descubrir */
.regard { background: var(--cream); }
.regard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.regard-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; transition: all 200ms ease; }
.regard-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.regard-card .img { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.regard-card .body { padding: var(--space-lg); }
.regard-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.regard-card p { color: var(--text-soft); font-size: 0.88rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.stat { background: #fff; padding: 1.8rem 1.2rem; text-align: center; border-radius: var(--radius); border-bottom: 3px solid var(--red); box-shadow: var(--shadow-sm); }
.stat .num { font-size: 2.1rem; font-weight: 900; color: var(--navy); line-height: 1; }
.stat .lbl { font-size: 0.76rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.5rem; }

/* Contact */
.contact { background: var(--navy); color: #fff; }
.contact .container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: center; }
.contact h2 { color: #fff; }
.contact .intro { opacity: 0.85; margin: var(--space-md) 0 var(--space-lg); }
.contact-info { background: rgba(255,255,255,0.08); padding: var(--space-xl); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.12); }
.contact-info dl { display: grid; grid-template-columns: 110px 1fr; gap: 0.7rem 1rem; font-size: 0.95rem; }
.contact-info dt { color: var(--gold); font-weight: 700; }
.contact-info dd { opacity: 0.92; }

/* Page header (sous-pages) */
.page-header { background: var(--navy); color: #fff; padding: var(--space-2xl) 0; position: relative; }
.page-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: repeating-linear-gradient(135deg, var(--red) 0 14px, var(--green) 14px 28px, var(--gold) 28px 42px); }
.page-header h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-header .crumb { font-size: 0.8rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.page-content { padding: var(--space-3xl) 0; max-width: 860px; margin: 0 auto; }
.page-content h2 { font-size: 1.4rem; margin: var(--space-xl) 0 var(--space-md); color: var(--navy); }
.page-content p { margin-bottom: var(--space-md); color: var(--text); }
.page-content ul { margin: 0 0 var(--space-md) 1.5rem; }
.page-content li { margin-bottom: 0.4rem; }
.placeholder-note { background: var(--cream-soft); border-left: 3px solid var(--gold); padding: var(--space-md); font-size: 0.9rem; color: var(--text-soft); margin: var(--space-md) 0; }

/* Footer */
footer.main { background: var(--navy-dark); color: #fff; padding: var(--space-3xl) 0 var(--space-lg); }
footer.main .grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-2xl); margin-bottom: var(--space-2xl); }
footer.main h4 { color: var(--gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-md); }
footer.main p, footer.main li { font-size: 0.86rem; opacity: 0.8; line-height: 1.7; }
footer.main ul { list-style: none; }
footer.main a { color: #fff; opacity: 0.8; }
footer.main a:hover { opacity: 1; color: var(--gold); }
.footer-brand { display: flex; gap: var(--space-md); align-items: center; margin-bottom: var(--space-md); }
.footer-brand img { width: 50px; }
.footer-brand strong { font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-lg); display: flex; justify-content: space-between; font-size: 0.78rem; opacity: 0.6; flex-wrap: wrap; gap: var(--space-md); }

/* Responsive */
@media (max-width: 980px) {
  .nav-main .container { flex-wrap: wrap; }
  .nav-list { display: none; flex-direction: column; width: 100%; }
  .nav-list.open { display: flex; }
  .nav-list > li { width: 100%; }
  .nav-list .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: 0; background: rgba(0,0,0,0.15); display: none; }
  .nav-list > li.open .dropdown { display: block; }
  .nav-list .dropdown li a { color: #fff; }
  .nav-list .dropdown li a:hover { background: rgba(255,255,255,0.1); color: var(--gold); }
  .menu-toggle { display: block; }
  .hero .inner, .amb-grid, .contact .container { grid-template-columns: 1fr; }
  .amb-grid { gap: var(--space-2xl); }
  .quiero-grid, .news-grid, .regard-grid { grid-template-columns: repeat(2, 1fr); }
  .stats, .services-grid { grid-template-columns: repeat(2, 1fr); }
  footer.main .grid { grid-template-columns: 1fr 1fr; }
  section { padding: var(--space-2xl) 0; }
}
@media (max-width: 560px) {
  .quiero-grid, .news-grid, .regard-grid, .stats, .services-grid { grid-template-columns: 1fr; }
  footer.main .grid { grid-template-columns: 1fr; }
  .header-brand .ministry .country { display: none; }
  .header-brand .ministry .embassy { font-size: 1.05rem; }
  .header-brand img.seal { width: 80px; height: 80px; }
  .header-top { padding: 1rem 0; }
}
