/* ============================================================
   SIKO — Centre d'aide (help) — style rafraîchi
   Charte : Plus Jakarta Sans, primaire #1CA7D8, dark mode.
   Tout est scopé sous .help-page (sauf navbar scopée via :has).
   ============================================================ */

/* Offset de la nav landing (position:fixed) géré de façon SCOPÉE à la page
   (padding-top sur .help-page ci-dessous) et neutralisé en mode connecté
   (layout app, pas de nav fixe) — remplace l'ancien hack global body{margin-top}
   qui laissait un espace mort de 96px une fois connecté. */
.app-wrapper .help-page { padding-top: 0; }
/* landing.css met overflow-x:hidden sur .landing-main → overflow-y devient auto.
   Rien ne déborde ici, on repasse en visible pour éviter une scrollbar parasite. */
.landing-main { overflow: visible; }

.help-page {
    --hp-primary: #1CA7D8;
    --hp-dark: #0E1A24;
    --hp-dark-2: #142A3A;
    --hp-teal: #06D6A0;
    --hp-violet: #8B7CF6;
    --hp-ink: #1e2a35;
    --hp-muted: #6b7280;
    --hp-border: #e7edf2;
    --hp-card: #ffffff;
    --hp-surface: #f5f9fc;
    max-width: 940px;
    margin: 0 auto;
    padding: 72px 1rem 1rem;
}
[data-theme="dark"] .help-page {
    --hp-ink: #e8edf2;
    --hp-muted: #9aa6b2;
    --hp-border: #262b31;
    --hp-card: #14171a;
    --hp-surface: #101315;
}

/* ---- HERO ---- */
.help-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    text-align: center;
    padding: 3.25rem 2rem;
    background: linear-gradient(135deg, var(--hp-dark) 0%, var(--hp-dark-2) 40%, var(--hp-primary) 82%, var(--hp-teal) 108%);
    background-size: 200% 200%;
    animation: hpDrift 18s ease-in-out infinite;
}
@keyframes hpDrift {
    0%, 100% { background-position: 0% 30%; }
    50%      { background-position: 100% 70%; }
}
.help-hero::before {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(circle at 22% 28%, rgba(139,124,246,0.28) 0%, transparent 46%),
        radial-gradient(circle at 80% 72%, rgba(6,214,160,0.26) 0%, transparent 46%);
    animation: hpBlob 13s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes hpBlob {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(3%, -3%) scale(1.08); }
}
.help-hero-inner { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; }
.help-hero-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(6px);
    color: #fff;
    animation: hpIconFloat 3.4s ease-in-out infinite;
}
.help-hero-icon svg { width: 30px; height: 30px; flex-shrink: 0; }
@keyframes hpIconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.help-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    background: linear-gradient(100deg, #ffffff 20%, #9FE8FF 45%, var(--hp-teal) 65%, #ffffff 85%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: hpShine 7s linear infinite;
}
@keyframes hpShine { to { background-position: 250% center; } }
.help-hero p {
    color: rgba(255,255,255,0.88);
    font-size: 1.02rem;
    line-height: 1.65;
}

/* ---- SECTIONS ---- */
.help-section { margin-top: 3rem; }
.help-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--hp-ink);
    margin-bottom: 1.4rem;
    text-align: center;
}
.help-section-title::after {
    content: '';
    display: block;
    width: 46px;
    height: 3px;
    margin: 0.6rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--hp-primary), var(--hp-teal));
}

/* ---- REVEAL ---- */
.help-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.help-reveal.help-in-view { opacity: 1; transform: translateY(0); }

