/* =================================
   Styles des nouvelles pages
   (à charger APRÈS style.css)
================================= */

main {
    padding-bottom: 96px; /* place pour la barre du bas */
}

footer {
    padding-bottom: 90px;
}

.view[hidden] {
    display: none;
}

/* ---------- Catalogue (ajustements) ---------- */

.product-card {
    cursor: pointer;
}

.product-image {
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-price small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.product-description {
    min-height: 0;
}

.add-button {
    cursor: pointer;
}

/* ---------- Barre de navigation du bas ---------- */

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(25, 26, 32, 0.96);
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--muted);
    font-size: 11px;
}

.nav-item span {
    font-size: 20px;
}

.nav-item.active {
    color: var(--accent-light);
}

/* ---------- Éléments communs ---------- */

.page-title {
    margin-bottom: 16px;
    font-size: 22px;
}

.back-link {
    margin-bottom: 14px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--accent-light);
    font-size: 14px;
}

.primary-button,
.secondary-button {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    transition: background 0.2s;
}

.primary-button {
    border: 0;
    background: var(--accent);
    color: white;
}

.primary-button:hover {
    background: #7545dc;
}

.secondary-button {
    margin-top: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.secondary-button:hover {
    background: var(--surface-hover);
}

.notice {
    margin-bottom: 18px;
    padding: 13px 14px;
    border: 1px solid #44306d;
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.12);
    font-size: 13px;
}

.summary {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary strong {
    font-size: 20px;
}

.summary p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 10px;
    color: var(--muted);
    text-align: center;
}

.empty-state > span {
    font-size: 54px;
}

.empty-state .page-title {
    margin-bottom: 0;
    color: var(--text);
}

.empty-state .primary-button {
    margin-top: 8px;
}

/* ---------- Fiche produit ---------- */

.gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    border-radius: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: 0 0 100%;
    overflow: hidden;
    aspect-ratio: 1 / 0.85;
    border-radius: 20px;
    background: var(--surface);
    scroll-snap-align: center;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: radial-gradient(circle at 50% 40%, #383044, #222029 70%);
}

.slide-placeholder span {
    font-size: 80px;
}

.slide-placeholder small {
    color: var(--muted);
    font-size: 12px;
}

.detail {
    padding-top: 18px;
}

.detail h2 {
    margin: 4px 0 8px;
    font-size: 28px;
}

.detail-description {
    color: #c0bdcc;
    font-size: 14px;
}

.detail-subtitle {
    margin: 22px 0 10px;
    font-size: 15px;
}

.weights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.weight-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    transition: background 0.2s, border-color 0.2s;
}

.weight-option span {
    color: var(--muted);
    font-size: 13px;
}

.weight-option.selected {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.18);
}

.weight-option.selected span {
    color: var(--accent-light);
}

.legal-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

/* ---------- Panier ---------- */

.cart-list {
    display: grid;
    gap: 12px;
}

.cart-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.cart-thumb {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #2a2633;
    font-size: 30px;
}

.cart-details {
    flex: 1;
    min-width: 0;
}

.cart-details h3 {
    font-size: 15px;
}

.cart-details p {
    color: var(--muted);
    font-size: 12px;
}

.qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-hover);
    color: var(--text);
    font-size: 16px;
}

.cart-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.delete-button {
    border: 0;
    background: none;
    font-size: 18px;
}

/* ---------- Formulaires ---------- */

.form {
    display: grid;
    gap: 14px;
}

.form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.form input,
.form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.form input:focus,
.form textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.form textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form label.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.form label.checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.form-error {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 13px;
}

.form-ok {
    color: #86efac;
    font-size: 13px;
    text-align: center;
}

/* ---------- Profil ---------- */

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.profile-card p {
    color: var(--muted);
    font-size: 13px;
}

.avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
    font-size: 24px;
    font-weight: 800;
}

.info-list {
    display: grid;
    gap: 1px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--border);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    background: var(--surface);
    font-size: 14px;
}

.info-list span {
    color: var(--muted);
}

.info-list strong {
    overflow-wrap: anywhere;
    text-align: right;
}
