/* Page styles for templates/main/home.html.twig (moved out of the template so they are cached). */

/* ---- Logged-in home: "Aujourd'hui" card ---- */
.today-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem 1.15rem 1.15rem;
    margin-bottom: 1.25rem;
}
.today-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}
.today-card__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
}
.today-card__title i { color: var(--primary); }
.today-card__kcal {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--heading);
}
.today-card__kcal-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.today-card__kcal-target { font-size: 0.95rem; color: var(--muted); }

.today-card__progress {
    height: 10px;
    margin: 0.6rem 0 0.45rem;
    background: var(--surface-2);
    border-radius: 999px;
}
.today-card__progress .progress-bar { border-radius: 999px; }
.today-card__remaining {
    margin: 0 0 0.9rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.today-card__remaining strong { color: var(--heading); }

.today-macros {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.today-macro {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    min-width: 0;
}
.today-macro__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}
.today-macro__value {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--heading);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.today-macro__value span { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.today-macro__bar {
    height: 4px;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}
.today-macro__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.today-card__notarget {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.45;
}
.today-card__notarget > i { color: var(--primary); font-size: 1.2rem; line-height: 1.2; }
.today-card__notarget strong { display: block; color: var(--heading); }
.today-card__notarget-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: var(--primary);
}

.today-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.today-card__btn {
    flex: 1 1 180px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
}

/* ---- Shortcuts (only the ones missing from the bottom nav) ---- */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.quick-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    min-height: 64px;
    text-decoration: none;
    color: var(--heading);
    transition: box-shadow 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.quick-card:hover {
    box-shadow: var(--shadow-hover, 0 6px 24px rgba(79, 114, 227, 0.13));
    border-color: var(--primary);
    color: var(--heading);
}
.quick-card > div { flex: 1; min-width: 0; }
.quick-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
}
.quick-card-label { font-size: 0.88rem; font-weight: 600; line-height: 1.3; }
.quick-card-desc { font-size: 0.76rem; color: var(--muted); }
.quick-card-chevron { color: var(--muted); flex-shrink: 0; }

    /* ---- Bottom grid ---- */
    .home-bottom {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
    }
    .home-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
overflow: hidden;
    }
    .home-card-header {
padding: 0.9rem 1.2rem;
border-bottom: 1px solid var(--border);
font-size: 0.84rem;
font-weight: 700;
color: var(--text);
display: flex;
align-items: center;
gap: 0.5rem;
    }
    .home-card-body { padding: 1rem 1.2rem; }

    /* Tips */
    .tip-item {
display: flex;
align-items: flex-start;
gap: 0.7rem;
padding: 0.65rem 0;
border-bottom: 1px solid var(--border);
font-size: 0.82rem;
color: var(--text);
line-height: 1.45;
    }
    .tip-item:last-child { border-bottom: none; }
    .tip-icon {
width: 30px;
height: 30px;
border-radius: 8px;
background: var(--surface-2);
display: flex;
align-items: center;
justify-content: center;
font-size: 0.9rem;
flex-shrink: 0;
color: var(--primary);
    }

    @media (max-width: 575px) {
.quick-grid { grid-template-columns: 1fr; }
    }

    /* ---- Visiteur ---- */
    .visitor-hero {
text-align: center;
padding: 4rem 1rem 3rem;
    }
    .visitor-hero h1 { font-size: 2.4rem; font-weight: 800; color: var(--heading); line-height: 1.2; }
    .visitor-hero h1 span { background: var(--gradient-brand); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
    .visitor-features {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.2rem;
margin: 3rem 0;
    }
    .visitor-feature {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
padding: 1.5rem 1.2rem;
text-align: center;
    }
    .visitor-feature-icon {
width: 52px; height: 52px;
border-radius: 14px;
display: flex; align-items: center; justify-content: center;
font-size: 1.4rem;
margin: 0 auto 0.9rem;
    }
    .visitor-feature h6 { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.3rem; }
    .visitor-feature p { font-size: 0.8rem; color: var(--muted); margin: 0; }
    @media (max-width: 767px) {
.visitor-features { grid-template-columns: 1fr; }
.visitor-hero h1 { font-size: 1.7rem; }
    }

/* Past the target the macro bar warns like the calorie bar */
.today-macro__bar.is-near span { background: var(--warning); }
.today-macro__bar.is-over span { background: var(--danger); }
