/*
Theme Name: GeneratePress Child
Theme URI: https://example.com/
Description: Thème enfant basé sur GeneratePress.
Author: Ton Nom
Template: generatepress
Version: 1.0
*/

.recipes-list{
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes par défaut */
    gap: 20px;
    list-style: none;
    padding: 0;
}

@media (max-width: 1200px) {
    .recipes-list {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes pour les écrans moyens */
    }
}

@media (max-width: 992px) {
    .recipes-list{
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes pour les petits écrans */
    }
}

@media (max-width: 768px) {
    .recipes-list{
        grid-template-columns: 1fr; /* 1 colonne pour les très petits écrans */
    }
}

.recipes-list{
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
}

.recipes-list img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}


/* page ingrdient */

.recipe-header {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 10px;
    align-items: center;
}

.recipe-image img {
    width: 400px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.recipe-info {
    flex: 1;
}

.recipe-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 180px;
}

.meta-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.meta-label {
    font-size: 14px;
    color: #666;
    margin-right: 5px;
}

.meta-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.site-main {
    font-family: Arial, sans-serif;
    color: #333;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.recipe-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
}

.recipe-thumbnail img {
    width: 300px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.recipe-info {
    flex: 1;
}

.recipe-info h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.recipe-meta p {
    margin: 5px 0;
}

.recipe-content-wrapper {
    display: flex;
    gap: 50px;
}

.recipe-ingredients,
.recipe-preparation {
    flex: 1;
}

.recipe-ingredients .servings {
    margin-bottom: 20px;
}

.recipe-ingredients .servings label {
    font-weight: bold;
    margin-right: 10px;
}

.ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.ingredient-image img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.ingredient-details {
    display: flex;
    flex-direction: column;
}

.ingredient-quantity {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.ingredient-name {
    font-size: 14px;
    color: #666;
}

.recipe-steps {
    margin-top: 20px;
}

.recipe-step {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.recipe-step h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.step-description {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

.step-ingredients {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ingredient-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.ingredient-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.ingredient-item span {
    font-size: 14px;
    color: #333;
}
.recipe-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.recipe-tags h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

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

.tags-list li {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.tags-list li a {
    text-decoration: none;
    color: inherit;
}

.tags-list li:hover {
    background-color: #e0e0e0;
}

.all-recipes-button {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 15px;
    font-size: 14px;
    color: #0056b3;
    text-decoration: none;
    border: 1px solid #0056b3;
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.all-recipes-button:hover {
    background-color: #0056b3;
    color: #fff;
}

/* Mise en page principale */
.recipe-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 1/3 pour les ingrédients, 2/3 pour la préparation */
    gap: 30px;
    align-items: flex-start;
}

/* Section des ingrédients */
.recipe-ingredients {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Liste des ingrédients en 3 colonnes */
.ingredient-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Détails des ingrédients */
.ingredient-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.ingredient-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.ingredient-details .ingredient-quantity {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.ingredient-details .ingredient-name {
    font-size: 12px;
    color: #666;
}

/* Section de préparation */
.recipe-preparation {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipe-step {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f7f7f7;
}

.recipe-step h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Mise en page principale - Desktop */
.recipe-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 1/3 pour les ingrédients, 2/3 pour la préparation */
    gap: 30px;
    align-items: flex-start;
}

.wake-lock-button {
    background-color: #f08a5d; /* Couleur de base */
    border: none;
    border-radius: 50%; /* Bouton rond */
    width: 50px; /* Largeur */
    height: 50px; /* Hauteur */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Ombre */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.wake-lock-button:hover {
    background-color: #b83b5e; /* Couleur au survol */
    transform: scale(1.1); /* Agrandissement au survol */
}

.wake-lock-button:active {
    transform: scale(0.95); /* Réduction lors du clic */
}

#wake-lock-icon {
    font-size: 24px; /* Taille de l'icône */
    color: white; /* Couleur de l'icône */
    transition: transform 0.3s ease;
}
/* Conteneur du calculateur de portions */
.servings-calculator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Style des boutons + et - */
.servings-calculator button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

/* Effet au survol des boutons */
.servings-calculator button:hover {
    background: #e9ecef;
}

/* Bouton désactivé (réinitialiser) */
.servings-calculator button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Style du champ input */
.servings-calculator input {
    width: 50px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: white;
    font-weight: bold;
}

/* Bouton "Réinitialiser" avec icône */
#reset-servings::before {
    content: "↺"; /* Icône Unicode */
    font-size: 18px;
}

/* Grille des ingrédients */
.ingredient-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
}

/* Style des cartes ingrédients */
.ingredient-item {
    text-align: center;
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

/* Effet au survol */
.ingredient-item:hover {
    transform: translateY(-3px);
}

/* Style des images d'ingrédients (sans encadrement) */
.ingredient-image img {
    max-width: 60px;
    height: auto;
    display: block;
    margin: 0 auto 5px;
    border: none;
}

/* Ajustement du texte sous les images */
.ingredient-details {
    font-size: 14px;
    color: #333;
}

/* Mise en avant du nom de l'ingrédient */
.ingredient-name {
    font-weight: 600;
    display: block;
    font-size: 14px;
    margin-top: 5px;
}

/* Suppression des bordures des images dans les étapes de préparation */
.recipe-step img {
    border: none !important;
    box-shadow: none !important;
}

.wines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .wines-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .wines-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wines-grid {
        grid-template-columns: 1fr;
    }
}
.recipe-card-link {
    text-decoration: none;
}

.recipe-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 10px;
    transition: box-shadow 0.3s;
    height: 100%;
}

.recipe-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recipe-image img {
    max-height: 300px;
    width: auto;
}

.recipe-content h2 {
    font-size: 20px;
    margin: 10px 0;
}

.recipe-meta {
    margin-top: auto;
}
.wine-card-link {
    text-decoration: none;
}

.wine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 10px;
    transition: box-shadow 0.3s;
    height: 100%;
}

.wine-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wine-image img {
    max-height: 150px;
    width: auto;
}

.wine-content h2 {
    font-size: 20px;
    margin: 10px 0;
}

.wine-meta {
    margin-top: auto;
}

.wine-card {
    border: 1px solid #ddd;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wine-image img {
    max-width: 100%;
    height: auto;
}

.wine-content {
    margin-top: 10px;
}

.wine-meta {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.wine-link {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    text-decoration: none;
}

.wine-link:hover {
    text-decoration: underline;
}

/* Responsive Tablet */
@media (max-width: 768px) {
    .recipe-content-wrapper {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 20px;
    }

    .recipe-header {
        flex-direction: column; /* Empile les éléments verticalement */
    }

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

    .meta-item {
        flex: 1 1 100%; /* Prend toute la largeur */
    }
}

/* Responsive Mobile */
@media (max-width: 480px) {
    .ingredient-list {
        grid-template-columns: 1fr 1fr; /* 2 colonnes au lieu de 3 */
        gap: 10px;
    }

    .meta-item {
        flex-direction: column;
        text-align: center;
    }

    .meta-icon {
        margin-bottom: 5px;
    }

    .recipe-step {
        padding: 10px;
        font-size: 14px;
    }
}

.recipe-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-link {
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.tab-link.active {
    background-color: #0073aa;
    color: white;
}

.tab-link:hover {
    background-color: #ddd;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .recipe-tabs {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
        position: sticky;
        top: 0;
        background-color: #fff;
        z-index: 1000;
        padding: 10px 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .tab-link {
        padding: 10px 20px;
        margin: 0 5px;
        cursor: pointer;
        background-color: #f1f1f1;
        border: 1px solid #ccc;
        border-radius: 5px;
        transition: background-color 0.3s;
    }

    .tab-link.active {
        background-color: #0073aa;
        color: white;
    }

    .tab-link:hover {
        background-color: #ddd;
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .recipe-tabs {
        display: none;
    }

    .tab-content {
        display: block;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#confirmation-message {
    color: green;
    font-weight: bold;
}

#shopping-list .recipe-ingredients {
    margin-bottom: 20px;
}

#shopping-list .ingredient-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

#shopping-list .ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#shopping-list .ingredient-item button {
    background-color: red;
    color: white;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 50%;
}

#shopping-list .ingredient-item button:hover {
    background-color: darkred;
}

#recipe-titles {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#recipe-titles li {
    font-weight: bold;
    margin-bottom: 5px;
}

#shopping-list li,
#ingredient-summary li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#shopping-list li button {
    margin-left: 10px;
    background-color: red;
    color: white;
    border: none;
    cursor: pointer;
}

#shopping-list li button:hover {
    background-color: darkred;
}

#recipe-titles {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#recipe-titles li {
    font-weight: bold;
    margin-bottom: 5px;
}


/*pour la page taxononmie liste*/
.site-content {
    flex-direction: column;
}
.terms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.term-card {
    position: relative;
    width: calc(33.333% - 20px);
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.term-image {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 200px;
}

.term-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Gradient overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.term-title {
    font-size: 1.5em;
    margin: 0;
}

.term-link {
    display: block;
    padding: 10px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
}

.term-link:hover {
    background: #005177;
}

/* Styles spécifiques aux pages de taxonomie */
.taxonomy-page {
    flex-direction: column;
}

.taxonomy-page .terms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.taxonomy-page .term-card {
    position: relative;
    width: calc(33.333% - 20px);
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.taxonomy-page .term-image {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 200px;
}

.taxonomy-page .term-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Gradient overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.taxonomy-page .term-title {
    font-size: 1.5em;
    margin: 0;
}

.taxonomy-page .term-link {
    display: block;
    padding: 10px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
}

.taxonomy-page .term-link:hover {
    background: #005177;
}
