/* =========================================================
   TRAFFIQ — ATELIERS INTERACTIFS
   Styles communs aux guides

   Version 2 :
   prise en charge des simulateurs intégrés
   directement dans les articles.
========================================================= */


/* =========================================================
   SECTION PRINCIPALE
========================================================= */

.ta-section {
  background: #f3f8f7;
  padding: clamp(54px, 7vw, 92px) 0;
  color: #003747;
}

.ta-section * {
  box-sizing: border-box;
}

.ta-wrap {
  max-width: 1140px;
}


/* =========================================================
   TITRES
========================================================= */

.ta-heading {
  max-width: 800px;
  margin: 0 0 30px;
}

.ta-kicker {
  display: inline-block;
  color: #00667d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 13px;
}

.ta-heading h2 {
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: #003747;
  margin: 0 0 16px;
}

.ta-heading p {
  font-size: 16px;
  line-height: 1.7;
  color: #45616a;
  margin: 0;
}


/* =========================================================
   GRILLES ET CARTES
========================================================= */

.ta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.ta-panel {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #d5e5e1;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 55, 71, 0.05);
}

.ta-panel-title {
  font-weight: 700;
  font-size: 16px;
  color: #003747;
  margin: 0 0 22px;
}


/* =========================================================
   CHAMPS DU SIMULATEUR
========================================================= */

.ta-fields label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #003747;
}

.ta-fields label small {
  font-weight: 400;
  color: #5d767b;
}

.ta-fields select,
.ta-fields input {
  display: block;
  width: 100%;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #bfcfcf;
  border-radius: 10px;
  color: #003747;
  font: inherit;
  font-size: 15px;
  padding: 12px;
  margin-bottom: 17px;
}

.ta-fields input:focus-visible,
.ta-fields select:focus-visible,
.ta-checklist input:focus-visible,
.ta-symptoms input:focus-visible,
.ta-button:focus-visible,
.ta-links a:focus-visible {
  outline: 3px solid #28b985;
  outline-offset: 2px;
}

.ta-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.ta-help,
.ta-fine {
  font-size: 12px;
  line-height: 1.6;
  color: #5a757c;
}

.ta-help {
  margin: -5px 0 17px;
}


/* =========================================================
   BOUTONS
========================================================= */

.ta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  background: #003747;
  color: #ffffff !important;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.ta-button:hover {
  background: #004e64;
  color: #ffffff;
}


/* =========================================================
   RÉSULTATS DU SIMULATEUR
========================================================= */

.ta-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.ta-metrics div {
  padding: 17px 14px;
  background: #f0f7f5;
  border-radius: 12px;
  min-width: 0;
}

.ta-metrics span {
  display: block;
  color: #4c6d74;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 7px;
}

.ta-metrics strong {
  display: block;
  font-size: clamp(20px, 2vw, 26px);
  color: #003747;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.ta-reading {
  margin: 24px 0 10px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.6;
  color: #004e64;
}

.ta-balance {
  margin: 0 0 8px;
  font-size: 14px;
  color: #003747;
}

.ta-results .ta-fine {
  margin: 13px 0 0;
}


/* =========================================================
   SOURCES ET EXEMPLES
========================================================= */

.ta-source {
  font-size: 12px;
  line-height: 1.6;
  color: #506d75;
  margin: 22px 0;
}

.ta-source a,
.ta-links a {
  color: #004e64;
  text-underline-offset: 3px;
}

.ta-example {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid #23d8a1;
  background: #ffffff;
  border-radius: 0 12px 12px 0;
  color: #355761;
  font-size: 14px;
  line-height: 1.7;
}

.ta-example strong {
  color: #003747;
}


/* =========================================================
   MAILLAGE INTERNE
========================================================= */

.ta-links {
  border-top: 1px solid #d3e3df;
  padding-top: 19px;
  display: flex;
  flex-wrap: wrap;
  gap: 11px 22px;
  align-items: center;
  font-size: 14px;
}

.ta-links span {
  font-weight: 700;
  color: #003747;
}

