/* --- VARIABLES DE DESIGN --- */
:root {
    --primary-color: #0d2c54; /* Bleu corporate/industriel */
    --secondary-color: #c91818; /* Rouge dynamique MAN */
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-muted: #6c757d;
}

/* --- STYLES GENERAUX --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Support de la direction Arabe (RTL) */
[dir="rtl"] {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Bouton Switch de Langue Flottant */
.lang-switch-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}
[dir="rtl"] .lang-switch-container {
    right: auto;
    left: 20px;
}
.btn-lang {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid white;
    padding: 10px 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-lang:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    color: var(--primary-color);
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(13, 44, 84, 0.65), rgba(26, 26, 26, 0.75)), 
                url('image2.png') no-repeat center center/cover;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #e0e0e0;
}

.hero-phones {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.hero-phone-link {
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;

        direction: ltr;
unicode-bidi: isolate;
}

.hero-phone-link i {
    color: #26de81;
}

.hero-phone-link:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #a01212;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* --- A PROPOS --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #4a4a4a;
}

.about-img img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- SERVICES --- */
.services {
    background-color: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--light-color);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-top-color: var(--secondary-color);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* --- SECTION FORMULAIRE --- */
.lead-form-section {
    background-color: #ffffff;
}

.form-container-box {
    max-width: 750px;
    margin: 0 auto;
    background: var(--light-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Bordure dynamique selon la direction */
[dir="ltr"] .form-container-box { border-left: 5px solid var(--secondary-color); }
[dir="rtl"] .form-container-box { border-right: 5px solid var(--secondary-color); }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- LISTE DES CAMIONS AVEC CASES À COCHER ESTHÉTIQUES --- */
.trucks-list {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
}

.truck-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.truck-item:last-child {
    border-bottom: none;
}

.truck-name-label {
    font-weight: 500;
    color: var(--dark-color);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Style de la case décorative */
.truck-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-wrapper span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: bold;
}

.truck-item input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

/* --- STEPPER DE QUANTITE (+/-) --- */
.qty-stepper {
    display: flex;
    align-items: stretch;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.qty-stepper .qty-btn {
    width: 32px;
    background: var(--light-color);
    color: var(--primary-color);
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-stepper .qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.qty-stepper .qty-minus {
    border-right: 1px solid #ccc;
}
[dir="rtl"] .qty-stepper .qty-minus {
    border-right: none;
    border-left: 1px solid #ccc;
}

.qty-stepper .qty-plus {
    border-left: 1px solid #ccc;
}
[dir="rtl"] .qty-stepper .qty-plus {
    border-left: none;
    border-right: 1px solid #ccc;
}

.qty-stepper input[type="text"] {
    width: 46px;
    border: none;
    border-radius: 0;
    text-align: center;
    font-weight: bold;
    padding: 8px 4px;
}

.qty-stepper input[type="text"]:focus {
    outline: none;
}

/* --- AUTOCOMPLETION EMAIL --- */
.email-autocomplete-wrapper {
    position: relative;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.field-warning {
    color: var(--secondary-color);
    font-weight: 500;
}

.field-warning button {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    direction: ltr;
    display: inline;
    unicode-bidi: isolate;
}

.field-warning button:hover {
    color: var(--secondary-color);
}

.email-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.email-suggestions.active {
    display: block;
}

.email-suggestions li {
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    direction: ltr;
    text-align: left;
}

.email-suggestions li:hover,
.email-suggestions li.active-suggestion {
    background: var(--light-color);
    color: var(--primary-color);
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

/* --- CONTACT & COORDONNEES --- */
.contact-info-section {
    background-color: var(--light-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
        direction: ltr;
unicode-bidi: isolate;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.contact-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
    background: rgba(201, 24, 24, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
}

.contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.contact-card p, .contact-card a {
    color: #4a4a4a;
    text-decoration: none;
    font-size: 1.1rem;
}

.contact-card a:hover {
    color: var(--secondary-color);
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 25px 0;
    font-size: 0.9rem;
}

footer p a {
    color: #e0e0e0;
    text-decoration: underline;
    margin: 0 10px;
    transition: color 0.3s;
}

footer p a:hover {
    color: var(--secondary-color);
}

/* --- MODALES (CGV ET GUIDE) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
}

[dir="ltr"] .modal-content { text-align: left; }
[dir="rtl"] .modal-content { text-align: right; }

.modal-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.modal-content h4 {
    color: var(--primary-color);
    margin: 25px 0 10px 0;
    font-size: 1.3rem;
    text-transform: uppercase;
    border-left: 4px solid var(--secondary-color);
    padding-left: 10px;
}
[dir="rtl"] .modal-content h4 {
    border-left: none;
    border-right: 4px solid var(--secondary-color);
    padding-left: 0;
    padding-right: 10px;
}

.modal-content h5 {
    color: var(--primary-color);
    margin: 15px 0 5px 0;
    font-size: 1.1rem;
}

.modal-content p, .modal-content ul {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
}

.modal-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}
[dir="rtl"] .modal-content ul {
    padding-left: 0;
    padding-right: 20px;
}

.modal-content ul li {
    margin-bottom: 5px;
}

.close-modal {
    position: absolute;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
[dir="ltr"] .close-modal { right: 25px; }
[dir="rtl"] .close-modal { left: 25px; }

.close-modal:hover {
    color: var(--secondary-color);
}

/* Tableaux du Guide */
.modal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}
.modal-table th, .modal-table td {
    border: 1px solid #ddd;
    padding: 10px;
}
.modal-table th {
    background-color: var(--primary-color);
    color: white;
}

/* --- MODALE RECAPITULATIF --- */
.recap-content {
    max-width: 650px;
}

.recap-intro {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.recap-body {
    background: var(--light-color);
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 15px;
}

.recap-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.recap-row:last-child {
    border-bottom: none;
}

.recap-row-block {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.recap-label {
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

.recap-row-block .recap-label {
    white-space: normal;
}

.recap-value {
    color: #333;
    text-align: right;
    word-break: break-word;
}
[dir="rtl"] .recap-value {
    text-align: left;
}

.recap-comment {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin: 0;
    text-align: left;
    color: #333;
    min-height: 20px;
}
[dir="rtl"] .recap-comment {
    text-align: right;
}

.recap-trucks-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recap-trucks-list li {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.recap-trucks-list li:last-child {
    margin-bottom: 0;
}

.recap-trucks-list li strong {
    color: var(--primary-color);
}

.recap-status {
    text-align: center;
    font-weight: bold;
    min-height: 22px;
    margin-bottom: 10px;
}

.recap-status.status-sending {
    color: var(--text-muted);
}

.recap-status.status-success {
    color: #1e8e3e;
}

.recap-status.status-error {
    color: var(--secondary-color);
}

.recap-actions {
    display: flex;
    gap: 15px;
}

.btn-recap {
    flex: 1;
    padding: 14px;
    border-radius: 4px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-edit-recap {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-edit-recap:hover {
    background: var(--primary-color);
    color: white;
}

.btn-confirm-recap {
    background: var(--primary-color);
    color: white;
}

.btn-confirm-recap:hover {
    background: var(--secondary-color);
}

.btn-recap:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.3rem; }
    .hero-phones { flex-direction: column; align-items: center; gap: 15px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .container { width: 90%; }
    .form-container-box { padding: 25px; }
    .modal-content { width: 95%; margin: 10% auto; padding: 20px; }
    .recap-actions { flex-direction: column; }
    .recap-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .recap-value { text-align: left; }
    [dir="rtl"] .recap-value { text-align: right; }
}
