/* Ajustements exclusifs aux ecrans de telephone. Les styles desktop restent intacts. */
@media (max-width: 760px) {
  :root { --gouttiere: clamp(18px, 5vw, 24px); }

  /* En-tete et navigation : surface legere, zones tactiles franches. */
  .bandeau-haut__grille { min-height: 32px; }
  .bandeau-haut__liens { gap: 18px; }
  .bandeau-haut__liens a:not(.bandeau-haut__tel) { display: none; }
  .bandeau-haut__tel { font-size: 12px; letter-spacing: .02em; }
  .entete { background: rgba(255,255,255,.94); box-shadow: 0 8px 28px -26px #26105a; }
  .entete__grille { min-height: 68px; }
  .bascule-menu { width: 44px; height: 44px; border-color: #dcd2f5; border-radius: 12px; background: #f8f5ff; }
  .bascule-menu:active { transform: scale(.95); }
  .menu-mobile { top: 100px; background: linear-gradient(165deg,#fff 0%,#faf8ff 100%); padding-top: 12px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); box-shadow: 0 25px 45px -28px #22105d; }
  .menu-mobile:not([hidden]) { animation: mobile-menu-in 320ms cubic-bezier(.2,.8,.2,1) both; }
  .menu-mobile__titre { min-height: 57px; padding: 12px 0; }
  .menu-mobile__groupe ul { margin-bottom: 10px; }
  .menu-mobile__groupe a { min-height: 44px; display: flex; align-items: center; border-radius: 9px; padding: 9px 12px; }
  .menu-mobile__groupe a:active { background: #eee8ff; }
  .menu-mobile__pied .bouton { min-height: 50px; }
  .menu-mobile:not([hidden]) ~ .flottants { display: none; }

  /* Des marges coherentes sur tous les bandeaux de page. */
  .catalogue-hero__grille,
  .finance-hero__grille,
  .entreprise-hero__grille,
  .centre-hero__grille { padding-inline: var(--gouttiere); }
  .catalogue-hero__grille,
  .finance-hero__grille,
  .entreprise-hero__grille,
  .centre-hero__grille,
  .formation-hero__grille { gap: 31px; }
  .catalogue-hero__visuel,
  .finance-hero__photo,
  .entreprise-hero__image,
  .centre-hero__visuel,
  .formation-hero__visuel { max-width: 100%; }

  /* Hero : mouvement discret sur telephone, sans concurrencer le texte. */
  :is(.catalogue-hero,.finance-hero,.entreprise-hero,.centre-hero,.formation-hero) .eyebrow { animation: mobile-rise 600ms cubic-bezier(.2,.8,.2,1) both; }
  :is(.catalogue-hero,.finance-hero,.entreprise-hero,.centre-hero,.formation-hero) h1 { animation: mobile-rise 680ms cubic-bezier(.2,.8,.2,1) 70ms both; }
  :is(.catalogue-hero,.finance-hero,.entreprise-hero,.centre-hero,.formation-hero) :is(.catalogue-hero__intro,.finance-hero__chapo,.entreprise-hero__texte>p:not(.eyebrow),.centre-hero__texte>p:not(.eyebrow),.formation-hero__resume) { animation: mobile-rise 680ms cubic-bezier(.2,.8,.2,1) 145ms both; }
  .accueil-heros__image > img { animation: mobile-image-in 900ms cubic-bezier(.2,.8,.2,1) 130ms both; }

  /* Cartes animees au defilement, avec un retour tactile visible. */
  .reveal { transform: translate3d(0,24px,0) scale(.985); }
  .reveal[data-vu="true"] { transform: none; transition-duration: 720ms; }
  .catalogue-carte,
  .finance-option,
  .entreprise-carte,
  .centre-carte,
  .formation-metier__carte,
  .formation-competences__carte,
  .accueil-etapes__carte { box-shadow: 0 18px 38px -34px rgba(35,14,110,.6); }
  .catalogue-carte:active,
  .finance-option:active,
  .entreprise-carte:active,
  .formation-autres__carte:active { transform: scale(.985); }
  .bouton { min-height: 48px; }
  .bouton:active { transform: scale(.97); }

  /* Fiches de formation : sommaire glissable comme une rangee de pastilles. */
  .formation-nav { top: 68px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; background: rgba(255,255,255,.96); }
  .formation-nav::-webkit-scrollbar { display: none; }
  .formation-nav__interieur { min-height: 62px; gap: 0; min-width: max-content; padding-inline: var(--gouttiere); }
  .formation-nav__liens { gap: 8px; margin: 0; }
  .formation-nav__liens a { display: inline-flex; align-items: center; min-height: 35px; padding: 7px 12px; border: 1px solid #e5def8; border-radius: 999px; background: #faf8ff; color: #514b68; scroll-snap-align: start; }
  .formation-nav__liens a[aria-current="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
  .formation-autres__entete { flex-direction: column; align-items: flex-start; gap: 16px; }
  .formation-autres__entete > * { min-width: 0; }
  .formation-autres__entete .lien-fleche { align-self: flex-start; }

  /* Navigation du centre : liens courts, lisibles et sans barre apparente. */
  .centre-nav { position: sticky; top: 68px; z-index: 20; overflow-x: auto; scrollbar-width: none; background: rgba(255,255,255,.97); }
  .centre-nav::-webkit-scrollbar { display: none; }
  .centre-nav__interieur { flex-direction: row; align-items: center; min-height: 62px; gap: 16px; padding-block: 0; min-width: max-content; }
  .centre-nav__interieur > div { flex-wrap: nowrap; gap: 6px; }
  .centre-nav a { min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; white-space: nowrap; }
  .centre-nav a[aria-current="page"] { background: #f0eaff; border-color: #e0d3ff; }

  /* Images et ornements : conserver le relief sans deborder de l'ecran. */
  .accueil-centre .duo__image::before { right: 0; }
  .accueil-heros__image,
  .accueil-entreprises__image,
  .accueil-financement__visuel { max-width: 100%; }

  /* Le bouton de contact reste accessible sans masquer deux controles flottants. */
  .flottants { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .whatsapp { width: 50px; height: 50px; justify-content: center; padding: 0; box-shadow: 0 10px 28px -9px rgba(11,61,32,.62); }
  .whatsapp:active { transform: scale(.92); }
  .retour-haut { display: none !important; }

  /* Footer compact, surtout dans les longues fiches. */
  .pied { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .pied__colonnes { gap: 28px; }
}

@media (max-width: 360px) {
  .formation-nav__liens a { padding-inline: 10px; }
  .centre-cartes__grille,
  .centre-etapes__grille { grid-template-columns: 1fr; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .menu-mobile:not([hidden]),
  :is(.catalogue-hero,.finance-hero,.entreprise-hero,.centre-hero,.formation-hero) .eyebrow,
  :is(.catalogue-hero,.finance-hero,.entreprise-hero,.centre-hero,.formation-hero) h1,
  :is(.catalogue-hero,.finance-hero,.entreprise-hero,.centre-hero,.formation-hero) :is(.catalogue-hero__intro,.finance-hero__chapo,.entreprise-hero__texte>p:not(.eyebrow),.centre-hero__texte>p:not(.eyebrow),.formation-hero__resume),
  .accueil-heros__image > img { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@keyframes mobile-menu-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes mobile-rise { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }
@keyframes mobile-image-in { from { opacity: .5; transform: scale(1.035); } to { opacity: 1; transform: none; } }
