templates/home/contact.html.twig line 1

Open in your IDE?
  1. {% extends 'baseFront.html.twig' %}
  2. {% block title %}Hello HomeController!{% endblock %}
  3. {% block body %}
  4. <style>
  5.         /* ========================================
  6.            BEANSTALK - Style inspiré d'Addixo
  7.            ======================================== */
  8.         /* Variables CSS */
  9.         :root {
  10.             /* Couleurs principales - Style Addixo */
  11.             --primary-blue: #003d7a;
  12.             --primary-blue-dark: #002855;
  13.             --primary-blue-light: #0066cc;
  14.             --secondary-blue: #2563eb;
  15.             --accent-green: #10b981;
  16.             --accent-orange: #f59e0b;
  17.             /* Couleurs neutres */
  18.             --text-primary: #1a1a1a;
  19.             --text-secondary: #4a4a4a;
  20.             --text-light: #6b7280;
  21.             --bg-white: #ffffff;
  22.             --bg-light: #f8f9fa;
  23.             --bg-gray: #f3f4f6;
  24.             --border-color: #e5e7eb;
  25.             /* Typographie */
  26.             --font-primary: 'Roboto', sans-serif;
  27.             --font-secondary: 'Open Sans', sans-serif;
  28.             /* Espacements */
  29.             --spacing-xs: 0.5rem;
  30.             --spacing-sm: 1rem;
  31.             --spacing-md: 1.5rem;
  32.             --spacing-lg: 2rem;
  33.             --spacing-xl: 3rem;
  34.             --spacing-xxl: 5rem;
  35.             /* Transitions */
  36.             --transition: all 0.3s ease;
  37.             --transition-fast: all 0.2s ease;
  38.             /* Ombres */
  39.             --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  40.             --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  41.             --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
  42.             --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
  43.         }
  44.         /* Reset et Base */
  45.         * {
  46.             margin: 0;
  47.             padding: 0;
  48.             box-sizing: border-box;
  49.         }
  50.         html {
  51.             scroll-behavior: smooth;
  52.         }
  53.         body {
  54.             font-family: var(--font-secondary);
  55.             font-size: 16px;
  56.             
  57.             color: var(--text-primary);
  58.             background-color: var(--bg-white);
  59.             overflow-x: hidden;
  60.         }
  61.         
  62.         /* Typography */
  63.         h1, h2, h3, h4, h5, h6 {
  64.             font-family: var(--font-primary);
  65.             font-weight: 700;
  66.             line-height: 1.2;
  67.             margin-bottom: 1rem;
  68.         }
  69.         h1 { font-size: 3rem; }
  70.         h2 { font-size: 2.5rem; }
  71.         h3 { font-size: 1.875rem; }
  72.         p {
  73.             margin-bottom: 1rem;
  74.             color: var(--text-secondary);
  75.         }
  76.         a {
  77.             text-decoration: none;
  78.             color: inherit;
  79.             transition: var(--transition);
  80.         }
  81.         
  82.         
  83.         /* Contact Form */
  84.         .contact-form-wrapper {
  85.             background: white;
  86.             padding: 2rem;
  87.             border-radius: 8px;
  88.             box-shadow: var(--shadow-md);
  89.         }
  90.         .form-header {
  91.             margin-bottom: 2rem;
  92.         }
  93.         .form-header h3 {
  94.             color: #6b7280;
  95.             margin-bottom: 0.5rem;
  96.         }
  97.         .form-header p {
  98.             color: var(--text-light);
  99.             font-size: 0.9rem;
  100.         }
  101.         .form-row {
  102.             display: grid;
  103.             grid-template-columns: 1fr 1fr;
  104.             gap: 1rem;
  105.             margin-bottom: 1rem;
  106.         }
  107.         .form-group {
  108.             margin-bottom: 1rem;
  109.         }
  110.         .form-group label {
  111.             display: block;
  112.             margin-bottom: 0.5rem;
  113.             color: var(--text-primary);
  114.             font-weight: 500;
  115.         }
  116.         .form-group input,
  117.         .form-group select,
  118.         .form-group textarea {
  119.             width: 100%;
  120.             padding: 0.75rem;
  121.             border: 1px solid var(--border-color);
  122.             border-radius: 4px;
  123.             font-family: inherit;
  124.             transition: var(--transition);
  125.             background: white;
  126.         }
  127.         .form-group select {
  128.             cursor: pointer;
  129.             appearance: none;
  130.             background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  131.             background-repeat: no-repeat;
  132.             background-position: right 0.75rem center;
  133.             background-size: 1.5em 1.5em;
  134.             padding-right: 2.5rem;
  135.         }
  136.         .form-group select optgroup {
  137.             font-weight: 600;
  138.             color: var(--primary-blue);
  139.         }
  140.         .form-group select option {
  141.             padding: 0.5rem;
  142.             color: var(--text-primary);
  143.         }
  144.         .form-group textarea {
  145.             resize: vertical;
  146.             min-height: 120px;
  147.         }
  148.         .form-group input:focus,
  149.         .form-group select:focus,
  150.         .form-group textarea:focus {
  151.             outline: none;
  152.             border-color: var(--primary-blue);
  153.             box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
  154.         }
  155.         .checkbox-group {
  156.             display: flex;
  157.             align-items: start;
  158.             gap: 0.5rem;
  159.         }
  160.         .checkbox-group input[type="checkbox"] {
  161.             width: auto;
  162.             margin-top: 0.25rem;
  163.         }
  164.         .checkbox-group label {
  165.             margin-bottom: 0;
  166.         }
  167.         .checkbox-group a {
  168.             color: var(--primary-blue);
  169.             text-decoration: underline;
  170.         }
  171.         .btn-submit {
  172.             width: 100%;
  173.             padding: 1rem;
  174.             background: #6b7280;
  175.             color: white;
  176.             border: none;
  177.             border-radius: 4px;
  178.             font-size: 1rem;
  179.             font-weight: 600;
  180.             cursor: pointer;
  181.             transition: var(--transition);
  182.             display: flex;
  183.             align-items: center;
  184.             justify-content: center;
  185.             gap: 0.5rem;
  186.         }
  187.         .btn-submit:hover {
  188.             background: #6b7280;
  189.             transform: translateY(-2px);
  190.         }
  191.         /* Footer */
  192.         .footer {
  193.             background: var(--text-primary);
  194.             color: white;
  195.             padding: 3rem 0 1rem;
  196.         }
  197.         .footer-top {
  198.             display: grid;
  199.             grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  200.             gap: 2rem;
  201.             margin-bottom: 2rem;
  202.         }
  203.         .footer-column h4 {
  204.             margin-bottom: 1rem;
  205.             color: white;
  206.         }
  207.         .footer-logo {
  208.             margin-bottom: 1rem;
  209.         }
  210.         .footer-logo .logo-text {
  211.             font-family: var(--font-primary);
  212.             font-size: 1.5rem;
  213.             font-weight: 900;
  214.             color: white;
  215.             letter-spacing: 1px;
  216.             line-height: 1;
  217.         }
  218.         .footer-logo .logo-tagline {
  219.             font-size: 0.65rem;
  220.             color: rgba(255, 255, 255, 0.7);
  221.             text-transform: uppercase;
  222.             letter-spacing: 2px;
  223.             margin-top: 2px;
  224.             line-height: 1;
  225.         }
  226.         .footer-description {
  227.             color: rgba(255, 255, 255, 0.7);
  228.             font-size: 0.9rem;
  229.             margin-bottom: 1rem;
  230.         }
  231.         .footer-social {
  232.             display: flex;
  233.             gap: 0.5rem;
  234.         }
  235.         .footer-social a {
  236.             width: 35px;
  237.             height: 35px;
  238.             background: rgba(255, 255, 255, 0.1);
  239.             border-radius: 50%;
  240.             display: flex;
  241.             align-items: center;
  242.             justify-content: center;
  243.             transition: var(--transition);
  244.         }
  245.         .footer-social a:hover {
  246.             background: var(--primary-blue);
  247.         }
  248.         .footer-links {
  249.             list-style: none;
  250.         }
  251.         .footer-links li {
  252.             margin-bottom: 0.5rem;
  253.         }
  254.         .footer-links a {
  255.             color: rgba(255, 255, 255, 0.7);
  256.             font-size: 0.9rem;
  257.             transition: var(--transition);
  258.         }
  259.         .footer-links a:hover {
  260.             color: white;
  261.             padding-left: 5px;
  262.         }
  263.         .footer-bottom {
  264.             padding-top: 2rem;
  265.             border-top: 1px solid rgba(255, 255, 255, 0.1);
  266.         }
  267.         .footer-bottom-content {
  268.             display: flex;
  269.             justify-content: space-between;
  270.             align-items: center;
  271.         }
  272.         .copyright {
  273.             color: rgba(255, 255, 255, 0.7);
  274.             font-size: 0.9rem;
  275.         }
  276.         .footer-legal {
  277.             display: flex;
  278.             gap: 1.5rem;
  279.         }
  280.         .footer-legal a {
  281.             color: rgba(255, 255, 255, 0.7);
  282.             font-size: 0.9rem;
  283.         }
  284.         .footer-legal a:hover {
  285.             color: white;
  286.         }
  287.         /* Back to Top */
  288.         .back-to-top {
  289.             position: fixed;
  290.             bottom: 30px;
  291.             right: 30px;
  292.             width: 50px;
  293.             height: 50px;
  294.             background: var(--primary-blue);
  295.             color: white;
  296.             border: none;
  297.             border-radius: 50%;
  298.             display: flex;
  299.             align-items: center;
  300.             justify-content: center;
  301.             cursor: pointer;
  302.             font-size: 1.2rem;
  303.             opacity: 0;
  304.             visibility: hidden;
  305.             transition: var(--transition);
  306.             box-shadow: var(--shadow-lg);
  307.         }
  308.         .back-to-top.visible {
  309.             opacity: 1;
  310.             visibility: visible;
  311.         }
  312.         .back-to-top:hover {
  313.             background: var(--primary-blue-dark);
  314.             transform: translateY(-5px);
  315.         }
  316.         /* Mobile Sidebar */
  317.         .mobile-sidebar {
  318.             position: fixed;
  319.             top: 0;
  320.             left: -320px;
  321.             width: 320px;
  322.             height: 100vh;
  323.             background: white;
  324.             z-index: 2000;
  325.             transition: left 0.3s ease;
  326.             overflow-y: auto;
  327.             box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  328.         }
  329.         .mobile-sidebar.active {
  330.             left: 0;
  331.         }
  332.         .mobile-overlay {
  333.             position: fixed;
  334.             top: 0;
  335.             left: 0;
  336.             width: 100%;
  337.             height: 100%;
  338.             background: rgba(0, 0, 0, 0.5);
  339.             z-index: 1999;
  340.             opacity: 0;
  341.             visibility: hidden;
  342.             transition: all 0.3s ease;
  343.         }
  344.         .mobile-overlay.active {
  345.             opacity: 1;
  346.             visibility: visible;
  347.         }
  348.         .sidebar-header {
  349.             display: flex;
  350.             justify-content: space-between;
  351.             align-items: center;
  352.             padding: 1.5rem;
  353.             border-bottom: 1px solid var(--border-color);
  354.         }
  355.         .sidebar-logo .logo-text {
  356.             font-family: var(--font-primary);
  357.             font-size: 1.5rem;
  358.             font-weight: 900;
  359.             color: var(--primary-blue);
  360.             letter-spacing: 1px;
  361.         }
  362.         .sidebar-logo .logo-tagline {
  363.             font-size: 0.65rem;
  364.             color: var(--text-light);
  365.             text-transform: uppercase;
  366.             letter-spacing: 2px;
  367.             margin-top: 2px;
  368.         }
  369.         .sidebar-close {
  370.             background: none;
  371.             border: none;
  372.             font-size: 1.5rem;
  373.             color: var(--text-primary);
  374.             cursor: pointer;
  375.             padding: 0.5rem;
  376.             transition: var(--transition);
  377.         }
  378.         .sidebar-close:hover {
  379.             color: var(--primary-blue);
  380.             transform: rotate(90deg);
  381.         }
  382.         .sidebar-nav {
  383.             padding: 1.5rem 0;
  384.         }
  385.         .sidebar-menu {
  386.             list-style: none;
  387.             padding: 0;
  388.             margin: 0;
  389.         }
  390.         .sidebar-menu > li {
  391.             border-bottom: 1px solid var(--border-color);
  392.         }
  393.         .sidebar-link {
  394.             display: flex;
  395.             justify-content: space-between;
  396.             align-items: center;
  397.             padding: 1rem 1.5rem;
  398.             color: var(--text-primary);
  399.             font-size: 1rem;
  400.             font-weight: 500;
  401.             transition: var(--transition);
  402.         }
  403.         .sidebar-link:hover {
  404.             color: var(--primary-blue);
  405.             background: var(--bg-light);
  406.             padding-left: 2rem;
  407.         }
  408.         .sidebar-dropdown .dropdown-toggle i {
  409.             transition: var(--transition);
  410.         }
  411.         .sidebar-dropdown.active .dropdown-toggle i {
  412.             transform: rotate(180deg);
  413.         }
  414.         .sidebar-submenu {
  415.             list-style: none;
  416.             padding: 0;
  417.             background: var(--bg-gray);
  418.             display: none;
  419.         }
  420.         .sidebar-dropdown.active .sidebar-submenu {
  421.             display: block;
  422.         }
  423.         .sidebar-submenu li {
  424.             border-bottom: 1px solid var(--border-color);
  425.         }
  426.         .sidebar-submenu li:last-child {
  427.             border-bottom: none;
  428.         }
  429.         .sidebar-submenu a {
  430.             display: block;
  431.             padding: 0.75rem 1.5rem 0.75rem 3rem;
  432.             color: var(--text-secondary);
  433.             font-size: 0.9rem;
  434.             transition: var(--transition);
  435.         }
  436.         .sidebar-submenu a:hover {
  437.             color: var(--primary-blue);
  438.             background: white;
  439.             padding-left: 3.5rem;
  440.         }
  441.         .sidebar-cta {
  442.             padding: 1.5rem;
  443.             margin-top: 1rem;
  444.         }
  445.         .btn-sidebar-cta {
  446.             display: block;
  447.             width: 100%;
  448.             padding: 0.75rem;
  449.             background: var(--primary-blue);
  450.             color: white;
  451.             text-align: center;
  452.             border-radius: 4px;
  453.             font-weight: 600;
  454.             transition: var(--transition);
  455.         }
  456.         .btn-sidebar-cta:hover {
  457.             background: var(--primary-blue-dark);
  458.             transform: translateY(-2px);
  459.         }
  460.         /* Hide main nav on mobile when sidebar is used */
  461.         @media (max-width: 768px) {
  462.             .main-nav {
  463.                 display: none !important;
  464.             }
  465.             body.sidebar-open {
  466.                 overflow: hidden;
  467.             }
  468.         }
  469.         /* Responsive */
  470.         @media (max-width: 768px) {
  471.             .mobile-menu-toggle {
  472.                 display: flex;
  473.             }
  474.             .btn-header {
  475.                 display: none;
  476.             }
  477.             h1 { font-size: 2rem; }
  478.             h2 { font-size: 1.75rem; }
  479.             h3 { font-size: 1.5rem; }
  480.             .slide-title {
  481.                 font-size: 2rem;
  482.             }
  483.             .slide-description {
  484.                 font-size: 1rem;
  485.             }
  486.             .slide-buttons {
  487.                 flex-direction: column;
  488.                 align-items: center;
  489.             }
  490.             .products-grid,
  491.             .news-grid {
  492.                 grid-template-columns: 1fr;
  493.             }
  494.             .service-row,
  495.             .service-row.reverse {
  496.                 grid-template-columns: 1fr;
  497.                 direction: ltr;
  498.             }
  499.             .contact-wrapper {
  500.                 grid-template-columns: 1fr;
  501.             }
  502.             .form-row {
  503.                 grid-template-columns: 1fr;
  504.             }
  505.             .footer-top {
  506.                 grid-template-columns: 1fr;
  507.                 text-align: center;
  508.             }
  509.             .footer-bottom-content {
  510.                 flex-direction: column;
  511.                 gap: 1rem;
  512.                 text-align: center;
  513.             }
  514.             .footer-legal {
  515.                 flex-wrap: wrap;
  516.                 justify-content: center;
  517.             }
  518.             .footer-social {
  519.                 justify-content: center;
  520.             }
  521.         }
  522.         @media (max-width: 480px) {
  523.             .container {
  524.                 padding: 0 15px;
  525.             }
  526.             section {
  527.                 padding: 3rem 0;
  528.             }
  529.         }
  530.     </style>
  531. <main>
  532.         <div class="container px-1 ">
  533.             
  534.                 <h1>Contact </h1>
  535.                 </div>
  536.                 <!-- Contact information -->
  537.                 <div class="row">
  538.                 <div class="col-lg-2"></div>
  539.                 <div class="col-lg-8">
  540.         <div class="row mt-5">
  541.             <div class="col-md-12 mx-auto">
  542.                 <div class="card border-info mb-3">
  543.                     <div class="card-header text-center">Contact us</div>
  544.                     <div class="card-body text-center text-info">
  545.                         <form name="contactForm" id='contact_form_contact' class="form-border" method="post" enctype="multipart/form-data">
  546.                     <div class="form-header">
  547.                         <h3>Send us a message</h3>
  548.                         <p>Our organizing team will respond within 24 business hours.</p>
  549.                     </div>
  550.                     <div class="form-row">
  551.                         <div class="form-group" style="text-align: left;">
  552.                             <label>First Name *</label>
  553.                             <input type="text" name="prenom" id="prenom" placeholder="First Name" required>
  554.                         </div>
  555.                         <div class="form-group"style="text-align: left;">
  556.                             <label>Last Name *</label>
  557.                             <input type="text"  name="nom" id="nom"  placeholder="Last Name" required>
  558.                         </div>
  559.                     </div>
  560.                     <div class="form-row">
  561.                         <div class="form-group" style="text-align: left;">
  562.                             <label>Professional email *</label>
  563.                             <input type="email"  name="email" id="email"  placeholder="l.firstname@company.com" required>
  564.                         </div>
  565.                         <div class="form-group" style="text-align: left;">
  566.                             <label>Phone</label>
  567.                             <input type="tel"  name="tel" id="tel"  placeholder="+33 6 12 34 56 78">
  568.                         </div>
  569.                     </div>
  570.                     <div class="form-row">
  571.                         <div class="form-group" style="text-align: left;">
  572.                             <label>Company/Organization *</label>
  573.                             <input type="text"  name="entreprise" id="entreprise"  placeholder="Name of your company/organization" required>
  574.                         </div>
  575.                         <div class="form-group" style="text-align: left;">
  576.                             <label>Function/Position</label>
  577.                             <input type="text"  name="poste" id="poste"  placeholder="HR Director, CTO, etc.">
  578.                         </div>
  579.                     </div>
  580.                     
  581.                     <div class="form-group" style="text-align: left;">
  582.                         <label>Message *</label>
  583.                         <textarea  name="message" id="message"  rows="5" placeholder="Your message..." required></textarea>
  584.                     </div>
  585.                     <div class="form-group checkbox-group">
  586.                         <input type="checkbox" id="newsletter" name="newsletter">
  587.                         <label for="newsletter">I would like to receive news from RFMI</label>
  588.                     </div>
  589.                     <!-- reCAPTCHA v3 
  590.                     <div  id="captcha" class="g-recaptcha" data-sitekey="6LdaTAksAAAAAG8ngUY4zva_9J1FOEgXaYSnwkx1"
  591.                           data-callback="recaptchaCallback"></div>
  592.                     <br>-->
  593.                     <button type="submit" class="btn-submit" id='send_message'   onclick="addContact()">
  594.                         Send message <i class="fas fa-paper-plane"></i>
  595.                     </button>
  596.                     <!-- <button type="submit" class="btn-submit" id='send_message' disabled  onclick="addContact()">
  597.                         Envoyer le message <i class="fas fa-paper-plane"></i>
  598.                     </button>-->
  599.                 </form>
  600.                     </div>
  601.                 </div>
  602.                 </div>
  603.                 </div>
  604.                 </div>
  605.                 </div>
  606.                  <script>
  607.     function addContact() {
  608.         event.preventDefault(); // Empêche la soumission classique du formulaire
  609.         // Vérifiez si tous les champs requis sont remplis
  610.         const nom = document.getElementById('nom').value.trim();
  611.         const prenom = document.getElementById('prenom').value.trim();
  612.         const email = document.getElementById('email').value.trim();
  613.         // const titre = document.getElementById('titre').value.trim();
  614.         const message = document.getElementById('message').value.trim();
  615.         const tel = document.getElementById('tel').value.trim();
  616.         const entreprise = document.getElementById('entreprise').value.trim();
  617.         const poste = document.getElementById('poste').value.trim();
  618.         //const sujet = document.getElementById('sujet').value.trim();
  619.         var formData = new FormData(document.getElementById('contact_form_contact'));
  620.         fetch("{{ path('app_contact_new') }}", {
  621.             method: "POST",
  622.             body: formData
  623.         })
  624.             .then(response => response.json())
  625.             .then(data => {
  626.                 console.log("Success:", data);
  627.                 if (data.success) {
  628.                     document.getElementById('contact_form_contact').reset();
  629.                         Swal.fire({
  630.                             title: 'Merci pour votre message !',
  631.                             text: 'Nous vous répondrons dans les plus brefs délais.',
  632.                             icon: 'success',
  633.                             confirmButtonText: 'OK'
  634.                         });
  635.                 } else {
  636.                     console.log("Success:", data);
  637.                     Swal.fire('Erreur!', 'Un problème est survenu lors de l\'envoi.', 'error');
  638.                 }
  639.             })
  640.             .catch((error) => {
  641.                 console.error('Error:', error);
  642.                 Swal.fire('Erreur!', 'Un problème est survenu lors de l\'envoi.', 'error');
  643.             });
  644.     }
  645.     </script>
  646.     <script src="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.js"></script>
  647. <script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
  648. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  649.                 </div>
  650.                 
  651.                 </main>
  652. {% endblock %}