/* ================================================================
   KTF — tarifs.css
   Page Nos Tarifs — charte KTF (bleu, rouge, orange, jaune)
   ================================================================ */

/* ── Barre de défilement lecture ── */
.trf-scroll-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--red), var(--orange), var(--yellow));
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Section principale ── */
.trf-section {
  padding: 4rem 0 5.5rem;
  background: var(--off);
}

/* ════════════════════════════════════════════════
   ONGLETS (Maritime / Aérien / Routier)
   ════════════════════════════════════════════════ */
.trf-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--g100);
  margin-bottom: 2.5rem;
  overflow-x: auto; scrollbar-width: none;
}
.trf-tabs::-webkit-scrollbar { display: none; }

.trf-tab {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.75rem;
  font-family: var(--fd); font-size: .88rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--g500);
  border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; background: none; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.trf-tab i { font-size: 1rem; }
.trf-tab:hover {
  color: var(--text);
  border-bottom-color: rgba(30,170,226,.3);
}

/* Onglet actif — couleur selon service */
.trf-tab.active[data-panel="trf-maritime"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: linear-gradient(to bottom, rgba(30,170,226,.06), transparent);
}
.trf-tab.active[data-panel="trf-aerien"] {
  color: var(--red);
  border-bottom-color: var(--red);
  background: linear-gradient(to bottom, rgba(217,58,43,.05), transparent);
}
.trf-tab.active[data-panel="trf-routier"] {
  color: var(--orange);
  border-bottom-color: var(--orange);
  background: linear-gradient(to bottom, rgba(240,120,40,.05), transparent);
}

/* Compteur dans l'onglet */
.trf-tab__count {
  font-size: .72rem; opacity: .6;
  font-weight: 600; font-family: var(--fs);
}

/* ════════════════════════════════════════════════
   MÉTA (badges nombre de tarifs / catégories)
   ════════════════════════════════════════════════ */
.trf-meta {
  display: flex; align-items: center; gap: .85rem;
  margin-bottom: 1.75rem; flex-wrap: wrap;
}
.trf-meta-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .9rem;
  border-radius: 20px;
  font-family: var(--fd); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
}
.trf-meta-badge--blue { background: rgba(30,170,226,.1); color: var(--blue-dk); }
.trf-meta-badge--grey { background: var(--g100); color: var(--g700); }

/* ════════════════════════════════════════════════
   LAYOUT : sidebar + contenu
   ════════════════════════════════════════════════ */
.trf-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════ */
.trf-sidebar {
  position: sticky;
  top: calc(82px + 1rem);   /* hauteur header KTF */
}
.trf-sidebar__title {
  font-family: var(--fd); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--g500); margin-bottom: .75rem; padding-left: .75rem;
}
.trf-sidebar__nav {
  list-style: none;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--white);
  border: 1px solid var(--g100);
  border-top: 3px solid var(--blue);
  border-radius: 0 0 var(--r2) var(--r2);
  overflow: hidden;
  padding: .4rem 0;
}
.trf-sidebar__nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .9rem;
  font-family: var(--fs); font-size: .84rem; font-weight: 500;
  color: var(--g700); text-decoration: none;
  border-left: 3px solid transparent;
  transition: all .18s var(--ease);
}
.trf-sidebar__nav a:hover {
  color: var(--blue);
  background: rgba(30,170,226,.06);
  border-left-color: rgba(30,170,226,.3);
  padding-left: 1.15rem;
}
.trf-sidebar__nav a.is-active {
  color: var(--blue); font-weight: 700;
  background: rgba(30,170,226,.08);
  border-left-color: var(--blue);
}

/* ════════════════════════════════════════════════
   PANNEAUX ONGLET
   ════════════════════════════════════════════════ */
.trf-panel { display: none; }
.trf-panel.active { display: block; }

/* ════════════════════════════════════════════════
   BLOC CATÉGORIE
   ════════════════════════════════════════════════ */
.trf-cat {
  margin-bottom: 1.75rem;
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: var(--sh-card);
  scroll-margin-top: calc(82px + 1.5rem);
}
.trf-cat:last-child { margin-bottom: 0; }

/* En-tête catégorie */
.trf-cat__head {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1.35rem;
  background: var(--dark);
  position: relative; overflow: hidden;
}
/* Trait coloré à gauche selon onglet */
.trf-panel[id="trf-maritime"] .trf-cat__head { background: var(--dark-2); }
.trf-panel[id="trf-maritime"] .trf-cat__head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.trf-panel[id="trf-aerien"]   .trf-cat__head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.trf-panel[id="trf-routier"]  .trf-cat__head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }

.trf-cat__icon {
  font-size: 1.25rem; line-height: 1; flex-shrink: 0;
}
.trf-cat__title {
  font-family: var(--fd); font-size: 1rem; font-weight: 700;
  color: var(--white); text-transform: uppercase; letter-spacing: .06em;
}
.trf-cat__count {
  margin-left: auto;
  font-family: var(--fs); font-size: .7rem; font-weight: 600;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.8);
  padding: .2rem .65rem; border-radius: 10px; white-space: nowrap;
}

