/* FF · formules d'abonnement : Tarifs de la présentation, « Mon abonnement », état des
   applications du portail et comparatif partagé (ff_core/_comparatif_formules.html).
   Jetons de ff_core/themes.css (présents sur la présentation comme sur le portail). Mobile d'abord. */

.fc-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Comparatif : défile horizontalement sur téléphone, première colonne fixe. `position: relative`
   garde les textes masqués (.fc-cache, absolus) dans la zone qui défile : sans lui, ils
   élargissent la page entière sur téléphone. */
.fc-defile {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--r-md, 12px);
  background: var(--surface);
}
.fc-defile:focus-visible { outline: 2px solid var(--ff-accent, var(--accent)); outline-offset: 2px; }
.fc-table {
  width: 100%;
  min-width: 600px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
  color: var(--text);
}
.fc-table th,
.fc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}
.fc-table tbody tr:last-child td,
.fc-table tbody tr:last-child th { border-bottom: 0; }
.fc-table th[scope="row"],
.fc-coin {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  font-weight: 600;
  background: var(--surface);
  min-width: 150px;
}
.fc-table thead th { vertical-align: bottom; padding-block: 14px; }
.fc-nom { display: block; font-size: 0.9375rem; font-weight: 700; }
.fc-prix { display: block; margin-top: 2px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.fc-prix small { font-size: 0.6875rem; font-weight: 500; }
.fc-marque {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink, var(--text));
  font-size: 0.6875rem;
  font-weight: 700;
}
.fc-groupe th {
  position: sticky;
  left: 0;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
}
.fc-table .is-phare { box-shadow: inset 0 3px 0 var(--ff-accent, var(--accent)); }
.fc-table .is-actuelle { background: color-mix(in srgb, var(--ff-accent, var(--accent)) 7%, var(--surface)); }
.fc-table td.is-oui svg {
  width: 18px;
  height: 18px;
  margin: 0 auto;
  fill: none;
  stroke: var(--ok);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fc-table td.is-non { color: var(--text-3); }
.fc-table td.is-plus { font-weight: 700; }

/* Tarifs de la présentation. */
.tag.tag-formule { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.tarifs-grille { display: grid; gap: 14px; }
.tarif {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
}
.tarif.is-phare { border-color: var(--ff-accent); box-shadow: inset 0 0 0 1px var(--ff-accent); }
.tarif-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tarif-tete h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.tarif-tete .tag { font-size: 10px; padding: 4px 8px; }
.tarif-accroche { font-size: 13px; line-height: 1.6; min-height: 2.6em; }
.tarif-prix { display: flex; align-items: baseline; gap: 8px; color: var(--text); }
.tarif-prix strong { font-size: 40px; font-weight: 750; letter-spacing: -0.04em; line-height: 1; }
.tarif-prix span { font-size: 12px; color: var(--text-2); }
.tarif-annuel { font-size: 12px; color: var(--text-2); }
.tarif-action { justify-content: center; margin-top: 6px; }
.tarif-secondaire { border: 1px solid var(--border-strong, var(--border)); background: var(--surface); color: var(--text); }
.tarif-secondaire:hover { border-color: var(--ff-accent); }
.tarif-passage { font-size: 11px; color: var(--text-3); text-align: center; }
.tarif-titre {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tarif-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.tarif-apps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}
.tarif-pastille { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ff-accent)); }
.tarif-limites { display: grid; gap: 6px; }
.tarif-limites li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.tarif-limites li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.tarif-support { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 650; color: var(--text); }
.tarifs-note { margin-top: 22px; max-width: 760px; font-size: 13px; line-height: 1.7; }
.tarifs-note a { text-decoration: underline; text-underline-offset: 3px; }
.tarifs-detail { margin-top: 18px; }
.tarifs-detail summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tarifs-detail[open] summary { margin-bottom: 12px; }
@media (min-width: 700px) {
  .tarifs-grille { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .tarifs-grille { grid-template-columns: repeat(4, 1fr); }
}

/* Portail : Mes applications. */
.ap-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ap-formule { font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.ap-formule:hover { color: var(--text); }
.ff-etat-incluse { background: var(--ok-soft); color: var(--ok); }
.ff-etat-verrouillee { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); color: var(--text-2); }
.ff-etat-verrouillee svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
/* Téléphone : le lien « Formule … » en tête mène à Mon abonnement, le bouton de chaque ligne
   verrouillée est masqué, les pastilles se resserrent sur deux lignes au plus (360 et 375 px)
   et rien ne défile horizontalement. */
@media (max-width: 560px) {
  .ap-table th,
  .ap-table td { padding-left: 8px; padding-right: 8px; }
  .ap-table th:first-child,
  .ap-table td:first-child { padding-left: 12px; }
  .ap-table td:nth-child(2) { width: 48%; }
  .ap-table .ap-action { padding-left: 0; }
  .ap-table .ap-verrou { display: none; }
  .ap-table .ff-etat { padding: 2px 8px; font-size: 0.75rem; line-height: 1.35; }
  .ap-table .ff-etat-verrouillee { gap: 4px; }
  .ap-table .ff-etat-verrouillee svg { width: 12px; height: 12px; }
}

/* Portail : Mon abonnement. */
.ab-actuelle { display: grid; gap: 8px; max-width: none; }
.ab-actuelle.is-phare { border-color: var(--ff-accent, var(--accent)); }
.ab-sur { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.ab-tete { display: flex; align-items: center; gap: 10px; }
.ab-tete h3 { margin: 0; font-size: 1.75rem; }
.ab-badge { padding: 2px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 0.8125rem; font-weight: 700; }
.ab-prix { margin: 4px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ab-prix strong { font-size: 1.5rem; }
.ab-prix span { color: var(--text-2); }
.ab-apps-titre { margin: 8px 0 0; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.ab-apps { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.ab-apps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
}
.ab-pastille { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; }
.ab-pastille svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.ab-conso { margin: 0; list-style: none; max-width: none; }
.ab-ligne {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ab-ligne:first-child { padding-top: 0; }
.ab-ligne:last-child { border-bottom: 0; padding-bottom: 0; }
.ab-nom { font-weight: 600; }
.ab-valeur { text-align: right; color: var(--text-2); font-size: 0.875rem; }
.ab-valeur strong { color: var(--text); }
.ab-jauge { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ab-jauge span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.ab-ligne.is-proche .ab-jauge span { background: var(--warn, var(--accent)); }
.ab-ligne.is-atteinte .ab-jauge span { background: var(--danger); }
.ab-note { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--danger); }
.ab-regle { margin: 8px 0 0; max-width: 680px; font-size: 0.8125rem; }
.ab-changer { display: grid; gap: 8px; margin-top: 24px; max-width: none; }
.ab-changer .ff-ligne { margin-top: 4px; }
/* Paiement en ligne : périodicité, boutons des formules, confirmation d'un changement. */
.ab-choix { display: grid; gap: 12px; }
.ab-periode { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; border: 0; }
.ab-periode legend { padding: 0; margin-bottom: 6px; }
.ab-periode label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ab-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-boutons .btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; height: auto; padding-top: 8px; padding-bottom: 8px; }
.ab-boutons .btn small { font-weight: 500; opacity: 0.8; }
.ab-confirmer { display: grid; gap: 10px; max-width: 640px; }
.ab-confirmer dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.ab-confirmer dt { color: var(--text-2); }
.ab-confirmer dd { margin: 0; font-weight: 600; }
/* Offre de bienvenue : prix barrés, bandeau. */
.ab-boutons .btn small s,
.fc-prix s { font-weight: 500; color: var(--text-3); }
.fc-remise { display: block; font-size: 0.6875rem; font-weight: 600; color: var(--ok); }
.ab-bienvenue {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-md, 12px);
  background: var(--ok-soft);
  color: var(--text);
  font-size: 0.875rem;
}
/* Choisissez votre formule : un bouton par formule, en tête et en pied du comparatif. */
.ch-intro { max-width: 760px; }
.ch-intro + .ab-bienvenue { margin: 12px 0; }
.fc-choisir { margin-top: 8px; white-space: nowrap; }
.fc-pied th,
.fc-pied td { border-top: 1px solid var(--border); border-bottom: 0; }
@media (max-width: 560px) {
  .ab-boutons .btn { width: 100%; }
  .ab-ligne { grid-template-columns: 1fr; }
  .ab-valeur { text-align: left; }
}

/* Paiement par virement (1.3.8, `_virement.html`). */
.ab-virement { display: grid; gap: 12px; }
.ab-iban { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.ab-iban dt { color: var(--ff-muted, inherit); opacity: 0.8; }
.ab-iban dd { margin: 0; overflow-wrap: anywhere; }
.ab-reference { font-size: 1.2em; letter-spacing: 0.05em; }
.ab-annuler form { display: grid; gap: 8px; margin-top: 8px; }
@media (max-width: 600px) { .ab-iban { grid-template-columns: 1fr; } .ab-iban dd { margin-bottom: 6px; } }
