/* ============================================
   SINGLE.CSS — Page produit v2
   ============================================ */

body { margin-top: 80px !important; }

/* ---- Wrapper ---- */
.single-wrap {
    background: #f4f5f7;
    min-height: calc(100vh - 80px);
    padding: 1.5rem 0 5rem;
}
.single-wrap .container { max-width: 1100px; }

/* ---- Breadcrumb ---- */
.single-breadcrumb {
    font-size: .82rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.single-breadcrumb a { color: #6366f1; text-decoration: none; }
.single-breadcrumb a:hover { text-decoration: underline; }
.single-breadcrumb .sep { color: #d1d5db; }

/* ---- Grid deux colonnes ---- */
.single-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

/* ---- Cards génériques ---- */
.single-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.single-card:last-child { margin-bottom: 0; }
.single-card-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: .9rem;
    padding-bottom: .6rem;
    border-bottom: 1.5px solid #f3f4f6;
}

/* ---- Photo wrap ---- */
.single-photo-wrap {
    position: relative;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.single-photo-wrap .carousel { margin: 0; }
.single-photo-wrap .carousel-item img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}
.single-photo-wrap .carousel-indicators li {
    background-color: rgba(255,255,255,.6);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
}
.single-photo-wrap .carousel-indicators li.active {
    background-color: #fff;
}

/* État badge */
.single-etat-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .8rem;
    border-radius: 20px;
    backdrop-filter: blur(6px);
}
.single-etat-badge.neuf        { background: rgba(16,185,129,.8); }
.single-etat-badge.comme-neuf  { background: rgba(59,130,246,.8); }
.single-etat-badge.bon-etat    { background: rgba(245,158,11,.8); }
.single-etat-badge.correct     { background: rgba(249,115,22,.8); }
.single-etat-badge.pieces      { background: rgba(239,68,68,.8); }

/* Boutons photo overlay */
.single-photo-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    gap: .4rem;
}
.single-photo-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    transition: background .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.single-photo-btn:hover { background: #fff; }
.single-photo-btn.active { color: #ef4444; }

/* Vues badge */
.single-vues-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ---- Description ---- */
.single-description {
    font-size: .93rem;
    color: #374151;
    line-height: 1.75;
}
.single-description-empty {
    font-size: .9rem;
    color: #9ca3af;
    font-style: italic;
}

/* ---- Caractéristiques chips ---- */
.single-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
}
.single-spec-chip {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: .65rem .85rem;
}
.single-spec-chip .chip-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.single-spec-chip .chip-label svg { flex-shrink: 0; color: #6366f1; }
.single-spec-chip .chip-value {
    font-weight: 600;
    color: #111827;
    font-size: .9rem;
}

/* ---- Carte principale droite ---- */
.single-main-card {
    border-radius: 16px;
    border: 1px solid #eaecf0;
    box-shadow: 0 4px 24px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    padding: 1.5rem;
}
.single-main-card .single-title {
    font-size: 1.25rem;
    margin-bottom: .25rem;
}
.single-main-card .single-meta-row {
    gap: .45rem;
    margin-bottom: 1.1rem;
    font-size: .8rem;
}

/* ---- Côté droit — Titre & meta ---- */
.single-garantie-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .75rem;
    border-radius: 20px;
    margin-bottom: .7rem;
}
.single-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .25rem;
    line-height: 1.3;
}
.single-meta-row {
    display: flex;
    gap: .45rem;
    align-items: center;
    font-size: .8rem;
    color: #9ca3af;
    margin-bottom: .7rem;
    flex-wrap: wrap;
}
.single-meta-row svg { vertical-align: -2px; margin-right: .15rem; }
.single-meta-row .sep { color: #d1d5db; }

/* ---- Séparateur interne carte ---- */
.single-divider {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: .7rem 0 .85rem;
}

/* ---- Prix ---- */
.single-price-block {
    margin-bottom: .85rem;
    display: flex;
    align-items: baseline;
    gap: .55rem;
}
.single-price {
    font-size: 2.15rem;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
    letter-spacing: -.02em;
}
.single-price-original {
    font-size: .88rem;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: line-through;
}

/* ---- Bannière IA ---- */
.single-ia-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: .7rem .9rem;
    font-size: .82rem;
    color: #059669;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    line-height: 1.55;
}
.single-ia-banner svg { flex-shrink: 0; margin-top: 2px; color: #10b981; }
.single-ia-banner strong {
    color: #065f46;
    display: block;
    font-size: .83rem;
    margin-bottom: .15rem;
}

/* ---- Boutons CTA ---- */
.btn-acheter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .85rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    margin-bottom: .5rem;
    text-decoration: none;
}
.btn-acheter:hover { opacity: .9; color: #fff; transform: translateY(-1px); }
.btn-acheter:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; transform: none; }

