/**
 * FAQ publique - liste lisible, peu d’effets, focus clair (Informations pratiques + /questions-frequentes/).
 */

.faq-search-container,
.faq-list,
.faq-search-results {
    --faq-ink: #0f172a;
    --faq-body: #475569;
    --faq-line: #e2e8f0;
    --faq-accent: #4f46e5;
    --faq-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-list {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* Recherche */
.faq-search-container {
    margin-bottom: 2rem;
}

.faq-search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #fff;
    border: 1px solid var(--faq-line);
    border-radius: 10px;
    transition: border-color 0.2s var(--faq-ease), box-shadow 0.2s var(--faq-ease);
}

.faq-search-wrapper:focus-within {
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.faq-search-icon {
    color: #94a3b8;
    margin-right: 0.5rem;
    font-size: 0.95rem;
}

.faq-search-input {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 1rem;
    color: var(--faq-ink);
    background: transparent;
    min-width: 0;
}

.faq-search-input::placeholder {
    color: #94a3b8;
}

.faq-search-clear {
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
}

.faq-search-clear:hover {
    color: var(--faq-accent);
    background: #f1f5f9;
}

.faq-search-clear:focus-visible {
    outline: 2px solid var(--faq-accent);
    outline-offset: 2px;
}

.faq-search-results {
    margin-bottom: 1.5rem;
}

.faq-result-stats {
    display: none;
    margin: 0 0 0.8rem;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 600;
}

.faq-no-results {
    margin: 0 0 1rem;
    padding: 1rem;
    color: var(--faq-body);
    font-size: 0.95rem;
    background: #f8fafc;
    border-radius: 8px;
}

/* Liste */
.faq-columns {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--faq-line);
}

.faq-item,
article.faq-item {
    margin: 0;
    padding: 0;
    scroll-margin-top: 5.5rem;
    border-bottom: 1px solid var(--faq-line);
    background: transparent;
}

.faq-item--frequente .faq-question .faq-text {
    font-weight: 650;
}

.faq-question {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    padding: 1.25rem 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: left;
    color: var(--faq-ink);
    font-size: 1.0625rem;
    line-height: 1.45;
    font-weight: 600;
    border-radius: 4px;
}

@media (min-width: 640px) {
    .faq-question {
        font-size: 1.125rem;
        padding: 1.4rem 0;
    }
}

.faq-question:focus {
    outline: none;
}

.faq-question:focus-visible {
    outline: 2px solid var(--faq-accent);
    outline-offset: 3px;
}

.faq-question .faq-icon {
    flex-shrink: 0;
    width: 1.35rem;
    margin-top: 0.2rem;
    color: var(--faq-accent);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-question .faq-chevron {
    display: block;
    transition: transform 0.25s var(--faq-ease);
}

.faq-question[aria-expanded="true"] .faq-chevron {
    transform: rotate(180deg);
}

.faq-question .faq-text {
    flex: 1;
    min-width: 0;
}

.faq-question-badge {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--faq-ease);
}

.faq-answer-prose {
    padding: 0 0 1.35rem 1.5rem;
    border-left: 2px solid #e0e7ff;
    margin-left: 0.1rem;
}

@media (min-width: 640px) {
    .faq-answer-prose {
        padding-bottom: 1.5rem;
        padding-left: 1.9rem;
    }
}

.faq-answer-prose p {
    margin: 0;
    color: var(--faq-body);
    font-size: 1.02rem;
    line-height: 1.72;
    max-width: 62ch;
}

.faq-item mark,
article.faq-item mark {
    background: #fef9c3;
    color: #713f12;
    padding: 0.05em 0.2em;
    border-radius: 3px;
}

.faq-link {
    color: var(--faq-accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.faq-empty {
    margin: 0;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--faq-body);
    font-size: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--faq-line);
}

@media (prefers-reduced-motion: reduce) {
    .faq-question .faq-chevron,
    .faq-answer,
    .faq-search-wrapper {
        transition-duration: 0.01ms !important;
    }

    body.faq-help-page .faq-quick-tile {
        transform: none !important;
    }
}

/* --- Centre d’aide (page dédiée) --- */

body.faq-help-page {
    --faq-help-surface: #ffffff;
    --faq-help-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
    --faq-help-shadow-hover: 0 14px 36px rgba(79, 70, 229, 0.1);
    --faq-help-radius: 18px;
    /* Cartes principales (recherche, tuiles, contacts, liste) : même surface */
    --faq-help-card-bg: var(--faq-help-surface);
    --faq-help-card-border: 1px solid rgba(226, 232, 240, 0.95);
    --faq-help-card-shadow: var(--faq-help-shadow);
    /* Titres de blocs (recherche, contacts, « Toutes les fiches ») */
    --faq-help-heading-size: 1.25rem;
    --faq-help-heading-weight: 800;
    --faq-help-heading-letter-spacing: -0.02em;
    --faq-help-heading-accent-w: 2.75rem;
    --faq-help-heading-accent-h: 3px;
}

/* Page centre d’aide : contenu centré dans la colonne (largeur = parent) */
body.faq-help-page .faq-list,
body.faq-help-page .faq-search-results {
    max-width: none;
    width: 100%;
}

body.faq-help-page .faq-help-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.75rem 1.5rem;
    align-items: start;
}

