#ios-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: flex;
  align-items: flex-end;
}
#ios-menu-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ios-menu-panel {
  width: 100%;
  max-height: 88vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
#ios-menu-overlay.is-active .ios-menu-panel {
  transform: translateY(0);
}
.ios-menu-handle {
  width: 36px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.ios-menu-header {
  padding: 10px 14px 12px;
  border-bottom: 0.5px solid #f3f4f6;
  flex-shrink: 0;
}
.ios-menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ios-menu-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
}
.ios-menu-close:hover { background: #e5e7eb; }
.ios-menu-search-wrap { position: relative; }
#ios-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid #8891a4; /* tâche 42 : 3,03:1 sur #f9fafb (WCAG 1.4.11), était #e5e7eb à 1,18:1 */
  border-radius: 12px;
  background: #f9fafb;
  color: #111;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
#ios-search::placeholder { color: #6b7484; }
#ios-search:focus { border-color: #1d4ed8; background: #fff; }
#ios-search-results {
  margin-top: 8px;
  display: none;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #dbe7f6;
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}
#ios-search-results.has-results { display: block; }
.ios-search-item {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: start;
  gap: 12px;
  padding: 13px 16px;
  border-top: 0.5px solid #f3f4f6;
  cursor: pointer;
  color: #111;
  font-size: 14px;
  transition: background .12s, transform .12s;
}
.ios-search-item:first-child { border-top: 0; }
.ios-search-item:hover { background: #f8fbff; }
.ios-search-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}
.ios-search-item__text {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ios-search-item__title {
  display: block;
  color: #10284d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.ios-search-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}
.ios-search-item__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f8ff;
  border: 1px solid #dbe7f6;
  color: #245ea6;
  font-weight: 700;
}
.ios-search-item__path {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ios-search-item__path::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  flex: none;
}
#ios-menu {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 220px;
  background: #fff;
}
.ios-view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  left: 100%;
  padding: 6px 0 12px;
  transition: left 0.26s ease;
}
.ios-view.active { left: 0; }
.ios-back {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 28px);
  margin: 6px 14px 10px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  padding: 0 14px;
  cursor: pointer;
  transition: background .15s;
}
.ios-back:hover { background: #e5e7eb; }
.ios-item {
  min-height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0.5px solid #f3f4f6;
  cursor: pointer;
  transition: background .12s;
}
.ios-item:hover, .ios-item:active { background: #f9fafb; }
.ios-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.ios-item-icon--sub {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
}
.ios-item-title { font-size: 15px; color: #111; flex: 1; }
.ios-item-chevron { color: #8d95a3; font-size: 12px; }
.ios-menu-footer {
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 0.5px solid #f3f4f6;
  flex-shrink: 0;
}
.ios-menu-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #7c3aed;
  color: #fff !important;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .15s;
}
.ios-menu-support-btn:hover { background: #6d28d9; }
/* ── Skeleton loader ── */
@keyframes ios-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.ios-search-skeleton {
  padding: 13px 16px;
  border-top: 0.5px solid #f3f4f6;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
}
.ios-search-skeleton:first-child { border-top: 0; }
.ios-skeleton-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5eaf2 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: ios-shimmer 1.4s linear infinite;
}
.ios-skeleton-lines { display: grid; gap: 7px; }
.ios-skeleton-line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5eaf2 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: ios-shimmer 1.4s linear infinite;
}
.ios-skeleton-line--short { width: 55%; }

/* ── Bouton "voir plus" ── */
@keyframes ios-bounce-in {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes ios-bounce-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); }
}
.ios-search-more {
  padding: 13px 16px;
  border-top: 1px solid #dbe7f6;
  text-align: center;
  background: #f4f8ff;
  cursor: pointer;
}
.ios-search-more:hover { background: #e8f0fe; }
.ios-search-more__label {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: #1d4ed8;
  animation:
    ios-bounce-in   0.4s  cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s  1 both,
    ios-bounce-pulse 0.45s ease-in-out                        1.1s  4 both;
}

@media (min-width: 992px) {
  #ios-menu-overlay { display: none !important; }
}
