.product-container {
    position: relative;
    width: 100%;
    top: var(--navbar-height-desktop); /* Aligné avec hauteur navbar desktop : 174.8px */
    padding: 40px 0;
    margin-bottom: 150px;
}

.product-content {
    /* Même gabarit que la home : marges latérales généreuses, contenu plafonné. */
    width: min(100% - 2 * var(--page-pad-x), var(--content-max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

/* Galerie d'images */
.product-gallery {
    position: relative;
    align-content: center;
}

.zoom-container {
    position: relative;
    overflow: hidden;
}

.main-image {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 14px 18px rgba(0, 0, 0, 0.253);
    position: relative;
    cursor: pointer;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.main-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.2rem;
    gap: 10px;
    pointer-events: none;
}

.image-overlay i {
    font-size: 2rem;
}

.main-image:hover .image-overlay {
    opacity: 1;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap; /* Pour gérer plusieurs images */
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    transform: translateY(-3px);
}

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

/* Informations produit */
.product-info {
    padding: 20px;
}

.product-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.product-title {
    font-family: var(--font-family-display);
    font-weight: 500;
    font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-type {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 20px;
}

/* Bouton Wishlist */
.wishlist-btn {
    background: transparent;
    border: 2px solid var(--border-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-medium);
    font-size: 1.5rem;
}

.wishlist-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    transform: scale(1.1);
}

.wishlist-btn.active {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
}

.wishlist-btn.bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.product-description {
    margin: 20px 0;
    line-height: 1.6;
    color: #444;
}

/* Options de produit */
.product-options {
    margin-top: 30px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Options en ligne style Displate */
.options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.option-btn {
    padding: 12px 24px;
    border: 2px solid rgba(132, 79, 192, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-medium);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Signika', sans-serif;
}

.option-btn:hover {
    background: rgba(132, 79, 192, 0.05);
    border-color: rgba(132, 79, 192, 0.4);
    color: #844fc0;
}

.option-btn.active {
    border:0;
    background: linear-gradient(135deg, #844fc0, #ff4365);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(132, 79, 192, 0.3);
}

/* Desktop : le format s'affiche en ligne « Taille M - 49 x 35cm » (inchangé).
   La dimension redevient un bloc séparé en tablette/mobile (voir @media 1023). */
.opt-sub::before {
    content: ' - ';
}

.price-display {
    font-size: 1.8rem;
    font-weight: 600;
    color: #252525;
    margin: 20px 0;
    transition: transform 0.2s ease;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #844fc0, #ff4365);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(132, 79, 192, 0.3);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(132, 79, 192, 0.5);
    filter: brightness(1.1);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn.loading {
    background-color: var(--text-medium);
    cursor: not-allowed;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.add-to-cart-btn.success {
    background-color: #27ae60;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.delivery-info:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Ajouter un peu d'espace entre les options quand le support est masqué */
.product-options .option-group + .delivery-info {
    margin-top: 25px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-xl);
    font-size: 1rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 1.5rem;
}

.toast-success {
    border-left: 4px solid #27ae60;
}

.toast-success i {
    color: #27ae60;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-error i {
    color: #e74c3c;
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast-info i {
    color: #3498db;
}

/* Animations au scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Avis */
.reviews-section {
    /* Colonne de lecture resserrée et centrée, façon galerie d'avis. */
    width: min(100% - 2 * var(--page-pad-x), 960px);
    margin: 60px auto;
    padding: 36px clamp(20px, 3vw, 44px);
    background-color: #faf9fc;
    border-radius: 18px;
}

.reviews-section h2 {
    font-family: var(--font-family-display, serif);
    font-size: 2rem;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #844fc0, #ff4365);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.review-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-rating {
    color: #ffc107;
}

.review-comment {
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
}

.review-date {
    color: #999;
    font-size: 0.9rem;
}

.no-reviews {
    color: var(--text-medium);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Section Produits Similaires */
.similar-products-section {
    width: min(100% - 2 * var(--page-pad-x), var(--content-max));
    margin: 60px auto;
}

.similar-products-section h2 {
    font-family: var(--font-family-display, serif);
    font-size: 2rem;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #844fc0, #ff4365);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.similar-product-card {
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.similar-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(132, 79, 192, 0.3);
    border-color: rgba(132, 79, 192, 0.2);
}

.similar-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.similar-product-image img {
    background: white;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.similar-product-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.similar-product-info {
    padding: 15px;
}

.similar-product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.similar-product-info .price {
    color: var(--button-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================================= *
 *  Enrichissements dynamiques (avis & « Vous aimerez aussi »)
 * ============================================================= */

/* --- Apparition au scroll (fail-open : masqué seulement si JS actif) --- */
.js-enh .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-enh .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --- Synthèse des avis : note moyenne + histogramme --- */
.reviews-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 26px;
    background: var(--surface-card, #fff);
    padding: 18px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
}

.average-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 100px;
    padding-right: 24px;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
}

.rating-number {
    font-family: var(--font-family-display, serif);
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1;
    color: var(--color-primary, #844fc0);
}

.rating-stars i {
    color: #ffc107;
    font-size: 1.1rem;
}

.rating-count {
    color: var(--text-medium, #777);
    font-size: 0.9rem;
    margin-top: 4px;
}

.rating-distribution {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 8px;
    transition: background 0.2s ease;
    font: inherit;
    color: inherit;
}
.rating-bar-row:hover {
    background: rgba(132, 79, 192, 0.07);
}
.rating-bar-row.is-active {
    background: rgba(132, 79, 192, 0.14);
}

.rating-bar-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: 32px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark, #333);
}
.rating-bar-label i {
    color: #ffc107;
    font-size: 0.78rem;
}

.rating-bar-track {
    flex: 1;
    height: 10px;
    background: #ececf2;
    border-radius: 6px;
    overflow: hidden;
}

.rating-bar-fill {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(135deg, #844fc0, #ff4365);
}
.js-enh .rating-bar-fill {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-enh #reviewsSummary.in-view .rating-bar-fill {
    transform: scaleX(1);
}

.rating-bar-count {
    width: 26px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-medium, #777);
}

/* --- Barre d'outils des avis (filtre + tri) --- */
.reviews-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 16px;
}

.reviews-filter-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-medium, #777);
    background: rgba(132, 79, 192, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
}
.reviews-filter-status i {
    color: #844fc0;
}

.reviews-filter-clear {
    border: none;
    background: none;
    cursor: pointer;
    color: #ff4365;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0;
}
.reviews-filter-clear:hover {
    text-decoration: underline;
}

.reviews-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-medium, #777);
    margin-left: auto;
}
.reviews-sort select {
    font: inherit;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    color: var(--text-dark, #333);
}
.reviews-sort select:focus-visible {
    outline: 2px solid #844fc0;
    outline-offset: 1px;
}

.review-entry.is-hidden {
    display: none;
}

.reviews-empty-filter {
    text-align: center;
    color: var(--text-medium, #777);
    font-style: italic;
    padding: 20px;
}

/* --- Cartes d'avis : style « galerie » épuré (inspiration art-print) --- */
.reviews-section .avis-card {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.reviews-section .avis-card:hover {
    box-shadow: 0 8px 22px rgba(132, 79, 192, 0.12);
    transform: translateY(-2px);
}
.reviews-section .avis-author strong {
    color: var(--text-primary, #1a1a1a);
}
.reviews-section .avis-titre {
    font-family: var(--font-family-display, serif);
    color: var(--text-primary, #1a1a1a);
}

/* Empilement propre du résumé sur petits écrans (pas de filet vertical orphelin) */
@media (max-width: 640px) {
    .reviews-summary {
        gap: 18px;
    }
    .average-rating {
        border-right: none;
        padding-right: 0;
        min-width: 0;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }
    .rating-distribution {
        flex-basis: 100%;
    }
}

/* --- Carrousel « Vous aimerez aussi » --- */
.similar-carousel {
    position: relative;
}

.similar-products-track {
    display: flex;
    gap: 22px;
    justify-content: center;      /* peu de cartes -> centrées (plus tassées à gauche) */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 4px 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
/* Quand ça déborde (beaucoup de cartes), on repart de la gauche pour un scroll correct */
.similar-carousel.has-overflow .similar-products-track {
    justify-content: flex-start;
}
.similar-products-track::-webkit-scrollbar {
    display: none;
}

.similar-product-card-wrap {
    position: relative;
    flex: 0 0 clamp(230px, 26%, 300px);
    scroll-snap-align: start;
}

.similar-product-card-wrap .wishlist-btn.icon-only {
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Survol enrichi : zoom de l'image + overlay « Voir » */
.similar-product-image {
    position: relative;
}
.similar-product-image img {
    transition: transform 0.45s ease;
}
.similar-product-card:hover .similar-product-image img {
    transform: scale(1.06);
}

.similar-product-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(0deg, rgba(132, 79, 192, 0.55), rgba(255, 67, 101, 0.35));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.similar-product-card:hover .similar-product-overlay {
    opacity: 1;
}

/* Flèches de navigation */
.carousel-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #fff;
    color: #844fc0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.carousel-arrow:hover {
    background: #844fc0;
    color: #fff;
}
.carousel-prev {
    left: -12px;
}
.carousel-next {
    right: -12px;
}
.carousel-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}
.similar-carousel:not(.has-overflow) .carousel-arrow {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .js-enh .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .js-enh .rating-bar-fill {
        transform: scaleX(1);
        transition: none;
    }
    .similar-product-image img,
    .similar-products-track {
        transition: none;
    }
}

/* Contrôles admin */
.admin-controls {
    width: 81%;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    position: relative;
    z-index: 10;
}

.admin-btn, .delete-form button{
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: white;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-btn.edit {
    background-color: var(--button-primary);
}

.admin-btn.delete {
    background-color: var(--button-danger);
}

.admin-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.delete-form {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.delete-form button {
    background-color: var(--button-danger);
}

/* Modale */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        justify-content: center;
        align-items: center;
    }

    .modal.show {
        display: flex;
    }

    .modal-content {
        background-color: white;
        border-radius: 15px;
        padding: 25px;
        max-width: 500px;
        width: 90%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .modal-title {
        margin: 0;
        font-size: 1.5rem;
        color: var(--text-dark);
    }

    .close-modal {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--text-medium);
    }

    .close-modal:hover {
        color: var(--button-danger);
    }

    .modal-body {
        margin-bottom: 20px;
        color: #555;
        line-height: 1.5;
    }

    .modal-footer {
        display: flex;
        justify-content: center;
        gap: 10px;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .modal-btn {
        padding: 10px 20px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .modal-btn.primary {
        background-color: var(--button-primary);
        color: white;
    }

    .modal-btn.secondary {
        background-color: var(--text-medium);
        color: white;
    }

    .modal-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

/* Responsive */
@media (max-width: 1023px) {
    .product-content {
        margin-top: 40px;
        width: 100%;
        gap: 30px;
    }

    .admin-controls {
        width: 92%;
    }

    .product-title {
        font-size: 2rem;
    }

    /* ===== Zone d'achat plus compacte et lisible (tablette + mobile) ===== */
    .option-group {
        margin-bottom: 16px;
    }

    /* Format : grille de boutons compacts « nom / dimension » (style Displate) */
    #formatOptions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    #formatOptions .option-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 10px 6px;
        text-align: center;
    }
    #formatOptions .opt-name {
        font-weight: 600;
        font-size: 0.9rem;
        line-height: 1.15;
    }
    #formatOptions .opt-sub {
        font-size: 0.72rem;
        opacity: 0.85;
    }
    #formatOptions .opt-sub::before {
        content: none; /* pas de séparateur « - » en mode grille */
    }

    /* Support : boutons pleine largeur empilés, compacts */
    #supportOptions {
        flex-direction: column;
        gap: 8px;
    }
    #supportOptions .option-btn {
        width: 100%;
        text-align: center;
        padding: 11px 14px;
        font-size: 0.95rem;
    }

    /* Prix + panier resserrés sous les options */
    .price-display {
        font-size: 1.6rem;
        margin: 14px 0;
    }
    .add-to-cart-btn {
        padding: 13px;
        font-size: 1.05rem;
    }
}

@media (max-width: 767px) {

    .product-content {
        margin-top: 40px;
        width: 90%;
        grid-template-columns: 1fr;
    }

    .product-title {
        font-size: 2rem;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .admin-controls {
        width: 100%;
        justify-content: center;
    }

    .modal-dialog {
        width: 90%;
        margin: 70px auto;
    }

    .product-container {
        top: 300px;
        margin-bottom: 320px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }

    .format-checkbox {
        width: 100%;
    }

    /* Responsive pour avis et produits similaires */
    .reviews-section,
    .similar-products-section {
        width: 90%;
    }

    .similar-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .similar-product-image {
        height: 150px;
    }

    /* Responsive lightbox */
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .lightbox-counter {
        bottom: 10px;
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    /* Responsive toast */
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    /* Wishlist button */
    .wishlist-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .similar-products-grid {
        grid-template-columns: 1fr;
    }

    .product-header-row {
        align-items: center;
    }
}

/* ========================================
   SYSTÈME D'ÉTOILES MODERNE POUR AVIS
   ======================================== */

/* Container principal pour les étoiles */
.star-rating-container {
    margin: 15px 0;
}

/* Sélecteur d'étoiles */
.star-rating-selector {
    display: flex;
    gap: 12px;
    font-size: 2.5rem;
    cursor: pointer;
    margin-bottom: 10px;
}

/* Étoiles individuelles */
.star-rating-item {
    color: var(--border-light);
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Étoile au survol */
.star-rating-item:hover {
    transform: scale(1.2);
    color: #FFD700;
}

/* Étoile sélectionnée */
.star-rating-item.selected {
    color: #FFD700;
}

/* Effet de remplissage au hover (étoiles avant l'étoile survolée) */
.star-rating-selector:hover .star-rating-item {
    color: var(--border-light);
}

.star-rating-selector .star-rating-item:hover,
.star-rating-selector .star-rating-item:hover ~ .star-rating-item {
    color: var(--border-light);
}

/* Les étoiles avant celle survolée deviennent dorées */
.star-rating-selector:has(.star-rating-item:nth-child(1):hover) .star-rating-item:nth-child(1),
.star-rating-selector:has(.star-rating-item:nth-child(2):hover) .star-rating-item:nth-child(1),
.star-rating-selector:has(.star-rating-item:nth-child(2):hover) .star-rating-item:nth-child(2),
.star-rating-selector:has(.star-rating-item:nth-child(3):hover) .star-rating-item:nth-child(1),
.star-rating-selector:has(.star-rating-item:nth-child(3):hover) .star-rating-item:nth-child(2),
.star-rating-selector:has(.star-rating-item:nth-child(3):hover) .star-rating-item:nth-child(3),
.star-rating-selector:has(.star-rating-item:nth-child(4):hover) .star-rating-item:nth-child(1),
.star-rating-selector:has(.star-rating-item:nth-child(4):hover) .star-rating-item:nth-child(2),
.star-rating-selector:has(.star-rating-item:nth-child(4):hover) .star-rating-item:nth-child(3),
.star-rating-selector:has(.star-rating-item:nth-child(4):hover) .star-rating-item:nth-child(4),
.star-rating-selector:has(.star-rating-item:nth-child(5):hover) .star-rating-item:nth-child(1),
.star-rating-selector:has(.star-rating-item:nth-child(5):hover) .star-rating-item:nth-child(2),
.star-rating-selector:has(.star-rating-item:nth-child(5):hover) .star-rating-item:nth-child(3),
.star-rating-selector:has(.star-rating-item:nth-child(5):hover) .star-rating-item:nth-child(4),
.star-rating-selector:has(.star-rating-item:nth-child(5):hover) .star-rating-item:nth-child(5) {
    color: #FFD700;
}

/* Texte descriptif sous les étoiles */
.rating-text {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    min-height: 24px;
    transition: color 0.3s ease;
}

/* Style du formulaire d'avis */
.review-form .form-group {
    margin-bottom: 25px;
}

.review-form .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.05rem;
}

.review-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.review-form .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Responsive pour mobile */
@media (max-width: 767px) {
    .star-rating-selector {
        font-size: 2rem;
        gap: 8px;
    }

    .rating-text {
        font-size: 0.9rem;
    }
}