body.faq-help-page .faq-help-column {
    min-width: 0;
}

body.faq-help-page .faq-help-column--right .faq-all-entries {
    margin-top: 0;
    height: 100%;
}

@media (max-width: 72rem) {
    body.faq-help-page .faq-help-layout {
        grid-template-columns: 1fr;
    }
}

body.faq-help-page .faq-help-top-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

body.faq-help-page .faq-help-top-row .faq-search-hero {
    /* Carte gauche: la grille impose 50/50 + meme hauteur que la carte contacts. */
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1.35rem;
    border-radius: var(--faq-help-radius);
    background: var(--faq-help-card-bg);
    border: var(--faq-help-card-border);
    box-shadow: var(--faq-help-card-shadow);
}

body.faq-help-page .faq-help-top-row .faq-search-container {
    margin-bottom: 0;
}

body.faq-help-page .faq-help-top-row .faq-result-stats {
    margin: 0.65rem 0 0;
}

body.faq-help-page .faq-section-title,
body.faq-help-page .faq-search-hero-title,
body.faq-help-page .faq-contact-strip-title {
    font-size: var(--faq-help-heading-size);
    font-weight: var(--faq-help-heading-weight);
    letter-spacing: var(--faq-help-heading-letter-spacing);
    color: var(--faq-ink);
    line-height: 1.25;
}

body.faq-help-page .faq-search-hero-title {
    display: block;
    margin: 0 0 0.65rem;
}

body.faq-help-page .faq-contact-strip-title {
    display: block;
    width: 100%;
}

body.faq-help-page .faq-help-top-row .faq-contact-strip {
    min-width: 0;
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    text-align: left;
}

body.faq-help-page .faq-help-top-row .faq-contact-strip-list {
    justify-content: flex-start;
}

body.faq-help-page .faq-search-hero {
    max-width: none;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

body.faq-help-page .faq-quick-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: none;
    width: 100%;
}

body.faq-help-page .faq-quick-tile {
    flex: 1 1 16rem;
    min-width: min(14rem, 100%);
    max-width: none;
    border-radius: 14px;
    background: var(--faq-help-card-bg);
    border: var(--faq-help-card-border);
    box-shadow: var(--faq-help-card-shadow);
    transition: border-color 0.2s var(--faq-ease), box-shadow 0.2s var(--faq-ease), transform 0.2s var(--faq-ease), background 0.2s var(--faq-ease);
}

body.faq-help-page .faq-quick-tile:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: var(--faq-help-shadow-hover);
}

