/* ============================================================
   PRODUITS.PHP — catalogue public, identité marine/blanc/rouge
============================================================ */

/* Tokens (:root) et reset du body : voir styles/base.css */

/* ── En-tête ── */
.prod-header {
    background: var(--mc-navy);
    background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 10px);
    text-align: center;
    padding: 64px 24px 56px;
    color: #ffffff;
}
.prod-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff8095; /* rouge éclairci : le rouge de marque #c41e3a n'atteint que 2.9:1 sur fond marine */
    margin: 0 0 14px;
}
.prod-header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.4vw, 2.8rem);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.prod-sous { font-size: 1.02rem; color: rgba(255,255,255,0.75); margin: 0; }

.prod-container { max-width: 1280px; margin: 0 auto; padding: 40px 24px 90px; }

/* ── Barre de filtres : puces (gauche) + collection/tri (droite), une seule ligne ── */
.prod-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(11,30,61,0.08);
}

/* ── Chips de type ── */
.prod-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.prod-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 22px;
    border: 1.5px solid rgba(11,30,61,0.15);
    color: var(--mc-navy);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.prod-chip:hover { border-color: var(--mc-navy); }
.prod-chip.active { background: var(--mc-navy); border-color: var(--mc-navy); color: #ffffff; }
.prod-chip-nb { opacity: 0.8; font-weight: 500; }

/* ── Sélecteurs collection / tri (à droite de la barre) ── */
.prod-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 16px;
    margin: 0;
    flex: 0 1 auto;
}
.prod-select-wrap { display: flex; align-items: center; gap: 8px; }
.prod-select-wrap label { font-size: 0.78rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.prod-select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    padding: 0 38px 0 18px;
    border: 1.5px solid rgba(11,30,61,0.15);
    border-radius: 22px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--mc-navy);
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1e3d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.prod-select-wrap select:hover { border-color: var(--mc-navy); }
.prod-select-wrap select:focus-visible {
    outline: 3px solid var(--mc-navy);
    outline-offset: 2px;
    border-color: var(--mc-navy);
}

/* Bouton « Appliquer » : visible sans JS ; avec JS (classe .prod-js), masqué visuellement
   mais atteignable au clavier — il apparaît alors au focus. */
.prod-apply {
    box-sizing: border-box;
    min-height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--mc-navy);
    border-radius: 22px;
    background: var(--mc-navy);
    color: #ffffff;
    font: 600 0.85rem 'Inter', sans-serif;
    cursor: pointer;
}
.prod-apply:hover { background: var(--mc-navy-2); }
.prod-js .prod-apply:not(:focus) {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Grille produits ── */
.prod-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 26px;
}
.prod-card {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid rgba(11,30,61,0.08);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease;
    /* L'apparition au défilement est gérée par .reveal-item (base.css + site-ux.js) */
}

.prod-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--mc-red);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.prod-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(to right, var(--mc-navy) 0 33.34%, #ffffff 33.34% 66.66%, var(--mc-red) 66.66% 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.prod-card:hover { border-color: rgba(11,30,61,0.2); transform: translateY(-3px); }
.prod-card:hover::before { transform: scaleX(1); }
.prod-card-img { aspect-ratio: 1 / 1; background: var(--mc-ivoire); overflow: hidden; }
.prod-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.prod-card:hover .prod-card-img img { transform: scale(1.045); }
.prod-card-nom { font-weight: 600; font-size: 0.98rem; color: var(--mc-navy); padding: 16px 16px 2px; }
.prod-card-prix { font-weight: 700; font-size: 0.92rem; color: var(--mc-red); padding: 0 16px 16px; }

/* ── État vide ── */
.prod-vide { text-align: center; padding: 70px 20px; color: #64748b; }
.prod-vide p { margin-bottom: 20px; font-size: 1rem; }

.acc-btn-ghost-dark {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--mc-navy);
    text-decoration: none;
    border-bottom: 1.5px solid rgba(11,30,61,0.3);
    padding-bottom: 2px;
}
.acc-btn-ghost-dark:hover { color: var(--mc-red); border-color: var(--mc-red); }

@media (prefers-reduced-motion: reduce) {
    .prod-card { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 640px) {
    .prod-header { padding: 48px 20px 40px; }
}

/* Tablette / mobile : le tri passe SOUS les puces, aligné à gauche, sans débordement */
@media (max-width: 860px) {
    .prod-bar { flex-direction: column; align-items: stretch; }
    .prod-controls { justify-content: flex-start; width: 100%; }
}
@media (max-width: 560px) {
    .prod-controls { flex-direction: column; align-items: stretch; }
    .prod-select-wrap { width: 100%; }
    .prod-select-wrap label { flex: 0 0 auto; min-width: 5.5em; }
    .prod-select-wrap select { flex: 1 1 auto; min-width: 0; width: 100%; }
    .prod-apply { width: 100%; }
}

/* Filtrage sans rechargement : la zone s'estompe pendant le chargement */
#prod-zone[aria-busy="true"] .prod-grille { opacity: 0.45; transition: opacity 0.15s ease; pointer-events: none; }
#prod-zone .prod-grille { transition: opacity 0.15s ease; }
