var/cache/dev/twig/84/84bb0ccf4e71a0637706afe4cb4858b5.php line 45

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* Parent/LoginParent.html.twig */
  16. class __TwigTemplate_37bb9239606940e257554a0bc0386491 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'LinksCss' => [$this'block_LinksCss'],
  29.             'Content' => [$this'block_Content'],
  30.             'javascript' => [$this'block_javascript'],
  31.         ];
  32.     }
  33.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34.     {
  35.         // line 1
  36.         return "/Accueil/layoutAccueilParents.html.twig";
  37.     }
  38.     protected function doDisplay(array $context, array $blocks = []): iterable
  39.     {
  40.         $macros $this->macros;
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Parent/LoginParent.html.twig"));
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Parent/LoginParent.html.twig"));
  45.         $this->parent $this->load("/Accueil/layoutAccueilParents.html.twig"1);
  46.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 2
  53.     /**
  54.      * @return iterable<null|scalar|\Stringable>
  55.      */
  56.     public function block_LinksCss(array $context, array $blocks = []): iterable
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""LinksCss"));
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""LinksCss"));
  63.         // line 3
  64.         yield "    ";
  65.         yield from $this->yieldParentBlock("LinksCss"$context$blocks);
  66.         yield "
  67.     <link rel=\"stylesheet\" href=\"";
  68.         // line 5
  69.         yield "/css/Parent/css/login.css";
  70.         yield "\" >
  71.     <link rel=\"stylesheet\" href=\"";
  72.         // line 6
  73.         yield "/css/Parent/css/premiercnx.css";
  74.         yield "\">
  75.     <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css\">
  76.      <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css\">
  77.  <link href=\"";
  78.         // line 10
  79.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/bootstrap-social.css"), "html"nulltrue);
  80.         yield "\" type=\"text/css\" rel=\"stylesheet\" >
  81.  <link rel=\"stylesheet\" href=\"";
  82.         // line 11
  83.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/splide.min.css"), "html"nulltrue);
  84.         yield "\">
  85. <style>
  86.     .titleProdbienvenu {
  87.     text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  88. }
  89. /* Style pour le bouton de retour en haut */
  90. .scroll-top-btn {
  91.     position: fixed;
  92.     bottom: 20px;
  93.     right: 20px;
  94.     width: 40px;
  95.     height: 40px;
  96.     border-radius: 50%;
  97.     background-color:#f09e7a;
  98.     color: white;
  99.     border: none;
  100.     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  101.     z-index: 1000;
  102.     display: none;
  103.     cursor: pointer;
  104.     transition: all 0.3s ease;
  105. }
  106. .scroll-top-btn:hover {
  107.     background-color: #f09e7a;
  108.     transform: translateY(-3px);
  109. }
  110. /* Styles pour le loader d'inscription */
  111. .register-loader {
  112.     position: fixed;
  113.     top: 0;
  114.     left: 0;
  115.     width: 100%;
  116.     height: 100%;
  117.     background-color: rgba(255, 255, 255, 0.9);
  118.     z-index: 9999;
  119.     display: none;
  120.     justify-content: center;
  121.     align-items: center;
  122. }
  123. .loader-content {
  124.     text-align: center;
  125.     background-color: white;
  126.     padding: 30px;
  127.     border-radius: 10px;
  128.     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  129.     max-width: 350px;
  130.     width: 90%;
  131. }
  132. .loader-message {
  133.     margin-top: 20px;
  134.     font-size: 18px;
  135.     font-weight: bold;
  136.     color: #41a2aa;
  137. }
  138. .loader-submessage {
  139.     margin-top: 10px;
  140.     font-size: 14px;
  141.     color: #666;
  142. }
  143. .spinner-border {
  144.     width: 3rem;
  145.     height: 3rem;
  146.     color: #f09e7a !important;
  147. }
  148. /* Styles pour le modal de confirmation */
  149. .modal {
  150.     display: flex;
  151.     align-items: center;
  152.     justify-content: center;
  153. }
  154. .modal-dialog {
  155.     margin: 0 auto;
  156.     max-width: 500px;
  157.     width: 90%;
  158. }
  159. .modal-content {
  160.     border-radius: 10px;
  161.     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  162.     margin: 0 auto;
  163. }
  164. .modal-body {
  165.     padding: 30px 20px;
  166. }
  167. .modal-footer {
  168.     justify-content: center;
  169.     padding: 15px;
  170. }
  171. .circleModal {
  172.     background-color: #f09e7a;
  173.     color: white;
  174.     border: none;
  175.     border-radius: 5px;
  176.     padding: 10px 30px;
  177.     font-weight: bold;
  178.     transition: all 0.3s ease;
  179. }
  180. .circleModal:hover {
  181.     background-color: #e8865e;
  182.     transform: translateY(-2px);
  183. }
  184. /* Animation pour le passage au champ suivant */
  185. .field-complete {
  186.     transition: all 0.3s ease;
  187.     border-color: #41a2aa !important;
  188.     box-shadow: 0 0 5px rgba(65, 162, 170, 0.5) !important;
  189.     transform: translateY(-2px);
  190. }
  191. .form-control:focus {
  192.     border-color: #f09e7a !important;
  193.     box-shadow: 0 0 6px rgba(240, 158, 122, 0.5) !important;
  194.     transition: all 0.3s ease;
  195. }
  196. /* Position for password toggle icons */
  197. .position-relative {
  198.     position: relative;
  199.     display: block;
  200.     width: 100%;
  201. }
  202. .field-icon {
  203.     position: absolute;
  204.     right: 0px;
  205.     padding-top: 10px;
  206.     transform: translateY(-50%);
  207.     z-index: 10;
  208.     cursor: pointer;
  209.     color: #41a2aa;
  210.     font-size: 14px;
  211.     pointer-events: auto;
  212. }
  213. .field-icon:hover {
  214.     color: #f09e7a;
  215. }
  216. /* Adjust input padding to make room for the icon */
  217. input[type=\"password\"] {
  218.     padding-right: 40px;
  219. }
  220. /* Updated styles for login forms */
  221. .form-section {
  222.     background-color: #fff;
  223.     padding: 25px;
  224.     border-radius: 8px;
  225.     box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  226.     margin-bottom: 20px;
  227. }
  228. .soutitle {
  229.     color: #333;
  230.     font-size: 24px;
  231.     font-weight: bold;
  232.     margin-bottom: 15px;
  233.     text-align: center;
  234. }
  235. .description2 {
  236.     color: #666;
  237.     text-align: center;
  238.     margin-bottom: 20px;
  239.     font-size: 14px;
  240.     line-height: 1.5;
  241. }
  242. .form-control {
  243.     border-radius: 4px;
  244.     padding: 12px 15px;
  245.     margin-bottom: 15px;
  246.     border: 1px solid #ddd;
  247.     transition: all 0.3s ease;
  248. }
  249. .form-control:focus {
  250.     border-color: #41a2aa !important;
  251. }
  252. .logButton {
  253.     width: 100%;
  254.     padding: 12px;
  255.     border-radius: 5px;
  256.     font-weight: bold;
  257.     font-size: 16px;
  258.     margin-top: 10px;
  259.     transition: all 0.3s ease;
  260.     border: none;
  261. }
  262. .logButton:hover {
  263.     transform: translateY(-2px);
  264.     box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  265. }
  266. .logButtonSocial {
  267.     display: flex;
  268.     align-items: center;
  269.     justify-content: center;
  270.     width: 100%;
  271.     padding: 12px;
  272.     border-radius: 5px;
  273.     font-weight: bold;
  274.     margin-top: 15px;
  275.     text-decoration: none;
  276.     transition: all 0.3s ease;
  277. }
  278. .logButtonSocial:hover {
  279.     transform: translateY(-2px);
  280.     box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  281.     text-decoration: none;
  282. }
  283. .logButtonSocial img {
  284.     margin-right: 10px;
  285.     height: 20px;
  286. }
  287. .ou-container {
  288.     position: relative;
  289.     height: 100%;
  290.     display: flex;
  291.     align-items: center;
  292.     justify-content: center;
  293. }
  294. .ou-line {
  295.     position: absolute;
  296.     width: 1px;
  297.     height: 80%;
  298.     background-color: #ddd;
  299.     left: 50%;
  300.     transform: translateX(-50%);
  301. }
  302. .ou-text {
  303.     background-color: white;
  304.     padding: 10px;
  305.     position: relative;
  306.     z-index: 1;
  307.     color: #666;
  308.     font-weight: bold;
  309. }
  310. /* Hide one form by default at 1024px and below */
  311. @media screen and (max-width: 1360px) {
  312.     #connexionDiv, #inscriptionDiv {
  313.         width: 80% !important;
  314.         margin: 0 auto !important;
  315.         float: none !important;
  316.         margin-left: 10% !important;
  317.     }
  318.     
  319.     /* Initially hide the connection form */
  320.     #connexionDiv {
  321.         display: none;
  322.     }
  323.     
  324.     /* Make the inscription form take full width */
  325.     #inscriptionDiv {
  326.         display: block;
  327.     }
  328.     
  329.     /* Hide the OR separator at 1024px */
  330.     .ou-container {
  331.         display: none;
  332.     }
  333.     
  334.     /* Make the buttons more prominent for form switching */
  335.     .circleCree {
  336.         display: block !important;
  337.         width: 100% !important;
  338.         margin: 15px auto !important;
  339.         padding: 10px !important;
  340.         background-color: #41a2aa !important;
  341.         color: white !important;
  342.         border-radius: 5px !important;
  343.         border: none !important;
  344.         cursor: pointer !important;
  345.         text-align: center !important;
  346.         font-weight: bold !important;
  347.     }
  348.     
  349.     /* Adjust column widths */
  350.     .col-md-5, .col-sm-5, .col-lg-5 {
  351.         width: 100% !important;
  352.         max-width: 100% !important;
  353.         flex: 0 0 100% !important;
  354.     }
  355.     
  356.     /* Hide the middle column with the separator */
  357.     .col-md-1.col-sm-1.col-lg-1.col-xs-1 {
  358.         display: none !important;
  359.     }
  360. }
  361. /* Maintain desktop layout above 1024px */
  362. @media screen and (min-width: 1360px) {
  363.     #connexionDiv, #inscriptionDiv {
  364.         display: block !important;
  365.     }
  366.     
  367.     .circleCree {
  368.         display: none !important;
  369.     }
  370. }
  371. /* Forgot password link styling */
  372. .description a {
  373.     color: #f09e7a;
  374.     text-decoration: none;
  375.     font-weight: bold;
  376. }
  377. .description a:hover {
  378.     text-decoration: underline;
  379. }
  380. /* Button container styling */
  381. .button-container {
  382.     margin-top: 15px;
  383.     margin-bottom: 15px;
  384. }
  385. /* Social login buttons styling */
  386. .mobilesocial {
  387.     margin-top: 10px;
  388. }
  389. </style>
  390. ";
  391.         
  392.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  393.         
  394.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  395.         yield from [];
  396.     }
  397.     // line 361
  398.     /**
  399.      * @return iterable<null|scalar|\Stringable>
  400.      */
  401.     public function block_Content(array $context, array $blocks = []): iterable
  402.     {
  403.         $macros $this->macros;
  404.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  405.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""Content"));
  406.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  407.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""Content"));
  408.         // line 362
  409.         yield "
  410.   <!-- Bouton pour remonter en haut de la page -->
  411.   <button id=\"scrollTopBtn\" class=\"scroll-top-btn\" title=\"Retour en haut\">
  412.     <i class=\"bi bi-arrow-up\"></i>
  413.   </button>
  414.   <!-- Loader pour l'inscription -->
  415.   <div id=\"registerLoader\" class=\"register-loader\">
  416.     <div class=\"loader-content\">
  417.       <div class=\"spinner-border text-primary\" role=\"status\">
  418.         <span class=\"sr-only\">Chargement...</span>
  419.                 </div>
  420.       <p class=\"loader-message\">Création de votre compte en cours...</p>
  421.       <p class=\"loader-submessage\">Nous préparons votre espace parent 5sur5sejour, merci de patienter.</p>
  422.                         </div>
  423.                     </div>
  424.   <!-- Modal de confirmation - avec l'attribut aria-hidden=\"true\" pour s'assurer qu'il est caché par défaut -->
  425.   <div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style=\"display: none;\">
  426.       <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  427.     <div class=\"modal-content\" style=\"border-radius: 10px;\">
  428.       <div class=\"modal-header border-0\">
  429.         <button onclick=\"location.reload();\" type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Fermer\" style=\"margin-left: auto;\">
  430.           <img src=\"";
  431.         // line 385
  432.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/Groupe_526.svg"), "html"nulltrue);
  433.         yield "\" alt=\"Fermer\">
  434.         </button>
  435.       </div>
  436.       <div class=\"modal-body text-center\">
  437.         <!-- Logo -->
  438.         <img class=\"imageLogo2\" src=\"";
  439.         // line 390
  440.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("Accueil/imagesAccueil/logoHeader.svg"), "html"nulltrue);
  441.         yield "\" alt=\"Logo 5sur5séjour\" style=\"max-height: 60px; margin-bottom: 20px;\">
  442.         <!-- Illustration -->
  443.         <!-- Titre -->
  444.         <h4 class=\"modal-title font-weight-bold mb-3\" id=\"modalInscriptionLabel\">🎉 Bienvenue sur 5sur5séjour !</h4>
  445.         <!-- Texte -->
  446.         <p style=\"font-size: 16px; line-height: 1.5; margin-bottom: 15px;\">
  447.   Votre compte parent est presque prêt ! Encore une étape pour accéder à l'espace du séjour de votre enfant.
  448.         </p>
  449.         <p style=\"font-size: 15px; line-height: 1.5; margin-bottom: 15px;\">
  450.   📩 Un e-mail vous a été envoyé pour <strong>activer votre compte parent</strong> en toute sécurité.
  451.         </p>
  452.         
  453.         <!-- Bouton -->
  454.         <div class=\"mt-4\">
  455.           <button onclick=\"location.reload();\" class=\"btn btn-primary\" style=\"background-color: #41a2aa; border: none; padding: 12px 30px; font-weight: bold; border-radius: 8px; font-size: 16px;\">
  456.             ✅ Compris, je vais consulter mes e-mails
  457.           </button>
  458.         </div>
  459.       </div>
  460.     </div>
  461.   </div>
  462.     </div>
  463.     <div class=\"splide no-padding no-margin\" id=\"imageSlider\" style=\"background:white\">
  464.         <div class=\"splide__track\">
  465.             <ul class=\"splide__list\">
  466.                 <!-- Slide 1 -->
  467.               
  468.                 <!-- Slide 2 -->
  469.                 <li class=\"splide__slide\">
  470.                     <div class=\"slider-content\">
  471.                         <div class=\"namePRD\" style=\"display: block;\">
  472.                             <h4 class=\"titleProdbienvenu titleProdbienvenu1\" style=\"color: #41a2aa\">Offrez des souvenirs inoubliables à votre enfant </h4>
  473.                             <h4 class=\"titleProdbienvenu titleProdbienvenu2\" style=\"color:#F09E7A\">avec des cadeaux personnalisés en toute simplicité !</h4>
  474.                           </div>
  475.                         <img src=\"";
  476.         // line 432
  477.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/3.png"), "html"nulltrue);
  478.         yield "\" class=\"imgslider\" alt=\"Image 2\" />
  479.                     </div>
  480.                 </li>
  481.                   <li class=\"splide__slide\">
  482.                     <div class=\"slider-content\">
  483.                         <div class=\"namePRD\" style=\"display: block;\">
  484.                             <h4 class=\"titleProdbienvenu titleProdbienvenu1\" style=\"color:#F09E7A\">Restez connecté au séjour de votre enfant 24h/24  </h4>
  485.                             <h4 class=\"titleProdbienvenu titleProdbienvenu2\" style=\"color:#41a2aa\">grâce à des photos partagées en toute sécurité !</h4>
  486.                           </div>
  487.                       
  488.                         
  489.                         <img src=\"";
  490.         // line 443
  491.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/2.png"), "html"nulltrue);
  492.         yield "\" class=\"imgslider\" alt=\"Image 1\" />
  493.                     </div>
  494.                 </li>
  495.                 <li class=\"splide__slide\">
  496.                     <div class=\"slider-content\">
  497.                         <div class=\"namePRD\" style=\"display: block;\">
  498.                             <h4 class=\"titleProdbienvenu titleProdbienvenu1\" style=\"color: #41a2aa\">Accéder à une boite vocale en illimitée</h4>
  499.                             <h4 class=\"titleProdbienvenu titleProdbienvenu2\" style=\"color:#F09E7A\">Pour écouter les messages laissés par les enfants et les accompagnateurs</h4>
  500.                           </div>
  501.                         <img src=\"";
  502.         // line 452
  503.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/1.png"), "html"nulltrue);
  504.         yield "\" class=\"imgslider\" alt=\"Image 2\" />
  505.                     </div>
  506.                 </li>
  507.             </ul>
  508.         </div>
  509.     </div>
  510.     <div class='row no-margin' style=\"padding-top:4%\">
  511.         <div class=\"col-lg-1 col-md-1 col-sm-1 col-xs-1 no-padding SeparateurLeftAccom\"></div>
  512.         <div class=\"col-md-10 col-sm-10 col-lg-10 col-xs-12 \" >
  513.          
  514.         <!-- Bouton caché qui déclenche le modal de confirmation -->
  515.         <button type=\"button\" id=\"showOkInscription\" class=\"d-none\" data-toggle=\"modal\" data-target=\"#exampleModal\">
  516.         En savoir plus
  517.         </button>
  518.         
  519.           
  520.             <div class=\"row no-margin\" style='margin-right: auto;margin-top:15px' id=\"formSection\">
  521.   
  522.                 
  523.                
  524.                 <div class=\"col-md-5 col-sm-5 col-lg-5  Inscription \" id='inscriptionDiv'>
  525.                    
  526.                     <form class =\"form-section\" id=\"create\" onsubmit=\"cp(); return false;\">
  527.                         <div class=\"soutitle\"> Créer un compte   </div>
  528.                     <div class =\"description2\"  style=\"padding-top:0px> Vous vous connectez pour la 1ère fois et n'avez pas
  529.                         <br> de compte Parent(s) « 5 sur 5 séjour » </div>
  530.                         <button type=\"button\"  align =\"center\" class=\"circleCree\"  onclick=\"AffichDivConnexion();\">Vous avez déjà un compte Parent(s) ? </button>
  531.                         <div class=\"form-group\">
  532.                             <input type=\"text\" class=\"form-control\" id=\"nomparent\"  placeholder=\"NOM * \" >
  533.                             <input type=\"text\" class=\"form-control\" id=\"prenomparent\"  placeholder=\"PRENOM *\">
  534.                             <input type=\"text\" autocomplete=\"off\" class=\"form-control\" id=\"mail\" placeholder=\"ADRESSE MAIL\" required data-toggle=\"tooltip\" data-placement=\"right\" title=\"\">
  535.                             <div class=\"position-relative\">
  536.                             <input type=\"password\" autocomplete=\"off\" name=\"password\" id=\"Passworduser\" value=\"\"  class=\"form-control\"  placeholder=\"MOT DE PASSE  * \">
  537.                                 <i class=\"bi bi-eye field-icon toggle-password\" toggle=\"#Passworduser\"></i>
  538.                             </div>
  539.                             <div class=\"position-relative\">
  540.                             <input type=\"password\" autocomplete=\"off\" name=\"password\" id=\"Passworduser2\"  class=\"form-control\"  placeholder=\"CONFIRMER VOTRE MOT DE PASSE\">
  541.                                 <i class=\"bi bi-eye field-icon toggle-password\" toggle=\"#Passworduser2\"></i>
  542.                             </div>
  543.                             
  544.                             <p style=\"display: none; color:red; font-weight: bold; margin-top: 10px;\" id=\"eroor\">Cet email est déjà utilisé. <a href=\"";
  545.         // line 505
  546.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("forgotPassparent");
  547.         yield "\" style=\"color:#f09e7a; text-decoration: underline;\">Mot de passe oublié ?</a></p>
  548.                             <input type=\"text\" class=\"form-control\" id=\"num\"  name=\"numero de téléphone\" placeholder=\"NUMERO DE TELEPHONE PORTABLE * \">
  549.                                
  550.   
  551.                                         <div class=\"row no-margin \">
  552.                 <div class=\"souTITRE\">Souhaitez-vous être averti lorsque l'organisateur dépose des images ou des messages du séjour ?</div>
  553.             </div>
  554.             <br>
  555.             <div class=\"row no-margin\">
  556.                 <div class=\"box-1\" id=\"smsToggle\">
  557.                     <input type='checkbox' name =\"sms\" id =\"smsInput\"  />
  558.                     <span class=\"toogle\"> </span>
  559.                 </div>
  560.                 <span class=\"sms\"> Par SMS </span>
  561.                 <div class=\"box-1\">
  562.                     <input type='checkbox' name =\"mail\" id =\"mailInput\"   />
  563.                     <span class=\"toogle\" > </span>
  564.                 </div>
  565.                 <span class=\"mail\"> Par Mail </span>
  566.             </div>
  567.             
  568.                         </div>
  569.                         <div class=\"notification\" id=\"notification\" style=\"display: none;\">L'adresse e-mail est incorrecte.</div>
  570.                         <div class=\"button-container\">
  571.                         <button  type=\"button\" onclick=\"cp();\" class=\"logButton\" style=\"color:#fff;border: 1px solid #f09e7a;    position: relative;
  572.         background-color: #f09e7a;margin-top:-5%;\" id=\"submitBtn\">     
  573.             S'inscrire
  574.           </button></div>
  575.           
  576.           <div class=\"button-container mobilesocial\">
  577.             <a href=\"";
  578.         // line 539
  579.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("connect_google_start");
  580.         yield "\"  style=\"color:#fff;background-color:#4F86EC;\" class=\"logButtonSocial\" onclick=\"_gaq.push(['_trackEvent', 'btn-social', 'click', 'btn-google']);\">
  581.          <img src=\"";
  582.         // line 540
  583.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/icons-google.png"), "html"nulltrue);
  584.         yield "\"  >Continuer avec Google
  585.        </a>
  586.                        
  587.      </div>
  588.      <div class=\"mobilesocial\" >                  
  589.                     <a href=\"";
  590.         // line 545
  591.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("connect_facebook_start");
  592.         yield "\"  class=\"logButtonSocial\" style=\"color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)\" >
  593.                      <img src=\"";
  594.         // line 546
  595.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/icons-facebook.png"), "html"nulltrue);
  596.         yield "\"  >         Continuer avec Facebook
  597.        </a>
  598.            </div>        
  599.         </form>
  600.                 </div></div>
  601.                 <div class=\"col-md-1 col-sm-1 col-lg-1 col-xs-1  \" ><div class=\"ou-container\" style=\"margin-left: 20%;\">
  602.                     <div class=\"ou-line\"></div>
  603.                     <div class=\"ou-text\">OU</div>
  604.                   </div> </div>
  605.                 <div class=\"col-md-5 col-sm-5 col-lg-5 col-xs-5 connexion \" id='connexionDiv' >
  606.                  
  607.                
  608.                     <div class=\"form-section\">
  609.                         <div class=\"soutitle\">  Se connecter </div>
  610.                         <div class =\"description2\" style=\"padding-top:0px\">Vous avez déja un compte Parent(s) « 5 sur 5 séjour »  </div>
  611.                         <button type=\"button\"  align =\"center\" class=\"circleCree\"  onclick=\"AffichDivInscri();\">Créer un compte ? </button>
  612.                         <form method=\"post\" class=\"\" id=\"login-form\" onsubmit=\"handleLogin(event)\">
  613.                             ";
  614.         // line 569
  615.         if ((($tmp = (isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'569$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  616.             // line 570
  617.             yield "                                <div class=\"alert alert-danger d-none\">";
  618.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env$this->source, (isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'570$this->source); })()), "messageKey", [], "any"falsefalsefalse570), CoreExtension::getAttribute($this->env$this->source, (isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'570$this->source); })()), "messageData", [], "any"falsefalsefalse570), "security"), "html"nulltrue);
  619.             yield "</div>
  620.                                 <script>
  621.                                     document.addEventListener('DOMContentLoaded', function() {
  622.                                         Swal.fire({
  623.                                             icon: 'error',
  624.                                             title: 'Erreur de connexion',
  625.                                             text: 'Identifiant ou mot de passe incorrect.',
  626.                                             confirmButtonColor: '#41a2aa'
  627.                                         });
  628.                                     });
  629.                                 </script>
  630.                             ";
  631.         }
  632.         // line 582
  633.         yield "                            <div class=\"form-group\">
  634.                                 <input type=\"text\"  name=\"email\" id=\"inputEmail\"  value=\"";
  635.         // line 584
  636.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["last_username"]) || array_key_exists("last_username"$context) ? $context["last_username"] : (function () { throw new RuntimeError('Variable "last_username" does not exist.'584$this->source); })()), "html"nulltrue);
  637.         yield "\"  class=\"form-control\" placeholder=\"Mon identifiant  * \" >
  638.                             <input type=\"password\" name=\"password\" id=\"inputPassword\" class=\"form-control\" placeholder=\"Mon mot de passe *\">
  639.                             <span toggle=\"#inputPassword\" class=\"bi bi-eye field-icon toggle-password\" style=\"right: 40px;\"></span>
  640.             
  641.                                 
  642.                                 <input type=\"hidden\" name=\"_csrf_token\" value=\"";
  643.         // line 590
  644.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("authenticate"), "html"nulltrue);
  645.         yield "\">
  646.                                 <div class=\"button-container\">
  647.                                     <button type=\"button\" onclick=\"handleLogin(event)\" class=\"logButton\" style=\"color:#fff;background-color:#41a2aa;border-color:rgba(0,0,0,0.2)\" id=\"login-button\">
  648.              Se connecter 
  649.           </button>
  650.         
  651.                             </div>
  652.                               
  653.                             <div class =\"description\" > <a id=\"mdpobli\" href=\"";
  654.         // line 599
  655.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("forgotPassparent");
  656.         yield "\" style=\"color:#f09e7a ; display: block\">Vous avez oublié votre mot de passe ?  </a> </div>
  657.                             <div class=\"button-container\">
  658.                <a href=\"";
  659.         // line 602
  660.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("connect_google_start");
  661.         yield "\"  style=\"color:#fff;background-color:#4F86EC;\" class=\"logButtonSocial\" onclick=\"_gaq.push(['_trackEvent', 'btn-social', 'click', 'btn-google']);\">
  662.             <img src=\"";
  663.         // line 603
  664.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/icons-google.png"), "html"nulltrue);
  665.         yield "\"  >Continuer avec Google
  666.           </a>
  667.                           
  668.         </div>
  669.         <div class=\"button-c\" style=\"display: flex;
  670.         justify-content: center;
  671.         align-items: center;\">                  
  672.                        <a href=\"";
  673.         // line 610
  674.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("connect_facebook_start");
  675.         yield "\"  class=\"logButtonSocial\" style=\"color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)\" >
  676.                         <img src=\"";
  677.         // line 611
  678.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/images/icons-facebook.png"), "html"nulltrue);
  679.         yield "\"  >         Continuer avec Facebook
  680.           </a>
  681.               </div>        
  682.         
  683.                             
  684.                                 <br>
  685.                                 <br>
  686.                                 
  687.                             </div>
  688.                         </form>
  689.                     
  690.                     </div>
  691.                 </div>
  692.                    
  693.         </div>
  694.       
  695.     </div>
  696.   <div class=\"col-md-3\" style=\"margin-top: 21%;display:none\">
  697.    <a href=\"";
  698.         // line 631
  699.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("connect_google_start");
  700.         yield "\"  style=\"color:#fff;background-color:#4F86EC;border-color:rgba(0,0,0,0.2)\" class=\"btn btn-block btn-social btn-google\" onclick=\"_gaq.push(['_trackEvent', 'btn-social', 'click', 'btn-google']);\">
  701.             <span class=\"fa fa-google\"></span> S'inscrire avec Google
  702.           </a>
  703.           
  704.                           
  705.                                 <br>
  706.                                    <br>
  707.                        <a href=\"";
  708.         // line 638
  709.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("connect_facebook_start");
  710.         yield "\"  class=\"btn btn-block btn-social btn-facebook\" style=\"color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)\" >
  711.             <span class=\"fa fa-facebook\"></span>  S'inscrire avec Facebook
  712.           </a></div>
  713.             </div>
  714. ";
  715.         
  716.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  717.         
  718.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  719.         yield from [];
  720.     }
  721.     // line 645
  722.     /**
  723.      * @return iterable<null|scalar|\Stringable>
  724.      */
  725.     public function block_javascript(array $context, array $blocks = []): iterable
  726.     {
  727.         $macros $this->macros;
  728.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  729.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  730.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  731.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  732.         // line 646
  733.         yield "   
  734.    
  735.     ";
  736.         // line 649
  737.         yield from $this->yieldParentBlock("javascript"$context$blocks);
  738.         yield "
  739.   <script src=\"";
  740.         // line 650
  741.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/splide.min.js"), "html"nulltrue);
  742.         yield "\"></script>
  743.   <script src=\"https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.all.min.js\"></script>
  744.     
  745.     <script>
  746.         /**
  747.          * Handle login form submission
  748.          */
  749.         function handleLogin(event) {
  750.             event.preventDefault();
  751.             
  752.             const email = document.getElementById('inputEmail').value;
  753.             const password = document.getElementById('inputPassword').value;
  754.             const csrfToken = document.querySelector('input[name=\"_csrf_token\"]').value;
  755.             
  756.             // Validate fields
  757.             if (!email || !password) {
  758.                 Swal.fire({
  759.                     icon: 'warning',
  760.                     title: 'Champs requis',
  761.                     text: 'Veuillez remplir tous les champs pour vous connecter.',
  762.                     confirmButtonColor: '#41a2aa'
  763.                 });
  764.                 return;
  765.             }
  766.             
  767.             // Show loading indicator
  768.             const loginBtn = document.getElementById('login-button');
  769.             const originalBtnText = loginBtn.innerHTML;
  770.             loginBtn.disabled = true;
  771.             loginBtn.innerHTML = '<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span> Connexion...';
  772.             
  773.             // Send AJAX request
  774.             \$.ajax({
  775.                 type: \"POST\",
  776.                 url: \"";
  777.         // line 684
  778.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_back_Parent");
  779.         yield "\",
  780.                 data: {
  781.                     email: email,
  782.                     password: password,
  783.                     _csrf_token: csrfToken
  784.                 },
  785.                 success: function(response) {
  786.                     // Si la réponse est un objet JSON
  787.                     if (typeof response === 'object') {
  788.                         if (response.success) {
  789.                             window.location.href = \"";
  790.         // line 694
  791.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("CodeSejour");
  792.         yield "\";
  793.                         } else {
  794.                             Swal.fire({
  795.                                 icon: 'error',
  796.                                 title: 'Erreur de connexion',
  797.                                 text: 'Identifiant ou mot de passe incorrect.',
  798.                                 confirmButtonColor: '#41a2aa'
  799.                             });
  800.                             loginBtn.disabled = false;
  801.                             loginBtn.innerHTML = originalBtnText;
  802.                         }
  803.                     } 
  804.                     // Si la réponse contient du HTML (redirection)
  805.                     else if (response.includes('CodeSejour')) {
  806.                         window.location.href = \"";
  807.         // line 708
  808.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("CodeSejour");
  809.         yield "\";
  810.                     } else {
  811.                         Swal.fire({
  812.                             icon: 'error',
  813.                             title: 'Erreur de connexion',
  814.                             text: 'Identifiant ou mot de passe incorrect.',
  815.                             confirmButtonColor: '#41a2aa'
  816.                         });
  817.                         loginBtn.disabled = false;
  818.                         loginBtn.innerHTML = originalBtnText;
  819.                     }
  820.                 },
  821.                 error: function() {
  822.                     Swal.fire({
  823.                         icon: 'error',
  824.                         title: 'Erreur de connexion',
  825.                         text: 'Une erreur est survenue. Veuillez réessayer.',
  826.                         confirmButtonColor: '#41a2aa'
  827.                     });
  828.                     loginBtn.disabled = false;
  829.                     loginBtn.innerHTML = originalBtnText;
  830.                 }
  831.             });
  832.         }
  833.         document.addEventListener('DOMContentLoaded', function () {
  834.     // S'assurer que le modal est caché au chargement de la page
  835.     \$('#exampleModal').modal('hide');
  836.     \$('#exampleModal').removeClass('show');
  837.     \$('#exampleModal').attr('aria-hidden', 'true');
  838.     \$('body').removeClass('modal-open');
  839.     \$('.modal-backdrop').remove();
  840.     
  841.     // Login form validation
  842.     const loginForm = document.getElementById('login-form');
  843.     if (loginForm) {
  844.         loginForm.addEventListener('submit', function(e) {
  845.             const email = document.getElementById('inputEmail').value;
  846.             const password = document.getElementById('inputPassword').value;
  847.             
  848.             if (!email || !password) {
  849.                 e.preventDefault();
  850.                 Swal.fire({
  851.                     icon: 'warning',
  852.                     title: 'Champs requis',
  853.                     text: 'Veuillez remplir tous les champs pour vous connecter.',
  854.                     confirmButtonColor: '#41a2aa'
  855.                 });
  856.             }
  857.         });
  858.     }
  859.     
  860.     // Gestion du bouton de retour en haut
  861.     const scrollTopBtn = document.getElementById('scrollTopBtn');
  862.     
  863.     // Afficher/masquer le bouton en fonction du défilement
  864.     window.addEventListener('scroll', function() {
  865.         if (window.pageYOffset > 300) {
  866.             scrollTopBtn.style.display = 'block';
  867.         } else {
  868.             scrollTopBtn.style.display = 'none';
  869.         }
  870.     });
  871.     
  872.     // Action de clic sur le bouton
  873.     scrollTopBtn.addEventListener('click', function() {
  874.         window.scrollTo({
  875.             top: 0,
  876.             behavior: 'smooth'
  877.         });
  878.     });
  879.     
  880.     // Initialisation du carrousel Splide
  881.     var splide = new Splide('#imageSlider', {
  882.         type: 'loop',
  883.         perPage: 1,
  884.         autoplay: true,
  885.         interval: 6000,
  886.         pauseOnHover: false,
  887.         pauseOnFocus: false,
  888.          pagination: false , // Désactive la pagination
  889.          arrows: false  
  890.     });
  891.     splide.mount();
  892.     // Auto-scroll vers les formulaires après 3 secondes
  893.     setTimeout(function() {
  894.         scrollToFormSection();
  895.     }, 5000);
  896.     // Configuration du modal de confirmation - s'assurer qu'il est bien caché
  897.     \$('#exampleModal').modal('dispose'); // Supprimer toute initialisation précédente
  898.     
  899.     // Réinitialiser le modal
  900.     \$('#exampleModal').modal({
  901.         backdrop: 'static',
  902.         keyboard: false,
  903.         show: false // S'assurer que le modal ne s'affiche pas automatiquement
  904.     });
  905.     
  906.     // Centrage du modal uniquement lorsqu'il est affiché
  907.     \$('#exampleModal').on('show.bs.modal', function () {
  908.         \$(this).css('display', 'flex');
  909.         \$(this).css('align-items', 'center');
  910.         \$(this).find('.modal-dialog').css({
  911.             'display': 'flex',
  912.             'align-items': 'center',
  913.             'margin': '0 auto',
  914.             'max-height': '90vh'
  915.         });
  916.     });
  917.     // Fonction pour faire défiler vers la section des formulaires
  918.     function scrollToFormSection() {
  919.         const formSection = document.getElementById('formSection');
  920.         if (formSection) {
  921.             const formPosition = formSection.getBoundingClientRect().top + window.scrollY;
  922.             const headerOffset = 50; // Tenir compte de la hauteur de l'en-tête
  923.             const scrollPosition = formPosition - headerOffset;
  924.             
  925.             // Animation de défilement fluide
  926.             window.scrollTo({
  927.                 top: scrollPosition,
  928.                 behavior: 'smooth'
  929.             });
  930.             
  931.             // Les animations de mise en évidence ont été supprimées
  932.         }
  933.     }
  934. });
  935.         // Fonction pour afficher le popover automatiquement avec animation
  936.       
  937.         function cp() {
  938.          
  939.            // Afficher le loader
  940.            \$('#registerLoader').css('display', 'flex');
  941.            
  942.            // Définir un timeout pour masquer le loader après 3 secondes si la requête prend trop de temps
  943.            var loaderTimeout = setTimeout(function() {
  944.                \$('#registerLoader').css('display', 'none');
  945.                // Afficher directement le modal de confirmation avec le logo 5sur5
  946.                \$(\"#showOkInscription\").trigger('click');
  947.            }, 3000);
  948.           
  949.             var nomparent = \"\";
  950.             var   prenomparent= \"\";
  951.             var mail = \"\";
  952.             var num = \"5555\";
  953.             console.log(num);
  954.             var confirmpassword = \$('#Passworduser2').val();
  955.             var parent_register = \"";
  956.         // line 859
  957.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("parent_register");
  958.         yield "\";
  959.             var Passworduser = \"\";
  960.             \$testDeCreation = false;
  961.             \$testDeCreation2 = false;
  962.             \$testDeCreation3 = false;
  963.             \$testDeCreation4 = false;
  964.             \$testDeCreation5 = false;
  965.             if (\$('#nomparent').val() == \"\") {
  966.                   
  967.                 \$('#nomparent').addClass('is-invalid');
  968.                 \$('#nomparent').removeClass('is-valid');
  969.                 \$('#nomparent').css('border', '1px solid red');
  970.                 \$testDeCreation = false;
  971.             } else {
  972.                 \$('#nomparent').removeClass('is-invalid');
  973.                 \$('#nomparent').addClass('is-valid');
  974.                 
  975.                 \$('#nomparent').css('border', '1px solid green');
  976.                nomparent = \$('#nomparent').val();
  977.                 \$testDeCreation = true;
  978.             }
  979.             if (\$('#prenomparent').val() == \"\") {
  980.               
  981.                 \$('#prenomparent').addClass('is-invalid');
  982.                 \$('#prenomparent').removeClass('is-valid');
  983.                 \$('#prenomparent').css('border', '1px solid red');
  984.                 \$testDeCreation1 = false;
  985.             } else {
  986.                 \$('#prenomparent').removeClass('is-invalid');
  987.                 \$('#prenomparent').addClass('is-valid');
  988.                
  989.                 \$('#prenomparent').css('border', '1px solid green');
  990.                prenomparent = \$('#prenomparent').val();
  991.                 \$testDeCreation1 = true;
  992.             }
  993.             if (\$('#num').val() == \"\") {
  994.                 \$('#num ').addClass('is-invalid');
  995.                 \$('#num').removeClass('is-valid');
  996.                 \$('#num').css('border', '1px solid red');
  997.                 \$testDeCreation2 = false;
  998.             } else {
  999.                 \$('#num').removeClass('is-invalid');
  1000.                 \$('#num').addClass('is-valid');
  1001.                
  1002.                 \$('#num').css('border', '1px solid green');
  1003.                num = \$('#num').val();
  1004.                 \$testDeCreation2 = true;
  1005.             }
  1006.             if (\$('#mail').val() == \"\") {
  1007.                 \$('#mail').addClass('is-invalid');
  1008.                 \$('#mail').removeClass('is-valid');
  1009.                 \$('#mail').css('border', '1px solid red');
  1010.                 \$testDeCreation3 = false;
  1011.             } else {
  1012.                 \$('#mail').removeClass('is-invalid');
  1013.                 \$('#mail').addClass('is-valid');
  1014.                
  1015.                 \$('#mail').css('border', '1px solid green');
  1016.                 mail = \$('#mail').val();
  1017.                 \$testDeCreation3 = true;
  1018.             }
  1019.             if (\$('#Passworduser').val() == \"\") {
  1020.                 \$('#Passworduser').addClass('is-invalid');
  1021.                 \$('#Passworduser').removeClass('is-valid');
  1022.                 \$('#Passworduser').css('border', '1px solid red');
  1023.                 \$testDeCreation4 = false;
  1024.             } else {
  1025.                 \$('#Passworduser').removeClass('is-invalid');
  1026.                 \$('#Passworduser').addClass('is-valid');
  1027.                
  1028.                 \$('#Passworduser').css('border', '1px solid green');
  1029.                 Passworduser = \$('#Passworduser').val();
  1030.                 \$testDeCreation4 = true;
  1031.             }
  1032.             
  1033.             var sms = 0; var mailnotif = 0;
  1034.             if (\$(\"#smsInput\").is(':checked')) {
  1035.                 var sms = 1;
  1036.             }
  1037.             if (\$(\"#mailInput\").is(':checked')){
  1038.                 var mailnotif = 1;
  1039.             }
  1040.            
  1041.             \$_data = {
  1042.                 'nomparent': nomparent,
  1043.                 'prenomparent': prenomparent,
  1044.                 'mailprent': mail,
  1045.                 'numtel': num,
  1046.                 'passwordparent': Passworduser,
  1047.                 'confirmpassword':confirmpassword,
  1048.                 'sms': sms,
  1049.                 'mailnotif': mailnotif
  1050.             }
  1051.              console.log(\$_data);
  1052.             if (\$testDeCreation &&  \$testDeCreation1 && \$testDeCreation2 && \$testDeCreation3 && \$testDeCreation4 ) {
  1053.              
  1054.          
  1055.                 \$.ajax({
  1056.                     type: \"POST\",
  1057.                     url: parent_register,
  1058.                     data: \$_data,
  1059.                     success: function (\$response) {
  1060.                         console.log(\$response);
  1061.                         // Masquer le loader quelle que soit la réponse
  1062.                         \$('#registerLoader').css('display', 'none');
  1063.                         // Annuler le timeout puisque la requête est terminée
  1064.                         clearTimeout(loaderTimeout);
  1065.                         
  1066.                         if (\$response == 'eror') {
  1067.                         
  1068.                             \$('#mail').css('border-color', 'red');
  1069.                             \$('#eroor').css('display', 'block');
  1070.                             // Afficher une alerte SweetAlert pour l'email déjà utilisé avec boutons d'action
  1071.                             Swal.fire({
  1072.                                 icon: 'error',
  1073.                                 title: 'Email déjà utilisé',
  1074.                                 text: 'Cette adresse email est déjà associée à un compte.',
  1075.                                 footer: '<a href=\"";
  1076.         // line 990
  1077.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("forgotPassparent");
  1078.         yield "\" style=\"color:#f09e7a;\">Mot de passe oublié ?</a>',
  1079.                                 showCancelButton: true,
  1080.                                 confirmButtonText: 'Se connecter',
  1081.                                 cancelButtonText: 'Modifier',
  1082.                                 confirmButtonColor: '#41a2aa',
  1083.                                 cancelButtonColor: '#f09e7a',
  1084.                                 position: 'center'
  1085.                             }).then((result) => {
  1086.                                 if (result.isConfirmed) {
  1087.                                     // Basculer vers le formulaire de connexion et pré-remplir l'email
  1088.                                     AffichDivConnexion();
  1089.                                     \$('#inputEmail').val(\$('#mail').val());
  1090.                                     \$('#inputPassword').focus();
  1091.                                 }
  1092.                             });
  1093.                         }
  1094.                         else if(\$response == 'erorpasswordconfirm')
  1095.                         {
  1096.                              
  1097.                               \$('#Passworduser2').css('border-color', 'red');
  1098.                                 Swal.fire({
  1099.                                 icon: 'error',
  1100.                                 title: 'Oups..!',
  1101.                                 text: 'Les mots de passe ne se correspondent pas.',
  1102.                                 footer: '',
  1103.                                 position: 'center'
  1104.                             })
  1105.                         }
  1106.                     
  1107.                          else {
  1108.                               
  1109.                           
  1110.                             \$(\"#showOkInscription\").trigger('click');
  1111.                             
  1112.                             // Réinitialiser tous les champs du formulaire
  1113.                             resetForm();
  1114.                             
  1115.                             // S'assurer que le modal est bien centré
  1116.                             \$('#exampleModal').on('shown.bs.modal', function () {
  1117.                                 \$(this).find('.modal-dialog').css({
  1118.                                     'margin-top': function () {
  1119.                                         return (\$(window).height() - \$(this).height()) / 2;
  1120.                                     }
  1121.                                 });
  1122.                             });
  1123.                               var windowWidth = document.documentElement.clientWidth;
  1124.                                 if (windowWidth <= 560) {
  1125.                                     setTimeout(function(){
  1126.                                        
  1127.                                    location.reload();
  1128.                               },500);
  1129.                               
  1130.                            }
  1131.                               
  1132.                             
  1133.                         }
  1134.                     },
  1135.                     error: function() {
  1136.                         // Masquer le loader en cas d'erreur
  1137.                         \$('#registerLoader').css('display', 'none');
  1138.                         // Annuler le timeout puisque la requête est terminée
  1139.                         clearTimeout(loaderTimeout);
  1140.                         
  1141.                         // Afficher un message d'erreur
  1142.                         Swal.fire({
  1143.                             icon: 'error',
  1144.                             title: 'Erreur de connexion',
  1145.                             text: 'Un problème est survenu lors de l\\'inscription. Veuillez réessayer.',
  1146.                             confirmButtonColor: '#f09e7a',
  1147.                             position: 'center'
  1148.                         });
  1149.                     }
  1150.                 })
  1151.             } else {
  1152.                 // Masquer le loader si la validation échoue
  1153.                 \$('#registerLoader').css('display', 'none');
  1154.                 // Annuler le timeout puisque la validation a échoué
  1155.                 clearTimeout(loaderTimeout);
  1156.             }
  1157.         }
  1158.         function AffichDivConnexion() {
  1159.     \$(\"#inscriptionDiv\").css(\"display\", \"none\");
  1160.     \$(\"#connexionDiv\").css(\"display\", \"block\");
  1161. }
  1162. function AffichDivInscri() {
  1163.     \$(\"#inscriptionDiv\").css(\"display\", \"block\");
  1164.     \$(\"#connexionDiv\").css(\"display\", \"none\");
  1165. }
  1166. // Function to handle responsive behavior based on window width
  1167. function handleResponsiveFormDisplay() {
  1168.     var windowWidth = \$(window).width();
  1169.     
  1170.     if (windowWidth <= 1024) {
  1171.         // Apply mobile-like behavior for tablets/smaller screens
  1172.         // Show only one form at a time with toggle buttons
  1173.         \$(\"#connexionDiv\").css(\"display\", \"none\");
  1174.         \$(\"#inscriptionDiv\").css(\"display\", \"block\");
  1175.         \$(\".circleCree\").css(\"display\", \"block\");
  1176.     } else {
  1177.         // For desktop, show both forms side by side
  1178.         \$(\"#connexionDiv\").css(\"display\", \"block\");
  1179.         \$(\"#inscriptionDiv\").css(\"display\", \"block\");
  1180.         \$(\".circleCree\").css(\"display\", \"none\");
  1181.     }
  1182. }
  1183. // Run on page load
  1184. \$(document).ready(function() {
  1185.     handleResponsiveFormDisplay();
  1186.     
  1187.     // Also run when window is resized
  1188.     \$(window).resize(function() {
  1189.         handleResponsiveFormDisplay();
  1190.     });
  1191.     
  1192.     // Configuration pour le passage automatique au champ suivant
  1193.     setupAutoNextField();
  1194.     
  1195.     // Ajouter la validation en temps réel pour tous les champs
  1196.     setupRealtimeValidation();
  1197. });
  1198. // Fonction pour configurer le passage automatique au champ suivant
  1199. function setupAutoNextField() {
  1200.     // Ordre des champs dans le formulaire d'inscription
  1201.     const formFields = [
  1202.         'nomparent',
  1203.         'prenomparent',
  1204.         'mail',
  1205.         'Passworduser',
  1206.         'Passworduser2',
  1207.         'num'
  1208.     ];
  1209.     
  1210.     // Pour chaque champ, ajouter des événements pour la navigation
  1211.     formFields.forEach((field, index) => {
  1212.         if (index < formFields.length - 1) {
  1213.             const \$currentField = \$('#' + field);
  1214.             let typingTimer; // Timer pour détecter quand l'utilisateur arrête de taper
  1215.             const doneTypingInterval = 1500; // Temps en ms après lequel on considère que l'utilisateur a fini de taper
  1216.             
  1217.             // Événement lorsque l'utilisateur tape
  1218.             \$currentField.on('input', function() {
  1219.                 clearTimeout(typingTimer);
  1220.                 
  1221.                 // Si l'utilisateur appuie sur espace et que le champ est valide
  1222.                 if (event && event.data === ' ' && isFieldValid(field, \$(this).val().trim())) {
  1223.                     event.preventDefault(); // Empêcher l'espace d'être ajouté
  1224.                     \$('#' + formFields[index + 1]).focus();
  1225.                     return;
  1226.                 }
  1227.                 
  1228.                 // Démarrer un nouveau timer
  1229.                 if (\$(this).val()) {
  1230.                     typingTimer = setTimeout(function() {
  1231.                         // Vérifier si le champ est valide
  1232.                         if (isFieldValid(field, \$currentField.val().trim())) {
  1233.                             \$('#' + formFields[index + 1]).focus();
  1234.                         }
  1235.                     }, doneTypingInterval);
  1236.                 }
  1237.             });
  1238.             
  1239.             // Réinitialiser le timer si l'utilisateur continue de taper
  1240.             \$currentField.on('keydown', function(e) {
  1241.                 clearTimeout(typingTimer);
  1242.                 
  1243.                 // Si l'utilisateur appuie sur espace et que le champ est valide
  1244.                 if (e.key === ' ' && isFieldValid(field, \$(this).val().trim())) {
  1245.                     e.preventDefault(); // Empêcher l'espace d'être ajouté
  1246.                     \$('#' + formFields[index + 1]).focus();
  1247.                     return;
  1248.                 }
  1249.                 
  1250.                 // Si l'utilisateur appuie sur Tab ou Entrée
  1251.                 if (e.key === 'Tab' && !e.shiftKey) {
  1252.                     // Laisser le comportement par défaut de Tab
  1253.                     return true;
  1254.                 }
  1255.                 
  1256.                 if (e.key === 'Enter') {
  1257.                     e.preventDefault(); // Empêcher la soumission du formulaire
  1258.                     \$('#' + formFields[index + 1]).focus();
  1259.                 }
  1260.             });
  1261.             
  1262.             // Événement lorsque le champ perd le focus
  1263.             \$currentField.on('blur', function() {
  1264.                 clearTimeout(typingTimer);
  1265.             });
  1266.         }
  1267.     });
  1268.     
  1269.     // Pour le dernier champ, la touche Enter déclenche l'inscription
  1270.     \$('#' + formFields[formFields.length - 1]).on('keydown', function(e) {
  1271.         if (e.key === 'Enter') {
  1272.             e.preventDefault();
  1273.             cp(); // Fonction d'inscription
  1274.         }
  1275.     });
  1276. }
  1277. // Fonction pour vérifier si un champ est valide selon son type
  1278. function isFieldValid(fieldId, value) {
  1279.     switch(fieldId) {
  1280.         case 'mail':
  1281.             const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$/;
  1282.             return emailRegex.test(value);
  1283.         case 'Passworduser':
  1284.             // Minimum 6 caractères pour un mot de passe
  1285.             return value.length >= 6;
  1286.         case 'Passworduser2':
  1287.             // Doit correspondre au mot de passe et avoir au moins 6 caractères
  1288.             return value === \$('#Passworduser').val() && value.length >= 6;
  1289.         case 'num':
  1290.             // Numéro de téléphone: doit contenir uniquement des chiffres et avoir au moins 8 caractères
  1291.             const phoneRegex = /^[0-9]{8,}\$/;
  1292.             return phoneRegex.test(value.replace(/\\s+/g, '')); // Enlever les espaces avant de tester
  1293.         case 'nomparent':
  1294.         case 'prenomparent':
  1295.             // Nom et prénom: au moins 2 caractères, pas de chiffres
  1296.             const nameRegex = /^[A-Za-zÀ-ÖØ-öø-ÿ\\s'-]{2,}\$/;
  1297.             return nameRegex.test(value);
  1298.         default:
  1299.             return value.length >= 2;
  1300.     }
  1301. }
  1302.     </script>
  1303.    
  1304.     <script>
  1305.         function hideshow() {
  1306.             document.getElementById(\"btnn\").disabled = true;
  1307.             \$(\"#btnn\").css(\"background-color\", \"#ecf0f1\");
  1308.             \$(\"#mdpobli\").css(\"display\", \"none\");
  1309.             \$(\"#mdpoblier\").css(\"display\", \"block\");
  1310.         }
  1311.     </script>
  1312.        <script>
  1313.     function closeModale(){
  1314.     \$(\"#monModalInscription\").modal('hide');
  1315.      }
  1316.    // \$(\".masktelph\").inputmask({\"mask\": \"9999999999\"});
  1317.    </script>
  1318.    <script>
  1319.     /**
  1320.      * this code is used to toggle the password
  1321.      */ 
  1322.     \$(\".toggle-password\").click(function() {
  1323.         \$(this).toggleClass(\"bi-eye bi-eye-slash\");
  1324. var input = \$(\$(this).attr(\"toggle\"));
  1325. if (input.attr(\"type\") == \"password\") {
  1326.   input.attr(\"type\", \"text\");
  1327. } else {
  1328.   input.attr(\"type\", \"password\");
  1329. }
  1330. });
  1331. \$(document).ready(function(){
  1332.             \$('[data-toggle=\"tooltip\"]').tooltip({
  1333.                 trigger: 'manual',
  1334.                 html: true,
  1335.                 template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"arrow\"></div><div class=\"tooltip-inner\"></div></div>'
  1336.             });
  1337.             function validateEmail(email) {
  1338.                 const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$/;
  1339.                 return re.test(String(email).toLowerCase());
  1340.             }
  1341.             \$('#mail').on('input', function() {
  1342.                 var emailInput = \$(this);
  1343.                 if (validateEmail(emailInput.val())) {
  1344.                     emailInput.removeClass('is-invalid');
  1345.                     emailInput.addClass('is-valid');
  1346.                     emailInput.tooltip('dispose');
  1347.                     \$('#notification').hide();
  1348.                     \$('#submitBtn').prop('disabled', false);
  1349.                     
  1350.                     // Ne pas passer automatiquement au champ suivant ici,
  1351.                     // car c'est déjà géré par setupAutoNextField()
  1352.                 } else {
  1353.                     emailInput.removeClass('is-valid');
  1354.                     emailInput.addClass('is-invalid');
  1355.                     
  1356.                     // Afficher le tooltip seulement si l'utilisateur a commencé à saisir
  1357.                     if (emailInput.val().length > 3) {
  1358.                         emailInput.attr('data-original-title', 'Votre adresse mail est incorrecte. Exemple: nom@domaine.com').tooltip('show');
  1359.                         if (emailInput.val().length > 0) {
  1360.                             \$('#notification').show();
  1361.                         }
  1362.                     } else {
  1363.                         \$('#notification').hide();
  1364.                     }
  1365.                     \$('#submitBtn').prop('disabled', false);
  1366.                 }
  1367.             });
  1368.         });
  1369. </script>
  1370. <script>
  1371. // Fonction pour configurer la validation en temps réel
  1372. function setupRealtimeValidation() {
  1373.     const formFields = [
  1374.         'nomparent',
  1375.         'prenomparent',
  1376.         'mail',
  1377.         'Passworduser',
  1378.         'Passworduser2',
  1379.         'num'
  1380.     ];
  1381.     
  1382.     formFields.forEach(field => {
  1383.         \$('#' + field).on('input', function() {
  1384.             const value = \$(this).val();
  1385.             
  1386.             // Ne pas afficher d'erreur tant que l'utilisateur n'a pas commencé à saisir
  1387.             if (value.length === 0) {
  1388.                 \$(this).removeClass('is-valid is-invalid');
  1389.                 \$(this).css('border', '1px solid #ced4da'); // Couleur de bordure par défaut
  1390.                 return;
  1391.             }
  1392.             
  1393.             // Vérifier la validité du champ
  1394.             if (isFieldValid(field, value)) {
  1395.                 \$(this).removeClass('is-invalid').addClass('is-valid');
  1396.                 \$(this).css('border', '1px solid #28a745'); // Vert pour valide
  1397.             } else {
  1398.                 \$(this).removeClass('is-valid').addClass('is-invalid');
  1399.                 \$(this).css('border', '1px solid #dc3545'); // Rouge pour invalide
  1400.             }
  1401.         });
  1402.     });
  1403. }
  1404. // Fonction pour réinitialiser le formulaire
  1405. function resetForm() {
  1406.     \$('#nomparent').css('border','1px solid #41a2aa');
  1407.     \$('#nomparent').removeClass('is-valid'); 
  1408.     \$('#nomparent').removeClass('is-invalid'); 
  1409.     \$('#nomparent').val(''); 
  1410.     \$('#prenomparent').css('border','1px solid #41a2aa');
  1411.     \$('#prenomparent').removeClass('is-valid'); 
  1412.     \$('#prenomparent').removeClass('is-invalid'); 
  1413.     \$('#prenomparent').val(''); 
  1414.     \$('#mail').css('border','1px solid #41a2aa');
  1415.     \$('#mail').removeClass('is-valid'); 
  1416.     \$('#mail').removeClass('is-invalid'); 
  1417.     \$('#mail').val(''); 
  1418.     \$('#eroor').css('display','none');
  1419.     \$('#num').css('border','1px solid #41a2aa');
  1420.     \$('#num').removeClass('is-valid'); 
  1421.     \$('#num').removeClass('is-invalid'); 
  1422.     \$('#num').val(''); 
  1423.     \$('#Passworduser').css('border','1px solid #41a2aa');
  1424.     \$('#Passworduser').removeClass('is-valid'); 
  1425.     \$('#Passworduser').removeClass('is-invalid');
  1426.     \$('#Passworduser').val('');  
  1427.     \$('#Passworduser2').css('border','1px solid #41a2aa');
  1428.     \$('#Passworduser2').removeClass('is-valid'); 
  1429.     \$('#Passworduser2').removeClass('is-invalid'); 
  1430.     \$('#Passworduser2').val(''); 
  1431.     \$(\"#smsInput\").prop(\"checked\",false);
  1432.     \$(\"#mailInput\").prop(\"checked\",false);
  1433. }
  1434. </script>
  1435. ";
  1436.         
  1437.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1438.         
  1439.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1440.         yield from [];
  1441.     }
  1442.     /**
  1443.      * @codeCoverageIgnore
  1444.      */
  1445.     public function getTemplateName(): string
  1446.     {
  1447.         return "Parent/LoginParent.html.twig";
  1448.     }
  1449.     /**
  1450.      * @codeCoverageIgnore
  1451.      */
  1452.     public function isTraitable(): bool
  1453.     {
  1454.         return false;
  1455.     }
  1456.     /**
  1457.      * @codeCoverageIgnore
  1458.      */
  1459.     public function getDebugInfo(): array
  1460.     {
  1461.         return array (  1203 => 990,  1069 => 859,  915 => 708,  898 => 694,  885 => 684,  848 => 650,  844 => 649,  839 => 646,  826 => 645,  810 => 638,  800 => 631,  777 => 611,  773 => 610,  763 => 603,  759 => 602,  753 => 599,  741 => 590,  732 => 584,  728 => 582,  712 => 570,  710 => 569,  684 => 546,  680 => 545,  672 => 540,  668 => 539,  631 => 505,  575 => 452,  563 => 443,  549 => 432,  504 => 390,  496 => 385,  471 => 362,  458 => 361,  99 => 11,  95 => 10,  88 => 6,  84 => 5,  78 => 3,  65 => 2,  42 => 1,);
  1462.     }
  1463.     public function getSourceContext(): Source
  1464.     {
  1465.         return new Source("{% extends '/Accueil/layoutAccueilParents.html.twig' %}
  1466. {% block LinksCss %}
  1467.     {{ parent() }}
  1468.     <link rel=\"stylesheet\" href=\"{{'/css/Parent/css/login.css'}}\" >
  1469.     <link rel=\"stylesheet\" href=\"{{'/css/Parent/css/premiercnx.css'}}\">
  1470.     <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css\">
  1471.      <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css\">
  1472.  <link href=\"{{ asset ('css/bootstrap-social.css')}}\" type=\"text/css\" rel=\"stylesheet\" >
  1473.  <link rel=\"stylesheet\" href=\"{{ asset('css/splide.min.css') }}\">
  1474. <style>
  1475.     .titleProdbienvenu {
  1476.     text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  1477. }
  1478. /* Style pour le bouton de retour en haut */
  1479. .scroll-top-btn {
  1480.     position: fixed;
  1481.     bottom: 20px;
  1482.     right: 20px;
  1483.     width: 40px;
  1484.     height: 40px;
  1485.     border-radius: 50%;
  1486.     background-color:#f09e7a;
  1487.     color: white;
  1488.     border: none;
  1489.     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  1490.     z-index: 1000;
  1491.     display: none;
  1492.     cursor: pointer;
  1493.     transition: all 0.3s ease;
  1494. }
  1495. .scroll-top-btn:hover {
  1496.     background-color: #f09e7a;
  1497.     transform: translateY(-3px);
  1498. }
  1499. /* Styles pour le loader d'inscription */
  1500. .register-loader {
  1501.     position: fixed;
  1502.     top: 0;
  1503.     left: 0;
  1504.     width: 100%;
  1505.     height: 100%;
  1506.     background-color: rgba(255, 255, 255, 0.9);
  1507.     z-index: 9999;
  1508.     display: none;
  1509.     justify-content: center;
  1510.     align-items: center;
  1511. }
  1512. .loader-content {
  1513.     text-align: center;
  1514.     background-color: white;
  1515.     padding: 30px;
  1516.     border-radius: 10px;
  1517.     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  1518.     max-width: 350px;
  1519.     width: 90%;
  1520. }
  1521. .loader-message {
  1522.     margin-top: 20px;
  1523.     font-size: 18px;
  1524.     font-weight: bold;
  1525.     color: #41a2aa;
  1526. }
  1527. .loader-submessage {
  1528.     margin-top: 10px;
  1529.     font-size: 14px;
  1530.     color: #666;
  1531. }
  1532. .spinner-border {
  1533.     width: 3rem;
  1534.     height: 3rem;
  1535.     color: #f09e7a !important;
  1536. }
  1537. /* Styles pour le modal de confirmation */
  1538. .modal {
  1539.     display: flex;
  1540.     align-items: center;
  1541.     justify-content: center;
  1542. }
  1543. .modal-dialog {
  1544.     margin: 0 auto;
  1545.     max-width: 500px;
  1546.     width: 90%;
  1547. }
  1548. .modal-content {
  1549.     border-radius: 10px;
  1550.     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  1551.     margin: 0 auto;
  1552. }
  1553. .modal-body {
  1554.     padding: 30px 20px;
  1555. }
  1556. .modal-footer {
  1557.     justify-content: center;
  1558.     padding: 15px;
  1559. }
  1560. .circleModal {
  1561.     background-color: #f09e7a;
  1562.     color: white;
  1563.     border: none;
  1564.     border-radius: 5px;
  1565.     padding: 10px 30px;
  1566.     font-weight: bold;
  1567.     transition: all 0.3s ease;
  1568. }
  1569. .circleModal:hover {
  1570.     background-color: #e8865e;
  1571.     transform: translateY(-2px);
  1572. }
  1573. /* Animation pour le passage au champ suivant */
  1574. .field-complete {
  1575.     transition: all 0.3s ease;
  1576.     border-color: #41a2aa !important;
  1577.     box-shadow: 0 0 5px rgba(65, 162, 170, 0.5) !important;
  1578.     transform: translateY(-2px);
  1579. }
  1580. .form-control:focus {
  1581.     border-color: #f09e7a !important;
  1582.     box-shadow: 0 0 6px rgba(240, 158, 122, 0.5) !important;
  1583.     transition: all 0.3s ease;
  1584. }
  1585. /* Position for password toggle icons */
  1586. .position-relative {
  1587.     position: relative;
  1588.     display: block;
  1589.     width: 100%;
  1590. }
  1591. .field-icon {
  1592.     position: absolute;
  1593.     right: 0px;
  1594.     padding-top: 10px;
  1595.     transform: translateY(-50%);
  1596.     z-index: 10;
  1597.     cursor: pointer;
  1598.     color: #41a2aa;
  1599.     font-size: 14px;
  1600.     pointer-events: auto;
  1601. }
  1602. .field-icon:hover {
  1603.     color: #f09e7a;
  1604. }
  1605. /* Adjust input padding to make room for the icon */
  1606. input[type=\"password\"] {
  1607.     padding-right: 40px;
  1608. }
  1609. /* Updated styles for login forms */
  1610. .form-section {
  1611.     background-color: #fff;
  1612.     padding: 25px;
  1613.     border-radius: 8px;
  1614.     box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  1615.     margin-bottom: 20px;
  1616. }
  1617. .soutitle {
  1618.     color: #333;
  1619.     font-size: 24px;
  1620.     font-weight: bold;
  1621.     margin-bottom: 15px;
  1622.     text-align: center;
  1623. }
  1624. .description2 {
  1625.     color: #666;
  1626.     text-align: center;
  1627.     margin-bottom: 20px;
  1628.     font-size: 14px;
  1629.     line-height: 1.5;
  1630. }
  1631. .form-control {
  1632.     border-radius: 4px;
  1633.     padding: 12px 15px;
  1634.     margin-bottom: 15px;
  1635.     border: 1px solid #ddd;
  1636.     transition: all 0.3s ease;
  1637. }
  1638. .form-control:focus {
  1639.     border-color: #41a2aa !important;
  1640. }
  1641. .logButton {
  1642.     width: 100%;
  1643.     padding: 12px;
  1644.     border-radius: 5px;
  1645.     font-weight: bold;
  1646.     font-size: 16px;
  1647.     margin-top: 10px;
  1648.     transition: all 0.3s ease;
  1649.     border: none;
  1650. }
  1651. .logButton:hover {
  1652.     transform: translateY(-2px);
  1653.     box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  1654. }
  1655. .logButtonSocial {
  1656.     display: flex;
  1657.     align-items: center;
  1658.     justify-content: center;
  1659.     width: 100%;
  1660.     padding: 12px;
  1661.     border-radius: 5px;
  1662.     font-weight: bold;
  1663.     margin-top: 15px;
  1664.     text-decoration: none;
  1665.     transition: all 0.3s ease;
  1666. }
  1667. .logButtonSocial:hover {
  1668.     transform: translateY(-2px);
  1669.     box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  1670.     text-decoration: none;
  1671. }
  1672. .logButtonSocial img {
  1673.     margin-right: 10px;
  1674.     height: 20px;
  1675. }
  1676. .ou-container {
  1677.     position: relative;
  1678.     height: 100%;
  1679.     display: flex;
  1680.     align-items: center;
  1681.     justify-content: center;
  1682. }
  1683. .ou-line {
  1684.     position: absolute;
  1685.     width: 1px;
  1686.     height: 80%;
  1687.     background-color: #ddd;
  1688.     left: 50%;
  1689.     transform: translateX(-50%);
  1690. }
  1691. .ou-text {
  1692.     background-color: white;
  1693.     padding: 10px;
  1694.     position: relative;
  1695.     z-index: 1;
  1696.     color: #666;
  1697.     font-weight: bold;
  1698. }
  1699. /* Hide one form by default at 1024px and below */
  1700. @media screen and (max-width: 1360px) {
  1701.     #connexionDiv, #inscriptionDiv {
  1702.         width: 80% !important;
  1703.         margin: 0 auto !important;
  1704.         float: none !important;
  1705.         margin-left: 10% !important;
  1706.     }
  1707.     
  1708.     /* Initially hide the connection form */
  1709.     #connexionDiv {
  1710.         display: none;
  1711.     }
  1712.     
  1713.     /* Make the inscription form take full width */
  1714.     #inscriptionDiv {
  1715.         display: block;
  1716.     }
  1717.     
  1718.     /* Hide the OR separator at 1024px */
  1719.     .ou-container {
  1720.         display: none;
  1721.     }
  1722.     
  1723.     /* Make the buttons more prominent for form switching */
  1724.     .circleCree {
  1725.         display: block !important;
  1726.         width: 100% !important;
  1727.         margin: 15px auto !important;
  1728.         padding: 10px !important;
  1729.         background-color: #41a2aa !important;
  1730.         color: white !important;
  1731.         border-radius: 5px !important;
  1732.         border: none !important;
  1733.         cursor: pointer !important;
  1734.         text-align: center !important;
  1735.         font-weight: bold !important;
  1736.     }
  1737.     
  1738.     /* Adjust column widths */
  1739.     .col-md-5, .col-sm-5, .col-lg-5 {
  1740.         width: 100% !important;
  1741.         max-width: 100% !important;
  1742.         flex: 0 0 100% !important;
  1743.     }
  1744.     
  1745.     /* Hide the middle column with the separator */
  1746.     .col-md-1.col-sm-1.col-lg-1.col-xs-1 {
  1747.         display: none !important;
  1748.     }
  1749. }
  1750. /* Maintain desktop layout above 1024px */
  1751. @media screen and (min-width: 1360px) {
  1752.     #connexionDiv, #inscriptionDiv {
  1753.         display: block !important;
  1754.     }
  1755.     
  1756.     .circleCree {
  1757.         display: none !important;
  1758.     }
  1759. }
  1760. /* Forgot password link styling */
  1761. .description a {
  1762.     color: #f09e7a;
  1763.     text-decoration: none;
  1764.     font-weight: bold;
  1765. }
  1766. .description a:hover {
  1767.     text-decoration: underline;
  1768. }
  1769. /* Button container styling */
  1770. .button-container {
  1771.     margin-top: 15px;
  1772.     margin-bottom: 15px;
  1773. }
  1774. /* Social login buttons styling */
  1775. .mobilesocial {
  1776.     margin-top: 10px;
  1777. }
  1778. </style>
  1779. {% endblock %}
  1780. {% block Content %}
  1781.   <!-- Bouton pour remonter en haut de la page -->
  1782.   <button id=\"scrollTopBtn\" class=\"scroll-top-btn\" title=\"Retour en haut\">
  1783.     <i class=\"bi bi-arrow-up\"></i>
  1784.   </button>
  1785.   <!-- Loader pour l'inscription -->
  1786.   <div id=\"registerLoader\" class=\"register-loader\">
  1787.     <div class=\"loader-content\">
  1788.       <div class=\"spinner-border text-primary\" role=\"status\">
  1789.         <span class=\"sr-only\">Chargement...</span>
  1790.                 </div>
  1791.       <p class=\"loader-message\">Création de votre compte en cours...</p>
  1792.       <p class=\"loader-submessage\">Nous préparons votre espace parent 5sur5sejour, merci de patienter.</p>
  1793.                         </div>
  1794.                     </div>
  1795.   <!-- Modal de confirmation - avec l'attribut aria-hidden=\"true\" pour s'assurer qu'il est caché par défaut -->
  1796.   <div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style=\"display: none;\">
  1797.       <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  1798.     <div class=\"modal-content\" style=\"border-radius: 10px;\">
  1799.       <div class=\"modal-header border-0\">
  1800.         <button onclick=\"location.reload();\" type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Fermer\" style=\"margin-left: auto;\">
  1801.           <img src=\"{{ asset('images/Groupe_526.svg') }}\" alt=\"Fermer\">
  1802.         </button>
  1803.       </div>
  1804.       <div class=\"modal-body text-center\">
  1805.         <!-- Logo -->
  1806.         <img class=\"imageLogo2\" src=\"{{ asset('Accueil/imagesAccueil/logoHeader.svg') }}\" alt=\"Logo 5sur5séjour\" style=\"max-height: 60px; margin-bottom: 20px;\">
  1807.         <!-- Illustration -->
  1808.         <!-- Titre -->
  1809.         <h4 class=\"modal-title font-weight-bold mb-3\" id=\"modalInscriptionLabel\">🎉 Bienvenue sur 5sur5séjour !</h4>
  1810.         <!-- Texte -->
  1811.         <p style=\"font-size: 16px; line-height: 1.5; margin-bottom: 15px;\">
  1812.   Votre compte parent est presque prêt ! Encore une étape pour accéder à l'espace du séjour de votre enfant.
  1813.         </p>
  1814.         <p style=\"font-size: 15px; line-height: 1.5; margin-bottom: 15px;\">
  1815.   📩 Un e-mail vous a été envoyé pour <strong>activer votre compte parent</strong> en toute sécurité.
  1816.         </p>
  1817.         
  1818.         <!-- Bouton -->
  1819.         <div class=\"mt-4\">
  1820.           <button onclick=\"location.reload();\" class=\"btn btn-primary\" style=\"background-color: #41a2aa; border: none; padding: 12px 30px; font-weight: bold; border-radius: 8px; font-size: 16px;\">
  1821.             ✅ Compris, je vais consulter mes e-mails
  1822.           </button>
  1823.         </div>
  1824.       </div>
  1825.     </div>
  1826.   </div>
  1827.     </div>
  1828.     <div class=\"splide no-padding no-margin\" id=\"imageSlider\" style=\"background:white\">
  1829.         <div class=\"splide__track\">
  1830.             <ul class=\"splide__list\">
  1831.                 <!-- Slide 1 -->
  1832.               
  1833.                 <!-- Slide 2 -->
  1834.                 <li class=\"splide__slide\">
  1835.                     <div class=\"slider-content\">
  1836.                         <div class=\"namePRD\" style=\"display: block;\">
  1837.                             <h4 class=\"titleProdbienvenu titleProdbienvenu1\" style=\"color: #41a2aa\">Offrez des souvenirs inoubliables à votre enfant </h4>
  1838.                             <h4 class=\"titleProdbienvenu titleProdbienvenu2\" style=\"color:#F09E7A\">avec des cadeaux personnalisés en toute simplicité !</h4>
  1839.                           </div>
  1840.                         <img src=\"{{ asset('/images/3.png') }}\" class=\"imgslider\" alt=\"Image 2\" />
  1841.                     </div>
  1842.                 </li>
  1843.                   <li class=\"splide__slide\">
  1844.                     <div class=\"slider-content\">
  1845.                         <div class=\"namePRD\" style=\"display: block;\">
  1846.                             <h4 class=\"titleProdbienvenu titleProdbienvenu1\" style=\"color:#F09E7A\">Restez connecté au séjour de votre enfant 24h/24  </h4>
  1847.                             <h4 class=\"titleProdbienvenu titleProdbienvenu2\" style=\"color:#41a2aa\">grâce à des photos partagées en toute sécurité !</h4>
  1848.                           </div>
  1849.                       
  1850.                         
  1851.                         <img src=\"{{ asset('/images/2.png') }}\" class=\"imgslider\" alt=\"Image 1\" />
  1852.                     </div>
  1853.                 </li>
  1854.                 <li class=\"splide__slide\">
  1855.                     <div class=\"slider-content\">
  1856.                         <div class=\"namePRD\" style=\"display: block;\">
  1857.                             <h4 class=\"titleProdbienvenu titleProdbienvenu1\" style=\"color: #41a2aa\">Accéder à une boite vocale en illimitée</h4>
  1858.                             <h4 class=\"titleProdbienvenu titleProdbienvenu2\" style=\"color:#F09E7A\">Pour écouter les messages laissés par les enfants et les accompagnateurs</h4>
  1859.                           </div>
  1860.                         <img src=\"{{ asset('/images/1.png') }}\" class=\"imgslider\" alt=\"Image 2\" />
  1861.                     </div>
  1862.                 </li>
  1863.             </ul>
  1864.         </div>
  1865.     </div>
  1866.     <div class='row no-margin' style=\"padding-top:4%\">
  1867.         <div class=\"col-lg-1 col-md-1 col-sm-1 col-xs-1 no-padding SeparateurLeftAccom\"></div>
  1868.         <div class=\"col-md-10 col-sm-10 col-lg-10 col-xs-12 \" >
  1869.          
  1870.         <!-- Bouton caché qui déclenche le modal de confirmation -->
  1871.         <button type=\"button\" id=\"showOkInscription\" class=\"d-none\" data-toggle=\"modal\" data-target=\"#exampleModal\">
  1872.         En savoir plus
  1873.         </button>
  1874.         
  1875.           
  1876.             <div class=\"row no-margin\" style='margin-right: auto;margin-top:15px' id=\"formSection\">
  1877.   
  1878.                 
  1879.                
  1880.                 <div class=\"col-md-5 col-sm-5 col-lg-5  Inscription \" id='inscriptionDiv'>
  1881.                    
  1882.                     <form class =\"form-section\" id=\"create\" onsubmit=\"cp(); return false;\">
  1883.                         <div class=\"soutitle\"> Créer un compte   </div>
  1884.                     <div class =\"description2\"  style=\"padding-top:0px> Vous vous connectez pour la 1ère fois et n'avez pas
  1885.                         <br> de compte Parent(s) « 5 sur 5 séjour » </div>
  1886.                         <button type=\"button\"  align =\"center\" class=\"circleCree\"  onclick=\"AffichDivConnexion();\">Vous avez déjà un compte Parent(s) ? </button>
  1887.                         <div class=\"form-group\">
  1888.                             <input type=\"text\" class=\"form-control\" id=\"nomparent\"  placeholder=\"NOM * \" >
  1889.                             <input type=\"text\" class=\"form-control\" id=\"prenomparent\"  placeholder=\"PRENOM *\">
  1890.                             <input type=\"text\" autocomplete=\"off\" class=\"form-control\" id=\"mail\" placeholder=\"ADRESSE MAIL\" required data-toggle=\"tooltip\" data-placement=\"right\" title=\"\">
  1891.                             <div class=\"position-relative\">
  1892.                             <input type=\"password\" autocomplete=\"off\" name=\"password\" id=\"Passworduser\" value=\"\"  class=\"form-control\"  placeholder=\"MOT DE PASSE  * \">
  1893.                                 <i class=\"bi bi-eye field-icon toggle-password\" toggle=\"#Passworduser\"></i>
  1894.                             </div>
  1895.                             <div class=\"position-relative\">
  1896.                             <input type=\"password\" autocomplete=\"off\" name=\"password\" id=\"Passworduser2\"  class=\"form-control\"  placeholder=\"CONFIRMER VOTRE MOT DE PASSE\">
  1897.                                 <i class=\"bi bi-eye field-icon toggle-password\" toggle=\"#Passworduser2\"></i>
  1898.                             </div>
  1899.                             
  1900.                             <p style=\"display: none; color:red; font-weight: bold; margin-top: 10px;\" id=\"eroor\">Cet email est déjà utilisé. <a href=\"{{ path(\"forgotPassparent\") }}\" style=\"color:#f09e7a; text-decoration: underline;\">Mot de passe oublié ?</a></p>
  1901.                             <input type=\"text\" class=\"form-control\" id=\"num\"  name=\"numero de téléphone\" placeholder=\"NUMERO DE TELEPHONE PORTABLE * \">
  1902.                                
  1903.   
  1904.                                         <div class=\"row no-margin \">
  1905.                 <div class=\"souTITRE\">Souhaitez-vous être averti lorsque l'organisateur dépose des images ou des messages du séjour ?</div>
  1906.             </div>
  1907.             <br>
  1908.             <div class=\"row no-margin\">
  1909.                 <div class=\"box-1\" id=\"smsToggle\">
  1910.                     <input type='checkbox' name =\"sms\" id =\"smsInput\"  />
  1911.                     <span class=\"toogle\"> </span>
  1912.                 </div>
  1913.                 <span class=\"sms\"> Par SMS </span>
  1914.                 <div class=\"box-1\">
  1915.                     <input type='checkbox' name =\"mail\" id =\"mailInput\"   />
  1916.                     <span class=\"toogle\" > </span>
  1917.                 </div>
  1918.                 <span class=\"mail\"> Par Mail </span>
  1919.             </div>
  1920.             
  1921.                         </div>
  1922.                         <div class=\"notification\" id=\"notification\" style=\"display: none;\">L'adresse e-mail est incorrecte.</div>
  1923.                         <div class=\"button-container\">
  1924.                         <button  type=\"button\" onclick=\"cp();\" class=\"logButton\" style=\"color:#fff;border: 1px solid #f09e7a;    position: relative;
  1925.         background-color: #f09e7a;margin-top:-5%;\" id=\"submitBtn\">     
  1926.             S'inscrire
  1927.           </button></div>
  1928.           
  1929.           <div class=\"button-container mobilesocial\">
  1930.             <a href=\"{{ path('connect_google_start') }}\"  style=\"color:#fff;background-color:#4F86EC;\" class=\"logButtonSocial\" onclick=\"_gaq.push(['_trackEvent', 'btn-social', 'click', 'btn-google']);\">
  1931.          <img src=\"{{ asset('/images/icons-google.png') }}\"  >Continuer avec Google
  1932.        </a>
  1933.                        
  1934.      </div>
  1935.      <div class=\"mobilesocial\" >                  
  1936.                     <a href=\"{{ path('connect_facebook_start') }}\"  class=\"logButtonSocial\" style=\"color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)\" >
  1937.                      <img src=\"{{ asset('/images/icons-facebook.png') }}\"  >         Continuer avec Facebook
  1938.        </a>
  1939.            </div>        
  1940.         </form>
  1941.                 </div></div>
  1942.                 <div class=\"col-md-1 col-sm-1 col-lg-1 col-xs-1  \" ><div class=\"ou-container\" style=\"margin-left: 20%;\">
  1943.                     <div class=\"ou-line\"></div>
  1944.                     <div class=\"ou-text\">OU</div>
  1945.                   </div> </div>
  1946.                 <div class=\"col-md-5 col-sm-5 col-lg-5 col-xs-5 connexion \" id='connexionDiv' >
  1947.                  
  1948.                
  1949.                     <div class=\"form-section\">
  1950.                         <div class=\"soutitle\">  Se connecter </div>
  1951.                         <div class =\"description2\" style=\"padding-top:0px\">Vous avez déja un compte Parent(s) « 5 sur 5 séjour »  </div>
  1952.                         <button type=\"button\"  align =\"center\" class=\"circleCree\"  onclick=\"AffichDivInscri();\">Créer un compte ? </button>
  1953.                         <form method=\"post\" class=\"\" id=\"login-form\" onsubmit=\"handleLogin(event)\">
  1954.                             {% if error %}
  1955.                                 <div class=\"alert alert-danger d-none\">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  1956.                                 <script>
  1957.                                     document.addEventListener('DOMContentLoaded', function() {
  1958.                                         Swal.fire({
  1959.                                             icon: 'error',
  1960.                                             title: 'Erreur de connexion',
  1961.                                             text: 'Identifiant ou mot de passe incorrect.',
  1962.                                             confirmButtonColor: '#41a2aa'
  1963.                                         });
  1964.                                     });
  1965.                                 </script>
  1966.                             {% endif %}
  1967.                             <div class=\"form-group\">
  1968.                                 <input type=\"text\"  name=\"email\" id=\"inputEmail\"  value=\"{{ last_username }}\"  class=\"form-control\" placeholder=\"Mon identifiant  * \" >
  1969.                             <input type=\"password\" name=\"password\" id=\"inputPassword\" class=\"form-control\" placeholder=\"Mon mot de passe *\">
  1970.                             <span toggle=\"#inputPassword\" class=\"bi bi-eye field-icon toggle-password\" style=\"right: 40px;\"></span>
  1971.             
  1972.                                 
  1973.                                 <input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('authenticate') }}\">
  1974.                                 <div class=\"button-container\">
  1975.                                     <button type=\"button\" onclick=\"handleLogin(event)\" class=\"logButton\" style=\"color:#fff;background-color:#41a2aa;border-color:rgba(0,0,0,0.2)\" id=\"login-button\">
  1976.              Se connecter 
  1977.           </button>
  1978.         
  1979.                             </div>
  1980.                               
  1981.                             <div class =\"description\" > <a id=\"mdpobli\" href=\"{{ path(\"forgotPassparent\") }}\" style=\"color:#f09e7a ; display: block\">Vous avez oublié votre mot de passe ?  </a> </div>
  1982.                             <div class=\"button-container\">
  1983.                <a href=\"{{ path('connect_google_start') }}\"  style=\"color:#fff;background-color:#4F86EC;\" class=\"logButtonSocial\" onclick=\"_gaq.push(['_trackEvent', 'btn-social', 'click', 'btn-google']);\">
  1984.             <img src=\"{{ asset('/images/icons-google.png') }}\"  >Continuer avec Google
  1985.           </a>
  1986.                           
  1987.         </div>
  1988.         <div class=\"button-c\" style=\"display: flex;
  1989.         justify-content: center;
  1990.         align-items: center;\">                  
  1991.                        <a href=\"{{ path('connect_facebook_start') }}\"  class=\"logButtonSocial\" style=\"color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)\" >
  1992.                         <img src=\"{{ asset('/images/icons-facebook.png') }}\"  >         Continuer avec Facebook
  1993.           </a>
  1994.               </div>        
  1995.         
  1996.                             
  1997.                                 <br>
  1998.                                 <br>
  1999.                                 
  2000.                             </div>
  2001.                         </form>
  2002.                     
  2003.                     </div>
  2004.                 </div>
  2005.                    
  2006.         </div>
  2007.       
  2008.     </div>
  2009.   <div class=\"col-md-3\" style=\"margin-top: 21%;display:none\">
  2010.    <a href=\"{{ path('connect_google_start') }}\"  style=\"color:#fff;background-color:#4F86EC;border-color:rgba(0,0,0,0.2)\" class=\"btn btn-block btn-social btn-google\" onclick=\"_gaq.push(['_trackEvent', 'btn-social', 'click', 'btn-google']);\">
  2011.             <span class=\"fa fa-google\"></span> S'inscrire avec Google
  2012.           </a>
  2013.           
  2014.                           
  2015.                                 <br>
  2016.                                    <br>
  2017.                        <a href=\"{{ path('connect_facebook_start') }}\"  class=\"btn btn-block btn-social btn-facebook\" style=\"color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)\" >
  2018.             <span class=\"fa fa-facebook\"></span>  S'inscrire avec Facebook
  2019.           </a></div>
  2020.             </div>
  2021. {% endblock %}
  2022. {% block javascript %}
  2023.    
  2024.    
  2025.     {{ parent() }}
  2026.   <script src=\"{{ asset('js/splide.min.js') }}\"></script>
  2027.   <script src=\"https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.all.min.js\"></script>
  2028.     
  2029.     <script>
  2030.         /**
  2031.          * Handle login form submission
  2032.          */
  2033.         function handleLogin(event) {
  2034.             event.preventDefault();
  2035.             
  2036.             const email = document.getElementById('inputEmail').value;
  2037.             const password = document.getElementById('inputPassword').value;
  2038.             const csrfToken = document.querySelector('input[name=\"_csrf_token\"]').value;
  2039.             
  2040.             // Validate fields
  2041.             if (!email || !password) {
  2042.                 Swal.fire({
  2043.                     icon: 'warning',
  2044.                     title: 'Champs requis',
  2045.                     text: 'Veuillez remplir tous les champs pour vous connecter.',
  2046.                     confirmButtonColor: '#41a2aa'
  2047.                 });
  2048.                 return;
  2049.             }
  2050.             
  2051.             // Show loading indicator
  2052.             const loginBtn = document.getElementById('login-button');
  2053.             const originalBtnText = loginBtn.innerHTML;
  2054.             loginBtn.disabled = true;
  2055.             loginBtn.innerHTML = '<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span> Connexion...';
  2056.             
  2057.             // Send AJAX request
  2058.             \$.ajax({
  2059.                 type: \"POST\",
  2060.                 url: \"{{ path('app_back_Parent') }}\",
  2061.                 data: {
  2062.                     email: email,
  2063.                     password: password,
  2064.                     _csrf_token: csrfToken
  2065.                 },
  2066.                 success: function(response) {
  2067.                     // Si la réponse est un objet JSON
  2068.                     if (typeof response === 'object') {
  2069.                         if (response.success) {
  2070.                             window.location.href = \"{{ path('CodeSejour') }}\";
  2071.                         } else {
  2072.                             Swal.fire({
  2073.                                 icon: 'error',
  2074.                                 title: 'Erreur de connexion',
  2075.                                 text: 'Identifiant ou mot de passe incorrect.',
  2076.                                 confirmButtonColor: '#41a2aa'
  2077.                             });
  2078.                             loginBtn.disabled = false;
  2079.                             loginBtn.innerHTML = originalBtnText;
  2080.                         }
  2081.                     } 
  2082.                     // Si la réponse contient du HTML (redirection)
  2083.                     else if (response.includes('CodeSejour')) {
  2084.                         window.location.href = \"{{ path('CodeSejour') }}\";
  2085.                     } else {
  2086.                         Swal.fire({
  2087.                             icon: 'error',
  2088.                             title: 'Erreur de connexion',
  2089.                             text: 'Identifiant ou mot de passe incorrect.',
  2090.                             confirmButtonColor: '#41a2aa'
  2091.                         });
  2092.                         loginBtn.disabled = false;
  2093.                         loginBtn.innerHTML = originalBtnText;
  2094.                     }
  2095.                 },
  2096.                 error: function() {
  2097.                     Swal.fire({
  2098.                         icon: 'error',
  2099.                         title: 'Erreur de connexion',
  2100.                         text: 'Une erreur est survenue. Veuillez réessayer.',
  2101.                         confirmButtonColor: '#41a2aa'
  2102.                     });
  2103.                     loginBtn.disabled = false;
  2104.                     loginBtn.innerHTML = originalBtnText;
  2105.                 }
  2106.             });
  2107.         }
  2108.         document.addEventListener('DOMContentLoaded', function () {
  2109.     // S'assurer que le modal est caché au chargement de la page
  2110.     \$('#exampleModal').modal('hide');
  2111.     \$('#exampleModal').removeClass('show');
  2112.     \$('#exampleModal').attr('aria-hidden', 'true');
  2113.     \$('body').removeClass('modal-open');
  2114.     \$('.modal-backdrop').remove();
  2115.     
  2116.     // Login form validation
  2117.     const loginForm = document.getElementById('login-form');
  2118.     if (loginForm) {
  2119.         loginForm.addEventListener('submit', function(e) {
  2120.             const email = document.getElementById('inputEmail').value;
  2121.             const password = document.getElementById('inputPassword').value;
  2122.             
  2123.             if (!email || !password) {
  2124.                 e.preventDefault();
  2125.                 Swal.fire({
  2126.                     icon: 'warning',
  2127.                     title: 'Champs requis',
  2128.                     text: 'Veuillez remplir tous les champs pour vous connecter.',
  2129.                     confirmButtonColor: '#41a2aa'
  2130.                 });
  2131.             }
  2132.         });
  2133.     }
  2134.     
  2135.     // Gestion du bouton de retour en haut
  2136.     const scrollTopBtn = document.getElementById('scrollTopBtn');
  2137.     
  2138.     // Afficher/masquer le bouton en fonction du défilement
  2139.     window.addEventListener('scroll', function() {
  2140.         if (window.pageYOffset > 300) {
  2141.             scrollTopBtn.style.display = 'block';
  2142.         } else {
  2143.             scrollTopBtn.style.display = 'none';
  2144.         }
  2145.     });
  2146.     
  2147.     // Action de clic sur le bouton
  2148.     scrollTopBtn.addEventListener('click', function() {
  2149.         window.scrollTo({
  2150.             top: 0,
  2151.             behavior: 'smooth'
  2152.         });
  2153.     });
  2154.     
  2155.     // Initialisation du carrousel Splide
  2156.     var splide = new Splide('#imageSlider', {
  2157.         type: 'loop',
  2158.         perPage: 1,
  2159.         autoplay: true,
  2160.         interval: 6000,
  2161.         pauseOnHover: false,
  2162.         pauseOnFocus: false,
  2163.          pagination: false , // Désactive la pagination
  2164.          arrows: false  
  2165.     });
  2166.     splide.mount();
  2167.     // Auto-scroll vers les formulaires après 3 secondes
  2168.     setTimeout(function() {
  2169.         scrollToFormSection();
  2170.     }, 5000);
  2171.     // Configuration du modal de confirmation - s'assurer qu'il est bien caché
  2172.     \$('#exampleModal').modal('dispose'); // Supprimer toute initialisation précédente
  2173.     
  2174.     // Réinitialiser le modal
  2175.     \$('#exampleModal').modal({
  2176.         backdrop: 'static',
  2177.         keyboard: false,
  2178.         show: false // S'assurer que le modal ne s'affiche pas automatiquement
  2179.     });
  2180.     
  2181.     // Centrage du modal uniquement lorsqu'il est affiché
  2182.     \$('#exampleModal').on('show.bs.modal', function () {
  2183.         \$(this).css('display', 'flex');
  2184.         \$(this).css('align-items', 'center');
  2185.         \$(this).find('.modal-dialog').css({
  2186.             'display': 'flex',
  2187.             'align-items': 'center',
  2188.             'margin': '0 auto',
  2189.             'max-height': '90vh'
  2190.         });
  2191.     });
  2192.     // Fonction pour faire défiler vers la section des formulaires
  2193.     function scrollToFormSection() {
  2194.         const formSection = document.getElementById('formSection');
  2195.         if (formSection) {
  2196.             const formPosition = formSection.getBoundingClientRect().top + window.scrollY;
  2197.             const headerOffset = 50; // Tenir compte de la hauteur de l'en-tête
  2198.             const scrollPosition = formPosition - headerOffset;
  2199.             
  2200.             // Animation de défilement fluide
  2201.             window.scrollTo({
  2202.                 top: scrollPosition,
  2203.                 behavior: 'smooth'
  2204.             });
  2205.             
  2206.             // Les animations de mise en évidence ont été supprimées
  2207.         }
  2208.     }
  2209. });
  2210.         // Fonction pour afficher le popover automatiquement avec animation
  2211.       
  2212.         function cp() {
  2213.          
  2214.            // Afficher le loader
  2215.            \$('#registerLoader').css('display', 'flex');
  2216.            
  2217.            // Définir un timeout pour masquer le loader après 3 secondes si la requête prend trop de temps
  2218.            var loaderTimeout = setTimeout(function() {
  2219.                \$('#registerLoader').css('display', 'none');
  2220.                // Afficher directement le modal de confirmation avec le logo 5sur5
  2221.                \$(\"#showOkInscription\").trigger('click');
  2222.            }, 3000);
  2223.           
  2224.             var nomparent = \"\";
  2225.             var   prenomparent= \"\";
  2226.             var mail = \"\";
  2227.             var num = \"5555\";
  2228.             console.log(num);
  2229.             var confirmpassword = \$('#Passworduser2').val();
  2230.             var parent_register = \"{{ path('parent_register') }}\";
  2231.             var Passworduser = \"\";
  2232.             \$testDeCreation = false;
  2233.             \$testDeCreation2 = false;
  2234.             \$testDeCreation3 = false;
  2235.             \$testDeCreation4 = false;
  2236.             \$testDeCreation5 = false;
  2237.             if (\$('#nomparent').val() == \"\") {
  2238.                   
  2239.                 \$('#nomparent').addClass('is-invalid');
  2240.                 \$('#nomparent').removeClass('is-valid');
  2241.                 \$('#nomparent').css('border', '1px solid red');
  2242.                 \$testDeCreation = false;
  2243.             } else {
  2244.                 \$('#nomparent').removeClass('is-invalid');
  2245.                 \$('#nomparent').addClass('is-valid');
  2246.                 
  2247.                 \$('#nomparent').css('border', '1px solid green');
  2248.                nomparent = \$('#nomparent').val();
  2249.                 \$testDeCreation = true;
  2250.             }
  2251.             if (\$('#prenomparent').val() == \"\") {
  2252.               
  2253.                 \$('#prenomparent').addClass('is-invalid');
  2254.                 \$('#prenomparent').removeClass('is-valid');
  2255.                 \$('#prenomparent').css('border', '1px solid red');
  2256.                 \$testDeCreation1 = false;
  2257.             } else {
  2258.                 \$('#prenomparent').removeClass('is-invalid');
  2259.                 \$('#prenomparent').addClass('is-valid');
  2260.                
  2261.                 \$('#prenomparent').css('border', '1px solid green');
  2262.                prenomparent = \$('#prenomparent').val();
  2263.                 \$testDeCreation1 = true;
  2264.             }
  2265.             if (\$('#num').val() == \"\") {
  2266.                 \$('#num ').addClass('is-invalid');
  2267.                 \$('#num').removeClass('is-valid');
  2268.                 \$('#num').css('border', '1px solid red');
  2269.                 \$testDeCreation2 = false;
  2270.             } else {
  2271.                 \$('#num').removeClass('is-invalid');
  2272.                 \$('#num').addClass('is-valid');
  2273.                
  2274.                 \$('#num').css('border', '1px solid green');
  2275.                num = \$('#num').val();
  2276.                 \$testDeCreation2 = true;
  2277.             }
  2278.             if (\$('#mail').val() == \"\") {
  2279.                 \$('#mail').addClass('is-invalid');
  2280.                 \$('#mail').removeClass('is-valid');
  2281.                 \$('#mail').css('border', '1px solid red');
  2282.                 \$testDeCreation3 = false;
  2283.             } else {
  2284.                 \$('#mail').removeClass('is-invalid');
  2285.                 \$('#mail').addClass('is-valid');
  2286.                
  2287.                 \$('#mail').css('border', '1px solid green');
  2288.                 mail = \$('#mail').val();
  2289.                 \$testDeCreation3 = true;
  2290.             }
  2291.             if (\$('#Passworduser').val() == \"\") {
  2292.                 \$('#Passworduser').addClass('is-invalid');
  2293.                 \$('#Passworduser').removeClass('is-valid');
  2294.                 \$('#Passworduser').css('border', '1px solid red');
  2295.                 \$testDeCreation4 = false;
  2296.             } else {
  2297.                 \$('#Passworduser').removeClass('is-invalid');
  2298.                 \$('#Passworduser').addClass('is-valid');
  2299.                
  2300.                 \$('#Passworduser').css('border', '1px solid green');
  2301.                 Passworduser = \$('#Passworduser').val();
  2302.                 \$testDeCreation4 = true;
  2303.             }
  2304.             
  2305.             var sms = 0; var mailnotif = 0;
  2306.             if (\$(\"#smsInput\").is(':checked')) {
  2307.                 var sms = 1;
  2308.             }
  2309.             if (\$(\"#mailInput\").is(':checked')){
  2310.                 var mailnotif = 1;
  2311.             }
  2312.            
  2313.             \$_data = {
  2314.                 'nomparent': nomparent,
  2315.                 'prenomparent': prenomparent,
  2316.                 'mailprent': mail,
  2317.                 'numtel': num,
  2318.                 'passwordparent': Passworduser,
  2319.                 'confirmpassword':confirmpassword,
  2320.                 'sms': sms,
  2321.                 'mailnotif': mailnotif
  2322.             }
  2323.              console.log(\$_data);
  2324.             if (\$testDeCreation &&  \$testDeCreation1 && \$testDeCreation2 && \$testDeCreation3 && \$testDeCreation4 ) {
  2325.              
  2326.          
  2327.                 \$.ajax({
  2328.                     type: \"POST\",
  2329.                     url: parent_register,
  2330.                     data: \$_data,
  2331.                     success: function (\$response) {
  2332.                         console.log(\$response);
  2333.                         // Masquer le loader quelle que soit la réponse
  2334.                         \$('#registerLoader').css('display', 'none');
  2335.                         // Annuler le timeout puisque la requête est terminée
  2336.                         clearTimeout(loaderTimeout);
  2337.                         
  2338.                         if (\$response == 'eror') {
  2339.                         
  2340.                             \$('#mail').css('border-color', 'red');
  2341.                             \$('#eroor').css('display', 'block');
  2342.                             // Afficher une alerte SweetAlert pour l'email déjà utilisé avec boutons d'action
  2343.                             Swal.fire({
  2344.                                 icon: 'error',
  2345.                                 title: 'Email déjà utilisé',
  2346.                                 text: 'Cette adresse email est déjà associée à un compte.',
  2347.                                 footer: '<a href=\"{{ path(\"forgotPassparent\") }}\" style=\"color:#f09e7a;\">Mot de passe oublié ?</a>',
  2348.                                 showCancelButton: true,
  2349.                                 confirmButtonText: 'Se connecter',
  2350.                                 cancelButtonText: 'Modifier',
  2351.                                 confirmButtonColor: '#41a2aa',
  2352.                                 cancelButtonColor: '#f09e7a',
  2353.                                 position: 'center'
  2354.                             }).then((result) => {
  2355.                                 if (result.isConfirmed) {
  2356.                                     // Basculer vers le formulaire de connexion et pré-remplir l'email
  2357.                                     AffichDivConnexion();
  2358.                                     \$('#inputEmail').val(\$('#mail').val());
  2359.                                     \$('#inputPassword').focus();
  2360.                                 }
  2361.                             });
  2362.                         }
  2363.                         else if(\$response == 'erorpasswordconfirm')
  2364.                         {
  2365.                              
  2366.                               \$('#Passworduser2').css('border-color', 'red');
  2367.                                 Swal.fire({
  2368.                                 icon: 'error',
  2369.                                 title: 'Oups..!',
  2370.                                 text: 'Les mots de passe ne se correspondent pas.',
  2371.                                 footer: '',
  2372.                                 position: 'center'
  2373.                             })
  2374.                         }
  2375.                     
  2376.                          else {
  2377.                               
  2378.                           
  2379.                             \$(\"#showOkInscription\").trigger('click');
  2380.                             
  2381.                             // Réinitialiser tous les champs du formulaire
  2382.                             resetForm();
  2383.                             
  2384.                             // S'assurer que le modal est bien centré
  2385.                             \$('#exampleModal').on('shown.bs.modal', function () {
  2386.                                 \$(this).find('.modal-dialog').css({
  2387.                                     'margin-top': function () {
  2388.                                         return (\$(window).height() - \$(this).height()) / 2;
  2389.                                     }
  2390.                                 });
  2391.                             });
  2392.                               var windowWidth = document.documentElement.clientWidth;
  2393.                                 if (windowWidth <= 560) {
  2394.                                     setTimeout(function(){
  2395.                                        
  2396.                                    location.reload();
  2397.                               },500);
  2398.                               
  2399.                            }
  2400.                               
  2401.                             
  2402.                         }
  2403.                     },
  2404.                     error: function() {
  2405.                         // Masquer le loader en cas d'erreur
  2406.                         \$('#registerLoader').css('display', 'none');
  2407.                         // Annuler le timeout puisque la requête est terminée
  2408.                         clearTimeout(loaderTimeout);
  2409.                         
  2410.                         // Afficher un message d'erreur
  2411.                         Swal.fire({
  2412.                             icon: 'error',
  2413.                             title: 'Erreur de connexion',
  2414.                             text: 'Un problème est survenu lors de l\\'inscription. Veuillez réessayer.',
  2415.                             confirmButtonColor: '#f09e7a',
  2416.                             position: 'center'
  2417.                         });
  2418.                     }
  2419.                 })
  2420.             } else {
  2421.                 // Masquer le loader si la validation échoue
  2422.                 \$('#registerLoader').css('display', 'none');
  2423.                 // Annuler le timeout puisque la validation a échoué
  2424.                 clearTimeout(loaderTimeout);
  2425.             }
  2426.         }
  2427.         function AffichDivConnexion() {
  2428.     \$(\"#inscriptionDiv\").css(\"display\", \"none\");
  2429.     \$(\"#connexionDiv\").css(\"display\", \"block\");
  2430. }
  2431. function AffichDivInscri() {
  2432.     \$(\"#inscriptionDiv\").css(\"display\", \"block\");
  2433.     \$(\"#connexionDiv\").css(\"display\", \"none\");
  2434. }
  2435. // Function to handle responsive behavior based on window width
  2436. function handleResponsiveFormDisplay() {
  2437.     var windowWidth = \$(window).width();
  2438.     
  2439.     if (windowWidth <= 1024) {
  2440.         // Apply mobile-like behavior for tablets/smaller screens
  2441.         // Show only one form at a time with toggle buttons
  2442.         \$(\"#connexionDiv\").css(\"display\", \"none\");
  2443.         \$(\"#inscriptionDiv\").css(\"display\", \"block\");
  2444.         \$(\".circleCree\").css(\"display\", \"block\");
  2445.     } else {
  2446.         // For desktop, show both forms side by side
  2447.         \$(\"#connexionDiv\").css(\"display\", \"block\");
  2448.         \$(\"#inscriptionDiv\").css(\"display\", \"block\");
  2449.         \$(\".circleCree\").css(\"display\", \"none\");
  2450.     }
  2451. }
  2452. // Run on page load
  2453. \$(document).ready(function() {
  2454.     handleResponsiveFormDisplay();
  2455.     
  2456.     // Also run when window is resized
  2457.     \$(window).resize(function() {
  2458.         handleResponsiveFormDisplay();
  2459.     });
  2460.     
  2461.     // Configuration pour le passage automatique au champ suivant
  2462.     setupAutoNextField();
  2463.     
  2464.     // Ajouter la validation en temps réel pour tous les champs
  2465.     setupRealtimeValidation();
  2466. });
  2467. // Fonction pour configurer le passage automatique au champ suivant
  2468. function setupAutoNextField() {
  2469.     // Ordre des champs dans le formulaire d'inscription
  2470.     const formFields = [
  2471.         'nomparent',
  2472.         'prenomparent',
  2473.         'mail',
  2474.         'Passworduser',
  2475.         'Passworduser2',
  2476.         'num'
  2477.     ];
  2478.     
  2479.     // Pour chaque champ, ajouter des événements pour la navigation
  2480.     formFields.forEach((field, index) => {
  2481.         if (index < formFields.length - 1) {
  2482.             const \$currentField = \$('#' + field);
  2483.             let typingTimer; // Timer pour détecter quand l'utilisateur arrête de taper
  2484.             const doneTypingInterval = 1500; // Temps en ms après lequel on considère que l'utilisateur a fini de taper
  2485.             
  2486.             // Événement lorsque l'utilisateur tape
  2487.             \$currentField.on('input', function() {
  2488.                 clearTimeout(typingTimer);
  2489.                 
  2490.                 // Si l'utilisateur appuie sur espace et que le champ est valide
  2491.                 if (event && event.data === ' ' && isFieldValid(field, \$(this).val().trim())) {
  2492.                     event.preventDefault(); // Empêcher l'espace d'être ajouté
  2493.                     \$('#' + formFields[index + 1]).focus();
  2494.                     return;
  2495.                 }
  2496.                 
  2497.                 // Démarrer un nouveau timer
  2498.                 if (\$(this).val()) {
  2499.                     typingTimer = setTimeout(function() {
  2500.                         // Vérifier si le champ est valide
  2501.                         if (isFieldValid(field, \$currentField.val().trim())) {
  2502.                             \$('#' + formFields[index + 1]).focus();
  2503.                         }
  2504.                     }, doneTypingInterval);
  2505.                 }
  2506.             });
  2507.             
  2508.             // Réinitialiser le timer si l'utilisateur continue de taper
  2509.             \$currentField.on('keydown', function(e) {
  2510.                 clearTimeout(typingTimer);
  2511.                 
  2512.                 // Si l'utilisateur appuie sur espace et que le champ est valide
  2513.                 if (e.key === ' ' && isFieldValid(field, \$(this).val().trim())) {
  2514.                     e.preventDefault(); // Empêcher l'espace d'être ajouté
  2515.                     \$('#' + formFields[index + 1]).focus();
  2516.                     return;
  2517.                 }
  2518.                 
  2519.                 // Si l'utilisateur appuie sur Tab ou Entrée
  2520.                 if (e.key === 'Tab' && !e.shiftKey) {
  2521.                     // Laisser le comportement par défaut de Tab
  2522.                     return true;
  2523.                 }
  2524.                 
  2525.                 if (e.key === 'Enter') {
  2526.                     e.preventDefault(); // Empêcher la soumission du formulaire
  2527.                     \$('#' + formFields[index + 1]).focus();
  2528.                 }
  2529.             });
  2530.             
  2531.             // Événement lorsque le champ perd le focus
  2532.             \$currentField.on('blur', function() {
  2533.                 clearTimeout(typingTimer);
  2534.             });
  2535.         }
  2536.     });
  2537.     
  2538.     // Pour le dernier champ, la touche Enter déclenche l'inscription
  2539.     \$('#' + formFields[formFields.length - 1]).on('keydown', function(e) {
  2540.         if (e.key === 'Enter') {
  2541.             e.preventDefault();
  2542.             cp(); // Fonction d'inscription
  2543.         }
  2544.     });
  2545. }
  2546. // Fonction pour vérifier si un champ est valide selon son type
  2547. function isFieldValid(fieldId, value) {
  2548.     switch(fieldId) {
  2549.         case 'mail':
  2550.             const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$/;
  2551.             return emailRegex.test(value);
  2552.         case 'Passworduser':
  2553.             // Minimum 6 caractères pour un mot de passe
  2554.             return value.length >= 6;
  2555.         case 'Passworduser2':
  2556.             // Doit correspondre au mot de passe et avoir au moins 6 caractères
  2557.             return value === \$('#Passworduser').val() && value.length >= 6;
  2558.         case 'num':
  2559.             // Numéro de téléphone: doit contenir uniquement des chiffres et avoir au moins 8 caractères
  2560.             const phoneRegex = /^[0-9]{8,}\$/;
  2561.             return phoneRegex.test(value.replace(/\\s+/g, '')); // Enlever les espaces avant de tester
  2562.         case 'nomparent':
  2563.         case 'prenomparent':
  2564.             // Nom et prénom: au moins 2 caractères, pas de chiffres
  2565.             const nameRegex = /^[A-Za-zÀ-ÖØ-öø-ÿ\\s'-]{2,}\$/;
  2566.             return nameRegex.test(value);
  2567.         default:
  2568.             return value.length >= 2;
  2569.     }
  2570. }
  2571.     </script>
  2572.    
  2573.     <script>
  2574.         function hideshow() {
  2575.             document.getElementById(\"btnn\").disabled = true;
  2576.             \$(\"#btnn\").css(\"background-color\", \"#ecf0f1\");
  2577.             \$(\"#mdpobli\").css(\"display\", \"none\");
  2578.             \$(\"#mdpoblier\").css(\"display\", \"block\");
  2579.         }
  2580.     </script>
  2581.        <script>
  2582.     function closeModale(){
  2583.     \$(\"#monModalInscription\").modal('hide');
  2584.      }
  2585.    // \$(\".masktelph\").inputmask({\"mask\": \"9999999999\"});
  2586.    </script>
  2587.    <script>
  2588.     /**
  2589.      * this code is used to toggle the password
  2590.      */ 
  2591.     \$(\".toggle-password\").click(function() {
  2592.         \$(this).toggleClass(\"bi-eye bi-eye-slash\");
  2593. var input = \$(\$(this).attr(\"toggle\"));
  2594. if (input.attr(\"type\") == \"password\") {
  2595.   input.attr(\"type\", \"text\");
  2596. } else {
  2597.   input.attr(\"type\", \"password\");
  2598. }
  2599. });
  2600. \$(document).ready(function(){
  2601.             \$('[data-toggle=\"tooltip\"]').tooltip({
  2602.                 trigger: 'manual',
  2603.                 html: true,
  2604.                 template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"arrow\"></div><div class=\"tooltip-inner\"></div></div>'
  2605.             });
  2606.             function validateEmail(email) {
  2607.                 const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$/;
  2608.                 return re.test(String(email).toLowerCase());
  2609.             }
  2610.             \$('#mail').on('input', function() {
  2611.                 var emailInput = \$(this);
  2612.                 if (validateEmail(emailInput.val())) {
  2613.                     emailInput.removeClass('is-invalid');
  2614.                     emailInput.addClass('is-valid');
  2615.                     emailInput.tooltip('dispose');
  2616.                     \$('#notification').hide();
  2617.                     \$('#submitBtn').prop('disabled', false);
  2618.                     
  2619.                     // Ne pas passer automatiquement au champ suivant ici,
  2620.                     // car c'est déjà géré par setupAutoNextField()
  2621.                 } else {
  2622.                     emailInput.removeClass('is-valid');
  2623.                     emailInput.addClass('is-invalid');
  2624.                     
  2625.                     // Afficher le tooltip seulement si l'utilisateur a commencé à saisir
  2626.                     if (emailInput.val().length > 3) {
  2627.                         emailInput.attr('data-original-title', 'Votre adresse mail est incorrecte. Exemple: nom@domaine.com').tooltip('show');
  2628.                         if (emailInput.val().length > 0) {
  2629.                             \$('#notification').show();
  2630.                         }
  2631.                     } else {
  2632.                         \$('#notification').hide();
  2633.                     }
  2634.                     \$('#submitBtn').prop('disabled', false);
  2635.                 }
  2636.             });
  2637.         });
  2638. </script>
  2639. <script>
  2640. // Fonction pour configurer la validation en temps réel
  2641. function setupRealtimeValidation() {
  2642.     const formFields = [
  2643.         'nomparent',
  2644.         'prenomparent',
  2645.         'mail',
  2646.         'Passworduser',
  2647.         'Passworduser2',
  2648.         'num'
  2649.     ];
  2650.     
  2651.     formFields.forEach(field => {
  2652.         \$('#' + field).on('input', function() {
  2653.             const value = \$(this).val();
  2654.             
  2655.             // Ne pas afficher d'erreur tant que l'utilisateur n'a pas commencé à saisir
  2656.             if (value.length === 0) {
  2657.                 \$(this).removeClass('is-valid is-invalid');
  2658.                 \$(this).css('border', '1px solid #ced4da'); // Couleur de bordure par défaut
  2659.                 return;
  2660.             }
  2661.             
  2662.             // Vérifier la validité du champ
  2663.             if (isFieldValid(field, value)) {
  2664.                 \$(this).removeClass('is-invalid').addClass('is-valid');
  2665.                 \$(this).css('border', '1px solid #28a745'); // Vert pour valide
  2666.             } else {
  2667.                 \$(this).removeClass('is-valid').addClass('is-invalid');
  2668.                 \$(this).css('border', '1px solid #dc3545'); // Rouge pour invalide
  2669.             }
  2670.         });
  2671.     });
  2672. }
  2673. // Fonction pour réinitialiser le formulaire
  2674. function resetForm() {
  2675.     \$('#nomparent').css('border','1px solid #41a2aa');
  2676.     \$('#nomparent').removeClass('is-valid'); 
  2677.     \$('#nomparent').removeClass('is-invalid'); 
  2678.     \$('#nomparent').val(''); 
  2679.     \$('#prenomparent').css('border','1px solid #41a2aa');
  2680.     \$('#prenomparent').removeClass('is-valid'); 
  2681.     \$('#prenomparent').removeClass('is-invalid'); 
  2682.     \$('#prenomparent').val(''); 
  2683.     \$('#mail').css('border','1px solid #41a2aa');
  2684.     \$('#mail').removeClass('is-valid'); 
  2685.     \$('#mail').removeClass('is-invalid'); 
  2686.     \$('#mail').val(''); 
  2687.     \$('#eroor').css('display','none');
  2688.     \$('#num').css('border','1px solid #41a2aa');
  2689.     \$('#num').removeClass('is-valid'); 
  2690.     \$('#num').removeClass('is-invalid'); 
  2691.     \$('#num').val(''); 
  2692.     \$('#Passworduser').css('border','1px solid #41a2aa');
  2693.     \$('#Passworduser').removeClass('is-valid'); 
  2694.     \$('#Passworduser').removeClass('is-invalid');
  2695.     \$('#Passworduser').val('');  
  2696.     \$('#Passworduser2').css('border','1px solid #41a2aa');
  2697.     \$('#Passworduser2').removeClass('is-valid'); 
  2698.     \$('#Passworduser2').removeClass('is-invalid'); 
  2699.     \$('#Passworduser2').val(''); 
  2700.     \$(\"#smsInput\").prop(\"checked\",false);
  2701.     \$(\"#mailInput\").prop(\"checked\",false);
  2702. }
  2703. </script>
  2704. {% endblock %}
  2705. ""Parent/LoginParent.html.twig""/var/www/5sur5sejour/templates/Parent/LoginParent.html.twig");
  2706.     }
  2707. }