/* ═══════════════════════════════════════════════════════════════════════════════
   ATLASGEO.NET - Styles principaux
   Design : Editorial / Magazine avec accent doré
═══════════════════════════════════════════════════════════════════════════════ */

:root {
    --color-bg: #FAFAF8;
    --color-paper: #FFFFFF;
    --color-surface-warm: #F5F0EB;
    --color-ink: #1A1A1A;
    --color-ink-light: #4A4A4A;
    --color-ink-muted: #8A8A8A;
    --color-accent: #C4A574;
    --color-accent-dark: #A68B5B;
    --color-africa: #E8D4B8;
    --color-border: #E8E4E0;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--color-bg); color: var(--color-ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Header */
header { background: #FFFFFF; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 9999; }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 1.25rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; position: relative; }
.logo { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.logo-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark)); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 28px; height: 28px; fill: white; }
.logo-text { font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; }
.logo-text span { color: var(--color-accent-dark); }

/* Navigation */
.nav-desktop ul { display: flex; list-style: none; gap: 2.5rem; }
.nav-desktop a, .dropdown-toggle, .dropdown-toggle-link { color: var(--color-ink-light); font-weight: 500; font-size: 0.95rem; cursor: pointer; transition: color var(--transition-fast); text-decoration: none; }
.nav-desktop a:hover { color: var(--color-ink); }
.dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 0.4rem; }
.dropdown-toggle::after { content: ''; border: solid var(--color-ink-muted); border-width: 0 2px 2px 0; padding: 3px; transform: rotate(45deg); margin-top: -3px; }
.dropdown-toggle-link { display: flex; align-items: center; gap: 0.3rem; }
.dropdown-toggle-link .dropdown-arrow { transition: transform var(--transition-fast); }
.dropdown:hover .dropdown-toggle-link .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: 100%; left: -1rem; background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 0.75rem 0; min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--transition-normal); box-shadow: var(--shadow-md); margin-top: 1rem; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; }
.dropdown-menu a:hover { background: var(--color-bg); }
.continent-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Search */
.search-form { display: flex; align-items: center; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: 0.4rem 0.5rem 0.4rem 1rem; transition: border-color var(--transition-fast); position: relative; }
.search-form:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(196, 165, 116, 0.1); }
.search-form input { border: none; background: transparent; font-size: 0.9rem; width: 180px; outline: none; font-family: inherit; }
.search-form input::placeholder { color: var(--color-ink-muted); }
.search-form button { background: var(--color-accent); border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; transition: background var(--transition-fast); }
.search-form button:hover { background: var(--color-accent-dark); }

/* Mobile Menu */
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.5rem; z-index: 200; }
.burger span { width: 24px; height: 2px; background: var(--color-ink); transition: all 0.3s; }
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.nav-mobile { display: none; position: fixed; top: 0; left: -100%; width: 300px; height: 100vh; background: var(--color-paper); padding: 6rem 2rem 2rem; transition: left 0.3s; z-index: 150; overflow-y: auto; box-shadow: 10px 0 40px rgba(0,0,0,0.1); }
.nav-mobile.active { left: 0; }
.nav-mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 140; }
.nav-mobile-overlay.active { display: block; }
.nav-mobile > ul > li { border-bottom: 1px solid var(--color-border); }
.nav-mobile > ul > li > a { display: block; padding: 1rem 0; font-weight: 500; }
.nav-mobile .has-submenu > a { display: none; }
.nav-mobile .submenu-header { display: flex; align-items: center; justify-content: space-between; }
.nav-mobile .submenu-header a { display: block; padding: 1rem 0; font-weight: 500; flex: 1; }
.nav-mobile .submenu-toggle { background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--color-ink-light); transition: transform 0.3s ease; }
.nav-mobile .submenu-toggle svg { display: block; }
.nav-mobile .submenu-toggle.active { transform: rotate(180deg); }
.mobile-submenu { display: none; padding: 0 0 1rem 1rem; }
.mobile-submenu.active { display: block; }
.mobile-submenu a { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; color: var(--color-ink-light); }

/* Search Form Mobile */
.search-form-mobile { display: flex; align-items: center; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: 0.4rem 0.5rem 0.4rem 1rem; margin-bottom: 1.5rem; }
.search-form-mobile input { border: none; background: transparent; font-size: 0.95rem; flex: 1; outline: none; font-family: inherit; min-width: 0; }
.search-form-mobile input::placeholder { color: var(--color-ink-muted); }
.search-form-mobile button { background: var(--color-accent); border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; transition: background var(--transition-fast); flex-shrink: 0; }
.search-form-mobile button:hover { background: var(--color-accent-dark); }

