/**
 * Theme Name: Cooking Blog
 * Author: Adrien Jeanclos
 * Version: 1.0
 * /

/* Header styles */
.header-top {
    line-height: 20px;
    padding: 5px 0;
    text-align: center;
}

.header-title {
    letter-spacing: 10px;
    margin: 0;
    text-align: center;
}

.header-tagline {
    margin: 5px 0 10px;
    margin-top: 10px;
    padding: 0px 20px;
    text-align: center;
}

/* ===== Base ===== */
.header-navbar ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 15px;
  position: relative;
  padding: 0;
  margin: 0;
}

/* ===== Recherche ===== */
.search-toggle {
  cursor: pointer;
  font-size: 18px;
  color: #333;
  padding: 5px;
  transition: opacity 0.3s ease, visibility 0.3s ease, margin-right 0.3s ease;
  position: relative;
  z-index: 2;
}

.search-container {
  position: absolute;
  right: 0;
  top: 0;
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  margin-left: -200px;
  z-index: 1;
}

.search-container form {
  display: flex;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
}

.search-submit {
  padding: 8px 12px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* État actif : loupe masquée, formulaire visible */
.search-toggle.active {
  opacity: 0;
  visibility: hidden;
  margin-right: 0;
}

.search-toggle.active + .search-container {
  opacity: 1;
  visibility: visible;
  margin-left: 0;
}

/* ===== Menu Burger ===== */
.menu-burger {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .header-navbar ul {
    display: block;
  }

  .header-navbar li:not(.current-page-item):not(.menu-burger) {
    display: none;
  }

  .header-navbar.responsive li {
    display: block;
    text-align: left;
    float: none;
  }

  .header-navbar.responsive .menu-burger {
    position: absolute;
    right: 0;
    top: 0;
  }

  .search-container {
    width: 150px;
    margin-left: -150px;
  }
}


/* ===== POST TYPE - Recipe ===== */
.recipe-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #fff;
}

.recipe-article {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

/* En-tête de la recette */
.recipe-header {
    margin-bottom: 30px;
    text-align: center;
}

.recipe-title-container {
    margin-bottom: 20px;
}

.recipe-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.recipe-featured-image {
    margin: 20px auto;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.recipe-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.recipe-short-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
}

/* Métadonnées */
.recipe-meta-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 25px 0;
}

.recipe-meta-group {
    display: flex;
    gap: 15px;
}

.recipe-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.meta-icon {
    font-size: 1.1rem;
}

.meta-label {
    font-weight: 600;
    color: #2c3e50;
}

.meta-value {
    color: #7f8c8d;
}

/* Taxonomies */
.recipe-taxonomies {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 25px 0;
}

.taxonomy-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e8f4f8;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.taxonomy-label {
    font-weight: 600;
    color: #2c3e50;
}

.taxonomy-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.taxonomy-item {
    background: #fff;
    padding: 3px 10px;
    border-radius: 15px;
    color: #3498db;
    font-size: 0.85rem;
}

/* Sections */
.recipe-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    text-align: center;
}

/* Ingrédients */
.ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.ingredient-item {
    background: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
    margin-bottom: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Étapes */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.step-item {
    display: flex;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.step-number {
    background: #3498db;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
    line-height: 1.6;
}

/* Astuce du chef */
.chef-tip-section {
    background: #fff5e6;
    border-left: 4px solid #f39c12;
}

.chef-tip-content {
    font-style: italic;
    color: #8e44ad;
    line-height: 1.6;
}

/* Notation */
.rating-container {
    text-align: center;
}

.average-rating {
    margin-bottom: 20px;
}

.rating-value {
    font-size: 2rem;
    font-weight: bold;
    color: #f39c12;
    margin-right: 10px;
}

.rating-stars {
    font-size: 1.5rem;
    color: #f39c12;
    margin-right: 10px;
}

.rating-count {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.rating-form {
    margin-top: 20px;
}

.rating-stars-fieldset {
    display: flex;
    justify-content: center;
    gap: 5px;
    border: none;
    margin-bottom: 15px;
}

.rating-stars-fieldset input[type="radio"] {
    display: none;
}

.rating-stars-fieldset label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-stars-fieldset label:hover,
.rating-stars-fieldset label:hover ~ label,
.rating-stars-fieldset input[type="radio"]:checked ~ label {
    color: #f39c12;
}

.rate-submit {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.rate-submit:hover {
    background: #2980b9;
}

/* Commentaires */
.comments-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .recipe-article {
        padding: 20px;
    }

    .recipe-title {
        font-size: 2rem;
    }

    .recipe-meta-container {
        flex-direction: column;
        align-items: center;
    }

    .recipe-meta-group {
        flex-direction: column;
        align-items: center;
    }

    .recipe-taxonomies {
        flex-direction: column;
        align-items: center;
    }

    .ingredients-list {
        grid-template-columns: 1fr;
    }

    .step-item {
        flex-direction: column;
    }

    .step-number {
        margin-bottom: 10px;
    }
}