/* DA 2027 (#347), lot H : FAQ, 404/500, contact, recherche sur mesure, comptes. Chargé seulement quand `da27` est actif ; tout est sous html.da27.
   Propriétés logiques : le même CSS sert le RTL. */

/* ---------- FAQ : rail de thèmes + accordéons (balisage FAQPage inchangé, construit par la vue) ---------- */
html.da27 .da-faq { display: grid; gap: 32px; padding-block: 40px 56px; }
html.da27 .da-faq__rail { display: none; }
@media (min-width: 1024px) {
  html.da27 .da-faq { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: start; }
  html.da27 .da-faq__rail { display: block; position: sticky; inset-block-start: 92px; }
}
html.da27 .da-faq__rail-t { font: 700 .75rem/1.2 var(--font-sans); letter-spacing: .09em; text-transform: uppercase; color: var(--c-text-muted); margin: 0 0 10px; }
html.da27:lang(ar) .da-faq__rail-t, html.da27:lang(hi) .da-faq__rail-t { letter-spacing: 0; text-transform: none; }
html.da27 .da-faq__rail-liste { list-style: none; margin: 0; padding: 0; }
html.da27 .da-faq__rail-liste a { display: block; padding: 10px 14px; border-inline-start: 2px solid var(--c-border); color: var(--c-text-2); text-decoration: none; font-weight: 500; font-size: .9375rem; }
html.da27 .da-faq__rail-liste a:hover { color: var(--c-text); border-color: var(--c-brand); background: var(--brand-50); }
html.da27 .da-faq__theme { scroll-margin-block-start: 96px; }
html.da27 .da-faq__theme + .da-faq__theme { margin-block-start: 48px; }
html.da27 .da-faq__theme-t { font: 800 1.625rem/1.2 var(--font-display); letter-spacing: -.02em; color: var(--c-text); margin: 0 0 16px; }
html.da27 .da-faq__q { scroll-margin-block-start: 96px; }
html.da27 .da-faq__q:target { border-color: var(--c-brand); }
html.da27 .da-faq__q > summary { font: 700 1.0625rem/1.35 var(--font-display); color: var(--c-text); }
html.da27 .da-faq__liens { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; font-size: .9375rem; font-weight: 600; }
html.da27 .da-faq__liens a { display: inline-flex; align-items: center; min-height: 32px; }
@media (pointer: coarse) { html.da27 .da-faq__liens a { min-height: 44px; } }

/* ---------- 404 / pages d'erreur (includes/page_erreur.html) ---------- */
html.da27 .ui-erreur { padding-block: var(--da-section); }
html.da27 .ui-erreur__cadre { border-radius: var(--r-xl); padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px); box-shadow: var(--sh-2); }
html.da27 .ui-erreur__code { font-family: var(--font-display); font-weight: 800; font-size: clamp(72px, 16vw, 128px); line-height: 1; letter-spacing: -.04em; color: var(--c-brand); }
html.da27 .ui-erreur__actions { gap: 12px; }

/* ---------- Contact et déposer un projet ---------- */
html.da27 .ui-contactpage { padding-block: clamp(32px, 5vw, 64px) var(--da-section); }
html.da27 .ui-contactpage__card { border-radius: var(--r-lg); box-shadow: var(--sh-1); }
html.da27 .ui-contactpage__ico { border-radius: var(--r-full); background: var(--brand-100); color: var(--c-brand-soft-ink); }
html.da27 .ui-contactpage__grid > :last-child, html.da27 .ui-contactpage__grid > .ui-panel { border-radius: var(--r-xl); box-shadow: var(--sh-2); }
html.da27 .ui-contactpage__grid .ui-input, html.da27 .ui-contactpage__grid textarea { border-radius: var(--r-md); }
html.da27 .ui-contactpage__grid button[type="submit"] { min-height: 48px; font-family: var(--font-display); font-weight: 700; }
html.da27 .ui-contactpage__etat--ouvert { background: var(--c-ok-bg, #e8f5ec); }
@media (min-width: 1024px) { html.da27 .ui-contactpage__grid > :last-child { position: sticky; inset-block-start: 92px; align-self: start; } }

/* ---------- Recherche sur mesure ---------- */
html.da27 .rsm-page { padding-block: clamp(32px, 5vw, 64px) var(--da-section); max-width: 840px; }
html.da27 .rsm-cdc { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r-lg); }
html.da27 .rsm-bloc { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 32px); margin-block-end: 20px; box-shadow: var(--sh-1); }
html.da27 .rsm-bloc > h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; margin-block-start: 0; }
html.da27 .rsm-form .ui-input, html.da27 .rsm-form select, html.da27 .rsm-form textarea { border-radius: var(--r-md); }
html.da27 .maj-envoi { min-height: 48px; font-family: var(--font-display); font-weight: 700; }

