/* ======================================
 * MISE À JOUR POUR L'AJOUT DU CHAMP RÉGION
 * ====================================== */

/* Ajustement de la grille pour 4 éléments au lieu de 3 */
.recette-top-info {
    width: 99.9%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px; /* Réduction de l'écart pour faire de la place */
    padding: 0px;
    background-color: #f9f9f9;
    border-radius: 0 0 10px 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.recette-top-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    flex: 1;
    position: relative;
    min-width: 0; /* Pour permettre la compression du texte si nécessaire */
}

/* Lignes séparatrices entre les éléments */
.recette-top-info-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40%;
    width: 1px;
    background-color: rgba(0, 0, 0, 0.08);
}

.recette-top-info-item svg {
    flex-shrink: 0;
    width: 36px !important;
    height: 36px !important;
}

.recette-top-info-item span {
    font-size: 0.95rem; /* Légère réduction pour s'adapter à 4 éléments */
    font-weight: 600;
    white-space: nowrap;
    color: #222;
}

/* Style spécifique pour le champ région */
.recette-region svg {
    fill: var(--primary-color);
}

/* ======================================
 * RESPONSIVE POUR 4 ÉLÉMENTS
 * ====================================== */

/* Tablettes */
@media screen and (max-width: 768px) {
    .recette-top-info {
        gap: 15px; /* Réduction supplémentaire de l'écart */
    }
    
    .recette-top-info-item span {
        font-size: 0.85rem; /* Réduction de la taille du texte */
    }
    
    .recette-top-info-item svg {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Téléphones - Disposition 2x2 */
@media screen and (max-width: 480px) {
    .recette-top-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 5px;
        padding: 0;
    }
    
    .recette-top-info-item {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }
    
    /* Supprimer les séparateurs verticaux et ajouter des séparateurs horizontaux */
    .recette-top-info-item::after {
        display: none;
    }
    
    /* Ajouter une ligne horizontale entre les deux rangées */
    .recette-top-info-item:nth-child(1)::before,
    .recette-top-info-item:nth-child(2)::before {
        content: '';
        position: absolute;
        bottom: -7.5px;
        left: 10%;
        right: 10%;
        height: 1px;
        background-color: rgba(0, 0, 0, 0.08);
    }
    
    /* Ajouter une ligne verticale entre les colonnes */
    .recette-top-info-item:nth-child(odd)::after {
        content: '';
        position: absolute;
        right: -7.5px;
        top: 10%;
        bottom: 10%;
        width: 1px;
        height: auto;
        background-color: rgba(0, 0, 0, 0.08);
    }
    
    .recette-top-info-item svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .recette-top-info-item span {
        font-size: 0.85rem;
        white-space: normal; /* Permettre le retour à la ligne si nécessaire */
        font-weight: 400;
    }
}

/* Très petits téléphones */
@media screen and (max-width: 320px) {
    .recette-top-info-item span {
        font-size: 0.85rem;
    }
    
    .recette-top-info-item svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Mode sombre */
.dark-mode .recette-top-info {
    background-color: var(--card-bg);
}

.dark-mode .recette-top-info-item:not(:last-child)::after,
.dark-mode .recette-top-info-item:nth-child(1)::before,
.dark-mode .recette-top-info-item:nth-child(2)::before,
.dark-mode .recette-top-info-item:nth-child(odd)::after {
    background-color: rgba(255, 255, 255, 0.08);
}