/* Hero Section */
.country-hero { background: var(--color-paper); border-bottom: 1px solid var(--color-border); }
.hero-inner { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.breadcrumb { font-size: 0.95rem; color: var(--color-ink-muted); margin-bottom: 2rem; }
.breadcrumb a { color: var(--color-ink-muted); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--color-accent-dark); }
.hero-content { display: grid; grid-template-columns: 1fr 400px; gap: 3rem; align-items: start; }
.hero-title-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.country-identity { display: flex; align-items: flex-start; gap: 2rem; margin-bottom: 1.5rem; }
.flag-thumb { width: 150px; height: 100px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-lg); flex-shrink: 0; }
.flag-thumb img { width: 100%; height: 100%; object-fit: cover; }
.country-title-block h1 { font-family: var(--font-display); font-size: 2.75rem; font-weight: 600; line-height: 1.1; margin-bottom: 0.25rem; }
.country-official-name { font-size: 1.05rem; color: var(--color-ink-light); margin-bottom: 0.75rem; font-style: italic; }
.country-native-name { font-size: 1rem; color: var(--color-ink-muted); margin-bottom: 0.75rem; }
.country-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.country-type-tag { display: inline-flex; align-items: center; padding: 0.35rem 0.8rem; border-radius: var(--radius-xl); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; transition: transform var(--transition-fast), opacity var(--transition-fast); }
.country-type-tag:hover { transform: translateY(-1px); opacity: 0.85; }
.tag-pays { background: #e8f5e9; color: #2e7d32; }
.tag-territoire { background: #fff3e0; color: #ef6c00; }
.country-region-tag { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--color-africa); padding: 0.4rem 1rem; border-radius: var(--radius-xl); font-size: 0.85rem; font-weight: 500; transition: transform var(--transition-fast); }
.country-subregion-tag { background: var(--color-surface-warm); color: var(--color-ink-light); border: 1px solid var(--color-border); }
.country-region-tag:hover { transform: translateY(-1px); }
.country-intro { color: var(--color-ink-light); font-size: 1rem; line-height: 1.85; margin-top: 1rem; }

/* Maps */
.map-stack { display: flex; flex-direction: column; gap: 1rem; }
.map-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: all var(--transition-normal); max-height: 450px; }
.map-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.map-card img { width: 100%; height: auto; max-height: 380px; object-fit: contain; }
.map-header { padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-ink-muted); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.map-header .zoom-hint { font-size: 0.65rem; opacity: 0.7; display: flex; align-items: center; gap: 0.3rem; }
.map-header .zoom-hint svg { width: 12px; height: 12px; fill: currentColor; }
.map-container { background: #f5f0e8; display: flex; align-items: center; justify-content: center; }
.map-container img { width: 100%; height: auto; }
.map-container--locator { height: 160px; overflow: hidden; }
.map-container--locator img { width: 100%; height: 100%; object-fit: contain; background: #d4e4ed; }
.map-footer { padding: 0.6rem 1rem; display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--color-ink-muted); border-top: 1px solid var(--color-border); }

/* Content */
.content-wrapper { max-width: 1400px; margin: 0 auto; padding: 1.5rem 2rem 2rem 2rem; }
.section-nav-wrapper { position: sticky; top: 73px; z-index: 100; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.section-nav-inner { max-width: 1400px; margin: 0 auto; padding: 0.75rem 2rem; }
.section-nav-container { position: relative; display: flex; align-items: center; }
.section-nav { display: flex; gap: 0.5rem; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; padding: 0.25rem 0; -ms-overflow-style: none; scrollbar-width: none; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { padding: 0.5rem 1rem; background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-xl); color: var(--color-ink-light); font-size: 0.85rem; font-weight: 500; transition: all var(--transition-normal); white-space: nowrap; flex-shrink: 0; }
.section-nav a:hover, .section-nav a.active { background: var(--color-ink); color: white; border-color: var(--color-ink); }
.section-nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; background: var(--color-paper); border: 1px solid var(--color-border); border-radius: 50%; cursor: pointer; z-index: 10; display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); }
.section-nav-arrow:hover { background: var(--color-surface-warm); border-color: var(--color-accent); }
.section-nav-arrow svg { width: 18px; height: 18px; fill: var(--color-ink-light); }
.section-nav-arrow--left { left: 0; }
.section-nav-arrow--right { right: 0; }
@media (min-width: 769px) {
    .section-nav-wrapper.has-overflow .section-nav-arrow { display: flex; }
    .section-nav-wrapper.has-overflow .section-nav { margin: 0 45px; }
}

/* Highlights */
.highlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; scroll-margin-top: 140px; }
.highlight-card { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.highlight-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.highlight-card--link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.highlight-card--link:hover { border-color: var(--color-accent); }
.highlight-card--link:hover .highlight-label { color: var(--color-accent); }
.highlight-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.2rem; }
.highlight-label { font-size: 0.75rem; color: var(--color-ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.highlight-rank { font-size: 0.75rem; color: var(--color-accent); margin-top: 0.4rem; font-weight: 500; }

/* Flag Section */
.flag-section { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; }
.flag-display { display: flex; gap: 2rem; align-items: flex-start; }
.flag-large { width: 180px; height: 120px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-lg); flex-shrink: 0; }
.flag-large img { width: 100%; height: 100%; object-fit: cover; }
.flag-description h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.75rem; }
.flag-description p { color: var(--color-ink-light); line-height: 1.7; font-size: 0.95rem; }
.flag-colors { display: flex; gap: 1rem; margin-top: 1rem; }
.color-chip { display: flex; align-items: center; gap: 0.4rem; }
.color-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--color-border); }
.color-name { font-size: 0.8rem; color: var(--color-ink-muted); }

