/* Gabarit « page de démonstration » : la timonerie. Par-dessus site-local.css (l'entrée épinglée, la plongée, les blocs clairs, la bande sombre). */
.page-timonerie .entree .stage::before { background: linear-gradient(90deg, rgba(14, 10, 6, 0.78), rgba(14, 10, 6, 0.5) 30%, rgba(14, 10, 6, 0) 46%), linear-gradient(180deg, rgba(14, 10, 6, 0.55), rgba(14, 10, 6, 0) 22%); }
.page-timonerie .entree h1 { font-size: clamp(38px, 4.6vw, 88px); }
.page-timonerie .e-texte .bouton { border: 0; cursor: pointer; }
/* l'écran de bord : la capture du cockpit, posée pile sur l'écran de la photo */
.ecran-bord { position: absolute; overflow: hidden; background: #0d0d0f; cursor: pointer; border-radius: 2px; }
.ecran-bord img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; display: block; }
.ecran-bord::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 30%); pointer-events: none; }
/* le poste : le vrai logiciel, posé pile sur l'écran de bord une fois la plongée finie (le bois de la timonerie reste visible autour) */
.poste { position: absolute; z-index: 3; opacity: 0; pointer-events: none; }
.poste.ouvert { pointer-events: auto; }
.poste iframe { position: absolute; left: 0; top: 0; border: 0; background: #fff; transform-origin: 0 0; border-radius: 2px; }
.poste-barre { position: absolute; left: 50%; top: calc(100% + 16px); translate: -50% 0; display: flex; align-items: center; justify-content: space-between; gap: 10px 28px; width: max-content; max-width: 92vw; padding: 8px 8px 8px 20px; border: 1px solid rgba(247, 241, 227, 0.22); border-radius: 99px; background: rgba(16, 12, 8, 0.78); backdrop-filter: blur(12px); color: var(--cream); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.poste-barre p { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 clamp(13px, 0.95vw, 15px)/1.3 DM, sans-serif; color: rgba(247, 241, 227, 0.88); white-space: nowrap; }
.poste-barre p i { width: 9px; height: 9px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 0 4px rgba(95, 208, 138, 0.2); }
.poste-barre div { display: flex; align-items: center; gap: 20px; }
.poste-barre .lien { font-size: clamp(14px, 1vw, 16px); text-shadow: none; white-space: nowrap; }
.poste-barre .bouton { padding: 11px 18px; border: 0; border-radius: 99px; cursor: pointer; white-space: nowrap; }

/* l'arrivée, sous la timonerie */
.page-timonerie .arrivee { margin-top: 0; padding-top: clamp(50px, 9vh, 110px); }
.a-puces { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.a-puces li { padding: 10px 16px; border: 1.5px solid var(--encre); border-radius: 99px; font: 600 clamp(14px, 1.05vw, 17px)/1 DM, sans-serif; }
.b-appel { margin: 0; }
.bs-chapeau { max-width: 76ch; margin: 0; font-size: clamp(17px, 1.3vw, 22px); line-height: 1.55; color: rgba(247, 241, 227, 0.88); }
/* les autres métiers */
.metiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 24px); }
.metier { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: clamp(18px, 1.8vw, 30px); border: 1px solid rgba(247, 241, 227, 0.2); border-radius: 14px; background: rgba(255, 255, 255, 0.04); transition: opacity 800ms ease calc(var(--i, 0) * 100ms), translate 1000ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i, 0) * 100ms), border-color 300ms ease, background 300ms ease; }
.metier:hover { border-color: rgba(255, 217, 176, 0.6); background: rgba(255, 255, 255, 0.07); }
.metier > * { margin: 0; }
.metier > span { font: 700 12px/1 DM, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-clair); }
.metier .ouvrir { color: #fff; font: 600 clamp(20px, 1.7vw, 30px)/1.1 Bricolage, DM, sans-serif; letter-spacing: -0.025em; text-decoration: none; }
.metier .ouvrir:hover { color: #ffd9b0; }
.metier p { font-size: clamp(14.5px, 1.05vw, 17px); line-height: 1.5; color: rgba(247, 241, 227, 0.84); }
.metier .suite { justify-self: start; padding: 6px 0; border: 0; border-bottom: 1px solid rgba(247, 241, 227, 0.5); background: none; color: var(--cream); font: 600 clamp(14px, 1vw, 16px)/1.1 DM, sans-serif; text-decoration: none; text-shadow: none; }
.metier .suite i { font-style: normal; color: var(--copper-clair); }
.metier .suite:hover { border-color: #fff; }
@media (max-width: 1080px) { .metiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* --- Téléphone (sous 760 px) : photo en hauteur, cockpit sur une tablette debout. Le titre et le bouton passent sous la tablette. --- */
@media (max-width: 760px) {
  .page-timonerie .entree .stage::before { background: linear-gradient(0deg, rgba(14, 10, 6, 0.92), rgba(14, 10, 6, 0.74) 20%, rgba(14, 10, 6, 0) 40%), linear-gradient(180deg, rgba(14, 10, 6, 0.6), rgba(14, 10, 6, 0) 16%); }
  .page-timonerie .e-texte { inset: auto var(--marge) 22px; gap: 10px; }
  .page-timonerie .entree h1 { font-size: min(7.6vw, 32px); }
  .page-timonerie .e-texte .actions { margin-top: 4px; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
  .page-timonerie .e-texte .actions .bouton { flex: 1 1 auto; }
  .page-timonerie .defiler { display: none; }
  .poste-barre { top: calc(100% + 12px); flex-direction: column; align-items: stretch; gap: 10px; left: 0; translate: none; box-sizing: border-box; width: 100%; max-width: none; padding: 12px 14px; border-radius: 18px; }
  .poste-barre p { justify-content: center; white-space: normal; text-align: center; }
  .poste-barre div { justify-content: space-between; gap: 12px; }
  .poste-barre .lien { font-size: 13.5px; } .poste-barre .bouton { padding: 10px 14px; font-size: 14px; }
  .metiers { grid-template-columns: 1fr; }
  .a-puces { grid-template-columns: 1fr; }
  .autre-question { grid-template-columns: 1fr; }
}
/* téléphone : la barre sous le cockpit tient dans sa largeur (le bouton « Continuer la visite » dépassait à droite) */
@media (max-width: 760px) {
  .poste-barre { top: calc(100% + 10px); padding: 10px 12px; gap: 8px; }
  .poste-barre p { font-size: 13px; line-height: 1.3; }
  .poste-barre div { flex-direction: column; align-items: stretch; gap: 6px; }
  .poste-barre .lien { font-size: 13px; text-align: center; }
  .poste-barre .bouton { justify-content: center; padding: 11px 12px; font-size: 14px; gap: 6px; }
  .poste iframe { overscroll-behavior: contain; }
}

/* téléphone : le cockpit ouvert prend tout l'écran ; la barre « Données inventées / Continuer » se pose en haut, par-dessus */
@media (max-width: 760px) {
  .poste.plein { position: fixed !important; inset: 0 !important; width: auto !important; height: auto !important; z-index: 60; opacity: 1 !important; }
  .poste.plein { display: flex !important; flex-direction: column; } /* l'application au-dessus, la barre dessous : la barre ne recouvre plus le bas de l'application */
  .poste.plein iframe { position: static; flex: 1 1 auto; min-height: 0; width: 100% !important; height: auto !important; transform: none !important; border-radius: 0; }
  .poste.plein .poste-barre { position: static; flex: none; box-sizing: border-box; translate: none; width: 100%; max-width: none; border-radius: 16px 16px 0 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .poste.plein .poste-barre p { display: none; }
  .poste.plein .poste-barre div { flex-direction: row; align-items: center; }
  .poste.plein .poste-barre .lien { flex: 1; }
  .poste.plein .poste-barre .bouton { flex: 1; }
  html.cockpit-plein { overflow: hidden; }
  html.cockpit-plein .topbar { display: none; }
}
