@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* ========== GLOBAL ========== */
body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}
/* HEADER TOP */
.header-top {
  background: #ffffff;
  padding: 12px 0;
  font-family: Arial, sans-serif;
}
.header-top .header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-top .logo img {
  height: 75px;
  object-fit: contain;
}
/* Switch langues header */
.lang-switch a, .lang-switch-mobile a {
  font-size: 24px;
  margin-left: 8px;
  text-decoration: none;
  transition: transform 0.2s;
}

.lang-switch a:hover, .lang-switch-mobile a:hover {
  transform: scale(1.2);
}
/* BOUTON DECONNEXION (respect charte : bleu) */
.auth-buttons a {
  padding: 7px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  color: white;
  background: #2196F3; /* bleu pour respecter charte */
  transition: background 0.3s;
}
.auth-buttons a:hover {
  background: #1976D2;
}

/* MENU PRINCIPAL */
nav.menu {
  background: #0d47a1;
  padding: 12px 0;
}
nav.menu .menu-flex {
  display: flex;
  gap: 20px;
  align-items: center;
}
nav.menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}
nav.menu a:hover {
  background: rgba(255,255,255,0.15);
}

/* MOBILE */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #333;
}
@media(max-width:768px) {
  nav.menu {
    display: none;
    flex-direction: column;
    background: #0d47a1;
    position: absolute;
    top: 85px;
    right: 0;
    width: 100%;
    padding: 15px;
    border-radius: 0 0 5px 5px;
    z-index: 999;
  }
  nav.menu.show {
    display: flex;
  }
  nav.menu .menu-flex {
    flex-direction: column;
    gap: 15px;
  }
  .menu-toggle {
    display: block;
  }
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(to right,#0d47a1,#1976d2);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.hero .search-box {
    margin-top: 20px;
}
.hero input {
    padding: 10px;
    width: 60%;
    max-width: 400px;
    border-radius: 5px;
    border: none;
}
.hero button {
    padding: 10px 20px;
    background: #ffc107;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* ========== CATEGORIES ========== */
.categories {
    padding: 50px 0;
    text-align: center;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 20px;
    margin-top: 30px;
}
.category-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 10px;
}
.category-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}
.category-card p {
    margin-top: 10px;
    font-weight: bold;
    color: #0d47a1;
}

/* ========== ANNONCES ========== */
.properties {
    padding: 50px 0;
}
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
    gap: 20px;
}
.property-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 10px;
    text-align: center;
}
.property-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}
.property-card h3 {
    margin: 10px 0;
    color: #0d47a1;
}
.property-card .price {
    color: #0d47a1;
    font-weight: bold;
}
.property-card .location {
    font-size: 0.9em;
    color: #555;
}
.property-card button {
    margin-top: 10px;
    padding: 8px 15px;
    background: #0d47a1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
.property-card button:hover {
    background: #1976d2;
}

/* ========== FOOTER ========== */
.footer {
    background: #111;
    color: white;
    padding: 40px 0;
    text-align: center;
}
.footer ul {
    list-style: none;
    padding: 0;
}
.footer ul li a {
    color: white;
    text-decoration: none;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    nav.menu {
        display: none;
        flex-direction: column;
        background: #0d47a1;
        position: absolute;
        top: 85px;
        right: 0;
        width: 100%;
        padding: 15px;
        border-radius: 0 0 5px 5px;
        z-index: 999;
    }
    nav.menu.active {
        display: flex;
    }
    nav.menu .menu-flex {
        flex-direction: column;
        gap: 15px;
    }
    .menu-toggle {
        display: block;
        font-size: 28px;
        cursor: pointer;
        color: #333;
    }

    .category-grid, .property-grid {
        grid-template-columns: 1fr;
    }
    .hero input {
        width: 70%;
    }
}