.btn-contact-vendeur {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .9rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #6366f1 0%, #06b6d4 100%);
    color: #fff;
    font-size: .97rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    margin-bottom: .5rem;
    text-decoration: none;
    letter-spacing: .01em;
}
.btn-contact-vendeur:hover { opacity: .88; color: #fff; transform: translateY(-1px); }

.btn-favoris-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .75rem 1.25rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    margin-bottom: .5rem;
    text-decoration: none;
}
.btn-favoris-outline:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.btn-favoris-outline.active { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* ---- Fiche technique (table specs) ---- */
.single-specs-table {
    width: 100%;
    border-collapse: collapse;
}
.single-specs-table tr {
    border-bottom: 1px solid #f3f4f6;
}
.single-specs-table tr:last-child { border-bottom: none; }
.single-specs-table td {
    padding: .55rem .1rem;
    font-size: .88rem;
    vertical-align: middle;
}
.single-specs-table td:first-child { color: #6b7280; }
.single-specs-table td:last-child {
    color: #111827;
    font-weight: 600;
    text-align: right;
}

/* ---- Livraison ---- */
.single-livraison-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: .88rem;
    color: #374151;
}
.single-livraison-row:last-child { border-bottom: none; padding-bottom: 0; }
.single-livraison-row:first-child { padding-top: 0; }
.single-livraison-row img { height: 22px; object-fit: contain; flex-shrink: 0; }
.single-livraison-row .livraison-price {
    margin-left: auto;
    font-size: .78rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: .2rem .65rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

/* ---- Sécurité ---- */
.single-securite-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .87rem;
    color: #374151;
    padding: .35rem 0;
}
.single-securite-item a { color: #9ca3af; text-decoration: none; }
.single-securite-item a:hover { color: #6366f1; }

/* ---- Vendeur ---- */
.single-vendeur {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}
.single-vendeur-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.single-vendeur-name { font-weight: 600; color: #111827; font-size: .95rem; }
.single-vendeur-sub  { font-size: .78rem; color: #9ca3af; }

/* ---- Bouton signaler ---- */
.btn-signaler-link {
    background: none;
    border: none;
    padding: 0;
    color: #9ca3af;
    font-size: inherit;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    line-height: inherit;
}
.btn-signaler-link:hover { color: #f59e0b; text-decoration: underline; }

/* ---- Modal signaler ---- */
.signaler-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.16);
    overflow: visible;
}
.signaler-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1.1rem;
    border-bottom: 1.5px solid #f3f4f6;
}
.signaler-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff7ed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
}
.signaler-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 .15rem;
    line-height: 1.3;
}
.signaler-modal-sub {
    font-size: .82rem;
    color: #6b7280;
    margin: 0;
}
.signaler-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.signaler-close-btn:hover { color: #374151; }

.signaler-modal-body { padding: 1.25rem 1.5rem; }
.signaler-field { margin-bottom: 1.1rem; }
.signaler-field:last-of-type { margin-bottom: 0; }
.signaler-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .5rem;
    letter-spacing: .01em;
}
.signaler-label-opt { color: #9ca3af; font-weight: 400; }

.signaler-textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .9rem;
    color: #1f2937;
    background: #fff;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color .15s, box-shadow .15s;
}
.signaler-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.signaler-textarea::placeholder { color: #c4cada; }

#signaler-feedback {
    font-size: .84rem;
    padding: .55rem .8rem;
    border-radius: 8px;
    margin-top: .75rem;
}

.signaler-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    padding: 1rem 1.5rem 1.4rem;
    border-top: 1.5px solid #f3f4f6;
}
.signaler-btn-cancel {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.1rem;
    font-size: .88rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background .15s;
}
.signaler-btn-cancel:hover { background: #e5e7eb; }
.signaler-btn-send {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.signaler-btn-send:hover { background: #dc2626; transform: translateY(-1px); }
.signaler-btn-send:disabled { background: #fca5a5; cursor: not-allowed; transform: none; }

/* ---- Custom select (cselect) — utilisé dans la modale signaler ---- */
#motif-cselect { position: relative; }
#motif-cselect .cselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .7rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: .92rem;
    color: #c4cada;
    transition: border-color .15s, box-shadow .15s;
    user-select: none;
}
#motif-cselect .cselect-trigger.has-val { color: #1f2937; }
#motif-cselect .cselect-trigger:hover { border-color: #a5b4fc; }
#motif-cselect.open .cselect-trigger {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    border-radius: 8px 8px 0 0;
}
#motif-cselect .cselect-val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#motif-cselect .cselect-chevron { flex-shrink: 0; color: #9ca3af; transition: transform .2s; }
#motif-cselect.open .cselect-chevron { transform: rotate(180deg); color: #6366f1; }

#motif-cselect .cselect-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #6366f1;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(99,102,241,.12);
    z-index: 1200;
    overflow: hidden;
}
#motif-cselect.open .cselect-dropdown { display: block; }

#motif-cselect .cselect-options {
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#motif-cselect .cselect-options::-webkit-scrollbar { width: 5px; }
#motif-cselect .cselect-options::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 99px; }

#motif-cselect .cselect-option {
    padding: .65rem 1rem;
    font-size: .9rem;
    color: #374151;
    cursor: pointer;
    transition: background .1s, color .1s;
}
#motif-cselect .cselect-option:hover { background: #f5f3ff; color: #6366f1; }
#motif-cselect .cselect-option.is-selected { background: #eef2ff; color: #6366f1; font-weight: 600; }

