/* ==========================================================
   Aide & Tutoriels — Styles (cohérents Contact/FAQ + fond blanc)
   + Ajustements Mobile: switch masqué, tabs scrollables
   ========================================================== */

/* ---------- Variables ---------- */
:root{
  --aide-max: 1260px;
  --aide-ink: #0f172a;
  --aide-muted: #334155;
  --aide-accent: var(--ghost-accent-color, #2563eb);
  --aide-border: rgba(2,6,23,.08);
  --aide-radius-lg: var(--radius-xl);  /* 20px → variable globale */
  --aide-radius-md: var(--radius-md);  /* 14px → 12px (arrondi standard) */
  --aide-radius-sm: var(--radius-sm);  /* 10px → 8px (arrondi standard) */
}

html{scroll-behavior:smooth}

/* ---------- Layout (fond blanc + police Contact) ---------- */
.aide-wrap{background:#fff;font-family:var(--codex-body-font)}
.aide-container{width:100%;max-width:var(--aide-max);margin-inline:auto;padding-inline:20px}

/* ---------- HERO (aligné Colonies/Home sans CTA) ---------- */
.aide-hero{
  position:relative;
  left:50%;
  width:100vw;
  transform:translateX(-50%);
  min-height:clamp(560px, 70vh, 860px);
  margin-top: calc(var(--header-height) - 25px);
  /* padding-top supprimé : offset géré centralement par .page-has-hero .aide-hero dans custom.css */
  display:grid;
  place-items:center;
  overflow:hidden;
  isolation:isolate;
  background:#0b1220;
}
.aide-hero__media{
  position:absolute;
  inset:0;
  z-index:0;
}
.aide-hero__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  transform:scale(1.12);
  filter:contrast(1.06) saturate(1.08);
  animation: hero-image-zoom-aide 20s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hero-image-zoom-aide{
  0%{transform:scale(1.12)}
  100%{transform:scale(1.18)}
}
.aide-hero__overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(15,23,42,.24) 0%,rgba(15,23,42,.58) 50%,rgba(15,23,42,.78) 100%),
             linear-gradient(135deg,rgba(37,99,235,.16) 0%,rgba(37,99,235,.08) 100%);
  z-index:1;
  pointer-events:none;
  animation: hero-gradient-shift-aide 8s ease-in-out infinite alternate;
  will-change: opacity;
}

