Files
administration/wwwroot/css/HelloFresh/historique.css
2025-09-03 20:17:50 +02:00

464 lines
8.9 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:root {
--hf-bg: #fff;
--hf-muted: #777;
--hf-border: #ececec;
--hf-ink: #1c1c1c;
--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: 105rem;
margin: 18px 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;
}
.hf-qty {
display: flex;
align-items: center;
gap: 10px;
color: #444;
font-weight: 600;
}
.hf-qty select {
padding: 6px 10px;
border: 1px solid #cfcfcf;
border-radius: 8px;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 1.5rem;
margin: 3%;
margin-top: 2%;
margin-bottom: 1%;
}
.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;
cursor: pointer;
width: 15rem;
position: relative; /* Pour positionner les éléments absolus à l'intérieur */
}
.card:hover {
transform: scale(1.02);
}
.card img {
width: 100%;
height: 150px;
object-fit: cover;
}
.card-content {
padding: 1rem;
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* 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;
}
/* Lien (non utilisé ici, mais présent dans d'autres contextes) */
.card a {
text-decoration: none;
color: #fff;
background: #27ae60;
padding: 0.5rem 1rem;
border-radius: 8px;
font-weight: bold;
display: inline-block;
margin-top: 1rem;
transition: background 0.2s;
}
.card a:hover {
background: #1e874b;
}
.placeholder {
text-align: center;
color: #888;
}
/* 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: 0px;
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;
}
/* Informations de recette (temps de préparation, etc.) */
.recipe-info {
font-size: 0.9rem;
font-weight: 700;
/* Le texte (temps) sera aligné à droite par le jeu de flexbox dans .footerCard */
}
/* Infobulle (tooltip) */
.tooltip {
position: absolute;
bottom: 110%;
left: 10px;
background-color: #333;
color: #fff;
padding: 8px 12px;
border-radius: 6px;
font-size: 0.9em;
white-space: pre-wrap;
z-index: 1000;
opacity: 0;
pointer-events: none;
transform: translateY(-10px);
transition: opacity 0.2s ease, transform 0.2s ease;
width: max-content;
max-width: 250px;
}
.card:hover .tooltip {
opacity: 1;
pointer-events: auto;
transform: translateY(-14px);
}
/* Styles pour la section pliable */
.section-toggle {
position: relative;
margin: 45px 0 0 0;
}
.section-hr {
border: 0;
border-top: 2px solid #ddd;
margin: 0;
}
.section-chip {
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, -50%);
display: flex;
gap: 8px;
align-items: center;
padding: 6px 12px;
border-radius: 5px;
border: 1px solid #e5e7eb;
background: #f4f4f4;
font-weight: 600;
cursor: pointer;
user-select: none;
}
.collapse-icon {
transition: transform 0.25s ease;
}
.section-toggle.open .collapse-icon {
transform: rotate(180deg);
}
.collapse-wrap {
overflow: hidden;
height: 0;
opacity: 0;
transition: height 0.26s ease, opacity 0.26s ease;
}
.collapse-wrap.open {
opacity: 1;
}
/* Pour la zone de contenu défilable (si applicable) */
.content {
overflow: auto;
}
.sticky-search {
position: sticky;
top: 0;
z-index: 10;
padding: 8px 12px;
}
/* Conteneur en bas de la carte pour temps + contrôles de portions */
.footerCard {
display: flex;
justify-content: space-between;
align-items: flex-end !important;
flex-direction: row-reverse;
}
/* Badge affichant le nombre de portions sélectionnées sur l'image */
.badge-portions {
position: absolute;
right: 8px;
background: rgba(0, 0, 0, 0.75);
color: #fff;
font-size: 0.55rem;
padding: 4px 8px;
border-radius: 12px;
top: 10px;
}
/* Contrôles de quantité (boutons +/ et affichage du nombre) */
.quantity-controls {
display: flex;
align-items: center;
gap: 4px;
/* Initialement, on les masque dans le HTML via style="display:none" (géré en JS) */
}
.quantity-controls button {
background: #f1f1f1;
border: 0;
padding: 0px 4px;
border-radius: 6px;
cursor: pointer;
}
.quantity-controls button:hover {
background: #e6e6e6;
}
.quantity {
font-weight: 700;
min-width: 1.5rem;
text-align: center;
}
/* Base: un léger contour pour qu'on voie le surlignage quand sélectionnée */
.card {
border: 1px solid #eee;
}
/* Les cartes dans OWNED n'ont pas de surlignage vert (c'est implicite qu'elles sont choisies) */
#recipeGridOwned .card {
border-color: #eee; /* force un rendu "neutre" */
box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.footerCard {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row; /* plus de row-reverse */
}
/* Contrôles visibles seulement dans OWNED */
#recipeGrid .quantity-controls {
display: none !important;
}
#recipeGridOwned .quantity-controls {
display: flex;
}
.placeholder-result {
background: none;
color: black;
width: 40rem;
text-align: left;
font-style: italic;
}
.pagination-modern {
bottom: 20px;
right: 65px;
backdrop-filter: blur(6px);
border-radius: 12px;
padding: 6px 14px;
display: flex;
align-items: center;
gap: 8px;
font-family: 'Segoe UI', sans-serif;
font-size: 14px;
z-index: 999;
width: fit-content;
MARGIN: auto;
margin-right: 2.4%;
}
.pagination-btn {
border: none;
background: #4CAF50;
color: white;
font-size: 16px;
padding: 6px 10px;
border-radius: 8px;
cursor: pointer;
transition: background 0.2s ease, transform 0.1s ease;
}
.pagination-btn:hover {
background: #45a049;
}
.pagination-btn:disabled {
background: #ccc;
cursor: not-allowed;
}
#pageInfo {
font-weight: 500;
color: #333;
}
.owned-empty {
display: block;
color: #666;
font-weight: 600;
border-radius: 10px;
font-style: italic;
}
/* Section pliable ULTRA FIABLE en max-height */
/* --- FIX: n'utiliser que max-height pour la section pliable --- */
.collapse-wrap {
/* on annule la vieille règle à base de height:0 */
height: auto !important;
/* on garde le système au max-height */
overflow: hidden;
max-height: 0;
opacity: 0;
transition: max-height .30s ease, opacity .30s ease;
}
.collapse-wrap.open {
opacity: 1;
max-height: 2000px; /* assez grand pour tout contenir */
}
/* Message "aucune recette" masqué par défaut */
#noSelectedMsg {
display: none;
font-style: italic;
color: #666; /* texte grisé par exemple */
}
/* Emplacement réservé pour l'indicateur (évite les décalages) */
.selection-slot {
display: flex;
align-items: center;
gap: 6px;
min-height: 18px; /* hauteur de la pastille */
min-width: 110px; /* réserve de la place pour "Sélectionné" */
visibility: hidden; /* masqué par défaut mais prend la place */
}
.selection-slot.active { /* quand sélectionné */
visibility: visible;
}
.selection-indicator {
display: flex;
align-items: center;
gap: 6px;
font-weight: 700;
color: #27ae60;
}
.selection-indicator .check-icon {
background: #27ae60;
color: #fff;
font-size: .75rem;
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.selection-text {
font-size: .8rem;
font-weight: 900;
}
#pdfModal {
z-index: 2000 !important; /* au-dessus de tout */
}
.modal-backdrop {
z-index: 1999 !important;
}
.placeholder {
color: #666;
}
.hf-grid {
display: flex;
gap: 17px;
margin-bottom: 40px;
}
label {
margin-bottom: 0rem;
}
h3.history-date {
font-size: 1.1rem;
font-weight: 500;
}
div#historyContainer {
margin-top: 1.5rem;
}