/* Variables CSS pour maintenir la cohérence */
:root {
    --primary-color: #00688a;
    --primary-dark: #004d66;
    --secondary-color: #ffffff;
    --background-color: #f4f4f4;
    --text-color: #333;
    --border-color: #e0e0e0;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

/* Reset et styles globaux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container principal pour les pages */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Header de la page */
.page-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}

.page-header h1 {
    color: #333;
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Section de contrôles */
.controls-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.date-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.form-group input[type="date"] {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Grille de checkboxes */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.checkbox-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.checkbox-item label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

/* Contrôles de sélection */
.selection-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.select-btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.select-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Variante centrée pour aligner les boutons au milieu */
.action-buttons.center {
    justify-content: center;
}

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.action-btn.secondary {
    background: #28a745;
    color: white;
}

.action-btn.secondary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* Cartes de traction */
.traction-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.traction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.traction-card.sent {
    border-left: 5px solid #dc3545;
    background: #fff5f5;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1em;
}

.traction-card.sent .card-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.card-content {
    padding: 20px;
}

/* Listes dans les cartes: aligner le texte sur le bord des titres */
.card-content ul {
    margin: 0 0 1rem 0;
    padding-left: 0;
    list-style-type: disc;
    list-style-position: inside;
}

.card-content li {
    margin: 0.25rem 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-row strong {
    color: #333;
    font-weight: 600;
    min-width: 150px;
}

.info-row span {
    color: #666;
    font-weight: 500;
}

/* Container d'image */
.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Formulaire d'email */
.email-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.email-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.email-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Bouton home */
.home-button-container {
    text-align: center;
    margin: 30px 0;
}

.home-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.home-btn.primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.home-btn.primary:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 25px rgba(0, 104, 138, 0.25);
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
    color: white;
    text-decoration: none;
}

/* Texte centré utilitaire */
.center-text {
    text-align: center;
}

/* Modal d'image */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

/* Modal controls */
.modal-controls {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 1001;
}

.rotate-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.rotate-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.rotate-btn:active {
    transform: translateY(0);
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #ccc;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Header moderne */
.modern-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f8f9fa 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 4000;
    border-bottom: 3px solid var(--primary-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-grow: 1;
    margin-left: 4rem;
}

.company-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    margin-left: auto;
}

.company-info h1 {
    color: var(--primary-color);
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    line-height: 1.2;
    padding-top: 0;
}

.company-info .subtitle {
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.3;
}

.seo-content {
    margin-top: 2rem;
    padding: 1.75rem 1.75rem 1.5rem;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.seo-content h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

.seo-content h3 {
    font-size: 1.1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.seo-content p {
    margin-bottom: 0.5rem;
}

.seo-content ul {
    margin: 0.25rem 0 0.5rem 1.25rem;
}

.seo-content li {
    margin: 0.15rem 0;
}

/* Hero banner au-dessus du container de page */
.hero {
    margin: 0 0 2rem;
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
    display: block;
    margin: 0;
    padding: 0;
}

.logo:hover {
    transform: scale(1.05);
}

/* Illustration réduite pour le bloc d’erreur */
.error-illustration {
    width: 250px;
    height: auto;
    display: block;
    margin: 8px auto 12px;
}

/* Spécifique à la page de recherche: limiter l'image d'erreur */
.search-page .error-illustration img {
    max-width: 250px;
    width: 100%;
    height: auto;
    display: block;
    margin: 8px auto 12px;
}

/* Centrer le contenu d'un container de page */
.page-container.center {
    text-align: center;
}

/* Navigation moderne */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

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

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
}

.quick-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Contenu principal */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

/* Variante large uniquement pour la page search (expéditeur) */
.search-page .main-content {
    max-width: 1400px;
}

/* Responsive ajuste pour la page search (expéditeur) */
@media screen and (max-width: 992px) {
    .search-page .main-content { max-width: 100%; }
    .search-page .filter-form { align-items: stretch; }
    .search-page .filter-inputs { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .search-page .filter-form .form-group { flex: 1 1 100%; width: 100%; margin: 0; }
    .search-page .filter-form .form-input[type="date"], .search-page .filter-form .form-input.short { width: 100%; }
    .search-page .filter-form .action-buttons { justify-content: center; width: 100%; }
}

/* Filtres sur une seule ligne pour la page search */
.search-page .filter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.search-page .filter-inputs {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.search-page .filter-form .form-group {
    flex: 0 0 auto;
    margin: 0;
}
.search-page .filter-form .form-input[type="date"] {
    width: 180px;
}
.search-page .filter-form .form-input.short {
    width: 180px;
}
.search-page .filter-form .action-buttons {
    flex: 0 0 auto;
    width: 100%;
}

.page-container {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* FAQ Accordion */
.faq-section .section-title {
    margin-top: 0;
}

.accordion {
    display: block;
}

.accordion-item {
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: #fff;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-toggle {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion-toggle::after {
    content: "+";
    font-weight: 700;
    color: var(--primary-dark);
}

.accordion-toggle[aria-expanded="true"]::after {
    content: "−";
}

.accordion-toggle:hover {
    background-color: #f9fafb;
}

.accordion-content {
    border-top: 1px solid #f0f0f0;
    padding: 0.75rem 1.25rem 1rem;
    color: #333;
}

.page-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Grille de boutons moderne */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.modern-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--secondary-color);
    border: none;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.modern-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modern-button:hover::before {
    left: 100%;
}

.modern-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.modern-button:active {
    transform: translateY(-1px);
}

/* Cards modernes */
.card {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Footer moderne */
.modern-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--secondary-color);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom a.footer-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.footer-bottom a.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.last-update {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--secondary-color);
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 1rem;
    }
    
    .main-navigation.mobile-open {
        display: flex;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .page-container {
        padding: 1.25rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 768px) {
    body { font-size: 0.93rem; }
    .card-content { font-size: 0.93rem; }
    .company-info h1 { font-size: 1.5rem; }
    .page-title { font-size: 1.7rem; }
    .section-title { font-size: 1.35rem; }
    .card { padding: 1.25rem; }
    .info-row { padding: 8px 0; }
    .info-row strong { min-width: 130px; }
    .rdv-highlight { font-size: 1.05rem; }
    .search-page .filter-form { flex-direction: column; align-items: stretch; gap: 0.75rem; flex-wrap: wrap; }
    .search-page .filter-form .form-group { flex: 1 1 100%; width: 100%; margin: 0; }
    .search-page .filter-form .form-input[type="date"], .search-page .filter-form .form-input.short { width: 100%; }
    .search-page .filter-form .action-buttons { justify-content: center; width: 100%; }
}

@media screen and (max-width: 480px) {
    .header-container { flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; }
    .logo-section { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
    
    .company-info { margin-left: 0; text-align: center; align-items: center; }
    .company-info h1 { font-size: 1.35rem; text-align: center; }
    
    .page-title { font-size: 1.25rem; }
    .logo { height: 52px; }
    .search-page .filter-form { gap: 0.5rem; }
}

@media screen and (max-width: 480px) {
    body { font-size: 0.9rem; }
    .card-content { font-size: 0.9rem; }
    .section-title { font-size: 1.15rem; }
    .rdv-highlight { font-size: 0.95rem; }
    .main-content { padding: 0 0.75rem; }
    .page-container { padding: 1rem; }
    .card { padding: 1rem; }
    .info-row { padding: 6px 0; }
    table.tracking-table td { font-size: 0.9rem; }
    table.tracking-table td::before { font-size: 0.8rem; }
}

/* Animations et effets */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Styles pour les formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 104, 138, 0.1);
}

.nps-scale {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
}
.nps-scale input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.nps-tick {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}
.nps-tick:hover {
    border-color: var(--primary-color);
    background: #f7faff;
}
.nps-scale input[type="radio"]:focus + .nps-tick {
    outline: 3px solid rgba(0, 104, 138, 0.15);
    outline-offset: 2px;
}
.nps-scale input[type="radio"]:checked + .nps-tick {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(0, 104, 138, 0.2);
}

@media screen and (max-width: 480px) {
    .nps-scale { gap: 4px; }
    .nps-tick { padding: 8px 0; font-size: 0.95rem; }
}

.nps-range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.nps-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #e74c3c 0%, #f1c40f 50%, #2ecc71 100%);
    border-radius: 6px;
    outline: none;
}
.nps-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}
.nps-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}
.nps-value {
    min-width: 38px;
    padding: 6px 10px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    background: #fff;
    color: #333;
    font-weight: 700;
    text-align: center;
}
.nps-bubble {
    position: absolute;
    top: -28px;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 4px 10px;
    font-weight: 700;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    pointer-events: none;
}
.nps-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}
.nps-ticks span {
    width: 26px;
    text-align: center;
}
.nps-ticks .tick-0 { color: #e74c3c; font-weight: 700; }
.nps-ticks .tick-5 { color: #f1c40f; font-weight: 600; }
.nps-ticks .tick-10 { color: #2ecc71; font-weight: 700; }

.nps-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: #666;
    font-size: 0.95rem;
}
.nps-legend .min { color: #e74c3c; font-weight: 600; }
.nps-legend .max { color: #2ecc71; font-weight: 700; }

/* Utilitaires */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* Encart RDV impactant */
.rdv-card {
    border-left: 5px solid var(--primary-color);
    background: #f0fbff; /* léger bleu clair */
}
.rdv-highlight {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 8px 0 16px;
}

/* Encarts paiement (CRT / Port dû) impactants */
.payment-card {
    border-left: 5px solid #ff9800; /* accent orange */
    background: #fff8e1; /* fond jaune clair */
}
.payment-highlight {
    font-size: 1.2rem;
    font-weight: 500;
    color: #d35400; /* texte orange foncé */
    margin: 8px 0 16px;
}
.info-icon {
    vertical-align: middle;
    font-size: 1.6rem;
    margin-right: 6px;
}

/* Styles pour les badges affréteur */
.expediteur-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.affreteur-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    transition: var(--transition);
}

.affreteur-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

/* --- Tracking timeline --- */
.tracking-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Bloc expéditeur/destinataire en tête des infos d’envoi */
.party-blocks {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 12px;
}
.party-blocks .expediteur-block,
.party-blocks .destinataire-block {
    flex: 1 1 0;
    max-width: 48%;
}
.party-blocks .destinataire-block { text-align: right; }
.expediteur-title, .destinataire-title {
    margin-bottom: 4px;
}
.expediteur-line, .destinataire-line {
    line-height: 1.4;
}

.step-item {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 0.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ccc;
    color: #999;
    font-weight: 700;
}

.step-icon .material-symbols-outlined {
    font-size: 28px;
    line-height: 1;
}

.step-item.done .step-icon {
    border-color: #2ecc71;
    color: #2ecc71;
}

.step-item.active {
    border-color: var(--primary-color);
}

.step-item.active .step-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* --- Summary grid --- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}

.summary-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.summary-item strong {
    display: inline-block;
    min-width: 160px;
}

/* Icône écologique pour le coût carbone */
.summary-item .eco-icon {
    color: #2e7d32; /* vert */
    font-size: 20px;
    vertical-align: middle;
    margin-left: 6px;
}
/* Renforce la spécificité pour éviter tout écrasement par d'autres règles */
.material-symbols-outlined.eco-icon {
    color: #2e7d32;
}

/* --- Carte OSM (Leaflet) --- */
.delivery-map {
    height: 360px;
    width: 100%;
    border-radius: 8px;
}
.leaflet-container {
    background: #f7faff; /* léger fond en cas d’absence de tuiles */
    position: relative;
}
.leaflet-material-icon .material-symbols-outlined {
    display: inline-block;
    line-height: 1;
}

/* --- Table responsive --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Icônes livraison dans le tableau de recherche */
.material-symbols-outlined.delivered-yes { color: #2e7d32; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.material-symbols-outlined.delivered-no  { color: #d32f2f; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

table.tracking-table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table.tracking-table th, table.tracking-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
}

table.tracking-table th {
    background: linear-gradient(180deg, #f7f8fa, #eef1f5);
    color: var(--text-color);
    font-weight: 600;
}

/* Zébrage et hover sur desktop */
table.tracking-table tbody tr:nth-child(even) td { background-color: #fbfcfe; }
table.tracking-table tbody tr:hover td { background-color: #f7faff; }

/* Centrer la colonne POD et styliser l’icône */
table.tracking-table td[data-label="POD"],
table.tracking-table th:last-child {
    text-align: center;
}
table.tracking-table .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
    vertical-align: middle;
    color: var(--primary-color);
}

@media screen and (max-width: 768px) {
    .tracking-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 600px) {
    /* Transform table rows into cards for mobile */
    table.tracking-table thead { display: none; }
    table.tracking-table, table.tracking-table tbody, table.tracking-table tr, table.tracking-table td { display: block; width: 100%; }
    table.tracking-table tr { margin-bottom: 1rem; border: 1px solid #eee; border-radius: 8px; box-shadow: var(--shadow); background: #fff; }
    table.tracking-table td { border: none; border-bottom: 1px solid #f0f0f0; padding: 0.6rem 0.9rem; }
    table.tracking-table td:last-child { border-bottom: none; }
    table.tracking-table td::before { content: attr(data-label); font-weight: 600; color: var(--primary-color); display: block; margin-bottom: 0.2rem; }
    /* Sur mobile, l’icône POD reste alignée et un peu plus grande */
    table.tracking-table .material-symbols-outlined {
        font-size: 22px;
    }
}

/* Rendre le tableau de recherche plus compact (police et espacements) */
.search-page table.tracking-table {
    font-size: 0.85rem;
}
.search-page table.tracking-table th,
.search-page table.tracking-table td {
    font-size: 0.85rem;
    line-height: 1.25;
    padding: 0.45rem 0.65rem;
}
.search-page table.tracking-table td::before {
    font-size: 0.78rem;
}
.search-page table.tracking-table .material-symbols-outlined {
    font-size: 18px;
}
.company-info {
    margin-left: auto;
    text-align: right;
    display: flex;
    align-items: center;
}
.company-info h1 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
}
.leaflet-top,
.leaflet-bottom,
.leaflet-control-container,
.leaflet-control-zoom,
.leaflet-control-attribution {
    z-index: 2000 !important;
}
