442 lines
8.2 KiB
CSS
442 lines
8.2 KiB
CSS
:root {
|
|
--hf-bg: #fff;
|
|
--hf-muted: #777;
|
|
--hf-border: #ececec;
|
|
--hf-ink: #1c1c1c;
|
|
--hf-accent: #111;
|
|
--hf-pill: #f9f9f9;
|
|
}
|
|
|
|
.hf-ingredients {
|
|
background: var(--hf-bg);
|
|
border-radius: 12px;
|
|
padding: 16px 18px;
|
|
box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
|
|
font-family: system-ui, Segoe UI, Roboto, sans-serif;
|
|
max-width: 95%;
|
|
margin: auto;
|
|
}
|
|
|
|
.hf-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.hf-head h2 {
|
|
margin: 0;
|
|
font-size: 1.6rem;
|
|
font-weight: 800;
|
|
}
|
|
|
|
|
|
#titleAndSearch {
|
|
display:flex;
|
|
}
|
|
|
|
|
|
.hf-qty {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
color: #444;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.hf-qty > span {
|
|
margin-right: 2px;
|
|
}
|
|
|
|
.hf-segment {
|
|
display: inline-grid;
|
|
grid-auto-flow: column;
|
|
border: 1px solid #cfcfcf;
|
|
border-radius: 8px;
|
|
overflow: hidden
|
|
}
|
|
|
|
.hf-segment button {
|
|
padding: 6px 14px;
|
|
background: var(--hf-pill);
|
|
border: 0;
|
|
border-right: 1px solid #e2e2e2;
|
|
cursor: pointer;
|
|
font-weight: 700;
|
|
min-width: 40px;
|
|
}
|
|
|
|
.hf-segment button:last-child {
|
|
border-right: 0
|
|
}
|
|
|
|
.hf-segment button.active {
|
|
background: #111;
|
|
color: #fff
|
|
}
|
|
|
|
.hf-grid {
|
|
list-style: none;
|
|
margin: 14px 0 0;
|
|
padding: 0;
|
|
display: grid;
|
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
gap: 12px 28px;
|
|
}
|
|
|
|
@media (max-width:640px) {
|
|
.hf-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.hf-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
padding: 8px 6px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.hf-thumb {
|
|
width: 52px;
|
|
height: 52px;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
flex: 0 0 52px;
|
|
background: #f3f3f3;
|
|
border: 1px solid var(--hf-border);
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
.hf-thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover
|
|
}
|
|
|
|
.hf-info {
|
|
line-height: 1.2
|
|
}
|
|
|
|
.hf-qtyline {
|
|
font-weight: 800;
|
|
font-size: .95rem;
|
|
color: var(--hf-ink);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.hf-name {
|
|
font-size: .95rem;
|
|
color: var(--hf-ink);
|
|
}
|
|
|
|
.hf-note {
|
|
margin-top: 6px;
|
|
font-size: .85rem;
|
|
color: var(--hf-muted);
|
|
}
|
|
|
|
.hf-sep {
|
|
border: 0;
|
|
border-top: 1px solid var(--hf-border);
|
|
margin: 18px 0 12px;
|
|
}
|
|
|
|
.hf-subtitle {
|
|
margin: 0 0 8px;
|
|
font-size: 1.15rem;
|
|
font-weight: 800;
|
|
}
|
|
.card {
|
|
border: 1px solid #eee;
|
|
}
|
|
|
|
.card {
|
|
background: white;
|
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: transform 0.2s;
|
|
width: 17rem;
|
|
height: 17rem;
|
|
position: relative;
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-content > h3 {
|
|
font-size: 15px;
|
|
font-weight: 500;
|
|
padding-bottom: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.card.checked {
|
|
opacity: .3;
|
|
background: #f6f6f6;
|
|
}
|
|
|
|
.card.checked .card-content h3,
|
|
.card.checked .prep-time {
|
|
text-decoration: line-through;
|
|
color: #888;
|
|
}
|
|
|
|
.card.checked .image-container img {
|
|
filter: grayscale(1);
|
|
}
|
|
|
|
.hf-search {
|
|
margin-left: auto;
|
|
}
|
|
|
|
#hfSearch {
|
|
border: 1px solid #e3e3e3;
|
|
border-radius: 10px;
|
|
padding: 8px 12px;
|
|
min-width: 260px;
|
|
outline: none;
|
|
}
|
|
|
|
#hfSearch:focus {
|
|
border-color: #b9b9b9;
|
|
box-shadow: 0 0 0 3px rgba(0,0,0,.05);
|
|
}
|
|
.card-content {
|
|
padding: 1rem;
|
|
flex: 1;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.footerCard {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-direction: row;
|
|
align-items: flex-end !important;
|
|
}
|
|
|
|
/* Titre de la recette */
|
|
.card h3 {
|
|
margin: 0;
|
|
font-size: 0.82rem;
|
|
color: #333;
|
|
font-weight: 800;
|
|
}
|
|
|
|
/* (Optionnel) Sous-titre ou autres infos */
|
|
.card h5 {
|
|
margin-top: 1%;
|
|
font-size: 0.80rem;
|
|
}
|
|
/* Informations de recette (temps de préparation, etc.) */
|
|
.recipe-info {
|
|
font-size: 0.9rem;
|
|
font-weight: 700;
|
|
margin-bottom: 3px;
|
|
/* Le texte (temps) sera aligné à droite par le jeu de flexbox dans .footerCard */
|
|
}
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
gap: 1.5rem;
|
|
margin: 3%;
|
|
margin-top: 2%;
|
|
margin-bottom: 1%;
|
|
}
|
|
|
|
/* Conteneur des étiquettes (tags) de chaque recette */
|
|
.label-container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin-top: 8px;
|
|
padding: 0 10px;
|
|
position: absolute;
|
|
top: 8px;
|
|
left: 0;
|
|
}
|
|
|
|
.label-badge {
|
|
padding: 4px 10px;
|
|
border-radius: 8px;
|
|
font-size: 0.60rem;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
line-height: 1.5;
|
|
opacity: .9;
|
|
background-color: rgb(14 14 14);
|
|
color: rgb(255, 255, 255);
|
|
}
|
|
|
|
#recipeStrip {
|
|
display: grid;
|
|
grid-auto-flow: column; /* force en colonnes */
|
|
grid-auto-columns: 240px; /* largeur fixe de chaque card */
|
|
gap: 2.7rem;
|
|
overflow-x: auto;
|
|
scroll-snap-type: x mandatory; /* optionnel */
|
|
}
|
|
|
|
#recipeStrip .card {
|
|
scroll-snap-align: start;
|
|
}
|
|
|
|
|
|
/* Style spécifique pour les cartes ingrédients */
|
|
#ingredientsList .card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: #fff;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
|
|
border: 1px solid #e5e7eb;
|
|
cursor: pointer;
|
|
transition: transform .15s ease, box-shadow .15s ease;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
height: fit-content;
|
|
}
|
|
|
|
#ingredientsList .card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 10px rgba(0,0,0,.15);
|
|
}
|
|
|
|
/* Image à gauche */
|
|
#ingredientsList .image-container {
|
|
flex: 0 0 56px; /* Taille fixe */
|
|
height: 56px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
#ingredientsList .image-container img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover; /* Image couvre bien son bloc */
|
|
}
|
|
|
|
/* Texte à droite */
|
|
#ingredientsList .card-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
#ingredientsList .card-content h3 {
|
|
font-size: .8rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
color: #1f2937; /* Texte sombre sur fond blanc */
|
|
}
|
|
|
|
/* Quantité en petit badge */
|
|
#ingredientsList .footerCard {
|
|
margin-top: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
#ingredientsList .prep-time {
|
|
background: #f3f4f6;
|
|
border-radius: 6px;
|
|
padding: 2px 8px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
color: #374151;
|
|
}
|
|
|
|
|
|
#ingredientsList .card-content {
|
|
padding: 0 1rem 0 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Style spécifique pour les cartes ingrédients */
|
|
#neededIngredients .card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: #fff;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
|
|
border: 1px solid #e5e7eb;
|
|
cursor: pointer;
|
|
transition: transform .15s ease, box-shadow .15s ease;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
height: fit-content;
|
|
}
|
|
|
|
#neededIngredients .card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 10px rgba(0,0,0,.15);
|
|
}
|
|
|
|
/* Image à gauche */
|
|
#neededIngredients .image-container {
|
|
flex: 0 0 56px; /* Taille fixe */
|
|
height: 56px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
#neededIngredients .image-container img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover; /* Image couvre bien son bloc */
|
|
}
|
|
|
|
/* Texte à droite */
|
|
#neededIngredients .card-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
#neededIngredients .card-content h3 {
|
|
font-size: .8rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
color: #1f2937; /* Texte sombre sur fond blanc */
|
|
}
|
|
|
|
/* Quantité en petit badge */
|
|
#neededIngredients .footerCard {
|
|
margin-top: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex-direction: row-reverse;
|
|
}
|
|
|
|
#neededIngredients .prep-time {
|
|
background: #f3f4f6;
|
|
border-radius: 6px;
|
|
padding: 2px 8px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
color: #374151;
|
|
}
|
|
|
|
|
|
#neededIngredients .card-content {
|
|
padding: 0 1rem 0 0;
|
|
}
|