/* Adaptation couleurs selon la saison (sync avec page d'accueil) */
[data-homepage-season="hiver"] .aide-hero__overlay {
  background:linear-gradient(180deg,rgba(15,23,42,.24) 0%,rgba(15,23,42,.58) 50%,rgba(15,23,42,.78) 100%),
             linear-gradient(135deg,rgba(37,99,235,.16) 0%,rgba(37,99,235,.08) 100%);
}
[data-homepage-season="printemps"] .aide-hero__overlay {
  background:linear-gradient(180deg,rgba(15,23,42,.24) 0%,rgba(15,23,42,.58) 50%,rgba(15,23,42,.78) 100%),
             linear-gradient(135deg,rgba(16,185,129,.16) 0%,rgba(16,185,129,.08) 100%);
}
[data-homepage-season="ete"] .aide-hero__overlay {
  background:linear-gradient(180deg,rgba(15,23,42,.24) 0%,rgba(15,23,42,.58) 50%,rgba(15,23,42,.78) 100%),
             linear-gradient(135deg,rgba(245,158,11,.16) 0%,rgba(245,158,11,.08) 100%);
}
[data-homepage-season="automne"] .aide-hero__overlay {
  background:linear-gradient(180deg,rgba(15,23,42,.24) 0%,rgba(15,23,42,.58) 50%,rgba(15,23,42,.78) 100%),
             linear-gradient(135deg,rgba(217,119,6,.16) 0%,rgba(217,119,6,.08) 100%);
}
@keyframes hero-gradient-shift-aide{
  0%{opacity:1}
  100%{opacity:0.88}
}
.aide-hero__content{
  position:relative;
  z-index:2;
  width:100%;
  padding: 6vh 4vw;
  text-align:center;
  color:#fff;
}
.aide-hero__inner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:1rem;
  align-items:center;
}
.aide-hero__badge{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:.6em;
  padding:.55em 1.1em;
  border-radius:var(--radius-pill);
  font-weight:800;
  letter-spacing:.04em;
  background:rgba(255,255,255,.18);
  backdrop-filter:saturate(140%) blur(12px);
  border:1px solid rgba(148,186,255,.35);
  box-shadow:0 16px 40px rgba(37,99,235,.26);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  animation: badge-pulse-aide 3s ease-in-out infinite;
}
.aide-hero__badge:hover{
  animation: none;
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(37,99,235,.35);
}
.aide-hero__badge::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:var(--radius-circle);
  background:linear-gradient(135deg,#60a5fa,#3b82f6);
  box-shadow:0 0 8px rgba(96,165,250,.6);
  animation:badge-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes badge-pulse-aide{
  0%, 100%{
    box-shadow: 0 16px 40px rgba(37,99,235,.26);
    transform: scale(1);
  }
  50%{
    box-shadow: 0 20px 46px rgba(37,99,235,.32);
    transform: scale(1.02);
  }
}
@keyframes badge-dot-pulse{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.7;transform:scale(.92)}
}
.aide-hero__title{
  margin:0;
  font-weight:900;
  letter-spacing:-.01em;
  font-size:clamp(2.1rem,4.2vw,3.2rem);
  line-height:1.18;
  color:#f8fbff;
  text-shadow:0 18px 46px rgba(12,19,34,.45),0 6px 20px rgba(12,19,34,.3),0 2px 0 rgba(12,19,34,.4);
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  cursor: default;
}
.aide-hero__title:hover{
  transform: translateY(-2px);
  text-shadow: 0 22px 52px rgba(12,19,34,.52), 0 8px 24px rgba(12,19,34,.38), 0 3px 0 rgba(12,19,34,.45);
}
.aide-hero__lead{
  margin:0;
  max-width:720px;
  font-size:clamp(1.05rem,1.8vw,1.3rem);
  color:rgba(226,240,255,.98);
  text-shadow:0 12px 28px rgba(12,19,34,.4);
  transition: transform 0.3s ease;
  cursor: default;
}
.aide-hero__lead:hover{
  transform: translateY(-1px);
}

