/* Tarif Cheval Fiscal - CSS */

/* ===== COULEURS PASTEL ===== */
:root {
    --tcf-primary: #A8E6CF;      /* Vert menthe pastel */
    --tcf-secondary: #FFD3B6;    /* Pêche pastel */
    --tcf-accent: #FFAAA5;       /* Corail pastel */
    --tcf-light: #F8F9FA;        /* Gris très clair */
    --tcf-text: #2C3E50;         /* Bleu foncé doux */
    --tcf-border: #E1E8ED;       /* Bordure douce */
}

/* ===== GRILLE DÉPARTEMENTS ===== */
.tcf-dept-grid {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.tcf-dept-grid h3 {
    text-align: center;
    margin: 0 0 25px 0;
    font-size: 24px;
    color: var(--tcf-text);
    font-weight: 600;
}

.tcf-dept-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tcf-dept-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--tcf-primary);
}

.tcf-dept-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.tcf-dept-code {
    font-weight: bold;
    font-size: 18px;
    color: var(--tcf-text);
    margin-bottom: 5px;
}

.tcf-dept-name {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.tcf-dept-prix {
    font-size: 20px;
    font-weight: bold;
    color: var(--tcf-text);
    margin: 10px 0;
}

.tcf-dept-exo {
    font-size: 12px;
    color: #16a085;
    background: #d5f4e6;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.tcf-legend {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: var(--tcf-light);
    border-radius: 10px;
    border: 1px solid var(--tcf-border);
}

/* Carte */
.tcf-map-wrapper {
    max-width: 100%;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.map-instruction-text {
    color:#717b8e;
    text-align:center;
}

.tcf-map {
    border: 1px solid var(--tcf-border);
    border-radius: 10px;
    overflow: hidden;
}

.tcf-map-legend {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-radius: 10px;
    text-align: center;
}

.tcf-map-legend strong {
    color: var(--tcf-text);
    font-size: 16px;
    display: block;
    margin-bottom: 12px;
}

.tcf-legend-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

.tcf-legend-bar span {
    font-weight: 600;
    color: var(--tcf-text);
    font-size: 14px;
}

.tcf-gradient {
    width: 250px;
    height: 24px;
    background: linear-gradient(to right, #E3F2FD, #90CAF9, #42A5F5, #1976D2);
    border: 1px solid var(--tcf-border);
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Prix single */
.tcf-single-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--tcf-text);
    display: inline-block;
}

.tcf-single-update {
    font-size: 11px;
    color: #6c757d;
    margin-left: 8px;
    font-style: italic;
}

/* Tableau */
.tcf-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    -webkit-overflow-scrolling: touch; /* Scroll fluide sur mobile */
}

.tcf-table-wrapper h3 {
    color: var(--tcf-text);
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
}

.tcf-table {
    width: 100%;
    min-width: 600px; /* Assure un minimum pour éviter l'écrasement */
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.tcf-table th {
    background: #1E40AF; /* Bleu foncé */
    color: #ffffff; /* Texte blanc */
    padding: 14px;
    text-align: left;
    border-bottom: 2px solid var(--tcf-border);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer; /* Indique qu'on peut cliquer pour trier */
    user-select: none;
    position: relative;
}

.tcf-table th:hover {
    background: #1E3A8A; /* Légèrement plus foncé au survol */
}

.tcf-table th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 12px;
}

.tcf-table th.sorted-asc::after {
    content: ' ↑';
    opacity: 1;
}

.tcf-table th.sorted-desc::after {
    content: ' ↓';
    opacity: 1;
}

.tcf-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #495057;
}

.tcf-table tbody tr {
    transition: background-color 0.2s ease;
}

.tcf-table tbody tr:hover {
    background: #f8f9fa;
}

.tcf-table tbody tr:last-child td {
    border-bottom: none;
}
}

.tcf-update {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
}

.tcf-note {
    font-size: 11px;
    color: #6c757d;
    margin-top: 10px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .tcf-table {
        font-size: 13px;
    }
    
    .tcf-table th,
    .tcf-table td {
        padding: 10px 8px;
    }
}

/* ===== MOTEUR DE RECHERCHE ===== */
.tcf-search-wrapper {
    max-width: 600px;
    margin: 30px auto;
}

.tcf-search-box {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.tcf-search-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--tcf-text);
    margin-bottom: 15px;
}

.tcf-search-input-wrapper {
    position: relative;
}

.tcf-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #E1E8ED;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tcf-search-input:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.tcf-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #E1E8ED;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
}

.tcf-dropdown-item {
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

.tcf-dropdown-item:hover,
.tcf-dropdown-item.active {
    background: #F3F4F6;
}

.tcf-search-result {
    margin-top: 25px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tcf-result-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.tcf-result-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tcf-text);
    margin: 0 0 20px 0;
}

.tcf-result-region {
    font-size: 16px;
    font-weight: 400;
    color: #6c757d;
}

.tcf-result-prix {
    font-size: 42px;
    font-weight: 700;
    color: #1E40AF;
    margin: 20px 0;
}

.tcf-result-exo {
    margin: 15px 0;
}

.tcf-result-exo-badge {
    display: inline-block;
    background: #E0F2FE;
    color: #0369A1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.tcf-result-button {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 32px;
    background: #1E40AF;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tcf-result-button:hover {
    background: #1E3A8A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Responsive recherche */
@media (max-width: 768px) {
    .tcf-search-wrapper {
        margin: 20px 10px;
    }
    
    .tcf-search-box,
    .tcf-result-content {
        padding: 20px;
    }
    
    .tcf-result-prix {
        font-size: 32px;
    }
    
    .tcf-result-title {
        font-size: 20px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tcf-map {
        height: 400px !important;
    }
    
    .tcf-table {
        font-size: 14px;
    }
    
    .tcf-table th,
    .tcf-table td {
        padding: 8px;
    }
}
