/* =====================================================
   AGRO REAL ESTATE AFRICA — Charte graphique
   ===================================================== */

:root {
  /* Couleurs principales */
  --bleu:        #0B1F3A;
  --bleu-clair:  #132a4d;
  --vert:        #2E7D32;
  --vert-fonce:  #1B5E20;
  --or:          #C8A951;
  --or-clair:    #E0C878;

  /* Neutres */
  --gris-clair:  #F5F7FA;
  --gris-moyen:  #E2E8F0;
  --gris-texte:  #4A5568;
  --blanc:       #FFFFFF;

  /* Sémantique */
  --success:     #2E7D32;
  --warning:     #E67E22;
  --danger:      #C53030;

  /* Divers */
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 8px 24px rgba(11,31,58,.08);
  --shadow-lg:   0 20px 60px rgba(11,31,58,.15);
  --transition:  .25s ease;
}

/* =====================================================
   Reset & base
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: var(--blanc);
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--bleu);
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; letter-spacing: .5px; text-transform: uppercase; }

a { color: var(--vert); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--vert-fonce); }

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

/* =====================================================
   Boutons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

.btn-primary { background: var(--vert); color: #fff; }
.btn-primary:hover { background: var(--vert-fonce); color:#fff; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(46,125,50,.3); }

.btn-or { background: var(--or); color: var(--bleu); }
.btn-or:hover { background: var(--or-clair); color: var(--bleu); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--bleu); border-color: var(--bleu); }
.btn-outline:hover { background: var(--bleu); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: #fff; color: var(--bleu); border-color: #fff; }

.btn-link { background: none; border: none; color: rgba(255,255,255,.8); padding: .5rem; }
.btn-link:hover { color: #fff; }

/* =====================================================
   Header
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bleu);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

/* Topbar */
.topbar {
  background: rgba(0,0,0,.2);
  font-size: .82rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: .5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-slogan { opacity: .85; font-style: italic; }
.topbar-pays { display: flex; gap: 1rem; }
.topbar-pays a {
  color: rgba(255,255,255,.75);
  font-weight: 600;
  letter-spacing: .3px;
}
.topbar-pays a:hover { color: var(--or); }

/* Navigation principale */
.nav-wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--or);
  color: var(--bleu);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.5px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-family: 'Montserrat'; font-size: .95rem; letter-spacing: .5px; }
.logo-text em {
  font-style: normal;
  font-size: .7rem;
  letter-spacing: 3px;
  color: var(--or);
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: space-between;
}
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}
.main-nav a {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  font-size: .92rem;
  padding: .5rem 0;
  position: relative;
}
.main-nav a:hover { color: var(--or); }

.has-sub { position: relative; }
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .6rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  list-style: none;
}
.submenu a {
  display: block;
  padding: .7rem 1rem;
  color: var(--bleu);
  font-size: .9rem;
  border-radius: var(--radius-sm);
}
.submenu a:hover { background: var(--gris-clair); color: var(--vert); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }

/* Burger mobile */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  flex-direction: column;
  gap: 5px;
}
.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

/* =====================================================
   Flash / alertes
   ===================================================== */
.flash-container {
  max-width: 1300px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}
.alert {
  padding: .9rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: .8rem;
  font-size: .92rem;
  border-left: 4px solid;
}
.alert-success { background: #E8F5E9; color: var(--vert-fonce); border-color: var(--success); }
.alert-error   { background: #FFEBEE; color: var(--danger); border-color: var(--danger); }
.alert-warning { background: #FFF3E0; color: #7A3F00; border-color: var(--warning); }
.alert-info    { background: #E3F2FD; color: #0D47A1; border-color: #1976D2; }

/* =====================================================
   Layout sections
   ===================================================== */
.site-main { min-height: 60vh; }

.section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--or);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

/* =====================================================
   Cartes catégories
   ===================================================== */
.categorie-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--gris-clair);
  border-radius: var(--radius);
  padding: 2rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  min-height: 180px;
}
.categorie-card:hover { background: var(--bleu); color: #fff; transform: translateY(-6px); }
.categorie-card:hover h3 { color: #fff; }
.cat-icon { font-size: 2.5rem; margin-bottom: .8rem; }
.categorie-card h3 { font-size: 1rem; color: var(--bleu); }

/* Cartes pays */
.pays-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.6rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--or);
  transition: all var(--transition);
}
.pays-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pays-card h3 { color: var(--bleu); margin-bottom: .5rem; }
.pays-card p { color: var(--gris-texte); font-size: .9rem; }

/* Cartes annonces */
.card-annonce {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}
.card-annonce:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-annonce img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.2rem; }
.card-body h3 { font-size: 1.05rem; margin-bottom: .5rem; color: var(--bleu); }
.card-body .prix { color: var(--vert); font-weight: 700; font-family: 'Montserrat'; }
.card-body .meta { font-size: .82rem; color: var(--gris-texte); margin-top: .3rem; }

/* =====================================================
   Badges
   ===================================================== */
.badge {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-right: .3rem;
}
.badge-cat   { background: var(--vert); color: #fff; }
.badge-pays  { background: var(--or); color: var(--bleu); }
.badge-vert  { background: #E8F5E9; color: var(--vert-fonce); }
.badge-or    { background: #FFF3E0; color: #7A3F00; }

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  background: var(--bleu);
  color: rgba(255,255,255,.85);
  margin-top: 4rem;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col h4 {
  color: var(--or);
  font-size: .85rem;
  margin-bottom: 1rem;
  letter-spacing: 1.5px;
}
.footer-col p, .footer-col li, .footer-col a {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
}
.footer-col a:hover { color: var(--or); }
.footer-col ul { list-style: none; }
.footer-slogan { font-style: italic; margin-bottom: .8rem; color: var(--or) !important; }
.footer-pitch { font-size: .85rem; }

.footer-contact li { margin-bottom: .4rem; }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--or); color: var(--bleu); }

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.footer-legal { display: flex; gap: 1rem; list-style: none; }
.footer-legal a { color: rgba(255,255,255,.55); }
.footer-legal a:hover { color: var(--or); }

/* =====================================================
   Utilitaires
   ===================================================== */
.text-center { text-align: center; }
.text-or    { color: var(--or); }
.text-vert  { color: var(--vert); }
.text-rouge { color: var(--danger); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 2rem; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .burger { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: var(--bleu);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    transition: right .3s ease;
    overflow-y: auto;
    z-index: 200;
  }
  .main-nav.open { right: 0; }
  .main-nav > ul { flex-direction: column; align-items: flex-start; width: 100%; gap: .5rem; }
  .main-nav > ul a { font-size: 1rem; padding: .8rem 0; display: block; width: 100%; }
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255,255,255,.05);
    box-shadow: none;
    margin-top: .3rem;
    padding: .3rem;
  }
  .submenu a { color: rgba(255,255,255,.85) !important; font-size: .9rem; }
  .nav-actions { flex-direction: column; width: 100%; gap: .5rem; margin-top: 1rem; }
  .nav-actions .btn { width: 100%; }
}

@media (max-width: 640px) {
  .topbar-inner { font-size: .75rem; flex-direction: column; gap: .3rem; text-align: center; }
  .topbar-pays { gap: .6rem; flex-wrap: wrap; justify-content: center; }
  .section { padding: 2.5rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}