<style>
:root { --afi-green: #006E51; --afi-yellow: #F6D155; }
/* Card & Grid */
.result-card { background: #fff; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); overflow: hidden; margin-bottom: 30px; border: 1px solid #eee; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: #fdfdfd; border-bottom: 2px solid var(--afi-green); padding: 15px; text-align: center; }
.summary-box { padding: 10px; border-right: 1px solid #eee; }
.summary-box:last-child { border-right: none; }
.summary-box label { display: block; font-size: 10px; color: #888; text-transform: uppercase; font-weight: bold; margin-bottom: 3px; }
.summary-box span { font-weight: 800; color: #333; font-size: 13px; display: block; }
/* Container de l'image miniature */
.img-preview-container {
position: relative;
cursor: pointer;
border-radius: 12px;
overflow: hidden;
border: 2px solid #eee;
background: #f9f9f9;
height: 110px;
transition: all 0.3s ease;
}
.img-preview-container:hover { border-color: var(--afi-green); transform: translateY(-3px); }
.img-preview-container img { width: 100%; height: 100%; object-fit: cover; }
.img-overlay-icon {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0, 110, 81, 0.2); display: flex; align-items: center; justify-content: center;
opacity: 0; transition: 0.3s; color: white; font-size: 20px;
}
.img-preview-container:hover .img-overlay-icon { opacity: 1; }
/* LIGHTBOX CSS (Le Preview) */
.afi-lightbox {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.85);
backdrop-filter: blur(5px); /* Flou d'arrière-plan */
display: none; z-index: 10000;
align-items: center; justify-content: center;
padding: 20px;
}
.afi-lightbox:target { display: flex; animation: fadeIn 0.3s ease; }
.afi-lightbox img {
max-width: 95%; max-height: 85vh;
border-radius: 10px;
box-shadow: 0 0 30px rgba(0,0,0,0.5);
border: 3px solid white;
}
.close-lightbox {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
cursor: default;
}
.close-btn-icon {
position: absolute; top: 20px; right: 20px;
width: 45px; height: 45px; background: white; color: black;
border-radius: 50%; display: flex; align-items: center; justify-content: center;
font-size: 24px; text-decoration: none; font-weight: bold; z-index: 10001;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Détails Colis */
.goods-box { background: #fff; border: 1px solid #efefef; border-radius: 15px; padding: 15px; margin-bottom: 15px; border-left: 4px solid var(--afi-yellow); }
.location-badge { background: #fff9e6; border: 1px solid #f6d155; border-radius: 10px; padding: 10px; margin-top: 10px; text-align: center; }
</style>
{% if recept is not empty %}
{% for reception in recept|reverse %}
{% set pathBase = "https://a.afisarl.com/file/agents/reception/" ~ reception.dateOperation|date('d-m-Y') ~ "-" ~ reception.recunumero ~ "/" %}
{% set defaultImg = "https://a.afisarl.com/dist/images/defaultColis.png" %}
{{ include('tracking/_Tab.html.twig') }}
{% endfor %}
{% else %}
<div class="container mt-5">
<div class="text-center py-5 shadow-sm rounded-lg bg-white border-0" style="border-radius: 20px;">
<div class="mb-4">
<div class="d-inline-flex align-items-center justify-content-center bg-light rounded-circle" style="width: 100px; height: 100px;">
<i class="fas fa-search fa-3x text-muted"></i>
</div>
</div>
<h3 class="text-dark font-weight-bold mb-2">NO RECORDS FOUND</h3>
<p class="text-muted mx-auto mb-4" style="max-width: 450px;">
We couldn't find any cargo tracking information for this customer code.
Please verify the code or check back later once the warehouse has updated the system.
</p>
<div class="d-flex justify-content-center gap-3">
<button onclick="window.location.reload()" class="btn btn-outline-secondary px-4 mr-2">
<i class="fas fa-sync-alt mr-2"></i> Refresh
</button>
<a href="/" class="btn btn-warning px-4 font-weight-bold">
<i class="fas fa-home mr-2"></i> New Search
</a>
</div>
</div>
<p class="text-center mt-4 text-muted small">
<i class="fas fa-question-circle mr-1"></i> Need help? Contact our support at <strong>support@afisarl.com</strong>
</p>
</div>
{% endif %}