/* ============================================================
   DÉTAIL PRODUIT REFONTE — page « Article » (maquette)
   Fond blanc, hero infos/galerie, navigation produit, avis.
   Scopé sous .pd-v2.
   ============================================================ */

.pd-v2 {
    --pdx-navy: #0e295e;
    --pdx-navy-deep: #0a1f4a;
    --pdx-blue: #003ecd;
    --pdx-blue-deep: #0030a8;
    --pdx-yellow: #ffbc00;
    --pdx-ink: #10214a;
    --pdx-text: #46506b;
    --pdx-muted: #8a93ab;
    --pdx-border: #e5e9f4;
    --pdx-line: #eef1f8;
    --pdx-soft: #eef1f6;
    --pdx-red: #e5484d;

    /* tokens réutilisés par _product_catalog_card (.cat-card) dans les produits connexes */
    --cat-card: #ffffff;
    --cat-navy: #0e295e;
    --cat-navy-deep: #0a1f4a;
    --cat-blue: #003ecd;
    --cat-yellow: #ffbc00;
    --cat-text: #66708a;
    --cat-muted: #8a93ab;
    --cat-border: #e5e9f4;
    --cat-in: #18a32a;
    --cat-low: #d98a00;
    --cat-out: #d81d1d;
    --cat-red: #e5484d;

    margin-top: -80px;
    padding-top: clamp(92px, 10vw, 108px);
    padding-bottom: 72px;
    min-height: 100vh;
    background: #fff;
    color: var(--pdx-ink);
}
@media (max-width: 575px) { .pd-v2 { margin-top: -68px; padding-top: 84px; } }

.pd-v2 a { text-decoration: none; }
.pd-v2 *, .pd-v2 *::before, .pd-v2 *::after { box-sizing: border-box; }

.pdx-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 992px) { .pdx-wrap { padding: 0 24px; } }