/* ---- TOPIC CARDS ---- */
.help-topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.help-topic-card {
    position: relative;
    background: var(--hp-card);
    border: 1px solid var(--hp-border);
    border-radius: 18px;
    padding: 2rem 1.4rem;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.help-topic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--hp-primary), var(--hp-teal), var(--hp-violet));
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.help-topic-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px rgba(14,26,36,0.13);
}
.help-topic-card:hover::before { opacity: 1; }
.help-topic-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(28,167,216,0.14), rgba(6,214,160,0.14));
    color: var(--hp-primary);
    transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease;
}
.help-topic-icon svg { width: 27px; height: 27px; flex-shrink: 0; }
.help-topic-card:hover .help-topic-icon {
    transform: scale(1.1) rotate(-4deg);
    background: linear-gradient(135deg, var(--hp-primary), var(--hp-teal));
    color: #fff;
}
.help-topic-card h3 {
    color: var(--hp-ink);
    margin: 0.4rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.help-topic-card p { color: var(--hp-muted); font-size: 0.86rem; line-height: 1.55; margin: 0; }

/* ---- FRAIS (liste de lignes en pills) ---- */
.help-table-wrapper {
    background: var(--hp-card);
    border: 1px solid var(--hp-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(14,26,36,0.08);
}
.help-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}
.help-table thead { display: none; } /* "opération / frais" se lit sans en-tête */
.help-table td {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--hp-border);
    font-size: 0.92rem;
    color: var(--hp-ink);
    transition: background 0.2s ease;
}
.help-table td:first-child { font-weight: 500; }
/* Valeur des frais : pastille alignée à droite */
.help-table td:last-child {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}
.help-table td:last-child > * ,
.help-table td:last-child {
    font-weight: 700;
    color: var(--hp-primary);
}
.help-table tbody tr:last-child td { border-bottom: none; }
.help-table tbody tr:hover td { background: var(--hp-surface); }
.help-table .free { color: var(--hp-teal); }

/* ---- CONTACT ---- */
.help-contact {
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-dark-2) 60%, var(--hp-primary) 130%);
    color: #fff;
}
.help-contact::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 80% 20%, rgba(6,214,160,0.22) 0%, transparent 45%);
    pointer-events: none;
}
.help-contact p { position: relative; color: rgba(255,255,255,0.9); line-height: 1.6; }
.help-contact strong {
    position: relative;
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 1.15rem;
    color: #9FE8FF;
    letter-spacing: 0.01em;
}
.help-contact-actions { position: relative; margin-top: 1.5rem; }
.help-contact-actions .btn {
    background: #fff;
    color: var(--hp-dark);
    border: none;
    font-weight: 700;
    padding: 0.7rem 1.6rem;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.help-contact-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.28);
}

/* ---- NAVBAR colorée (identique à "À propos" / FAQ) ---- */
body:has(.help-page) .landing-nav {
    background: linear-gradient(120deg, rgba(14,42,58,0.55), rgba(20,58,82,0.55));
    border-bottom-color: rgba(28,167,216,0.3);
}
body:has(.help-page) .landing-nav.scrolled {
    background: linear-gradient(120deg, rgba(10,22,30,0.92), rgba(14,42,58,0.92));
    border-bottom-color: rgba(28,167,216,0.4);
}
body:has(.help-page) .landing-nav-ctagroup .btn-outline-light {
    border-color: rgba(28,167,216,0.55);
    color: #9FE8FF;
}
body:has(.help-page) .landing-nav-ctagroup .btn-outline-light:hover {
    background: rgba(28,167,216,0.16);
    border-color: var(--hp-primary, #1CA7D8);
    color: #fff;
}
body:has(.help-page) .landing-nav-ctagroup .btn-accent {
    border: 1.5px solid rgba(255,255,255,0.55);
}
body:has(.help-page) .landing-nav-ctagroup .btn-accent:hover {
    border-color: rgba(255,255,255,0.85);
}
body:has(.help-page) .theme-toggle {
    border-color: rgba(28,167,216,0.35);
    color: #9FE8FF;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
body:has(.help-page) .theme-toggle:hover {
    background: rgba(28,167,216,0.22);
    color: #fff;
    border-color: var(--hp-primary, #1CA7D8);
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 10px 26px rgba(28,167,216,0.45);
}
body:has(.help-page) .theme-toggle #theme-icon { display: inline-block; transition: transform 0.3s ease; }
body:has(.help-page) .theme-toggle:hover #theme-icon { transform: rotate(-18deg) scale(1.2); }

/* ---- RESPONSIVE ---- */
@media (max-width: 820px) {
    .help-topics-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 768px) {
    .help-hero { padding: 2.4rem 1.25rem; }
    .help-hero h1 { font-size: 1.7rem; }
    .help-table td { padding: 0.85rem 1rem; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
    .help-hero, .help-hero::before, .help-hero h1, .help-hero-icon { animation: none !important; }
    .help-reveal { opacity: 1; transform: none; transition: none; }
}
