{% extends 'base.html.twig' %}
{% block title %}AFI Tracking{% endblock %}
{% block body %}
<style>
:root {
--primary: #006E51;
--primary-dark: #004d39;
--accent: #F6D155;
--bg: #f8fafc;
--text-muted: #64748b;
}
body {
background-color: var(--bg);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
/* Card principale */
.tracking-card {
background: #fff;
border-radius: 24px;
padding: 40px;
box-shadow: 0 20px 40px rgba(0,0,0,.06);
border: 1px solid rgba(0,0,0,.03);
transition: transform 0.3s ease;
}
/* Titres */
.search-title {
color: var(--primary);
font-size: 2.2rem;
font-weight: 800;
margin-bottom: 4px;
}
.brand-subtitle {
font-size: .75rem;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--text-muted);
margin-bottom: 35px;
display: block;
}
/* Champs de saisie */
.input-wrapper {
display: flex;
align-items: center;
height: 58px;
padding: 0 15px;
background: #f1f5f9;
border-radius: 16px;
border: 2px solid transparent;
transition: all .3s ease;
}
.input-wrapper:focus-within {
background: #fff;
border-color: var(--primary);
box-shadow: 0 0 0 4px rgba(0,110,81,.1);
}
.input-icon {
color: var(--primary);
opacity: .7;
margin-right: 12px;
font-size: 1.1rem;
}
.form-control-custom {
border: none;
background: transparent;
outline: none;
width: 100%;
font-weight: 500;
color: #1e293b;
font-size: 16px; /* Empêche le zoom auto sur iOS */
}
select.form-control-custom {
cursor: pointer;
}
/* Bouton de recherche */
.btn-search {
background: var(--primary);
color: #fff;
font-weight: 700;
border-radius: 14px;
padding: 0 28px;
height: 58px;
border: none;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
transition: all .3s ease;
cursor: pointer;
}
.btn-search:hover {
background: var(--primary-dark);
transform: translateY(-2px);
color: var(--accent);
box-shadow: 0 10px 20px rgba(0,110,81,0.2);
}
.btn-search:active {
transform: translateY(0);
}
/* Placeholder & Résultats */
.placeholder-view {
text-align: center;
padding: 50px 20px;
border-radius: 22px;
border: 2px dashed #e2e8f0;
background: rgba(255,255,255,.5);
}
.placeholder-icon {
width: 80px;
height: 80px;
line-height: 80px;
border-radius: 50%;
margin: 0 auto 20px;
background: #fff;
color: #cbd5e1;
font-size: 36px;
box-shadow: 0 10px 20px rgba(0,0,0,.04);
}
/* --- RESPONSIVE OPTIMISÉ --- */
@media (max-width: 768px) {
.container {
padding-left: 15px;
padding-right: 15px;
}
.py-5 {
padding-top: 2rem !important;
padding-bottom: 2rem !important;
}
.tracking-card {
padding: 25px 20px;
border-radius: 20px;
}
.search-title {
font-size: 1.6rem;
}
.brand-subtitle {
margin-bottom: 25px;
}
.input-wrapper {
height: 52px; /* Hauteur réduite pour gagner de la place */
border-radius: 12px;
}
.btn-search {
height: 54px;
width: 100%;
border-radius: 12px;
}
.placeholder-view {
padding: 30px 15px;
margin-top: 25px !important;
}
.placeholder-icon {
width: 60px;
height: 60px;
line-height: 60px;
font-size: 28px;
}
}
</style>
<div class="container py-5">
<div class="row justify-content-center">
<div class="col-xl-8 col-lg-10 col-12">
<div class="tracking-card text-center">
<h2 class="search-title">Track Your Goods</h2>
<span class="brand-subtitle">AFI Import Export Ltd</span>
<form id="formTrack"
action="{{ path('tracking_query') }}"
method="POST"
class="mt-2">
<div class="row g-3">
<div class="col-md-5 col-12">
<div class="input-wrapper">
<span class="input-icon"><i class="fa fa-tag"></i></span>
<select name="flagsearch" class="form-control-custom">
<option value="c" selected>Container / MCO</option>
<option value="p">Cargo Receipt</option>
<option value="n">Tracking Number</option>
<option value="cc">Customer Code</option>
</select>
</div>
</div>
<div class="col-md-7 col-12">
<div class="input-wrapper">
<span class="input-icon"><i class="fa fa-search"></i></span>
<input name="number"
type="text"
class="form-control-custom"
placeholder="Enter number..."
autocomplete="off"
required>
</div>
</div>
<div class="col-12">
<button onclick="sendAjaxFormCommun('#formTrack','.ldd','#infoTrack','','')"
type="submit"
class="btn btn-search w-100 ldd">
<i class="fa fa-paper-plane"></i> Track Shipment
</button>
</div>
</div>
</form>
</div>
<div id="infoTrack" class="mt-4">
<div class="placeholder-view">
<div class="placeholder-icon">
<i class="fa fa-map-marker-alt"></i>
</div>
<h4 class="fw-bold h5">Ready to Track?</h4>
<p class="text-muted mx-auto mb-0" style="max-width:380px; font-size: 0.9rem;">
Enter your shipment details above to get real-time updates on your cargo status.
</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}