/* ── Barre du haut ── */
.pdx-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.pdx-back {
    display: inline-grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 12px;
    color: var(--pdx-ink);
    background: #f4f6fb;
    transition: background 0.2s ease, transform 0.2s ease;
}
.pdx-back:hover { background: #e8edf8; color: var(--pdx-ink); transform: translateX(-2px); }

.pdx-nav { display: inline-flex; align-items: center; gap: 16px; }
.pdx-nav-count { font-size: 1.05rem; color: var(--pdx-muted); font-weight: 600; letter-spacing: 0.02em; }
.pdx-nav-count strong { color: var(--pdx-ink); font-weight: 800; font-size: 1.25rem; }
.pdx-nav-arrows { display: inline-flex; gap: 8px; }
.pdx-nav-arrow {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid var(--pdx-border);
    border-radius: 50%;
    color: var(--pdx-ink);
    background: #fff;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pdx-nav-arrow:hover { background: var(--pdx-navy); border-color: var(--pdx-navy); color: #fff; }
.pdx-nav-arrow.is-disabled { color: #cbd3e6; pointer-events: none; }

/* ── Fil d'ariane ── */
.pdx-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    font-size: 0.9rem;
}
.pdx-crumb a { color: var(--pdx-muted); }
.pdx-crumb a:hover { color: var(--pdx-blue); }
.pdx-crumb-sep { color: #c2cadb; }
.pdx-crumb-current { color: var(--pdx-ink); font-weight: 700; }

/* ============================================================
   HERO
   ============================================================ */
.pdx-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: 8px 0 20px;
}
@media (max-width: 900px) {
    .pdx-hero { grid-template-columns: 1fr; gap: 32px; }
    .pdx-gallery { grid-row: 1; }
}

/* ── Colonne infos ── */
.pdx-info { display: flex; flex-direction: column; }
.pdx-title {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 800;
    color: var(--pdx-navy);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
}

.pdx-priceline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.pdx-price { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 800; color: var(--pdx-navy); }
.pdx-price-old { font-size: 1.05rem; color: var(--pdx-muted); text-decoration: line-through; }
.pdx-rate { display: inline-flex; align-items: center; gap: 8px; }
.pdx-stars { display: inline-flex; align-items: center; color: var(--pdx-yellow); }
.pdx-rate-val { font-weight: 700; color: var(--pdx-ink); font-size: 0.92rem; }
.pdx-rate-count { color: var(--pdx-muted); font-size: 0.88rem; }

.pdx-desc {
    color: var(--pdx-text);
    font-size: 0.98rem;
    line-height: 1.8;
    margin: 0 0 24px;
    max-width: 46ch;
}

/* ── Couleurs (présentation) ── */
.pdx-colors { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.pdx-color { cursor: pointer; line-height: 0; }
.pdx-color input { position: absolute; opacity: 0; width: 0; height: 0; }
.pdx-color-dot {
    display: block;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--dot);
    box-shadow: inset 0 0 0 1px rgba(14, 25, 55, 0.12);
    outline: 2px solid transparent;
    outline-offset: 3px;
    transition: outline-color 0.18s ease, transform 0.18s ease;
}
.pdx-color:hover .pdx-color-dot { transform: scale(1.08); }
.pdx-color input:checked + .pdx-color-dot { outline-color: var(--pdx-navy); }

/* ── Achat ── */
.pdx-buy { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pdx-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pdx-border);
    border-radius: 12px;
    overflow: hidden;
    height: 54px;
}
.pdx-qty-btn {
    display: grid; place-items: center;
    width: 46px; height: 100%;
    border: none; background: #fff; color: var(--pdx-ink);
    cursor: pointer; line-height: 0;
    transition: background 0.18s ease;
}
.pdx-qty-btn:hover { background: #f4f6fb; }
.pdx-qty-input {
    width: 48px; height: 100%;
    border: none; text-align: center;
    font-size: 1rem; font-weight: 700; color: var(--pdx-ink);
    background: #fff; outline: none;
}
.pdx-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    padding: 0 30px;
    background: var(--pdx-blue);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 26px rgba(0, 62, 205, 0.20);
}
.pdx-cart:hover { background: var(--pdx-blue-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 62, 205, 0.28); }
.pdx-cart:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.pdx-cart svg { color: #fff; }

.pdx-outstock { display: inline-flex; align-items: center; gap: 6px; color: var(--pdx-red); font-size: 0.85rem; font-weight: 600; margin: 0 0 14px; }

.pdx-reassure {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--pdx-navy);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 6px 0 24px;
    padding-top: 20px;
    border-top: 1px solid var(--pdx-line);
}
.pdx-reassure svg { color: var(--pdx-blue); }
.pdx-reassure-sep { color: #c2cadb; margin: 0 4px; }

/* ── Favoris + partage ── */
.pdx-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pdx-fav {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: none;
    padding: 6px 0;
    color: var(--pdx-red);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
}
.pdx-fav:hover { color: #b91c22; }
.pdx-socials { display: inline-flex; align-items: center; gap: 8px; }
.pdx-socials a, .pdx-social-copy {
    display: inline-grid;
    place-items: center;
    width: 36px; height: 36px;
    border: 1px solid var(--pdx-border);
    border-radius: 50%;
    background: #fff;
    color: var(--pdx-muted);
    cursor: pointer;
    line-height: 0;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.pdx-socials a:hover, .pdx-social-copy:hover { background: var(--pdx-navy); border-color: var(--pdx-navy); color: #fff; transform: translateY(-2px); }

/* ── Galerie ── */
.pdx-gallery { position: relative; }
.pdx-gallery-flag {
    position: absolute;
    top: 16px; left: 16px;
    z-index: 2;
    background: var(--pdx-yellow);
    color: var(--pdx-navy);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 9px;
}
.pdx-gallery-main {
    background: var(--pdx-soft);
    border-radius: 22px;
    padding: clamp(24px, 4vw, 44px);
    height: clamp(320px, 42vw, 480px);
    overflow: hidden;
}
.pdx-gallery-main img { display: block; width: 100%; height: 100%; object-fit: contain; }

.pdx-thumbs { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.pdx-thumb {
    width: 92px; height: 92px;
    border: 1.5px solid var(--pdx-border);
    border-radius: 14px;
    background: var(--pdx-soft);
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.pdx-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdx-thumb:hover { transform: translateY(-2px); }
.pdx-thumb.active { border-color: var(--pdx-blue); border-width: 2px; }

/* ============================================================
   PANNEAU DESCRIPTION / AVIS
   ============================================================ */
.pdx-panel {
    margin-top: clamp(40px, 6vw, 68px);
    background: #fff;
    border: 1px solid var(--pdx-border);
    border-radius: 20px;
    padding: clamp(18px, 3vw, 30px);
    box-shadow: 0 14px 34px rgba(20, 40, 90, 0.05);
}
.pdx-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--pdx-line);
    margin-bottom: 22px;
}
.pd-v2 .pd-tab-btn {
    position: relative;
    background: none;
    border: none;
    padding: 12px 6px 16px;
    margin-right: 18px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--pdx-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}
.pd-v2 .pd-tab-btn::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--pdx-blue);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.pd-v2 .pd-tab-btn.active, .pd-v2 .pd-tab-btn:hover { color: var(--pdx-navy); }
.pd-v2 .pd-tab-btn.active::after { transform: scaleX(1); }

.pdx-desc-full {
    color: var(--pdx-text);
    font-size: 0.96rem;
    line-height: 1.85;
}
.pdx-desc-full :where(h1,h2,h3,h4) { color: var(--pdx-navy); font-weight: 800; margin: 1.2em 0 0.5em; }
.pdx-desc-full ul, .pdx-desc-full ol { padding-left: 1.2em; }
.pdx-desc-full img { max-width: 100%; height: auto; border-radius: 12px; }

.pdx-meta { display: flex; flex-wrap: wrap; gap: 10px 40px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--pdx-line); }
.pdx-meta-row { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.pdx-meta-label { color: var(--pdx-muted); font-weight: 600; }
.pdx-meta-row a { color: var(--pdx-blue); font-weight: 600; }
.pdx-meta-row span:not(.pdx-meta-label) { color: var(--pdx-ink); font-weight: 600; }

/* ── Avis ── */
.pdx-reviews { display: flex; flex-direction: column; gap: 26px; }
.pdx-review-overview {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    background: #f7f9fd;
    border: 1px solid var(--pdx-line);
    border-radius: 16px;
    padding: 22px 24px;
}
@media (max-width: 640px) { .pdx-review-overview { grid-template-columns: 1fr; gap: 18px; } }
.pdx-review-avg { text-align: center; }
.pdx-review-avg-num { font-size: 2.6rem; font-weight: 800; color: var(--pdx-navy); line-height: 1; }
.pdx-review-avg-stars { display: inline-flex; color: var(--pdx-yellow); margin: 8px 0 4px; }
.pdx-review-avg-label { font-size: 0.8rem; color: var(--pdx-muted); }
.pdx-review-bars { display: flex; flex-direction: column; gap: 8px; }
.pdx-review-bar-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--pdx-muted); }
.pdx-review-bar-star { display: inline-flex; align-items: center; gap: 3px; width: 34px; color: var(--pdx-ink); font-weight: 600; }
.pdx-review-bar-star svg { color: var(--pdx-yellow); }
.pdx-review-bar-track { flex: 1; height: 8px; border-radius: 20px; background: #e6ebf5; overflow: hidden; }
.pdx-review-bar-fill { height: 100%; border-radius: 20px; background: var(--pdx-yellow); }
.pdx-review-bar-pct { width: 40px; text-align: right; }

.pdx-review-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 820px) { .pdx-review-body { grid-template-columns: 1fr; } }
.pdx-review-list { display: flex; flex-direction: column; gap: 14px; }
.pdx-review-card { border: 1px solid var(--pdx-line); border-radius: 14px; padding: 16px 18px; }
.pdx-review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pdx-review-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #eef1f8; color: var(--pdx-navy); flex: 0 0 auto; }
.pdx-review-author { font-weight: 700; color: var(--pdx-ink); font-size: 0.9rem; }
.pdx-review-date { font-size: 0.76rem; color: var(--pdx-muted); }
.pdx-review-stars { margin-left: auto; display: inline-flex; color: var(--pdx-yellow); }
.pdx-review-text { margin: 0; color: var(--pdx-text); font-size: 0.9rem; line-height: 1.6; }
.pdx-review-empty { color: var(--pdx-muted); font-style: italic; margin: 0; }

.pdx-add-review { background: #f7f9fd; border: 1px solid var(--pdx-line); border-radius: 16px; padding: 20px; }
.pdx-add-review h6 { font-weight: 800; color: var(--pdx-navy); margin: 0 0 14px; }
.pdx-star-picker { display: flex; align-items: center; gap: 2px; color: var(--pdx-yellow); cursor: pointer; }
.pdx-review-textarea {
    width: 100%;
    border: 1px solid var(--pdx-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: var(--pdx-ink);
    resize: vertical;
    outline: none;
    margin-bottom: 14px;
    transition: border-color 0.2s ease;
}
.pdx-review-textarea:focus { border-color: var(--pdx-blue); }
.pdx-review-submit { width: 100%; }

/* ============================================================
   PRODUITS CONNEXES
   ============================================================ */
.pdx-related { margin-top: clamp(40px, 6vw, 64px); }
.pdx-related-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pdx-related-title { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; color: var(--pdx-navy); margin: 0; }
.pdx-related-link { display: inline-flex; align-items: center; gap: 6px; color: var(--pdx-blue); font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
.pdx-related-link:hover { color: var(--pdx-blue-deep); }
.pdx-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 1100px) { .pdx-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .pdx-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 480px)  { .pdx-related-grid { grid-template-columns: 1fr; } }
.pdx-related-grid .cat-card { width: 100%; }