/* Data Sections */
.data-section { margin-bottom: 3rem; scroll-margin-top: 150px; }
.section-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; margin-bottom: 1.25rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--color-accent); display: inline-block; }
.data-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-width: 800px; }
.data-card { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; }
.data-card-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-ink-muted); margin-bottom: 0.875rem; font-weight: 600; }
.data-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); gap: 1rem; }
.data-row:last-child { border-bottom: none; }
.data-row--stack { flex-direction: column; gap: 0.25rem; }
.data-label { color: var(--color-ink-light); font-size: 1rem; font-weight: 600; flex-shrink: 0; max-width: 50%; }
.data-value { font-weight: 400; text-align: right; font-size: 1rem; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.data-row--stack .data-value { text-align: left; font-weight: 400; line-height: 1.6; max-width: 100%; }
.data-label-link { color: var(--color-ink-light); font-weight: 600; border-bottom: 1px dashed rgba(166, 139, 91, 0.4); transition: all var(--transition-normal); display: inline-flex; align-items: center; gap: 0.4rem; font-size: 1rem; }
.data-label-link:hover { color: var(--color-accent-dark); border-bottom-color: var(--color-accent-dark); }
.data-label-link .rank-icon { width: 14px; height: 14px; fill: var(--color-accent); opacity: 0.7; transition: all var(--transition-normal); flex-shrink: 0; }
.data-label-link:hover .rank-icon { opacity: 1; fill: var(--color-accent-dark); }
.data-value-link { color: var(--color-ink); transition: color var(--transition-fast); }
.data-value-link:hover { color: var(--color-accent-dark); }
.data-label-link--list { border-bottom-style: dotted; opacity: 0.85; }
.data-label-link--list:hover { opacity: 1; }
.data-label-link--list .list-icon { width: 14px; height: 14px; fill: var(--color-ink-muted); opacity: 0.5; transition: all var(--transition-normal); flex-shrink: 0; }
.data-label-link--list:hover .list-icon { opacity: 0.8; fill: var(--color-accent-dark); }
.data-value-link--subtle { color: var(--color-ink); text-decoration: none; transition: color var(--transition-fast); }
.data-value-link--subtle:hover { color: var(--color-accent-dark); }
.rank-inline { font-size: 0.75rem; color: var(--color-ink-muted); font-weight: 400; margin-left: 0.3rem; }

/* Modals */
.map-modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; padding: 1rem; }
.map-modal.active { display: flex; }
.map-modal-backdrop { position: absolute; inset: 0; cursor: pointer; }
.map-modal-content { position: relative; max-width: 95vw; max-height: 95vh; }
.map-modal-content img { max-width: 100%; max-height: 90vh; border-radius: var(--radius-md); }
.map-modal-close { position: absolute; top: -40px; right: 0; width: 36px; height: 36px; background: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--color-ink); transition: all var(--transition-normal); }
.map-modal-close:hover { background: var(--color-accent); color: white; }
.map-modal-title { position: absolute; bottom: -40px; left: 0; right: 0; text-align: center; color: white; font-size: 0.9rem; }
.pyramid-modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.95); align-items: center; justify-content: center; padding: 1rem; }
.pyramid-modal.active { display: flex; }
.pyramid-modal-content { position: relative; max-width: 95vw; max-height: 95vh; background: white; border-radius: var(--radius-lg); padding: 1.5rem; }
.pyramid-modal-content img { max-width: 100%; max-height: 80vh; border-radius: var(--radius-md); }
.pyramid-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pyramid-modal-title { font-size: 1.1rem; font-weight: 600; }
.pyramid-modal-close { width: 32px; height: 32px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--color-ink-light); transition: all var(--transition-normal); }
.pyramid-modal-close:hover { background: var(--color-accent); color: white; border-color: var(--color-accent); }
.pyramid-modal-legend { font-size: 0.75rem; color: var(--color-ink-light); margin-top: 1rem; text-align: center; }
.pyramid-btn { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; padding: 0.6rem 0.9rem; background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%); border: 1px dashed var(--color-accent); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--color-accent); cursor: pointer; transition: all var(--transition-normal); }
.pyramid-btn:hover { background: var(--color-accent); color: white; border-style: solid; }
.pyramid-btn:hover svg { fill: white; }

/* Text Modal (pour textes longs) */
.text-modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; padding: 1rem; }
.text-modal.active { display: flex; }
.text-modal-backdrop { position: absolute; inset: 0; cursor: pointer; }
.text-modal-content { position: relative; max-width: 700px; width: 90%; max-height: 85vh; background: var(--color-paper); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.text-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--color-surface-warm); border-bottom: 1px solid var(--color-border); }
.text-modal-title { font-size: 1rem; font-weight: 600; color: var(--color-ink); }
.text-modal-close { width: 32px; height: 32px; background: transparent; border: 1px solid var(--color-border); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--color-ink-light); transition: all var(--transition-normal); }
.text-modal-close:hover { background: var(--color-accent); color: white; border-color: var(--color-accent); }
.text-modal-body { padding: 1.25rem; overflow-y: auto; line-height: 1.8; color: var(--color-ink); font-size: 0.95rem; }

/* Texte long avec troncature */
.data-value-long { position: relative; width: 100%; }
.data-value-long .data-value-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; color: var(--color-ink); word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
.data-expand-btn { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem; padding: 0.3rem 0.6rem; background: var(--color-surface-warm); border: 1px dashed var(--color-border); border-radius: var(--radius-sm); font-size: 0.75rem; color: var(--color-accent); cursor: pointer; transition: all var(--transition-normal); }
.data-expand-btn svg { width: 14px; height: 14px; fill: currentColor; transform: rotate(180deg); }
.data-expand-btn:hover { background: var(--color-accent); color: white; border-style: solid; border-color: var(--color-accent); }