/* ---------- Connexion, inscription ---------- */
html.da27 .ui-auth { padding-block: clamp(24px, 5vw, 64px); }
html.da27 .ui-auth__panel { border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: clamp(24px, 4vw, 40px); }
html.da27 .ui-auth__panel .ui-h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
html.da27 .ui-auth__grid .ui-input { border-radius: var(--r-md); min-height: 48px; }
html.da27 .ui-auth__grid button[type="submit"], html.da27 .ui-auth__grid .ui-btn { min-height: 48px; font-family: var(--font-display); font-weight: 700; }
html.da27 .glass-login, html.da27 .glass-form { border-radius: var(--r-xl); box-shadow: var(--sh-2); }
html.da27 .field-group input[type="text"], html.da27 .field-group input[type="email"], html.da27 .field-group input[type="password"], html.da27 .field-group select { border-radius: var(--r-md); min-height: 48px; }
html.da27 .field-group label { letter-spacing: 0; text-transform: none; font-size: .875rem; color: var(--c-text-2); }
html.da27 .btn-login, html.da27 .btn-register { border-radius: var(--r-full); min-height: 48px; font-family: var(--font-display); background: var(--c-action, #0066CC); }

/* ---------- Espace compte : profil, sélection, alertes ---------- */
html.da27 .da-compte { max-width: 760px; padding-block: clamp(24px, 5vw, 56px); }
html.da27 .da-compte__carte { border-radius: var(--r-xl) !important; padding: clamp(20px, 4vw, 40px) !important; background: var(--c-surface) !important; border: 1px solid var(--c-border) !important; box-shadow: var(--sh-2) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.da27 .da-compte input:not([type="checkbox"]):not([type="radio"]) { border-radius: var(--r-md); min-height: 48px; }
html.da27 .da-compte h2 { letter-spacing: 0; }
html.da27 .da-compte button, html.da27 .da-compte a.inline-flex { border-radius: var(--r-full); }
html.da27 .sel-page { padding-block: clamp(24px, 5vw, 56px) var(--da-section); }
html.da27 .sel-page .ui-h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
html.da27 .sel-page .ui-panel, html.da27 .sel-offre, html.da27 .sel-alerte, html.da27 .sel-formulaire { border-radius: var(--r-lg); box-shadow: var(--sh-1); }
html.da27 .sel-formulaire, html.da27 .sel-encart { border-radius: var(--r-xl); }
html.da27 .sel-page .ui-input { border-radius: var(--r-md); }
html.da27 .sel-page .ui-empty { background: var(--brand-50); border-radius: var(--r-xl); padding: clamp(24px, 5vw, 48px); }
html.da27 .sel-alerte--inactive { opacity: .8; }
html.da27 .da-compte label { font-size: .875rem; }
html.da27 .sel-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
html.da27 .sel-actions .ui-btn { max-width: 100%; white-space: normal; text-align: center; }

/* Recette J (#353) : mots longs (nl) dans la FAQ, aucun débordement à 320 px */
html.da27 .da-faq__corps, html.da27 .da-faq__theme { min-width: 0; max-width: 100%; }
html.da27 .da-faq__corps summary, html.da27 .da-faq__corps .da-acc__rep, html.da27 .da-faq__corps .da-faq__theme-t { overflow-wrap: anywhere; }