/* ════════════════════════════════════════════════
   TABLEAU TARIFS
   ════════════════════════════════════════════════ */
.trf-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--g100); border-top: none;
  background: var(--white);
}
.trf-table thead th {
  padding: .65rem 1.35rem;
  font-family: var(--fd); font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--g500); background: var(--off);
  border-bottom: 1px solid var(--g100); text-align: left;
}
.trf-table thead th:last-child { text-align: right; }
.trf-table tbody tr {
  border-bottom: 1px solid var(--g100);
  transition: background .15s;
}
.trf-table tbody tr:last-child { border-bottom: none; }
.trf-table tbody tr:hover { background: rgba(30,170,226,.04); }
.trf-table tbody tr:nth-child(even) { background: var(--off); }
.trf-table tbody tr:nth-child(even):hover { background: rgba(30,170,226,.04); }
.trf-table td {
  padding: .85rem 1.35rem;
  font-family: var(--fs); font-size: .92rem;
  color: var(--text); vertical-align: middle; line-height: 1.5;
}
.trf-table td:last-child { text-align: right; white-space: nowrap; }

/* Prix */
.trf-price-wrap {
  display: inline-flex; align-items: baseline; gap: .25rem;
}
.trf-price {
  font-family: var(--fd); font-weight: 700; font-size: 1.1rem;
  color: var(--dark);
}
/* Couleur prix selon onglet */
.trf-panel[id="trf-maritime"] .trf-price { color: var(--blue-dk); }
.trf-panel[id="trf-aerien"]   .trf-price { color: var(--red-dk); }
.trf-panel[id="trf-routier"]  .trf-price { color: var(--orange-dk); }

.trf-unit {
  font-family: var(--fs); font-size: .72rem; font-weight: 600; color: var(--g500);
}

/* ════════════════════════════════════════════════
   ÉTAT VIDE
   ════════════════════════════════════════════════ */
.trf-empty {
  text-align: center; padding: 4rem 1.5rem;
  background: var(--white); border-radius: var(--r2);
  border: 1px solid var(--g100);
}
.trf-empty__icon {
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--g100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; margin: 0 auto 1.25rem;
}
.trf-empty h4 {
  font-family: var(--fd); font-size: 1.3rem; font-weight: 700;
  color: var(--dark); text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: .5rem;
}
.trf-empty p {
  font-family: var(--fs); font-size: .92rem; color: var(--g500);
  line-height: 1.7; margin-bottom: 1.5rem;
}

/* ════════════════════════════════════════════════
   NOTE TARIFAIRE (avertissement)
   ════════════════════════════════════════════════ */
.trf-note {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: 1.1rem 1.35rem;
  background: rgba(245,200,0,.08);
  border: 1px solid rgba(245,200,0,.3);
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--r2) var(--r2) 0;
  margin-bottom: 1.75rem;
}
.trf-note i { color: var(--yellow-dk); font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }
.trf-note p {
  font-family: var(--fs); font-size: .87rem; line-height: 1.65; color: var(--g700); margin: 0;
}
.trf-note p strong { color: var(--dark); }

/* ════════════════════════════════════════════════
   CTA FINALE
   ════════════════════════════════════════════════ */
.trf-cta {
  background: var(--dark-2); border-radius: var(--r3);
  padding: 2.5rem; margin-top: 3rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.trf-cta::before {
  content: '';
  position: absolute; right: -3rem; top: -3rem;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,170,226,.1) 0%, transparent 70%);
  pointer-events: none;
}
.trf-cta::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--red) 33%, var(--orange) 66%, var(--yellow) 100%);
}
.trf-cta__text { position: relative; z-index: 1; }
.trf-cta__text h3 {
  font-family: var(--fd); font-weight: 700;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--white); line-height: 1.1; margin-bottom: .45rem;
}
.trf-cta__text h3 em { font-style: italic; color: var(--blue-lt); }
.trf-cta__text p {
  font-family: var(--fs); font-size: .92rem; color: rgba(255,255,255,.55);
}
.trf-cta__actions {
  display: flex; gap: .75rem; flex-wrap: wrap;
  position: relative; z-index: 1;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .trf-layout   { grid-template-columns: 1fr; }
  .trf-sidebar  { display: none; }
}
@media (max-width: 768px) {
  .trf-section  { padding: 3rem 0 4rem; }
  .trf-tab      { padding: .75rem 1.1rem; font-size: .82rem; }
  .trf-table td { padding: .75rem .9rem; font-size: .86rem; }
  /* CTA card mobile */
  .trf-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    text-align: center;
  }
  .trf-cta__text h3 { font-size: 1.45rem; }
  .trf-cta__actions {
    width: 100%;
    flex-direction: column;
    gap: .6rem;
  }
  .trf-cta__actions .btn {
    width: 100%;
    justify-content: center;
    padding: .9rem 1rem;
  }
}
@media (max-width: 480px) {
  .trf-tab          { padding: .65rem .85rem; font-size: .78rem; gap: .3rem; }
  .trf-price        { font-size: .95rem; }
  .trf-cat__title   { font-size: .9rem; }
  .trf-table th,
  .trf-table td     { padding: .65rem .75rem; font-size: .82rem; }
}
