/* Drawer hamburger inter-pages — accès rapide à toute page sans repasser par le hub.
   Style aligné sur .cm-back (transparent + liseré or + outline blanc), charte
   page-type carte-menu. Bouton fixe haut-droite, panneau qui glisse depuis la droite. */

.pd-button {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9998;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #F5EDD5;
  background: transparent;
  border: 1px solid #C99A4E;
  outline: 1px solid rgba(255, 255, 255, .25);
  outline-offset: -4px;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .75), 0 0 2px rgba(0, 0, 0, .6);
  box-shadow: none;
  transition: color .25s, border-color .25s, transform .25s;
}
.pd-button:hover {
  color: var(--red, #A63828);
  border-color: var(--red, #A63828);
  transform: translateY(-1px);
}

.pd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  z-index: 9998;
  transition: opacity .25s, visibility .25s;
}
.pd-overlay.is-open { opacity: 1; visibility: visible; }

.pd-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(320px, 88vw);
  z-index: 9999;
  background: rgba(28, 15, 2, .92);
  border-left: 1px solid #C99A4E;
  outline: 1px solid rgba(255, 255, 255, .15);
  outline-offset: -5px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  padding: 22px 18px 24px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .35);
}
.pd-panel.is-open { transform: translateX(0); }

.pd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(201, 154, 78, .35);
}
.pd-title {
  font-family: var(--font-title, 'Cardo', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  color: #F5EDD5;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
}
.pd-close {
  background: transparent;
  border: 1px solid #C99A4E;
  outline: 1px solid rgba(255, 255, 255, .25);
  outline-offset: -3px;
  color: #F5EDD5;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.pd-close:hover { color: var(--red, #A63828); border-color: var(--red, #A63828); }

.pd-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
.pd-list li { margin: 0 0 8px; }
.pd-list a {
  display: block;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 15px;
  color: #F5EDD5;
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background .2s, border-color .2s, color .2s;
}
.pd-list a:hover {
  background: rgba(201, 154, 78, .12);
  border-color: rgba(201, 154, 78, .45);
}
.pd-list a.is-current {
  background: rgba(201, 154, 78, .18);
  border-color: #C99A4E;
  color: #F5EDD5;
  font-weight: 600;
}
.pd-list a.is-current::after {
  content: '•';
  float: right;
  color: #C99A4E;
  font-weight: 700;
}

@media (max-width: 600px) {
  .pd-button { top: 12px; right: 12px; width: 42px; height: 42px; font-size: 20px; }
  .pd-panel { padding: 18px 14px 20px; }
}

/* Boutons d'action de page (Mémoires, Télécharger…) à droite de l'entête : sur téléphone
   (portrait ET paysage), réserver la place du bouton ☰ fixe pour qu'ils ne passent pas
   dessous. Le ☰ occupe ~62px en haut à droite (right:18 + 44px) → on décale de 68px. */
@media (max-width: 768px), (max-height: 500px) and (pointer: coarse) {
  .cm-head-actions { margin-right: 68px !important; }
}
