/* ============================================================
   LES ÉQUIPEMENTS ASSOCIÉS D'UNE FICHE D'AIDE (2026-11-05, préfixe .eq-)
   ------------------------------------------------------------
   Le rendu de la page d'exemples de l'offre fournisseurs
   (Landing-Fournisseurs, onglet « fiche »), porté sur les jetons de
   css/tokens.css : il tient donc la marque blanche (--blue suit
   --wl-primary) et le thème Sombre de l'Admin. Museo Sans partout,
   pour les boutons aussi. Tailles de texte en px, comme la maquette :
   la landing réduit son rem au-dessus de 1200 px, et la carte gardait
   ses photos et ses boutons pendant que son texte rapetissait. Chargée par client-app.html,
   funnel-kolecto.html, aides.html et landing/aide.html ; le corps
   vient de js/equipements.js.
   ============================================================ */
.eq-badge {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px;
    background: var(--blue); color: #fff;
    font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-size: 13px; font-weight: 700; line-height: 1.5;
    letter-spacing: 0; white-space: nowrap; vertical-align: middle;
}
.eq-intro { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.eq-groupes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); align-items: start; gap: 14px; }

/* Un groupe par dépense finançable : la teinte bleue du haut s'efface vers la surface. */
.eq-groupe {
    container-type: inline-size; min-width: 0; padding: 14px; border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in oklab, var(--blue-pale) 62%, var(--surface)), var(--surface));
    border: 1px solid var(--blue-pale);
}
.eq-groupe-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.eq-groupe-h > :first-child {
    margin: 0; min-width: 0; font-family: 'Museo Sans', 'Mukta Mahee', sans-serif;
    font-size: 15.5px; font-weight: 700; line-height: 1.3; color: var(--text-primary); text-wrap: balance;
}
.eq-nb {
    flex: none; padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--blue-pale);
    font-size: 12.5px; font-weight: 700; line-height: 1.5; color: var(--text-secondary); white-space: nowrap;
}
.eq-liste { display: grid; gap: 10px; }