/* ---- Section carrousel "Dans la même catégorie" ---- */
.sc-section {
    background: #f4f5f7;
    padding: 2.5rem 0 3.5rem;
}
.sc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.sc-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}
.sc-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sc-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    transition: border-color .15s, background .15s, color .15s;
    flex-shrink: 0;
}
.sc-arrow:hover:not(:disabled) {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
.sc-arrow:disabled {
    opacity: .35;
    cursor: default;
}
.sc-see-all {
    font-size: .82rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    margin-left: .25rem;
}
.sc-see-all:hover { text-decoration: underline; color: #6366f1; }

/* Carrousel — outer clip + inner sliding track */
.sc-outer {
    overflow: hidden;
}
.sc-track {
    display: flex;
    gap: 1rem;
    transition: transform .38s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.sc-card {
    flex: 0 0 calc(25% - 12px);
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .15s, border-color .15s;
}
.sc-card:hover {
    box-shadow: 0 8px 28px rgba(99,102,241,.13);
    transform: translateY(-3px);
    border-color: #c7d2fe;
    text-decoration: none;
    color: inherit;
}
.sc-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f4f6;
}
.sc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.sc-card:hover .sc-img-wrap img { transform: scale(1.04); }
.sc-etat {
    position: absolute;
    top: .5rem;
    left: .5rem;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 20px;
    background: rgba(0,0,0,.48);
    color: #fff;
    backdrop-filter: blur(4px);
}
.sc-etat.neuf       { background: rgba(16,185,129,.82); }
.sc-etat.comme-neuf { background: rgba(59,130,246,.82); }
.sc-etat.bon-etat   { background: rgba(245,158,11,.82); }
.sc-etat.correct    { background: rgba(249,115,22,.82); }
.sc-etat.pieces     { background: rgba(239,68,68,.82); }
.sc-body {
    padding: .7rem .85rem .8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .28rem;
}
.sc-titre {
    font-size: .86rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
}
.sc-loc {
    font-size: .74rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.sc-loc svg { flex-shrink: 0; }
.sc-prix {
    font-size: 1.05rem;
    font-weight: 800;
    color: #6366f1;
    margin-top: auto;
    padding-top: .3rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .single-grid  { grid-template-columns: 1fr; }
    .single-right { order: -1; }
    .sc-card { flex: 0 0 calc(33.333% - 11px); }
}
@media (max-width: 600px) {
    .sc-card { flex: 0 0 calc(50% - 8px); }
}
@media (max-width: 576px) {
    .single-specs-grid { grid-template-columns: 1fr; }
    .single-title  { font-size: 1.2rem; }
    .single-price  { font-size: 1.7rem; }
    .single-card   { padding: 1rem; }
}
@media (max-width: 380px) {
    .sc-card { flex: 0 0 100%; }
}

/* ---- Toast notification favoris ---- */
.fav-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    background: #1f2937;
    color: #fff;
    padding: .5rem 1.2rem;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 2100;
}
.fav-toast.fav-toast-show   { opacity: 1; transform: translateX(-50%) translateY(0); }
.fav-toast.fav-toast-add    { background: #10b981; }
.fav-toast.fav-toast-remove { background: #ef4444; }
@media (max-width: 576px) {
    .fav-toast { top: auto; bottom: 100px; transform: translateX(-50%) translateY(12px); }
    .fav-toast.fav-toast-show { transform: translateX(-50%) translateY(0); }
}

/* ============================================
   MOBILE BAR (caché sur desktop)
   ============================================ */
.single-mobile-bar { display: none; }
.single-mb-contact,
.single-mb-acheter { cursor: pointer; }

/* ============================================
   MOBILE LEBONCOIN — ≤576px
   ============================================ */
@media (max-width: 576px) {

    body { margin-top: 60px !important; }

    /* Fond blanc, pas de padding vertical */
    .single-wrap {
        background: #fff;
        padding: 0;
        min-height: auto;
    }
    .single-breadcrumb { display: none; }

    /* Flex colonne + display:contents sur single-left
       → les enfants de single-left deviennent des flex-items directs */
    .single-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    /* display:contents sur les deux colonnes → tous les enfants
       deviennent des flex-items directs de .single-grid */
    .single-left  { display: contents; }
    .single-right { display: contents; }

    /* Forcer 100% de largeur sur tous les flex-items issus des deux colonnes
       (display:contents ne propage pas automatiquement align-items:stretch) */
    .single-left  > *,
    .single-right > * { width: 100%; box-sizing: border-box; }

    /* Ordre : photo → titre/prix → description → fiche technique →
               livraison → caractéristiques → sécurité → vendeur */
    .single-photo-wrap             { order: 1; }  /* photo */
    .single-main-card              { order: 2; }  /* titre + prix */
    .single-left  > *:nth-child(2) { order: 3; }  /* description */
    .single-right > *:nth-child(3) { order: 4; }  /* fiche technique */
    .single-right > *:nth-child(4) { order: 5; }  /* livraison */
    .single-left  > *:nth-child(3) { order: 6; }  /* caractéristiques */
    .single-left  > *:nth-child(4) { order: 7; }  /* sécurité */
    .single-right > *:nth-child(2) { order: 8; }  /* vendeur (en dernier) */

    /* Photo pleine largeur */
    .single-photo-wrap {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        border-radius: 0;
        border: none;
        box-shadow: none;
        margin-bottom: 0;
    }
    /* Pas de max-height sur l'image : évite la réduction de largeur pendant la transition */

    /* Cards plates avec séparateur gris épais */
    .single-card {
        border-radius: 0;
        border: none;
        border-bottom: 8px solid #f4f5f7;
        box-shadow: none;
        margin-bottom: 0;
        padding: 1rem;
    }
    /* Annule le last-child du bloc général pour que tous aient un séparateur */
    .single-card:last-child { border-bottom: 8px solid #f4f5f7; }
    /* Vendeur = dernier bloc visible (order:8) → pas de bordure basse */
    .single-right > *:nth-child(2) { border-bottom: 0; }

    /* Carte principale : titre / prix */
    .single-main-card { padding: .85rem 1rem .5rem; }
    .single-title  { font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin-bottom: .4rem; }
    .single-price  { font-size: 1.8rem; font-weight: 900; }
    .single-garantie-badge { font-size: .75rem; }
    .single-main-card .single-divider { display: none; }
    .single-ia-banner { font-size: .79rem; margin: .4rem 0 .6rem; }

    /* Masquer les CTA desktop (remplacés par la barre fixe) */
    .single-main-card .btn-contact-vendeur,
    .single-main-card form[name="stripe_payment"] { display: none; }

    /* Spec chips : 1 par ligne sur très petit écran */
    .single-specs-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }

    /* Barre fixe en bas */
    .single-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: .6rem 1rem;
        padding-bottom: calc(.6rem + env(safe-area-inset-bottom));
        gap: .6rem;
        align-items: stretch;
    }
    .single-mb-contact {
        flex: 1;
        padding: .7rem .5rem;
        border: 2px solid #6366f1;
        background: transparent;
        color: #6366f1;
        border-radius: 10px;
        font-weight: 700;
        font-size: .9rem;
        text-align: center;
    }
    .single-mb-acheter {
        flex: 1.5;
        padding: .7rem .5rem;
        border: none;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: #fff;
        border-radius: 10px;
        font-weight: 700;
        font-size: .9rem;
        text-align: center;
    }
    .single-mb-acheter:disabled {
        background: #9ca3af;
        cursor: not-allowed;
    }

    /* Carousel section */
    .sc-section { border-radius: 0; padding: 1.5rem 1rem; }
}

/* ================================================
   Modal — Contacter le vendeur
   ================================================ */
.contact-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.16);
    overflow: hidden;
}

.contact-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 1.5rem 1.1rem;
    border-bottom: 1.5px solid #f3f4f6;
}

