{% extends "layout.html.twig" %}
{% block title %}Accessoires 4x4 & Equipements Off Road {% endblock %}
{% block body %}
<!-- page content -->
<div class="right_col" role="main" style="padding-left : 0px;padding-right:0px !important;">
<!-- top tiles -->
<div class="row" style="margin-right:0px;">
{% if carrousel|length > 0 %}
<div id="carouselDesktop" class="carousel slide d-none d-md-block" data-ride="carousel">
<ol class="carousel-indicators">
{% for c in carrousel %}
<li data-target="#carouselDesktop" data-slide-to="{{ loop.index0 }}" class="{% if loop.index0 == 0 %}active{% endif %}"></li>
{% endfor %}
</ol>
<div class="carousel-inner">
{% for c in carrousel %}
<div class="carousel-item {% if loop.first %}active{% endif %}">
{% set lien = c.lien %}
{% if c.articles != "" %}
{% set articles_cible = c.articles|json_decode %}
{% if articles_cible is not empty and articles_cible|length > 0 %}
{% set lien = "/catalogue?" %}
{% for article in articles_cible %}
{% set lien = lien ~ 'p[]=' ~ article ~ '&' %}
{% endfor %}
{% set lien = lien|slice(0, -1) %}
{% endif %}
{% endif %}
{% if lien != "" %}
<a href="{{ lien }}">
{% endif %}
<img class="d-block w-100" src="/uploads/societe/carrousel/{{ c.url }}">
{% if lien != "" %}
</a>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if carrouselMobile|length > 0 %}
<div id="carouselMobile" class="carousel slide d-md-none" data-ride="carousel">
<ol class="carousel-indicators">
{% for c in carrouselMobile %}
<li data-target="#carouselMobile" data-slide-to="{{ loop.index0 }}" class="{% if loop.index0 == 0 %}active{% endif %}"></li>
{% endfor %}
</ol>
<div class="carousel-inner">
{% for c in carrouselMobile %}
<div class="carousel-item {% if loop.first %}active{% endif %}">
{% set lien = c.lien %}
{% if c.articles != "" %}
{% set articles_cible = c.articles|json_decode %}
{% if articles_cible is not empty and articles_cible|length > 0 %}
{% set lien = "/catalogue?" %}
{% for article in articles_cible %}
{% set lien = lien ~ 'p[]=' ~ article ~ '&' %}
{% endfor %}
{% set lien = lien|slice(0, -1) %}
{% endif %}
{% endif %}
{% if lien != "" %}
<a href="{{ lien }}">
{% endif %}
<img class="d-block w-100" src="/uploads/societe/carrousel/{{ c.url }}">
{% if lien != "" %}
</a>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{#
<div class="row" style="margin-right:0px;">
{% if 1==1 and carrousel|length > 0 %}
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
{% for c in carrousel %}
<li data-target="#carouselExampleIndicators" data-slide-to="{{ loop.index0 }}" class="{% if loop.index0 == 0 %}active{% endif %}"></li>
{% endfor %}
</ol>
<div class="carousel-inner" role="listbox">
{% for c in carrousel %}
<div class="carousel-item {% if loop.index0 == 0 %}active{% endif %}">
{% if c.lien != "" %}
<a href="{{ c.lien }}">
{% endif %}
<img class="d-block img-fluid w-100" src="/uploads/societe/carrousel/{{ c.url }}">
{% if c.lien != "" %}
</a>>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>#}
<style>
/* Conteneur principal */
.layout-row {
display: flex;
flex-wrap: nowrap; /* par défaut sur desktop : tout sur une ligne */
gap: 22px; /* espace entre les éléments */
padding: 22px;
box-sizing: border-box;
width: 100%;
padding-right:0px;
}
/* Carrés génériques */
.card-item {
display: flex;
justify-content: center;
align-items: center;
height: 150px;
background-color: #4c4c4c;
border: none;
flex-shrink: 0;
}
/* Largeur des 3 carrés (50% divisé par 3 - gap) */
.card1, .card2, .card3 {
flex: 0 0 calc((50% - 2 * 22px)/3);
}
/* Rectangle : prend 50% restant */
.card-rectangle {
flex: 0 0 calc(50% - 22px);
display: flex;
justify-content: center;
align-items: center;
background-color: #4c4c4c;
background-image: url('/images/operateur.png') !important;
background-size: cover;
background-position: top;
background-repeat: no-repeat;
}
/* Texte interne */
.card-content {
display: block;
text-align: center;
color: #fbb911;
font-weight: bold;
font-size: 16px;
line-height: 1.2;
}
.card-content a {
color: #fbb911 !important;
text-decoration: none;
cursor: pointer;
}
.highlight {
font-size: 1.6em;
color: #fbb911;
}
.highlight-white {
color: white;
}
/* Ligne de contact pour la carte 3 */
.contact-line {
width: 90%;
text-align: center;
margin: 2px 0;
}
/* Responsive mobile */
@media (max-width: 767px) {
.layout-row {
flex-wrap: wrap; /* autorise le retour à la ligne */
padding: 0; /* supprime le padding sur mobile */
gap: 10px; /* gap réduit pour éviter débordement */
margin-top:10px;
margin-bottom:10px;
}
/* Carré1 et carré2 côte à côte */
.card1, .card2 {
flex: 0 0 calc(50% - 5px); /* 50% moins la moitié du gap */
max-width: calc(50% - 5px);
}
/* Carré3 et rectangle empilés */
.card3, .card-rectangle {
flex: 0 0 100%;
max-width: 100%;
}
.card-rectangle {
flex: 0 0 100%;
max-width: 100%;
box-sizing: border-box; /* inclut le padding/gap dans la largeur */
height: 150px; /* même hauteur que les autres cartes */
display: block; /* assure que le div est visible */
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.right_col {
padding-left : 0px !important;
}
}
</style>
<div class="layout-row">
<!-- Carré 1 -->
<div class="card-item card1">
<div class="card-content">
références<br/>
<span class="highlight">870 000</span><br/>
dont <span class="highlight-white">95 000</span> en stock
</div>
</div>
<!-- Carré 2 -->
<div class="card-item card2">
<div class="card-content">
magasin<br/>
<span class="highlight">7500 M2</span><br/>
de <span class="highlight-white">surface</span>
</div>
</div>
<!-- Carré 3 -->
<div class="card-item card3">
<div class="card-content">
<span class="highlight-white">Une question ?</span><br/>
<span class="highlight"><a href="tel:+33475851048" style="color:#fbb911;">04 75 85 10 48</a></span><br/>
<a href="#" style="color:#fbb911;">contact@outback-import.fr</a>
</div>
</div>
<!-- Rectangle -->
<div class="card-rectangle">
<div class="rectangle-content">
<!-- Ici tu peux mettre image ou deux sous-éléments collés -->
</div>
</div>
</div>
<div class="row" style="padding-left:10px;margin-right:0px;">
<div class="col-lg-12" style="padding-top:15px;background:#e5e5e5;border: 0px solid #f1f4f6;border-radius: 0px;">
<ul class="stats-overview" style="border-bottom:0px;margin-bottom:0px;padding-left:0px;">
<li class="dark">
<i class=" fa fa-credit-card" style="font-size :2em;"></i>
<div style="margin-top:5px;text-transform:uppercase;" class="">Paiements sécurisés</div>
</li>
<li class="dark">
<i class=" fa fa-gears" style="font-size :2em;"></i>
<div style="margin-top:5px;text-transform:uppercase;" class="">Garanties 2 ans</div>
</li>
<li class="dark">
<i class=" fa fa-truck" style="font-size :2em;"></i>
<div style="margin-top:5px;text-transform:uppercase;" class="">Livraison rapide</div>
</li>
</ul>
</div>
</div>
<div class="row" style="margin-top:15px;padding-left:10px;margin-left:0px;padding-right:20px;background:white;margin-right:0px;">
<div class="col-lg-7 " style="padding-left:0px;">
<div class="container _x_panel recherche_catalogue" style="margin-top:15px;">
<!-- Titre global du formulaire -->
<h2 class="off form-title dark" >Recherche de pièces</h2>
<script src="{{ asset('js_ep/moteur_recherche_article.js') }}"></script>
<script>
$(document).ready(function(){
{% if parametres.mv is defined and parametres.mv != "" and parametres.mv != "0" %}
var initialData = { id: {{parametres.mv}}, text: "{{parametres.mv_l}}", libelle: "{{parametres.mv_l}}" };
{% else %}
var initialData = { id: 0, text: "Marque", text: "Marque" };
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectMarqueVehicule.append(option).trigger('change');
{% if parametres.mov is defined and parametres.mov != "" and parametres.mov != "0" %}
var initialData = { id: {{parametres.mov}}, text: "{{parametres.mov_l}}" };
{% else %}
var initialData = { id: 0, text: "Modèle"};
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectModeleVehicule.append(option).trigger('change');
{% if parametres.tv is defined and parametres.tv != "" and parametres.tv != "0" %}
var initialData = { id: {{parametres.tv}}, text: "{{parametres.tv_l}}" };
{% else %}
var initialData = { id: 0, text: "Type"};
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectTypeVehicule.append(option).trigger('change');
{% if parametres.m is defined and parametres.m != "" and parametres.m != "0" %}
var initialData = { id: {{parametres.m}}, text: "{{parametres.m_l}}" };
{% else %}
var initialData = { id: 0, text: "Marque" };
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectMarqueArticle.append(option).trigger('change');
{% if parametres.c is defined and parametres.c != "" and parametres.c != "0" %}
var initialData = { id: {{parametres.c}}, text: "{{parametres.c_l}}" };
{% else %}
var initialData = { id: 0, text: "Catégorie" };
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectCategorieArticle.append(option).trigger('change');
{% if parametres.cn2 is defined and parametres.cn2 != "" and parametres.cn2 != "0" %}
var initialData = { id: {{parametres.cn2}}, text: "{{parametres.cn2_l}}" };
{% else %}
var initialData = { id: 0, text: "Catégorie N2" };
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectCategorieArticleN2.append(option).trigger('change');
{% if parametres.cn3 is defined and parametres.cn3 != "" and parametres.cn3 != "0" %}
var initialData = { id: {{parametres.cn3}}, text: "{{parametres.cn3_l}}" };
{% else %}
var initialData = { id: 0, text: "Catégorie N3" };
{% endif %}
var option = new Option(initialData.text, initialData.id, true, true);
$selectCategorieArticleN3.append(option).trigger('change');
});
</script>
<form action="/catalogue" id="searchForm" method="GET" style="padding-bottom:20px;">
<div class="form-container" style="margin-top:0px;">
<!-- Colonne gauche -->
<div class="form-column" style="padding:0;">
<div class="_off column-title"><i class="fa fa-car"></i> Véhicule</div>
<div class="form-group">
{# <label for="marque">Marque</label> #}
<input type="hidden" id="mv_l" name="mv_l" value="{% if parametres.mv_l is defined and parametres.mv_l != "" %}{{ parametres.mv_l }}{% endif %}">
<select id="dtc_marque_vehicule_select2" class="form-control" name="mv"></select>
</div>
<div class="form-group">
{# <label for="modele">Modèle</label> #}
<input type="hidden" id="mov_l" name="mov_l" value="{% if parametres.mv_l is defined and parametres.mv_l != "" %}{{ parametres.mv_l }}{% endif %}">
<select class="form-control" id="dtc_modele_vehicule_select2" name="mov"></select>
</div>
<div class="form-group">
{# <label for="type">Type</label> #}
<input type="hidden" id="tv_l" name="tv_l" value="{% if parametres.tv_l is defined and parametres.tv_l != "" %}{{ parametres.tv_l }}{% endif %}">
<select class="form-control" id="dtc_type_vehicule_select2" name="tv"></select>
</div>
{#
<div class="masquer_mobile animated flipInY orange" style="width:auto;margin-top:0px;">
<div class="tile-stats" style="margin-bottom:9px;padding:10px;padding-top:5px;padding-bottom:5px;background:#F7F7F7;padding-left :5px;">
<div class="gauche" style="">
<i style="font-size:3em;padding-right:10px;" class=" fa fa-dropbox"></i>
</div>
<div class="gauche text-left" style="padding-left:10px;padding-right:5px;line-height:1.25em;display:contents;">
<div style="font-size:0.97em;padding-top:3px;" class="dark">Plus de 870 000 produits référencés dont plus de 95 000 en stock.</div>
</div>
</div>
</div>
#}
<div class="_off column-title"><i class="fa fa-bars"></i> Catégories</div>
<div class="form-group">
{#<label for="cat1">Catégorie</label>#}
<input type="hidden" id="c_l" name="c_l" value="{% if parametres.c_l is defined and parametres.c_l != "" %}{{ parametres.c_l }}{% endif %}">
<select class="form-control" id="dtc_categorie_article_n1_select2" name="c"></select>
</div>
<div class="form-group">
{#<label for="cat2">Catégorie N2</label>#}
<input type="hidden" id="cn2_l" name="cn2_l" value="{% if parametres.cn2_l is defined and parametres.cn2_l != "" %}{{ parametres.cn2_l }}{% endif %}">
<select class="form-control" id="dtc_categorie_article_n2_select2" name="cn2"></select>
</div>
<div class="form-group">
{#<label for="cat3">Catégorie N3</label>#}
<input type="hidden" id="cn3_l" name="cn3_l" value="{% if parametres.cn3_l is defined and parametres.cn3_l != "" %}{{ parametres.cn3_l }}{% endif %}">
<select class="form-control" id="dtc_categorie_article_n3_select2" name="cn3"></select>
</div>
</div>
<!-- Séparateur vertical -->
<div class="separator"></div>
<!-- Colonne droite -->
<div class="form-column" style="padding:0; display:flex; flex-direction:column;">
<div class="form-group">
<div class="_off column-title"><i class="fa fa-star"></i> Marque</div>
{# <label for="modele">Marque</label> #}
<input type="hidden" id="m_l" name="m_l" value="{% if parametres.m_l is defined and parametres.m_l != "" %}{{ parametres.m_l }}{% endif %}">
<select class="form-control" id="dtc_marque_article_select2" name="m"></select>
</div>
<div class="_off column-title"><i class="fa fa-cubes"></i> Stock</div>
<div class="form-group row" style="margin-bottom:0px;">
<div class="col-md-12 col-sm-12">
<label>
<input type="checkbox" name="st" value="1" class="js-switch" /> En stock uniquement
</label>
</div>
</div>
<div class="form-group">
<div class="_off column-title"><i class="fa fa-search"></i> Recherche </div>
{# <label for="keywords">Recherche <i class="fa fa-search"></i></label>#}
<input type="text" class="form-control" name="mc" placeholder="Entrez un mot clé">
</div>
<div class="btn-recherche-catalogue-reponsive btn-container" style="margin-top:auto;margin-bottom:15px;">
<button style="width:100%;margin-left:0px;" type="submit" class="btn btn-success"><i class="fa fa-search"></i> Lancer la recherche </button>
</div>
</div>
</div>
</form>
</div>
</div>
<style>
.logo_img_nb {
/* largeur max de l'image */
max-height: 65px;
margin-right: 10px;
/* espace en bas pour quand elles passent à la ligne */
}
.parent_logo_nb {
display: flex;
align-items: center; /* centre verticalement le contenu */
justify-content: center;
padding-top: 0px;
padding-left: 0;
padding-right: 0;
}
.images-wrapper {
display: flex;
flex-wrap: wrap; /* permet aux images de passer à la ligne */
justify-content: center; /* centre les images horizontalement */
gap: 5px; /* espace entre les images */
}
</style>
<div class="parent_logo_nb col-lg-5 _text-center" style="padding-left:0px;padding-right:0px;padding-top:10px;">
<div class="images-wrapper">
{% if logosMarque|length > 0 %}
{% for l in logosMarque %}
{% if l.logoNb != "" %}
<img class="logo_img_nb" style="" src="{{ asset('/uploads/logos/marques-nb/' ~ l.id ~ '/' ~ l.logoNb) | imagine_filter('H400x300') }}" alt="{{ l.libelle }}" title="{{ l.libelle }}">
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% set articles_plus = [] %}
{% if app.user.client.id is defined %}
{% set articles_plus = dtc_article.findRandomArticles(6,cat_produit_home,app.user.client.id) %}
{% else %}
{% set articles_plus = dtc_article.findRandomArticles(6,cat_produit_home,NULL) %}
{% endif %}
{% if articles_plus|length > 0 %}
<div class="row justify-content-center" style="margin-top:15px;padding-left:10px;margin-right:0px;">
{% for p in articles_plus %}
<div class="col-lg-2 col-md-2 mb-3 col-6">
<div class="card suggestion-card">
{% set slug = dtc_article.getslugifArticle(p.id) %}
<a href="{{ path("dtc_article_afficher" , { 'id': p.id,'slug':slug }) }}">
{% set images = dtc_image_article.getImageDefaut(p.id) %}
{% if images[0] is defined %}
{# <img style="max-width:100%;" src="{{ asset(images[0].getUploadDir ~ '/' ~ p.id ~ '/' ~ images[0].url) | imagine_filter('400x300') }}" class="suggestion-img">#}
<img style="max-width:100%;" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}" class="suggestion-img">
{% else %}
<img style="max-width:100%;" src="{{ asset('images/defaut-img-product.jpg') }}" class="suggestion-img">
{% endif %}
</a>
<div class="p-2 text-center">
<div class="product-ref"><a href="{{ path("dtc_article_afficher" , { 'id': p.id,'slug':slug }) }}">Réf: {{ p.reference }}</a></div>
<strong> <a class="no-transform-text" href="{{ path("dtc_article_afficher" , { 'id': p.id,'slug':slug }) }}">{{ p.libelle }}</a></strong>
{% set remise = NULL %}
{% if app.user.id is defined and app.user.client.id is defined %}
{% set remise = dtc_article.getRemisesPossibleArticleClient({'article':p.id},app.user.client) %}
{% endif %}
{% if remise.remiseId is defined and remise.remiseId > 0 %}
<div style="margin-bottom:10px;">
<div>
<span class="old-price" style="font-size:1.2em;"><b>{{ p.prix_vente|price|raw }} €<span class="price-ttc">HT</span></b></span>
</div>
<div style="margin-top:5px;">
<div class="discount" style="font-size:0.9em;display:inline;">Remise pro -{{ remise.valeur }}%</div>
</div>
<div style="margin-top:5px;">
<span class=" new-price" style="font-size:1.2em;"><span style="font-size:1.4em;">{{ remise.prixRemise|price|raw }} €<span class="price-ttc">HT</span></span></span>
<div class="both"></div>
</div>
</div>
<div class="both"></div>
{% else %}
{% if app.user.id is defined %}
<p class="mb-0">{{ p.prix_vente|price|raw }} € HT</p>
{% else %}
{% set prix_ttc = dtc_article.getPrixVenteTtc(p.id) %}
<p class="mb-0">{{ prix_ttc|price|raw }} € TTC</p>
{% endif %}
{% endif %}
<div style="margin-top:10px;">
{% if app.user.id is defined %}
<button data-id="{{ p.id }}" style="" class="btn-ajouter-panier btn btn-success btn-sm"><span class="fa fa-shopping-cart"></span> Ajouter</button>
{% else %}
<a href="/login" class="btn btn-success btn-sm"><span class="fa fa-shopping-cart"></span> Ajouter</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
<!-- /page content -->
{% endblock %}