/* ==========================================================================
   Page Entreprises et « Mon année d'apprenti » : téléphone et tablette.
   La démo n'était dessinée que pour l'ordinateur (1280 à 1920 px) : ces règles prennent le relais
   sous 1100 px (tablette) et sous 760 px (téléphone). Rien ne change au-dessus de 1100 px.
   ========================================================================== */

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1100px) {
  /* En-tête : texte puis image, repères sous l'image. */
  .ent-hero__grille { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
  .ent-hero::before { width: 100%; top: auto; bottom: 0; height: 46%; }
  .ent-hero__visuel { max-width: 720px; }

  /* Calculateur : formulaire puis résultat. */
  .ent-calc__grille { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }

  /* Démarches : la description et son complément l'un sous l'autre. */
  .ent-dem__panneau { grid-template-columns: minmax(0, 1fr); }
  .ent-dem__panneau > *, .ent-dem__plus { grid-column: 1; grid-row: auto; }
  .ent-dem__plus { padding-left: 0; border-left: 0; padding-top: var(--space-m); margin-top: var(--space-xs); border-top: 2px solid var(--line); }

  /* Carte, offre, taxe : une colonne. */
  .ent-carte__grille, .ent-offre__grille, .ent-taxe__bas { grid-template-columns: minmax(0, 1fr); }
  .ent-taxe__cartes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ent-taxe__cartes > :last-child { grid-column: 1 / -1; }

  /* Calendrier SOLTéA : les jalons trop serrés passent en liste verticale datée. */
  .ent-taxe__axe { margin: var(--space-m) 0 0; height: auto; background: none; padding-left: 26px; }
  .ent-taxe__axe::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 6px; border-radius: var(--radius-pill); background: var(--line); }
  .ent-taxe__progres, .ent-taxe__auj { display: none; }
  .ent-taxe__jalons { display: grid; gap: 0.9rem; }
  .ent-taxe__jalon { position: relative; left: auto; transform: none; width: auto; padding-top: 0; justify-items: start; text-align: left; font-size: 0.9rem; }
  .ent-taxe__jalon::before { top: 2px; left: -26px; transform: none; }
  .ent-taxe__jalon time { font-size: 0.95rem; }

  /* Mon année : réglages sous l'introduction. */
  .annee__tete { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
  .annee__legende-zone { grid-template-columns: minmax(0, 1fr); }

  /* Zones de toucher d'au moins 44 px. */
  .ent-curseur, .annee__champ input[type='range'] { height: 44px; }
  .ent-taxe__copier { min-height: 44px; padding-inline: 1.1rem; }
  .ent-hypotheses summary, .ent-taxe__besoin summary { min-height: 44px; display: flex; align-items: center; }
  .ent-carte__filtres .chip, .ent-dem__opco .chip { min-height: 44px; }
  .ent-carte__liens .btn { min-height: 48px; }
  .ent-carte__vide a, .ent-carte__nom a { display: inline-flex; align-items: center; min-height: 44px; }
  .annee-nav__mois { min-height: 44px; min-width: 48px; }
  .annee__seg span { min-height: 44px; }
  .ent-hero .btn, .ent-offre .btn, .ent-taxe .btn, .annee .btn { min-height: 48px; }
  .ent-dem__plus .link-arrow { display: inline-flex; align-items: center; min-height: 44px; }
  .ent-case { min-height: 44px; }
  .ent-case input { width: 24px; height: 24px; }
  .annee-fort a { display: inline-block; padding-block: 0.6rem; margin-block: -0.6rem; }
  .ent-taxe__uai span { font-size: 0.8125rem; }

  /* Textes secondaires lisibles sans zoom. */
  .ent-champ__aide, .ent-kpi__note, .ent-kpi__libelle, .ent-graphe__legende, .ent-table__note, .ent-table th,
  .ent-sources, .ent-hypotheses, .ent-dem__etiquette, .ent-carte__note, .ent-carte__filtres-titre,
  .ent-taxe__contact-titre, .ent-taxe__sources, .ent-repere dd, .annee__sources, .annee__rythme, .ent-hero__contact {
    font-size: 0.875rem;
  }
}

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  .ent-hero { padding-top: var(--space-l); }
  .ent-hero__titre { font-size: clamp(2.3rem, 9.5vw, 3rem); line-height: 0.95; }
  .ent-hero__actions { display: grid; gap: 0.6rem; }
  .ent-hero__actions .btn { width: 100%; justify-content: center; }
  .ent-hero__reperes { grid-template-columns: minmax(0, 1fr); }
  .ent-repere { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 0.8rem; }
  .ent-repere::before { grid-column: 1 / -1; }
  .ent-hero__contact a { overflow-wrap: anywhere; }

  /* Calculateur */
  .ent-calc__form { padding: var(--space-m); }
  .ent-champ--duo { grid-template-columns: minmax(0, 1fr); }
  .ent-seg__option { font-size: 0.95rem; }
  .ent-kpis { grid-template-columns: minmax(0, 1fr); }
  .ent-kpi { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 1rem; }
  .ent-kpi__libelle { grid-column: 1; }
  .ent-kpi__valeur { grid-column: 2; grid-row: 1; font-size: 2rem; }
  .ent-kpi__note { grid-column: 1 / -1; }
  .ent-graphe__titre { display: grid; }
  .ent-graphe__legende { flex-wrap: wrap; }
  .ent-graphe__legende i:first-child { margin-left: 0; }
  .ent-graphe__zone svg text { font-size: 20px; }
  .ent-graphe__legende { display: block; line-height: 1.8; }
  .ent-graphe__legende i { margin: 0 0.4rem 0 0; vertical-align: -1px; }
  .ent-graphe__legende i.is-aide { margin-left: 0.8rem; }
  .ent-table, .ent-table thead, .ent-table tbody { display: block; }
  .ent-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ent-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .ent-table td { padding: 0; border: 0; }
  .ent-table td:first-child { grid-column: 1 / -1; font-weight: 650; }
  .ent-table td:nth-child(2)::after { content: ' · '; }
  .ent-table td:nth-child(2), .ent-table td:nth-child(3) { display: inline; grid-column: 1; }
  .ent-table tr td:nth-child(2) { grid-row: 2; }
  .ent-table tr td:nth-child(3) { grid-row: 3; }
  .ent-table td:nth-child(3)::after { content: ' du SMIC'; }
  .ent-table td:last-child { grid-column: 2; grid-row: 2 / span 2; align-self: center; font-size: 1.05rem; }

  /* Démarches : les cinq étapes en grille de pastilles lisibles. */
  .ent-dem__frise { overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .ent-dem__etapes { grid-template-columns: repeat(var(--n), minmax(96px, 1fr)); min-width: calc(var(--n) * 100px); }
  .ent-dem__nom { font-size: 0.95rem; }
  .ent-dem__panneau { padding: var(--space-m); }

  /* Carte */
  .ent-carte__plan { margin-inline: calc(-0.5 * var(--gutter)); }
  .ent-carte__lieux text { font-size: 26px; }
  .ent-carte__liens .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }

  /* Offre */
  .ent-offre .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }

  /* Taxe */
  .ent-taxe__cartes { grid-template-columns: minmax(0, 1fr); }
  .ent-taxe__statut { max-width: none; }
  .ent-taxe__frise { padding: var(--space-m); }
  .ent-taxe__contact .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .ent-taxe__contact a { overflow-wrap: anywhere; }

  /* Mon année */
  .annee__titre { font-size: clamp(2.3rem, 10vw, 3rem); }
  .annee__reglages { grid-template-columns: minmax(0, 1fr); padding: var(--space-m); }
  .annee .annee-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .annee-nav li { flex: none; }
  .annee__legende { font-size: 0.9rem; }
  .annee__piste { gap: var(--space-s); }
}

/* Mon année au doigt : la piste défile à l'horizontale (balayage), sans épinglage. */
@media (max-width: 1100px), (pointer: coarse) {
  .annee__scene { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .annee__scene::-webkit-scrollbar { display: none; }
  .annee__piste { transform: none !important; }
  .annee__piste > li { scroll-snap-align: start; scroll-margin-left: var(--gutter); }
  /* ol[role=list] de base.css retire le retrait : on le rend à la piste. */
  .annee .annee__piste { padding-inline: var(--gutter); }
}
@media (max-width: 760px) {
  .annee__piste > .annee-carte { width: min(82vw, 330px); min-height: 0; }
}