/* ---------- Favoris (grid moderne) ---------- */
.aide-featured{padding:32px 0 18px}
.aide-featured__title{
  margin:0 0 20px;
  font-size:1.5rem;
  font-weight:900;
  color:var(--aide-ink);
  text-align:center;
}
.aide-featured__grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:16px;
}
.aide-featured-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:20px;
  background:#fff;
  border:1px solid rgba(148,186,255,.28);
  border-radius:var(--radius-lg);
  text-decoration:none;
  box-shadow:0 8px 24px rgba(37,99,235,.08);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  will-change: transform;
}
.aide-featured-card:hover{
  transform:translateY(-6px);
  box-shadow:0 16px 40px rgba(37,99,235,.18);
  border-color:rgba(96,165,250,.4);
}
.aide-featured-card__icon{
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  background:linear-gradient(135deg, rgba(96,165,250,.12), rgba(37,99,235,.08));
  border-radius:var(--radius-md);
  border:1px solid rgba(96,165,250,.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.aide-featured-card:hover .aide-featured-card__icon{
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 0 8px 20px rgba(37,99,235,.2);
}
.aide-featured-card__title{
  margin:0;
  font-size:1rem;
  font-weight:700;
  line-height:1.4;
  text-align:center;
  color:var(--aide-ink);
  transition: color 0.2s ease;
}
.aide-featured-card:hover .aide-featured-card__title{
  color: var(--aide-accent);
}
@media (max-width:768px){
  .aide-featured{padding:24px 0 14px}
  .aide-featured__title{font-size:1.3rem;margin-bottom:16px}
  .aide-featured__grid{
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
  }
  .aide-featured-card{
    padding:14px 12px;
    gap:8px;
    border-radius:var(--radius-md);
  }
  .aide-featured-card__icon{
    width:36px;
    height:36px;
    font-size:18px;
    border-radius:var(--radius-sm);
  }
  .aide-featured-card__title{
    font-size:.88rem;
    line-height:1.3;
  }
}

/* ---------- Gaps ---------- */
.aide-gap{height:18px}
.aide-gap--after-featured{height:16px}
.aide-gap--after-search{height:24px}
.aide-gap--after-grid{height:48px}

/* ---------- Tabs + Switch ---------- */
.aide-tabs-wrap{
  position:relative;
  top:auto;
  z-index:1;
  background:linear-gradient(180deg,rgba(255,255,255,.95) 0%,rgba(255,255,255,.82) 80%,rgba(255,255,255,0) 100%);
  padding:18px 0 22px;
}
.aide-tabs-wrap>.aide-container{display:flex;justify-content:center}
.aide-tabsbox{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  background:#fff;
  border:1px solid var(--aide-border);
  border-radius:var(--aide-radius-lg);
  box-shadow:0 22px 46px rgba(2,6,23,.10);
  padding:22px clamp(18px,4vw,28px);
  display:grid;
  gap:18px;
}
.aide-tabsbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid var(--aide-border);
  padding-bottom:14px;
  margin-bottom:4px;
  min-width:0;
}
.aide-tabs{
  display:flex;
  gap:.5rem;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  flex:1;
  min-width:0;
  scroll-snap-type:x mandatory;
  padding-bottom:4px;
  scrollbar-width:thin;
  scrollbar-color:rgba(96,165,250,.35) transparent;
}
.aide-tabs::-webkit-scrollbar{height:4px}
.aide-tabs::-webkit-scrollbar-track{background:transparent}
.aide-tabs::-webkit-scrollbar-thumb{
  background:rgba(96,165,250,.35);
  border-radius:var(--radius-pill);
}
.aide-tab{
  position:relative;
  appearance:none;
  border:1px solid transparent;
  background:transparent;
  color:var(--aide-muted);
  border-radius:var(--aide-radius-sm);
  padding:.6rem 1rem;
  font-weight:700;
  font-size:.95rem;
  white-space:nowrap;
  cursor:pointer;
  transition:color .2s ease, background .2s ease, transform 0.2s ease;
  flex-shrink:0;
  scroll-snap-align:start;
}
.aide-tab::after{
  content:"";
  position:absolute;
  bottom:0;
  left:50%;
  transform:translateX(-50%) scaleX(0);
  width:80%;
  height:3px;
  border-radius:var(--radius-pill);
  background:linear-gradient(90deg,#60a5fa,#3b82f6);
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.aide-tab:hover{
  color:var(--aide-ink);
  background:rgba(96,165,250,.06);
  transform: translateY(-1px);
}
.aide-tab:focus,
.aide-tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(96,165,250,.35);
}
.aide-tab.is-active::after, 
.aide-tab[aria-selected="true"]::after{
  transform:translateX(-50%) scaleX(1);
}
.aide-tab.is-active, 
.aide-tab[aria-selected="true"]{
  color:var(--aide-accent);
  background:rgba(96,165,250,.08);
}
.aide-tab.is-active:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37,99,235,.18);
}
.aide-tab--visually-hidden{position:absolute;inline-size:1px;block-size:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);border:0;padding:0}

@media (max-width: 768px){
  .aide-tabsbar{
    margin:0 -1rem;
    padding-inline:1rem;
  }
  .aide-tabs{
    gap:.35rem;
  }
}