.contact-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 .2rem;
    line-height: 1.3;
}

.contact-modal-sub {
    font-size: .82rem;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.contact-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.contact-close-btn:hover { color: #374151; }

.contact-modal-body {
    padding: 1.25rem 1.5rem 1rem;
}

.contact-textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: .8rem 1rem;
    font-size: .9rem;
    color: #1f2937;
    background: #fff;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color .15s, box-shadow .15s;
}
.contact-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.contact-textarea::placeholder { color: #c4cada; }

.contact-hint {
    font-size: .78rem;
    color: #9ca3af;
    margin: .6rem 0 0;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.contact-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    padding: .9rem 1.5rem 1.3rem;
    border-top: 1.5px solid #f3f4f6;
}

.contact-btn-cancel {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.2rem;
    font-size: .88rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background .15s;
}
.contact-btn-cancel:hover { background: #e5e7eb; }

.contact-btn-send {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    padding: .6rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.contact-btn-send:hover { background: #4f46e5; transform: translateY(-1px); }
.contact-btn-send:disabled { background: #c4b5fd; cursor: not-allowed; transform: none; }

/* ============================================
   DARK MODE
   ============================================ */
body[data-theme="dark"] .single-wrap { background: #0f172a; }
body[data-theme="dark"] .single-breadcrumb { color: #64748b; }
body[data-theme="dark"] .single-breadcrumb .sep { color: #475569; }

body[data-theme="dark"] .single-card {
    background: #1e293b;
    border-color: #334155;
}
body[data-theme="dark"] .single-card-title {
    color: #64748b;
    border-color: #334155;
}

body[data-theme="dark"] .single-photo-wrap {
    background: #1e293b;
    border-color: #334155;
}

body[data-theme="dark"] .single-description { color: #cbd5e1; }
body[data-theme="dark"] .single-description-empty { color: #64748b; }

body[data-theme="dark"] .single-spec-chip {
    background: #0f172a;
    border-color: #334155;
}
body[data-theme="dark"] .single-spec-chip .chip-label { color: #64748b; }
body[data-theme="dark"] .single-spec-chip .chip-value { color: #f1f5f9; }

body[data-theme="dark"] .single-main-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 24px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.08);
}
body[data-theme="dark"] .single-title { color: #f1f5f9; }
body[data-theme="dark"] .single-meta-row { color: #64748b; }
body[data-theme="dark"] .single-meta-row .sep { color: #475569; }
body[data-theme="dark"] .single-divider { border-color: #334155; }

body[data-theme="dark"] .single-price { color: #a5b4fc; }
body[data-theme="dark"] .single-price-original { color: #64748b; }

body[data-theme="dark"] .single-ia-banner {
    background: rgba(16,185,129,.1);
    border-color: rgba(16,185,129,.25);
    color: #34d399;
}
body[data-theme="dark"] .single-ia-banner strong { color: #6ee7b7; }

body[data-theme="dark"] .single-garantie-badge {
    background: rgba(251,191,36,.1);
    border-color: rgba(251,191,36,.25);
    color: #fbbf24;
}

body[data-theme="dark"] .btn-favoris-outline {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body[data-theme="dark"] .btn-favoris-outline:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239,68,68,.08);
}

body[data-theme="dark"] .single-specs-table tr { border-color: #334155; }
body[data-theme="dark"] .single-specs-table td:first-child { color: #94a3b8; }
body[data-theme="dark"] .single-specs-table td:last-child { color: #f1f5f9; }

body[data-theme="dark"] .single-livraison-row {
    border-color: #334155;
    color: #cbd5e1;
}
body[data-theme="dark"] .single-livraison-row .livraison-price {
    background: #0f172a;
    color: #94a3b8;
}

body[data-theme="dark"] .single-securite-item { color: #cbd5e1; }
body[data-theme="dark"] .single-securite-item a { color: #64748b; }
body[data-theme="dark"] .single-securite-item a:hover { color: #a5b4fc; }

body[data-theme="dark"] .single-vendeur-name { color: #f1f5f9; }
body[data-theme="dark"] .single-vendeur-sub { color: #64748b; }
body[data-theme="dark"] .btn-signaler-link { color: #64748b; }

/* Modals dark mode */
body[data-theme="dark"] .signaler-modal-content,
body[data-theme="dark"] .contact-modal-content {
    background: #1e293b !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
body[data-theme="dark"] .signaler-modal-header,
body[data-theme="dark"] .contact-modal-header { border-color: #334155; }
body[data-theme="dark"] .signaler-modal-title,
body[data-theme="dark"] .contact-modal-title { color: #f1f5f9; }
body[data-theme="dark"] .signaler-modal-sub,
body[data-theme="dark"] .contact-modal-sub { color: #94a3b8; }
body[data-theme="dark"] .signaler-close-btn,
body[data-theme="dark"] .contact-close-btn { color: #64748b; }
body[data-theme="dark"] .signaler-close-btn:hover,
body[data-theme="dark"] .contact-close-btn:hover { color: #f1f5f9; }
body[data-theme="dark"] .signaler-label { color: #cbd5e1; }
body[data-theme="dark"] .signaler-textarea,
body[data-theme="dark"] .contact-textarea {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}
body[data-theme="dark"] .signaler-modal-footer,
body[data-theme="dark"] .contact-modal-footer { border-color: #334155; }
body[data-theme="dark"] .signaler-btn-cancel,
body[data-theme="dark"] .contact-btn-cancel {
    background: #334155;
    color: #e2e8f0;
}
body[data-theme="dark"] .signaler-btn-cancel:hover,
body[data-theme="dark"] .contact-btn-cancel:hover { background: #475569; }
body[data-theme="dark"] .contact-hint { color: #64748b; }

/* Custom select dark */
body[data-theme="dark"] #motif-cselect .cselect-trigger {
    background: #0f172a;
    border-color: #475569;
    color: #64748b;
}
body[data-theme="dark"] #motif-cselect .cselect-trigger.has-val { color: #f1f5f9; }
body[data-theme="dark"] #motif-cselect .cselect-dropdown {
    background: #1e293b;
    border-color: #6366f1;
}
body[data-theme="dark"] #motif-cselect .cselect-option { color: #cbd5e1; }
body[data-theme="dark"] #motif-cselect .cselect-option:hover { background: #334155; color: #a5b4fc; }
body[data-theme="dark"] #motif-cselect .cselect-option.is-selected { background: rgba(99,102,241,.15); color: #a5b4fc; }

/* Carousel dark */
body[data-theme="dark"] .sc-section { background: #0f172a; }
body[data-theme="dark"] .sc-heading { color: #f1f5f9; }
body[data-theme="dark"] .sc-card {
    background: #1e293b;
    border-color: #334155;
}
body[data-theme="dark"] .sc-card:hover { border-color: #6366f1; }
body[data-theme="dark"] .sc-img-wrap { background: #0f172a; }
body[data-theme="dark"] .sc-titre { color: #f1f5f9; }
body[data-theme="dark"] .sc-loc { color: #64748b; }
body[data-theme="dark"] .sc-prix { color: #a5b4fc; }
body[data-theme="dark"] .sc-arrow {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
body[data-theme="dark"] .sc-arrow:hover:not(:disabled) {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
}

/* Mobile bar dark */
@media (max-width: 576px) {
    body[data-theme="dark"] .single-wrap { background: #0f172a; }
    body[data-theme="dark"] .single-card { border-bottom-color: #1e293b; }
    body[data-theme="dark"] .single-mobile-bar {
        background: #1e293b;
        border-color: #334155;
    }
    body[data-theme="dark"] .single-mb-contact {
        border-color: #6366f1;
        color: #a5b4fc;
        background: transparent;
    }
}
