/* Popup de choix du mode de commande.
   Autonome (pas de Tailwind), couleurs alignees sur la charte du site.
   Voir js/commande.js pour le comportement. */

.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 27, 27, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .22s ease;
}

.cmd-overlay[hidden] {
  display: none;
}

.cmd-overlay.is-open {
  opacity: 1;
}

.cmd-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px 22px;
  box-shadow: 0 30px 70px -15px rgba(28, 27, 27, 0.35);
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), opacity .26s ease;
}

.cmd-overlay.is-open .cmd-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cmd-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 9999px;
  background: #f0eded;
  color: #4f4444;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}

.cmd-close:hover {
  background: #e5e2e1;
  transform: rotate(90deg);
}

.cmd-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: #1c1b1b;
  margin: 0 36px 6px 0;
}

.cmd-sub {
  font-family: "Nunito Sans", sans-serif;
  font-size: 14px;
  color: #4f4444;
  margin: 0 0 18px;
}

.cmd-group {
  font-family: "Nunito Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a8c8c;
  margin: 16px 0 8px;
}

.cmd-group:first-of-type {
  margin-top: 4px;
}

.cmd-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #ece4e4;
  border-radius: 16px;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease, box-shadow .2s ease;
}

.cmd-opt:last-child {
  margin-bottom: 0;
}

.cmd-opt:hover,
.cmd-opt:focus-visible {
  border-color: #F0979F;
  background: #fdf3f4;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(240, 151, 159, 0.6);
  outline: none;
}

.cmd-ico {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c, #F0979F);
  background: #f3eded;
  background: color-mix(in srgb, var(--c, #F0979F) 15%, #ffffff);
}

.cmd-ico .material-symbols-outlined {
  font-size: 24px;
}

.cmd-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmd-opt-title {
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1c1b1b;
}

.cmd-opt-desc {
  font-family: "Nunito Sans", sans-serif;
  font-size: 13px;
  color: #6f6363;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmd-arrow {
  flex-shrink: 0;
  color: #c3b6b6;
  font-size: 20px;
  transition: transform .2s ease, color .2s ease;
}

.cmd-opt:hover .cmd-arrow,
.cmd-opt:focus-visible .cmd-arrow {
  color: #F0979F;
  transform: translateX(3px);
}

/* Variante bas d'ecran (bottom-sheet) sur mobile */
@media (max-width: 480px) {
  .cmd-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .cmd-dialog {
    max-width: none;
    border-radius: 24px 24px 0 0;
    padding-bottom: 28px;
    transform: translateY(100%);
  }
  .cmd-overlay.is-open .cmd-dialog {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmd-overlay,
  .cmd-dialog,
  .cmd-close,
  .cmd-opt,
  .cmd-arrow {
    transition: opacity .15s ease;
    transform: none !important;
  }
}
/* --- Menu mobile anime (deroule + apparition en cascade des liens) --- */
.mobile-menu-panel {
  overflow: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height .4s cubic-bezier(.22,1,.36,1), opacity .3s ease, transform .3s ease, padding .3s ease;
  pointer-events: none;
}
.mobile-menu-panel.open {
  max-height: 24rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu-panel a {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
}
.mobile-menu-panel.open a { opacity: 1; transform: translateY(0); }
.mobile-menu-panel.open a:nth-child(1) { transition-delay: .08s; }
.mobile-menu-panel.open a:nth-child(2) { transition-delay: .14s; }
.mobile-menu-panel.open a:nth-child(3) { transition-delay: .20s; }
.mobile-menu-panel.open a:nth-child(4) { transition-delay: .26s; }
.mobile-menu-panel.open a:nth-child(5) { transition-delay: .32s; }
.mobile-menu-panel.open a:nth-child(6) { transition-delay: .38s; }
.mobile-menu-panel.open a:nth-child(7) { transition-delay: .44s; }
#mobile-menu-btn .material-symbols-outlined { transition: transform .3s ease; }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-panel, .mobile-menu-panel a { transition: opacity .2s ease; transform: none; }
}