@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&display=swap');

:root {
  --beige: #F5F5DC;
  --marine: #002147;
  --marine-dark: #00112A;
  --text: #555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto Condensed', sans-serif;
}

body {
  transition: 0.5s;
  background-color: var(--beige);
  color: var(--text);
}

a {
  text-decoration: none;
}

.header-home {
  background-color: var(--beige);
  position: relative;
}

h1 {
  font-size: 60px;
  font-weight: bold;
  letter-spacing: 1px;
  margin: 35px 0;
  text-transform: capitalize;
  color: var(--marine);
}

/* menu */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--beige);
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  padding: 20px 10%;
  display: flex;
  justify-content: space-between;
  opacity: 0.9;
}

.header-home {
  padding-top: 40px;
}


.logo {
  text-transform: capitalize;
  color: var(--marine);
  font-size: 30px;
  font-weight: bold;
  font-style: italic;
}

header .logo_link {
  display: flex;
  align-items: center;
}

.menu_link {
  margin-left: 60px;
}

.menu_link a {
  margin: 0 10px;
  font-size: 15px;
  color: var(--text);
}

.menu_link a:first-child {
  color: var(--marine);
}

.link_buttons a {
  margin-left: 15px;
}

.link_buttons a:first-child {
  color: var(--marine);
}

.orange_link {
  color: #fff;
  padding: 8px 30px;
  background-color: var(--marine);
  border-radius: 4px;
  text-transform: capitalize;
}

.orange_link:hover {
  background-color: var(--marine-dark);
}

/*home*/
.home {
  margin-top: 50px;
  margin-left: 10%;
  margin-right: 10%;
  display: flex;
  justify-content: space-between;
  height: 500px;
  position: relative;
}

.home .left {
  width: 50%;
  display: flex;
  flex-direction: column;
}

.home .left p {
  margin: 25px 0;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 25px;
}

.home .left .orange_link {
  width: fit-content;
  padding: 12px 50px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.home .right {
  width: 45%;
}

.home .right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.statistiques {
  position: absolute;
  bottom: -50px;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  padding: 20px 10%;
}

.statistiques span {
  text-align: center;
}

.statistiques span h2 {
  color: var(--marine);
  font-size: 25px;
  margin-bottom: 10px;
}

.statistiques span p {
  color: var(--text);
  text-transform: capitalize;
}

/*about*/
.about {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 120px;
  padding: 20px 5%;
}

.about .image {
  width: 55%;
  height: 400px;
}

.about .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about .content {
  width: 40%;
}

.about .content h1 {
  margin: 16px 0;
}

.about .content h2 {
  margin: 15px 0;
  color: var(--marine);
}

.about .content p {
  color: var(--text);
  text-align: justify;
  letter-spacing: 0.5px;
  line-height: 25px;
}

/*choice*/
.why_us {
  padding: 20px 10%;
  display: flex;
  flex-direction: column;
}

.why_us img {
  width: 60px;
}

.list_box {
  width: 100%;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fill, 265px);
  grid-gap: 10px;
}

.list_box .box {
  text-align: center;
  background-color: var(--beige);
  border-radius: 4px;
  padding: 50px 25px;
  margin: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.list_box .box h2 {
  margin: 10px 0;
  color: var(--marine);
  letter-spacing: 1px;
  text-transform: capitalize;
}

.list_box .box p {
  color: var(--text);
}

/*decoration*/
.decoration {
  padding: 20px 10%;
  width: 100%;
}

.deco-list {
  width: 100%;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fill, 31.11%);
  gap: 30px;
}

.deco-list .deco img {
  width: 100%;
  object-fit: cover;
}