/* Home Hero */
.home-hero { background: linear-gradient(135deg, #f8f6f3 0%, #ede8e0 100%); padding: 4rem 2rem; text-align: center; }
.home-hero .container { max-width: 800px; margin: 0 auto; }
.home-hero h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 600; margin: 1.5rem 0 1rem; line-height: 1.2; }
.home-hero p { color: var(--color-ink-light); font-size: 1.1rem; line-height: 1.8; margin-bottom: 2rem; }
.badge { display: inline-flex; align-items: center; padding: 0.4rem 1rem; border-radius: var(--radius-xl); font-size: 0.85rem; font-weight: 500; background: var(--color-surface-warm); color: var(--color-ink-light); vertical-align: middle; border: 1px solid var(--color-border); }

/* Searchbar */
.searchbar { display: flex; max-width: 500px; margin: 0 auto; background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-xl); overflow: visible; box-shadow: var(--shadow-sm); position: relative; }
.searchbar input { flex: 1; border: none; padding: 0.875rem 1.25rem; font-size: 1rem; font-family: inherit; outline: none; background: transparent; }
.searchbar input::placeholder { color: var(--color-ink-muted); }
.searchbar button { background: var(--color-accent); color: white; border: none; padding: 0.875rem 1.5rem; font-weight: 600; cursor: pointer; transition: background var(--transition-fast); border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
.searchbar button:hover { background: var(--color-accent-dark); }

/* Card Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; transition: all var(--transition-normal); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
a.card { text-decoration: none; color: inherit; }
.card-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-ink-muted); margin-bottom: 0.5rem; font-weight: 600; }
.card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: var(--color-ink-light); font-size: 0.95rem; line-height: 1.6; }
.card .muted { font-size: 0.85rem; color: var(--color-ink-muted); }

/* Continents Grid */
.continents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 1.5rem; }
.continent-card { display: flex; flex-direction: column; background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.75rem; text-decoration: none; color: inherit; transition: all var(--transition-normal); position: relative; overflow: hidden; }
.continent-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--continent-color, var(--color-accent)); }
.continent-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--continent-color, var(--color-accent)); }
.continent-card-header { margin-bottom: 1rem; }
.continent-card-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin: 0; }
.continent-card-description { color: var(--color-ink-light); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.25rem; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.continent-card-stats { display: flex; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); margin-bottom: 1rem; }
.continent-stat { flex: 1; text-align: center; }
.continent-stat-value { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--color-ink); }
.continent-stat-label { font-size: 0.8rem; color: var(--color-ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.continent-card-footer { margin-top: auto; }
.continent-card-link { font-size: 0.9rem; font-weight: 500; color: var(--color-accent-dark); transition: color var(--transition-fast); }
.continent-card:hover .continent-card-link { color: var(--color-ink); }

/* Note */
.note { background: #fef9e7; border: 1px solid #f4d03f; border-radius: var(--radius-md); padding: 1rem 1.25rem; font-size: 0.9rem; color: #7d6608; line-height: 1.6; }

/* Filter Container */
.filter-container { background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.filter-group { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
.filter-group:first-child { padding-top: 0; }
.filter-group:last-child { border-bottom: none; padding-bottom: 0; }
.filter-label { font-size: 0.8rem; color: var(--color-ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.filter-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.filter-bar--scroll { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; -ms-overflow-style: none; scrollbar-width: none; }
.filter-bar--scroll::-webkit-scrollbar { display: none; }
.filter-btn { padding: 0.5rem 1rem; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-xl); font-size: 0.9rem; color: var(--color-ink-light); transition: all var(--transition-fast); cursor: pointer; text-decoration: none; white-space: nowrap; font-weight: 500; }
.filter-btn:hover { border-color: var(--color-accent); color: var(--color-ink); background: var(--color-surface-warm); }
.filter-btn.active { background: var(--color-accent); border-color: var(--color-accent); color: white; }
.filter-simple { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* Classement Table */
.classement-table { width: 100%; border-collapse: collapse; background: var(--color-paper); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.classement-table th { background: var(--color-bg); padding: 1rem 0.75rem; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-ink-muted); font-weight: 600; border-bottom: 1px solid var(--color-border); }
.classement-table th:first-child { width: 50px; padding-right: 0.5rem; }
.classement-table th:nth-child(2) { padding-left: 0.5rem; }
.classement-table th:last-child { text-align: right; }
.classement-table tr { border-bottom: 1px solid var(--color-border); }
.classement-table tr:last-child { border-bottom: none; }
.classement-table tr:hover { background: var(--color-bg); }
.classement-table td { padding: 0.875rem 0.75rem; vertical-align: top; font-size: 0.95rem; }
.classement-table td:first-child { padding-right: 0.5rem; }
.classement-table td:nth-child(2) { padding-left: 0.5rem; }
.classement-table .rank { font-weight: 600; color: var(--color-accent-dark); width: 50px; text-align: left; }
.classement-table .country { display: flex; align-items: flex-start; gap: 0.75rem; }
.classement-table .country img { width: 32px; height: 22px; border-radius: 4px; border: 1px solid var(--color-border); object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.classement-table .country a { color: var(--color-ink); font-weight: 600; word-wrap: break-word; overflow-wrap: break-word; }
.classement-table .country a:hover { color: var(--color-accent-dark); }
.classement-table .value { text-align: right; font-weight: 400; word-wrap: break-word; overflow-wrap: break-word; }

/* Comparaison */
.compare-selector { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.compare-selector h3 { font-size: 0.9rem; color: var(--color-ink-light); margin: 0; font-weight: 600; }
.compare-pills { flex: 1; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.compare-pill { display: inline-flex; align-items: center; gap: 0.5rem; background: #34495e; color: white; padding: 0.4rem 0.75rem; border-radius: var(--radius-xl); font-size: 0.85rem; font-weight: 500; }
.compare-pill button { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.7); font-size: 1.1rem; line-height: 1; padding: 0; margin-left: 0.25rem; }
.compare-pill button:hover { color: white; }
.btn-compare { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--color-accent); color: white; padding: 0.65rem 1.25rem; border-radius: var(--radius-xl); font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: all var(--transition-fast); text-decoration: none; }
.btn-compare:hover:not(:disabled) { background: var(--color-accent-dark); transform: translateY(-1px); }
.btn-compare:disabled { background: #bdc3c7; cursor: not-allowed; transform: none; }
.card[data-slug].selected { border-color: var(--color-accent); background: rgba(196, 165, 116, 0.08); box-shadow: 0 0 0 2px var(--color-accent); }
.card[data-slug].selected .card-title { color: var(--color-accent-dark); }
.compare-floating-bar { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--color-border); padding: 1rem 1.5rem; display: none; justify-content: center; align-items: center; gap: 1.5rem; z-index: 100; box-shadow: 0 -4px 20px rgba(0,0,0,0.1); }
.compare-floating-bar.visible { display: flex; }
.compare-floating-bar .selected-info { font-size: 0.95rem; color: var(--color-ink-light); }
.compare-floating-bar .selected-info strong { color: var(--color-ink); }
.compare-floating-bar .btn-compare { padding: 0.75rem 1.5rem; font-size: 1rem; }
body.has-floating-bar .content-wrapper { padding-bottom: 100px; }
.compare-wrapper { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; border: 1px solid var(--color-border); }
.compare-scroll { overflow-x: auto; max-height: 80vh; overflow-y: auto; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.compare-table thead { position: sticky; top: 0; z-index: 20; }
.compare-table th { background: #2c3e50; color: white; padding: 1rem 0.75rem; text-align: center; font-weight: 600; font-size: 0.9rem; border-bottom: 2px solid #1a252f; }
.compare-table th:first-child { text-align: left; background: #34495e; min-width: 220px; position: sticky; left: 0; z-index: 25; }
.compare-table th .flag-img { width: 36px; height: 24px; border-radius: 3px; object-fit: cover; margin-bottom: 0.35rem; display: block; margin-left: auto; margin-right: auto; border: 1px solid rgba(255,255,255,0.2); }
.compare-table .category-row td { background: #34495e; padding: 0.75rem 1rem; font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: white; border-top: none; }
.compare-table .group-row td { background: #ecf0f1; padding: 0.5rem 1rem 0.5rem 1.5rem; font-weight: 600; font-size: 0.8rem; color: #7f8c8d; border-top: 1px solid #bdc3c7; }
.compare-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid #eee; vertical-align: top; background: white; }
.compare-table td:first-child { background: #fafafa; font-weight: 500; color: #34495e; position: sticky; left: 0; z-index: 5; border-right: 1px solid #e0e0e0; }
.compare-table tbody tr:hover td { background: #f8f9fa; }
.compare-table tbody tr:hover td:first-child { background: #f0f0f0; }
.compare-table .country-col { text-align: center; min-width: 150px; max-width: 220px; }
.compare-table .country-col.best { background: #d5f5e3 !important; font-weight: 600; }
.compare-table .rank-info { font-size: 0.7rem; color: #95a5a6; display: block; margin-top: 0.25rem; }
.compare-table .no-data { color: #bdc3c7; font-style: italic; }
.compare-table .value-long { font-size: 0.8rem; line-height: 1.5; text-align: left; max-height: 120px; overflow-y: auto; }
.compare-table .unit-info { color: #95a5a6; font-size: 0.8rem; font-weight: 400; }
.compare-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.compare-actions .btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: var(--radius-xl); font-weight: 600; text-decoration: none; transition: all var(--transition-fast); border: none; cursor: pointer; }
.compare-actions .btn-primary { background: var(--color-accent); color: white; }
.compare-actions .btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-1px); }

/* Search Results */
.search-results { margin-top: 2rem; }
.search-results h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1rem; color: var(--color-ink-light); }
.search-result-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 0.75rem; transition: all var(--transition-fast); }
.search-result-item:hover { box-shadow: var(--shadow-sm); border-color: var(--color-accent); }
.search-result-item img { width: 48px; height: 32px; border-radius: 4px; object-fit: cover; border: 1px solid var(--color-border); }
.search-result-item .info { flex: 1; }
.search-result-item .info h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.search-result-item .info h4 a { color: var(--color-ink); }
.search-result-item .info h4 a:hover { color: var(--color-accent-dark); }
.search-result-item .info span { font-size: 0.85rem; color: var(--color-ink-muted); }
.no-results { text-align: center; padding: 3rem; color: var(--color-ink-muted); }

/* Autocomplete */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}
.autocomplete-dropdown.active { display: block; }

/* Pour la searchbar homepage, étendre le dropdown */
.searchbar .autocomplete-dropdown {
    left: 0;
    right: 0;
    min-width: 100%;
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}
.autocomplete-item:first-child { border-radius: 12px 12px 0 0; }
.autocomplete-item:last-child { border-bottom: none; border-radius: 0 0 12px 12px; }
.autocomplete-item:only-child { border-radius: 12px; }
.autocomplete-item:hover,
.autocomplete-item.active { background: #f8f9fa; }

.autocomplete-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.autocomplete-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
}
.autocomplete-item-name mark {
    background: #fff3cd;
    color: inherit;
    padding: 0;
    border-radius: 2px;
}

.autocomplete-item-region {
    font-size: 0.8rem;
    color: #6c757d;
}

.autocomplete-item-type {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: 12px;
}

.autocomplete-type-pays {
    background: #e8f4fd;
    color: #1976d2;
}

.autocomplete-type-territoire {
    background: #f3e8fd;
    color: #7b1fa2;
}

.autocomplete-empty {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    border-radius: 12px;
}

/* Static Pages */
.static-content { max-width: 800px; margin: 0 auto; }
.static-content h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1.5rem; }
.static-content h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 2rem 0 1rem; }
.static-content p { color: var(--color-ink-light); line-height: 1.8; margin-bottom: 1rem; }
.static-content ul { margin: 1rem 0 1rem 1.5rem; }
.static-content li { color: var(--color-ink-light); line-height: 1.8; margin-bottom: 0.5rem; list-style: disc; }
.static-content a { color: var(--color-accent-dark); text-decoration: underline; }
.static-content a.country-tag { text-decoration: none; color: var(--color-ink); }

/* Error Pages */
.error-page { text-align: center; padding: 4rem 2rem; }
.error-page h1 { font-family: var(--font-display); font-size: 6rem; color: var(--color-accent); margin-bottom: 1rem; }
.error-page h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1rem; }
.error-page p { color: var(--color-ink-light); margin-bottom: 2rem; }
.error-page a { display: inline-block; padding: 0.75rem 1.5rem; background: var(--color-accent); color: white; border-radius: var(--radius-xl); font-weight: 500; transition: background var(--transition-fast); }
.error-page a:hover { background: var(--color-accent-dark); }

/* Footer */
footer { background: var(--color-ink); color: white; padding: 4rem 2rem 2rem; margin-top: 4rem; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand .logo-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
.footer-brand .logo-text span { color: var(--color-accent); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; line-height: 1.6; }
.footer-column h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; color: rgba(255,255,255,0.4); }
.footer-column h4 a.footer-title-link { color: rgba(255,255,255,0.4); text-decoration: none; transition: color var(--transition-fast); }
.footer-column h4 a.footer-title-link:hover { color: rgba(255,255,255,0.7); }
.footer-column li { margin-bottom: 0.6rem; }
.footer-column a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color var(--transition-fast); }
.footer-column a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.footer-copyright { color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.footer-legal a:hover { color: white; }

/* Responsive */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; }
    .map-stack { flex-direction: row; }
    .map-stack .map-card { flex: 1; }
    .highlight-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Conflicts Page */
.page-header { background: var(--color-surface); padding: 2rem; border-radius: var(--radius-md); margin-bottom: 2rem; position: relative; z-index: 1; }
.page-intro { font-size: 1.1rem; color: var(--color-ink-light); line-height: 1.7; margin-bottom: 1rem; }
.page-meta { font-size: 0.85rem; color: var(--color-ink-muted); margin-bottom: 0; }

.conflicts-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-accent-dark);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-ink-muted);
}

.conflicts-section {
    margin-bottom: 3rem;
}

.conflicts-section h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-ink);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

.conflict-card {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-border);
    transition: box-shadow var(--transition-fast);
}

.conflict-card:hover {
    box-shadow: var(--shadow-sm);
}

.conflict-high { border-left-color: #dc3545; }
.conflict-medium { border-left-color: #fd7e14; }
.conflict-low { border-left-color: #ffc107; }

.conflict-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.conflict-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-ink);
    margin: 0;
}

.conflict-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 20px;
    background: var(--color-surface);
    color: var(--color-ink-muted);
    white-space: nowrap;
}

.conflict-description {
    font-size: 0.9rem;
    color: var(--color-ink-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.conflict-countries {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.conflict-label {
    font-size: 0.75rem;
    color: var(--color-ink-muted);
    margin-right: 0.25rem;
    width: 100%;
}

.country-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 4px 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-ink);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.country-tag:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    text-decoration: none;
}

.conflicts-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    background: var(--color-surface);
    border-radius: var(--radius-md);
}

/* Toll / Bilan */
.conflict-toll {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1rem 0;
}

.toll-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.toll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.toll-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--color-paper);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-border);
}

.toll-flag {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.toll-label {
    font-size: 0.75rem;
    color: var(--color-ink-muted);
    margin-bottom: 0.25rem;
}

.toll-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
}

.toll-detail {
    font-size: 0.75rem;
    color: var(--color-ink-muted);
}

.toll-civilians {
    font-size: 0.85rem;
    color: var(--color-ink-light);
    line-height: 1.5;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.toll-civilians.toll-warning {
    background: #fff3cd;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border-top: none;
    margin-top: 0.5rem;
    color: #856404;
}

.toll-summary {
    font-size: 0.9rem;
    color: var(--color-ink-light);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .header-inner { padding: 1rem; flex-wrap: nowrap; justify-content: space-between; }
    .nav-desktop, .search-form { display: none; }
    .burger { display: flex; flex-shrink: 0; }
    .logo { position: absolute; left: 50%; transform: translateX(-50%); }
    .nav-mobile { display: block; }
    .hero-inner { padding: 1.5rem 1rem; }
    .hero-content { grid-template-columns: 1fr; }
    .country-identity { flex-direction: column; gap: 1rem; }
    .country-title-block h1 { font-size: 1.75rem; word-wrap: break-word; overflow-wrap: break-word; }
    .country-official-name { font-size: 0.95rem; word-wrap: break-word; }
    .country-tags { gap: 0.4rem; }
    .country-type-tag { font-size: 0.8rem; padding: 0.3rem 0.6rem; }
    .country-region-tag { font-size: 0.85rem; padding: 0.3rem 0.7rem; }
    .map-stack { flex-direction: column; }
    .flag-display { flex-direction: column; }
    .data-grid { grid-template-columns: 1fr; }
    .data-row { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
    .data-value { text-align: left; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
    .data-label { font-size: 0.95rem; }
    .highlight-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .highlight-card { padding: 1rem; }
    .highlight-value { font-size: 1.25rem; word-wrap: break-word; overflow-wrap: break-word; }
    .highlight-label { font-size: 0.8rem; }
    .highlight-rank { font-size: 0.8rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .section-nav-wrapper { top: 57px; }
    .section-nav-inner { padding: 0.5rem 1rem; }
    .section-nav a { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
    .content-wrapper { padding: 1rem; }
    .map-modal-close { top: 10px; right: 10px; width: 44px; height: 44px; font-size: 1.8rem; }
    .conflicts-stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .stat-number { font-size: 1.25rem; }
    .stat-label { font-size: 0.8rem; }
    .stat-card { padding: 0.75rem 0.5rem; }
    .conflict-header { flex-direction: column; gap: 0.5rem; }
    .page-header { padding: 1rem; }
    .page-intro { font-size: 0.95rem; }
    .conflict-card { padding: 1rem; }
    .conflict-description { font-size: 0.9rem; }
    .country-tag { font-size: 0.85rem; padding: 3px 8px; }
    .toll-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .toll-item { padding: 0.5rem; }
    .toll-number { font-size: 0.9rem; }
    .continents-grid { grid-template-columns: 1fr; }
    .continent-card { padding: 1.25rem; }
    .continent-card-title { font-size: 1.25rem; }
    .continent-stat-value { font-size: 1.25rem; }
    .filter-container { padding: 1rem; }
    .filter-group { grid-template-columns: 1fr; gap: 0.5rem; }
    .filter-label { margin-bottom: 0.25rem; font-size: 0.85rem; }
    .filter-btn { font-size: 0.85rem; padding: 0.45rem 0.9rem; }
    .classement-table { table-layout: auto; }
    .classement-table th { font-size: 0.8rem; }
    .classement-table th, .classement-table td { padding: 0.7rem 0.4rem; }
    .classement-table th:first-child, .classement-table td:first-child { width: 40px; padding-right: 0.25rem; }
    .classement-table th:nth-child(2), .classement-table td:nth-child(2) { padding-left: 0.25rem; }
    .classement-table td { font-size: 0.9rem; }
    .classement-table .rank { width: 40px; }
    .classement-table .country { flex-wrap: nowrap; gap: 0.5rem; }
    .classement-table .country img { width: 28px; height: 19px; }
    .classement-table .value { word-wrap: break-word; overflow-wrap: break-word; max-width: none; white-space: normal; }
    .breadcrumb { font-size: 0.9rem; line-height: 1.5; }
    /* Comparaison responsive */
    .compare-selector { flex-direction: column; align-items: stretch; }
    .compare-floating-bar { flex-direction: column; gap: 0.75rem; padding: 1rem; }
    .compare-floating-bar .btn-compare { width: 100%; justify-content: center; }
    .compare-table th, .compare-table td { padding: 0.5rem; font-size: 0.8rem; }
    .compare-table th:first-child, .compare-table td:first-child { min-width: 140px; }
    .compare-table .country-col { min-width: 110px; }
    .compare-table th .flag-img { width: 28px; height: 19px; }
    .compare-scroll { max-height: 70vh; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0.75rem 1rem; gap: 0.5rem; }
    .highlight-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .highlight-card { padding: 0.75rem; }
    .highlight-value { font-size: 1.1rem; }
    .highlight-label { font-size: 0.8rem; }
    .highlight-rank { font-size: 0.8rem; }
    .logo-text { font-size: 1.4rem; }
    .logo-icon { width: 36px; height: 36px; }
    .logo-icon svg { width: 20px; height: 20px; }
    .stat-number { font-size: 1.1rem; }
    .stat-label { font-size: 0.8rem; }
    .conflicts-section h2 { font-size: 1.1rem; }
    .country-title-block h1 { font-size: 1.5rem; }
    .country-official-name { font-size: 0.9rem; }
    .hero-title-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .data-card { padding: 1rem; }
    .data-card-title { font-size: 0.8rem; margin-bottom: 0.75rem; }
    .data-row { padding: 0.4rem 0; }
    .data-label { font-size: 0.9rem; }
    .data-value { font-size: 0.9rem; line-height: 1.5; }
    .data-value-long .data-value-text { font-size: 0.85rem; -webkit-line-clamp: 2; }
    .data-expand-btn { font-size: 0.8rem; padding: 0.25rem 0.5rem; }
    .section-nav-wrapper { top: 53px; }
    .section-nav a { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
    .section-title { font-size: 1.2rem; }
    .breadcrumb { font-size: 0.85rem; margin-bottom: 1rem; }
    .flag-thumb { width: 100px; height: 67px; }
    .country-tags { flex-wrap: wrap; }
    .country-type-tag { font-size: 0.8rem; padding: 0.25rem 0.5rem; }
    .country-region-tag { font-size: 0.8rem; padding: 0.25rem 0.6rem; }
    .content-wrapper { padding: 0.75rem; }
    .nav-mobile { width: 280px; padding: 5rem 1.5rem 2rem; }
    .classement-table th { font-size: 0.8rem; }
    .classement-table th, .classement-table td { padding: 0.6rem 0.35rem; }
    .classement-table th:first-child, .classement-table td:first-child { width: 35px; padding-right: 0.2rem; }
    .classement-table th:nth-child(2), .classement-table td:nth-child(2) { padding-left: 0.2rem; }
    .classement-table td { font-size: 0.85rem; }
    .classement-table .rank { width: 35px; font-size: 0.85rem; }
    .classement-table .country { gap: 0.4rem; }
    .classement-table .country img { width: 24px; height: 16px; }
    .classement-table .country a { font-size: 0.85rem; }
    .classement-table .value { font-size: 0.85rem; }
}

/* iPhone SE - 375px */
@media (max-width: 375px) {
    .header-inner { padding: 0.6rem 0.75rem; }
    .logo-text { font-size: 1.25rem; }
    .logo-icon { width: 34px; height: 34px; }
    .logo-icon svg { width: 18px; height: 18px; }
    .country-title-block h1 { font-size: 1.4rem; line-height: 1.2; }
    .country-official-name { font-size: 0.85rem; line-height: 1.4; }
    .highlight-grid { gap: 0.4rem; }
    .highlight-card { padding: 0.6rem 0.5rem; }
    .highlight-value { font-size: 1rem; }
    .highlight-label { font-size: 0.8rem; }
    .highlight-rank { font-size: 0.8rem; }
    .data-card { padding: 0.85rem; }
    .data-label { font-size: 0.85rem; max-width: 100%; }
    .data-value { font-size: 0.85rem; }
    .section-nav-wrapper { top: 52px; }
    .section-nav a { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
    .breadcrumb { font-size: 0.85rem; }
    .flag-thumb { width: 90px; height: 60px; }
    .country-tags { gap: 0.3rem; }
    .country-type-tag { font-size: 0.8rem; padding: 0.2rem 0.4rem; }
    .country-region-tag { font-size: 0.8rem; padding: 0.2rem 0.5rem; }
    .nav-mobile { width: 270px; }
    .filter-container { padding: 0.75rem; }
    .filter-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
    .filter-label { font-size: 0.8rem; min-width: auto; }
    .classement-table th { font-size: 0.8rem; }
    .classement-table th, .classement-table td { padding: 0.5rem 0.3rem; }
    .classement-table th:first-child, .classement-table td:first-child { width: 32px; padding-right: 0.15rem; }
    .classement-table th:nth-child(2), .classement-table td:nth-child(2) { padding-left: 0.15rem; }
    .classement-table td { font-size: 0.85rem; }
    .classement-table .rank { width: 32px; font-size: 0.85rem; }
    .classement-table .country { gap: 0.35rem; }
    .classement-table .country img { width: 22px; height: 15px; }
    .classement-table .country a { font-size: 0.85rem; }
    .classement-table .value { font-size: 0.8rem; }
}

/* Very small screens - 360px */
@media (max-width: 360px) {
    .header-inner { padding: 0.5rem 0.6rem; }
    .logo-text { font-size: 1.15rem; }
    .logo-icon { width: 30px; height: 30px; }
    .logo-icon svg { width: 16px; height: 16px; }
    .burger span { width: 20px; }
    .static-content { padding: 0; }
    .page-header { padding: 0.75rem; margin-bottom: 1rem; border-radius: var(--radius-sm); }
    .page-intro { font-size: 0.9rem; }
    .conflicts-stats { gap: 0.35rem; }
    .stat-card { padding: 0.5rem 0.25rem; }
    .stat-number { font-size: 1rem; }
    .stat-label { font-size: 0.8rem; }
    .conflict-card { padding: 0.75rem; margin-bottom: 0.75rem; }
    .conflict-header h3 { font-size: 0.95rem; }
    .conflict-badge { font-size: 0.8rem; padding: 3px 6px; }
    .conflict-description { font-size: 0.85rem; }
    .country-tag { font-size: 0.8rem; padding: 2px 6px; }
    .conflicts-section h2 { font-size: 1rem; }
    .toll-grid { grid-template-columns: 1fr; }
    .toll-civilians { font-size: 0.85rem; }
    .toll-summary { font-size: 0.85rem; }
    .country-title-block h1 { font-size: 1.25rem; }
    .country-official-name { font-size: 0.8rem; }
    .highlight-grid { gap: 0.35rem; }
    .highlight-card { padding: 0.5rem; }
    .highlight-value { font-size: 0.95rem; }
    .highlight-label { font-size: 0.8rem; }
    .highlight-rank { font-size: 0.8rem; margin-top: 0.2rem; }
    .data-card { padding: 0.65rem; }
    .data-label { font-size: 0.85rem; }
    .data-value { font-size: 0.85rem; }
    .section-nav a { padding: 0.25rem 0.4rem; font-size: 0.8rem; }
    .section-title { font-size: 1rem; }
    .nav-mobile { width: 250px; padding: 4.5rem 1rem 2rem; }
    .nav-mobile > ul > li > a { padding: 0.75rem 0; font-size: 0.9rem; }
    .mobile-submenu a { padding: 0.5rem 0; font-size: 0.85rem; }
    .content-wrapper { padding: 0.4rem; }
    .hero-inner { padding: 0.75rem 0.6rem; }
    .breadcrumb { font-size: 0.8rem; margin-bottom: 0.6rem; }
    .classement-table th { font-size: 0.8rem; }
    .classement-table th, .classement-table td { padding: 0.4rem 0.25rem; }
    .classement-table th:first-child, .classement-table td:first-child { width: 28px; padding-right: 0.1rem; }
    .classement-table th:nth-child(2), .classement-table td:nth-child(2) { padding-left: 0.1rem; }
    .classement-table td { font-size: 0.8rem; }
    .classement-table .rank { width: 28px; font-size: 0.8rem; }
    .classement-table .country { gap: 0.3rem; }
    .classement-table .country img { width: 20px; height: 14px; }
    .classement-table .country a { font-size: 0.8rem; }
    .classement-table .value { font-size: 0.8rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Introduction pays avec "Voir plus / Voir moins"
═══════════════════════════════════════════════════════════════════════════════ */

.country-intro-wrapper { position: relative; }
.country-intro--truncated { max-height: 300px; overflow: hidden; position: relative; }
.country-intro--truncated::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50px; background: linear-gradient(to bottom, transparent, var(--color-paper)); pointer-events: none; }
.country-intro--expanded { max-height: none !important; }
.country-intro--expanded::after { display: none; }

.intro-toggle-btn { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 16px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-ink-light); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); }
.intro-toggle-btn:hover { background: var(--color-surface-warm); color: var(--color-ink); }
.intro-toggle-btn svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.3s ease; }
.intro-toggle-btn .intro-toggle-less { display: none; }
.intro-toggle-btn--expanded .intro-toggle-more { display: none; }
.intro-toggle-btn--expanded .intro-toggle-less { display: inline; }
.intro-toggle-btn--expanded svg { transform: rotate(180deg); }

/* ═══════════════════════════════════════════════════════════════════════════════
   Bouton retour en haut
═══════════════════════════════════════════════════════════════════════════════ */

.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%; background: var(--color-accent); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; z-index: 1000; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-accent-dark); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.back-to-top:active { transform: translateY(-1px); }
.back-to-top svg { width: 24px; height: 24px; fill: currentColor; }

/* Responsive pour les nouvelles fonctionnalités */
@media (max-width: 768px) {
    .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
    .back-to-top svg { width: 20px; height: 20px; }
    .country-intro--truncated { max-height: 240px; }
    .intro-toggle-btn { font-size: 0.85rem; padding: 6px 12px; }
}

@media (max-width: 480px) {
    .back-to-top { bottom: 15px; right: 15px; width: 40px; height: 40px; }
    .back-to-top svg { width: 18px; height: 18px; }
    .country-intro--truncated { max-height: 200px; }
}
