/*
Theme Name: Epicurvo Child
Template: astra
Description: Thème enfant Epicurvo - gastronomie éditoriale
Version: 1.1
*/

/* =============================================
   RESET PARTIEL & BASE
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
}

/* =============================================
   CONTENEUR CENTRAL
   ============================================= */

.ast-container,
.site-content .ast-container {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Centrage du contenu des pages/posts */
.entry-content > *,
.wp-block-query,
.wp-block-group.alignwide,
.wp-block-group.alignfull .wp-block-group__inner-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero-epicurvo {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-bottom: 0 !important;
}

/* Image en fond absolu, couvre tout */
.hero-epicurvo .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Overlay sombre dégradé */
.hero-epicurvo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.30) 0%,
    rgba(0, 0, 0, 0.62) 70%,
    rgba(0, 0, 0, 0.72) 100%
  );
  z-index: 1;
}

/* Contenu texte centré au-dessus de l'overlay */
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  padding: 60px 24px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c9a84c;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  letter-spacing: -0.01em;
}

.hero-btn {
  display: inline-block;
  background: #c9a84c;
  color: #fff;
  padding: 13px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}

.hero-btn:hover {
  background: #a8882f;
  color: #fff;
  transform: translateY(-1px);
}

/* =============================================
   SEARCH BAR DANS LE HERO
   ============================================= */

.ep-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  margin-top: 6px;
}

.ep-search input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 20px;
  font-size: 0.92rem;
  background: transparent;
  color: #333;
  font-family: inherit;
}

.ep-search input[type="search"]::placeholder {
  color: #999;
}

.ep-search button {
  background: transparent;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  color: #c9a84c;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.ep-search button:hover {
  color: #a8882f;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

/* =============================================
   GRID RECETTES (Gutenberg Query Loop)
   ============================================= */

.wp-block-query {
  max-width: 1200px;
  margin: 48px auto;
  padding: 0 20px;
}

/* Override Gutenberg inline grid pour nos 3 colonnes */
ul.wp-block-post-template.is-layout-grid,
ul.columns-3.wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Card individuelle */
ul.wp-block-post-template li.wp-block-post {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s, transform 0.18s;
  display: flex;
  flex-direction: column;
}

ul.wp-block-post-template li.wp-block-post:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
}

/* Contenu intérieur de la card */
ul.wp-block-post-template li.wp-block-post .wp-block-group {
  padding: 16px 18px 20px !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Figure container — sort du padding du groupe pour être bord-à-bord */
ul.wp-block-post-template li.wp-block-post figure.wp-block-post-featured-image {
  overflow: hidden;
  height: 220px;
  width: calc(100% + 36px) !important;
  margin: -16px -18px 12px !important;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

/* Image — !important pour écraser width="1365" height="1024" en attribut HTML */
ul.wp-block-post-template li.wp-block-post .wp-block-post-featured-image img,
ul.wp-block-post-template li.wp-block-post .wp-block-post-featured-image img[width][height] {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: 0;
  max-width: none !important;
}

/* Sélecteurs spécifiés par l'utilisateur (pages blog/archive classiques) */
.ep-card img,
.post-thumbnail img,
.entry-thumbnail img,
.ast-article-post img,
.blog .ast-archive-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 8px 8px 0 0;
}

/* Conteneurs images pages blog/archive */
.ep-card .card-thumb,
.ast-article-post .ast-archive-img {
  overflow: hidden;
  height: 220px;
  width: 100%;
}

/* Titre de la card */
ul.wp-block-post-template li.wp-block-post .wp-block-post-title {
  font-size: 1.05rem !important;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a;
  padding: 0;
  margin: 0;
}

ul.wp-block-post-template li.wp-block-post .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}

ul.wp-block-post-template li.wp-block-post .wp-block-post-title a:hover {
  color: #c9a84c;
}

/* Excerpt */
ul.wp-block-post-template li.wp-block-post .wp-block-post-excerpt {
  font-size: 0.87rem;
  color: #666;
  line-height: 1.55;
  margin: 0;
}

/* Date */
ul.wp-block-post-template li.wp-block-post .wp-block-post-date {
  font-size: 0.78rem;
  color: #999;
  margin-top: auto;
  padding-top: 8px;
}

/* Bouton "Découvrir" bas de page */
.ep-discover-more {
  text-align: center;
  margin: 32px auto 48px;
}

.btn-discover {
  display: inline-block;
  background: transparent;
  color: #c9a84c;
  border: 2px solid #c9a84c;
  padding: 12px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-discover:hover {
  background: #c9a84c;
  color: #fff;
}

/* =============================================
   FOOTER
   ============================================= */

.epicurvo-footer {
  background: #111111;
  color: #e8e2d5;
  padding: 60px 0 0;
  font-family: inherit;
}

.epicurvo-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  color: #c9a84c;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 600;
}

.footer-logo {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.footer-logo:hover { color: #c9a84c; }

.footer-tagline {
  color: #9a9080;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 8px 0 0;
  font-style: italic;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #c0b89e;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #c9a84c;
}

.footer-social ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-social ul li a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #c9a84c;
  border-radius: 50%;
}

.epicurvo-footer-bottom {
  margin-top: 50px;
  border-top: 1px solid #2a2a2a;
  padding: 20px 30px;
  text-align: center;
}

.epicurvo-footer-bottom p {
  color: #5a5248;
  font-size: 0.8rem;
  margin: 0;
}

/* =============================================
   BOUTONS PARTAGE
   ============================================= */

.epicurvo-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
  padding: 20px;
  background: #faf7f0;
  border-radius: 10px;
  border-left: 4px solid #c9a84c;
}

.share-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  line-height: 1;
  font-family: inherit;
}

.share-facebook { background: #1877f2; color: #fff; }
.share-facebook:hover { background: #1456b8; color: #fff; }

.share-pinterest { background: #e60023; color: #fff; }
.share-pinterest:hover { background: #b3001b; color: #fff; }

.share-whatsapp { background: #25d366; color: #fff; }
.share-whatsapp:hover { background: #1aad52; color: #fff; }

.share-copy { background: #f0ece3; color: #555; }
.share-copy:hover { background: #e0d9cc; color: #333; }

/* =============================================
   TYPOGRAPHIE
   ============================================= */

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.cat-links {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c9a84c !important;
  font-weight: 600;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  ul.wp-block-post-template.is-layout-grid,
  ul.columns-3.wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  ul.wp-block-post-template.is-layout-grid,
  ul.columns-3.wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .hero-epicurvo {
    min-height: 400px;
  }

  .hero-subtitle {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .hero-inner {
    padding: 40px 16px 36px;
  }

  .ep-search {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .epicurvo-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .epicurvo-footer-inner {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .epicurvo-footer-bottom {
    padding: 20px 15px;
  }

  .epicurvo-share {
    padding: 15px;
  }
}