.ta-links a {
  font-weight: 600;
}


/* =========================================================
   CHECKLIST DE LANCEMENT
========================================================= */

.ta-grid--launch {
  grid-template-columns: 1.3fr 0.7fr;
}

.ta-checklist label,
.ta-symptoms label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 0;
  border-top: 1px solid #e7efed;
  cursor: pointer;
}

.ta-checklist label:first-of-type,
.ta-symptoms label:first-of-type {
  border-top: 0;
}

.ta-checklist input,
.ta-symptoms input {
  accent-color: #004e64;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 2px;
}

.ta-checklist label strong,
.ta-symptoms label span {
  display: block;
  font-size: 14px;
  color: #003747;
  line-height: 1.55;
}

.ta-checklist label small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.6;
  color: #58747a;
}


/* =========================================================
   PROGRESSION
========================================================= */

.ta-check-count {
  display: block;
  font-size: 30px;
  letter-spacing: -0.05em;
  color: #003747;
}

.ta-progress {
  height: 9px;
  background: #e2eeeb;
  border-radius: 20px;
  overflow: hidden;
  margin: 15px 0 20px;
}

.ta-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #12b981;
  transition: width 0.2s ease;
}

.ta-next > p:not(.ta-panel-title) {
  line-height: 1.65;
  color: #435e68;
}

.ta-next h3 {
  color: #003747;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 14px;
}

.ta-next .ta-button {
  margin: 6px 0 14px;
}


/* =========================================================
   DIAGNOSTIC
========================================================= */

.ta-symptoms fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.ta-sr {
  position: absolute !important;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}


/* =========================================================
   CENTRE DE RESSOURCES
========================================================= */

.ta-orient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ta-orient {
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.ta-orient:hover {
  transform: translateY(-3px);
  border-color: #73ccb4;
}

.ta-orient span {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
  color: #006b7f;
}

.ta-orient strong {
  font-size: 18px;
  line-height: 1.5;
  color: #003747;
}

.ta-orient small {
  margin-top: auto;
  color: #004e64;
  font-size: 13px;
  font-weight: 700;
}


/* =========================================================
   NOUVEAU — SIMULATEUR DANS L'ARTICLE

   La largeur est limitée par la colonne éditoriale.
   Les formulaires et résultats sont donc empilés
   pour conserver une bonne lisibilité.
========================================================= */

.article-content .ta-section {
  background: #f3f8f7;
  border: 1px solid #d5e5e1;
  border-radius: 20px;
  padding: 24px 0;
  margin: 30px 0 34px;
  overflow: hidden;
}

.article-content .ta-section .ta-wrap {
  width: 100%;
  max-width: none;
  padding: 0 18px;
}

.article-content .ta-section .ta-heading {
  margin-bottom: 20px;
}

.article-content .ta-section .ta-heading h2 {
  font-size: clamp(22px, 2.7vw, 28px);
  line-height: 1.25;
}

.article-content .ta-section .ta-heading p {
  font-size: 14px;
  line-height: 1.65;
}

.article-content .ta-section .ta-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.article-content .ta-section .ta-panel {
  padding: 20px;
}

.article-content .ta-section .ta-source {
  margin: 18px 0;
}

.article-content .ta-section .ta-links {
  margin-top: 16px;
}


/* =========================================================
   RESPONSIVE — TABLETTE
========================================================= */

@media (max-width: 900px) {

  .ta-grid,
  .ta-grid--launch,
  .ta-orient-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 550px) {

  .ta-section {
    padding: 50px 0;
  }

  .ta-two,
  .ta-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ta-panel {
    padding: 20px;
  }

  .ta-metrics div {
    padding: 13px 10px;
  }

  .ta-metrics strong {
    font-size: 19px;
  }

  .ta-grid {
    gap: 15px;
  }

  .article-content .ta-section {
    padding: 20px 0;
  }

  .article-content .ta-section .ta-wrap {
    padding: 0 12px;
  }

  .article-content .ta-section .ta-two {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-content .ta-section .ta-panel {
    padding: 17px;
  }

}