/* Switch (radios) */
.aide-view{display:flex;gap:6px;margin:0;padding:0;border:0;align-items:center}
.aide-view__input{position:absolute;opacity:0;pointer-events:none}
.aide-view__btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:38px;padding:0;
  border:1px solid var(--aide-border);border-radius:var(--radius-md);background:#fff;color:var(--aide-ink);
  font-weight:800;cursor:pointer;user-select:none;box-shadow:0 2px 0 rgba(2,6,23,.03);
}
.aide-view__btn:focus{outline:none}
.aide-view__ico{display:grid;place-items:center;pointer-events:none}
.aide-view__ico svg{
  width:18px;height:18px;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke:currentColor;
  fill:currentColor;
}
.aide-view__input:checked + .aide-view__btn{background:var(--aide-accent);border-color:transparent;color:#fff;box-shadow:0 10px 24px rgba(37,99,235,.22)}

/* ---------- Recherche ---------- */
.aide-search{margin:0;padding:0;min-width:0}
.aide-search__input{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:.85rem 1.2rem; /* Plus d'espace */
  border:1px solid var(--aide-border);
  border-radius:var(--radius-pill); /* Arrondi complet */
  background:#fff;
  color:var(--aide-ink);
  font-size:1rem;
  outline:none;
  box-shadow: var(--shadow-sm);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.aide-search__input:focus{
  border-color:var(--aide-accent);
  box-shadow:0 0 0 4px color-mix(in oklab, var(--aide-accent) 15%, #fff), var(--shadow-accent-md);
  /* Pas d'animation de glow, plus sobre/pro */
}
.aide-search__meta{margin-top:.65rem;display:grid;gap:.55rem}
.aide-search__hint{margin:0;color:var(--aide-muted);font-weight:800;font-size:.95rem}
.aide-search__suggestions{
  border:1px solid var(--aide-border);
  border-radius:var(--radius-md);
  background:linear-gradient(145deg, #fff, color-mix(in oklab, var(--aide-accent) 4%, #fff));
  box-shadow:0 10px 32px rgba(15,23,42,.08);
  padding:.6rem .8rem .75rem;
}
.aide-suggestions{list-style:none;margin:0;padding:0;display:grid;gap:.4rem}
.aide-suggestion{
  display:flex;align-items:center;gap:.55rem;
  padding:.55rem .65rem;
  border-radius:var(--radius-md);
  border:1px solid transparent;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.aide-suggestion::before{
  content:"";inline-size:8px;block-size:8px;border-radius:var(--radius-pill);
  background:var(--aide-accent);display:block;box-shadow:0 0 0 6px color-mix(in oklab, var(--aide-accent) 14%, #fff);
}
.aide-suggestion:hover{
  background:color-mix(in oklab, var(--aide-accent) 6%, #fff);
  border-color:color-mix(in oklab, var(--aide-accent) 35%, #fff);
  transform:translateY(-1px);
}
.aide-suggestion__link{
  color:var(--aide-ink);
  font-weight:800;
  text-decoration:none;
}
.aide-suggestion__link:focus-visible{
  outline:2px solid var(--aide-accent);
  outline-offset:3px;
  border-radius:var(--radius-sm);
}

@keyframes search-glow-aide{
  0%, 100%{
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--aide-accent) 12%, #fff), 0 8px 24px rgba(37,99,235,.15);
  }
  50%{
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--aide-accent) 18%, #fff), 0 12px 32px rgba(37,99,235,.22);
  }
}

/* ---------- Section head + contenu ---------- */
.aide-sec-head{display:grid;grid-template-columns:auto 1fr;gap:.75rem 1rem;align-items:start;margin:8px 0 14px}
.aide-sec-ico{display:grid;place-items:center;inline-size:40px;block-size:40px;border-radius:var(--radius-md);background:#fff;border:1px solid var(--aide-border);color:var(--aide-accent)}
.aide-sec-title{margin:0;align-self:center;font-size:1.25rem;line-height:1.2}
.aide-sec-copy{grid-column:1 / -1;background:#fff;border:1px solid var(--aide-border);border-radius:var(--aide-radius-md);padding:1rem 1rem .9rem;box-shadow:0 3px 0 rgba(2,6,23,.02)}
.aide-sec-copy p{margin:.2rem 0 .6rem;color:var(--aide-muted)}
.aide-points{display:grid;gap:.35rem;padding-left:1.1rem;margin:0}
.aide-points li{color:var(--aide-ink)}

/* ---------- Quick filters ---------- */

/* ---------- GRID (défaut) ---------- */
.aide-grid{display:grid;gap:14px;grid-template-columns:repeat(1,minmax(0,1fr))}
@media (min-width:768px){.aide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1024px){.aide-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

.aide-card{
  position:relative;
  background:#fff;
  border:1px solid rgba(226, 232, 240, 0.6); /* Bordure plus subtile */
  border-radius:var(--aide-radius-lg);
  box-shadow: var(--shadow-sm); /* Ombre douce par défaut */
  overflow:hidden;
  transition:transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1), border-color .3s ease;
  will-change: transform;
}
.aide-card:hover{
  transform:translateY(-6px);
  box-shadow: var(--shadow-accent-lg); /* Ombre colorée au survol */
  border-color:rgba(96,165,250,.3);
}
.aide-card.is-construction{
  opacity:.75;
  cursor:not-allowed;
}
.aide-card.is-construction:hover{
  transform:none;
  box-shadow:0 12px 32px rgba(15,23,42,.08);
  border-color:rgba(15,23,42,.06);
}
.aide-link{display:grid;grid-template-rows:auto 1fr auto;text-decoration:none;color:inherit;height:100%}
.aide-link.is-disabled{
  pointer-events:none;
  cursor:not-allowed;
  position:relative;
}
.aide-card.is-construction::after{
  content:"Vous ne pouvez pas accéder à cet article car il est toujours en cours de construction";
  position:absolute;
  bottom:-60px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(30,30,30,.95);
  color:#fff;
  padding:12px 16px;
  border-radius:var(--radius-sm);
  font-size:13px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, bottom .2s ease;
  z-index:100;
  box-shadow:0 8px 24px rgba(0,0,0,.2);
}
.aide-card.is-construction:hover::after{
  opacity:1;
  bottom:-70px;
}

/* Badges catégories (style colonies modernisé) */
.aide-card__badges{
  position:absolute;
  top:12px; /* Détaché */
  left:12px;
  display:flex;
  flex-direction:column;
  z-index:2;
  gap:8px;
}
.aide-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:50%; /* Rond parfait pour emoji */
  font-size:20px;
  line-height:1;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 8px 20px rgba(0,0,0,0.15);
  border:1px solid rgba(255,255,255,0.4);
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .3s ease;
}
.aide-badge:hover{
  transform:scale(1.15) rotate(5deg);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* Animation flottante légère */
@keyframes badge-float-aide{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-3px); }
}

/* Badges par catégorie (couleurs ajustées pour glassmorphism) */
.aide-badge--avant{
  background:rgba(59,130,246,0.9);
  border-color:rgba(255,255,255,0.3);
}
.aide-badge--avant::before{content:"📦"}

.aide-badge--pendant{
  background:rgba(16,185,129,0.9);
  border-color:rgba(255,255,255,0.3);
}
.aide-badge--pendant::before{content:"📸"}

.aide-badge--apres{
  background:rgba(245,158,11,0.9);
  border-color:rgba(255,255,255,0.3);
}
.aide-badge--apres::before{content:"🏠"}

.aide-badge--ressources{
  background:rgba(168,85,247,0.9);
  border-color:rgba(255,255,255,0.3);
}
.aide-badge--ressources::before{content:"💡"}

.aide-badge--construction{
  background:rgba(220,38,38,0.95);
  border:1px solid rgba(255,255,255,0.3);
  border-radius: 999px; /* Pill pour texte */
  width:auto;
  min-width:auto;
  padding:6px 14px;
  gap:6px;
  display:flex;
  align-items:center;
  color:#fff;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.05em;
  box-shadow:0 8px 20px rgba(220,38,38,0.3);
  position:absolute;
  top:auto;
  bottom:12px;
  left:12px;
  right:auto;
  z-index:3;
  height: 32px;
}
.aide-badge--construction::before{content:"🚧"; font-size:14px;}
.aide-badge--construction::after{content:"En travaux"}

/* Media */
.aide-media{position:relative;overflow:hidden;background:#f3f5f8}
.aide-media::before{content:"";display:block;aspect-ratio:16/10}
.aide-media__img{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;object-position:center;
  transition:transform .5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Plus smooth */
  will-change: transform;
}

@media (hover: hover) {
  .aide-card:hover .aide-media__img{transform:scale(1.08)}
}
.aide-media__ph{position:absolute;inset:0;background:repeating-linear-gradient(135deg,#eef2f7 0 12px,#e8edf4 12px 24px)}

/* Body/meta */
.aide-body{padding:1rem 1.1rem .7rem}
.aide-title{
  margin:0 0 .2rem;
  font-size:1.08rem;
  line-height:1.28;
  letter-spacing:-.01em;
  color:var(--aide-ink);
  font-weight:900;
  transition:color .2s ease;
}
.aide-card:hover .aide-title{color:#2563eb}
.aide-excerpt{margin:.2rem 0 0;color:#334155;font-size:.95rem;line-height:1.5}
.sr-only{position:absolute;inline-size:1px;block-size:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);border:0;padding:0}
.aide-meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.55rem .95rem .85rem;color:#334155;font-size:.88rem;border-top:1px solid var(--aide-border)}

/* ---------- Image construction (full size) ---------- */
.aide-media__img--construction{object-fit:cover;background:#f3f5f8}

/* ---------- Panels ---------- */
.aide-panel[hidden]{display:none}
.aide-panel.is-active{display:block}

/* ---------- Empty / No result ---------- */
.aide-empty, .aide-noresult{
  text-align:center;
  color:var(--aide-muted);
  padding:3rem 1rem;
  border: none; /* Plus de bordure pointillée */
  background: transparent; /* Fond transparent ou très léger */
  max-width:760px;
  margin:2rem auto 0;
}
.aide-empty::before, .aide-noresult::before {
  /* Icône via CSS ou HTML (si HTML modifié) */
  content: "🔍";
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

/* ---------- Back to top ---------- */
.aide-backtotop{
  position:fixed;right:16px;bottom:16px;z-index:3;inline-size:44px;block-size:44px;border-radius:var(--radius-pill);
  border:1px solid var(--aide-border);background:#fff;color:var(--aide-ink);
  display:grid;place-items:center;box-shadow:0 10px 30px rgba(2,6,23,.16);cursor:pointer;transition:transform .15s ease,opacity .15s ease,box-shadow .15s ease;
}
.aide-backtotop[hidden]{display:none}
.aide-backtotop:hover{transform:translateY(-1px);box-shadow:0 16px 40px rgba(2,6,23,.18)}

/* ==========================================================
   VARIANTES D’AFFICHAGE (desktop) via :has() / radios
   ========================================================== */
.aide-tabs-wrap:has(#view-mosaic:checked) + .aide-gap + .aide-container .aide-grid{gap:12px}
@media (min-width:768px){
  .aide-tabs-wrap:has(#view-mosaic:checked) + .aide-gap + .aide-container .aide-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:1024px){
  .aide-tabs-wrap:has(#view-mosaic:checked) + .aide-gap + .aide-container .aide-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.aide-tabs-wrap:has(#view-mosaic:checked) ~ .aide-container .aide-media::before{aspect-ratio:4/3}
.aide-tabs-wrap:has(#view-mosaic:checked) ~ .aide-container .aide-title{font-size:.98rem}
.aide-tabs-wrap:has(#view-mosaic:checked) ~ .aide-container .aide-meta{font-size:.84rem}

.aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-grid{grid-template-columns:1fr;gap:12px}
.aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-link{
  display:grid;grid-template-columns:160px 1fr auto;grid-template-rows:auto auto;align-items:center;
}
@media (min-width:768px){
  .aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-link{grid-template-columns:220px 1fr auto}
}
.aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-media::before{aspect-ratio:1/1}
.aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-body{padding:12px 14px}
.aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-title{font-size:1.05rem;margin-bottom:.2rem}
.aide-tabs-wrap:has(#view-list:checked) ~ .aide-container .aide-meta{border-top:0;padding:12px 14px}

/* ==========================================================
   TABLETTE & MOBILE LARGE: 641px - 900px
   - Barre de recherche passe en dessous
   ========================================================== */
@media (max-width:1024px){
  .aide-tabsbox{
    padding:18px 16px 20px;
    gap:14px;
  }
  
  /* Onglets + boutons de vue avec wrapping si nécessaire */
  .aide-tabsbar{
    gap:10px;
    flex-wrap:wrap;
  }
  
  .aide-tabs{
    gap:6px;
    flex:1 1 auto;
    min-width:200px;
    overflow:visible;
  }
  
  .aide-tab{
    padding:.5rem .8rem;
    font-size:.9rem;
  }
  
  .aide-view{
    flex-shrink:0;
  }
  
  /* Recherche déjà en dessous grâce au grid */
  .aide-search__input{
    width:100%;
    padding:.8rem .95rem;
    font-size:.98rem;
  }
}

/* ==========================================================
   MOBILE MOYEN: < 768px
   - Boutons de vue passent en dessous des onglets
   ========================================================== */
@media (max-width:768px){
  .aide-tabsbar{
    gap:8px;
  }
  
  .aide-tabs{
    flex:1 1 100%;
    min-width:100%;
    overflow:auto;
  }
  
  .aide-view{
    width:100%;
    justify-content:flex-end;
    padding-top:6px;
  }
}

/* ==========================================================
   MOBILE: < 640px
   - Masquer le switch (1 mode = Grille)
   - Tabs: grille 2×2 pour tout afficher
   ========================================================== */
@media (max-width:768px){
  .aide-tabs-wrap{padding:16px 0 18px}
  .aide-tabsbox{
    gap:12px;
    padding:14px 12px 16px;
    border-radius:var(--radius-lg);
  }
  
  /* Masquer le switch d'affichage */
  .aide-view{display:none}
  
  /* Tabsbar sans border-bottom */
  .aide-tabsbar{
    gap:0;
    padding-bottom:0;
    border-bottom:none;
    margin-bottom:0;
  }
  
  /* Onglets en grille 2×2 pour tous les afficher */
  .aide-tabs{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:8px;
    width:100%;
    overflow:visible;
  }
  
  .aide-tab{
    padding:.5rem .6rem;
    font-size:.82rem;
    white-space:normal;
    text-align:center;
    line-height:1.3;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  
  /* Masquer le compteur sur mobile pour gagner de la place */
  .aide-tab .aide-count{
    display:none;
  }
  
  /* Recherche en dessous */
  .aide-search__input{
    width:100%;
    padding:.75rem .9rem;
    font-size:.95rem;
  }
  
  .aide-card{border-radius:var(--radius-lg)}
  .aide-body{padding:.8rem .9rem .55rem}
  .aide-meta{padding:.5rem .9rem .8rem}
  
  /* Tooltip construction responsive */
  .aide-card.is-construction::after{
    white-space:normal;
    max-width:280px;
    text-align:center;
    font-size:12px;
    line-height:1.4;
  }
}

/* ==========================================================
   OVERLAY MENU OPEN — masque nos éléments collants/visibles
   (piloté par .aide-menu-open sur <html>)
   ========================================================== */
html.aide-menu-open .aide-tabs-wrap,
html.aide-menu-open .aide-featured,
html.aide-menu-open .aide-search,
html.aide-menu-open .aide-backtotop{
  visibility:hidden;
  pointer-events:none;
}
html.aide-menu-open .aide-tabs-wrap{ z-index:0; }

/* ===== ANIMATIONS SCROLL ===== */
.aide-card.reveal-up{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
.aide-card.reveal-up.is-visible{
  opacity:1;
  transform:translateY(0);
}
.aide-card.reveal-up[data-reveal-delay="1"]{transition-delay:.1s}
.aide-card.reveal-up[data-reveal-delay="2"]{transition-delay:.2s}
.aide-card.reveal-up[data-reveal-delay="3"]{transition-delay:.3s}
.aide-card.reveal-up[data-reveal-delay="4"]{transition-delay:.4s}
.aide-card.reveal-up[data-reveal-delay="5"]{transition-delay:.5s}
.aide-card.reveal-up[data-reveal-delay="6"]{transition-delay:.6s}
