/*
Theme Name: WebMed-Immo
Theme URI: https://webmed-immo.fr
Author: WebMed
Author URI: https://webmed.fr
Description: Portail immobilier automatisé avec gestion multi-agences, import XML/API, et système de forfaits. Achat, location et biens professionnels.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: webmed-immo
Tags: real-estate, portal, agencies, listings, search, responsive
*/

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #0A2540;
  --primary-light: #1a3f6f;
  --accent: #E8A020;
  --accent-light: #f5c060;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --shadow: 0 4px 24px rgba(10,37,64,0.10);
  --shadow-hover: 0 12px 40px rgba(10,37,64,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

/* ===== LAYOUT ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { margin-bottom: 0.75rem; }
.section-title p { font-size: 1.125rem; max-width: 600px; margin: 0 auto; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.flex { display: flex; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9375rem;
  border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); color: white; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-light); color: white; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-white { background: transparent; border-color: white; color: white; }
.btn-outline-white:hover { background: white; color: var(--primary); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); background: var(--bg); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.4rem; color: var(--text); }
.form-control {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem; color: var(--text);
  background: white; transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,37,64,0.1);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--primary);
  height: var(--header-height);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-logo {
  font-family: var(--font-display);
  font-size: 1.625rem; font-weight: 700;
  color: white; text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.site-logo span { color: var(--accent); }
.site-logo .logo-icon { font-size: 1.75rem; }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.9375rem;
  transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: white; background: rgba(255,255,255,0.12); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-actions .btn-outline-white { padding: 0.5rem 1rem; font-size: 0.875rem; }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: white; font-size: 1.5rem; padding: 0.25rem;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3b6e 50%, #163e75 100%);
  color: white;
  padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(232,160,32,0.2); border: 1px solid rgba(232,160,32,0.4);
  color: var(--accent-light); border-radius: 100px;
  padding: 0.375rem 1rem; font-size: 0.875rem; font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 { color: white; margin-bottom: 1.25rem; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: rgba(255,255,255,0.8); font-size: 1.125rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3.5rem;
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; color: var(--accent);
  display: block;
}
.hero-stat-label { font-size: 0.875rem; color: rgba(255,255,255,0.65); }

/* ===== SEARCH BOX ===== */
.search-box-wrapper { margin-top: 2.5rem; }
.search-tabs { display: flex; gap: 0.25rem; margin-bottom: 0; }
.search-tab {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(255,255,255,0.15); color: white;
  font-weight: 600; font-size: 0.9375rem; cursor: pointer; border: none;
  transition: background var(--transition);
}
.search-tab.active, .search-tab:hover { background: white; color: var(--primary); }
.search-box {
  background: white; border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-hover);
}
.search-fields { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 0.75rem; align-items: end; }
@media (max-width: 900px) { .search-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .search-fields { grid-template-columns: 1fr; } }
.search-advanced-toggle {
  color: var(--primary); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.25rem;
  background: none; border: none;
}

/* ===== PROPERTY CARD ===== */
.property-card { position: relative; }
.property-card-image {
  position: relative; overflow: hidden;
  height: 220px;
}
.property-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.property-card:hover .property-card-image img { transform: scale(1.05); }
.property-badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: var(--accent); color: white;
  padding: 0.25rem 0.75rem; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.property-badge.location { background: var(--success); }