/* La carte d'un équipement : la photo à gauche, ce qu'il faut savoir à droite. */
.eq-prod {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center;
    padding: 12px; border-radius: 18px; background: var(--surface);
    border: 1.5px solid var(--blue-pale); box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--blue) 14%, transparent);
    transition: border-color .2s ease-out;
}
.eq-prod:hover { border-color: var(--blue-muted); }
.eq-prod-img { display: block; width: 104px; height: 104px; object-fit: contain; border-radius: 12px; }
.eq-prod-b { display: grid; gap: 3px; min-width: 0; }
.eq-marque { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.eq-nom {
    margin: 0; font-family: 'Museo Sans', 'Mukta Mahee', sans-serif;
    font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--text-primary); text-wrap: balance;
}
.eq-ok { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--green-ink); }
.eq-ok svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.eq-aide { font-size: 13px; line-height: 1.45; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.eq-aide b { font-weight: 800; color: var(--blue); }
.eq-actes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* Deux boutons en pilule, le plein au bleu de la marque. 44 px : la cible de PRODUCT.md. */
.eq-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 6px 16px; border-radius: 999px;
    border: 1.5px solid var(--blue-muted); background: var(--surface); color: var(--blue);
    font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-size: 13.5px; font-weight: 700; line-height: 1.2;
    text-decoration: none; cursor: pointer; transition: background-color .2s ease-out, border-color .2s ease-out, color .2s ease-out;
}
.eq-btn svg { flex: none; width: 16px; height: 16px; }
.eq-btn:hover { background: var(--blue-pale); border-color: var(--blue); }
.eq-btn--plein { background: var(--blue); border-color: var(--blue); color: #fff; }
.eq-btn--plein:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.eq-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.eq-btn--plein.is-fait { background: var(--green-soft); border-color: var(--green-soft); color: var(--green-ink); }
.eq-btn--plein.is-fait:hover { background: var(--green-soft); border-color: var(--green-ink); }
/* L'aperçu de l'Admin dessine les gestes du client : leurs vraies couleurs, aucun effet. */
.eq-btn[aria-disabled="true"] { cursor: not-allowed; }
.eq-btn[aria-disabled="true"]:hover { background: var(--surface); border-color: var(--blue-muted); }
.eq-btn--plein[aria-disabled="true"]:hover { background: var(--blue); border-color: var(--blue); }

/* L'aperçu dit ce que le client ne verra pas. */
.eq-groupe.is-creux { background: var(--surface); border-style: dashed; border-color: var(--blue-muted); }
.eq-creux { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.eq-attente { display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--orange-ink); }
.eq-attente svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* Un groupe étroit : sous 460 px les deux boutons ne tiennent plus côte à
   côte à droite de la photo, ils passent dessous en pleine largeur ; sous
   360 px la photo rétrécit à son tour. */
@container (max-width: 459px) {
    .eq-prod { row-gap: 3px; align-items: start; }
    .eq-prod > .eq-prod-img { grid-row: 1 / span 4; }
    .eq-prod-b { display: contents; }
    .eq-prod-b > * { grid-column: 2; }
    .eq-prod-b > .eq-actes { grid-column: 1 / -1; margin-top: 10px; }
    .eq-actes .eq-btn { flex: 1 1 auto; white-space: nowrap; }
}
@container (max-width: 359px) {
    .eq-prod { grid-template-columns: 72px minmax(0, 1fr); column-gap: 12px; }
    .eq-prod > .eq-prod-img { width: 72px; height: 72px; }
}

/* Thème Sombre (Admin) : l'encre bleue lisible sur fond sombre. */
html[data-chrome="d"] .eq-aide b { color: var(--blue-dark); }
html[data-chrome="d"] .eq-btn:not(.eq-btn--plein) { color: var(--blue-dark); }

/* ---------- La fenêtre : fiche produit, demande de devis, demande envoyée ---------- */
/* Centrée en dur : les remises à zéro des hôtes (margin: 0 sur tout) la collaient en haut à gauche. */
.eq-dlg {
    position: fixed; inset: 0; margin: auto; height: fit-content;
    width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px;
    background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-lg); overflow: hidden;
}
/* En dur : ::backdrop n'hérite pas des jetons partout. #28323E = --text-primary. */
.eq-dlg::backdrop { background: rgba(40, 50, 62, .45); }
.eq-dlg[open] { animation: eq-entre .26s cubic-bezier(.16, 1, .3, 1); }
@keyframes eq-entre { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .eq-dlg[open] { animation: none; } }
.eq-dlg-in { max-height: calc(100dvh - 32px); overflow: auto; padding: 22px 24px 24px; overscroll-behavior: contain; }
.eq-dlg h2, .eq-dlg-h { font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; color: var(--text-primary); }
.eq-dlg h2:focus { outline: none; }
.eq-dlg-tete { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; padding-right: 40px; }
.eq-dlg-tete .eq-prod-img { width: 112px; height: 112px; }
.eq-dlg-tete h2 { margin: 2px 0 2px; font-size: 20px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.eq-dlg-tete.is-compacte { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
.eq-dlg-tete.is-compacte .eq-prod-img { width: 64px; height: 64px; }
.eq-dlg-tete.is-compacte h2 { font-size: 17px; }
.eq-dlg-sous { margin: 0; font-size: 14px; color: var(--text-secondary); }
.eq-dlg-x {
    position: absolute; top: -6px; right: -8px; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer;
}
.eq-dlg-x svg { width: 20px; height: 20px; }
.eq-dlg-x:hover { background: var(--gray-100); color: var(--text-primary); }
.eq-dlg-x:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; }
.eq-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 4px; }
.eq-chiffres div { padding: 10px 12px; border-radius: 12px; background: var(--gray-100); }
.eq-chiffres dt { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.eq-chiffres dd { margin: 2px 0 0; font-size: 15px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.eq-chiffres .is-aide { background: var(--blue-pale); }
.eq-chiffres .is-aide dd { color: var(--blue); }
.eq-dlg-h { margin: 20px 0 8px; font-size: 16px; font-weight: 800; }
.eq-dlg-p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.eq-crit, .eq-mentions { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; }
.eq-crit li { display: flex; gap: 8px; align-items: flex-start; }
.eq-crit svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--green-ink); }
.eq-mentions li { padding: 8px 12px; border-radius: 10px; background: var(--orange-soft); color: var(--text-primary); font-weight: 600; }
.eq-dlg-pied { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.eq-form { margin-top: 4px; }
.eq-champ { display: grid; gap: 6px; margin-top: 12px; }
.eq-champ label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.eq-champ input, .eq-champ textarea {
    width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--gray-300);
    background: var(--surface); color: var(--text-primary); font: inherit; font-size: 15px; line-height: 1.5;
}
.eq-champ textarea { resize: vertical; min-height: 180px; }
.eq-champ input:focus-visible, .eq-champ textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue); }
.eq-champ [aria-invalid="true"] { border-color: var(--orange-ink); }
.eq-err { margin: 0; font-size: 13px; font-weight: 600; color: var(--orange-ink); }
.eq-dlg-note { margin-top: 10px; }
.eq-envoye { position: relative; display: grid; justify-items: center; gap: 8px; padding: 18px 8px 4px; text-align: center; }
.eq-envoye .eq-dlg-x { top: -14px; right: -16px; }
.eq-envoye-ic { width: 49px; height: 38px; margin-bottom: 6px; }
.eq-envoye h2 { margin: 0; font-size: 21px; font-weight: 800; }
.eq-envoye p { margin: 0; max-width: 40ch; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.eq-envoye .eq-envoye-ref { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.eq-envoye .eq-btn { margin-top: 12px; min-width: 160px; }

@media (max-width: 560px) {
    .eq-dlg-in { padding: 18px 16px 20px; }
    .eq-dlg-tete { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
    .eq-dlg-tete .eq-prod-img { width: 80px; height: 80px; }
    .eq-chiffres { grid-template-columns: 1fr 1fr; }
    .eq-chiffres div:last-child { grid-column: 1 / -1; }
    .eq-dlg-pied .eq-btn { flex: 1 1 auto; }
}
