/* Accueil : le match opticien / remplaçant, présenté comme dans l'application */
:root { --bm-coral: #F84F43; --bm-teal: #28b3ac; --bm-ink: #1d1d1d; }

.bm-app {
  display: grid;
  grid-template-columns: 1fr 70px 270px 70px 1fr;
  align-items: center;
  width: min(1120px, calc(100vw - 32px));
  margin: 40px 0 0 50%;
  transform: translateX(-50%);
  text-align: left;
}
.banner_section .banner_text .bm-app p { padding: 0; }
.banner_section .banner_text .bm-app .bm-need { padding: 10px 12px; }

/* Fiches profil */
.bm-profile {
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .09);
  border-top: 5px solid var(--bm-coral);
  animation: bm-in .8s cubic-bezier(.2, .8, .2, 1) both;
  transition: transform .4s, box-shadow .4s;
}
.bm-profile.bm-rem { border-top-color: var(--bm-teal); animation-delay: .15s; }
.bm-profile.is-active { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(0, 0, 0, .14); }

.bm-who { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.bm-who strong { display: block; font-size: 18px; color: var(--bm-ink); line-height: 1.2; }
.bm-who small { display: block; font-size: 14px; color: #777; }
.bm-role { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bm-opt .bm-role { color: var(--bm-coral); }
.bm-rem .bm-role { color: var(--bm-teal); }

.bm-avatar {
  width: 58px; height: 58px; flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--bm-coral);
}
.bm-avatar[src*="remplacant"] { box-shadow: 0 0 0 3px var(--bm-teal); }

.bm-offer-title { font-size: 13px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.bm-offer { list-style: none; padding: 0; margin: 0 0 14px; }
.bm-offer li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--bm-ink); padding: 5px 0; }
.bm-offer i {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.bm-opt .bm-offer i { background: #fdeceb; color: var(--bm-coral); }
.bm-rem .bm-offer i { background: #e3f5f4; color: var(--bm-teal); }

.bm-need {
  display: flex; gap: 8px; align-items: flex-start;
  background: #f6f6f6; border-radius: 12px;
  padding: 10px 12px; margin: 0 0 18px;
  font-size: 14px; line-height: 1.4; color: #444;
}
.bm-need i { margin-top: 2px; }

.bm-cta {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 12px; padding: 10px 20px;
  font-weight: 700; color: #fff !important; text-decoration: none !important;
  transition: transform .25s, filter .25s;
}
.bm-opt .bm-cta { background: var(--bm-coral); }
.bm-rem .bm-cta { background: var(--bm-teal); }
.bm-cta:hover { transform: translateY(-2px); filter: brightness(1.05); }
.bm-cta span { transition: transform .25s; }
.bm-cta:hover span { transform: translateX(4px); }

/* Liens animés entre fiches et téléphone */
.bm-link { position: relative; height: 3px; background-image: linear-gradient(90deg, #ddd 50%, transparent 50%); background-size: 10px 3px; }
.bm-link span {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%;
  opacity: 0;
}
.bm-link-left span { background: var(--bm-coral); }
.bm-link-right span { background: var(--bm-teal); left: auto; right: 0; }
.bm-link.is-flowing span { animation: bm-flow-r 1s ease-in-out forwards; }
.bm-link-right.is-flowing span { animation-name: bm-flow-l; }
@keyframes bm-flow-r { 0% { left: 0; opacity: 1; } 100% { left: calc(100% - 12px); opacity: 1; } }
@keyframes bm-flow-l { 0% { right: 0; opacity: 1; } 100% { right: calc(100% - 12px); opacity: 1; } }

/* Téléphone */
.bm-phone {
  position: relative;
  width: 270px; height: 500px;
  border-radius: 40px;
  background: var(--bm-ink);
  padding: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
  animation: bm-in .8s .3s cubic-bezier(.2, .8, .2, 1) both;
}
.bm-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: var(--bm-ink); border-radius: 0 0 14px 14px; z-index: 2; }
.bm-screen { position: relative; height: 100%; border-radius: 30px; background: #fff; overflow: hidden; }
.bm-bar { background: var(--bm-coral); color: #fff; font-weight: 700; text-align: center; padding: 34px 0 12px; font-size: 15px; }

.bm-state {
  position: absolute; left: 0; right: 0; top: 80px; bottom: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 0 18px; text-align: center;
  font-size: 14px; color: #555;
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1);
}
.bm-state.is-on { opacity: 1; transform: none; }
.bm-state strong { font-size: 18px; color: var(--bm-ink); }
.bm-muted { color: #999; }
.bm-avatar-lg { width: 96px; height: 96px; margin: 8px 0; }
.bm-chip { font-size: 12px; font-weight: 700; color: #fff; border-radius: 999px; padding: 5px 12px; }
.bm-chip-opt { background: var(--bm-coral); }
.bm-chip-rem { background: var(--bm-teal); }

.bm-duo { position: relative; display: flex; margin-bottom: 6px; }
.bm-duo .bm-avatar-lg { width: 88px; height: 88px; }
.bm-duo .bm-avatar-lg:first-child { transform: translateX(14px); }
.bm-duo .bm-avatar-lg:nth-child(2) { transform: translateX(-14px); }
.bm-state.is-on .bm-duo .bm-avatar-lg:first-child { animation: bm-meet-l .7s cubic-bezier(.3, 1.4, .5, 1); }
.bm-state.is-on .bm-duo .bm-avatar-lg:nth-child(2) { animation: bm-meet-r .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes bm-meet-l { from { transform: translateX(-30px); } to { transform: translateX(14px); } }
@keyframes bm-meet-r { from { transform: translateX(30px); } to { transform: translateX(-14px); } }
.bm-heart {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  display: flex; align-items: center; justify-content: center;
}
.bm-heart img { width: 22px; }
.bm-state.is-on .bm-heart { animation: bm-pop .6s .4s both; }
.bm-match-title { font-family: 'Lora', serif; font-style: italic; font-size: 24px !important; color: var(--bm-coral) !important; }
.bm-confirm { margin-top: 8px; background: #e3f5f4; color: #13807a; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }

.bm-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.bm-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ddd; transition: background .3s, width .3s; }
.bm-dots i.is-on { background: var(--bm-coral); width: 18px; border-radius: 4px; }

.bm-login { margin: 26px 0 10px; font-size: 15px; color: #555; }
.bm-login a { color: var(--bm-coral); font-weight: 700; text-decoration: underline; }

@keyframes bm-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bm-pop { 0% { transform: translateX(-50%) scale(0); } 70% { transform: translateX(-50%) scale(1.25); } 100% { transform: translateX(-50%) scale(1); } }

@media (max-width: 991px) {
  .bm-app { grid-template-columns: 1fr; gap: 18px; width: min(420px, calc(100vw - 32px)); }
  .bm-link { display: none; }
  .bm-phone { margin: 0 auto; order: -1; }
}
@media (max-width: 767px) {
  .banner_section .banner_text h1 { font-size: 34px !important; margin-top: 0 !important; }
  .banner_section .banner_text h1 i { font-size: 23px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .bm-profile, .bm-phone, .bm-state, .bm-link span, .bm-duo .bm-avatar-lg, .bm-heart { animation: none !important; transition: none !important; }
}
