<!doctype html>
<html lang="fr">
<head>
{% if site_mode is defined and site_mode == 'prod' %}
<!-- Google Tag Manager -->
<!-- Google tag (gtag.js) -->
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P6WW2D7');</script>
<!-- End Google Tag Manager -->
<!-- End Google Tag Manager -->
{% endif %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="fr" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Étape 1</title>
<!--Favicon-->
<link rel="icon" type="image/png" href="/static/img/tunnel/favicon.png" />
<!--Script pour l'accordéon-->
<script type="text/javascript" src="//unpkg.com/alpinejs" defer></script>
<!-- TrustBox script -->
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
{% block stylesheets %}
{{ encore_entry_link_tags('tunnel') }}
{% endblock %}
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '334520913601498');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=334520913601498&ev=PageView&noscript=1"
/></noscript>
</head>
<body class="font-poppins">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P6WW2D7"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- En Tête -->
<header class="flex px-4 py-4 justify-center lg:justify-between flex-wrap items-center">
<div class="flex">
<a href="https://lesbonsprofs.com" target="_blank" aria-label="Les Bons Profs"><img src="/static/img/tunnel/les-bons-profs-logo.svg" alt="Les bons profs - Paiement" /></a>
</div>
<div class="flex items-center mt-2 sm:mt-0">
<div class="text-bleu font-bold sm:mr-2 xl:mr-5 text-xs sm:text-[15px] xl:text[20px] text-center sm:text-left">Besoin d'aide ? Sabrina vous répond au 01 86 95 72 01 du lundi au jeudi de 9h à 17h.</div>
</div>
</header>
<!-- Titre -->
<section class="py-4 text-center bg-bleu">
<h1 class="font-muller font-bold text-[45px] sm:text-[90px] text-white">
Offre {{ typeOffer.title }}
</h1>
<h2 class="font-muller text-jaunefonce text-[25px] sm:text-[40px]">
Sélectionnez votre durée
</h2>
</section>
<!-- Timeline -->
<section class="flex justify-center sm:pt-16">
<ol
class="border-s border-bleu border-opacity-30 md:flex md:justify-evenly md:gap-6 md:border-s-0 md:border-t w-9/12">
<!--First item-->
<li>
<div class="flex items-center pt-3 md:block md:pt-0">
<div
class="md:mx-auto h-[20px] w-[20px] rounded-full bg-white border-bleu border-8 md:-mt-[10px] -ms-[10px] me-3"></div>
<p class="sm:mt-2 text-sm xl:text-base text-bleu font-bold">
1. Choisissez votre offre
</p>
</div>
</li>
<!--Second item-->
<li>
<div class="flex items-center pt-3 md:block md:pt-0">
<div
class="md:mx-auto h-[9px] w-[9px] rounded-full bg-bleu opacity-50 md:-mt-[5px] -ms-[5px] me-3"></div>
<p class="sm:mt-2 ml-1.5 sm:ml-0 text-sm xl:text-base text-bleu opacity-50">
2. Accédez à votre compte
</p>
</div>
</li>
<!--Third item-->
<li>
<div class="flex items-center pt-3 md:block md:pt-0">
<div
class="md:mx-auto h-[9px] w-[9px] rounded-full bg-bleu opacity-50 md:-mt-[5px] -ms-[5px] me-3"></div>
<p class="sm:mt-2 ml-1.5 sm:ml-0 text-sm xl:text-base text-bleu opacity-50">
3. Procédez au paiement
</p>
</div>
</li>
</ol>
</section>
{% if mode_free %}
<section class="flex justify-center py-8 sm:py-16">
<div class="text-center w-11/12 lg:w-9/12 bg-jaunefonce text-bleu py-2 px-4 rounded-full sm:text-xl">
Vous ne serez pas débité avant la fin de votre essai de 7 jours
</div>
</section>
{% endif %}
<!--Offres-->
<section class="flex justify-center{% if mode_tunnel %} pt-8 sm:pt-16{% endif %}">
<div class="flex flex-col lg:flex-row justify-between w-11/12 xl:w-9/12">
<!--Colonne gauche-->
<div class="flex flex-col lg:w-6/12">
{% if not mode_tunnel %}
<div>
<label for="enfants" class="font-bold tracking-tight sm:tracking-normal">
Combien d’enfants souhaitez-vous inscrire ?
</label>
<div class="flex items-center mt-2">
<div>
<select id="nbr-child" name="enfants" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 sm:max-w-xs sm:text-sm/6">
<option value="1">1 enfant</option>
<option value="2">2 enfants</option>
<option value="3">3 enfants</option>
<option value="4">4 enfants</option>
<option value="5">5 enfants</option>
</select>
</div>
<div class="italic text-xs text-gray-500 ml-5">
<p>-20% pour le 2<sup>ème</sup> enfant</p>
<p>-30% pour le 3<sup>ème</sup> enfant</p>
</div>
</div>
</div>
{% else %}
<input type="hidden" name="enfants" value="1" id="nbr-child">
{% endif %}
{% for row in listOffer %}
<!--Carte 24 mois-->
<div class="{% if loop.first %}sm:flex{% else %}flex{% endif%} justify-between border-gray-400 border-solid border-4 rounded-md mt-6">
{% if row.discount is null or (row.discountDate is not null and row.discountDate|date('U') < "now"|date('U') ) %}
<div>{% if row.monthValid>1 %}
<span class="text-xs bg-red-600 text-white absolute rounded px-1 py-0.5">{{ (((((row.price/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, ',', '.')|abs) }}% de réduction</span>
{% endif %}
<div class="flex flex-col pt-5 pb-5 pl-5">
<div class="flex items-center gap-x-3">
<input id="p-{{ loop.index }}" name="price" value="{{ row.slug }}" type="radio" class="h-4 w-4 border-gray-300" data-id="{{ row.id }}" data-title="{{ row.title }}" data-price="{{ row.price }}" data-month="{{ row.monthValid }}" data-period="{% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois">
<label for="p-{{ loop.index }}" class="block font-medium text-gray-900">
<span class="font-bold text-xl mr-5">{{ row.monthValid }} mois</span><br class="sm:hidden"/>
<span class="font-bold">{{ (row.price/row.monthValid)|round(2, 'floor')|number_format(2, ',', '.') }} € / mois</span>
</label>
</div>
<div class="mt-5 text-xs text-gray-500">
{% if row.monthValid>1 %}En un paiement de {{ row.price|number_format(2, ',', '.') }} €.{% endif%} {% if row.monthValid<13 %}Renoulevé tous les {% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois.{% endif %} Annulable à tout moment
</div>
</div>
</div>
{% else %}
<div>
<span class="text-xs bg-red-600 text-white absolute rounded px-1 py-0.5">{% if row.percentDiscount is null %}{{ (((((row.getAmount()/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, ',', '.')|abs) }}{% else %}{{ row.percentDiscount }}{% endif %}% de réduction</span>
<div class="flex flex-col pt-10 pb-5 pl-5">
<div class="flex items-center gap-x-3">
<input id="p-{{ loop.index }}" name="price" value="{{ row.slug }}" type="radio" class="h-4 w-4 border-gray-300 js-auto-discount" data-title="{{ row.title }}" data-discount="{{ row.discount.codePromo }}" data-price="{{ row.price }}" data-month="{{ row.monthValid }}" data-period="{% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois">
<label for="p-{{ loop.index }}" class="block font-medium text-gray-900">
<span class="font-bold text-xl mr-5">{{ row.monthValid }} mois</span><br class="sm:hidden"/>
<span class="font-bold">{{ (row.getAmount()/row.monthValid)|round(2, 'floor')|number_format(2, ',', '.') }} € / mois <span class="line-through text-gray-500">( au lieu de {{ priceMark|number_format(2, ',', '.') }}€)</span></span>
</label>
</div>
<div class="mt-5 text-xs text-gray-500">
{% if row.monthValid>1 %}En un paiement de {{ row.getAmount()|number_format(2, ',', '.') }} € (<span class="text-decoration-line-through" style="text-decoration: line-through">{{ row.oldPrice }} €</span>) avec le code {{ row.discount.codePromo|upper }}.{% endif%} {% if row.monthValid<13 %}Renoulevé tous les {% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois.{% endif %} Annulable à tout moment
</div>
</div>
</div>
{% endif %}
{% if loop.first %}
<div class="flex flex-col justify-center bg-jaunefonce sm:w-5/12 sm:p-5 p-3">
<div class="flex flex-wrap font-bold items-center justify-center sm:justify-start">Coup de<img src="/static/img/tunnel/coeur-rouge.png" alt="Coup de coeur des parents" class="px-1 sm:px-2 w-5 h-4 sm:w-auto" />des parents</div>
<div class="mt-5 text-xs text-center sm:text-justify">Inclus les annales du Bac et du Brevet corrigées en vidéo</div>
</div>
{% endif %}
</div>
{% endfor %}
{% set titre_faq = "Comment fonctionne l’essai gratuit de 7 jours :" %}
{% set faq = [
{
"titre":"Pendant la période d’essai",
"texte":"Je teste tous les contenus compris dans mon abonnement, les stages de révision pendant les vacances et les boost matière."
},{
"titre":"Comment arrêter l’essai gratuit",
"texte": "Avant la fin des 7 jours d’essai, rendez-vous dans la rubrique “gestion du compte” de votre espace parents et cliquez sur “mettre fin à la période d’essai”."
}] %}
{% if mode_free %}
<!--L'essai gratuit pour PC-->
<div class="mt-12 text-gray-500 hidden lg:block text-justify">
<p class="font-bold">
{{ titre_faq|raw }}
</p>
{% for row in faq %}
<p class="mt-5">
<span class="font-bold">{{ row.titre }}</span>
<br />
{{ row.texte }}
</p>
{% endfor %}
</div>
<!--Accordéon pour mobile-->
<div class="mt-12 py-2 px-3 border-gray-400 border-solid border rounded-md lg:hidden" x-data="{selected: null}">
<div>
<div>
<div class="w-full flex justify-between items-center cursor-pointer"
@click="selected !== 1 ? selected = 1 : selected = null"
>
<h4 class="font-bold text-gray-500">{{ titre_faq|raw }}</h4>
<div class="pl-2">
<img class="transition-all ease-in-out duration-700 min-w-4" :class="selected === 1 ? 'rotate-180' : ''" alt="chevron" src="/static/img/tunnel/chevron.svg" />
</div>
</div>
<div class="relative overflow-hidden max-h-0 transition-all ease-in-out duration-700" x-ref="container1" :style="selected === 1 ? 'max-height: ' + $refs.container1.scrollHeight + 'px' : ''">
<div class="pt-4 flex flex-col space-y-3">
<div class="text-gray-500 text-justify">
{% for row in faq %}
<p class="mt-5">
<span class="font-bold">{{ row.titre }}</span>
<br />
{{ row.texte }}
</p>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<!--Colonne droite-->
<div class="flex flex-col lg:w-5/12 my-16 lg:mt-0">
<!--Encadré bleu-->
<div class="flex flex-col bg-bleu rounded-2xl">
<div class="text-white font-bold text-center text-2xl py-5">Ce que comprend l'offre {{ typeOffer.title }}</div>
<div class="flex flex-col bg-white m-2 rounded-2xl p-5">
<div>
{% if typeOffer is not null %}
{{ typeOffer.textPaid|raw }}
{% endif %}
</div>
<label for="promo" class="mt-8 sm:mt-16">Vous disposez d'un code promotionel ? Indiquez-le ici :</label>
<div class="flex mt-5">
<input type="text" name="promo" id="promo" autocomplete="username" class="flex-1 border-0 py-1.5 pl-5 placeholder:text-gray-400 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-md shadow-sm ring-1 ring-inset ring-gray-300 w-[2vw]" placeholder="Entrez le code promo">
<button type="submit" class="bg-jaunefonce px-3 py-2 text-xl font-bold text-white shadow-sm hover:bg-rouge rounded-r-3xl" id="button-code-promo">Valider</button>
</div>
<div class="" id="tr-code">
<div style="padding: 2%;" class="mt-2">
<div class="remise-appliquee font-bold"></div>
<div id="text-percent"></div>
</div>
</div>
<div class="grid grid-cols-[repeat(2,minmax(auto,auto))] gap-4 border-jaunefonce border-solid border-8 rounded-3xl mt-8 sm:mt-16 p-6 items-center">
{% if mode_free %}
<span>Montant dû aujourd'hui</span>
<span>0 €</span>
<span>Montant dû {{ "now"|date_modify("+8 day")|format_datetime(locale='fr',pattern="dd MMMM YYYY") }}</span>
<span id="som-toto"></span>
{% else %}
<span>Montant dû aujourd'hui</span>
<span id="som-toto"></span>
{% endif %}
</div>
</div>
</div>
<!--Bouton-->
<div class="flex justify-center mt-10 cursor-pointer">
<button type="submit" class="bg-jaunefonce btn-form text-bleu rounded-3xl text-3xl font-muller py-3 px-20">OK j'essaie</button>
<img src="/static/img/tunnel/clic-hand.png" alt="Essayer l'offre" class="absolute pl-60 pt-5 btn-form" />
</div>
<!-- TrustBox widget - List pour PC-->
<div class="trustpilot-widget mt-20 hidden lg:block" data-locale="fr-FR" data-template-id="539ad60defb9600b94d7df2c" data-businessunit-id="5c9c8063164d370001824ce4" data-style-height="500px" data-style-width="100%" data-stars="4,5" data-review-languages="fr">
<a href="https://fr.trustpilot.com/review/lesbonsprofs.com" target="_blank" rel="noopener">Trustpilot</a>
</div>
<!-- TrustBox widget - Mini pour mobiles-->
<div class="trustpilot-widget lg:hidden mt-16" data-locale="fr-FR" data-template-id="53aa8807dec7e10d38f59f32" data-businessunit-id="5c9c8063164d370001824ce4" data-style-height="150px" data-style-width="100%">
<a href="https://fr.trustpilot.com/review/lesbonsprofs.com" target="_blank" rel="noopener">Trustpilot</a>
</div>
</div>
</div>
</section>
<form class="form-next-step-2" action="{{ path('choix-formule-step') }}?offre={{ getOffer }}" method="post" id="parents_registration_first_step_{% if getOffer == "essentielle" %}essentielle{% else %}assistancevisio{% endif %}">
</form>
<div class="u-spinner h-100 vh-100">
<svg class="svg-icon svg-loader" version="1.1" id="L4" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 50 100" enable-background="new 0 0 0 0"
xml:space="preserve">
<circle cx="0" cy="50" r="6">
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1"></animate>
</circle>
<circle cx="20" cy="50" r="6">
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.2"></animate>
</circle>
<circle cx="41" cy="50" r="6">
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3"></animate>
</circle>
</svg>
</div>
{% block javascripts %}
{{ encore_entry_script_tags('tunnel') }}
{% endblock %}
<script type="text/javascript">
$(document).ready(function(){
function calculPrice(){
var nbrChild = parseInt($('#nbr-child').val());
var som = 0;
if($('input[name="price"]:checked').length==1){
var period = $('input[name="price"]:checked').attr('data-period');
var month = $('input[name="price"]:checked').attr('data-month');
var price = $('input[name="price"]:checked').attr('data-price');
var realPrice = parseFloat(price);
for(var i = 0;i<nbrChild;i++){
if(i==0){
if($('#button-code-promo').is("[data-percent]")){
var percent = $('#button-code-promo').attr('data-percent');
if($('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*(parseFloat(percent)/100));
}else{
som= som + realPrice
}
}else{
som= som + realPrice
}
}
if(i==1){
if(!$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*0.2);
}else{
som = som + (realPrice - realPrice*0.35);
}
}
if(2<=i){
if(!$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*0.3);
}else{
som = som + (realPrice - realPrice*0.45);
}
}
}
$('#som-toto').text('').text((som.toFixed(2)).replaceAll('.',',')+' €');
$('#som-toto').attr('data-som',som.toFixed(2))
$('.total-price').text(' / '+period);
}
}
$('#nbr-child').change(function(){
var val = $(this).val();
calculPrice();
if($('.form-next-step-2').find('input[name="child"]').length==0){
$('.form-next-step-2').append('<input type="hidden" name="child" value="'+val+'"/>')
}else{
$('.form-next-step-2').find('input[name="child"]').val(val);
}
})
var percent = 0;
var coupon
$('#button-code-promo').click(function(){
if ($('input[name="price"]:checked').length==1){
var priceId = $('input[name="price"]:checked').attr('data-id');
var self = $(this);
$(this).prev().removeClass('is-invalid');
coupon = $(this).prev().val();
self.parent().parent().find('.invalid-feedback').text('')
$.ajax({
url:"{{ path('valid_coupon') }}",
data:"coupon="+coupon,
success:function(elem){
var verif= true;
self.parent().find('input').val('');
if(elem.success){
if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
verif = false;
}
if(verif){
if($('.form-next-step-2').find('input[name="discount"]').length==0){
$('.form-next-step-2').append('<input type="hidden" name="discount" value="'+elem.data.code+'"/>')
}else{
$('.form-next-step-2').find('input[name="discount"]').val(elem.data.code);
}
percent = elem.data.percent;
self.attr('data-percent',percent);
//$('#text-percent').text('').text('reduction de '+percent+'%')
$('.remise-appliquee').text('').text('Promotion appliquée : '+elem.data.description);
self.addClass('js-calculate-auto')
calculPrice();
}
}
if(!elem.success || !verif){
self.parents('.input-group').parent().find('.invalid-feedback').text('').text('Ce code promo est invalide !');
if(!self.parents('.input-group').find('input').hasClass('is-invalid')){
self.parents('.input-group').find('input').addClass('is-invalid');
}
}
}
})
}else{
alert('Veuillez choisir une durée de votre offre')
}
})
$('input[name="price"]').change(function(){
if($(this).is(':checked')){
var price = parseFloat($(this).attr('data-price'));
var period = $(this).attr('data-period');
var offer = $(this).val();
var month = $(this).attr('data-month');
if($(this).hasClass('js-auto-discount')){
var coupon = $(this).attr('data-discount');
$('.u-spinner').addClass('open')
$.ajax({
url:"{{ path('valid_coupon') }}",
data:"coupon="+coupon,
success:function(elem){
if(elem.success){
//$('#tr-code').removeClass('d-none')
if($('.form-next-step-2').find('input[name="discount"]').length==0){
$('.form-next-step-2').append('<input type="hidden" name="discount" value="'+elem.data.code+'"/>')
}else{
$('.form-next-step-2').find('input[name="discount"]').val(elem.data.code);
}
percent = elem.data.percent;
$('#button-code-promo').attr('data-percent',percent);
if(!$('#button-code-promo').hasClass('js-calculate-auto')){
$('#button-code-promo').addClass('js-calculate-auto')
}
// self.attr('data-percent',percent);
//$('#text-percent').text('').text('reduction de '+percent+'%')
$('.remise-appliquee').text('').text('Promotion appliquée : '+elem.data.description);
calculPrice();
$('.u-spinner').removeClass('open')
}
}
})
}else{
$('#button-code-promo').attr('data-percent',0);
if($('.form-next-step-2').find('input[name="discount"]').length==1){
$('.form-next-step-2').find('input[name="discount"]').remove()
}
//$('#text-percent').text('')
$('.remise-appliquee').text('');
calculPrice()
}
if($('.form-next-step-2').find('input[name="offer"]').length==0){
$('.form-next-step-2').append('<input type="hidden" name="offer" value="'+offer+'"/>')
}else{
$('.form-next-step-2').find('input[name="offer"]').val(offer);
}
// $('#text-toto-offer-period').removeClass('d-none').addClass('d-block')
// $('#toto-offer-period').text(period.toLowerCase())
}
})
$('input[name="price"]').change()
$('.btn-form').click(function(){
if($('.form-next-step-2').find('input[name="offer"]').length==0){
}else{
fbq('track', 'AddToCart', {
content_name: $('input[name="price"]:checked').data('title'),
content_category: '{{ typeOffer.title|upper }}',
content_ids: [$('input[name="price"]:checked').val()],
content_type: 'product',
value: $('#som-toto').data('som'),
currency: 'EUR'
});
$('.form-next-step-2').submit();
}
})
{% if not getPrice %}
$('.show-mentor #p-1').click();
{% endif %}
})
</script>
</body>