templates/evenement/sessionsFront.html.twig line 1

Open in your IDE?
  1. {% extends 'backfront.html.twig' %}
  2. {% block title %}Sessions de formation SIP Academy - Calendrier et inscription{% endblock %}
  3. {% block meta_description %}
  4.     Inscrivez-vous aux prochaines sessions de formation chez SIP Academy. Consultez le calendrier de nos cours en ligne et en présentiel et planifiez votre avenir.
  5. {% endblock %}
  6. {% block body %}
  7.     <style>
  8.         /* ===== COULEURS MODERNES ===== */
  9.         :root {
  10.             --gold: #FFAE27;
  11.             --gold-dark: #e09500;
  12.             --gold-light: #fff8e6;
  13.             --navy: #1F3971;
  14.             --navy-dark: #162d5a;
  15.             --navy-light: #e8edf8;
  16.             --text-dark: #1a2a3a;
  17.             --text-muted: #6c757d;
  18.             --border-light: #eef2f6;
  19.         }
  20.         /* ===== BREADCRUMB MODERNE ===== */
  21.         .breadcrumb-area {
  22.             background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  23.             padding: 100px 0 120px;
  24.             position: relative;
  25.             text-align: center;
  26.         }
  27.         .breadcrumb-title h1 {
  28.             color: #fff;
  29.             font-size: 48px;
  30.             font-weight: 800;
  31.             margin-bottom: 10px;
  32.             letter-spacing: -1px;
  33.         }
  34.         .breadcrumb-list {
  35.             list-style: none;
  36.             padding: 0;
  37.             margin: 0;
  38.             display: flex;
  39.             justify-content: center;
  40.             gap: 15px;
  41.             align-items: center;
  42.         }
  43.         .breadcrumb-list li, .breadcrumb-list li a {
  44.             color: rgba(255,255,255,0.7);
  45.             font-size: 15px;
  46.             text-decoration: none;
  47.             transition: color 0.3s;
  48.         }
  49.         .breadcrumb-list li a:hover {
  50.             color: var(--gold);
  51.         }
  52.         .breadcrumb-list li.active {
  53.             color: var(--gold);
  54.         }
  55.         .breadcrumb-list li i {
  56.             font-size: 14px;
  57.             color: var(--gold);
  58.         }
  59.         /* ===== SEARCH BAR FLOATING MODERNE ===== */
  60.         .search-category {
  61.             margin-top: -60px;
  62.             position: relative;
  63.             z-index: 10;
  64.             padding-bottom: 20px;
  65.         }
  66.         .search-wrapper-glass {
  67.             background: #ffffff;
  68.             padding: 30px;
  69.             border-radius: 24px;
  70.             box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  71.             border: 1px solid rgba(255,255,255,0.8);
  72.         }
  73.         .form-container-modern {
  74.             display: grid;
  75.             grid-template-columns: 2fr 1fr 1fr auto;
  76.             gap: 15px;
  77.             align-items: center;
  78.         }
  79.         .input-group-custom {
  80.             position: relative;
  81.             display: flex;
  82.             align-items: center;
  83.         }
  84.         .input-group-custom i {
  85.             position: absolute;
  86.             left: 15px;
  87.             color: var(--navy);
  88.             opacity: 0.5;
  89.             z-index: 5;
  90.         }
  91.         .input-group-custom input,
  92.         .input-group-custom select {
  93.             width: 100%;
  94.             padding: 15px 15px 15px 45px !important;
  95.             border: 1px solid #e2e8f0;
  96.             border-radius: 12px;
  97.             font-size: 14px;
  98.             background-color: #f8fafc;
  99.             transition: all 0.3s ease;
  100.             cursor: pointer;
  101.             appearance: none;
  102.         }
  103.         .input-group-custom input:focus,
  104.         .input-group-custom select:focus {
  105.             background: #fff;
  106.             border-color: var(--gold);
  107.             box-shadow: 0 0 0 4px rgba(255, 174, 39, 0.1);
  108.             outline: none;
  109.         }
  110.         .btn-search-modern {
  111.             background: var(--gold);
  112.             color: var(--navy);
  113.             border: none;
  114.             padding: 15px 35px;
  115.             border-radius: 12px;
  116.             font-weight: 700;
  117.             text-transform: uppercase;
  118.             letter-spacing: 0.5px;
  119.             cursor: pointer;
  120.             transition: all 0.3s ease;
  121.             display: flex;
  122.             align-items: center;
  123.             gap: 10px;
  124.             white-space: nowrap;
  125.         }
  126.         .btn-search-modern:hover {
  127.             background: var(--navy);
  128.             color: #fff;
  129.             transform: translateY(-2px);
  130.         }
  131.         /* ===== SECTION TITRES ===== */
  132.         .section-title-wrapper {
  133.             text-align: center;
  134.             margin-bottom: 50px;
  135.         }
  136.         .section-title h3 {
  137.             font-size: 36px;
  138.             font-weight: 800;
  139.             color: var(--text-dark);
  140.             margin-bottom: 12px;
  141.             position: relative;
  142.             display: inline-block;
  143.         }
  144.         .section-title h3::after {
  145.             content: '';
  146.             position: absolute;
  147.             bottom: -12px;
  148.             left: 50%;
  149.             transform: translateX(-50%);
  150.             width: 60px;
  151.             height: 4px;
  152.             background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  153.             border-radius: 2px;
  154.         }
  155.         .section-title p {
  156.             font-size: 16px;
  157.             color: var(--text-muted);
  158.             margin-top: 20px;
  159.         }
  160.         /* ===== COURSE AREA ===== */
  161.         .course-area {
  162.             padding: 80px 0;
  163.             background: #fff;
  164.         }
  165.         /* CARTE SESSION - HAUTEUR ÉGALE */
  166.         .single-event-item {
  167.             background: #fff;
  168.             border-radius: 20px;
  169.             overflow: hidden;
  170.             box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  171.             transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  172.             height: 100%;
  173.             display: flex;
  174.             flex-direction: column;
  175.             border: 1px solid var(--border-light);
  176.         }
  177.         .single-event-item:hover {
  178.             transform: translateY(-8px);
  179.             box-shadow: 0 20px 40px rgba(31,57,113,0.15);
  180.             border-color: var(--gold);
  181.         }
  182.         /* IMAGE */
  183.         .single-event-image {
  184.             position: relative;
  185.             overflow: hidden;
  186.             height: 220px;
  187.             background: linear-gradient(135deg, #f8faff 0%, #fff 100%);
  188.             display: flex;
  189.             align-items: center;
  190.             justify-content: center;
  191.         }
  192.         .single-event-image a {
  193.             display: flex;
  194.             align-items: center;
  195.             justify-content: center;
  196.             width: 100%;
  197.             height: 100%;
  198.         }
  199.         .single-event-image img {
  200.             width: auto;
  201.             height: auto;
  202.             max-width: 100%;
  203.             max-height: 100%;
  204.             object-fit: contain;
  205.             transition: transform 0.4s ease;
  206.         }
  207.         .single-event-item:hover .single-event-image img {
  208.             transform: scale(1.05);
  209.         }
  210.         /* BADGE DATE */
  211.         .single-event-image span {
  212.             position: absolute;
  213.             top: 15px;
  214.             left: 15px;
  215.             background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  216.             color: var(--navy);
  217.             padding: 8px 16px;
  218.             border-radius: 12px;
  219.             font-weight: 800;
  220.             font-size: 14px;
  221.             z-index: 3;
  222.             box-shadow: 0 4px 15px rgba(255,174,39,0.3);
  223.             transition: all 0.3s ease;
  224.         }
  225.         .single-event-item:hover .single-event-image span {
  226.             transform: translateY(-3px);
  227.             box-shadow: 0 6px 20px rgba(255,174,39,0.4);
  228.         }
  229.         /* CORPS DE LA CARTE */
  230.         .single-event-text {
  231.             padding: 20px;
  232.             flex: 1;
  233.             display: flex;
  234.             flex-direction: column;
  235.         }
  236.         .single-event-text h3 {
  237.             font-size: 18px;
  238.             font-weight: 700;
  239.             margin-bottom: 12px;
  240.             line-height: 1.4;
  241.             min-height: 50px;
  242.         }
  243.         .single-event-text h3 a {
  244.             color: var(--text-dark);
  245.             text-decoration: none;
  246.             transition: color 0.2s;
  247.         }
  248.         .single-event-text h3 a:hover {
  249.             color: var(--gold);
  250.         }
  251.         /* INFOS SESSION (DATE + LIEU) */
  252.         .single-item-comment-view {
  253.             display: flex;
  254.             gap: 15px;
  255.             margin-bottom: 15px;
  256.             flex-wrap: wrap;
  257.         }
  258.         .single-item-comment-view span {
  259.             font-size: 12px;
  260.             color: var(--text-muted);
  261.             display: flex;
  262.             align-items: center;
  263.             gap: 6px;
  264.         }
  265.         .single-item-comment-view span i {
  266.             color: var(--gold);
  267.             font-size: 14px;
  268.         }
  269.         /* DESCRIPTION */
  270.         .single-event-text > p {
  271.             font-size: 13px;
  272.             color: var(--text-muted);
  273.             line-height: 1.6;
  274.             margin-bottom: 20px;
  275.             display: -webkit-box;
  276.             -webkit-line-clamp: 2;
  277.             -webkit-box-orient: vertical;
  278.             overflow: hidden;
  279.         }
  280.         /* BOUTON */
  281.         .button-default {
  282.             display: inline-flex;
  283.             align-items: center;
  284.             justify-content: center;
  285.             gap: 8px;
  286.             background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  287.             color: #fff;
  288.             border: none;
  289.             padding: 10px 24px;
  290.             border-radius: 30px;
  291.             font-weight: 600;
  292.             font-size: 13px;
  293.             cursor: pointer;
  294.             transition: all 0.3s ease;
  295.             text-decoration: none;
  296.             margin-top: auto;
  297.             align-self: flex-start;
  298.         }
  299.         .button-default:hover {
  300.             background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  301.             color: var(--navy);
  302.             transform: translateX(4px);
  303.         }
  304.         /* MESSAGE AUCUNE SESSION */
  305.         .no-sessions-message {
  306.             text-align: center;
  307.             padding: 60px 40px;
  308.             background: var(--surface-white);
  309.             border-radius: var(--r-lg);
  310.             border: 1px solid var(--border-light);
  311.             box-shadow: var(--sh-sm);
  312.             max-width: 500px;
  313.             margin: 0 auto;
  314.         }
  315.         .no-sessions-icon {
  316.             font-size: 64px;
  317.             color: var(--gold);
  318.             margin-bottom: 20px;
  319.         }
  320.         .no-sessions-message h3 {
  321.             font-size: 24px;
  322.             font-weight: 700;
  323.             color: var(--text-dark);
  324.             margin-bottom: 12px;
  325.         }
  326.         .no-sessions-message p {
  327.             font-size: 15px;
  328.             color: var(--text-muted);
  329.             margin-bottom: 25px;
  330.         }
  331.         /* PAGINATION */
  332.         .pagination-wrapper {
  333.             margin-top: 40px;
  334.             text-align: center;
  335.         }
  336.         .pagination {
  337.             display: flex;
  338.             justify-content: center;
  339.             gap: 8px;
  340.             list-style: none;
  341.             padding: 0;
  342.             margin: 0;
  343.         }
  344.         .pagination .page-item {
  345.             list-style: none;
  346.         }
  347.         .pagination .page-link {
  348.             display: flex;
  349.             align-items: center;
  350.             justify-content: center;
  351.             width: 40px;
  352.             height: 40px;
  353.             border-radius: 12px;
  354.             background: #fff;
  355.             border: 1px solid var(--border-light);
  356.             color: var(--navy);
  357.             font-weight: 500;
  358.             text-decoration: none;
  359.             transition: all 0.3s ease;
  360.         }
  361.         .pagination .page-link:hover {
  362.             background: var(--gold);
  363.             border-color: var(--gold);
  364.             color: var(--navy);
  365.         }
  366.         .pagination .active .page-link {
  367.             background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  368.             border-color: var(--navy);
  369.             color: #fff;
  370.         }
  371.         /* RESPONSIVE */
  372.         @media (max-width: 991px) {
  373.             .form-container-modern {
  374.                 grid-template-columns: 1fr;
  375.             }
  376.             .breadcrumb-area {
  377.                 padding: 60px 0 100px;
  378.             }
  379.             .breadcrumb-title h1 {
  380.                 font-size: 32px;
  381.             }
  382.             .btn-search-modern {
  383.                 justify-content: center;
  384.             }
  385.         }
  386.         @media (max-width: 768px) {
  387.             .section-title h3 {
  388.                 font-size: 28px;
  389.             }
  390.             .single-event-image {
  391.                 height: 180px;
  392.             }
  393.             .single-event-text h3 {
  394.                 font-size: 16px;
  395.                 min-height: auto;
  396.             }
  397.             .pagination .page-link {
  398.                 width: 36px;
  399.                 height: 36px;
  400.                 font-size: 13px;
  401.             }
  402.             .single-item-comment-view {
  403.                 gap: 10px;
  404.             }
  405.         }
  406.         /* ===== BADGE DATE CENTRÉ SOUS L'IMAGE ===== */
  407.         .event-date-badge {
  408.             position: relative;
  409.             display: flex;
  410.             align-items: center;
  411.             justify-content: center;  /* Centrage horizontal */
  412.             background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  413.             border-radius: 12px;
  414.             margin-top: 0;
  415.             margin-bottom: 15px;
  416.             padding: 8px 20px;
  417.             width: fit-content;
  418.             min-width: 80px;  /* Largeur minimum pour un bon centrage */
  419.             box-shadow: 0 4px 15px rgba(255,174,39,0.2);
  420.             transition: all 0.3s ease;
  421.             z-index: 5;
  422.             gap: 10px;
  423.             /* Centrage horizontal */
  424.             margin-left: auto;
  425.             margin-right: auto;
  426.         }
  427.         .single-event-item:hover .event-date-badge {
  428.             transform: translateY(-3px);
  429.             box-shadow: 0 8px 20px rgba(255,174,39,0.3);
  430.         }
  431.         .event-date-badge .event-day {
  432.             font-size: 22px;
  433.             font-weight: 800;
  434.             color: var(--navy);
  435.             line-height: 1;
  436.         }
  437.         .event-date-badge .event-month {
  438.             font-size: 12px;
  439.             font-weight: 600;
  440.             color: var(--navy);
  441.             text-transform: uppercase;
  442.             letter-spacing: 1px;
  443.         }
  444.         /* Style pour les sessions passées */
  445.         .event-date-badge.past {
  446.             background: linear-gradient(135deg, #6c757d, #495057);
  447.             box-shadow: 0 4px 15px rgba(108,117,125,0.2);
  448.         }
  449.         .event-date-badge.past .event-day,
  450.         .event-date-badge.past .event-month {
  451.             color: #fff;
  452.         }
  453.         .single-event-item:hover .event-date-badge.past {
  454.             box-shadow: 0 8px 20px rgba(108,117,125,0.3);
  455.         }
  456.         /* Ajustement de l'image */
  457.         .single-event-image {
  458.             position: relative;
  459.             overflow: hidden;
  460.             height: 220px;
  461.             background: linear-gradient(135deg, #f8faff 0%, #fff 100%);
  462.             display: flex;
  463.             align-items: center;
  464.             justify-content: center;
  465.             margin-bottom: 0;
  466.         }
  467.         /* Corps de la carte */
  468.         .single-event-text {
  469.             padding: 0 20px 20px 20px;
  470.             flex: 1;
  471.             display: flex;
  472.             flex-direction: column;
  473.         }
  474.         .single-event-text h3 {
  475.             font-size: 18px;
  476.             font-weight: 700;
  477.             margin-bottom: 12px;
  478.             margin-top: 0;
  479.             line-height: 1.4;
  480.             text-align: left;
  481.         }
  482.         /* Responsive */
  483.         @media (max-width: 768px) {
  484.             .event-date-badge {
  485.                 padding: 6px 16px;
  486.                 min-width: 70px;
  487.                 margin-bottom: 12px;
  488.             }
  489.             .event-date-badge .event-day {
  490.                 font-size: 18px;
  491.             }
  492.             .event-date-badge .event-month {
  493.                 font-size: 10px;
  494.             }
  495.             .single-event-text {
  496.                 padding: 0 15px 15px 15px;
  497.             }
  498.         }
  499.         /* =====================================================
  500.    PROCHAINES SESSIONS - SCROLLABLE HORIZONTAL
  501.    ===================================================== */
  502.         /* =====================================================
  503.            PROCHAINES SESSIONS - CARTES COMPACTES
  504.            ===================================================== */
  505.         /* Container des sessions avec défilement horizontal */
  506.         .sessions-scroll-wrapper {
  507.             position: relative;
  508.             margin: 30px 0;
  509.         }
  510.         .sessions-scroll-container {
  511.             position: relative;
  512.             display: flex;
  513.             align-items: center;
  514.             gap: 10px;
  515.         }
  516.         .sessions-scroll-btn {
  517.             width: 40px;
  518.             height: 40px;
  519.             border-radius: 50%;
  520.             background: white;
  521.             border: 1px solid var(--border-light);
  522.             color: var(--navy);
  523.             font-size: 18px;
  524.             cursor: pointer;
  525.             display: flex;
  526.             align-items: center;
  527.             justify-content: center;
  528.             transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  529.             flex-shrink: 0;
  530.             z-index: 10;
  531.             box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  532.         }
  533.         .sessions-scroll-btn:hover {
  534.             background: var(--gold);
  535.             border-color: var(--gold);
  536.             color: var(--navy);
  537.             transform: scale(1.1);
  538.         }
  539.         .sessions-scroll-btn:disabled {
  540.             opacity: 0.4;
  541.             cursor: not-allowed;
  542.             transform: none;
  543.         }
  544.         .sessions-rail {
  545.             flex: 1;
  546.             overflow-x: auto;
  547.             scroll-behavior: smooth;
  548.             scrollbar-width: none;
  549.             -ms-overflow-style: none;
  550.             cursor: grab;
  551.             border-radius: 20px;
  552.         }
  553.         .sessions-rail::-webkit-scrollbar {
  554.             display: none;
  555.         }
  556.         .sessions-rail:active {
  557.             cursor: grabbing;
  558.         }
  559.         .sessions-belt {
  560.             display: flex;
  561.             gap: 20px;
  562.             width: max-content;
  563.             padding: 10px 5px;
  564.         }
  565.         /* CARTE SESSION - TAILLE COMPACTE (comme sessions passées) */
  566.         .sessions-card {
  567.             width: 300px;
  568.             flex-shrink: 0;
  569.         }
  570.         /* Garder les styles existants de la carte */
  571.         .single-event-item {
  572.             background: #fff;
  573.             border-radius: 20px;
  574.             overflow: hidden;
  575.             box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  576.             transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  577.             height: 100%;
  578.             display: flex;
  579.             flex-direction: column;
  580.             border: 1px solid var(--border-light);
  581.         }
  582.         .single-event-item:hover {
  583.             transform: translateY(-5px);
  584.             box-shadow: 0 15px 30px rgba(31,57,113,0.15);
  585.         }
  586.         /* Image plus petite */
  587.         .single-event-image {
  588.             height: 180px;
  589.         }
  590.         /* Badge date plus petit */
  591.         .event-date-badge {
  592.             padding: 6px 14px;
  593.             min-width: 65px;
  594.             margin-bottom: 10px;
  595.         }
  596.         .event-date-badge .event-day {
  597.             font-size: 18px;
  598.         }
  599.         .event-date-badge .event-month {
  600.             font-size: 10px;
  601.         }
  602.         /* Corps de la carte - padding réduit */
  603.         .single-event-text {
  604.             padding: 0 15px 15px 15px;
  605.         }
  606.         .single-event-text h3 {
  607.             font-size: 16px;
  608.             margin-bottom: 8px;
  609.             min-height: auto;
  610.         }
  611.         .single-item-comment-view {
  612.             margin-bottom: 10px;
  613.             gap: 10px;
  614.         }
  615.         .single-item-comment-view span {
  616.             font-size: 11px;
  617.         }
  618.         .single-event-text > p {
  619.             font-size: 12px;
  620.             margin-bottom: 12px;
  621.             -webkit-line-clamp: 2;
  622.         }
  623.         .button-default {
  624.             padding: 8px 18px;
  625.             font-size: 12px;
  626.         }
  627.         /* Indicateur de progression */
  628.         .sessions-scroll-indicator {
  629.             display: flex;
  630.             justify-content: center;
  631.             margin-top: 20px;
  632.         }
  633.         .sessions-scroll-bar {
  634.             width: 60px;
  635.             height: 3px;
  636.             background: #e9ecef;
  637.             border-radius: 3px;
  638.             position: relative;
  639.             overflow: hidden;
  640.         }
  641.         .sessions-scroll-bar::after {
  642.             content: '';
  643.             position: absolute;
  644.             left: 0;
  645.             top: 0;
  646.             height: 100%;
  647.             width: 0%;
  648.             background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  649.             border-radius: 3px;
  650.             transition: width 0.3s ease;
  651.         }
  652.         /* Responsive */
  653.         @media (max-width: 1200px) {
  654.             .sessions-card { width: 290px; }
  655.         }
  656.         @media (max-width: 992px) {
  657.             .sessions-card { width: 280px; }
  658.         }
  659.         @media (max-width: 768px) {
  660.             .sessions-scroll-btn { width: 36px; height: 36px; font-size: 16px; }
  661.             .sessions-card { width: 260px; }
  662.             .sessions-belt { gap: 12px; }
  663.             .single-event-image { height: 160px; }
  664.             .single-event-text h3 { font-size: 15px; }
  665.         }
  666.         @media (max-width: 576px) {
  667.             .sessions-scroll-btn { width: 32px; height: 32px; font-size: 14px; }
  668.             .sessions-card { width: 240px; }
  669.             .single-event-image { height: 140px; }
  670.             .single-event-text h3 { font-size: 14px; }
  671.             .event-date-badge .event-day { font-size: 16px; }
  672.         }
  673.     </style>
  674.     <!-- BREADCRUMB AREA -->
  675.     <div class="breadcrumb-area">
  676.         <div class="container">
  677.             <div class="row">
  678.                 <div class="col-md-12">
  679.                     <div class="breadcrumb-title">
  680.                         <h1>Sessions de Formation</h1>
  681.                         <ul class="breadcrumb-list">
  682.                             <li><a href="{{ path('app_home') }}">Accueil</a></li>
  683.                             <li><i class="zmdi zmdi-chevron-right"></i></li>
  684.                             <li class="active">Sessions</li>
  685.                         </ul>
  686.                     </div>
  687.                 </div>
  688.             </div>
  689.         </div>
  690.     </div>
  691.     <!-- SEARCH CATEGORY FLOATING -->
  692.     <!-- COURSE AREA - PROCHAINES SESSIONS -->
  693.     <!-- COURSE AREA - PROCHAINES SESSIONS -->
  694.     <div class="course-area">
  695.         <div class="container">
  696.             <!-- PROCHAINES SESSIONS - SCROLLABLE HORIZONTAL -->
  697.             <div class="sessions-scroll-wrapper">
  698.                 <div class="section-title-wrapper">
  699.                     <div class="section-title">
  700.                         <h3>Prochaines Sessions</h3>
  701.                         <p>Rejoignez nos prochaines sessions de formation</p>
  702.                     </div>
  703.                 </div>
  704.                 {% if evenements is empty %}
  705.                     <div class="no-sessions-message">
  706.                         <div class="no-sessions-icon">
  707.                             <i class="zmdi zmdi-calendar-close"></i>
  708.                         </div>
  709.                         <h3>Aucune session à venir</h3>
  710.                         <p>De nouvelles sessions seront programmées prochainement. Revenez bientôt !</p>
  711.                     </div>
  712.                 {% else %}
  713.                     <div class="sessions-scroll-container">
  714.                         <!-- Bouton gauche -->
  715.                         <button class="sessions-scroll-btn sessions-scroll-left" id="sessionsScrollLeft">
  716.                             <i class="zmdi zmdi-chevron-left"></i>
  717.                         </button>
  718.                         <!-- Rail scrollable -->
  719.                         <div class="sessions-rail" id="sessionsRail">
  720.                             <div class="sessions-belt">
  721.                                 {% for evenement in evenements %}
  722.                                     <div class="sessions-card">
  723.                                         <div class="single-event-item">
  724.                                             <div class="single-event-image">
  725.                                                 <a href="{{ path('app_details_session', {'slug': evenement.slug}) }}">
  726.                                                     {% if evenement.image %}
  727.                                                         <img src="{{ asset('uploads/evenement/' ~ evenement.image) }}" alt="{{ evenement.titre }}">
  728.                                                     {% elseif evenement.formation %}
  729.                                                         <img src="{{ asset('uploads/formation/' ~ evenement.formation.affiche) }}" alt="{{ evenement.titre }}">
  730.                                                     {% else %}
  731.                                                         <img src="{{ asset('assets2/img/placeholder.jpg') }}" alt="Image par défaut">
  732.                                                     {% endif %}
  733.                                                 </a>
  734.                                             </div>
  735.                                             <!-- BADGE DATE SOUS L'IMAGE -->
  736.                                             <div class="event-date-badge">
  737.                                                 <span class="event-day">{{ evenement.starttime|date('d') }}</span>
  738.                                                 <span class="event-month">{{ evenement.starttime|date('M') }}</span>
  739.                                             </div>
  740.                                             <div class="single-event-text">
  741.                                                 <h3><a href="{{ path('app_details_session', {'slug': evenement.slug}) }}">{{ evenement.titre }}</a></h3>
  742.                                                 <div class="single-item-comment-view">
  743.                                                     <span><i class="zmdi zmdi-time"></i> {{ evenement.starttime|date('d/m H:i') }} - {{ evenement.endtime|date('d/m H:i') }}</span>
  744.                                                     <span><i class="zmdi zmdi-pin"></i> {{ evenement.adresse }}</span>
  745.                                                 </div>
  746.                                                 <p>
  747.                                                     {{ evenement.descriptionshort|striptags|slice(0, 200)|raw }}
  748.                                                     {% if evenement.descriptionshort|striptags|length > 200 %}...{% endif %}
  749.                                                 </p>
  750.                                                 <a class="button-default" href="{{ path('app_details_session', {'slug': evenement.slug}) }}">
  751.                                                     Voir les détails
  752.                                                     <i class="zmdi zmdi-arrow-right"></i>
  753.                                                 </a>
  754.                                             </div>
  755.                                         </div>
  756.                                     </div>
  757.                                 {% endfor %}
  758.                             </div>
  759.                         </div>
  760.                         <!-- Bouton droit -->
  761.                         <button class="sessions-scroll-btn sessions-scroll-right" id="sessionsScrollRight">
  762.                             <i class="zmdi zmdi-chevron-right"></i>
  763.                         </button>
  764.                     </div>
  765.                     <!-- Indicateur de progression -->
  766.                     <div class="sessions-scroll-indicator">
  767.                         <div class="sessions-scroll-bar"></div>
  768.                     </div>
  769.                 {% endif %}
  770.             </div>
  771.             <!-- ANCIENNES SESSIONS -->
  772.             <!-- ANCIENNES SESSIONS -->
  773.             <div class="row mt-5">
  774.                 <div class="col-md-12">
  775.                     <div class="section-title-wrapper">
  776.                         <div class="section-title">
  777.                             <h3>Sessions Passées</h3>
  778.                             <p>Consultez nos sessions déjà réalisées</p>
  779.                         </div>
  780.                     </div>
  781.                 </div>
  782.             </div>
  783.             <div class="row">
  784.                 {% if ancienevents is empty %}
  785.                     <div class="col-md-12">
  786.                         <div class="no-sessions-message">
  787.                             <div class="no-sessions-icon">
  788.                                 <i class="zmdi zmdi-history"></i>
  789.                             </div>
  790.                             <h3>Aucune session passée</h3>
  791.                             <p>Les sessions passées apparaîtront ici.</p>
  792.                         </div>
  793.                     </div>
  794.                 {% else %}
  795.                     {% for evenement in ancienevents %}
  796.                         <div class="col-lg-4 col-md-6 col-12 mb-4 d-flex">
  797.                             <div class="single-event-item w-100">
  798.                                 <div class="single-event-image">
  799.                                     <a href="{{ path('app_details_session', {'slug': evenement.slug}) }}">
  800.                                         {% if evenement.image %}
  801.                                             <img src="{{ asset('uploads/evenement/' ~ evenement.image) }}" alt="{{ evenement.titre }}">
  802.                                         {% elseif evenement.formation %}
  803.                                             <img src="{{ asset('uploads/formation/' ~ evenement.formation.affiche) }}" alt="{{ evenement.titre }}">
  804.                                         {% else %}
  805.                                             <img src="{{ asset('assets2/img/placeholder.jpg') }}" alt="Image par défaut">
  806.                                         {% endif %}
  807.                                     </a>
  808.                                 </div>
  809.                                 <!-- BADGE DATE POUR SESSIONS PASSÉES (STYLE GRIS) -->
  810.                                 <div class="event-date-badge past">
  811.                                     <span class="event-day">{{ evenement.starttime|date('d') }}</span>
  812.                                     <span class="event-month">{{ evenement.starttime|date('M') }}</span>
  813.                                 </div>
  814.                                 <div class="single-event-text">
  815.                                     <h3><a href="{{ path('app_details_session', {'slug': evenement.slug}) }}">{{ evenement.titre }}</a></h3>
  816.                                     <div class="single-item-comment-view">
  817.                                         <span><i class="zmdi zmdi-time"></i> {{ evenement.starttime|date('d/m H:i') }} - {{ evenement.endtime|date('d/m H:i') }}</span>
  818.                                         <span><i class="zmdi zmdi-pin"></i> {{ evenement.adresse }}</span>
  819.                                     </div>
  820.                                     <p>
  821.                                         {{ evenement.descriptionshort|striptags|slice(0, 200)|raw }}
  822.                                         {% if evenement.descriptionshort|striptags|length > 200 %}...{% endif %}
  823.                                     </p>
  824.                                     <a class="button-default" href="{{ path('app_details_session', {'slug': evenement.slug}) }}">
  825.                                         Voir les détails
  826.                                         <i class="zmdi zmdi-arrow-right"></i>
  827.                                     </a>
  828.                                 </div>
  829.                             </div>
  830.                         </div>
  831.                     {% endfor %}
  832.                 {% endif %}
  833.             </div>
  834.             <!-- PAGINATION POUR SESSIONS PASSÉES -->
  835.             {% if ancienevents is defined and ancienevents.pageCount > 1 %}
  836.                 <div class="row">
  837.                     <div class="col-12">
  838.                         <div class="pagination-wrapper">
  839.                             {{ knp_pagination_render(ancienevents, 'formation/custom_pagination.html.twig') }}
  840.                         </div>
  841.                     </div>
  842.                 </div>
  843.             {% endif %}
  844.         </div>
  845.     </div>
  846.     <script>
  847.         /* ============================================
  848.    SESSIONS - SCROLL HORIZONTAL
  849.    ============================================ */
  850.         (function() {
  851.             const container = document.getElementById('sessionsRail');
  852.             if (!container) return;
  853.             const leftBtn = document.getElementById('sessionsScrollLeft');
  854.             const rightBtn = document.getElementById('sessionsScrollRight');
  855.             const scrollBar = document.querySelector('.sessions-scroll-bar');
  856.             function getScrollAmount() {
  857.                 const firstCard = document.querySelector('.sessions-card');
  858.                 if (firstCard) {
  859.                     const cardWidth = firstCard.offsetWidth;
  860.                     const belt = document.querySelector('.sessions-belt');
  861.                     const gap = belt ? parseInt(getComputedStyle(belt).gap) || 25 : 25;
  862.                     return cardWidth + gap;
  863.                 }
  864.                 return 345;
  865.             }
  866.             function scrollLeft() {
  867.                 const amount = getScrollAmount();
  868.                 container.scrollBy({ left: -amount, behavior: 'smooth' });
  869.                 setTimeout(updateScrollBar, 350);
  870.                 setTimeout(checkButtons, 350);
  871.             }
  872.             function scrollRight() {
  873.                 const amount = getScrollAmount();
  874.                 container.scrollBy({ left: amount, behavior: 'smooth' });
  875.                 setTimeout(updateScrollBar, 350);
  876.                 setTimeout(checkButtons, 350);
  877.             }
  878.             function updateScrollBar() {
  879.                 if (!scrollBar) return;
  880.                 const maxScroll = container.scrollWidth - container.clientWidth;
  881.                 const currentScroll = container.scrollLeft;
  882.                 if (maxScroll > 0) {
  883.                     const percentage = (currentScroll / maxScroll) * 100;
  884.                     scrollBar.style.setProperty('--scroll-width', percentage + '%');
  885.                     const afterElement = scrollBar.querySelector('::after');
  886.                     if (afterElement) afterElement.style.width = percentage + '%';
  887.                 }
  888.             }
  889.             function checkButtons() {
  890.                 if (!leftBtn || !rightBtn) return;
  891.                 const maxScroll = container.scrollWidth - container.clientWidth;
  892.                 const currentScroll = container.scrollLeft;
  893.                 leftBtn.disabled = currentScroll <= 10;
  894.                 leftBtn.style.opacity = currentScroll <= 10 ? '0.4' : '1';
  895.                 rightBtn.disabled = currentScroll >= maxScroll - 10;
  896.                 rightBtn.style.opacity = currentScroll >= maxScroll - 10 ? '0.4' : '1';
  897.             }
  898.             if (leftBtn) leftBtn.addEventListener('click', scrollLeft);
  899.             if (rightBtn) rightBtn.addEventListener('click', scrollRight);
  900.             // Drag to scroll
  901.             let isDown = false;
  902.             let startX;
  903.             let scrollLeftPos;
  904.             container.addEventListener('mousedown', (e) => {
  905.                 isDown = true;
  906.                 container.style.cursor = 'grabbing';
  907.                 startX = e.pageX - container.offsetLeft;
  908.                 scrollLeftPos = container.scrollLeft;
  909.             });
  910.             container.addEventListener('mouseleave', () => {
  911.                 isDown = false;
  912.                 container.style.cursor = 'grab';
  913.             });
  914.             container.addEventListener('mouseup', () => {
  915.                 isDown = false;
  916.                 container.style.cursor = 'grab';
  917.                 setTimeout(checkButtons, 100);
  918.             });
  919.             container.addEventListener('mousemove', (e) => {
  920.                 if (!isDown) return;
  921.                 e.preventDefault();
  922.                 const x = e.pageX - container.offsetLeft;
  923.                 const walk = (x - startX) * 1.5;
  924.                 container.scrollLeft = scrollLeftPos - walk;
  925.                 updateScrollBar();
  926.             });
  927.             container.addEventListener('scroll', () => {
  928.                 updateScrollBar();
  929.                 checkButtons();
  930.             });
  931.             window.addEventListener('resize', () => {
  932.                 setTimeout(() => {
  933.                     updateScrollBar();
  934.                     checkButtons();
  935.                 }, 200);
  936.             });
  937.             setTimeout(() => {
  938.                 updateScrollBar();
  939.                 checkButtons();
  940.             }, 500);
  941.         })();
  942.     </script>
  943. {% endblock %}