templates/components/drawer-sejour.html.twig line 1

Open in your IDE?
  1. {# 
  2.     Drawer "Créer mon espace séjour" - Premium Flow
  3.     Stripe-level UX · Conversion max · Sans pitié
  4. #}
  5. <!-- Overlay -->
  6. <div class="s5-drawer-overlay" id="s5DrawerOverlay"></div>
  7. <!-- Drawer -->
  8. <div class="s5-drawer" id="s5Drawer" role="dialog" aria-modal="true" aria-labelledby="s5DrawerTitle">
  9.     
  10.     <!-- Header (fixed) -->
  11.     <header class="s5-drawer-header">
  12.         <div class="s5-drawer-header-content">
  13.             <div class="s5-drawer-step-badge" id="s5StepBadge">Étape 1/2</div>
  14.             <h2 class="s5-drawer-title" id="s5DrawerTitle">Créez votre séjour</h2>
  15.             <p class="s5-drawer-subtitle">Activation sans frais pour votre structure. Les accès familles peuvent être proposés en option… ou offerts par vous.</p>
  16.         </div>
  17.         <button type="button" class="s5-drawer-close" id="s5DrawerClose" aria-label="Fermer">
  18.             <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  19.                 <path d="M18 6L6 18M6 6l12 12"/>
  20.             </svg>
  21.         </button>
  22.     </header>
  23.     <!-- Body (scrollable) -->
  24.     <div class="s5-drawer-body" id="s5DrawerBody">
  25.         
  26.         <!-- STEP 1 -->
  27.         <div class="s5-step" data-step="1" id="s5Step1">
  28.             
  29.             <!-- Profile Selector -->
  30.             <div class="s5-section">
  31.                 <label class="s5-section-label">Vous êtes :</label>
  32.                 <div class="s5-pills" role="radiogroup" aria-label="Type de structure">
  33.                     <button type="button" class="s5-pill active" data-profile="ecole_publique" role="radio" aria-checked="true">
  34.                         École publique
  35.                     </button>
  36.                     <button type="button" class="s5-pill" data-profile="ecole_privee" role="radio" aria-checked="false">
  37.                         École privée
  38.                     </button>
  39.                     <button type="button" class="s5-pill" data-profile="organisme" role="radio" aria-checked="false">
  40.                         Organisme / Mairie
  41.                     </button>
  42.                     <button type="button" class="s5-pill" data-profile="autre" role="radio" aria-checked="false">
  43.                         Autre
  44.                     </button>
  45.                 </div>
  46.             </div>
  47.             <!-- Free notice for public schools -->
  48.             <div class="s5-free-notice" id="s5FreeNotice">
  49.                 <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  50.                     <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
  51.                     <polyline points="22 4 12 14.01 9 11.01"/>
  52.                 </svg>
  53.                 <span>Soutien aux écoles publiques : service offert</span>
  54.             </div>
  55.             <!-- Plans -->
  56.             <div class="s5-section">
  57.                 <label class="s5-section-label">Choisissez votre formule</label>
  58.                 <div class="s5-plans">
  59.                     
  60.                     <!-- Plan: Séjour unique -->
  61.                     <button type="button" class="s5-plan-card active" data-plan="sejour_unique" data-base-price="0" aria-pressed="true">
  62.                         <div class="s5-plan-header">
  63.                             <span class="s5-plan-name">Séjour unique</span>
  64.                         </div>
  65.                         <ul class="s5-plan-features">
  66.                             <li>
  67.                                 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
  68.                                 Photos & vidéos illimitées
  69.                             </li>
  70.                             <li>
  71.                                 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
  72.                                 Localisation en temps réel
  73.                             </li>
  74.                             <li>
  75.                                 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
  76.                                 Jusqu'à 45 enfants
  77.                             </li>
  78.                         </ul>
  79.                         <div class="s5-plan-check">
  80.                             <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
  81.                         </div>
  82.                     </button>
  83.                     <!-- Plan: Pack annuel -->
  84.                     <button type="button" class="s5-plan-card" data-plan="pack_annuel" data-base-price="490" aria-pressed="false">
  85.                         <div class="s5-plan-badge">Recommandé</div>
  86.                         <div class="s5-plan-header">
  87.                             <span class="s5-plan-name">Pack annuel</span>
  88.                         </div>
  89.                         <ul class="s5-plan-features">
  90.                             <li>
  91.                                 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
  92.                                 Jusqu'à 25 séjours / an
  93.                             </li>
  94.                             <li>
  95.                                 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
  96.                                 Boîte vocale incluse
  97.                             </li>
  98.                             <li>
  99.                                 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
  100.                                 Support prioritaire
  101.                             </li>
  102.                         </ul>
  103.                         <div class="s5-plan-check">
  104.                             <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
  105.                         </div>
  106.                     </button>
  107.                 </div>
  108.             </div>
  109.             <!-- Enterprise link -->
  110.             <a href="/Accueil5sur5/devenir_partenaire" class="s5-enterprise-link">
  111.                 Plus de 25 séjours/an ? <span>Nous contacter →</span>
  112.             </a>
  113.         </div>
  114.         <!-- STEP 2 -->
  115.         <div class="s5-step" data-step="2" id="s5Step2" style="display:none;">
  116.             
  117.             <div class="s5-section">
  118.                 <label class="s5-section-label">Options</label>
  119.                 
  120.                 <!-- Voice Option -->
  121.                 <div class="s5-option-card" id="s5VoiceOption">
  122.                     <div class="s5-option-content">
  123.                         <div class="s5-option-icon">
  124.                             <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  125.                                 <path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
  126.                             </svg>
  127.                         </div>
  128.                         <div class="s5-option-text">
  129.                             <span class="s5-option-title">Boîte vocale téléphonique</span>
  130.                             <span class="s5-option-desc">À chaque message vocal publié, les parents reçoivent un appel.</span>
  131.                         </div>
  132.                         <div class="s5-option-right">
  133.                             <label class="s5-toggle">
  134.                                 <input type="checkbox" id="s5VoiceToggle" aria-label="Ajouter boîte vocale">
  135.                                 <span class="s5-toggle-slider"></span>
  136.                             </label>
  137.                         </div>
  138.                     </div>
  139.                     <div class="s5-option-tiers" id="s5VoiceTiers" style="display:none;">
  140.                         <button type="button" class="s5-tier active" data-tier="35" data-price="40">
  141.                             <span class="s5-tier-label">Jusqu'à 35 enfants</span>
  142.                         </button>
  143.                         <button type="button" class="s5-tier" data-tier="70" data-price="70">
  144.                             <span class="s5-tier-label">Jusqu'à 70 enfants</span>
  145.                         </button>
  146.                     </div>
  147.                 </div>
  148.             </div>
  149.             <!-- Summary card -->
  150.             <div class="s5-summary-card">
  151.                 <div class="s5-summary-row">
  152.                     <span>Formule</span>
  153.                     <span id="s5SummaryPlan">Séjour unique</span>
  154.                 </div>
  155.                 <div class="s5-summary-row" id="s5SummaryVoiceRow" style="display:none;">
  156.                     <span>Boîte vocale</span>
  157.                     <span id="s5SummaryVoice">Activée</span>
  158.                 </div>
  159.             </div>
  160.         </div>
  161.     </div>
  162.     <!-- Footer (sticky) -->
  163.     <footer class="s5-drawer-footer">
  164.         <div class="s5-footer-recap">
  165.             <span id="s5FooterRecap">Séjour unique</span>
  166.             <span class="s5-footer-total" id="s5FooterTotal">Activation gratuite</span>
  167.         </div>
  168.         <div class="s5-footer-actions">
  169.             <button type="button" class="s5-btn-back" id="s5BtnBack" style="display:none;">
  170.                 ← Retour
  171.             </button>
  172.             <button type="button" class="s5-btn-primary" id="s5BtnContinue">
  173.                 Créer mon séjour
  174.                 <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
  175.             </button>
  176.         </div>
  177.         <p class="s5-footer-trust">Activation sans frais pour votre structure. Les accès familles peuvent être proposés en option… ou offerts par vous.</p>
  178.     </footer>
  179. </div>
  180. <style>
  181. /* ========================================
  182.    5sur5 DRAWER - Premium Flow
  183.    Scoped styles: .s5-drawer-*
  184. ======================================== */
  185. /* Variables */
  186. .s5-drawer,
  187. .s5-drawer-overlay {
  188.     --s5-teal: #41a2aa;
  189.     --s5-teal-dark: #2d8a91;
  190.     --s5-teal-light: rgba(65, 162, 170, 0.08);
  191.     --s5-teal-border: rgba(65, 162, 170, 0.3);
  192.     --s5-orange: #f09e7a;
  193.     --s5-text: #1a1a1a;
  194.     --s5-text-secondary: #5f6368;
  195.     --s5-text-muted: #80868b;
  196.     --s5-border: #e8eaed;
  197.     --s5-bg: #ffffff;
  198.     --s5-bg-hover: #f8f9fa;
  199.     --s5-radius: 14px;
  200.     --s5-radius-sm: 8px;
  201.     --s5-shadow: 0 24px 80px -12px rgba(0,0,0,0.25);
  202.     --s5-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  203. }
  204. /* Overlay */
  205. .s5-drawer-overlay {
  206.     position: fixed;
  207.     inset: 0;
  208.     background: rgba(0, 0, 0, 0.4);
  209.     backdrop-filter: blur(4px);
  210.     z-index: 10000;
  211.     opacity: 0;
  212.     visibility: hidden;
  213.     transition: opacity 0.3s ease, visibility 0.3s ease;
  214. }
  215. .s5-drawer-overlay.active {
  216.     opacity: 1;
  217.     visibility: visible;
  218. }
  219. /* Drawer */
  220. .s5-drawer {
  221.     position: fixed;
  222.     top: 0;
  223.     right: 0;
  224.     width: 480px;
  225.     max-width: 100%;
  226.     height: 100%;
  227.     background: var(--s5-bg);
  228.     z-index: 10001;
  229.     display: flex;
  230.     flex-direction: column;
  231.     box-shadow: var(--s5-shadow);
  232.     transform: translateX(100%);
  233.     transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  234.     font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  235.     -webkit-font-smoothing: antialiased;
  236. }
  237. .s5-drawer.active {
  238.     transform: translateX(0);
  239. }
  240. /* Header */
  241. .s5-drawer-header {
  242.     padding: 20px 24px 16px;
  243.     border-bottom: 1px solid var(--s5-border);
  244.     position: relative;
  245.     flex-shrink: 0;
  246. }
  247. .s5-drawer-header-content {
  248.     padding-right: 40px;
  249. }
  250. /* Masquer tout bouton "Je me connecte" dans le drawer */
  251. .s5-drawer .btn-primary[data-bs-target="#modal-login"],
  252. .s5-drawer [data-bs-target="#modal-login"],
  253. .s5-drawer a[href*="modal-login"],
  254. .s5-drawer .s5-drawer-header .btn,
  255. .s5-drawer .s5-drawer-header-content .btn {
  256.     display: none !important;
  257. }
  258. .s5-drawer-step-badge {
  259.     display: inline-block;
  260.     padding: 4px 10px;
  261.     background: var(--s5-teal-light);
  262.     color: var(--s5-teal);
  263.     font-size: 12px;
  264.     font-weight: 600;
  265.     border-radius: 100px;
  266.     margin-bottom: 8px;
  267. }
  268. .s5-drawer-title {
  269.     font-size: 22px;
  270.     font-weight: 700;
  271.     color: var(--s5-text);
  272.     margin: 0 0 4px;
  273.     line-height: 1.2;
  274. }
  275. .s5-drawer-subtitle {
  276.     font-size: 14px;
  277.     color: var(--s5-text-secondary);
  278.     margin: 0;
  279. }
  280. .s5-drawer-close {
  281.     position: absolute;
  282.     top: 16px;
  283.     right: 16px;
  284.     width: 36px;
  285.     height: 36px;
  286.     border: none;
  287.     background: transparent;
  288.     color: var(--s5-text-muted);
  289.     cursor: pointer;
  290.     border-radius: 8px;
  291.     display: flex;
  292.     align-items: center;
  293.     justify-content: center;
  294.     transition: var(--s5-transition);
  295. }
  296. .s5-drawer-close:hover {
  297.     background: var(--s5-bg-hover);
  298.     color: var(--s5-text);
  299. }
  300. /* Body */
  301. .s5-drawer-body {
  302.     flex: 1;
  303.     overflow-y: auto;
  304.     padding: 20px 24px;
  305. }
  306. /* Steps */
  307. .s5-step {
  308.     animation: s5FadeIn 0.25s ease;
  309. }
  310. @keyframes s5FadeIn {
  311.     from { opacity: 0; transform: translateY(8px); }
  312.     to { opacity: 1; transform: translateY(0); }
  313. }
  314. /* Sections */
  315. .s5-section {
  316.     margin-bottom: 20px;
  317. }
  318. .s5-section-label {
  319.     display: block;
  320.     font-size: 13px;
  321.     font-weight: 600;
  322.     color: var(--s5-text-secondary);
  323.     text-transform: uppercase;
  324.     letter-spacing: 0.5px;
  325.     margin-bottom: 10px;
  326. }
  327. /* Pills */
  328. .s5-pills {
  329.     display: flex;
  330.     flex-wrap: wrap;
  331.     gap: 8px;
  332. }
  333. .s5-pill {
  334.     padding: 8px 14px;
  335.     font-size: 13px;
  336.     font-weight: 500;
  337.     color: var(--s5-text-secondary);
  338.     background: var(--s5-bg);
  339.     border: 1.5px solid var(--s5-border);
  340.     border-radius: 100px;
  341.     cursor: pointer;
  342.     transition: var(--s5-transition);
  343.     white-space: nowrap;
  344. }
  345. .s5-pill:hover {
  346.     border-color: var(--s5-teal-border);
  347.     color: var(--s5-teal);
  348. }
  349. .s5-pill.active {
  350.     background: var(--s5-teal);
  351.     border-color: var(--s5-teal);
  352.     color: #fff;
  353. }
  354. /* Free notice */
  355. .s5-free-notice {
  356.     display: flex;
  357.     align-items: center;
  358.     gap: 8px;
  359.     padding: 10px 14px;
  360.     background: linear-gradient(135deg, rgba(65, 162, 170, 0.08), rgba(65, 162, 170, 0.04));
  361.     border-radius: var(--s5-radius-sm);
  362.     font-size: 13px;
  363.     font-weight: 500;
  364.     color: var(--s5-teal-dark);
  365.     margin-bottom: 20px;
  366. }
  367. .s5-free-notice svg {
  368.     color: var(--s5-teal);
  369.     flex-shrink: 0;
  370. }
  371. .s5-free-notice.hidden {
  372.     display: none;
  373. }
  374. /* Plans */
  375. .s5-plans {
  376.     display: flex;
  377.     flex-direction: column;
  378.     gap: 12px;
  379. }
  380. .s5-plan-card {
  381.     position: relative;
  382.     width: 100%;
  383.     padding: 18px 20px;
  384.     background: var(--s5-bg);
  385.     border: 2px solid var(--s5-border);
  386.     border-radius: var(--s5-radius);
  387.     cursor: pointer;
  388.     transition: var(--s5-transition);
  389.     text-align: left;
  390.     display: flex;
  391.     flex-direction: column;
  392.     gap: 8px;
  393. }
  394. .s5-plan-card:hover {
  395.     border-color: var(--s5-teal-border);
  396. }
  397. .s5-plan-card.active {
  398.     border-color: var(--s5-teal);
  399.     background: var(--s5-teal-light);
  400. }
  401. .s5-plan-badge {
  402.     position: absolute;
  403.     top: -10px;
  404.     right: 16px;
  405.     padding: 4px 10px;
  406.     background: var(--s5-orange);
  407.     color: #fff;
  408.     font-size: 11px;
  409.     font-weight: 600;
  410.     text-transform: uppercase;
  411.     letter-spacing: 0.3px;
  412.     border-radius: 100px;
  413. }
  414. .s5-plan-header {
  415.     display: flex;
  416.     align-items: center;
  417.     justify-content: space-between;
  418. }
  419. .s5-plan-name {
  420.     font-size: 16px;
  421.     font-weight: 600;
  422.     color: var(--s5-text);
  423. }
  424. .s5-plan-price {
  425.     display: none;
  426.     align-items: baseline;
  427.     gap: 6px;
  428.     flex-wrap: wrap;
  429. }
  430. .s5-price-original {
  431.     font-size: 18px;
  432.     font-weight: 500;
  433.     color: var(--s5-text-muted);
  434.     text-decoration: line-through;
  435.     display: none;
  436. }
  437. .s5-price-original.visible {
  438.     display: inline;
  439. }
  440. .s5-price-value {
  441.     font-size: 28px;
  442.     font-weight: 700;
  443.     color: var(--s5-text);
  444.     line-height: 1;
  445. }
  446. .s5-price-value.free {
  447.     color: var(--s5-teal);
  448. }
  449. .s5-price-period {
  450.     font-size: 13px;
  451.     color: var(--s5-text-muted);
  452. }
  453. .s5-price-badge {
  454.     display: none;
  455.     padding: 3px 8px;
  456.     background: linear-gradient(135deg, var(--s5-teal), var(--s5-teal-dark));
  457.     color: #fff;
  458.     font-size: 11px;
  459.     font-weight: 600;
  460.     text-transform: uppercase;
  461.     letter-spacing: 0.3px;
  462.     border-radius: 100px;
  463.     margin-left: 4px;
  464. }
  465. .s5-price-badge.visible {
  466.     display: inline-block;
  467. }
  468. .s5-plan-features {
  469.     list-style: none;
  470.     padding: 0;
  471.     margin: 4px 0 0;
  472.     display: flex;
  473.     flex-direction: column;
  474.     gap: 6px;
  475. }
  476. .s5-plan-features li {
  477.     display: flex;
  478.     align-items: center;
  479.     gap: 8px;
  480.     font-size: 13px;
  481.     color: var(--s5-text-secondary);
  482. }
  483. .s5-plan-features svg {
  484.     color: var(--s5-teal);
  485.     flex-shrink: 0;
  486. }
  487. .s5-plan-check {
  488.     position: absolute;
  489.     top: 18px;
  490.     right: 16px;
  491.     width: 24px;
  492.     height: 24px;
  493.     color: var(--s5-teal);
  494.     opacity: 0;
  495.     transform: scale(0.8);
  496.     transition: var(--s5-transition);
  497. }
  498. .s5-plan-card.active .s5-plan-check {
  499.     opacity: 1;
  500.     transform: scale(1);
  501. }
  502. /* Enterprise link */
  503. .s5-enterprise-link {
  504.     display: block;
  505.     text-align: center;
  506.     font-size: 13px;
  507.     color: var(--s5-text-muted);
  508.     text-decoration: none;
  509.     padding: 12px 0;
  510.     transition: var(--s5-transition);
  511. }
  512. .s5-enterprise-link span {
  513.     color: var(--s5-teal);
  514.     font-weight: 500;
  515. }
  516. .s5-enterprise-link:hover {
  517.     color: var(--s5-text-secondary);
  518. }
  519. .s5-enterprise-link:hover span {
  520.     text-decoration: underline;
  521. }
  522. /* Option Card */
  523. .s5-option-card {
  524.     background: var(--s5-bg);
  525.     border: 2px solid var(--s5-border);
  526.     border-radius: var(--s5-radius);
  527.     overflow: hidden;
  528.     transition: var(--s5-transition);
  529. }
  530. .s5-option-card.active {
  531.     border-color: var(--s5-teal);
  532. }
  533. .s5-option-content {
  534.     display: flex;
  535.     align-items: center;
  536.     gap: 14px;
  537.     padding: 16px 18px;
  538. }
  539. .s5-option-icon {
  540.     width: 44px;
  541.     height: 44px;
  542.     background: var(--s5-teal-light);
  543.     border-radius: 10px;
  544.     display: flex;
  545.     align-items: center;
  546.     justify-content: center;
  547.     color: var(--s5-teal);
  548.     flex-shrink: 0;
  549. }
  550. .s5-option-text {
  551.     flex: 1;
  552.     min-width: 0;
  553. }
  554. .s5-option-title {
  555.     display: block;
  556.     font-size: 14px;
  557.     font-weight: 600;
  558.     color: var(--s5-text);
  559.     margin-bottom: 2px;
  560. }
  561. .s5-option-desc {
  562.     display: block;
  563.     font-size: 12px;
  564.     color: var(--s5-text-muted);
  565.     line-height: 1.4;
  566. }
  567. .s5-option-right {
  568.     display: flex;
  569.     flex-direction: column;
  570.     align-items: flex-end;
  571.     gap: 8px;
  572. }
  573. .s5-option-price {
  574.     display: none;
  575.     font-size: 15px;
  576.     font-weight: 600;
  577.     color: var(--s5-teal);
  578. }
  579. /* Toggle */
  580. .s5-toggle {
  581.     position: relative;
  582.     width: 44px;
  583.     height: 24px;
  584.     cursor: pointer;
  585. }
  586. .s5-toggle input {
  587.     opacity: 0;
  588.     width: 0;
  589.     height: 0;
  590. }
  591. .s5-toggle-slider {
  592.     position: absolute;
  593.     inset: 0;
  594.     background: var(--s5-border);
  595.     border-radius: 100px;
  596.     transition: var(--s5-transition);
  597. }
  598. .s5-toggle-slider::before {
  599.     content: '';
  600.     position: absolute;
  601.     width: 18px;
  602.     height: 18px;
  603.     left: 3px;
  604.     bottom: 3px;
  605.     background: #fff;
  606.     border-radius: 50%;
  607.     transition: var(--s5-transition);
  608.     box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  609. }
  610. .s5-toggle input:checked + .s5-toggle-slider {
  611.     background: var(--s5-teal);
  612. }
  613. .s5-toggle input:checked + .s5-toggle-slider::before {
  614.     transform: translateX(20px);
  615. }
  616. /* Voice Tiers */
  617. .s5-option-tiers {
  618.     display: flex;
  619.     gap: 8px;
  620.     padding: 0 18px 16px;
  621. }
  622. .s5-tier {
  623.     flex: 1;
  624.     padding: 10px 12px;
  625.     background: var(--s5-bg-hover);
  626.     border: 1.5px solid var(--s5-border);
  627.     border-radius: var(--s5-radius-sm);
  628.     cursor: pointer;
  629.     transition: var(--s5-transition);
  630.     text-align: center;
  631. }
  632. .s5-tier:hover {
  633.     border-color: var(--s5-teal-border);
  634. }
  635. .s5-tier.active {
  636.     border-color: var(--s5-teal);
  637.     background: var(--s5-teal-light);
  638. }
  639. .s5-tier-label {
  640.     display: block;
  641.     font-size: 12px;
  642.     color: var(--s5-text-secondary);
  643.     margin-bottom: 2px;
  644. }
  645. .s5-tier-price {
  646.     display: none;
  647.     font-size: 14px;
  648.     font-weight: 600;
  649.     color: var(--s5-text);
  650. }
  651. /* Summary Card */
  652. .s5-summary-card {
  653.     background: var(--s5-bg-hover);
  654.     border-radius: var(--s5-radius-sm);
  655.     padding: 14px 16px;
  656.     margin-top: 20px;
  657. }
  658. .s5-summary-row {
  659.     display: flex;
  660.     justify-content: space-between;
  661.     font-size: 13px;
  662.     color: var(--s5-text-secondary);
  663.     padding: 4px 0;
  664. }
  665. .s5-summary-row span:last-child {
  666.     font-weight: 500;
  667.     color: var(--s5-text);
  668. }
  669. /* Footer */
  670. .s5-drawer-footer {
  671.     padding: 16px 24px 20px;
  672.     border-top: 1px solid var(--s5-border);
  673.     background: var(--s5-bg);
  674.     flex-shrink: 0;
  675. }
  676. .s5-footer-recap {
  677.     display: flex;
  678.     justify-content: space-between;
  679.     align-items: center;
  680.     font-size: 13px;
  681.     color: var(--s5-text-secondary);
  682.     margin-bottom: 12px;
  683. }
  684. .s5-footer-total {
  685.     color: var(--s5-text);
  686. }
  687. .s5-footer-total strong {
  688.     font-size: 18px;
  689.     font-weight: 700;
  690.     color: var(--s5-teal);
  691. }
  692. .s5-footer-actions {
  693.     display: flex;
  694.     gap: 10px;
  695.     margin-bottom: 12px;
  696. }
  697. .s5-btn-back {
  698.     padding: 12px 18px;
  699.     font-size: 14px;
  700.     font-weight: 500;
  701.     color: var(--s5-text-secondary);
  702.     background: transparent;
  703.     border: 1.5px solid var(--s5-border);
  704.     border-radius: var(--s5-radius-sm);
  705.     cursor: pointer;
  706.     transition: var(--s5-transition);
  707. }
  708. .s5-btn-back:hover {
  709.     border-color: var(--s5-text-muted);
  710.     color: var(--s5-text);
  711. }
  712. .s5-btn-primary {
  713.     flex: 1;
  714.     display: flex;
  715.     align-items: center;
  716.     justify-content: center;
  717.     gap: 8px;
  718.     padding: 14px 24px;
  719.     font-size: 15px;
  720.     font-weight: 600;
  721.     color: #fff;
  722.     background: var(--s5-teal);
  723.     border: none;
  724.     border-radius: var(--s5-radius-sm);
  725.     cursor: pointer;
  726.     transition: var(--s5-transition);
  727. }
  728. .s5-btn-primary:hover {
  729.     background: var(--s5-teal-dark);
  730. }
  731. .s5-btn-primary:active {
  732.     transform: scale(0.98);
  733. }
  734. .s5-footer-trust {
  735.     font-size: 11px;
  736.     color: var(--s5-text-muted);
  737.     text-align: center;
  738.     margin: 0;
  739. }
  740. /* Mobile */
  741. @media (max-width: 540px) {
  742.     .s5-drawer {
  743.         width: 100%;
  744.     }
  745.     .s5-drawer-header {
  746.         padding: 16px 20px 14px;
  747.     }
  748.     .s5-drawer-title {
  749.         font-size: 20px;
  750.     }
  751.     .s5-drawer-body {
  752.         padding: 16px 20px;
  753.     }
  754.     .s5-drawer-footer {
  755.         padding: 14px 20px 16px;
  756.     }
  757.     .s5-pills {
  758.         gap: 6px;
  759.     }
  760.     .s5-pill {
  761.         padding: 7px 12px;
  762.         font-size: 12px;
  763.     }
  764.     .s5-plan-card {
  765.         padding: 14px 16px;
  766.     }
  767.     .s5-price-value {
  768.         font-size: 24px;
  769.     }
  770. }
  771. </style>
  772. <script>
  773. (function() {
  774.     'use strict';
  775.     // DOM Elements
  776.     const overlay = document.getElementById('s5DrawerOverlay');
  777.     const drawer = document.getElementById('s5Drawer');
  778.     const closeBtn = document.getElementById('s5DrawerClose');
  779.     const step1 = document.getElementById('s5Step1');
  780.     const step2 = document.getElementById('s5Step2');
  781.     const stepBadge = document.getElementById('s5StepBadge');
  782.     const btnContinue = document.getElementById('s5BtnContinue');
  783.     const btnBack = document.getElementById('s5BtnBack');
  784.     const freeNotice = document.getElementById('s5FreeNotice');
  785.     const priceUnique = document.getElementById('s5PriceUnique');
  786.     const priceOriginal = document.getElementById('s5PriceOriginal');
  787.     const priceBadge = document.getElementById('s5PriceBadge');
  788.     const voiceToggle = document.getElementById('s5VoiceToggle');
  789.     const voiceTiers = document.getElementById('s5VoiceTiers');
  790.     const voicePrice = document.getElementById('s5VoicePrice');
  791.     const voiceOptionCard = document.getElementById('s5VoiceOption');
  792.     const footerRecap = document.getElementById('s5FooterRecap');
  793.     const footerTotal = document.getElementById('s5FooterTotal');
  794.     const summaryPlan = document.getElementById('s5SummaryPlan');
  795.     const summaryVoiceRow = document.getElementById('s5SummaryVoiceRow');
  796.     const summaryVoice = document.getElementById('s5SummaryVoice');
  797.     // State
  798.     let currentStep = 1;
  799.     let state = {
  800.         profile: 'ecole_publique',
  801.         plan: 'sejour_unique',
  802.         voiceEnabled: false,
  803.         voiceTier: 35,
  804.         voicePrice: 40
  805.     };
  806.     // Pricing rules
  807.     const pricing = {
  808.         sejour_unique: {
  809.             ecole_publique: 0,
  810.             ecole_privee: 39,
  811.             organisme: 39,
  812.             autre: 39
  813.         },
  814.         pack_annuel: 490,
  815.         voice: { 35: 40, 70: 70 }
  816.     };
  817.     // Open drawer
  818.     window.openSejourDrawer = function() {
  819.         overlay.classList.add('active');
  820.         drawer.classList.add('active');
  821.         document.body.style.overflow = 'hidden';
  822.         drawer.querySelector('button').focus();
  823.     };
  824.     // Close drawer
  825.     window.closeSejourDrawer = function() {
  826.         overlay.classList.remove('active');
  827.         drawer.classList.remove('active');
  828.         document.body.style.overflow = '';
  829.         resetState();
  830.     };
  831.     function resetState() {
  832.         currentStep = 1;
  833.         state = {
  834.             profile: 'ecole_publique',
  835.             plan: 'sejour_unique',
  836.             voiceEnabled: false,
  837.             voiceTier: 35,
  838.             voicePrice: 40
  839.         };
  840.         showStep(1);
  841.         updateUI();
  842.     }
  843.     // Events
  844.     overlay.addEventListener('click', closeSejourDrawer);
  845.     closeBtn.addEventListener('click', closeSejourDrawer);
  846.     // Escape key
  847.     document.addEventListener('keydown', (e) => {
  848.         if (e.key === 'Escape' && drawer.classList.contains('active')) {
  849.             closeSejourDrawer();
  850.         }
  851.     });
  852.     // Profile pills
  853.     document.querySelectorAll('.s5-pill').forEach(pill => {
  854.         pill.addEventListener('click', () => {
  855.             document.querySelectorAll('.s5-pill').forEach(p => {
  856.                 p.classList.remove('active');
  857.                 p.setAttribute('aria-checked', 'false');
  858.             });
  859.             pill.classList.add('active');
  860.             pill.setAttribute('aria-checked', 'true');
  861.             state.profile = pill.dataset.profile;
  862.             updateUI();
  863.         });
  864.     });
  865.     // Plan cards
  866.     document.querySelectorAll('.s5-plan-card').forEach(card => {
  867.         card.addEventListener('click', () => {
  868.             document.querySelectorAll('.s5-plan-card').forEach(c => {
  869.                 c.classList.remove('active');
  870.                 c.setAttribute('aria-pressed', 'false');
  871.             });
  872.             card.classList.add('active');
  873.             card.setAttribute('aria-pressed', 'true');
  874.             state.plan = card.dataset.plan;
  875.             updateUI();
  876.         });
  877.     });
  878.     // Voice toggle
  879.     voiceToggle.addEventListener('change', () => {
  880.         state.voiceEnabled = voiceToggle.checked;
  881.         voiceTiers.style.display = state.voiceEnabled ? 'flex' : 'none';
  882.         voiceOptionCard.classList.toggle('active', state.voiceEnabled);
  883.         updateUI();
  884.     });
  885.     // Voice tiers
  886.     document.querySelectorAll('.s5-tier').forEach(tier => {
  887.         tier.addEventListener('click', () => {
  888.             document.querySelectorAll('.s5-tier').forEach(t => t.classList.remove('active'));
  889.             tier.classList.add('active');
  890.             state.voiceTier = parseInt(tier.dataset.tier);
  891.             state.voicePrice = parseInt(tier.dataset.price);
  892.             updateUI();
  893.         });
  894.     });
  895.     // Continue button
  896.     btnContinue.addEventListener('click', () => {
  897.         if (currentStep === 1) {
  898.             // If Pack annuel, redirect directly
  899.             if (state.plan === 'pack_annuel') {
  900.                 window.location.href = '/Accueil5sur5/Pack_Annuel_Partenaires';
  901.                 return;
  902.             }
  903.             showStep(2);
  904.         } else {
  905.             // Step 2 -> Submit
  906.             submitForm();
  907.         }
  908.     });
  909.     // Back button
  910.     btnBack.addEventListener('click', () => {
  911.         showStep(1);
  912.     });
  913.     function showStep(step) {
  914.         currentStep = step;
  915.         if (step === 1) {
  916.             step1.style.display = 'block';
  917.             step2.style.display = 'none';
  918.             stepBadge.textContent = 'Étape 1/2';
  919.             btnBack.style.display = 'none';
  920.             btnContinue.innerHTML = 'Créer mon séjour <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M5 12h14M12 5l7 7-7 7"/></svg>';
  921.         } else {
  922.             step1.style.display = 'none';
  923.             step2.style.display = 'block';
  924.             stepBadge.textContent = 'Étape 2/2';
  925.             btnBack.style.display = 'inline-flex';
  926.             btnContinue.innerHTML = 'Créer mon séjour <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>';
  927.         }
  928.         updateUI();
  929.     }
  930.     function updateUI() {
  931.         const isSchool = ['ecole_publique', 'ecole_privee'].includes(state.profile);
  932.         const isPublicSchool = state.profile === 'ecole_publique';
  933.         // Free notice
  934.         freeNotice.classList.toggle('hidden', !isPublicSchool);
  935.         // Hide price displays
  936.         if (priceOriginal) priceOriginal.style.display = 'none';
  937.         if (priceUnique) priceUnique.style.display = 'none';
  938.         if (priceBadge) priceBadge.style.display = 'none';
  939.         // Calculate plan label
  940.         let planLabel = '';
  941.         if (state.plan === 'sejour_unique') {
  942.             planLabel = 'Séjour unique';
  943.         } else {
  944.             planLabel = 'Pack annuel';
  945.         }
  946.         // Update footer
  947.         let recapText = planLabel;
  948.         if (state.plan === 'sejour_unique' && state.voiceEnabled) {
  949.             recapText += ' + Boîte vocale';
  950.         }
  951.         footerRecap.textContent = recapText;
  952.         
  953.         // Always show "Activation gratuite" for footer
  954.         footerTotal.textContent = 'Activation gratuite';
  955.         // Step 2 summary
  956.         summaryPlan.textContent = planLabel;
  957.         summaryVoiceRow.style.display = state.voiceEnabled ? 'flex' : 'none';
  958.         if (summaryVoice) summaryVoice.textContent = 'Activée';
  959.     }
  960.     function submitForm() {
  961.         const params = new URLSearchParams();
  962.         params.set('profile', state.profile);
  963.         
  964.         if (state.voiceEnabled) {
  965.             params.set('voice_pack', state.voiceTier.toString());
  966.         }
  967.         let url = '/creation-simple/creer';
  968.         
  969.         // Special redirect for public schools
  970.         if (state.profile === 'ecole_publique') {
  971.             url = '/ecoles-publiques/creer';
  972.         }
  973.         window.location.href = url + '?' + params.toString();
  974.     }
  975.     // Initialize
  976.     updateUI();
  977.     
  978.     // S'assurer qu'aucun bouton "Je me connecte" n'apparaît dans le drawer
  979.     const observer = new MutationObserver(() => {
  980.         const drawer = document.getElementById('s5Drawer');
  981.         if (drawer) {
  982.             const loginButtons = drawer.querySelectorAll('[data-bs-target="#modal-login"], a[href*="modal-login"], .btn-primary[href*="#modal-login"]');
  983.             loginButtons.forEach(btn => btn.remove());
  984.         }
  985.     });
  986.     observer.observe(document.body, { childList: true, subtree: true });
  987. })();
  988. </script>