body.faq-help-page .faq-quick-tile.is-active {
    background: #f8fafc;
    border-color: rgba(199, 210, 254, 0.9);
    box-shadow: var(--faq-help-shadow-hover);
}

body.faq-help-page .faq-quick-tile-icon {
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--faq-accent);
}

body.faq-help-page .faq-contact-strip {
    max-width: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding: 1.25rem 1.35rem;
    border-radius: var(--faq-help-radius);
    background: var(--faq-help-card-bg);
    border: var(--faq-help-card-border);
    box-shadow: var(--faq-help-card-shadow);
}

body.faq-help-page .faq-contact-strip-list {
    justify-content: center;
    gap: 0.35rem 0.55rem;
}

body.faq-help-page .faq-contact-strip-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.68rem;
    background: #fff;
    border: 1px solid rgba(199, 210, 254, 0.85);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.8125rem;
    line-height: 1.25;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s var(--faq-ease), box-shadow 0.2s var(--faq-ease), color 0.2s var(--faq-ease);
}

body.faq-help-page .faq-contact-strip-list a:hover {
    border-color: var(--faq-accent);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

body.faq-help-page .faq-contact-link-icon {
    width: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4338ca;
    flex-shrink: 0;
}

body.faq-help-page .faq-search-container--hero .faq-search-wrapper {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow: var(--faq-help-shadow), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

body.faq-help-page .faq-search-container--hero .faq-search-wrapper:focus-within {
    border-color: rgba(129, 140, 248, 0.65);
    box-shadow: var(--faq-help-shadow-hover), 0 0 0 4px rgba(99, 102, 241, 0.12);
}

body.faq-help-page .faq-all-entries {
    width: 100%;
    margin-top: 2.25rem;
    padding: 1.35rem clamp(1rem, 3vw, 1.75rem) 0.25rem;
    background: var(--faq-help-card-bg);
    border: var(--faq-help-card-border);
    border-radius: var(--faq-help-radius);
    box-shadow: var(--faq-help-card-shadow);
}

body.faq-help-page .faq-all-entries .faq-section-title--list {
    margin-top: 0;
}

body.faq-help-page .faq-all-entries .faq-columns {
    border-top-color: rgba(226, 232, 240, 0.75);
}

body.faq-help-page .faq-all-entries .faq-item {
    border-bottom-color: rgba(241, 245, 249, 0.95);
    transition: background 0.2s var(--faq-ease), box-shadow 0.2s var(--faq-ease);
}

body.faq-help-page .faq-all-entries .faq-item:has(.faq-question[aria-expanded="true"]) {
    background: linear-gradient(180deg, #fafbff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(199, 210, 254, 0.35);
}

body.faq-help-page .faq-section-title::before,
body.faq-help-page .faq-search-hero-title::before,
body.faq-help-page .faq-contact-strip-title::before {
    content: '';
    display: block;
    width: var(--faq-help-heading-accent-w);
    height: var(--faq-help-heading-accent-h);
    border-radius: 3px;
    background: linear-gradient(90deg, var(--faq-accent), #a5b4fc);
}

body.faq-help-page .faq-section-title::before {
    margin: 0 auto 0.65rem;
}

body.faq-help-page .faq-section-title--list::before {
    margin-bottom: 0.75rem;
}

body.faq-help-page .faq-search-hero-title::before {
    margin: 0 0 0.65rem;
}

body.faq-help-page .faq-contact-strip-title::before {
    margin: 0 auto 0.65rem;
}

body.faq-help-page .faq-result-stats {
    text-align: center;
}

body.faq-help-page .faq-empty-profile {
    text-align: center;
}

.faq-help-page .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.faq-search-hero {
    max-width: 42rem;
    margin: 0 auto 2rem;
}

.faq-search-container--hero .faq-search-wrapper {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.faq-search-container--hero .faq-search-input {
    font-size: 1.0625rem;
}

.faq-quick-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
    margin: 0 auto 1.75rem;
    max-width: 56rem;
}

.faq-quick-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 1px solid var(--faq-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s var(--faq-ease), box-shadow 0.2s var(--faq-ease);
    color: var(--faq-ink);
}

.faq-quick-tile:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

.faq-quick-tile.is-active {
    border-color: var(--faq-accent);
    background: #f5f3ff;
}

.faq-quick-tile:focus-visible {
    outline: 2px solid var(--faq-accent);
    outline-offset: 2px;
}

.faq-quick-tile-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--faq-accent);
    font-size: 1rem;
}

.faq-quick-tile-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.faq-quick-tile-label {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}

.faq-quick-tile-sub {
    font-size: 0.8rem;
    color: var(--faq-body);
    line-height: 1.35;
}

.faq-contact-strip {
    max-width: 56rem;
    margin: 0 auto 2rem;
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid var(--faq-line);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.faq-contact-strip-title {
    font-weight: 700;
    color: var(--faq-ink);
    font-size: 0.95rem;
}

.faq-contact-strip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.faq-contact-strip-list a {
    color: var(--faq-accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.faq-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--faq-ink);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.faq-section-title--list {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.faq-section-lead {
    margin: 0 0 1rem;
    color: var(--faq-body);
    font-size: 0.95rem;
    line-height: 1.5;
}

.faq-all-entries {
    margin-top: 0.5rem;
}

.faq-item--filtered-out {
    display: none !important;
}

.faq-item--page-hidden {
    display: none !important;
}

.faq-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin: 1.1rem 0 0.45rem;
}

.faq-pagination[hidden] {
    display: none !important;
}

.faq-pagination-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 0.38rem 0.76rem;
    min-width: 2.15rem;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s var(--faq-ease);
}

.faq-pagination-btn:hover:not(:disabled) {
    border-color: #a5b4fc;
    color: #3730a3;
}

.faq-pagination-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.faq-pagination-btn.is-active {
    border-color: var(--faq-accent);
    background: var(--faq-accent);
    color: #fff;
}

.faq-empty-profile {
    text-align: center;
    padding: 1.25rem;
    color: #64748b;
    font-size: 0.95rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.faq-question-badge--standard {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.62rem;
}

.faq-answer-inner {
    padding: 0 0 1.25rem 1.5rem;
    border-left: 2px solid #e0e7ff;
    margin-left: 0.1rem;
}

.faq-answer-summary {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.faq-answer-summary-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.faq-answer-summary p {
    margin: 0;
    color: var(--faq-ink);
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 62ch;
}

.faq-answer-steps {
    margin: 0 0 1rem 1rem;
    padding: 0;
    color: var(--faq-body);
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 62ch;
}

.faq-answer-steps li {
    margin-bottom: 0.35rem;
}

.faq-help-page .faq-answer-prose {
    padding: 0 0 1rem;
    margin-left: 0;
    border-left: 0;
}

.faq-answer-links,
.faq-answer-related {
    margin: 0 0 1rem;
    max-width: 62ch;
}

.faq-answer-links-label,
.faq-answer-related-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.faq-answer-links ul,
.faq-answer-related ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--faq-body);
    font-size: 0.95rem;
}

.faq-answer-links a,
.faq-answer-related a {
    color: var(--faq-accent);
    font-weight: 600;
}

.faq-feedback {
    margin: 1rem 0 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--faq-line);
    max-width: 62ch;
}

.faq-feedback-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--faq-ink);
    margin-bottom: 0.5rem;
}

.faq-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.faq-feedback-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.faq-feedback-btn:hover:not(:disabled) {
    border-color: var(--faq-accent);
    color: #3730a3;
}

.faq-feedback-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.faq-feedback-btn--muted {
    font-weight: 500;
    color: #64748b;
}

.faq-feedback-thanks {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: #059669;
    font-weight: 600;
}

.faq-escalation {
    margin: 0;
    font-size: 0.88rem;
    color: var(--faq-body);
    max-width: 62ch;
}

.faq-escalation a {
    color: var(--faq-accent);
    font-weight: 600;
}