.deco-list .deco {
  text-align: center;
  cursor: pointer;
  padding: 10px;
  transition: 0.5s;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.deco-list .deco:hover {
  transform: scale(1.1);
}

.deco-list .deco p {
  margin: 5px 0;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.deco-list .deco span {
  font-size: 15px;
  color: var(--text);
}

.deco-list .deco .orange_link {
  margin-top: 5px;
  border: 1px solid var(--marine);
  letter-spacing: 1px;
  width: 100%;
  transition: 0.5s;
  cursor: pointer;
}

.deco-list .deco .orange_link:hover {
  background-color: transparent;
  color: var(--marine);
}

/*footer*/
footer {
  margin-top: 60px;
  background-color: var(--beige);
  height: auto;
  padding-top: 40px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.footer-content h1 {
  font-size: 50px;
  margin: 10px 0;
  color: var(--marine);
}

.footer-content p {
  max-width: 500px;
  margin: 20px 0;
  letter-spacing: 1px;
  font-size: 15px;
  color: var(--text);
}

.socials {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.socials li {
  margin: 0 20px;
}

.socials a {
  text-decoration: none;
  color: var(--marine);
  font-size: 20px;
  transition: 0.5s;
}

.socials a:hover {
  color: var(--marine-dark);
}

.footer-bottom {
  background-color: var(--marine);
  color: #fff;
  padding: 10px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: capitalize;
}

.footer-bottom span {
  text-transform: uppercase;
  opacity: .6;
  font-weight: 200;
}

.sidebar, #main {
  display: none;
}

/* FORM PAGES */
.form-container {
  max-width: 400px;
  margin: 100px auto;
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-container form {
  display: flex;
  flex-direction: column;
}

.form-container h2 {
  margin-bottom: 20px;
  color: var(--marine);
  text-align: center;
}

.form-container input {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #ccc;
}

.form-container button {
  width: 100%;
  margin-top: 20px;
}

.switch-link {
  margin-top: 15px;
  text-align: center;
}

.switch-link a {
  color: var(--marine);
  text-decoration: underline;
}

/* DASHBOARD */
.dashboard {
  display: flex;
  min-height: 80vh;
  margin: 50px;
}

.sidebar-dashboard {
  width: 200px;
  background: var(--marine);
  padding: 20px;
}

.sidebar-dashboard ul {
  list-style: none;
}

.sidebar-dashboard ul li {
  margin-bottom: 15px;
}

.sidebar-dashboard ul li a {
  color: #fff;
  text-decoration: none;
}

.sidebar-dashboard ul li a:hover {
  text-decoration: underline;
}

.content-dashboard {
  flex: 1;
  padding: 20px;
}

.content-dashboard h2 {
  color: var(--marine);
}
.dashboard-section {
  margin-bottom: 40px;
}

.dashboard-section h2 {
  margin-bottom: 20px;
  color: var(--marine);
}

.infos-box p {
  margin: 5px 0;
}

.annonces-list,
.favoris-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.annonce,
.favori {
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.annonce h3,
.favori h3 {
  margin-bottom: 10px;
}

.annonce p,
.favori p {
  margin-bottom: 10px;
}

.discussion {
  background: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  border-radius: 8px;
}

.discussion h3 {
  margin-bottom: 10px;
}

/* Filtres catalogue */
.filters {
  padding: 40px 10%;
  background: var(--beige);
}

.filters h2 {
  color: var(--marine);
  margin-bottom: 20px;
}

.filters form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.filters input,
.filters select {
  padding: 10px;
  flex: 1;
  min-width: 180px;
  border: 1px solid #ccc;
}

.annonces-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  padding: 40px 10%;
}

.annonce-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  position: relative;
}

.annonce-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: 10px;
}

.annonce-card .like-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.annonce-detail {
  padding: 40px 10%;
  text-align: center;
}

.annonce-detail img {
  max-width: 500px;
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 20px;
}

.annonce-detail h1 {
  margin: 20px 0;
  color: var(--marine);
}

.add-annonce-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.add-annonce-form input,
.add-annonce-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
}

form {
  max-width: 600px;
  margin: 30px auto;
  display: flex;
  flex-direction: column;
}

form label {
  margin: 10px 0 5px;
  font-weight: 600;
  color: #002147; /* bleu marine */
}

form input,
form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus {
  border-color: #f2b807; /* doré */
  outline: none;
}

form button.orange_link {
  width: 150px;
  margin-top: 20px;
  padding: 12px;
  background-color: #f2b807; /* doré */
  border: none;
  color: #002147; /* bleu marine */
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

form button.orange_link:hover {
  background-color: #d1a305;
}

.ads-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.ad-item {
  border: 1px solid #ccc;
  padding: 15px;
  width: 300px;
}

.ad-item img {
  max-width: 100%;
  height: auto;
  display: block;
}

.ads-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.ad-box {
  border: 1px solid #ddd;
  padding: 20px;
  width: 300px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px #ccc;
}

.ad-box h2 {
  margin-top: 0;
  color: #002147; /* bleu marine */
}

.ad-box p {
  color: #333;
}

.ad-box img {
  margin: 10px 0;
  border-radius: 4px;
}

.ad-box button {
  background: #f90; /* orange */
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.ad-box button:hover {
  background: #e58000;
}



/*responsive*/
@media (max-width: 935px) {
  header {
    padding: 20px;
    margin: 0;
    height: auto;
  }

  .link_buttons {
    display: none;
  }

  .menu_link {
    display: none;
  }

  .sidebar, #main {
    display: block;
  }

  .sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: var(--marine);
    overflow-x: hidden;
    padding-top: 60px;
    transition: 0.5s;
    display: flex;
    flex-direction: column;
  }

  .sidebar img, #main img {
    width: 20px;
  }

  .sidebar a {
    padding: 15px;
    font-size: 15px;
    color: #fff;
    transform: 0.3s;
  }

  .sidebar a:hover {
    background-color: var(--marine-dark);
  }

  .sidebar .closebtn {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
  }

  .openbtn img {
    width: 20px;
    margin-right: 10px;
  }

  .openbtn {
    background-color: var(--marine);
    border: 0;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 15px;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.5s;
  }

  .openbtn:hover {
    background-color: var(--marine-dark);
  }
}

@media (max-width: 588px) {
  h1 {
    font-size: 30px;
  }

  .home {
    margin: 25px;
    flex-direction: column-reverse;
    height: auto;
    padding-bottom: 25px;
  }

  .home p, .home h1 {
    margin: 0;
  }

  .home .left, .home .right {
    width: 100%;
    height: fit-content;
  }

  .home .right {
    height: auto;
  }

  .statistiques {
    bottom: -100px;
  }

  .statistiques h2 {
    font-size: 15px;
  }

  .statistiques p {
    font-size: 12px;
  }

  .about {
    flex-direction: column;
  }

  .about .image, .about .content {
    width: 100%;
  }

  .list_box, .deco-list {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .box, .deco {
    width: 100%;
  }
}
/* Responsive Dashboard */
@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
    margin: 20px;
  }

  .sidebar-dashboard {
    width: 100%;
    background: var(--marine);
    margin-bottom: 20px;
  }

  .sidebar-dashboard ul {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
  }

  .sidebar-dashboard ul li {
    margin: 10px 0;
  }

  .sidebar-dashboard ul li a {
    color: #fff;
    padding: 10px 15px;
    display: inline-block;
  }

  .content-dashboard {
    padding: 0;
  }
}
