/* =====================================================================
   web-freelances.fr : adaptation téléphone (chargé en dernier)
   - Rien ne s'applique au-dessus de 760 px : l'affichage ordinateur ne change pas.
   - Les classes wf-* sont posées par js/mobile.js sur les éléments qui dépassent.
   - Pour qu'un tableau ne soit jamais transformé : class="wf-garde".
   ===================================================================== */

@media (max-width: 760px) {

  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  html, body { max-width: 100%; }
  body { min-width: 0 !important; overflow-x: hidden; }
  *, *::before, *::after { box-sizing: border-box; }

  /* Médias et champs : jamais plus larges que l'écran */
  img, video, iframe, embed, object, canvas { max-width: 100% !important; }
  img { height: auto; }
  input, select, textarea, button { max-width: 100% !important; }
  textarea { width: 100% !important; box-sizing: border-box !important; margin-left: 0 !important; margin-right: 0 !important; }

  /* Le thème force tous les labels à 400 px sur mobile */
  label { width: auto !important; max-width: 100%; }

  /* Les longs liens / e-mails passent à la ligne (les mots normaux restent entiers) */
  body { overflow-wrap: break-word; word-wrap: break-word; }
  pre, code { white-space: pre-wrap; word-break: break-word; }

  /* ---------- Tableaux de mise en page : colonnes empilées ---------- */
  table.wf-empile,
  table.wf-empile > tbody,
  table.wf-empile > thead,
  table.wf-empile > tfoot,
  table.wf-empile > * > tr,
  table.wf-empile > * > tr > td,
  table.wf-empile > * > tr > th {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    float: none !important;
  }
  table.wf-empile { margin-left: 0 !important; margin-right: 0 !important; }
  table.wf-empile > * > tr > td:empty,
  table.wf-empile > * > tr > td.wf-vide { display: none !important; }

  /* Tableau d'une seule colonne trop large : il prend la largeur de l'écran */
  table.wf-plein { width: 100% !important; max-width: 100% !important; min-width: 0 !important; table-layout: fixed; }
  table.wf-plein > * > tr > td { width: auto !important; }

  /* ---------- Tableaux de données : une carte par ligne ---------- */
  table.wf-cartes,
  table.wf-cartes > tbody,
  table.wf-cartes > thead,
  table.wf-cartes > * > tr,
  table.wf-cartes > * > tr > td,
  table.wf-cartes > * > tr > th {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    text-align: left !important;
  }
  table.wf-cartes > * > tr.wf-entete { display: none !important; }
  table.wf-cartes > * > tr {
    margin: 0 0 10px 0;
    padding: 6px 10px;
    border: 1px solid rgba(128, 128, 128, .35);
    border-radius: 8px;
  }
  table.wf-cartes > * > tr > td { padding: 3px 0 !important; border: 0 !important; }
  table.wf-cartes > * > tr > td[data-label]:not([data-label=""])::before {
    content: attr(data-label) " : ";
    font-weight: bold;
    opacity: .8;
  }

  /* ---------- Bloc ou image de largeur fixe qui dépasse ---------- */
  .wf-max {
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .wf-max.wf-flex { flex-wrap: wrap !important; }

  .wf-haut { height: auto !important; }

  /* ---------- Éléments connus ---------- */
  affich.wf-montre { display: block !important; }
  .marquee-container, .marquee { overflow: hidden !important; max-width: 100%; }
  .banniere-bas {
    left: 8px !important; right: 8px !important;
    height: auto !important; max-height: 75vh; overflow: auto;
    padding: 14px 12px !important; border-radius: 16px !important;
  }
  .footertd, .footertd a, .footertd font { font-size: 16px !important; line-height: 1.7 !important; }
  .footertd { padding: 12px !important; }
  .footer label { display: block !important; font-size: 16px !important; line-height: 1.7 !important; }
  .footer label a, .footer label font { font-size: 16px !important; line-height: 1.7 !important; }
  .faq-container { max-width: 100% !important; margin-left: 8px !important; margin-right: 8px !important; }

  /* Anciennes balises <font size="5|6|7"> (24 à 48 px) : trop grandes sur téléphone (ex. onglets du profil) */
  font[size="5"] { font-size: 17px !important; }
  font[size="6"] { font-size: 20px !important; }
  font[size="7"] { font-size: 24px !important; }
  .menuax { min-width: 0 !important; padding-left: 2px !important; padding-right: 2px !important; }
}
