/* En-tête, modèle 3 : une plaque blanche détachée, un autocollant posé sur l'affiche.
   Fond plein (le convoi bouge dessous) ; inversée en encre quand le panneau blanc est ouvert. */
.plaque {
  position: fixed;
  z-index: 40;
  top: calc(var(--demobar-offset, 0px) + 10px);
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px 0 12px;
  background: var(--blanc);
  color: var(--encre);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--profond);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.plaque.inverse {
  background: var(--encre);
  color: var(--blanc);
  box-shadow: 0 10px 30px -12px rgb(27 15 23 / 0.45);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
  color: inherit;
}
.logo-signe { width: 32px; height: 32px; flex: none; }
.logo-texte { display: block; position: relative; }
.logo-mot { width: 96px; height: 17px; fill: currentColor; }
.logo-sous { display: none; }
@media (max-width: 379px) { .logo-texte { display: none; } }

.plaque-actions { display: flex; align-items: center; gap: 8px; }
.venir {
  order: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 600;
  font-size: 16px;
  border-radius: 6px;
}
.venir svg { width: 22px; height: 22px; flex: none; }
.venir-mots { display: grid; }
.venir-mots > span { grid-area: 1 / 1; transition: opacity 0.2s; }
.m-fermer { opacity: 0; }
.plaque.inverse .m-ouvrir { opacity: 0; }
.plaque.inverse .m-fermer { opacity: 1; }

.plaque-tel { display: none; }

.reserver {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 44px;
  padding: 0 14px;
  background: var(--magenta);
  color: var(--blanc);
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.1s;
}
.reserver:active { transform: scale(0.98); background: var(--profond); }
.reserver-total { display: none; }

@media (hover: hover) {
  .venir:hover .venir-mots { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
  .plaque-tel:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
  .reserver:hover { background: var(--profond); }
}

@media (min-width: 600px) {
  .plaque {
    top: calc(var(--demobar-offset, 0px) + 16px);
    left: 50%;
    right: auto;
    width: min(1180px, 100% - 32px);
    height: 64px;
    transform: translateX(-50%);
    padding: 0 8px 0 20px;
    box-shadow: 6px 6px 0 var(--profond);
  }
  .logo { gap: 10px; }
  .logo-signe { width: 36px; height: 36px; }
  .logo-mot { width: 128px; height: 22px; }
  .logo-sous {
    display: block;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
  }
  .logo { padding-bottom: 8px; }
  .plaque-actions { gap: 0; }
  .venir { order: 0; margin-right: 20px; }
  .plaque-tel {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-right: 16px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
  }
  .reserver { order: 0; width: 168px; height: 48px; }
  .reserver-total:not(:empty) { display: inline; }
  .reserver-total:not(:empty)::before { content: " · "; white-space: pre; }
}
