templates/Accueil/CommandeGroupee.html.twig line 1

Open in your IDE?
  1. {% extends "Accueil/layoutAccueil.html.twig" %}
  2. {% block title %}Commande Groupée — 5sur5 Séjour{% endblock %}
  3. {% block stylesheets %}
  4. {{ parent() }}
  5. <style>
  6.     :root {
  7.         --bg-page: #F9FBFC;
  8.         --text-primary: #1a2b3c;
  9.         --text-secondary: #6B7280;
  10.         --border-light: #e2e8f0;
  11.     }
  12.     .group-order-page {
  13.         background: var(--bg-page);
  14.         min-height: calc(100vh - 80px);
  15.         padding: 60px 24px 80px;
  16.     }
  17.     
  18.     .group-order-container {
  19.         max-width: 800px;
  20.         margin: 0 auto;
  21.     }
  22.     
  23.     .group-order-header {
  24.         text-align: center;
  25.         margin-bottom: 40px;
  26.     }
  27.     
  28.     .group-order-icon {
  29.         width: 80px;
  30.         height: 80px;
  31.         border-radius: 20px;
  32.         background: linear-gradient(135deg, rgba(245, 96, 64, 0.1) 0%, rgba(65, 162, 170, 0.1) 100%);
  33.         display: inline-flex;
  34.         align-items: center;
  35.         justify-content: center;
  36.         margin-bottom: 20px;
  37.     }
  38.     
  39.     .group-order-icon i {
  40.         font-size: 36px;
  41.         background: linear-gradient(135deg, #F56040 0%, #41A2AA 100%);
  42.         -webkit-background-clip: text;
  43.         -webkit-text-fill-color: transparent;
  44.         background-clip: text;
  45.     }
  46.     
  47.     .group-order-title {
  48.         font-size: 32px;
  49.         font-weight: 700;
  50.         color: var(--text-primary);
  51.         margin-bottom: 12px;
  52.     }
  53.     
  54.     .group-order-subtitle {
  55.         font-size: 16px;
  56.         color: var(--text-secondary);
  57.         max-width: 500px;
  58.         margin: 0 auto;
  59.     }
  60.     
  61.     .group-order-badges {
  62.         display: flex;
  63.         justify-content: center;
  64.         gap: 16px;
  65.         margin-top: 20px;
  66.         flex-wrap: wrap;
  67.     }
  68.     
  69.     .group-order-badge {
  70.         display: inline-flex;
  71.         align-items: center;
  72.         gap: 8px;
  73.         padding: 8px 16px;
  74.         background: white;
  75.         border: 1px solid var(--border-light);
  76.         border-radius: 30px;
  77.         font-size: 13px;
  78.         color: var(--text-secondary);
  79.     }
  80.     
  81.     .group-order-badge i {
  82.         color: #F56040;
  83.     }
  84.     
  85.     .group-order-card {
  86.         background: white;
  87.         border-radius: 20px;
  88.         box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  89.         overflow: hidden;
  90.     }
  91.     
  92.     .group-order-progress {
  93.         padding: 24px 32px;
  94.         background: linear-gradient(135deg, rgba(65, 162, 170, 0.04) 0%, rgba(245, 96, 64, 0.04) 100%);
  95.         border-bottom: 1px solid var(--border-light);
  96.     }
  97.     
  98.     .progress-tracker {
  99.         display: flex;
  100.         align-items: center;
  101.         justify-content: center;
  102.         gap: 8px;
  103.     }
  104.     
  105.     .step-dot {
  106.         width: 36px;
  107.         height: 36px;
  108.         border-radius: 50%;
  109.         background: white;
  110.         border: 2px solid #e5e5e5;
  111.         display: flex;
  112.         align-items: center;
  113.         justify-content: center;
  114.         font-size: 14px;
  115.         font-weight: 600;
  116.         color: #9b9b9b;
  117.         transition: all 0.3s ease;
  118.     }
  119.     
  120.     .step-dot.active {
  121.         background: #41A2AA;
  122.         border-color: #41A2AA;
  123.         color: white;
  124.     }
  125.     
  126.     .step-dot.completed {
  127.         background: #10B981;
  128.         border-color: #10B981;
  129.         color: white;
  130.     }
  131.     
  132.     .step-line {
  133.         width: 60px;
  134.         height: 2px;
  135.         background: #e5e5e5;
  136.         transition: background 0.3s ease;
  137.     }
  138.     
  139.     .step-line.completed {
  140.         background: #10B981;
  141.     }
  142.     
  143.     .step-labels {
  144.         display: flex;
  145.         justify-content: center;
  146.         gap: 40px;
  147.         margin-top: 12px;
  148.     }
  149.     
  150.     .step-label {
  151.         font-size: 12px;
  152.         font-weight: 500;
  153.         color: #9b9b9b;
  154.         transition: color 0.3s ease;
  155.     }
  156.     
  157.     .step-label.active {
  158.         color: #41A2AA;
  159.     }
  160.     
  161.     .group-order-body {
  162.         padding: 32px;
  163.     }
  164.     
  165.     .form-step {
  166.         display: none;
  167.     }
  168.     
  169.     .form-step.active {
  170.         display: block;
  171.         animation: fadeIn 0.3s ease;
  172.     }
  173.     
  174.     @keyframes fadeIn {
  175.         from { opacity: 0; transform: translateY(10px); }
  176.         to { opacity: 1; transform: translateY(0); }
  177.     }
  178.     
  179.     .section-title {
  180.         font-size: 18px;
  181.         font-weight: 600;
  182.         color: var(--text-primary);
  183.         margin-bottom: 24px;
  184.         text-align: center;
  185.     }
  186.     
  187.     /* Product Cards */
  188.     .products-grid {
  189.         display: grid;
  190.         grid-template-columns: repeat(3, 1fr);
  191.         gap: 16px;
  192.     }
  193.     
  194.     .product-card {
  195.         border: 2px solid #e5e7eb;
  196.         border-radius: 14px;
  197.         padding: 0;
  198.         cursor: pointer;
  199.         transition: all 0.3s ease;
  200.         overflow: hidden;
  201.         background: white;
  202.     }
  203.     
  204.     .product-card:hover {
  205.         border-color: #41A2AA;
  206.         transform: translateY(-4px);
  207.         box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  208.     }
  209.     
  210.     .product-card.selected {
  211.         border-color: #1a1a1a;
  212.         box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  213.     }
  214.     
  215.     .product-image {
  216.         height: 120px;
  217.         background: linear-gradient(135deg, rgba(65, 162, 170, 0.08) 0%, rgba(245, 96, 64, 0.08) 100%);
  218.         display: flex;
  219.         align-items: center;
  220.         justify-content: center;
  221.         padding: 16px;
  222.     }
  223.     
  224.     .product-image img {
  225.         max-height: 100%;
  226.         max-width: 100%;
  227.         object-fit: contain;
  228.     }
  229.     
  230.     .product-info {
  231.         padding: 16px;
  232.         text-align: center;
  233.     }
  234.     
  235.     .product-title {
  236.         font-size: 14px;
  237.         font-weight: 600;
  238.         color: var(--text-primary);
  239.         margin-bottom: 4px;
  240.     }
  241.     
  242.     .product-desc {
  243.         font-size: 12px;
  244.         color: var(--text-secondary);
  245.         margin-bottom: 8px;
  246.     }
  247.     
  248.     .product-requirement {
  249.         font-size: 11px;
  250.         color: #F56040;
  251.     }
  252.     
  253.     /* Form inputs */
  254.     .form-row {
  255.         display: grid;
  256.         grid-template-columns: 1fr 1fr;
  257.         gap: 16px;
  258.         margin-bottom: 16px;
  259.     }
  260.     
  261.     .form-row.full {
  262.         grid-template-columns: 1fr;
  263.     }
  264.     
  265.     .form-group {
  266.         display: flex;
  267.         flex-direction: column;
  268.         gap: 6px;
  269.     }
  270.     
  271.     .form-label {
  272.         font-size: 13px;
  273.         font-weight: 500;
  274.         color: var(--text-secondary);
  275.     }
  276.     
  277.     .form-input {
  278.         padding: 12px 16px;
  279.         border: 1px solid #e5e7eb;
  280.         border-radius: 10px;
  281.         font-size: 14px;
  282.         color: var(--text-primary);
  283.         transition: all 0.2s ease;
  284.     }
  285.     
  286.     .form-input:focus {
  287.         outline: none;
  288.         border-color: #41A2AA;
  289.         box-shadow: 0 0 0 3px rgba(65, 162, 170, 0.1);
  290.     }
  291.     
  292.     .form-input.is-invalid {
  293.         border-color: #F56040;
  294.     }
  295.     
  296.     /* Radio options */
  297.     .radio-group {
  298.         display: flex;
  299.         gap: 12px;
  300.     }
  301.     
  302.     .radio-option {
  303.         flex: 1;
  304.         position: relative;
  305.     }
  306.     
  307.     .radio-option input {
  308.         position: absolute;
  309.         opacity: 0;
  310.     }
  311.     
  312.     .radio-option label {
  313.         display: block;
  314.         padding: 14px 20px;
  315.         border: 1px solid #e5e7eb;
  316.         border-radius: 10px;
  317.         text-align: center;
  318.         font-size: 14px;
  319.         font-weight: 500;
  320.         color: var(--text-primary);
  321.         cursor: pointer;
  322.         transition: all 0.2s ease;
  323.     }
  324.     
  325.     .radio-option input:checked + label {
  326.         background: rgba(65, 162, 170, 0.08);
  327.         border-color: #41A2AA;
  328.         color: #41A2AA;
  329.     }
  330.     
  331.     /* Discount display */
  332.     .discount-box {
  333.         background: linear-gradient(135deg, rgba(245, 96, 64, 0.08) 0%, rgba(245, 96, 64, 0.04) 100%);
  334.         border-radius: 12px;
  335.         padding: 20px;
  336.         text-align: center;
  337.         margin-top: 20px;
  338.     }
  339.     
  340.     .discount-value {
  341.         font-size: 36px;
  342.         font-weight: 700;
  343.         color: #F56040;
  344.     }
  345.     
  346.     .discount-label {
  347.         font-size: 14px;
  348.         color: var(--text-secondary);
  349.     }
  350.     
  351.     /* Footer */
  352.     .group-order-footer {
  353.         padding: 20px 32px;
  354.         border-top: 1px solid var(--border-light);
  355.         display: flex;
  356.         justify-content: space-between;
  357.         align-items: center;
  358.         background: #fafbfc;
  359.     }
  360.     
  361.     .footer-info {
  362.         display: flex;
  363.         align-items: center;
  364.         gap: 8px;
  365.         font-size: 13px;
  366.         color: var(--text-secondary);
  367.     }
  368.     
  369.     .footer-info i {
  370.         color: #10B981;
  371.     }
  372.     
  373.     .footer-actions {
  374.         display: flex;
  375.         gap: 12px;
  376.     }
  377.     
  378.     .btn-back {
  379.         padding: 12px 24px;
  380.         border: 1px solid #e5e7eb;
  381.         border-radius: 10px;
  382.         background: white;
  383.         color: var(--text-secondary);
  384.         font-size: 14px;
  385.         font-weight: 500;
  386.         cursor: pointer;
  387.         transition: all 0.2s ease;
  388.     }
  389.     
  390.     .btn-back:hover {
  391.         background: #f5f5f5;
  392.     }
  393.     
  394.     .btn-next {
  395.         padding: 12px 32px;
  396.         border: none;
  397.         border-radius: 10px;
  398.         background: linear-gradient(135deg, #F56040 0%, #ff7659 100%);
  399.         color: white;
  400.         font-size: 14px;
  401.         font-weight: 600;
  402.         cursor: pointer;
  403.         transition: all 0.2s ease;
  404.         box-shadow: 0 4px 12px rgba(245, 96, 64, 0.25);
  405.     }
  406.     
  407.     .btn-next:hover {
  408.         transform: translateY(-2px);
  409.         box-shadow: 0 6px 16px rgba(245, 96, 64, 0.35);
  410.     }
  411.     
  412.     .btn-submit {
  413.         padding: 12px 32px;
  414.         border: none;
  415.         border-radius: 10px;
  416.         background: linear-gradient(135deg, #41A2AA 0%, #359BA3 100%);
  417.         color: white;
  418.         font-size: 14px;
  419.         font-weight: 600;
  420.         cursor: pointer;
  421.         transition: all 0.2s ease;
  422.         box-shadow: 0 4px 12px rgba(65, 162, 170, 0.25);
  423.     }
  424.     
  425.     .btn-submit:hover {
  426.         transform: translateY(-2px);
  427.         box-shadow: 0 6px 16px rgba(65, 162, 170, 0.35);
  428.     }
  429.     
  430.     /* Info section */
  431.     .info-section {
  432.         background: linear-gradient(135deg, rgba(65, 162, 170, 0.05) 0%, rgba(245, 96, 64, 0.05) 100%);
  433.         border-radius: 16px;
  434.         padding: 32px;
  435.         margin-top: 40px;
  436.         text-align: center;
  437.     }
  438.     
  439.     .info-section h3 {
  440.         font-size: 20px;
  441.         font-weight: 600;
  442.         color: var(--text-primary);
  443.         margin-bottom: 16px;
  444.     }
  445.     
  446.     .info-section p {
  447.         font-size: 15px;
  448.         color: var(--text-secondary);
  449.         line-height: 1.6;
  450.         margin-bottom: 24px;
  451.     }
  452.     
  453.     .info-benefits {
  454.         display: grid;
  455.         grid-template-columns: repeat(3, 1fr);
  456.         gap: 20px;
  457.         margin-top: 24px;
  458.     }
  459.     
  460.     .info-benefit {
  461.         text-align: center;
  462.     }
  463.     
  464.     .info-benefit-icon {
  465.         width: 48px;
  466.         height: 48px;
  467.         border-radius: 12px;
  468.         background: white;
  469.         display: inline-flex;
  470.         align-items: center;
  471.         justify-content: center;
  472.         margin-bottom: 12px;
  473.         box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  474.     }
  475.     
  476.     .info-benefit-icon i {
  477.         font-size: 22px;
  478.         color: #41A2AA;
  479.     }
  480.     
  481.     .info-benefit h4 {
  482.         font-size: 14px;
  483.         font-weight: 600;
  484.         color: var(--text-primary);
  485.         margin-bottom: 4px;
  486.     }
  487.     
  488.     .info-benefit p {
  489.         font-size: 13px;
  490.         color: var(--text-secondary);
  491.         margin: 0;
  492.     }
  493.     
  494.     /* Responsive */
  495.     @media (max-width: 768px) {
  496.         .group-order-page {
  497.             padding: 40px 16px 60px;
  498.         }
  499.         
  500.         .group-order-title {
  501.             font-size: 26px;
  502.         }
  503.         
  504.         .products-grid {
  505.             grid-template-columns: 1fr;
  506.         }
  507.         
  508.         .form-row {
  509.             grid-template-columns: 1fr;
  510.         }
  511.         
  512.         .radio-group {
  513.             flex-direction: column;
  514.         }
  515.         
  516.         .group-order-footer {
  517.             flex-direction: column;
  518.             gap: 16px;
  519.         }
  520.         
  521.         .footer-actions {
  522.             width: 100%;
  523.         }
  524.         
  525.         .footer-actions button {
  526.             flex: 1;
  527.         }
  528.         
  529.         .step-labels {
  530.             gap: 20px;
  531.         }
  532.         
  533.         .step-line {
  534.             width: 30px;
  535.         }
  536.         
  537.         .info-benefits {
  538.             grid-template-columns: 1fr;
  539.         }
  540.     }
  541. </style>
  542. {% endblock %}
  543. {% block Content %}
  544. <div class="group-order-page">
  545.     <div class="group-order-container">
  546.         
  547.         {# Header #}
  548.         <div class="group-order-header">
  549.             <div class="group-order-icon">
  550.                 <i class="bi bi-people-fill"></i>
  551.             </div>
  552.             <h1 class="group-order-title">Commande Groupée</h1>
  553.             <p class="group-order-subtitle">Proposez aux familles de commander ensemble et bénéficiez de réductions exclusives !</p>
  554.             <div class="group-order-badges">
  555.                 <span class="group-order-badge"><i class="bi bi-percent"></i> Jusqu'à -20%</span>
  556.                 <span class="group-order-badge"><i class="bi bi-truck"></i> Livraison gratuite</span>
  557.                 <span class="group-order-badge"><i class="bi bi-shield-check"></i> Paiement sécurisé</span>
  558.             </div>
  559.         </div>
  560.         
  561.         {# Form Card #}
  562.         <div class="group-order-card">
  563.             
  564.             {# Progress #}
  565.             <div class="group-order-progress">
  566.                 <div class="progress-tracker">
  567.                     <div class="step-dot active" data-step="1">1</div>
  568.                     <div class="step-line" id="line1"></div>
  569.                     <div class="step-dot" data-step="2">2</div>
  570.                     <div class="step-line" id="line2"></div>
  571.                     <div class="step-dot" data-step="3">3</div>
  572.                 </div>
  573.                 <div class="step-labels">
  574.                     <span class="step-label active" data-step="1">Produit</span>
  575.                     <span class="step-label" data-step="2">Informations</span>
  576.                     <span class="step-label" data-step="3">Validation</span>
  577.                 </div>
  578.             </div>
  579.             
  580.             {# Form Body #}
  581.             <form id="groupOrderForm" method="POST" action="{{ path('app_contact') }}">
  582.                 <input type="hidden" name="subject" value="Demande de commande groupée">
  583.                 
  584.                 <div class="group-order-body">
  585.                     
  586.                     {# Step 1: Product #}
  587.                     <div class="form-step active" id="step1">
  588.                         <h3 class="section-title">Quel produit vous intéresse ?</h3>
  589.                         <div class="products-grid">
  590.                             <div class="product-card selected" onclick="selectProduct('livre', this)">
  591.                                 <input type="hidden" name="product_type" value="Livre Séjour">
  592.                                 <div class="product-image">
  593.                                     <img src="https://res.cloudinary.com/apss-factory/image/upload/v1585907734/newprod/LivreSouvenir5sur5-4_vyykcv.jpg" alt="Livre Séjour">
  594.                                 </div>
  595.                                 <div class="product-info">
  596.                                     <h4 class="product-title">Livre Séjour</h4>
  597.                                     <p class="product-desc">Format A4 • Couverture rigide</p>
  598.                                     <span class="product-requirement">📷 Min. 32 photos</span>
  599.                                 </div>
  600.                             </div>
  601.                             <div class="product-card" onclick="selectProduct('album', this)">
  602.                                 <div class="product-image">
  603.                                     <img src="https://res.cloudinary.com/apss-factory/image/upload/v1585907462/newprod/Album5sur5-5_zqlq4g.jpg" alt="Album Photo">
  604.                                 </div>
  605.                                 <div class="product-info">
  606.                                     <h4 class="product-title">Album Photo</h4>
  607.                                     <p class="product-desc">Format classique • Reliure souple</p>
  608.                                     <span class="product-requirement">📷 Min. 20 photos</span>
  609.                                 </div>
  610.                             </div>
  611.                             <div class="product-card" onclick="selectProduct('pochette', this)">
  612.                                 <div class="product-image">
  613.                                     <img src="https://5sur5sejour.com/images/produit/PochettePhoto5sur5-2.jpg" alt="Pochette Tirages">
  614.                                 </div>
  615.                                 <div class="product-info">
  616.                                     <h4 class="product-title">Pochette Tirages</h4>
  617.                                     <p class="product-desc">Photos 10×15 • Papier brillant</p>
  618.                                     <span class="product-requirement" style="color: #41A2AA;">✓ Toujours disponible</span>
  619.                                 </div>
  620.                             </div>
  621.                         </div>
  622.                     </div>
  623.                     
  624.                     {# Step 2: Contact Info #}
  625.                     <div class="form-step" id="step2">
  626.                         <h3 class="section-title">Vos coordonnées</h3>
  627.                         
  628.                         <div class="form-row">
  629.                             <div class="form-group">
  630.                                 <label class="form-label">Nom *</label>
  631.                                 <input type="text" name="name" id="contact_name" class="form-input" placeholder="Votre nom" required>
  632.                             </div>
  633.                             <div class="form-group">
  634.                                 <label class="form-label">Prénom *</label>
  635.                                 <input type="text" name="firstname" id="contact_firstname" class="form-input" placeholder="Votre prénom" required>
  636.                             </div>
  637.                         </div>
  638.                         
  639.                         <div class="form-row">
  640.                             <div class="form-group">
  641.                                 <label class="form-label">Email *</label>
  642.                                 <input type="email" name="email" id="contact_email" class="form-input" placeholder="votre@email.com" required>
  643.                             </div>
  644.                             <div class="form-group">
  645.                                 <label class="form-label">Téléphone *</label>
  646.                                 <input type="tel" name="phone" id="contact_phone" class="form-input" placeholder="06 00 00 00 00" required>
  647.                             </div>
  648.                         </div>
  649.                         
  650.                         <div class="form-row full">
  651.                             <div class="form-group">
  652.                                 <label class="form-label">Nom de l'établissement *</label>
  653.                                 <input type="text" name="organization" id="contact_organization" class="form-input" placeholder="École, collège, association..." required>
  654.                             </div>
  655.                         </div>
  656.                         
  657.                         <div class="form-row">
  658.                             <div class="form-group">
  659.                                 <label class="form-label">Nombre de familles estimé</label>
  660.                                 <input type="number" name="families_count" id="familyCount" class="form-input" value="10" min="1" max="500" style="text-align: center;">
  661.                             </div>
  662.                             <div class="form-group">
  663.                                 <label class="form-label">Réduction estimée</label>
  664.                                 <div class="discount-box" style="margin-top: 0; padding: 12px;">
  665.                                     <div class="discount-value" id="discountValue" style="font-size: 24px;">-10%</div>
  666.                                 </div>
  667.                             </div>
  668.                         </div>
  669.                     </div>
  670.                     
  671.                     {# Step 3: Validation #}
  672.                     <div class="form-step" id="step3">
  673.                         <h3 class="section-title">Message complémentaire</h3>
  674.                         
  675.                         <div class="form-row full">
  676.                             <div class="form-group">
  677.                                 <label class="form-label">Votre message (optionnel)</label>
  678.                                 <textarea name="message" class="form-input" rows="4" placeholder="Précisez vos besoins, dates du séjour, questions..."></textarea>
  679.                             </div>
  680.                         </div>
  681.                         
  682.                         <div class="form-row full">
  683.                             <div class="form-group">
  684.                                 <label style="display: flex; align-items: flex-start; gap: 10px; cursor: pointer;">
  685.                                     <input type="checkbox" name="consent" required style="margin-top: 4px;">
  686.                                     <span style="font-size: 13px; color: var(--text-secondary);">
  687.                                         J'accepte que mes données soient utilisées pour me recontacter concernant ma demande de commande groupée.
  688.                                     </span>
  689.                                 </label>
  690.                             </div>
  691.                         </div>
  692.                     </div>
  693.                     
  694.                 </div>
  695.                 
  696.                 {# Footer #}
  697.                 <div class="group-order-footer">
  698.                     <div class="footer-info">
  699.                         <i class="bi bi-shield-check"></i>
  700.                         <span>Réponse sous 24h • Sans engagement</span>
  701.                     </div>
  702.                     <div class="footer-actions">
  703.                         <button type="button" class="btn-back" id="btnBack" style="display: none;" onclick="prevStep()">
  704.                             <i class="bi bi-arrow-left me-2"></i> Retour
  705.                         </button>
  706.                         <button type="button" class="btn-next" id="btnNext" onclick="nextStep()">
  707.                             Suivant <i class="bi bi-arrow-right ms-2"></i>
  708.                         </button>
  709.                         <button type="submit" class="btn-submit" id="btnSubmit" style="display: none;">
  710.                             <i class="bi bi-send me-2"></i> Envoyer ma demande
  711.                         </button>
  712.                     </div>
  713.                 </div>
  714.             </form>
  715.             
  716.         </div>
  717.         
  718.         {# Info Section #}
  719.         <div class="info-section">
  720.             <h3>Comment ça fonctionne ?</h3>
  721.             <p>La commande groupée permet aux familles de bénéficier de tarifs réduits en commandant ensemble.</p>
  722.             
  723.             <div class="info-benefits">
  724.                 <div class="info-benefit">
  725.                     <div class="info-benefit-icon">
  726.                         <i class="bi bi-people"></i>
  727.                     </div>
  728.                     <h4>Regroupez les familles</h4>
  729.                     <p>Plus il y a de participants, plus la réduction est importante</p>
  730.                 </div>
  731.                 <div class="info-benefit">
  732.                     <div class="info-benefit-icon">
  733.                         <i class="bi bi-percent"></i>
  734.                     </div>
  735.                     <h4>Jusqu'à -20%</h4>
  736.                     <p>Des réductions exclusives pour les commandes groupées</p>
  737.                 </div>
  738.                 <div class="info-benefit">
  739.                     <div class="info-benefit-icon">
  740.                         <i class="bi bi-truck"></i>
  741.                     </div>
  742.                     <h4>Livraison unique</h4>
  743.                     <p>Livraison gratuite à l'adresse de votre choix</p>
  744.                 </div>
  745.             </div>
  746.         </div>
  747.         
  748.     </div>
  749. </div>
  750. {% endblock %}
  751. {% block javascript %}
  752. {{ parent() }}
  753. <script>
  754. let currentStep = 1;
  755. const totalSteps = 3;
  756. function selectProduct(value, element) {
  757.     document.querySelectorAll('.product-card').forEach(card => card.classList.remove('selected'));
  758.     element.classList.add('selected');
  759.     
  760.     // Update hidden input
  761.     const productNames = {
  762.         'livre': 'Livre Séjour',
  763.         'album': 'Album Photo',
  764.         'pochette': 'Pochette Tirages'
  765.     };
  766.     document.querySelector('input[name="product_type"]').value = productNames[value];
  767. }
  768. function showStep(step) {
  769.     // Hide all steps
  770.     document.querySelectorAll('.form-step').forEach(s => s.classList.remove('active'));
  771.     
  772.     // Show current step
  773.     document.getElementById('step' + step).classList.add('active');
  774.     
  775.     // Update progress dots
  776.     document.querySelectorAll('.step-dot').forEach((dot, index) => {
  777.         const stepNum = index + 1;
  778.         dot.classList.remove('active', 'completed');
  779.         if (stepNum === step) {
  780.             dot.classList.add('active');
  781.         } else if (stepNum < step) {
  782.             dot.classList.add('completed');
  783.         }
  784.     });
  785.     
  786.     // Update progress lines
  787.     for (let i = 1; i < totalSteps; i++) {
  788.         const line = document.getElementById('line' + i);
  789.         if (line) {
  790.             line.classList.toggle('completed', i < step);
  791.         }
  792.     }
  793.     
  794.     // Update labels
  795.     document.querySelectorAll('.step-label').forEach((label, index) => {
  796.         label.classList.toggle('active', (index + 1) === step);
  797.     });
  798.     
  799.     // Update buttons
  800.     document.getElementById('btnBack').style.display = step > 1 ? 'inline-flex' : 'none';
  801.     document.getElementById('btnNext').style.display = step < totalSteps ? 'inline-flex' : 'none';
  802.     document.getElementById('btnSubmit').style.display = step === totalSteps ? 'inline-flex' : 'none';
  803.     
  804.     currentStep = step;
  805. }
  806. function nextStep() {
  807.     // Validate step 2 (contact info)
  808.     if (currentStep === 2) {
  809.         const fields = ['contact_name', 'contact_firstname', 'contact_email', 'contact_phone', 'contact_organization'];
  810.         let isValid = true;
  811.         
  812.         fields.forEach(id => {
  813.             const el = document.getElementById(id);
  814.             if (!el.value.trim()) {
  815.                 el.classList.add('is-invalid');
  816.                 isValid = false;
  817.             } else {
  818.                 el.classList.remove('is-invalid');
  819.             }
  820.         });
  821.         
  822.         if (!isValid) {
  823.             return;
  824.         }
  825.     }
  826.     
  827.     if (currentStep < totalSteps) {
  828.         showStep(currentStep + 1);
  829.     }
  830. }
  831. function prevStep() {
  832.     if (currentStep > 1) {
  833.         showStep(currentStep - 1);
  834.     }
  835. }
  836. // Discount calculation
  837. document.getElementById('familyCount').addEventListener('input', function() {
  838.     const count = parseInt(this.value) || 0;
  839.     let discount = 0;
  840.     
  841.     if (count >= 30) discount = 20;
  842.     else if (count >= 20) discount = 15;
  843.     else if (count >= 10) discount = 10;
  844.     else if (count >= 5) discount = 5;
  845.     
  846.     document.getElementById('discountValue').textContent = `-${discount}%`;
  847. });
  848. // Form validation on submit
  849. document.getElementById('groupOrderForm').addEventListener('submit', function(e) {
  850.     const consent = document.querySelector('input[name="consent"]');
  851.     if (!consent.checked) {
  852.         e.preventDefault();
  853.         alert('Veuillez accepter les conditions pour envoyer votre demande.');
  854.     }
  855. });
  856. </script>
  857. {% endblock %}