/* ============================================================
   Aide Akces — système visuel "La scène ouverte" (cf. DESIGN.md)
   Tokens de marque + composants du centre d'aide.
   ============================================================ */

:root {
  --ink: #200C41;          /* Indigo de Salle */
  --ink-2: #34337C;        /* Indigo Velours */
  --primary: #00CCFF;      /* Cyan Projecteur */
  --primary-deep: #028FEC;
  --accent-pink: #FF0D65;
  --accent-orange: #FC6524;
  --accent-yellow: #FFC938;
  --cyan-light: #61D4FF;
  --paper: #FFFFFF;
  --tint: #EBFBFF;         /* Teinte Cyan */
  --line: #ECEAF2;
  --muted: #585858;
  --radius: .2rem;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

body {
  font-family: 'Titillium Web', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

a { color: var(--primary-deep); }

/* ---------- Boutons ---------- */
.btn-aide-primary {
  background: var(--primary);
  color: var(--ink);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: .65rem 1.5rem;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn-aide-primary:hover { background: var(--primary-deep); color: var(--ink); transform: translateY(-1px); }
.btn-aide-primary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.btn-aide-dark {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: .65rem 1.5rem;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn-aide-dark:hover { background: var(--ink-2); color: #fff; transform: translateY(-1px); }
.btn-aide-dark:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.btn-aide-outline {
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff;
  border-radius: var(--radius);
  padding: .45rem 1.1rem;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn-aide-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

/* ---------- Navbar ---------- */
.aide-nav {
  background: var(--ink);
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.aide-nav .nav-link { color: rgba(255, 255, 255, .85); font-weight: 600; }
.aide-nav .nav-link:hover,
.aide-nav .nav-link:focus { color: #fff; }
.aide-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, .4);
}
.aide-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero ---------- */
.aide-hero {
  background: var(--ink);
  color: #fff;
  padding: 4.5rem 0 5.5rem;
}
.aide-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
}
.aide-hero .lead {
  color: rgba(255, 255, 255, .82);
  line-height: 1.65;
}

/* ---------- Barre de recherche ---------- */
.aide-search { max-width: 620px; }
.aide-search .form-control {
  border: none;
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  font-size: 1.05rem;
}
.aide-search .form-control:focus {
  box-shadow: 0 0 0 3px var(--cyan-light);
}

/* ---------- Cartes catégories ---------- */
.aide-cat {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.aide-cat:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(32, 12, 65, .12);
  border-color: var(--primary);
}
.aide-cat .aide-cat-icon {
  font-size: 1.6rem;
  width: 3rem; height: 3rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--tint);
  margin-bottom: 1rem;
}
.aide-cat:nth-child(3n+1) .aide-cat-icon { color: var(--primary-deep); }
.aide-cat:nth-child(3n+2) .aide-cat-icon { color: var(--accent-pink); }
.aide-cat:nth-child(3n)   .aide-cat-icon { color: var(--accent-orange); }
.aide-cat h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.aide-cat p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Liste tutoriels ---------- */
.aide-tuto-list { list-style: none; padding: 0; margin: 0; }
.aide-tuto-list li { border-bottom: 1px solid var(--line); }
.aide-tuto-list a {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem .25rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.aide-tuto-list a::before {
  content: "";
  flex: 0 0 auto;
  width: .6rem; height: .9rem;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23028FEC' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e") no-repeat center/contain;
}
.aide-tuto-list a:hover { color: var(--primary-deep); transform: translateX(4px); }

/* ---------- FAQ (accordéon Bootstrap) ---------- */
.aide-faq .accordion-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
.aide-faq .accordion-button {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.aide-faq .accordion-button:not(.collapsed) {
  color: var(--ink);
  background: var(--tint);
  box-shadow: none;
}
.aide-faq .accordion-button:focus { box-shadow: 0 0 0 3px var(--cyan-light); }
.aide-faq .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23200C41' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
}
.aide-faq .accordion-body { color: var(--ink); }

/* ---------- Fil d'Ariane ---------- */
.aide-breadcrumb { font-size: .95rem; }
.aide-breadcrumb a { color: var(--primary-deep); text-decoration: none; }
.aide-breadcrumb a:hover { text-decoration: underline; }
.aide-breadcrumb .sep { color: var(--muted); margin: 0 .5rem; }

/* ---------- Bandeau contact ---------- */
.aide-contact { background: var(--tint); }
.aide-contact h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.aide-contact p { color: var(--muted); }

/* ---------- Footer ---------- */
.aide-footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 2rem 0; }
.aide-footer a { color: #fff; text-decoration: none; }
.aide-footer a:hover { text-decoration: underline; }

/* ---------- Page tutoriel ---------- */
.aide-article { max-width: 720px; }
.aide-article h2 { font-size: 1.55rem; margin: 2.5rem 0 .85rem; scroll-margin-top: 90px; display: flex; align-items: center; }
.aide-article h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.aide-article p, .aide-article ul, .aide-article ol { margin-bottom: 1.1rem; }
.aide-article figure { margin: 1.75rem 0; }
.aide-article figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.aide-figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

.aide-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; color: var(--muted); font-size: .95rem; }
.aide-badge { background: var(--tint); color: var(--ink); font-weight: 600; padding: .25rem .7rem; border-radius: var(--radius); font-size: .85rem; text-decoration: none; }

.aide-step-n {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: var(--radius);
  background: var(--ink); color: #fff; font-weight: 700; font-size: .95rem;
  margin-right: .65rem;
}

.aide-callout {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 1.5rem 0;
  display: flex; gap: .8rem;
}
.aide-callout .ico { color: var(--primary-deep); font-size: 1.2rem; margin-top: .15rem; }
.aide-callout p:last-child { margin-bottom: 0; }

/* Sommaire (TOC) */
.aide-toc { position: sticky; top: 90px; }
.aide-toc .toc-title { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .75rem; }
.aide-toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.aide-toc a { display: block; padding: .4rem 0 .4rem 1rem; color: var(--ink); text-decoration: none; font-size: .95rem; }
.aide-toc a:hover { color: var(--primary-deep); }

/* Feedback "utile ?" */
.aide-feedback { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.5rem 0; margin: 2.5rem 0; }
.btn-aide-ghost { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: var(--radius); padding: .45rem 1.2rem; font-weight: 600; transition: border-color .15s var(--ease), color .15s var(--ease); }
.btn-aide-ghost:hover { border-color: var(--primary); color: var(--primary-deep); }

/* ---------- Page catégorie ---------- */
.aide-cat-head { display: flex; align-items: center; gap: 1rem; }
.aide-cat-head .aide-cat-icon { margin-bottom: 0; color: var(--primary-deep); }
.aide-cat-head h1 { margin: 0; }

.aide-side-nav { position: sticky; top: 90px; list-style: none; padding: 0; margin: 0; }
.aide-side-nav .nav-title { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .5rem; }
.aide-side-nav a { display: block; padding: .55rem .9rem; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; transition: background .15s var(--ease), color .15s var(--ease); }
.aide-side-nav a:hover { background: var(--tint); color: var(--primary-deep); }
.aide-side-nav a.active { background: var(--ink); color: #fff; }

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .aide-cat:hover, .btn-aide-primary:hover, .btn-aide-dark:hover { transform: none; }
}
