/* ============================================================
   Linov Menu – Panneau latéral accordéon
   #EC9823 | #96C33E | #0268AA
   ============================================================ */

:root {
  --linov-orange : #EC9823;
  --linov-green  : #96C33E;
  --linov-blue   : #0268AA;
  --linov-white  : #ffffff;
  --linov-light  : #f4f6f9;
  --linov-text   : #1a1a2e;
  --linov-muted  : #6b7280;
  --linov-border : #e5e7eb;
  --linov-width  : 320px;
  --linov-speed  : 0.28s;
  --linov-ease   : cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Burger ──────────────────────────────────────────────── */
.linov-burger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 14px;
  height: 68px;
  background: var(--linov-orange);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--linov-ease), transform 0.15s;
}

.linov-burger:hover  { background: #d4840f; }
.linov-burger:active { transform: scale(0.97); }

.linov-burger__icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
  flex-shrink: 0;
}

.linov-burger__icon span {
  display: block;
  height: 2px;
  background: var(--linov-white);
  border-radius: 2px;
  transition: transform var(--linov-speed) var(--linov-ease),
              opacity   var(--linov-speed) var(--linov-ease);
  transform-origin: center;
}

.linov-burger__label {
  color: var(--linov-white);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

.linov-burger.is-active .linov-burger__icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.linov-burger.is-active .linov-burger__icon span:nth-child(2) { opacity: 0; }
.linov-burger.is-active .linov-burger__icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Overlay ──────────────────────────────────────────────── */
.linov-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.5);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--linov-speed) var(--linov-ease);
  backdrop-filter: blur(2px);
}

.linov-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Panneau ──────────────────────────────────────────────── */
.linov-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--linov-width);
  max-width: 88vw;
  background: var(--linov-white);
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform var(--linov-speed) var(--linov-ease);
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 32px rgba(0, 0, 0, 0.12);
}

.linov-panel.is-open { transform: translateX(0); }

/* ── Header du panneau ────────────────────────────────────── */
.linov-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  background: var(--linov-blue);
  flex-shrink: 0;
}

.linov-panel__title {
  color: var(--linov-white);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.linov-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: var(--linov-white);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.linov-panel__close:hover { background: rgba(255,255,255,0.25); }

/* ── Corps ────────────────────────────────────────────────── */
.linov-panel__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.linov-panel__body::-webkit-scrollbar { width: 4px; }
.linov-panel__body::-webkit-scrollbar-track { background: transparent; }
.linov-panel__body::-webkit-scrollbar-thumb { background: var(--linov-border); border-radius: 2px; }

/* ── Listes ───────────────────────────────────────────────── */
.linov-cat-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

/* ── Items ────────────────────────────────────────────────── */
.linov-cat-item {
  border-bottom: 1px solid var(--linov-border);
}
.linov-cat-item:last-child { border-bottom: none; }

.linov-cat-item__row {
  display: flex;
  align-items: stretch;
}

/* ── Lien catégorie ───────────────────────────────────────── */
.linov-cat-item__link {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 13px 16px;
  color: var(--linov-text);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  line-height: 1.3;
}

.linov-cat-item__link:hover,
.linov-cat-item__link:focus-visible {
  color: var(--linov-blue);
  background: #eef5fc;
  border-left-color: var(--linov-blue);
  outline: none;
}

/* ── Bouton toggle chevron ────────────────────────────────── */
.linov-cat-item__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--linov-border);
  color: var(--linov-muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.linov-cat-item__toggle:hover {
  background: var(--linov-light);
  color: var(--linov-blue);
}

.linov-chevron {
  transition: transform var(--linov-speed) var(--linov-ease);
  display: block;
}

.linov-cat-item.is-expanded > .linov-cat-item__row .linov-chevron {
  transform: rotate(180deg);
}

/* ── Enfants (accordéon) ──────────────────────────────────── */
.linov-children {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--linov-speed) var(--linov-ease);
}

.linov-children.is-open {
  grid-template-rows: 1fr;
}

.linov-children__inner {
  overflow: hidden;
}

/* ── Niveau 2 ─────────────────────────────────────────────── */
.linov-cat-list--depth-1 {
  background: #fafbfc;
  padding: 4px 0;
  border-top: 1px solid var(--linov-border);
}