.property-badge.professional { background: var(--primary); }
.property-badge.premium {
  background: linear-gradient(135deg, #f5c060, #e8a020);
  color: var(--primary);
}
.property-favorite {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: white; border: none; border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform var(--transition);
}
.property-favorite:hover { transform: scale(1.15); }
.property-card-body { padding: 1.25rem; }
.property-price {
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 700;
  color: var(--primary); margin-bottom: 0.375rem;
}
.property-price span { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }
.property-title {
  font-size: 0.9375rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.375rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.property-location { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.875rem; }
.property-location::before { content: '📍'; margin-right: 0.25rem; }
.property-features {
  display: flex; gap: 1rem; flex-wrap: wrap;
  padding-top: 0.875rem; border-top: 1px solid var(--border);
}
.property-feature { font-size: 0.8125rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; }
.property-feature strong { color: var(--text); font-weight: 600; }
.property-card-footer {
  padding: 0.875rem 1.25rem; background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.agency-mini { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-muted); }
.agency-mini img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ===== AGENCY CARD ===== */
.agency-card { text-align: center; padding: 2rem 1.5rem; }
.agency-logo-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  overflow: hidden; margin: 0 auto 1rem;
  border: 3px solid var(--border);
}
.agency-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.agency-card h4 { margin-bottom: 0.25rem; font-size: 1.0625rem; }
.agency-card .city { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.agency-card .listings-count {
  background: var(--bg); border-radius: 100px;
  padding: 0.25rem 0.875rem; font-size: 0.8125rem; font-weight: 600; color: var(--primary);
  display: inline-block; margin-bottom: 1rem;
}

/* ===== BADGES & TAGS ===== */
.tag {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.75rem; border-radius: 100px;
  font-size: 0.8125rem; font-weight: 600;
  background: var(--bg); color: var(--text-muted);
}
.tag-primary { background: rgba(10,37,64,0.1); color: var(--primary); }
.tag-accent { background: rgba(232,160,32,0.15); color: #7a5000; }
.tag-success { background: rgba(16,185,129,0.12); color: #065f46; }
.tag-danger { background: rgba(239,68,68,0.1); color: #b91c1c; }

/* ===== ALERTS ===== */
.alert {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  border-left: 4px solid; margin-bottom: 1rem; font-size: 0.9375rem;
}
.alert-success { background: rgba(16,185,129,0.08); border-color: var(--success); color: #065f46; }
.alert-danger { background: rgba(239,68,68,0.08); border-color: var(--danger); color: #b91c1c; }
.alert-warning { background: rgba(232,160,32,0.1); border-color: var(--accent); color: #7a5000; }
.alert-info { background: rgba(10,37,64,0.07); border-color: var(--primary); color: var(--primary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.page-btn {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: white; color: var(--text); cursor: pointer;
  font-weight: 600; transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ===== SIDEBAR ===== */
.sidebar-widget { background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.sidebar-widget-title {
  padding: 1.125rem 1.5rem; border-bottom: 1px solid var(--border);
  font-size: 1rem; font-weight: 700; color: var(--primary);
  font-family: var(--font-display);
}
.sidebar-widget-body { padding: 1.25rem 1.5rem; }

/* ===== DASHBOARD ===== */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; min-height: calc(100vh - var(--header-height)); }
@media (max-width: 900px) { .dashboard-layout { grid-template-columns: 1fr; } }

.dashboard-sidebar {
  background: white; box-shadow: var(--shadow); border-radius: var(--radius);
  padding: 1.5rem; height: fit-content; position: sticky; top: calc(var(--header-height) + 1rem);
}
.dashboard-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; margin-bottom: 0.25rem;
  transition: all var(--transition);
}
.dashboard-nav a:hover, .dashboard-nav a.active {
  background: rgba(10,37,64,0.07); color: var(--primary);
}
.dashboard-nav a .nav-icon { font-size: 1.125rem; }
.dashboard-nav .nav-section {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); opacity: 0.6;
  padding: 1rem 0 0.5rem; margin-top: 0.5rem;
}
.stat-card { text-align: center; padding: 1.5rem; }
.stat-card .stat-value { font-size: 2.25rem; font-weight: 700; font-family: var(--font-display); color: var(--primary); }
.stat-card .stat-label { font-size: 0.875rem; color: var(--text-muted); }
.stat-card .stat-trend { font-size: 0.8125rem; font-weight: 600; margin-top: 0.25rem; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ===== PLAN CARDS ===== */
.plan-card { border: 2px solid var(--border); text-align: center; padding: 2.5rem 2rem; transition: all var(--transition); }
.plan-card.featured { border-color: var(--accent); position: relative; transform: scale(1.03); }
.plan-card.featured::before {
  content: 'Recommandé';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white;
  padding: 0.25rem 1rem; border-radius: 100px; font-size: 0.75rem; font-weight: 700;
}
.plan-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.plan-price { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--primary); }
.plan-price small { font-size: 1rem; color: var(--text-muted); font-family: var(--font-body); }
.plan-desc { color: var(--text-muted); font-size: 0.9375rem; margin: 1rem 0; }
.plan-features { text-align: left; margin: 1.5rem 0; }
.plan-features li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9375rem; display: flex; align-items: center; gap: 0.5rem; }
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 700; }
.plan-features li.no::before { content: '✗'; color: var(--danger); }

/* ===== PROPERTY DETAIL ===== */
.property-gallery { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.gallery-main { height: 480px; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.gallery-thumb { height: 100px; overflow: hidden; border-radius: var(--radius-sm); cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-thumb:hover img { transform: scale(1.08); }
.property-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.property-feature-item {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 1rem; display: flex; align-items: center; gap: 0.75rem;
}
.property-feature-icon { font-size: 1.5rem; }
.property-feature-info .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.property-feature-info .value { font-weight: 700; color: var(--text); }

/* ===== CONTACT FORM ===== */
.contact-card { background: var(--primary); color: white; border-radius: var(--radius); padding: 2rem; }
.contact-card h4 { color: white; margin-bottom: 0.5rem; }
.contact-card p { color: rgba(255,255,255,0.75); }
.contact-card .form-control { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: white; }
.contact-card .form-control::placeholder { color: rgba(255,255,255,0.5); }
.contact-card .form-control:focus { border-color: var(--accent); background: rgba(255,255,255,0.15); }
.contact-card .form-label { color: rgba(255,255,255,0.9); }

/* ===== AGENCY PAGE ===== */
.agency-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; padding: 3rem 0;
}
.agency-header-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.agency-header-logo {
  width: 100px; height: 100px; border-radius: var(--radius);
  overflow: hidden; border: 3px solid rgba(255,255,255,0.3);
  background: white; flex-shrink: 0;
}
.agency-header-logo img { width: 100%; height: 100%; object-fit: cover; }
.agency-header-info h1 { color: white; font-size: 2rem; margin-bottom: 0.375rem; }
.agency-header-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.agency-header-meta span { color: rgba(255,255,255,0.75); font-size: 0.9375rem; }

/* ===== ADMIN ===== */
.admin-topbar {
  background: var(--primary); color: white; height: 56px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 999;
}
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #0f1e35; padding: 1.5rem 0; }
.admin-nav a {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.75rem 1.5rem; color: rgba(255,255,255,0.65);
  font-size: 0.9375rem; font-weight: 500; transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active { color: white; background: rgba(255,255,255,0.08); border-left: 3px solid var(--accent); }
.admin-content { background: var(--bg); padding: 2rem; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: white; }
th { background: var(--bg); padding: 0.875rem 1.25rem; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); text-align: left; border-bottom: 1px solid var(--border); }
td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(10,37,64,0.02); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ===== FOOTER ===== */
.site-footer { background: var(--primary); color: white; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9375rem; margin-top: 1rem; }
.footer-col h5 { color: white; font-size: 0.9375rem; font-weight: 700; margin-bottom: 1.25rem; font-family: var(--font-body); }
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 0.9375rem; padding: 0.25rem 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { color: rgba(255,255,255,0.5); font-size: 0.875rem; margin: 0; }
.social-links { display: flex; gap: 0.75rem; }
.social-link {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 0.875rem;
  transition: background var(--transition);
}
.social-link:hover { background: var(--accent); color: white; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.p-3 { padding: 1.5rem; } .p-4 { padding: 2rem; }
.w-100 { width: 100%; }
.position-relative { position: relative; }
.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.spinner {
  width: 24px; height: 24px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; padding: 3rem; gap: 1rem; color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-nav, .header-actions .btn-outline-white:not(:last-child) { display: none; }
  .menu-toggle { display: block; }
  .mobile-menu {
    position: fixed; inset: 0; background: var(--primary); z-index: 1500;
    padding: 2rem; transform: translateX(-100%); transition: transform var(--transition);
    overflow-y: auto;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu a { display: block; color: white; padding: 1rem 0; font-size: 1.125rem; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .gallery-main { height: 280px; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===== NOTICE BAND ===== */
.notice-band {
  background: var(--accent); color: white; text-align: center;
  padding: 0.5rem; font-size: 0.875rem; font-weight: 600;
}

/* ===== IMPORT STATUS ===== */
.import-log {
  font-family: var(--font-mono); font-size: 0.8125rem;
  background: #0a1628; color: #a8d8a8;
  border-radius: var(--radius-sm); padding: 1.25rem;
  max-height: 300px; overflow-y: auto;
  line-height: 1.75;
}
.import-log .log-error { color: #f87171; }
.import-log .log-warn { color: #fbbf24; }
.import-log .log-info { color: #60a5fa; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
