/*
Theme Name: Astra Child
Template: astra
Version: 1.0.0
Author: Perpetuel Studio
Description: Thème enfant basé sur Astra.
*/

/* Adaptation du design */

h2, .entry-content h2 {
    margin-top: 40px;
  }


/* AFFICHAGE API OFFRES */
#filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

#filters select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

#offres-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.offre-card {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.offre-card:hover {
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.offre-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #333;
}

.offre-card p {
    font-size: 0.9rem;
    margin: 4px 0;
    color: #555;
}

/* POPUP STYLES */

#offre-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: white;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    border-radius: 10px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

#popup-inner-content h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

#popup-inner-content p {
    margin: 8px 0;
}

button.postuler-btn {
    background: #0073aa;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

button.postuler-btn:hover {
    background: #005f8a;
}

.offre-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.offre-card:hover {
  transform: translateY(-5px);
}

.offre-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.offre-meta {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.3rem;
}

.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  background: #fff;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  border-radius: 12px;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.4rem;
}
.popup-content h2 {
  margin-top: 0;
  font-size: 1.5rem;
}
.popup-content p {
  margin: 0.5rem 0;
}

.offre-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: #0a66c2;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}
.offre-btn:hover {
  background: #004a99;
}

/* MENU LATERAL CONDITIONNEL */
ul.submenu-pages {
  list-style: none;
  padding-left: 0;
  margin-bottom: 10px;
}

ul.submenu-pages li {
  margin-bottom: 8px;
}

ul.submenu-pages li a {
  text-decoration: none;
  font-weight: normal;
  display: block;
  padding: 2px !important;
  border-radius: 4px;
  color:#0073aa;
    font-size: 14px !important;
}

ul.submenu-pages li.active a {
  font-weight: bold;
  background-color: #f0f0f0;
  color: #59800e;
  font-size: 14px !important;
}

ul.submenu-pages li a:hover {
  background-color: #e5f2ff;
}

.submenu-pages li.level-1 {
  padding-left: 0;
}

.submenu-pages li.level-2 {
  padding-left: 20px;
}

.submenu-pages li.level-3 {
  padding-left: 40px;
}

@media (max-width: 768px) {
  .widget_nav_menu {
    display: none;
  }
}



/* AUTRE STYLES */

.wp-block-button .wp-block-button__link {
    text-transform: none !important;
}

.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single {
    padding-top: 0em !important;
    padding-right: 6.67em !important;
    padding-bottom: 5.34em !important;
    padding-left: 6.67em !important;
}

.uagb-post__inner-wrap {
    border-radius: 20px;
}

@media (max-width: 768px) {
  .ast-separate-container .ast-article-post,
  .ast-separate-container .ast-article-single {
    padding-right: 3em !important;
    padding-left: 3em !important;
  }
}