.linov-cat-list--depth-1 .linov-cat-item__link {
  padding-left: 28px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.linov-cat-list--depth-1 .linov-cat-item__link:hover,
.linov-cat-list--depth-1 .linov-cat-item__link:focus-visible {
  color: var(--linov-orange);
  background: #fff8ee;
  border-left-color: var(--linov-orange);
}

.linov-cat-list--depth-1 .linov-cat-item__toggle {
  width: 40px;
}

/* ── Niveau 3+ ────────────────────────────────────────────── */
.linov-cat-list--depth-2,
.linov-cat-list--depth-3 {
  background: #f6f8f2;
  padding: 2px 0;
  border-top: 1px solid #e8eed8;
}

.linov-cat-list--depth-2 .linov-cat-item__link,
.linov-cat-list--depth-3 .linov-cat-item__link {
  padding-left: 40px;
  font-size: 0.84rem;
  font-weight: 400;
  color: #4b5563;
}

.linov-cat-list--depth-2 .linov-cat-item__link:hover,
.linov-cat-list--depth-2 .linov-cat-item__link:focus-visible,
.linov-cat-list--depth-3 .linov-cat-item__link:hover,
.linov-cat-list--depth-3 .linov-cat-item__link:focus-visible {
  color: var(--linov-green);
  background: #f2f8e8;
  border-left-color: var(--linov-green);
}

.linov-cat-list--depth-2 .linov-cat-item__toggle,
.linov-cat-list--depth-3 .linov-cat-item__toggle {
  width: 36px;
  color: var(--linov-green);
}

/* ── Hover CSS pur (souris uniquement) ───────────────────────── */
/* TEST sous-panneau droit : accordéon inline hover désactivé
   (remplacé par l'ouverture JS du sous-panneau sur desktop)

@media (hover: hover) {
  .linov-cat-item.has-children:hover > .linov-children {
    grid-template-rows: 1fr;
  }

  .linov-cat-item.has-children:hover > .linov-cat-item__row .linov-chevron {
    transform: rotate(180deg);
  }

  .linov-cat-item.has-children:hover > .linov-cat-item__row > .linov-cat-item__link {
    color: var(--linov-orange);
    background: #fff8ee;
    border-left-color: var(--linov-orange);
  }

  .linov-cat-item.has-children:hover > .linov-cat-item__row > .linov-cat-item__toggle {
    color: var(--linov-orange);
  }
}

*/

/* Fallback tactile (classe JS) */
.linov-cat-item.is-expanded > .linov-children {
  grid-template-rows: 1fr;
}
.linov-cat-item.is-expanded > .linov-cat-item__row .linov-chevron {
  transform: rotate(180deg);
}
.linov-cat-item.is-expanded > .linov-cat-item__row > .linov-cat-item__link {
  color: var(--linov-orange);
  background: #fff8ee;
  border-left-color: var(--linov-orange);
}

/* ── Blocage scroll body ──────────────────────────────────── */
body.linov-no-scroll { overflow: hidden; }

/* ── TEST : Sous-panneau droit (desktop hover uniquement) ────── */
@media (hover: hover) and (min-width: 768px) {
  #linov-sub-panel {
    position: fixed;
    top: 0;
    left: var(--linov-width);
    height: 100%;
    width: var(--linov-width);
    background: var(--linov-white);
    z-index: 1100;
    transform: translateX(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--linov-speed) var(--linov-ease),
                opacity   var(--linov-speed) var(--linov-ease);
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.10);
    overflow: hidden;
  }

  #linov-sub-panel.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .linov-sub-panel__header {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background: var(--linov-orange);
    flex-shrink: 0;
  }

  .linov-sub-panel__title {
    color: var(--linov-white);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .linov-sub-panel__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

}

/* Chevrons pointent à droite dans le sous-panneau (ID = spécificité maximale) */
#linov-sub-panel .linov-chevron {
  transform: rotate(-90deg);
}
#linov-sub-panel .linov-cat-item.is-expanded > .linov-cat-item__row .linov-chevron {
  transform: rotate(0deg);
}

/* ── Image catégorie ──────────────────────────────────────── */
.linov-cat-item__img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 10px;
}