/* Page Mobilité internationale (/mobilite-internationale/) : complète css/actualites.css (base des pages secondaires)
   et css/alumni.css (titres .al-tete, bandeau sombre .al-recruteurs, FAQ .al-faq, bandeau final .al-cta, mêmes
   couleurs). Ici : ouverture de la page (carte du monde des partenaires et liste des pays), tuiles des programmes,
   étapes du parcours, tuiles de reconnaissance. Tuiles sans ombre (bordure seule). */

/* Titres et intros de section équilibrés (pas de mot seul sur la dernière ligne) */
.al-titre { text-wrap: balance; }
.al-texte, .al-intro, .mo-etapes p, .mo-formule > p { text-wrap: pretty; }

/* ---- Ouverture de la page : la zone carte + liste (bandeau sombre .al-recruteurs), avec le titre de la page en h1
   (demande de l'utilisateur, 16/11) : « Mobilité internationale » en blanc, « en Europe & aux Amériques » en indigo
   (indigo clair, lisible sur le fond sombre) ---- */
.mo-insecable { white-space: nowrap; }   /* « & aux Amériques » reste d'un seul tenant */
.mo-partenaires { padding-top: 56px; }
.mo-partenaires h1.al-titre { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.12; }
.mo-partenaires h1 .mo-h1-indigo { color: #818CF8; }
.mo-partenaires .al-tete { animation: none; }   /* visible dès l'arrivée : pas d'apparition au défilement */

/* ---- Programmes : 4 tuiles (formule en grand, destination, nom et sigle, texte) + bandeau des échanges ---- */
.mo-formules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mo-formule { --c1: #6366F1; --c2: #4338CA; --c-clair: #EEF2FF; position: relative; display: flex; flex-direction: column; padding: 24px 22px 24px; overflow: hidden; background: #fff; border: 1px solid var(--bord); border-radius: 22px; transition: transform .25s, border-color .25s; }
.mo-formule::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.mo-formule:hover { transform: translateY(-4px); border-color: var(--c1); }
.mo-formule-2 { --c1: #A855F7; --c2: #7C3AED; --c-clair: #F3E8FF; }
.mo-formule-3 { --c1: var(--al-jaune-1); --c2: var(--al-jaune-2); --c-clair: #FEF3C7; }
.mo-formule-4 { --c1: var(--al-rose-1); --c2: var(--al-rose-2); --c-clair: #FCE7F3; }
.mo-formule-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mo-formule-chiffre { margin: 0; font-size: 54px; font-weight: 800; line-height: .95; letter-spacing: -2px; color: var(--c2);
  background: linear-gradient(135deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mo-formule-chiffre span { margin: 0 2px; font-size: .62em; vertical-align: .18em; }
.mo-formule-lieu { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--c-clair); font-size: 12.5px; font-weight: 700; color: var(--encre); white-space: nowrap; }
.mo-formule-lieu img { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(15, 23, 42, .1); }
.mo-formule h3 { margin: 0 0 8px; font-size: 18.5px; font-weight: 800; line-height: 1.3; color: var(--encre); }
/* sigle en pastille au-dessus du titre ; en 4 colonnes, titres sur 2 lignes réservées : les textes commencent à la
   même hauteur (pas en 2 colonnes, où cela laissait un vide sous les titres d'une ligne) */
.mo-sigle { align-self: flex-start; margin: 0 0 8px; padding: 2px 9px; border-radius: 6px; background: var(--c-clair); font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--c2); }
@media (min-width: 1025px) { .mo-formules .mo-formule h3 { min-height: 2.6em; } }
/* barre des années : gris = à ITBS, couleur de la tuile = à l'étranger ; légende dessous */
.mo-duree { margin: 0 0 18px; }
.mo-duree-barre { display: flex; gap: 4px; }
.mo-duree-barre span { flex: 1; height: 8px; border-radius: 4px; background: #E2E8F0; }
.mo-duree-barre .mo-an-dehors { background: linear-gradient(90deg, var(--c1), var(--c2)); }
.mo-duree-texte { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--discret); }
.mo-duree-texte span:last-child { text-align: right; font-weight: 700; color: var(--c2); }
.mo-formule > p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--texte); }
/* Échanges et stages : bandeau clair, pastilles (dont Erasmus+ et AIESEC) */
.mo-echanges { display: flex; align-items: center; gap: 22px; margin-top: 22px; padding: 22px 26px; border: 1px solid #E0E7FF; border-radius: 22px; background: linear-gradient(135deg, #F5F7FF, #FDF2F8); }
.mo-echanges-icone { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--al-indigo-1), #9333EA); color: #fff; font-size: 22px; }
.mo-echanges-texte { flex: 1; min-width: 0; }
.mo-echanges h3 { margin: 0 0 4px; font-size: 18.5px; font-weight: 800; color: var(--encre); }
.mo-echanges p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--texte); }
.mo-pastilles { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.mo-pastilles li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid #E0E7FF; border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 700; color: var(--encre); }
.mo-pastilles i { color: var(--accent); }
.mo-pastille-drapeau { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; }

/* ---- Partenaires : carte du monde (pointillés), pays de destination, trajets depuis Nabeul ; liste des pays ---- */
.mo-partenaires .al-tete { margin-bottom: 30px; }
.mo-monde { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.mo-carte { position: relative; aspect-ratio: 1000 / 641; }   /* repris en style par le programme */
.mo-carte-fond, .mo-carte-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* bords de la carte fondus dans le bandeau (haut et bas, gauche et droite) */
.mo-carte-fond, .mo-carte-svg {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect; }
.mo-terre { fill: rgba(99, 102, 241, .42); stroke: #A5B4FC; stroke-width: .8; stroke-linejoin: round; transition: fill .3s, opacity .3s; }
.mo-terre-origine { fill: rgba(251, 191, 36, .55); stroke: var(--al-jaune-titre); }
.mo-arc { fill: none; stroke: var(--al-jaune-titre); stroke-width: 1.7; stroke-linecap: round; stroke-dasharray: 2.2 1.6; opacity: .75; animation: mo-flux 1.4s linear infinite; transition: opacity .3s, stroke-width .3s; }
@keyframes mo-flux { to { stroke-dashoffset: -3.8; } }
.mo-voyageur { fill: #fff; stroke: rgba(252, 211, 77, .55); stroke-width: 3; transition: opacity .3s; }
.mo-origine-halo { fill: rgba(252, 211, 77, .25); transform-box: fill-box; transform-origin: center; animation: mo-pulse 2.6s ease-out infinite; }
.mo-origine-coeur { fill: var(--al-jaune-1); stroke: #fff; stroke-width: 2; }
.mo-origine-texte { fill: #fff; font-size: 17px; font-weight: 800; letter-spacing: .02em; paint-order: stroke; stroke: #0F172A; stroke-width: 4px; }
.mo-point { cursor: pointer; transition: opacity .3s; }
.mo-halo { fill: rgba(244, 114, 182, .3); transform-box: fill-box; transform-origin: center; animation: mo-pulse 2.4s ease-out infinite; }
.mo-coeur { fill: var(--al-rose-1); stroke: #fff; stroke-width: 2; transition: r .2s; }
@keyframes mo-pulse { from { transform: scale(.45); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
/* un pays choisi : lui, son trajet et son point en avant, les autres en retrait */
.mo-monde.mo-choix .mo-carte-svg [data-pays] { opacity: .3; }
.mo-monde.mo-choix .mo-carte-svg .mo-terre[data-pays] { opacity: .45; }
.mo-monde.mo-choix .mo-carte-svg .actif { opacity: 1; }
.mo-terre.actif { fill: rgba(129, 140, 248, .85); stroke: #E0E7FF; }
.mo-arc.actif { stroke-width: 2.6; opacity: 1; }
.mo-point.actif .mo-coeur { r: 7.5; }
/* bulle du pays choisi (placée par js/mobilite.js) */
.mo-bulle { position: absolute; z-index: 2; width: max-content; max-width: 280px; padding: 11px 15px; border-radius: 14px; background: #fff; color: var(--texte); font-size: 13px; line-height: 1.45; box-shadow: 0 16px 36px rgba(0, 0, 0, .4); transform: translate(-50%, calc(-100% - 18px)); pointer-events: none; }
.mo-bulle strong { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; font-size: 15px; color: var(--encre); }
.mo-bulle strong img { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; }
.mo-bulle::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.mo-bulle.dessous { transform: translate(-50%, 18px); }
.mo-bulle.dessous::after { top: -7px; bottom: auto; }
.mo-bulle.a-gauche { transform: translate(calc(-100% + 34px), calc(-100% - 18px)); }
.mo-bulle.a-gauche::after { left: auto; right: 27px; transform: rotate(45deg); }
.mo-bulle.a-droite { transform: translate(-34px, calc(-100% - 18px)); }
.mo-bulle.a-droite::after { left: 27px; transform: rotate(45deg); }
/* liste des pays */
.mo-pays-liste { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mo-pays-bouton { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 11px 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .05); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.mo-pays-bouton:hover, .mo-pays-liste li.actif .mo-pays-bouton { background: rgba(255, 255, 255, .11); border-color: rgba(165, 180, 252, .7); }
.mo-pays-bouton:focus-visible { outline: 3px solid var(--al-jaune-titre); outline-offset: 2px; }
.mo-pays-drapeau { flex: none; width: 30px; height: 22px; margin-top: 1px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.mo-pays-texte { min-width: 0; }
.mo-pays-nom { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.mo-pays-partenaires { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .72); }

/* ---- Parcours : 3 étapes reliées par un pointillé ---- */
.mo-etapes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 1040px; margin: 0 auto; padding: 0; list-style: none; }
.mo-etapes::before { content: ""; position: absolute; top: 39px; left: 17%; right: 17%; height: 2px; background: repeating-linear-gradient(90deg, #C7D2FE 0 10px, transparent 10px 18px); }
.mo-etapes li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 8px; text-align: center; }
.mo-etape-icone { position: relative; display: grid; place-items: center; width: 70px; height: 70px; border: 5px solid var(--fond-alt); border-radius: 24px; background: linear-gradient(135deg, var(--al-indigo-1), #9333EA); color: #fff; font-size: 24px; box-sizing: content-box; }
.mo-etapes li:nth-child(2) .mo-etape-icone { background: linear-gradient(135deg, var(--al-rose-1), var(--al-rose-2)); }
.mo-etapes li:nth-child(3) .mo-etape-icone { background: linear-gradient(135deg, var(--al-jaune-1), var(--al-jaune-2)); }
.mo-etape-num { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid var(--fond-alt); border-radius: 50%; background: var(--encre); color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
.mo-etapes h3 { margin: 18px 0 8px; font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--encre); }
.mo-etapes p { max-width: 330px; margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--texte); }

/* ---- Reconnaissance : 4 tuiles ---- */
.mo-reco { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.mo-reco li { padding: 24px 22px; background: #fff; border: 1px solid var(--bord); border-radius: 20px; }
.mo-reco-icone { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; background: var(--accent-clair); color: var(--accent); font-size: 20px; }
.mo-reco li:nth-child(2) .mo-reco-icone { background: #FCE7F3; color: var(--al-rose-2); }
.mo-reco li:nth-child(3) .mo-reco-icone { background: #D1FAE5; color: #059669; }
.mo-reco li:nth-child(4) .mo-reco-icone { background: #FEF3C7; color: #D97706; }
.mo-reco h3 { margin: 0 0 6px; font-size: 17.5px; font-weight: 800; line-height: 1.3; color: var(--encre); }
.mo-reco p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--texte); }

/* ---- Vos diplômes : cartes dans css/diplomes.css (communes avec l'accueil) ---- */
/* bandeau final juste après : pas de double espace blanc */
.mo-section-projet { padding-top: 0; }

@media (max-width: 1024px) {
  .mo-formules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-echanges { flex-wrap: wrap; }
  .mo-pastilles { flex: 1 1 100%; justify-content: flex-start; max-width: none; }   /* toute la largeur : les pastilles passent à la ligne */
  .mo-monde { grid-template-columns: 1fr; gap: 24px; }
  .mo-pays-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-reco { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mo-etapes { grid-template-columns: 1fr; gap: 30px; max-width: 460px; }
  .mo-etapes::before { display: none; }
}
@media (max-width: 540px) {
  .mo-partenaires { padding-top: 40px; }
  .mo-formules { grid-template-columns: 1fr; }
  .mo-echanges { padding: 20px; }
  .mo-pays-liste { grid-template-columns: 1fr; }
  .mo-origine-texte { display: none; }
  .mo-bulle { display: none; }   /* sur téléphone, la liste suffit */
  .mo-reco { grid-template-columns: 1fr; }
}

/* ---- Animations au défilement (mêmes réglages que la page Alumni) ---- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .mo-formule, .mo-echanges, .mo-etapes li, .mo-reco li, .dip-carte { animation: al-revele ease-out both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
    .mo-formule:nth-child(2), .mo-etapes li:nth-child(2), .mo-reco li:nth-child(2), .dip-carte:nth-child(2) { animation-range: entry 8% entry 83%; }
    .mo-formule:nth-child(3), .mo-etapes li:nth-child(3), .mo-reco li:nth-child(3), .dip-carte:nth-child(3) { animation-range: entry 16% entry 91%; }
    .mo-formule:nth-child(4), .mo-reco li:nth-child(4) { animation-range: entry 24% entry 99%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .mo-arc, .mo-halo, .mo-origine-halo { animation: none; }
  .mo-halo, .mo-origine-halo { opacity: .6; }
  .mo-voyageurs { display: none; }
}
