templates/home/shop.html.twig line 1

Open in your IDE?
  1. {% extends 'base_home.html.twig' %}
  2. {% block title %}
  3.     {{ shop.name }}
  4.     | MaketOu
  5. {% endblock %}
  6. {% block stylesheets %}
  7.     <style>
  8.         /* Style pour la description formatée de la boutique */
  9.         .shop-description-content {
  10.             line-height: 1.6;
  11.             color: #333;
  12.         }
  13.         
  14.         .shop-description-content h1, 
  15.         .shop-description-content h2, 
  16.         .shop-description-content h3 {
  17.             color: #ffa200;
  18.             margin-top: 1.5rem;
  19.             margin-bottom: 1rem;
  20.         }
  21.         
  22.         .shop-description-content h1 { font-size: 1.75rem; }
  23.         .shop-description-content h2 { font-size: 1.5rem; }
  24.         .shop-description-content h3 { font-size: 1.25rem; }
  25.         
  26.         .shop-description-content ul, 
  27.         .shop-description-content ol {
  28.             margin-left: 1.5rem;
  29.             margin-bottom: 1rem;
  30.         }
  31.         
  32.         .shop-description-content li {
  33.             margin-bottom: 0.5rem;
  34.         }
  35.         
  36.         .shop-description-content p {
  37.             margin-bottom: 1rem;
  38.         }
  39.         
  40.         .shop-description-content a {
  41.             color: #ffa200;
  42.             text-decoration: underline;
  43.         }
  44.         
  45.         .shop-description-content a:hover {
  46.             color: #e8910a;
  47.         }
  48.         
  49.         .shop-description-content img {
  50.             max-width: 100%;
  51.             height: auto;
  52.             border-radius: 8px;
  53.             margin: 1rem 0;
  54.         }
  55.         
  56.         .shop-description-content blockquote {
  57.             border-left: 4px solid #ffa200;
  58.             padding-left: 1rem;
  59.             margin: 1rem 0;
  60.             font-style: italic;
  61.             color: #666;
  62.         }
  63.         
  64.         .shop-description-content table {
  65.             width: 100%;
  66.             border-collapse: collapse;
  67.             margin: 1rem 0;
  68.         }
  69.         
  70.         .shop-description-content table th,
  71.         .shop-description-content table td {
  72.             border: 1px solid #ddd;
  73.             padding: 0.5rem;
  74.         }
  75.         
  76.         .shop-description-content table th {
  77.             background-color: #f8f9fa;
  78.             font-weight: bold;
  79.         }
  80.         
  81.         /* Design eBay-like intégré avec Karma - Pleine largeur */
  82.         .shop-header {
  83.             background: #f7f7f7;
  84.             border-bottom: 1px solid #e1e1e1;
  85.             padding: 0;
  86.             margin-bottom: 0;
  87.             width: 100%;
  88.             position: relative;
  89.         }
  90.         .shop-banner {
  91.             width: 100%;
  92.             height: 350px;
  93.             background-size: cover;
  94.             background-position: center;
  95.             background-repeat: no-repeat;
  96.             position: relative;
  97.             display: flex;
  98.             align-items: center;
  99.             justify-content: center;
  100.         }
  101.         /* Carrousel eBay-style amélioré */
  102.         .shop-carousel-ebay {
  103.             width: 100%;
  104.             height: 450px;
  105.             position: relative;
  106.             overflow: hidden;
  107.             background: #f8f9fa;
  108.             border-radius: 8px;
  109.             box-sizing: border-box;
  110.             margin-bottom: 0;
  111.             transition: height 0.3s ease;
  112.         }
  113.         .carousel-container {
  114.             position: relative;
  115.             width: 100%;
  116.             height: 100%;
  117.         }
  118.         .carousel-slide {
  119.             position: absolute;
  120.             top: 0;
  121.             left: 0;
  122.             width: 100%;
  123.             height: 100%;
  124.             background-size: cover;
  125.             background-position: center;
  126.             background-repeat: no-repeat;
  127.             opacity: 0;
  128.             transition: opacity 0.6s ease-in-out;
  129.         }
  130.         
  131.         /* Amélioration responsive pour les images */
  132.         @media (max-width: 768px) {
  133.             .carousel-slide {
  134.                 background-size: cover;
  135.                 background-position: center center;
  136.             }
  137.         }
  138.         .carousel-slide.active {
  139.             opacity: 1;
  140.         }
  141.         .carousel-controls {
  142.             position: absolute;
  143.             bottom: 20px;
  144.             left: 50%;
  145.             transform: translateX(-50%);
  146.             display: flex;
  147.             gap: 10px;
  148.             z-index: 10;
  149.         }
  150.         .carousel-btn {
  151.             width: 40px;
  152.             height: 40px;
  153.             border: none;
  154.             border-radius: 50%;
  155.             background: rgba(255, 255, 255, 0.9);
  156.             color: #333;
  157.             font-size: 16px;
  158.             cursor: pointer;
  159.             display: flex;
  160.             align-items: center;
  161.             justify-content: center;
  162.             transition: all 0.3s ease;
  163.             box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  164.         }
  165.         .carousel-btn:hover {
  166.             background: white;
  167.             transform: scale(1.1);
  168.         }
  169.         .carousel-btn:disabled {
  170.             opacity: 0.5;
  171.             cursor: not-allowed;
  172.             transform: none;
  173.         }
  174.         .carousel-pause {
  175.             background: #dc3545;
  176.             color: white;
  177.         }
  178.         .carousel-pause:hover {
  179.             background: #c82333;
  180.         }
  181.         .carousel-indicators {
  182.             position: absolute;
  183.             bottom: 70px;
  184.             left: 50%;
  185.             transform: translateX(-50%);
  186.             display: flex;
  187.             gap: 8px;
  188.             z-index: 10;
  189.         }
  190.         .carousel-indicator {
  191.             width: 12px;
  192.             height: 12px;
  193.             border-radius: 50%;
  194.             background: rgba(255, 255, 255, 0.5);
  195.             border: none;
  196.             cursor: pointer;
  197.             transition: all 0.3s ease;
  198.         }
  199.         .carousel-indicator.active {
  200.             background: white;
  201.             transform: scale(1.2);
  202.         }
  203.         /* Contrôles eBay-style améliorés - Positionnés en bas à droite */
  204.         .carousel-controls-ebay {
  205.             position: absolute;
  206.             bottom: 20px;
  207.             right: 20px;
  208.             display: flex;
  209.             gap: 12px;
  210.             align-items: center;
  211.             z-index: 10;
  212.             pointer-events: none;
  213.         }
  214.         .carousel-btn-ebay {
  215.             width: 52px;
  216.             height: 52px;
  217.             border: none;
  218.             border-radius: 50% !important;
  219.             background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  220.             color: #333;
  221.             font-size: 22px;
  222.             cursor: pointer;
  223.             display: flex;
  224.             align-items: center;
  225.             justify-content: center;
  226.             transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  227.             pointer-events: all;
  228.             box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.15);
  229.             backdrop-filter: blur(10px);
  230.             position: relative;
  231.             overflow: visible;
  232.         }
  233.         .carousel-btn-ebay::before {
  234.             content: '';
  235.             position: absolute;
  236.             top: 50%;
  237.             left: 50%;
  238.             width: 0;
  239.             height: 0;
  240.             border-radius: 50%;
  241.             background: rgba(255, 255, 255, 0.3);
  242.             transform: translate(-50%, -50%);
  243.             transition: width 0.6s ease, height 0.6s ease;
  244.         }
  245.         .carousel-btn-ebay:hover::before {
  246.             width: 100%;
  247.             height: 100%;
  248.         }
  249.         .carousel-btn-ebay:hover {
  250.             transform: translateY(-3px) scale(1.1);
  251.             box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
  252.         }
  253.         
  254.         /* Désactiver les effets hover sur mobile pour éviter les problèmes tactiles */
  255.         @media (hover: none) and (pointer: coarse) {
  256.             .carousel-btn-ebay:hover {
  257.                 transform: none;
  258.             }
  259.             
  260.             .carousel-btn-ebay:active {
  261.                 transform: scale(0.95);
  262.             }
  263.             
  264.             .carousel-indicator-ebay:hover {
  265.                 transform: none;
  266.             }
  267.         }
  268.         .carousel-btn-ebay:active {
  269.             transform: translateY(-1px) scale(1.05);
  270.             box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  271.         }
  272.         
  273.         /* Désactiver les effets hover sur mobile pour éviter les problèmes tactiles */
  274.         @media (hover: none) and (pointer: coarse) {
  275.             .carousel-btn-ebay:hover {
  276.                 transform: none;
  277.             }
  278.             
  279.             .carousel-btn-ebay:active {
  280.                 transform: scale(0.95);
  281.             }
  282.             
  283.             .carousel-indicator-ebay:hover {
  284.                 transform: none;
  285.             }
  286.         }
  287.         .carousel-btn-ebay:disabled {
  288.             opacity: 0.4;
  289.             cursor: not-allowed;
  290.             transform: none;
  291.         }
  292.         .carousel-btn-ebay i {
  293.             position: relative;
  294.             z-index: 10;
  295.             transition: transform 0.3s ease;
  296.             display: inline-block;
  297.             line-height: 1;
  298.         }
  299.         .carousel-btn-ebay:hover i {
  300.             transform: scale(1.15);
  301.         }
  302.         
  303.         .carousel-btn-ebay.pause-btn i,
  304.         .carousel-btn-ebay.pause-btn #pauseIcon {
  305.             z-index: 10 !important;
  306.             color: white !important;
  307.             display: inline-block !important;
  308.             visibility: visible !important;
  309.             opacity: 1 !important;
  310.         }
  311.         .carousel-btn-ebay.prev-btn,
  312.         .carousel-btn-ebay.next-btn {
  313.             background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
  314.             color: #333;
  315.         }
  316.         .carousel-btn-ebay.prev-btn:hover,
  317.         .carousel-btn-ebay.next-btn:hover {
  318.             background: linear-gradient(135deg, #ffa200 0%, #ff6b00 100%);
  319.             color: white;
  320.         }
  321.         .carousel-btn-ebay.pause-btn {
  322.             background: linear-gradient(135deg, rgba(220, 53, 69, 0.95) 0%, rgba(200, 35, 51, 0.95) 100%);
  323.             color: white !important;
  324.         }
  325.         .carousel-btn-ebay.pause-btn:hover {
  326.             background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  327.             color: white !important;
  328.         }
  329.         .carousel-btn-ebay.pause-btn.playing {
  330.             background: linear-gradient(135deg, rgba(40, 167, 69, 0.95) 0%, rgba(33, 136, 56, 0.95) 100%);
  331.             color: white !important;
  332.         }
  333.         .carousel-btn-ebay.pause-btn.playing:hover {
  334.             background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  335.             color: white !important;
  336.         }
  337.         /* Style spécifique pour l'icône du bouton pause - Utilisation directe d'Unicode */
  338.         .carousel-btn-ebay.pause-btn {
  339.             text-align: center;
  340.             position: relative;
  341.             display: flex;
  342.             align-items: center;
  343.             justify-content: center;
  344.         }
  345.         
  346.         .carousel-btn-ebay.pause-btn #pauseIcon,
  347.         .carousel-btn-ebay.pause-btn .pause-icon-content {
  348.             display: block !important;
  349.             color: white !important;
  350.             font-size: 24px !important;
  351.             line-height: 1 !important;
  352.             width: auto !important;
  353.             height: auto !important;
  354.             position: static !important;
  355.             text-align: center !important;
  356.             z-index: 10 !important;
  357.             visibility: visible !important;
  358.             opacity: 1 !important;
  359.             pointer-events: none !important;
  360.             font-family: Arial, "Segoe UI", sans-serif !important;
  361.             font-weight: normal !important;
  362.             margin: 0 !important;
  363.             padding: 0 !important;
  364.         }
  365.         /* Indicateurs eBay-style améliorés - Positionnés en bas à gauche */
  366.         .carousel-indicators-ebay {
  367.             position: absolute;
  368.             bottom: 20px;
  369.             left: 50%;
  370.             transform: translateX(-50%);
  371.             display: flex;
  372.             gap: 10px;
  373.             z-index: 10;
  374.             background: rgba(0, 0, 0, 0.4);
  375.             padding: 8px 14px;
  376.             border-radius: 25px;
  377.             backdrop-filter: blur(8px);
  378.             box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  379.         }
  380.         .carousel-indicator-ebay {
  381.             width: 10px;
  382.             height: 10px;
  383.             border-radius: 50%;
  384.             background: rgba(255, 255, 255, 0.5);
  385.             border: 2px solid rgba(255, 255, 255, 0.8);
  386.             cursor: pointer;
  387.             transition: all 0.3s ease;
  388.         }
  389.         .carousel-indicator-ebay.active {
  390.             background: white !important;
  391.             border-color: #ffa200 !important;
  392.             transform: scale(1.3) !important;
  393.             box-shadow: 0 0 8px rgba(255, 162, 0, 0.6) !important;
  394.         }
  395.         .carousel-indicator-ebay:hover {
  396.             background: rgba(255, 255, 255, 0.8);
  397.             transform: scale(1.1);
  398.         }
  399.         /* Styles eBay-style pour les détails de boutique */
  400.         .shop-avatar-container-ebay {
  401.             position: relative;
  402.             margin-right: 20px;
  403.         }
  404.         .shop-avatar-ebay {
  405.             width: 100px;
  406.             height: 100px;
  407.             border-radius: 12px;
  408.             object-fit: cover;
  409.             border: 3px solid white;
  410.             box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  411.             transition: transform 0.3s ease;
  412.         }
  413.         .shop-avatar-ebay:hover {
  414.             transform: scale(1.05);
  415.         }
  416.         .shop-avatar-placeholder {
  417.             background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  418.             display: flex;
  419.             align-items: center;
  420.             justify-content: center;
  421.             font-size: 2.5rem;
  422.             color: #999;
  423.         }
  424.         .verified-badge-ebay {
  425.             position: absolute;
  426.             bottom: -5px;
  427.             right: -5px;
  428.             background: #28a745;
  429.             color: white;
  430.             width: 24px;
  431.             height: 24px;
  432.             border-radius: 50%;
  433.             display: flex;
  434.             align-items: center;
  435.             justify-content: center;
  436.             font-size: 12px;
  437.             border: 2px solid white;
  438.         }
  439.         .shop-info-ebay {
  440.             padding: 0;
  441.         }
  442.         .shop-name-section {
  443.             margin-bottom: 12px;
  444.         }
  445.         .shop-name-ebay {
  446.             font-size: 2.2rem;
  447.             font-weight: 800;
  448.             background: linear-gradient(135deg, #333 0%, #555 100%);
  449.             -webkit-background-clip: text;
  450.             -webkit-text-fill-color: transparent;
  451.             background-clip: text;
  452.             margin: 0;
  453.             line-height: 1.2;
  454.             word-wrap: break-word;
  455.             overflow-wrap: break-word;
  456.             hyphens: auto;
  457.             letter-spacing: -0.5px;
  458.         }
  459.         .verified-text {
  460.             background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  461.             -webkit-background-clip: text;
  462.             -webkit-text-fill-color: transparent;
  463.             background-clip: text;
  464.             font-size: 0.9rem;
  465.             font-weight: 600;
  466.             display: inline-flex;
  467.             align-items: center;
  468.             gap: 4px;
  469.             word-wrap: break-word;
  470.             overflow-wrap: break-word;
  471.             line-height: 1.4;
  472.             white-space: normal;
  473.             flex-wrap: wrap;
  474.             max-width: 100%;
  475.         }
  476.         .verified-text i {
  477.             -webkit-text-fill-color: #28a745;
  478.             color: #28a745;
  479.             flex-shrink: 0;
  480.         }
  481.         .shop-category-ebay {
  482.             background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  483.             color: #666;
  484.             padding: 6px 14px;
  485.             border-radius: 20px;
  486.             font-size: 0.875rem;
  487.             font-weight: 500;
  488.             display: inline-block;
  489.             border: 1px solid #dee2e6;
  490.             word-wrap: break-word;
  491.             overflow-wrap: break-word;
  492.             max-width: 100%;
  493.             line-height: 1.4;
  494.             white-space: normal;
  495.         }
  496.         .shop-stats-ebay {
  497.             margin-top: 16px;
  498.         }
  499.         .stat-row {
  500.             display: flex;
  501.             gap: 32px;
  502.             margin-bottom: 12px;
  503.             flex-wrap: wrap;
  504.         }
  505.         .stat-item-ebay {
  506.             display: flex;
  507.             flex-direction: column;
  508.             align-items: flex-start;
  509.             min-width: 100px;
  510.         }
  511.         .stat-percentage {
  512.             font-size: 1.4rem;
  513.             font-weight: 800;
  514.             background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  515.             -webkit-background-clip: text;
  516.             -webkit-text-fill-color: transparent;
  517.             background-clip: text;
  518.             line-height: 1.1;
  519.             margin-bottom: 4px;
  520.             word-wrap: break-word;
  521.             overflow-wrap: break-word;
  522.         }
  523.         .stat-number-ebay {
  524.             font-size: 1.4rem;
  525.             font-weight: 800;
  526.             background: linear-gradient(135deg, #333 0%, #555 100%);
  527.             -webkit-background-clip: text;
  528.             -webkit-text-fill-color: transparent;
  529.             background-clip: text;
  530.             line-height: 1.1;
  531.             margin-bottom: 4px;
  532.             word-wrap: break-word;
  533.             overflow-wrap: break-word;
  534.         }
  535.         .stat-label-ebay {
  536.             font-size: 0.75rem;
  537.             color: #6c757d;
  538.             text-transform: uppercase;
  539.             letter-spacing: 0.8px;
  540.             font-weight: 600;
  541.             margin-top: 0;
  542.             line-height: 1.3;
  543.             word-wrap: break-word;
  544.             overflow-wrap: break-word;
  545.             text-align: left;
  546.             hyphens: auto;
  547.             max-width: 100%;
  548.         }
  549.         .shop-additional-info {
  550.             display: flex;
  551.             flex-wrap: wrap;
  552.             gap: 12px 20px;
  553.             font-size: 0.875rem;
  554.             color: #495057;
  555.             margin-top: 12px;
  556.             padding-top: 16px;
  557.             border-top: 1px solid #e9ecef;
  558.             line-height: 1.5;
  559.             word-wrap: break-word;
  560.             overflow-wrap: break-word;
  561.         }
  562.         .member-since {
  563.             font-weight: 500;
  564.             display: inline-flex;
  565.             align-items: center;
  566.             white-space: normal;
  567.             padding: 6px 12px;
  568.             background: #f8f9fa;
  569.             border-radius: 8px;
  570.             transition: all 0.3s ease;
  571.             border: 1px solid transparent;
  572.             word-wrap: break-word;
  573.             overflow-wrap: break-word;
  574.             line-height: 1.4;
  575.             max-width: 100%;
  576.             flex-wrap: wrap;
  577.             text-align: center;
  578.         }
  579.         .member-since:hover {
  580.             background: #e9ecef;
  581.             border-color: #dee2e6;
  582.             transform: translateY(-1px);
  583.         }
  584.         .member-since i {
  585.             color: #ffa200;
  586.             margin-right: 6px;
  587.             font-size: 0.95rem;
  588.             transition: transform 0.3s ease;
  589.             flex-shrink: 0;
  590.         }
  591.         .member-since:hover i {
  592.             transform: scale(1.2);
  593.         }
  594.         .location {
  595.             display: flex;
  596.             align-items: center;
  597.         }
  598.         .shop-actions-ebay {
  599.             display: flex;
  600.             flex-direction: column;
  601.             gap: 10px;
  602.             min-width: 160px;
  603.         }
  604.         .btn-ebay {
  605.             padding: 10px 18px;
  606.             font-size: 0.9rem;
  607.             font-weight: 500;
  608.             border-radius: 6px;
  609.             text-align: center;
  610.             transition: all 0.3s ease;
  611.             border-width: 1px;
  612.             white-space: normal;
  613.             word-wrap: break-word;
  614.             overflow-wrap: break-word;
  615.             line-height: 1.4;
  616.         }
  617.         .btn-ebay:hover {
  618.             transform: translateY(-2px);
  619.             box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  620.         }
  621.         .btn-ebay i {
  622.             vertical-align: middle;
  623.         }
  624.         .btn-ebay.following {
  625.             background: #28a745;
  626.             border-color: #28a745;
  627.             color: white;
  628.         }
  629.         /* Styles pour les avis */
  630.         .review-stats {
  631.             background: white;
  632.             border-radius: 12px;
  633.             padding: 20px;
  634.             box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  635.             margin-bottom: 20px;
  636.         }
  637.         .stat-card {
  638.             padding: 15px;
  639.         }
  640.         .stat-number {
  641.             font-size: 2.5rem;
  642.             font-weight: 700;
  643.             color: #333;
  644.             margin: 0;
  645.         }
  646.         .stat-label {
  647.             color: #666;
  648.             font-size: 0.9rem;
  649.             margin: 5px 0 0;
  650.         }
  651.         .rating-stars {
  652.             color: #ffc107;
  653.             font-size: 1.2rem;
  654.             margin: 10px 0;
  655.         }
  656.         .reviews-preview {
  657.             background: white;
  658.             border-radius: 12px;
  659.             padding: 20px;
  660.             box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  661.         }
  662.         .review-item {
  663.             border-bottom: 1px solid #f0f0f0;
  664.             padding: 15px 0;
  665.         }
  666.         .review-item:last-child {
  667.             border-bottom: none;
  668.         }
  669.         .review-header {
  670.             display: flex;
  671.             justify-content: space-between;
  672.             align-items: flex-start;
  673.             margin-bottom: 10px;
  674.         }
  675.         .reviewer-info {
  676.             display: flex;
  677.             align-items: center;
  678.             gap: 10px;
  679.         }
  680.         .reviewer-avatar {
  681.             width: 40px;
  682.             height: 40px;
  683.             border-radius: 50%;
  684.             background: #f8f9fa;
  685.             display: flex;
  686.             align-items: center;
  687.             justify-content: center;
  688.             color: #666;
  689.         }
  690.         .reviewer-name {
  691.             margin: 0;
  692.             font-size: 1rem;
  693.             font-weight: 600;
  694.         }
  695.         .review-rating {
  696.             color: #ffc107;
  697.             font-size: 0.9rem;
  698.         }
  699.         .review-meta {
  700.             text-align: right;
  701.         }
  702.         .review-date {
  703.             color: #666;
  704.             font-size: 0.8rem;
  705.         }
  706.         .verified-badge {
  707.             display: inline-block;
  708.             background: #28a745;
  709.             color: white;
  710.             padding: 2px 8px;
  711.             border-radius: 12px;
  712.             font-size: 0.7rem;
  713.             margin-left: 10px;
  714.         }
  715.         .review-comment {
  716.             margin: 10px 0 0;
  717.             line-height: 1.5;
  718.             color: #333;
  719.         }
  720.         .review-actions-card {
  721.             background: white;
  722.             border-radius: 12px;
  723.             padding: 20px;
  724.             box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  725.             text-align: center;
  726.         }
  727.         .shop-banner-overlay {
  728.             position: absolute;
  729.             top: 0;
  730.             left: 0;
  731.             right: 0;
  732.             bottom: 0;
  733.             background: rgba(0, 0, 0, 0.3);
  734.             z-index: 1;
  735.         }
  736.         .shop-header-content {
  737.             background: white;
  738.             border: 1px solid #e1e1e1;
  739.             border-radius: 4px;
  740.             padding: 20px;
  741.             margin: 0 20px 20px;
  742.             box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  743.             position: relative;
  744.             z-index: 2;
  745.         }
  746.         .shop-avatar {
  747.             width: 80px;
  748.             height: 80px;
  749.             border-radius: 4px;
  750.             border: 1px solid #e1e1e1;
  751.             object-fit: cover;
  752.             position: relative;
  753.             z-index: 3;
  754.         }
  755.         .shop-title {
  756.             font-size: 1.5rem;
  757.             font-weight: 600;
  758.             color: #333;
  759.             margin-bottom: 8px;
  760.         }
  761.         .shop-subtitle {
  762.             color: #666;
  763.             font-size: 0.9rem;
  764.             margin-bottom: 15px;
  765.         }
  766.         .shop-stats-row {
  767.             display: flex;
  768.             align-items: center;
  769.             gap: 20px;
  770.             flex-wrap: wrap;
  771.             margin-bottom: 15px;
  772.         }
  773.         .shop-stat-item {
  774.             display: flex;
  775.             align-items: center;
  776.             gap: 5px;
  777.             font-size: 0.9rem;
  778.         }
  779.         .positive-feedback {
  780.             color: #007bff;
  781.             font-weight: 600;
  782.         }
  783.         .items-sold {
  784.             color: #666;
  785.         }
  786.         .followers-count {
  787.             color: #666;
  788.         }
  789.         .shop-badges {
  790.             display: flex;
  791.             gap: 10px;
  792.             margin-bottom: 15px;
  793.         }
  794.         .shop-badge {
  795.             background: #f0f0f0;
  796.             color: #333;
  797.             padding: 4px 8px;
  798.             border-radius: 3px;
  799.             font-size: 0.8rem;
  800.             font-weight: 500;
  801.         }
  802.         .shop-badge.verified {
  803.             background: #d4edda;
  804.             color: #155724;
  805.         }
  806.         .shop-badge.premium {
  807.             background: #fff3cd;
  808.             color: #856404;
  809.         }
  810.         .shop-actions-row {
  811.             display: flex;
  812.             align-items: center;
  813.             gap: 15px;
  814.             flex-wrap: wrap;
  815.         }
  816.         .shop-action-btn {
  817.             background: #007bff;
  818.             color: white;
  819.             border: none;
  820.             padding: 8px 16px;
  821.             border-radius: 3px;
  822.             font-size: 0.9rem;
  823.             font-weight: 500;
  824.             cursor: pointer;
  825.             transition: background-color 0.2s;
  826.             text-decoration: none;
  827.             display: inline-flex;
  828.             align-items: center;
  829.             gap: 5px;
  830.         }
  831.         .shop-action-btn:hover {
  832.             background: #0056b3;
  833.             color: white;
  834.         }
  835.         .shop-action-btn.following {
  836.             background: #28a745;
  837.         }
  838.         .shop-action-btn.following:hover {
  839.             background: #1e7e34;
  840.         }
  841.         .shop-action-btn.secondary {
  842.             background: #6c757d;
  843.         }
  844.         .shop-action-btn.secondary:hover {
  845.             background: #545b62;
  846.         }
  847.         /* Onglets eBay-style avec classes Karma */
  848.         .shop-tabs {
  849.             background: white;
  850.             border: 1px solid #e1e1e1;
  851.             border-top: none;
  852.             border-radius: 0 0 4px 4px;
  853.             margin-top: 0;
  854.         }
  855.         .shop-tabs-nav {
  856.             display: flex;
  857.             border-bottom: 1px solid #e1e1e1;
  858.             margin: 0;
  859.             padding: 0;
  860.             list-style: none;
  861.             background: #f8f9fa;
  862.         }
  863.         .shop-tab {
  864.             margin: 0;
  865.         }
  866.         .shop-tab-link {
  867.             display: block;
  868.             padding: 12px 20px;
  869.             color: #000000;
  870.             text-decoration: none;
  871.             border-bottom: 2px solid transparent;
  872.             transition: all 0.2s;
  873.             font-weight: 500;
  874.             font-size: 1rem;
  875.         }
  876.         .shop-tab-link:hover,
  877.         .shop-tab-link.active {
  878.             color: #095ad3;
  879.             border-bottom-color: #095ad3;
  880.             background: #ffa200;
  881.         }
  882.         .shop-tab-content {
  883.             padding: 30px;
  884.             min-height: 400px;
  885.         }
  886.         .shop-tab-content:not(.active) {
  887.             display: none;
  888.         }
  889.         .shop-tab-content.active {
  890.             display: block;
  891.         }
  892.         /* Cards d'information avec style Karma */
  893.         .shop-info-card {
  894.             background: #f8f9fa;
  895.             border: 1px solid #e1e1e1;
  896.             border-radius: 4px;
  897.             padding: 20px;
  898.             margin-bottom: 20px;
  899.         }
  900.         .shop-info-card h6 {
  901.             color: #333;
  902.             font-weight: 600;
  903.             margin-bottom: 15px;
  904.             font-size: 1.1rem;
  905.         }
  906.         .shop-info-card p {
  907.             color: #666;
  908.             font-size: 0.9rem;
  909.             margin: 0;
  910.             line-height: 1.5;
  911.         }
  912.         .shop-contact-info {
  913.             display: flex;
  914.             flex-direction: column;
  915.             gap: 10px;
  916.         }
  917.         .shop-contact-item {
  918.             display: flex;
  919.             align-items: center;
  920.             gap: 10px;
  921.             font-size: 0.9rem;
  922.             color: #666;
  923.             padding: 5px 0;
  924.         }
  925.         .shop-contact-item i {
  926.             width: 16px;
  927.             color: #007bff;
  928.             text-align: center;
  929.         }
  930.         .shop-social-links {
  931.             display: flex;
  932.             gap: 10px;
  933.             margin-top: 15px;
  934.             flex-wrap: wrap;
  935.         }
  936.         .shop-social-link {
  937.             display: inline-flex;
  938.             align-items: center;
  939.             justify-content: center;
  940.             width: 36px;
  941.             height: 36px;
  942.             background: #f0f0f0;
  943.             color: #666;
  944.             border-radius: 4px;
  945.             text-decoration: none;
  946.             transition: all 0.2s;
  947.             font-size: 1.1rem;
  948.         }
  949.         .shop-social-link:hover {
  950.             background: #007bff;
  951.             color: white;
  952.             transform: translateY(-2px);
  953.         }
  954.         /* Produits avec style Karma */
  955.         .product-card {
  956.             background: white;
  957.             border: 1px solid #e1e1e1;
  958.             border-radius: 4px;
  959.             overflow: hidden;
  960.             transition: all 0.3s ease;
  961.             margin-bottom: 20px;
  962.         }
  963.         .product-card:hover {
  964.             transform: translateY(-2px);
  965.             box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  966.         }
  967.         /* Animation de tri des produits */
  968.         .product-item {
  969.             transition: all 0.3s ease;
  970.         }
  971.         .product-item.sorting {
  972.             opacity: 0;
  973.             transform: translateY(20px);
  974.         }
  975.         .product-item.sorted {
  976.             opacity: 1;
  977.             transform: translateY(0);
  978.         }
  979.         .product-image {
  980.             height: 200px;
  981.             background-size: cover;
  982.             background-position: center;
  983.             position: relative;
  984.             overflow: hidden;
  985.         }
  986.         .product-info {
  987.             padding: 15px;
  988.         }
  989.         .product-title {
  990.             font-size: 1rem;
  991.             font-weight: 600;
  992.             margin-bottom: 8px;
  993.             color: #333;
  994.             line-height: 1.3;
  995.         }
  996.         .product-title a {
  997.             color: #333;
  998.             text-decoration: none;
  999.         }
  1000.         .product-title a:hover {
  1001.             color: #007bff;
  1002.         }
  1003.         .product-price {
  1004.             font-size: 1.2rem;
  1005.             font-weight: bold;
  1006.             color: #ff6b35;
  1007.             margin-bottom: 10px;
  1008.         }
  1009.         .product-meta {
  1010.             display: flex;
  1011.             justify-content: space-between;
  1012.             align-items: center;
  1013.             font-size: 0.85rem;
  1014.             color: #666;
  1015.         }
  1016.         .rating {
  1017.             color: #ffc107;
  1018.         }
  1019.         /* Responsive avec classes Karma */
  1020.         /* Responsive amélioré pour la page shop */
  1021.         /* Tablettes et écrans moyens */
  1022.         @media(max-width: 1200px) {
  1023.             .shop-carousel-ebay {
  1024.                 height: 400px;
  1025.             }
  1026.             
  1027.             .carousel-controls-ebay {
  1028.                 bottom: 18px;
  1029.                 right: 18px;
  1030.                 gap: 11px;
  1031.             }
  1032.             
  1033.             .carousel-btn-ebay {
  1034.                 width: 48px;
  1035.                 height: 48px;
  1036.                 font-size: 21px;
  1037.             }
  1038.             
  1039.             .carousel-indicators-ebay {
  1040.                 bottom: 18px;
  1041.                 padding: 7px 13px;
  1042.             }
  1043.             
  1044.             .carousel-indicator-ebay {
  1045.                 width: 9px;
  1046.                 height: 9px;
  1047.             }
  1048.         }
  1049.         
  1050.         @media(max-width: 991.98px) {
  1051.             .shop-carousel-ebay {
  1052.                 margin: 0 10px;
  1053.                 height: 380px;
  1054.             }
  1055.             
  1056.             .carousel-controls-ebay {
  1057.                 bottom: 16px;
  1058.                 right: 16px;
  1059.                 gap: 10px;
  1060.             }
  1061.             
  1062.             .carousel-btn-ebay {
  1063.                 width: 46px;
  1064.                 height: 46px;
  1065.                 font-size: 20px;
  1066.             }
  1067.             
  1068.             .carousel-indicators-ebay {
  1069.                 bottom: 16px;
  1070.                 left: 50%;
  1071.                 transform: translateX(-50%);
  1072.                 padding: 6px 12px;
  1073.             }
  1074.             
  1075.             .carousel-indicator-ebay {
  1076.                 width: 9px;
  1077.                 height: 9px;
  1078.             }
  1079.             
  1080.             .shop-header-content {
  1081.                 padding: 20px;
  1082.                 margin: 0 10px 20px;
  1083.             }
  1084.             
  1085.             .shop-header-content .row {
  1086.                 flex-wrap: wrap;
  1087.             }
  1088.             
  1089.             .shop-info-ebay {
  1090.                 margin-top: 0;
  1091.                 text-align: center;
  1092.             }
  1093.             .shop-name-ebay {
  1094.                 font-size: 1.75rem;
  1095.                 line-height: 1.3;
  1096.             }
  1097.             .verified-text {
  1098.                 font-size: 0.85rem;
  1099.             }
  1100.             .shop-category-ebay {
  1101.                 font-size: 0.8rem;
  1102.                 padding: 5px 12px;
  1103.             }
  1104.             .stat-row {
  1105.                 justify-content: center;
  1106.                 gap: 20px;
  1107.             }
  1108.             .stat-item-ebay {
  1109.                 align-items: center;
  1110.                 min-width: 90px;
  1111.             }
  1112.             .stat-percentage,
  1113.             .stat-number-ebay {
  1114.                 font-size: 1.15rem;
  1115.             }
  1116.             .stat-label-ebay {
  1117.                 font-size: 0.75rem;
  1118.                 text-align: center;
  1119.             }
  1120.             .shop-additional-info {
  1121.                 justify-content: center;
  1122.                 gap: 12px 18px;
  1123.                 font-size: 0.8rem;
  1124.             }
  1125.             .member-since {
  1126.                 font-size: 0.8rem;
  1127.             }
  1128.             .shop-actions-ebay {
  1129.                 min-width: auto;
  1130.             }
  1131.         }
  1132.         
  1133.         @media(max-width: 768px) {
  1134.             .shop-banner,
  1135.             .shop-carousel-ebay {
  1136.                 height: 300px;
  1137.                 margin: 0;
  1138.                 border-radius: 0;
  1139.             }
  1140.             
  1141.             .shop-carousel-ebay .carousel-container {
  1142.                 border-radius: 0;
  1143.             }
  1144.             .carousel-controls-ebay {
  1145.                 bottom: 12px;
  1146.                 right: 12px;
  1147.                 gap: 8px;
  1148.             }
  1149.             .carousel-btn-ebay {
  1150.                 width: 40px;
  1151.                 height: 40px;
  1152.                 font-size: 16px;
  1153.             }
  1154.             
  1155.             .carousel-btn-ebay #pauseIcon,
  1156.             .carousel-btn-ebay .pause-icon-content {
  1157.                 font-size: 18px !important;
  1158.             }
  1159.             .carousel-indicators-ebay {
  1160.                 bottom: 12px;
  1161.                 left: 50%;
  1162.                 transform: translateX(-50%);
  1163.                 gap: 6px;
  1164.                 padding: 5px 10px;
  1165.             }
  1166.             
  1167.             .carousel-indicator-ebay {
  1168.                 width: 8px;
  1169.                 height: 8px;
  1170.             }
  1171.             .shop-header-content {
  1172.                 padding: 20px 16px;
  1173.                 margin: 0;
  1174.                 border-radius: 0;
  1175.             }
  1176.             .shop-header-content .row {
  1177.                 flex-direction: column;
  1178.                 text-align: center;
  1179.             }
  1180.             .shop-avatar-container-ebay {
  1181.                 margin: 0 auto 16px;
  1182.             }
  1183.             .shop-avatar-ebay {
  1184.                 width: 90px;
  1185.                 height: 90px;
  1186.             }
  1187.             .shop-name-ebay {
  1188.                 font-size: 1.5rem;
  1189.                 margin-bottom: 8px;
  1190.                 line-height: 1.3;
  1191.                 word-break: break-word;
  1192.                 hyphens: auto;
  1193.                 max-width: 100%;
  1194.             }
  1195.             .shop-name-section {
  1196.                 margin-bottom: 10px;
  1197.             }
  1198.             .verified-text {
  1199.                 font-size: 0.8rem;
  1200.                 white-space: normal;
  1201.                 justify-content: center;
  1202.                 flex-wrap: wrap;
  1203.                 line-height: 1.4;
  1204.             }
  1205.             .verified-text i {
  1206.                 font-size: 0.85rem;
  1207.             }
  1208.             .shop-category-ebay {
  1209.                 font-size: 0.75rem;
  1210.                 padding: 5px 10px;
  1211.                 max-width: 100%;
  1212.                 line-height: 1.3;
  1213.                 word-break: break-word;
  1214.             }
  1215.             .shop-info-ebay {
  1216.                 text-align: center;
  1217.             }
  1218.             .stat-row {
  1219.                 justify-content: center;
  1220.                 gap: 10px;
  1221.                 flex-wrap: wrap;
  1222.             }
  1223.             
  1224.             .stat-item-ebay {
  1225.                 align-items: center;
  1226.                 min-width: 75px;
  1227.                 flex: 0 1 auto;
  1228.                 padding: 10px 8px;
  1229.             }
  1230.             .stat-percentage,
  1231.             .stat-number-ebay {
  1232.                 font-size: 1rem;
  1233.                 line-height: 1.1;
  1234.                 word-break: break-word;
  1235.             }
  1236.             .stat-label-ebay {
  1237.                 font-size: 0.65rem;
  1238.                 text-align: center;
  1239.                 line-height: 1.2;
  1240.                 letter-spacing: 0.3px;
  1241.                 word-break: break-word;
  1242.                 hyphens: auto;
  1243.             }
  1244.             .shop-additional-info {
  1245.                 justify-content: center;
  1246.                 flex-wrap: wrap;
  1247.                 gap: 8px 10px;
  1248.                 font-size: 0.75rem;
  1249.                 line-height: 1.4;
  1250.             }
  1251.             .member-since {
  1252.                 flex-direction: row;
  1253.                 text-align: center;
  1254.                 gap: 4px;
  1255.                 white-space: normal;
  1256.                 font-size: 0.75rem;
  1257.                 line-height: 1.4;
  1258.                 padding: 5px 8px;
  1259.                 word-break: break-word;
  1260.             }
  1261.             .member-since i {
  1262.                 margin-right: 4px;
  1263.                 font-size: 0.85rem;
  1264.                 flex-shrink: 0;
  1265.             }
  1266.             .shop-actions-ebay {
  1267.                 flex-direction: column;
  1268.                 justify-content: center;
  1269.                 min-width: auto;
  1270.                 margin-top: 20px;
  1271.                 width: 100%;
  1272.             }
  1273.             .btn-ebay {
  1274.                 width: 100%;
  1275.                 min-width: auto;
  1276.             }
  1277.             .shop-actions-ebay .d-flex {
  1278.                 width: 100%;
  1279.             }
  1280.             .btn-shop,
  1281.             .shop-action-btn {
  1282.                 width: 100%;
  1283.                 min-width: auto;
  1284.                 height: 45px;
  1285.                 font-size: 0.9rem;
  1286.                 padding: 12px 20px;
  1287.             }
  1288.             .shop-tabs-nav {
  1289.                 flex-wrap: wrap;
  1290.                 justify-content: center;
  1291.             }
  1292.             
  1293.             .shop-tab-link {
  1294.                 font-size: 0.85rem;
  1295.                 padding: 0.5rem 0.75rem;
  1296.                 flex: 1;
  1297.                 min-width: auto;
  1298.             }
  1299.             
  1300.             /* Produits responsive */
  1301.             #products-container .product-item {
  1302.                 margin-bottom: 20px;
  1303.             }
  1304.             
  1305.             .product-card {
  1306.                 padding: 15px;
  1307.             }
  1308.             
  1309.             .product-title {
  1310.                 font-size: 0.95rem;
  1311.             }
  1312.             
  1313.             .product-price {
  1314.                 font-size: 1.1rem;
  1315.             }
  1316.             
  1317.             /* Détails de la boutique responsive */
  1318.             .shop-info-ebay {
  1319.                 text-align: center;
  1320.             }
  1321.         }
  1322.         
  1323.         @media(max-width: 575.98px) {
  1324.             .shop-banner,
  1325.             .shop-carousel-ebay {
  1326.                 height: 280px;
  1327.                 margin: 0;
  1328.             }
  1329.             
  1330.             .carousel-controls-ebay {
  1331.                 bottom: 10px;
  1332.                 right: 10px;
  1333.                 gap: 6px;
  1334.             }
  1335.             
  1336.             .carousel-btn-ebay {
  1337.                 width: 36px;
  1338.                 height: 36px;
  1339.                 font-size: 14px;
  1340.             }
  1341.             
  1342.             .carousel-btn-ebay #pauseIcon,
  1343.             .carousel-btn-ebay .pause-icon-content {
  1344.                 font-size: 16px !important;
  1345.             }
  1346.             
  1347.             .carousel-indicators-ebay {
  1348.                 bottom: 10px;
  1349.                 left: 50%;
  1350.                 transform: translateX(-50%);
  1351.                 padding: 4px 8px;
  1352.                 gap: 5px;
  1353.             }
  1354.             
  1355.             .carousel-indicator-ebay {
  1356.                 width: 7px;
  1357.                 height: 7px;
  1358.             }
  1359.             
  1360.             .shop-header-content {
  1361.                 margin: 0;
  1362.                 padding: 16px 12px;
  1363.             }
  1364.             
  1365.             .shop-avatar-ebay {
  1366.                 width: 80px;
  1367.                 height: 80px;
  1368.             }
  1369.             
  1370.             .shop-name-ebay {
  1371.                 font-size: 1.3rem;
  1372.                 line-height: 1.3;
  1373.                 word-break: break-word;
  1374.                 letter-spacing: -0.1px;
  1375.                 hyphens: auto;
  1376.                 max-width: 100%;
  1377.             }
  1378.             .shop-name-section {
  1379.                 margin-bottom: 8px;
  1380.             }
  1381.             .verified-text {
  1382.                 font-size: 0.7rem;
  1383.                 white-space: normal;
  1384.                 line-height: 1.4;
  1385.                 flex-wrap: wrap;
  1386.                 justify-content: center;
  1387.                 word-break: break-word;
  1388.             }
  1389.             .verified-text i {
  1390.                 font-size: 0.75rem;
  1391.                 flex-shrink: 0;
  1392.             }
  1393.             .shop-category-ebay {
  1394.                 font-size: 0.65rem;
  1395.                 padding: 4px 8px;
  1396.                 max-width: 100%;
  1397.                 line-height: 1.3;
  1398.                 word-break: break-word;
  1399.             }
  1400.             
  1401.             .stat-row {
  1402.                 gap: 6px;
  1403.                 flex-direction: row;
  1404.                 justify-content: space-around;
  1405.             }
  1406.             
  1407.             .stat-item-ebay {
  1408.                 flex: 1;
  1409.                 min-width: 0;
  1410.                 align-items: center;
  1411.                 padding: 8px 4px;
  1412.             }
  1413.             .stat-percentage,
  1414.             .stat-number-ebay {
  1415.                 font-size: 0.95rem;
  1416.                 line-height: 1.1;
  1417.                 word-break: break-word;
  1418.             }
  1419.             .stat-label-ebay {
  1420.                 font-size: 0.6rem;
  1421.                 text-align: center;
  1422.                 line-height: 1.2;
  1423.                 letter-spacing: 0.2px;
  1424.                 padding: 0 2px;
  1425.                 word-break: break-word;
  1426.                 hyphens: auto;
  1427.             }
  1428.             .shop-additional-info {
  1429.                 flex-direction: column;
  1430.                 gap: 8px;
  1431.                 font-size: 0.7rem;
  1432.                 align-items: center;
  1433.                 line-height: 1.5;
  1434.             }
  1435.             .member-since {
  1436.                 font-size: 0.7rem;
  1437.                 padding: 4px 8px;
  1438.                 line-height: 1.4;
  1439.                 word-break: break-word;
  1440.                 text-align: center;
  1441.                 width: 100%;
  1442.                 max-width: 100%;
  1443.                 justify-content: center;
  1444.                 white-space: normal;
  1445.             }
  1446.             .member-since i {
  1447.                 font-size: 0.8rem;
  1448.                 margin-right: 3px;
  1449.                 flex-shrink: 0;
  1450.             }
  1451.             .btn-ebay {
  1452.                 font-size: 0.8rem;
  1453.                 padding: 10px 14px;
  1454.                 line-height: 1.3;
  1455.             }
  1456.             .member-since i {
  1457.                 margin-right: 4px;
  1458.                 font-size: 0.8rem;
  1459.             }
  1460.             
  1461.             .btn-ebay {
  1462.                 font-size: 0.85rem;
  1463.                 padding: 10px 16px;
  1464.             }
  1465.             
  1466.             .member-since {
  1467.                 font-size: 0.75rem;
  1468.             }
  1469.             
  1470.             .shop-tab-content {
  1471.                 padding: 15px 10px;
  1472.             }
  1473.             .shop-stats-row {
  1474.                 flex-direction: column;
  1475.                 gap: 10px;
  1476.                 align-items: flex-start;
  1477.             }
  1478.         }
  1479.         .follow-button {
  1480.             background: #ffa200;
  1481.             border: none;
  1482.             color: white;
  1483.             padding: 12px 30px;
  1484.             border-radius: 25px;
  1485.             font-weight: 600;
  1486.             transition: all 0.3s ease;
  1487.             cursor: pointer;
  1488.             display: inline-flex;
  1489.             align-items: center;
  1490.             gap: 8px;
  1491.         }
  1492.         .follow-button:hover {
  1493.             background: #e8910a;
  1494.             transform: translateY(-2px);
  1495.             box-shadow: 0 5px 15px rgba(255, 162, 0, 0.3);
  1496.         }
  1497.         .follow-button.following {
  1498.             background: #28a745;
  1499.         }
  1500.         .follow-button.following:hover {
  1501.             background: #218838;
  1502.         }
  1503.         .follow-button:disabled {
  1504.             opacity: 0.6;
  1505.             cursor: not-allowed;
  1506.             transform: none;
  1507.         }
  1508.         .follow-stats {
  1509.             display: flex;
  1510.             gap: 30px;
  1511.             margin-top: 20px;
  1512.             flex-wrap: wrap;
  1513.         }
  1514.         .follow-stat {
  1515.             text-align: center;
  1516.             padding: 15px;
  1517.             background: #f8f9fa;
  1518.             border-radius: 10px;
  1519.             min-width: 120px;
  1520.         }
  1521.         .follow-stat-number {
  1522.             font-size: 1.8rem;
  1523.             font-weight: bold;
  1524.             color: #ffa200;
  1525.             display: block;
  1526.         }
  1527.         .follow-stat-label {
  1528.             color: #666;
  1529.             font-size: 0.9rem;
  1530.             text-transform: uppercase;
  1531.             letter-spacing: 0.5px;
  1532.         }
  1533.         .shop-actions {
  1534.             display: flex;
  1535.             gap: 15px;
  1536.             align-items: center;
  1537.             flex-wrap: wrap;
  1538.             margin-top: 20px;
  1539.         }
  1540.         .action-button {
  1541.             background: white;
  1542.             border: 2px solid #ffa200;
  1543.             color: #ffa200;
  1544.             padding: 10px 20px;
  1545.             border-radius: 20px;
  1546.             text-decoration: none;
  1547.             font-weight: 500;
  1548.             transition: all 0.3s ease;
  1549.             display: inline-flex;
  1550.             align-items: center;
  1551.             gap: 8px;
  1552.         }
  1553.         .action-button:hover {
  1554.             background: #ffa200;
  1555.             color: white;
  1556.             transform: translateY(-2px);
  1557.             box-shadow: 0 5px 15px rgba(255, 162, 0, 0.3);
  1558.         }
  1559.         .positive-feedback {
  1560.             color: #28a745;
  1561.             font-weight: bold;
  1562.         }
  1563.         .items-sold {
  1564.             color: #666;
  1565.             font-size: 0.9rem;
  1566.         }
  1567.         .followers-count {
  1568.             color: #666;
  1569.             font-size: 0.9rem;
  1570.         }
  1571.         .shop-avatar {
  1572.             width: 120px;
  1573.             height: 120px;
  1574.             border-radius: 50%;
  1575.             border: 4px solid white;
  1576.             object-fit: cover;
  1577.             margin-bottom: 20px;
  1578.         }
  1579.         .shop-stats {
  1580.             background: white;
  1581.             border-radius: 10px;
  1582.             padding: 30px;
  1583.             box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  1584.             margin-top: -50px;
  1585.             position: relative;
  1586.             z-index: 10;
  1587.         }
  1588.         .stat-item {
  1589.             text-align: center;
  1590.             padding: 20px;
  1591.         }
  1592.         .stat-number {
  1593.             font-size: 2.5rem;
  1594.             font-weight: bold;
  1595.             color: #ffa200;
  1596.             display: block;
  1597.         }
  1598.         .stat-label {
  1599.             color: #666;
  1600.             font-size: 0.9rem;
  1601.             text-transform: uppercase;
  1602.             letter-spacing: 1px;
  1603.         }
  1604.         .shop-description {
  1605.             background: #f8f9fa;
  1606.             padding: 30px;
  1607.             border-radius: 10px;
  1608.             margin-bottom: 40px;
  1609.         }
  1610.         .shop-contact {
  1611.             background: white;
  1612.             border: 1px solid #e9ecef;
  1613.             border-radius: 10px;
  1614.             padding: 25px;
  1615.             margin-bottom: 40px;
  1616.         }
  1617.         .contact-item {
  1618.             display: flex;
  1619.             align-items: center;
  1620.             margin-bottom: 15px;
  1621.         }
  1622.         .contact-item i {
  1623.             color: #ffa200;
  1624.             margin-right: 15px;
  1625.             width: 20px;
  1626.         }
  1627.         .product-card {
  1628.             background: white;
  1629.             border-radius: 10px;
  1630.             overflow: hidden;
  1631.             box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  1632.             transition: transform 0.3s ease, box-shadow 0.3s ease;
  1633.             margin-bottom: 30px;
  1634.         }
  1635.         .product-card:hover {
  1636.             transform: translateY(-5px);
  1637.             box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  1638.         }
  1639.         .product-image {
  1640.             height: 200px;
  1641.             background-size: cover;
  1642.             background-position: center;
  1643.             position: relative;
  1644.         }
  1645.         .product-info {
  1646.             padding: 20px;
  1647.         }
  1648.         .product-title {
  1649.             font-size: 1.1rem;
  1650.             font-weight: 600;
  1651.             margin-bottom: 10px;
  1652.             color: #333;
  1653.         }
  1654.         .product-price {
  1655.             font-size: 1.3rem;
  1656.             font-weight: bold;
  1657.             color: #ffa200;
  1658.             margin-bottom: 15px;
  1659.         }
  1660.         .product-meta {
  1661.             display: flex;
  1662.             justify-content: space-between;
  1663.             align-items: center;
  1664.             font-size: 0.9rem;
  1665.             color: #666;
  1666.         }
  1667.         .rating {
  1668.             color: #ffa200;
  1669.         }
  1670.         /* Boutons d'action uniformes */
  1671.         .btn-shop,
  1672.         .shop-action-btn {
  1673.             background: #ffa200;
  1674.             border: 1px solid #ffa200;
  1675.             color: white;
  1676.             padding: 12px 24px;
  1677.             border-radius: 6px;
  1678.             font-weight: 500;
  1679.             font-size: 0.9rem;
  1680.             transition: all 0.3s ease;
  1681.             text-decoration: none;
  1682.             display: inline-flex;
  1683.             align-items: center;
  1684.             justify-content: center;
  1685.             gap: 8px;
  1686.             min-width: 120px;
  1687.             height: 44px;
  1688.             white-space: nowrap;
  1689.         }
  1690.         .btn-shop:hover,
  1691.         .shop-action-btn:hover {
  1692.             background: #e8910a;
  1693.             border-color: #e8910a;
  1694.             color: white;
  1695.             transform: translateY(-1px);
  1696.             box-shadow: 0 4px 12px rgba(255, 162, 0, 0.3);
  1697.         }
  1698.         /* Boutons secondaires */
  1699.         .shop-action-btn.secondary {
  1700.             background: transparent;
  1701.             border: 1px solid #6c757d;
  1702.             color: #6c757d;
  1703.         }
  1704.         .shop-action-btn.secondary:hover {
  1705.             background: #6c757d;
  1706.             border-color: #6c757d;
  1707.             color: white;
  1708.             transform: translateY(-1px);
  1709.             box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
  1710.         }
  1711.         /* Responsive */
  1712.         @media(max-width: 768px) {
  1713.             .shop-header {
  1714.                 padding: 100px 0 40px;
  1715.             }
  1716.             .shop-avatar {
  1717.                 width: 80px;
  1718.                 height: 80px;
  1719.             }
  1720.             .shop-stats {
  1721.                 margin-top: -30px;
  1722.                 padding: 20px;
  1723.             }
  1724.             .stat-number {
  1725.                 font-size: 2rem;
  1726.             }
  1727.         }
  1728.         /* Très petits écrans */
  1729.         @media(max-width: 480px) {
  1730.             .btn-shop,
  1731.             .shop-action-btn {
  1732.                 min-width: 90px;
  1733.                 height: 38px;
  1734.                 font-size: 0.8rem;
  1735.                 padding: 8px 16px;
  1736.             }
  1737.             .shop-actions-row {
  1738.                 gap: 8px;
  1739.             }
  1740.         }
  1741.         /* Styles pour la section des avis */
  1742.         .review-stats-card {
  1743.             background: white;
  1744.             border-radius: 10px;
  1745.             padding: 20px;
  1746.             box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  1747.             margin-bottom: 20px;
  1748.         }
  1749.         .stats-header {
  1750.             display: flex;
  1751.             align-items: center;
  1752.             margin-bottom: 20px;
  1753.         }
  1754.         .overall-rating {
  1755.             text-align: center;
  1756.             margin-right: 20px;
  1757.         }
  1758.         .rating-number {
  1759.             font-size: 36px;
  1760.             font-weight: bold;
  1761.             color: #333;
  1762.             display: block;
  1763.         }
  1764.         .stars {
  1765.             color: #ffc107;
  1766.             font-size: 18px;
  1767.             margin-top: 5px;
  1768.         }
  1769.         .rating-summary p {
  1770.             margin: 0;
  1771.             color: #666;
  1772.         }
  1773.         .rating-breakdown {
  1774.             margin-top: 15px;
  1775.         }
  1776.         .rating-bar {
  1777.             display: flex;
  1778.             align-items: center;
  1779.             margin-bottom: 8px;
  1780.         }
  1781.         .rating-label {
  1782.             width: 40px;
  1783.             font-size: 14px;
  1784.             color: #666;
  1785.         }
  1786.         .rating-progress {
  1787.             flex: 1;
  1788.             height: 6px;
  1789.             background: #e9ecef;
  1790.             border-radius: 3px;
  1791.             margin: 0 10px;
  1792.             overflow: hidden;
  1793.         }
  1794.         .rating-fill {
  1795.             height: 100%;
  1796.             background: linear-gradient(45deg, #ffc107, #ff8c00);
  1797.             transition: width 0.3s ease;
  1798.         }
  1799.         .rating-count {
  1800.             width: 30px;
  1801.             text-align: right;
  1802.             font-size: 14px;
  1803.             color: #666;
  1804.         }
  1805.         .reviews-preview {
  1806.             background: white;
  1807.             border-radius: 10px;
  1808.             padding: 20px;
  1809.             box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  1810.         }
  1811.         .review-card-preview {
  1812.             border-bottom: 1px solid #f0f0f0;
  1813.             padding-bottom: 15px;
  1814.             margin-bottom: 15px;
  1815.         }
  1816.         .review-card-preview:last-child {
  1817.             border-bottom: none;
  1818.             margin-bottom: 0;
  1819.         }
  1820.         .review-header {
  1821.             display: flex;
  1822.             justify-content: space-between;
  1823.             align-items: center;
  1824.             margin-bottom: 10px;
  1825.         }
  1826.         .review-user {
  1827.             display: flex;
  1828.             align-items: center;
  1829.         }
  1830.         .user-avatar {
  1831.             width: 35px;
  1832.             height: 35px;
  1833.             border-radius: 50%;
  1834.             background: linear-gradient(45deg, #667eea, #764ba2);
  1835.             display: flex;
  1836.             align-items: center;
  1837.             justify-content: center;
  1838.             color: white;
  1839.             font-weight: bold;
  1840.             margin-right: 10px;
  1841.         }
  1842.         .user-info h6 {
  1843.             margin: 0;
  1844.             font-size: 14px;
  1845.             font-weight: 600;
  1846.             color: #333;
  1847.         }
  1848.         .user-info small {
  1849.             color: #666;
  1850.             font-size: 12px;
  1851.         }
  1852.         .review-rating {
  1853.             display: flex;
  1854.             align-items: center;
  1855.             gap: 5px;
  1856.         }
  1857.         .verified-badge {
  1858.             background: #28a745;
  1859.             color: white;
  1860.             padding: 2px 4px;
  1861.             border-radius: 3px;
  1862.             font-size: 10px;
  1863.             font-weight: bold;
  1864.         }
  1865.         .review-content {
  1866.             color: #666;
  1867.             font-size: 14px;
  1868.             line-height: 1.5;
  1869.         }
  1870.         .empty-reviews {
  1871.             text-align: center;
  1872.             padding: 40px 20px;
  1873.             color: #666;
  1874.         }
  1875.         .empty-reviews i {
  1876.             font-size: 48px;
  1877.             color: #ddd;
  1878.             margin-bottom: 15px;
  1879.         }
  1880.         .empty-reviews h4 {
  1881.             color: #333;
  1882.             margin-bottom: 10px;
  1883.         }
  1884.         .section-title h2 {
  1885.             color: #333;
  1886.             margin-bottom: 10px;
  1887.         }
  1888.         .section-title p {
  1889.             color: #666;
  1890.             margin-bottom: 30px;
  1891.         }
  1892.         @media(max-width: 768px) {
  1893.             .stats-header {
  1894.                 flex-direction: column;
  1895.                 text-align: center;
  1896.             }
  1897.             .overall-rating {
  1898.                 margin-right: 0;
  1899.                 margin-bottom: 15px;
  1900.             }
  1901.             .review-header {
  1902.                 flex-direction: column;
  1903.                 align-items: flex-start;
  1904.             }
  1905.             .review-rating {
  1906.                 margin-top: 5px;
  1907.             }
  1908.         }
  1909.     </style>
  1910. {% endblock %}
  1911. {% block body %}
  1912.     <!-- Shop Header eBay-style avec Karma - Pleine largeur -->
  1913.     <section
  1914.         class="shop-header">
  1915.         <!-- Carrousel eBay-style -->
  1916.         <div class="shop-carousel-ebay">
  1917.             <div class="carousel-container">
  1918.                 {% set allBannerImages = shop.getAllBannerImages() %}
  1919.                 {% if allBannerImages|length > 0 %}
  1920.                     {% for image in allBannerImages %}
  1921.                         <div class="carousel-slide {% if loop.first %}active{% endif %}" style="background-image: url('{{ asset(image) }}')">
  1922.                             <div class="shop-banner-overlay"></div>
  1923.                         </div>
  1924.                     {% endfor %}
  1925.                 {% else %}
  1926.                     <!-- Slide par défaut avec dégradé si aucune image de bannière -->
  1927.                     <div class="carousel-slide active" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);">
  1928.                         <div class="shop-banner-overlay"></div>
  1929.                     </div>
  1930.                 {% endif %}
  1931.             </div>
  1932.             <!-- Contrôles eBay-style améliorés - toujours affichés si plusieurs images -->
  1933.             {% set totalBannerImages = allBannerImages|length %}
  1934.             {% if totalBannerImages > 1 %}
  1935.                 <div class="carousel-controls-ebay">
  1936.                     <button class="carousel-btn-ebay prev-btn" onclick="previousSlide()" id="prevBtn" title="Image précédente" aria-label="Image précédente">
  1937.                         <i class="lnr lnr-chevron-left"></i>
  1938.                     </button>
  1939.                     <button class="carousel-btn-ebay pause-btn" onclick="toggleCarousel()" id="pauseBtn" title="Pause/Reprendre" aria-label="Pause/Reprendre">
  1940.                         <span id="pauseIcon" class="pause-icon-content">⏸</span>
  1941.                     </button>
  1942.                     <button class="carousel-btn-ebay next-btn" onclick="nextSlide()" id="nextBtn" title="Image suivante" aria-label="Image suivante">
  1943.                         <i class="lnr lnr-chevron-right"></i>
  1944.                     </button>
  1945.                 </div>
  1946.                 <!-- Indicateurs eBay-style améliorés -->
  1947.                 <div class="carousel-indicators-ebay">
  1948.                     {% for image in allBannerImages %}
  1949.                         <button class="carousel-indicator-ebay {% if loop.first %}active{% endif %}" onclick="goToSlide({{ loop.index0 }})" title="Image {{ loop.index }}" aria-label="Aller à l'image {{ loop.index }}"></button>
  1950.                     {% endfor %}
  1951.                 </div>
  1952.             {% endif %}
  1953.         </div>
  1954.         <!-- Contenu de la boutique eBay-style -->
  1955.         <div class="shop-header-content">
  1956.             <div class="row g-3 g-md-4 align-items-start align-items-md-center">
  1957.                 <!-- Logo de la boutique -->
  1958.                 <div class="col-12 col-md-auto text-center text-md-start">
  1959.                     <div class="shop-avatar-container-ebay">
  1960.                         {% if shop.logo %}
  1961.                             <img src="{{ asset(shop.logo) }}" alt="{{ shop.name }}" class="shop-avatar-ebay">
  1962.                         {% else %}
  1963.                             <div class="shop-avatar-ebay shop-avatar-placeholder">
  1964.                                 <i class="lnr lnr-store"></i>
  1965.                             </div>
  1966.                         {% endif %}
  1967.                         {% if shop.isVerified %}
  1968.                             <div class="verified-badge-ebay">
  1969.                                 <i class="lnr lnr-checkmark-circle"></i>
  1970.                             </div>
  1971.                         {% endif %}
  1972.                     </div>
  1973.                 </div>
  1974.                 <!-- Informations principales -->
  1975.                 <div class="col-12 col-md">
  1976.                     <div class="shop-info-ebay">
  1977.                         <!-- Nom de la boutique -->
  1978.                         <div class="shop-name-section mb-2">
  1979.                             <h1 class="shop-name-ebay mb-1">{{ shop.name }}</h1>
  1980.                             <div class="d-flex flex-wrap align-items-center gap-2">
  1981.                             {% if shop.isVerified %}
  1982.                                 <span class="verified-text">
  1983.                                     <i class="lnr lnr-checkmark-circle me-1"></i>Vendeur vérifié
  1984.                                 </span>
  1985.                             {% endif %}
  1986.                         {% if shop.shopCategory %}
  1987.                                 <span class="shop-category-ebay">{{ shop.shopCategory.name }}</span>
  1988.                         {% endif %}
  1989.                             </div>
  1990.                         </div>
  1991.                         <!-- Statistiques principales -->
  1992.                         <div class="shop-stats-ebay">
  1993.                             <div class="stat-row mb-2">
  1994.                                 {% if shop.averageRating > 0 %}
  1995.                                     <div class="stat-item-ebay">
  1996.                                         <span class="stat-percentage">{{ shop.averageRating|number_format(1) }}%</span>
  1997.                                         <span class="stat-label-ebay">Évaluations positives</span>
  1998.                                     </div>
  1999.                                 {% endif %}
  2000.                                 {% if stats.totalProductSales > 0 %}
  2001.                                     <div class="stat-item-ebay">
  2002.                                         <span class="stat-number-ebay">{{ stats.totalProductSales|number_format }}</span>
  2003.                                         <span class="stat-label-ebay">Articles vendus</span>
  2004.                                     </div>
  2005.                                 {% endif %}
  2006.                                 {% if followStats.active_follows > 0 %}
  2007.                                     <div class="stat-item-ebay">
  2008.                                         <span class="stat-number-ebay">{{ followStats.active_follows|number_format }}</span>
  2009.                                         <span class="stat-label-ebay">Suiveurs</span>
  2010.                                     </div>
  2011.                                 {% endif %}
  2012.                             </div>
  2013.                             <!-- Informations supplémentaires -->
  2014.                             <div class="shop-additional-info">
  2015.                                 <div class="d-flex flex-wrap gap-3 gap-md-4">
  2016.                                     {% if shop.averageRating > 0 %}
  2017.                                         <span class="member-since">
  2018.                                             <i class="lnr lnr-thumbs-up me-1"></i>
  2019.                                             {{ shop.averageRating|number_format(1) }}% positive feedback
  2020.                                         </span>
  2021.                                     {% endif %}
  2022.                                     {% if stats.totalProductSales > 0 %}
  2023.                                         <span class="member-since">
  2024.                                             <i class="lnr lnr-cart me-1"></i>
  2025.                                             {{ stats.totalProductSales|number_format }} produit{{ stats.totalProductSales > 1 ? 's' : '' }} vendu{{ stats.totalProductSales > 1 ? 's' : '' }}
  2026.                                         </span>
  2027.                                     {% endif %}
  2028.                                     <span class="member-since">
  2029.                                         <i class="lnr lnr-history me-1"></i>
  2030.                                         Créé depuis {{ shop.createdAt|date('M Y') }}
  2031.                                     </span>
  2032.                                 </div>
  2033.                             </div>
  2034.                         </div>
  2035.                     </div>
  2036.                 </div>
  2037.                 <!-- Actions eBay-style -->
  2038.                 <div class="col-12 col-md-auto">
  2039.                     <div class="shop-actions-ebay">
  2040.                         {% if app.user %}
  2041.                             <button id="follow-button" class="btn btn-primary btn-ebay w-100 {% if isFollowing %}following{% endif %}" data-shop-id="{{ shop.id }}" data-following="{{ isFollowing ? 'true' : 'false' }}">
  2042.                                 <span id="follow-text">
  2043.                                     {% if isFollowing %}
  2044.                                         <i class="lnr lnr-checkmark-circle me-1"></i> Suivi
  2045.                                     {% else %}
  2046.                                         <i class="lnr lnr-plus me-1"></i> Suivre
  2047.                                     {% endif %}
  2048.                                 </span>
  2049.                             </button>
  2050.                         {% else %}
  2051.                             <a href="{{ path('ui_app_login') }}" class="btn btn-primary btn-ebay w-100">
  2052.                                 <i class="lnr lnr-user me-1"></i> Se connecter pour suivre
  2053.                             </a>
  2054.                         {% endif %}
  2055.                         <div class="d-flex gap-2 mt-2">
  2056.                             <button class="btn btn-outline-secondary btn-ebay flex-fill" onclick="shareShop()" title="Partager">
  2057.                                 <i class="lnr lnr-bubble"></i>
  2058.                                 <span class="d-none d-md-inline ms-1">Partager</span>
  2059.                         </button>
  2060.                             <button class="btn btn-outline-danger btn-ebay flex-fill" onclick="reportShop()" title="Signaler">
  2061.                                 <i class="lnr lnr-flag"></i>
  2062.                                 <span class="d-none d-md-inline ms-1">Signaler</span>
  2063.                         </button>
  2064.                         </div>
  2065.                         {% if canEdit %}
  2066.                             <a href="{{ path('seller_shop_edit', {slug: shop.slug}) }}" class="btn btn-outline-primary btn-ebay w-100 mt-2">
  2067.                                 <i class="lnr lnr-pencil me-1"></i> Modifier la boutique
  2068.                             </a>
  2069.                         {% endif %}
  2070.                     </div>
  2071.                 </div>
  2072.             </div>
  2073.         </div>
  2074.     </section>
  2075.     <!-- Shop Tabs eBay-style avec Karma -->
  2076.     <section class="container">
  2077.         <div class="shop-tabs">
  2078.             <ul class="nav nav-tabs shop-tabs-nav" role="tablist">
  2079.                 <li class="nav-item shop-tab">
  2080.                     <a href="#shop-items" class="nav-link shop-tab-link active" data-tab="items" role="tab">
  2081.                         Boutique
  2082.                     </a>
  2083.                 </li>
  2084.                 <li class="nav-item shop-tab">
  2085.                     <a href="#shop-sale" class="nav-link shop-tab-link" data-tab="sale" role="tab">
  2086.                         Promotions
  2087.                     </a>
  2088.                 </li>
  2089.                 <li class="nav-item shop-tab">
  2090.                     <a href="#shop-about" class="nav-link shop-tab-link" data-tab="about" role="tab">
  2091.                         À propos
  2092.                     </a>
  2093.                 </li>
  2094.                 <li class="nav-item shop-tab">
  2095.                     <a href="#shop-feedback" class="nav-link shop-tab-link" data-tab="feedback" role="tab">
  2096.                         Avis ({{ shop.getVisibleReviewsCount() }})
  2097.                     </a>
  2098.                 </li>
  2099.             </ul>
  2100.             <!-- Tab Content: Shop Items avec Karma -->
  2101.             <div id="shop-items" class="tab-content shop-tab-content active">
  2102.                 <div class="row">
  2103.                     <div class="col-lg-12">
  2104.                         <div class="d-flex justify-content-between align-items-center mb-4">
  2105.                             <h4 class="mb-0">Produits de
  2106.                                 {{ shop.name }}</h4>
  2107.                             <div class="d-flex align-items-center gap-3">
  2108.                                 <span style="font-size: 2rem; font-weight: 600; min-width: 100px; display: inline-block; text-align: center;">
  2109.                                     <span class="product-count">{{ products|length|number_format }}</span>
  2110.                                     <span style="font-size: 1rem; font-weight: 400;">produits</span>
  2111.                                 </span>
  2112.                                 <select class="form-select" id="product-sort" style="width: auto;" onchange="if(window.sortProducts) window.sortProducts(this.value);">
  2113.                                     <option value="">Trier par</option>
  2114.                                     <option value="price_asc">Prix : Croissant</option>
  2115.                                     <option value="price_desc">Prix : Décroissant</option>
  2116.                                     <option value="newest">Plus récents</option>
  2117.                                     <option value="popular">Plus populaires</option>
  2118.                                     <option value="name_asc">Nom : A-Z</option>
  2119.                                     <option value="name_desc">Nom : Z-A</option>
  2120.                                 </select>
  2121.                             </div>
  2122.                         </div>
  2123.                         {% if products|length > 0 %}
  2124.                             <div class="row" id="products-container">
  2125.                                 {% for product in products %}
  2126.                                     <div class="col-lg-3 col-md-4 col-sm-6 mb-4 product-item" data-price="{{ product.price }}" data-name="{{ product.name|lower }}" data-views="{{ product.viewCount ?? 0 }}" data-created="{{ product.publishedAt|date('Y-m-d') }}">
  2127.                                         <div class="product-card">
  2128.                                             <a href="{{ path('ui_product_show', { slug: product.slug }) }}">
  2129.                                                 <div class="product-image" style="background-image: url('{% if product.images is defined and product.images|length > 0 %}{{ asset(product.images[0]) }}{% else %}{{ asset('ui/img/product/p1.jpg') }}{% endif %}')"></div>
  2130.                                             </a>
  2131.                                             <div class="product-info">
  2132.                                                 <h6 class="product-title">
  2133.                                                     <a href="{{ path('ui_product_show', { slug: product.slug }) }}" class="text-decoration-none">
  2134.                                                         {{ product.name }}
  2135.                                                     </a>
  2136.                                                 </h6>
  2137.                                                 <div class="product-price">{{ product.price|number_format(2, '.', ' ') }}
  2138.                                                     HTG</div>
  2139.                                                 <div class="product-meta">
  2140.                                                     <span>
  2141.                                                         {% if product.averageRating %}
  2142.                                                             <div class="rating">
  2143.                                                                 {% for i in 1..5 %}
  2144.                                                                     <i class="fa fa-star{% if i <= product.averageRating %}{% else %}-o{% endif %}"></i>
  2145.                                                                 {% endfor %}
  2146.                                                             </div>
  2147.                                                         {% endif %}
  2148.                                                     </span>
  2149.                                                     <span class="text-muted">{{ product.viewCount ?? 0 }}
  2150.                                                         vues</span>
  2151.                                                 </div>
  2152.                                             </div>
  2153.                                         </div>
  2154.                                     </div>
  2155.                                 {% endfor %}
  2156.                             </div>
  2157.                         {% else %}
  2158.                             <div class="text-center py-5">
  2159.                                 <i class="lnr lnr-package" style="font-size: 4rem; color: #ccc;"></i>
  2160.                                 <h4 class="mt-3">Aucun produit disponible</h4>
  2161.                                 <p class="text-muted">Cette boutique n'a pas encore de produits en vente.</p>
  2162.                             </div>
  2163.                         {% endif %}
  2164.                     </div>
  2165.                 </div>
  2166.             </div>
  2167.             <!-- Tab Content: Sale avec Karma -->
  2168.             <div id="shop-sale" class="tab-content shop-tab-content">
  2169.                 <div class="text-center py-5">
  2170.                     <i class="lnr lnr-tag" style="font-size: 4rem; color: #ccc;"></i>
  2171.                     <h4 class="mt-3">Aucune promotion actuellement</h4>
  2172.                     <p class="text-muted">Cette boutique n'a pas de promotions actives pour le moment.</p>
  2173.                 </div>
  2174.             </div>
  2175.             <!-- Tab Content: About avec Karma -->
  2176.             <div id="shop-about" class="tab-content shop-tab-content">
  2177.                 <div class="row">
  2178.                     <div class="col-lg-8">
  2179.                         <div class="card">
  2180.                             <div class="card-header">
  2181.                                 <h5 class="mb-0">
  2182.                                     <i class="lnr lnr-user me-2"></i>À propos de
  2183.                                     {{ shop.name }}
  2184.                                 </h5>
  2185.                             </div>
  2186.                             <div class="card-body">
  2187.                                 {% if shop.description %}
  2188.                                     <div class="card-text shop-description-content">{{ shop.description|raw }}</div>
  2189.                                 {% else %}
  2190.                                     <p class="text-muted">Aucune description disponible.</p>
  2191.                                 {% endif %}
  2192.                                 {% if shop.businessHours %}
  2193.                                     <h6 class="mt-4">
  2194.                                         <i class="lnr lnr-clock me-2"></i>Heures d'ouverture
  2195.                                     </h6>
  2196.                                     <p>{{ shop.businessHours }}</p>
  2197.                                 {% endif %}
  2198.                                 {% if shop.returnPolicy %}
  2199.                                     <h6 class="mt-4">
  2200.                                         <i class="lnr lnr-undo me-2"></i>Politique de retour
  2201.                                     </h6>
  2202.                                     <p>{{ shop.returnPolicy }}</p>
  2203.                                 {% endif %}
  2204.                             </div>
  2205.                         </div>
  2206.                     </div>
  2207.                     <div class="col-lg-4">
  2208.                         <div class="card shop-info-card">
  2209.                             <div class="card-header">
  2210.                                 <h6 class="mb-0">
  2211.                                     <i class="lnr lnr-chart me-2"></i>Statistiques de la boutique
  2212.                                 </h6>
  2213.                             </div>
  2214.                             <div class="card-body">
  2215.                                 <div class="row text-center">
  2216.                                     <div class="col-6">
  2217.                                         <div class="shop-stat-item">
  2218.                                             <span class="stat-number h4 text-primary">{{ stats.activeProducts }}</span>
  2219.                                             <span class="stat-label d-block">Produits actifs</span>
  2220.                                         </div>
  2221.                                     </div>
  2222.                                     <div class="col-6">
  2223.                                         <div class="shop-stat-item">
  2224.                                             <span class="stat-number h4 text-info">{{ stats.shopViews }}</span>
  2225.                                             <span class="stat-label d-block">Vues boutique</span>
  2226.                                         </div>
  2227.                                     </div>
  2228.                                 </div>
  2229.                             </div>
  2230.                         </div>
  2231.                     </div>
  2232.                 </div>
  2233.             </div>
  2234.             <!-- Tab Content: Feedback avec Karma -->
  2235.             <div id="shop-feedback" class="tab-content shop-tab-content">
  2236.                 <div class="row">
  2237.                     <div
  2238.                         class="col-lg-8">
  2239.                         <!-- Statistiques des avis -->
  2240.                         <div class="review-stats mb-4">
  2241.                             <div class="row">
  2242.                                 <div class="col-md-4">
  2243.                                     <div class="stat-card text-center">
  2244.                                         <h3 class="stat-number">{{ shop.getAverageRating() }}</h3>
  2245.                                         <div class="rating-stars">
  2246.                                             {% for i in 1..5 %}
  2247.                                                 <i class="lnr lnr-star{% if i <= shop.getAverageRating() %}{% else %}-empty{% endif %}"></i>
  2248.                                             {% endfor %}
  2249.                                         </div>
  2250.                                         <p class="stat-label">Note moyenne</p>
  2251.                                     </div>
  2252.                                 </div>
  2253.                                 <div class="col-md-4">
  2254.                                     <div class="stat-card text-center">
  2255.                                         <h3 class="stat-number">{{ shop.getVisibleReviewsCount() }}</h3>
  2256.                                         <p class="stat-label">Avis clients</p>
  2257.                                     </div>
  2258.                                 </div>
  2259.                                 <div class="col-md-4">
  2260.                                     <div class="stat-card text-center">
  2261.                                         <h3 class="stat-number">{{ ((shop.getVisibleReviewsCount() / 100) * 100)|round }}%</h3>
  2262.                                         <p class="stat-label">Satisfaction</p>
  2263.                                     </div>
  2264.                                 </div>
  2265.                             </div>
  2266.                         </div>
  2267.                         <!-- Liste des avis récents -->
  2268.                         <div class="reviews-preview">
  2269.                             <h5 class="mb-3">Avis récents</h5>
  2270.                             {% if shop.reviews|length > 0 %}
  2271.                                 <div class="reviews-list">
  2272.                                     {% for review in shop.reviews|slice(0, 5) %}
  2273.                                         {% if review.isVisible %}
  2274.                                             <div class="review-item">
  2275.                                                 <div class="review-header">
  2276.                                                     <div class="reviewer-info">
  2277.                                                         <div class="reviewer-avatar">
  2278.                                                             <i class="lnr lnr-user"></i>
  2279.                                                         </div>
  2280.                                                         <div class="reviewer-details">
  2281.                                                             <h6 class="reviewer-name">{{ review.user.userIdentifier }}</h6>
  2282.                                                             <div class="review-rating">
  2283.                                                                 {% for i in 1..5 %}
  2284.                                                                     <i class="lnr lnr-star{% if i <= review.rating %}{% else %}-empty{% endif %}"></i>
  2285.                                                                 {% endfor %}
  2286.                                                             </div>
  2287.                                                         </div>
  2288.                                                     </div>
  2289.                                                     <div class="review-meta">
  2290.                                                         <span class="review-date">{{ review.createdAt|date('d/m/Y') }}</span>
  2291.                                                         {% if review.isVerified %}
  2292.                                                             <span class="verified-badge">
  2293.                                                                 <i class="lnr lnr-checkmark-circle"></i>
  2294.                                                                 Vérifié
  2295.                                                             </span>
  2296.                                                         {% endif %}
  2297.                                                     </div>
  2298.                                                 </div>
  2299.                                                 {% if review.comment %}
  2300.                                                     <div class="review-comment">
  2301.                                                         <p>{{ review.comment|length > 150 ? review.comment|slice(0, 150) ~ '...' : review.comment }}</p>
  2302.                                                     </div>
  2303.                                                 {% endif %}
  2304.                                             </div>
  2305.                                         {% endif %}
  2306.                                     {% endfor %}
  2307.                                 </div>
  2308.                                 <div class="text-center mt-4">
  2309.                                     <a href="{{ path('shop_reviews_index', {'slug': shop.slug}) }}" class="btn btn-primary">
  2310.                                         <i class="lnr lnr-star me-1"></i>Voir tous les avis
  2311.                                     </a>
  2312.                                 </div>
  2313.                             {% else %}
  2314.                                 <div class="text-center py-4">
  2315.                                     <i class="lnr lnr-star" style="font-size: 3rem; color: #ccc;"></i>
  2316.                                     <h5 class="mt-3">Aucun avis pour le moment</h5>
  2317.                                     <p class="text-muted">Cette boutique n'a pas encore reçu d'avis clients.</p>
  2318.                                 </div>
  2319.                             {% endif %}
  2320.                         </div>
  2321.                     </div>
  2322.                     <div
  2323.                         class="col-lg-4">
  2324.                         <!-- Lien vers la page complète des avis -->
  2325.                         <div class="review-actions-card">
  2326.                             <h5>Évaluer cette boutique</h5>
  2327.                             <p class="text-muted">Partagez votre expérience avec cette boutique.</p>
  2328.                             <a href="{{ path('shop_reviews_new', {'slug': shop.slug}) }}" class="btn btn-primary w-100">
  2329.                                 <i class="lnr lnr-star me-1"></i>Laisser un avis
  2330.                             </a>
  2331.                         </div>
  2332.                     </div>
  2333.                 </div>
  2334.             </div>
  2335.         </div>
  2336.     </section>
  2337.     <!-- Modal de signalement -->
  2338.     <div class="modal fade" id="reportModal" tabindex="-1" aria-labelledby="reportModalLabel" aria-hidden="true">
  2339.         <div class="modal-dialog">
  2340.             <div class="modal-content">
  2341.                 <div class="modal-header">
  2342.                     <h5 class="modal-title" id="reportModalLabel">
  2343.                         <i class="lnr lnr-flag me-2"></i>&nbsp;Signaler cette boutique
  2344.                     </h5>
  2345.                     <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  2346.                 </div>
  2347.                 <div class="modal-body">
  2348.                     <form id="reportForm">
  2349.                         <div class="mb-3">
  2350.                             <label for="reportReason" class="form-label">Motif du signalement *</label>
  2351.                             <select class="form-select" id="reportReason" required>
  2352.                                 <option value="">Sélectionnez un motif</option>
  2353.                                 <option value="fake_products">Produits contrefaits</option>
  2354.                                 <option value="inappropriate_content">Contenu inapproprié</option>
  2355.                                 <option value="spam">Spam ou publicité abusive</option>
  2356.                                 <option value="fraud">Fraude ou escroquerie</option>
  2357.                                 <option value="harassment">Harcèlement</option>
  2358.                                 <option value="other">Autre</option>
  2359.                             </select>
  2360.                         </div>
  2361.                         <div class="mb-3">
  2362.                             <label for="reportDescription" class="form-label">Description détaillée *</label>
  2363.                             <textarea class="form-control" id="reportDescription" rows="4" placeholder="Décrivez le problème rencontré..." required></textarea>
  2364.                         </div>
  2365.                         <div class="mb-3">
  2366.                             <label for="reportEmail" class="form-label">Votre email (optionnel)</label>
  2367.                             <input type="email" class="form-control" id="reportEmail" placeholder="votre@email.com">
  2368.                             <div class="form-text">Nous pourrons vous contacter pour plus d'informations</div>
  2369.                         </div>
  2370.                     </form>
  2371.                 </div>
  2372.                 <div class="modal-footer">
  2373.                     <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
  2374.                     <button type="button" class="btn btn-danger" onclick="submitReport()">
  2375.                         <i class="lnr lnr-flag  me-2"></i>Envoyer le signalement
  2376.                     </button>
  2377.                 </div>
  2378.             </div>
  2379.         </div>
  2380.     </div>
  2381.     <!-- Section des avis -->
  2382.     <div class="container my-5">
  2383.         <div class="row">
  2384.             <div class="col-12">
  2385.                 <div class="section-title text-center">
  2386.                     <h2>Avis clients</h2>
  2387.                     <p>Découvrez ce que pensent nos clients de cette boutique</p>
  2388.                 </div>
  2389.             </div>
  2390.         </div>
  2391.         <div
  2392.             class="row">
  2393.             <!-- Statistiques des avis -->
  2394.             <div class="col-md-4">
  2395.                 <div class="review-stats-card">
  2396.                     <div class="stats-header">
  2397.                         <div class="overall-rating">
  2398.                             <span class="rating-number">{{ shop.reviews|length > 0 ? (shop.reviews|map(r => r.rating)|reduce((a, b) => a + b) / shop.reviews|length)|number_format(1) : '0.0' }}</span>
  2399.                             <div class="stars">
  2400.                                 {% set avgRating = shop.reviews|length > 0 ? (shop.reviews|map(r => r.rating)|reduce((a, b) => a + b) / shop.reviews|length) : 0 %}
  2401.                                 {% for i in 1..5 %}
  2402.                                     {% if i <= avgRating %}
  2403.                                         ★
  2404.                                     {% elseif i - avgRating < 1 %}
  2405.                                         ☆
  2406.                                     {% else %}
  2407.                                         ☆
  2408.                                     {% endif %}
  2409.                                 {% endfor %}
  2410.                             </div>
  2411.                         </div>
  2412.                         <div class="rating-summary">
  2413.                             <p class="mb-1">{{ shop.reviews|length }}
  2414.                                 avis</p>
  2415.                             <p class="text-muted small">Basé sur
  2416.                                 {{ shop.reviews|filter(r => r.isVerified)|length }}
  2417.                                 avis vérifiés</p>
  2418.                         </div>
  2419.                     </div>
  2420.                     <div class="rating-breakdown">
  2421.                         {% for rating in 5..1 %}
  2422.                             {% set count = shop.reviews|filter(r => r.rating == rating)|length %}
  2423.                             {% set percentage = shop.reviews|length > 0 ? (count / shop.reviews|length * 100) : 0 %}
  2424.                             <div class="rating-bar">
  2425.                                 <span class="rating-label">{{ rating }}★</span>
  2426.                                 <div class="rating-progress">
  2427.                                     <div class="rating-fill" style="width: {{ percentage }}%"></div>
  2428.                                 </div>
  2429.                                 <span class="rating-count">{{ count }}</span>
  2430.                             </div>
  2431.                         {% endfor %}
  2432.                     </div>
  2433.                 </div>
  2434.             </div>
  2435.             <!-- Aperçu des avis -->
  2436.             <div class="col-md-8">
  2437.                 <div class="reviews-preview">
  2438.                     {% if shop.reviews|length > 0 %}
  2439.                         {% for review in shop.reviews|slice(0, 3) %}
  2440.                             <div class="review-card-preview">
  2441.                                 <div class="review-header">
  2442.                                     <div class="review-user">
  2443.                                         <div class="user-avatar">
  2444.                                             {{ review.user.firstName|first|upper|default(review.user.email|first|upper) }}
  2445.                                         </div>
  2446.                                         <div class="user-info">
  2447.                                             <h6>{{ review.user.firstName|default('Utilisateur') }}</h6>
  2448.                                             <small>{{ review.getTimeAgo() }}</small>
  2449.                                         </div>
  2450.                                     </div>
  2451.                                     <div class="review-rating">
  2452.                                         <div class="stars">{{ review.getRatingStars() }}</div>
  2453.                                         {% if review.isVerified %}
  2454.                                             <span class="verified-badge">✓</span>
  2455.                                         {% endif %}
  2456.                                     </div>
  2457.                                 </div>
  2458.                                 <div class="review-content">
  2459.                                     {{ review.comment|slice(0, 150) }}
  2460.                                     {% if review.comment|length > 150 %}...
  2461.                                     {% endif %}
  2462.                                 </div>
  2463.                             </div>
  2464.                         {% endfor %}
  2465.                         <div class="text-center mt-3">
  2466.                             <a href="{{ path('shop_reviews_index', {'slug': shop.slug}) }}" class="btn btn-outline-primary">
  2467.                                 Voir tous les avis ({{ shop.reviews|length }})
  2468.                             </a>
  2469.                         </div>
  2470.                     {% else %}
  2471.                         <div class="empty-reviews">
  2472.                             <i class="lnr lnr-star"></i>
  2473.                             <h4>Aucun avis pour le moment</h4>
  2474.                             <p>Soyez le premier à laisser un avis sur cette boutique !</p>
  2475.                             {% if app.user %}
  2476.                                 <a href="{{ path('shop_reviews_new', {'slug': shop.slug}) }}" class="btn btn-primary">
  2477.                                     <i class="lnr lnraccount_recently_viewed-star"></i>
  2478.                                     Laisser un avis
  2479.                                 </a>
  2480.                             {% endif %}
  2481.                         </div>
  2482.                     {% endif %}
  2483.                 </div>
  2484.             </div>
  2485.         </div>
  2486.     </div>
  2487. {% endblock %}
  2488. {% block javascripts %}
  2489.     <script>
  2490.         document.addEventListener('DOMContentLoaded', function () {
  2491.             // Initialisation du carrousel
  2492.             console.log('DOM Content Loaded - Initializing carousel...');
  2493.             setTimeout(function() {
  2494. initCarousel();
  2495.             }, 100);
  2496. // Gestion des onglets eBay-style avec Bootstrap
  2497. const tabLinks = document.querySelectorAll('.shop-tab-link');
  2498. const tabContents = document.querySelectorAll('.shop-tab-content');
  2499. tabLinks.forEach(link => {
  2500. link.addEventListener('click', function (e) {
  2501. e.preventDefault();
  2502. // Retirer la classe active de tous les liens et contenus
  2503. tabLinks.forEach(l => {
  2504. l.classList.remove('active');
  2505. l.setAttribute('aria-selected', 'false');
  2506. });
  2507. tabContents.forEach(c => c.classList.remove('active'));
  2508. // Ajouter la classe active au lien cliqué
  2509. this.classList.add('active');
  2510. this.setAttribute('aria-selected', 'true');
  2511. // Afficher le contenu correspondant
  2512. const targetTab = this.dataset.tab;
  2513. const targetContent = document.getElementById (`shop-${targetTab}`);
  2514. if (targetContent) {
  2515. targetContent.classList.add('active');
  2516. }
  2517. });
  2518. });
  2519. // Gestion du système de follow
  2520. const followButton = document.getElementById('follow-button');
  2521. if (followButton) {
  2522. followButton.addEventListener('click', function () {
  2523. const shopId = this.dataset.shopId;
  2524. const isFollowing = this.dataset.following === 'true';
  2525. // Désactiver le bouton pendant la requête
  2526. this.disabled = true;
  2527. const originalText = this.innerHTML;
  2528. this.innerHTML = '<i class="lnr lnr-spinner"></i> Loading...';
  2529. // Envoyer la requête
  2530. fetch("{{ path('ui_api_shop_toggle_follow', {id: '__SHOP_ID__'}) }}".replace('__SHOP_ID__', shopId), {
  2531. method: 'POST',
  2532. headers: {
  2533. 'Content-Type': 'application/json',
  2534. 'X-Requested-With': 'XMLHttpRequest'
  2535. }
  2536. }).then(response => response.json()).then(data => {
  2537. if (data.success) { // Mettre à jour l'interface
  2538. this.dataset.following = data.isFollowing;
  2539. if (data.isFollowing) {
  2540. this.classList.add('following');
  2541. this.innerHTML = '<i class="lnr lnr-checkmark"></i> Suivi';
  2542. } else {
  2543. this.classList.remove('following');
  2544. this.innerHTML = '<i class="lnr lnr-plus"></i> Suivre';
  2545. }
  2546. // Mettre à jour le compteur de followers
  2547. if (followersCount && data.followersCount !== undefined) {
  2548. followersCount.textContent = data.followersCount.toLocaleString();
  2549. }
  2550. // Afficher un message de confirmation
  2551. showNotification(data.message, 'success');
  2552. } else {
  2553. showNotification(data.message, 'error');
  2554. }
  2555. }).catch(error => {
  2556. console.error('Erreur:', error);
  2557. showNotification('Une erreur est survenue', 'error');
  2558. }). finally(() => {
  2559. this.disabled = false;
  2560. });
  2561. });
  2562. }
  2563. // Fonction pour afficher les notifications
  2564. function showNotification(message, type = 'info') { // Créer l'élément de notification
  2565. const notification = document.createElement('div');
  2566. notification.className = `alert alert-${
  2567. type === 'success' ? 'success' : type === 'error' ? 'danger' : 'info'
  2568. } alert-dismissible fade show position-fixed`;
  2569. notification.style.cssText = 'top: 20px; right: 20px; z-index: 9999; min-width: 300px;';
  2570. notification.innerHTML = `
  2571.             ${message}
  2572.             <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
  2573.         `;
  2574. document.body.appendChild(notification);
  2575. // Supprimer automatiquement après 5 secondes
  2576. setTimeout(() => {
  2577. if (notification.parentNode) {
  2578. notification.remove();
  2579. }
  2580. }, 5000);
  2581. }
  2582. // Fonctions pour les actions de boutique
  2583. window.shareShop = function () { // Vérifier si l'API Web Share est disponible et si on est sur mobile
  2584. if (navigator.share && /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
  2585. navigator.share({title: '{{ shop.name }}- Boutique sur MaketOu', text: 'Découvrez cette boutique et ses produits sur MaketOu', url: window.location.href}).then(() => {
  2586. console.log('Partage réussi');
  2587. showNotification('Lien partagé avec succès !', 'success');
  2588. }).catch((error) => {
  2589. console.log('Erreur lors du partage:', error);
  2590. // Fallback vers la copie
  2591. copyToClipboard();
  2592. });
  2593. } else { // Sur desktop ou si Web Share n'est pas disponible, copier directement
  2594. copyToClipboard();
  2595. }
  2596. };
  2597. // Fonction pour copier le lien dans le presse-papiers
  2598. function copyToClipboard() {
  2599. const shopUrl = window.location.href;
  2600. const shopName = '{{ shop.name }}';
  2601. const shareText = `Découvrez la boutique "${shopName}" sur MaketOu : ${shopUrl}`;
  2602. // Utiliser directement le fallback pour éviter les conflits
  2603. fallbackCopyToClipboard(shareText);
  2604. }
  2605. // Fallback pour copier le texte
  2606. function fallbackCopyToClipboard(text) {
  2607. const textArea = document.createElement('textarea');
  2608. textArea.value = text;
  2609. textArea.style.position = 'fixed';
  2610. textArea.style.left = '-999999px';
  2611. textArea.style.top = '-999999px';
  2612. document.body.appendChild(textArea);
  2613. textArea.focus();
  2614. textArea.select();
  2615. try {
  2616. document.execCommand('copy');
  2617. showNotification('Lien copié dans le presse-papiers !', 'success');
  2618. } catch (err) {
  2619. console.error('Impossible de copier:', err);
  2620. showNotification('Impossible de copier le lien', 'error');
  2621. }
  2622. document.body.removeChild(textArea);
  2623. }
  2624. window.contactShop = function () { // Ouvrir un modal de signalement
  2625. openReportModal();
  2626. };
  2627. window.saveShop = function () { // Sauvegarder la boutique dans les favoris
  2628. showNotification('Boutique sauvegardée dans vos favoris', 'success');
  2629. };
  2630. // Fonction pour ouvrir le modal de signalement
  2631. window.openReportModal = function () {
  2632. const modal = new bootstrap.Modal(document.getElementById('reportModal'));
  2633. modal.show();
  2634. };
  2635. // Fonction pour soumettre le signalement
  2636. window.submitReport = function () {
  2637. const reason = document.getElementById('reportReason').value;
  2638. const description = document.getElementById('reportDescription').value;
  2639. const email = document.getElementById('reportEmail').value;
  2640. if (! reason || ! description) {
  2641. showNotification('Veuillez remplir tous les champs obligatoires', 'error');
  2642. return;
  2643. }
  2644. // Simuler l'envoi du signalement
  2645. const reportData = {
  2646. shopId: {{ shop.id }},
  2647. reason: reason,
  2648. description: description,
  2649. email: email,
  2650. reportedAt: new Date().toISOString()
  2651. };
  2652. console.log('Signalement envoyé:', reportData);
  2653. // Fermer le modal
  2654. const modal = bootstrap.Modal.getInstance(document.getElementById('reportModal'));
  2655. modal.hide();
  2656. // Réinitialiser le formulaire
  2657. document.getElementById('reportForm').reset();
  2658. // Afficher la confirmation
  2659. showNotification('Signalement envoyé avec succès. Nous examinerons votre demande.', 'success');
  2660. };
  2661. // Gestion du carrousel eBay-style - Variables globales
  2662. let currentSlide = 0;
  2663. let carouselInterval = null;
  2664. let isPaused = false;
  2665. let slides = [];
  2666. let indicators = [];
  2667. let carouselInitialized = false;
  2668. let autoSlideDelay = 5000; // Délai par défaut : 5 secondes
  2669. let userInteractionTimeout = null; // Timeout pour reprendre après interaction utilisateur
  2670. let isUserInteracting = false; // Flag pour savoir si l'utilisateur interagit
  2671. let pageVisibilityHidden = false; // Flag pour savoir si la page est cachée
  2672. // Définir les fonctions globales immédiatement pour qu'elles soient disponibles pour onclick
  2673. window.nextSlide = function() {
  2674.     if (slides.length === 0) {
  2675.         console.warn('nextSlide: No slides available, initializing...');
  2676.         initCarousel();
  2677.         return;
  2678.     }
  2679.     // Marquer comme interaction utilisateur
  2680.     handleUserInteraction();
  2681.     currentSlide = (currentSlide + 1) % slides.length;
  2682.     console.log('nextSlide: Moving to slide', currentSlide);
  2683.     updateCarousel();
  2684. };
  2685. window.previousSlide = function() {
  2686.     if (slides.length === 0) {
  2687.         console.warn('previousSlide: No slides available, initializing...');
  2688.         initCarousel();
  2689.         return;
  2690.     }
  2691.     // Marquer comme interaction utilisateur
  2692.     handleUserInteraction();
  2693.     currentSlide = (currentSlide - 1 + slides.length) % slides.length;
  2694.     console.log('previousSlide: Moving to slide', currentSlide);
  2695.     updateCarousel();
  2696. };
  2697. window.goToSlide = function(index) {
  2698.     if (slides.length === 0) {
  2699.         console.warn('goToSlide: No slides available, initializing...');
  2700.         initCarousel();
  2701.         // Attendre que l'initialisation soit terminée
  2702.         setTimeout(() => {
  2703.             if (index >= 0 && index < slides.length) {
  2704.                 currentSlide = index;
  2705.                 updateCarousel();
  2706.                 // Réinitialiser le carrousel automatique
  2707.                 handleUserInteraction();
  2708.             }
  2709.         }, 150);
  2710.         return;
  2711.     }
  2712.     if (index < 0 || index >= slides.length) {
  2713.         console.warn('goToSlide: Invalid index', index, '. Valid range: 0 to', slides.length - 1);
  2714.         return;
  2715.     }
  2716.     // Marquer comme interaction utilisateur
  2717.     handleUserInteraction();
  2718.     currentSlide = index;
  2719.     console.log('goToSlide: Moving to slide', currentSlide, 'of', slides.length);
  2720.     updateCarousel();
  2721. };
  2722. window.toggleCarousel = function() {
  2723.     if (slides.length === 0) {
  2724.         console.warn('toggleCarousel: No slides available, initializing...');
  2725.         initCarousel();
  2726.         return;
  2727.     }
  2728.     if (isPaused) {
  2729.         resumeCarousel();
  2730.     } else {
  2731.         pauseCarousel();
  2732.     }
  2733. };
  2734. function initCarousel() {
  2735.     if (carouselInitialized) {
  2736.         console.log('Carousel already initialized');
  2737.         return;
  2738.     }
  2739.     // Réinitialiser les variables
  2740.     currentSlide = 0;
  2741.     isPaused = false;
  2742.     
  2743.     // Récupérer les slides et indicateurs à nouveau
  2744.     const carouselContainer = document.querySelector('.shop-carousel-ebay');
  2745.     if (!carouselContainer) {
  2746.         console.log('Carousel container not found');
  2747.         return;
  2748.     }
  2749.     
  2750.     const allSlides = carouselContainer.querySelectorAll('.carousel-slide');
  2751.     const allIndicators = carouselContainer.querySelectorAll('.carousel-indicator-ebay');
  2752.     
  2753.     if (allSlides.length === 0) {
  2754.         // Masquer les contrôles si aucune image
  2755.         const controls = carouselContainer.querySelector('.carousel-controls-ebay');
  2756.         const indicatorsContainer = carouselContainer.querySelector('.carousel-indicators-ebay');
  2757.         if (controls) controls.style.display = 'none';
  2758.         if (indicatorsContainer) indicatorsContainer.style.display = 'none';
  2759.         return;
  2760.     }
  2761.     
  2762.     // Si une seule image, masquer les contrôles
  2763.     if (allSlides.length <= 1) {
  2764.         const controls = carouselContainer.querySelector('.carousel-controls-ebay');
  2765.         const indicatorsContainer = carouselContainer.querySelector('.carousel-indicators-ebay');
  2766.         if (controls) controls.style.display = 'none';
  2767.         if (indicatorsContainer) indicatorsContainer.style.display = 'none';
  2768.         // S'assurer que la slide unique est active
  2769.         allSlides[0].classList.add('active');
  2770.         return;
  2771.     }
  2772.     
  2773.     // Afficher les contrôles si plusieurs images
  2774.     const controls = carouselContainer.querySelector('.carousel-controls-ebay');
  2775.     const indicatorsContainer = carouselContainer.querySelector('.carousel-indicators-ebay');
  2776.     if (controls) controls.style.display = 'flex';
  2777.     if (indicatorsContainer) indicatorsContainer.style.display = 'flex';
  2778.     
  2779.     // Mettre à jour les références globales - convertir NodeList en Array
  2780.     slides = Array.from(allSlides);
  2781.     indicators = Array.from(allIndicators);
  2782.     
  2783.     console.log('initCarousel: Found', slides.length, 'slides and', indicators.length, 'indicators');
  2784.     
  2785.     // S'assurer que la première slide est active immédiatement
  2786.     currentSlide = 0;
  2787.     slides.forEach((slide, index) => {
  2788.         if (index === 0) {
  2789.             slide.classList.add('active');
  2790.             slide.style.opacity = '1';
  2791.             slide.style.zIndex = '2';
  2792.         } else {
  2793.             slide.classList.remove('active');
  2794.             slide.style.opacity = '0';
  2795.             slide.style.zIndex = '1';
  2796.         }
  2797.     });
  2798.     if (indicators.length > 0) {
  2799.         indicators.forEach((indicator, index) => {
  2800.             if (index === 0) {
  2801.                 indicator.classList.add('active');
  2802.             } else {
  2803.                 indicator.classList.remove('active');
  2804.             }
  2805.         });
  2806.     }
  2807.     
  2808.     // Démarrer le carrousel automatique immédiatement
  2809.     console.log('Initializing carousel - starting automatic rotation...');
  2810.     isPaused = false; // S'assurer que le carrousel n'est pas en pause
  2811.     startCarousel();
  2812.     
  2813.     // Gérer les événements de survol (une seule fois)
  2814.     carouselContainer.addEventListener('mouseenter', function() {
  2815.         if (!isPaused) {
  2816.             pauseCarousel();
  2817.         }
  2818.     });
  2819.     carouselContainer.addEventListener('mouseleave', function() {
  2820.         // Ne reprendre que si l'utilisateur n'a pas mis en pause manuellement
  2821.         if (!isPaused && !isUserInteracting && !pageVisibilityHidden) {
  2822.             startCarousel();
  2823.         }
  2824.     });
  2825.     
  2826.     // Gérer la visibilité de la page (pause quand la page est cachée)
  2827.     document.addEventListener('visibilitychange', function() {
  2828.         if (document.hidden) {
  2829.             pageVisibilityHidden = true;
  2830.             if (!isPaused) {
  2831.                 pauseCarousel();
  2832.             }
  2833.         } else {
  2834.             pageVisibilityHidden = false;
  2835.             // Reprendre seulement si l'utilisateur n'a pas mis en pause manuellement
  2836.             if (!isPaused && !isUserInteracting) {
  2837.                 startCarousel();
  2838.             }
  2839.         }
  2840.     });
  2841.     
  2842.     carouselInitialized = true;
  2843.     console.log('Carousel initialized with', slides.length, 'slides');
  2844. }
  2845. function startCarousel() {
  2846.     // Nettoyer l'intervalle existant
  2847.     clearInterval(carouselInterval);
  2848.     
  2849.     // Ne pas démarrer si la page est cachée ou si l'utilisateur interagit
  2850.     if (pageVisibilityHidden || isUserInteracting) {
  2851.         return;
  2852.     }
  2853.     
  2854.     if (slides.length <= 1) {
  2855.         console.log('Not enough slides to start carousel');
  2856.         return;
  2857.     }
  2858.     
  2859.     // S'assurer que isPaused est false pour démarrer
  2860.     isPaused = false;
  2861.     
  2862.     const pauseBtn = document.getElementById('pauseBtn');
  2863.     const pauseIcon = document.getElementById('pauseIcon');
  2864.     if (pauseBtn) {
  2865.         pauseBtn.classList.remove('playing');
  2866.         if (pauseIcon) {
  2867.             pauseIcon.textContent = '⏸';
  2868.             pauseIcon.className = 'pause-icon-content';
  2869.             pauseIcon.style.display = 'inline-block';
  2870.             pauseIcon.style.color = 'white';
  2871.             pauseIcon.style.fontSize = '22px';
  2872.             pauseIcon.style.visibility = 'visible';
  2873.             pauseIcon.style.opacity = '1';
  2874.         }
  2875.     }
  2876.     
  2877.     console.log('Starting carousel automatically...');
  2878.     carouselInterval = setInterval(() => {
  2879.         // Vérifier les conditions avant de changer de slide
  2880.         if (!isPaused && !isUserInteracting && !pageVisibilityHidden && slides.length > 0) {
  2881.             // Utiliser la fonction interne nextSlide pour éviter de déclencher handleUserInteraction
  2882.             currentSlide = (currentSlide + 1) % slides.length;
  2883.             console.log('Auto slide:', currentSlide);
  2884.             updateCarousel();
  2885.         }
  2886.     }, autoSlideDelay);
  2887. }
  2888. // Fonction pour gérer les interactions utilisateur
  2889. function handleUserInteraction() {
  2890.     isUserInteracting = true;
  2891.     
  2892.     // Nettoyer le timeout précédent s'il existe
  2893.     if (userInteractionTimeout) {
  2894.         clearTimeout(userInteractionTimeout);
  2895.     }
  2896.     
  2897.     // Reprendre le carrousel automatique après 3 secondes d'inactivité
  2898.     userInteractionTimeout = setTimeout(() => {
  2899.         isUserInteracting = false;
  2900.         // Reprendre seulement si l'utilisateur n'a pas mis en pause manuellement
  2901.         if (!isPaused && !pageVisibilityHidden) {
  2902.             startCarousel();
  2903.         }
  2904.     }, 3000);
  2905. }
  2906. function pauseCarousel() {
  2907. isPaused = true;
  2908. clearInterval(carouselInterval);
  2909.     
  2910.     // Nettoyer le timeout d'interaction utilisateur
  2911.     if (userInteractionTimeout) {
  2912.         clearTimeout(userInteractionTimeout);
  2913.         userInteractionTimeout = null;
  2914.     }
  2915.     
  2916.     const pauseBtn = document.getElementById('pauseBtn');
  2917. const pauseIcon = document.getElementById('pauseIcon');
  2918.     if (pauseBtn) {
  2919.         pauseBtn.classList.add('playing');
  2920. if (pauseIcon) {
  2921.             pauseIcon.textContent = '▶';
  2922.             pauseIcon.className = 'pause-icon-content';
  2923.             pauseIcon.style.display = 'inline-block';
  2924.             pauseIcon.style.color = 'white';
  2925.             pauseIcon.style.fontSize = '22px';
  2926.             pauseIcon.style.visibility = 'visible';
  2927.             pauseIcon.style.opacity = '1';
  2928.         }
  2929. }
  2930. }
  2931. function resumeCarousel() {
  2932. isPaused = false;
  2933.     isUserInteracting = false; // Réinitialiser le flag d'interaction
  2934.     
  2935.     // Nettoyer le timeout d'interaction utilisateur
  2936.     if (userInteractionTimeout) {
  2937.         clearTimeout(userInteractionTimeout);
  2938.         userInteractionTimeout = null;
  2939.     }
  2940.     
  2941.     const pauseBtn = document.getElementById('pauseBtn');
  2942. const pauseIcon = document.getElementById('pauseIcon');
  2943.     if (pauseBtn) {
  2944.         pauseBtn.classList.remove('playing');
  2945. if (pauseIcon) {
  2946.             pauseIcon.textContent = '⏸';
  2947.             pauseIcon.className = 'pause-icon-content';
  2948.             pauseIcon.style.display = 'inline-block';
  2949.             pauseIcon.style.color = 'white';
  2950.             pauseIcon.style.fontSize = '22px';
  2951.             pauseIcon.style.visibility = 'visible';
  2952.             pauseIcon.style.opacity = '1';
  2953. }
  2954.     }
  2955.     
  2956.     // Ne reprendre que si la page est visible
  2957.     if (!pageVisibilityHidden) {
  2958. startCarousel();
  2959.     }
  2960. }
  2961. function toggleCarousel() {
  2962.     const pauseBtn = document.getElementById('pauseBtn');
  2963.     const pauseIcon = document.getElementById('pauseIcon');
  2964.     
  2965. if (isPaused) {
  2966. resumeCarousel();
  2967. } else {
  2968. pauseCarousel();
  2969. }
  2970. }
  2971. function nextSlide() {
  2972.     if (slides.length === 0) {
  2973.         console.warn('No slides available');
  2974.         return;
  2975.     }
  2976. currentSlide = (currentSlide + 1) % slides.length;
  2977.     console.log('Next slide:', currentSlide);
  2978. updateCarousel();
  2979. }
  2980. function previousSlide() {
  2981.     if (slides.length === 0) {
  2982.         console.warn('No slides available');
  2983.         return;
  2984.     }
  2985. currentSlide = (currentSlide - 1 + slides.length) % slides.length;
  2986.     console.log('Previous slide:', currentSlide);
  2987. updateCarousel();
  2988. }
  2989. // Fonction interne goToSlide (utilisée par window.goToSlide)
  2990. function goToSlide(index) {
  2991.     if (slides.length === 0) {
  2992.         console.warn('goToSlide: No slides available');
  2993.         return;
  2994.     }
  2995.     if (index < 0 || index >= slides.length) {
  2996.         console.warn('goToSlide: Invalid index', index, '. Valid range: 0 to', slides.length - 1);
  2997.         return;
  2998.     }
  2999.     // Marquer comme interaction utilisateur
  3000.     handleUserInteraction();
  3001. currentSlide = index;
  3002.     console.log('goToSlide: Moving to slide', currentSlide, 'of', slides.length);
  3003. updateCarousel();
  3004. }
  3005. function updateCarousel() {
  3006.     if (slides.length === 0) {
  3007.         console.warn('No slides to update');
  3008.         return;
  3009.     }
  3010.     
  3011.     console.log('updateCarousel: Updating to slide', currentSlide, 'of', slides.length, 'slides');
  3012.     console.log('updateCarousel: Total indicators:', indicators.length);
  3013.     
  3014.     // Masquer toutes les slides et réinitialiser leurs styles
  3015.     slides.forEach((slide, index) => {
  3016.         slide.classList.remove('active');
  3017.         if (index === currentSlide) {
  3018.             slide.classList.add('active');
  3019.             slide.style.opacity = '1';
  3020.             slide.style.zIndex = '2';
  3021.         } else {
  3022.             slide.style.opacity = '0';
  3023.             slide.style.zIndex = '1';
  3024.         }
  3025.     });
  3026.     
  3027.     // Mettre à jour tous les indicateurs - FORCER la mise à jour en deux passes distinctes
  3028.     if (indicators.length > 0) {
  3029.         console.log('updateCarousel: Updating', indicators.length, 'indicators, currentSlide:', currentSlide);
  3030.         
  3031.         // Première passe : retirer active de TOUS les indicateurs
  3032.         indicators.forEach((indicator) => {
  3033.             indicator.classList.remove('active');
  3034.         });
  3035.         
  3036.         // Deuxième passe : ajouter active à l'indicateur correspondant à currentSlide
  3037.         if (currentSlide >= 0 && currentSlide < indicators.length && indicators[currentSlide]) {
  3038.             const activeIndicator = indicators[currentSlide];
  3039.             activeIndicator.classList.add('active');
  3040.             console.log('updateCarousel: Activated indicator', currentSlide);
  3041.             
  3042.             // Vérification et forcer si nécessaire
  3043.             if (!activeIndicator.classList.contains('active')) {
  3044.                 console.warn('updateCarousel: Class not added, forcing with setAttribute');
  3045.                 activeIndicator.setAttribute('class', activeIndicator.className + ' active');
  3046.             }
  3047.         } else {
  3048.             console.error('updateCarousel: Invalid currentSlide', currentSlide, 'or indicator not found. Total indicators:', indicators.length);
  3049.         }
  3050.     } else {
  3051.         console.warn('updateCarousel: No indicators available');
  3052.     }
  3053.     
  3054.     // Afficher la slide active
  3055.     if (slides[currentSlide]) {
  3056.         slides[currentSlide].classList.add('active');
  3057.         slides[currentSlide].style.opacity = '1';
  3058.         slides[currentSlide].style.zIndex = '2';
  3059.         console.log('updateCarousel: Showing slide', currentSlide);
  3060.     } else {
  3061.         console.error('updateCarousel: Slide', currentSlide, 'not found. Total slides:', slides.length);
  3062.     }
  3063. }
  3064. // Les fonctions globales sont définies au début du script
  3065. // Gestion du tri des produits via API Symfony
  3066. console.log('=== INITIALIZING PRODUCT SORTING ===');
  3067. console.log('Shop ID:', {{ shop.id }});
  3068. // Fonction de tri via AJAX - RENDUE GLOBALE
  3069. window.sortProducts = function (sortValue) {
  3070. console.log('=== SORT PRODUCTS CALLED ===');
  3071. console.log('Sort value:', sortValue);
  3072. const productsContainer = document.getElementById('products-container');
  3073. console.log('Products container:', productsContainer);
  3074. if (! productsContainer) {
  3075. console.error('Products container not found!');
  3076. return;
  3077. }
  3078. if (! sortValue) {
  3079. console.log('Resetting to original order');
  3080. // Recharger la page pour revenir à l'ordre original
  3081. window.location.reload();
  3082. return;
  3083. }
  3084. console.log('Showing loading spinner...');
  3085. // Afficher un indicateur de chargement
  3086. productsContainer.innerHTML = '<div class="col-12 text-center py-5"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Chargement...</span></div><p class="mt-3">Tri des produits en cours...</p></div>';
  3087. // Récupérer l'ID de la boutique
  3088. const shopId = {{ shop.id }};
  3089. console.log('Shop ID for request:', shopId);
  3090. const url = "{{ path('ui_api_shop_products_sort', {id: '__SHOP_ID__'}) }}".replace('__SHOP_ID__', shopId);
  3091. console.log('Request URL:', url);
  3092. const requestData = {
  3093. sortBy: sortValue
  3094. };
  3095. console.log('Request data:', requestData);
  3096. // Envoyer la requête AJAX
  3097. console.log('Sending AJAX request...');
  3098. fetch(url, {
  3099. method: 'POST',
  3100. headers: {
  3101. 'Content-Type': 'application/json',
  3102. 'X-Requested-With': 'XMLHttpRequest'
  3103. },
  3104. body: JSON.stringify(requestData)
  3105. }).then(response => {
  3106. console.log('Response received:', response);
  3107. console.log('Response status:', response.status);
  3108. return response.json();
  3109. }).then(data => {
  3110. console.log('Sort response data:', data);
  3111. if (data.success) {
  3112. console.log('Sort successful, updating content...');
  3113. // Mettre à jour le contenu avec le HTML retourné
  3114. productsContainer.innerHTML = data.html;
  3115. // Mettre à jour le compteur de produits
  3116. const productCount = document.querySelector('.product-count');
  3117. if (productCount) {
  3118. productCount.textContent = data.count;
  3119. }
  3120. console.log('Products sorted successfully!');
  3121. } else {
  3122. console.error('Sort failed:', data.message);
  3123. showNotification('Erreur lors du tri: ' + data.message, 'error');
  3124. // Recharger la page en cas d'erreur
  3125. window.location.reload();
  3126. }
  3127. }).catch(error => {
  3128. console.error('Sort request failed:', error);
  3129. showNotification('Erreur de connexion lors du tri', 'error');
  3130. // Recharger la page en cas d'erreur
  3131. window.location.reload();
  3132. });
  3133. };
  3134. // Attendre que le DOM soit chargé
  3135. console.log('Setting up event listeners...');
  3136. setTimeout(() => {
  3137. const sortSelect = document.getElementById('product-sort');
  3138. console.log('Sort select element:', sortSelect);
  3139. if (sortSelect) {
  3140. console.log('Adding change event listener...');
  3141. sortSelect.addEventListener('change', function () {
  3142. console.log('=== SELECT CHANGE EVENT TRIGGERED ===');
  3143. console.log('Selected value:', this.value);
  3144. console.log('Calling sortProducts...');
  3145. window.sortProducts(this.value);
  3146. });
  3147. console.log('Event listener added successfully');
  3148. } else {
  3149. console.error('Sort select element not found!');
  3150. console.log('Available elements with ID containing "sort":', document.querySelectorAll('[id*="sort"]'));
  3151. console.log('Available elements with class containing "form-select":', document.querySelectorAll('.form-select'));
  3152. }
  3153. }, 100);
  3154. // Gestion du bouton "Suivre"
  3155. const followBtn = document.querySelector('.btn-shop');
  3156. if (followBtn) {
  3157. followBtn.addEventListener('click', function () {
  3158. if (this.innerHTML.includes('Suivre')) {
  3159. this.innerHTML = '<i class="lnr lnr-heart me-1"></i> Suivi';
  3160. this.classList.remove('btn-shop');
  3161. this.classList.add('btn-success');
  3162. } else {
  3163. this.innerHTML = '<i class="lnr lnr-heart me-1"></i> Suivre';
  3164. this.classList.remove('btn-success');
  3165. this.classList.add('btn-shop');
  3166. }
  3167. });
  3168. }
  3169. });
  3170.     </script>
  3171. {% endblock %}