/* Note des clientes (module notes) : étoiles, pastilles, formulaire de notation rapide (pensé pour le téléphone),
   onglet de la fiche cliente, rubrique « Ma note » de l'espace cliente. Chargée sur toutes les pages. */

.nt-etoiles { color: #e0a82e; letter-spacing: 1px; white-space: nowrap; }
.nt-etoiles .nt-vides { color: var(--ligne-forte); }

.nt-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--surface-3); color: var(--encre-2); white-space: nowrap; }
.nt-badge.nt-etoile { background: #fdf3dc; color: #8a5a00; box-shadow: inset 0 0 0 1px #f0d89a; }
.nt-badge.nt-a_confirmer { background: var(--alerte-doux); color: var(--alerte); }

.nt-puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.nt-puce { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: .85rem; background: var(--surface-3); color: var(--encre-2); }
.nt-puce.bien { background: var(--ok-doux); color: var(--ok); }
.nt-puce.mieux { background: var(--alerte-doux); color: var(--alerte); }
.nt-puce b { font-weight: 700; }
.nt-titre-puces { margin: 12px 0 2px; font-size: .82rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muet); }

/* Formulaire de notation */
.nt-form { display: grid; gap: 12px; margin-top: 8px; }
.nt-choix-etoiles { border: 0; padding: 0; margin: 0; }
.nt-etoiles-choix { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.nt-etoiles-choix input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nt-etoiles-choix label { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; font-size: 2rem; line-height: 1;
  color: var(--ligne-forte); cursor: pointer; border-radius: 12px; transition: color .12s, transform .12s; }
.nt-etoiles-choix input:checked ~ label { color: #e0a82e; }
@media (hover: hover) { .nt-etoiles-choix label:hover, .nt-etoiles-choix label:hover ~ label { color: #e0a82e; } }
.nt-etoiles-choix input:checked + label { transform: scale(1.08); }
.nt-etoiles-choix input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.nt-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nt-groupe { border: 1px solid var(--ligne); border-radius: var(--r-s); padding: 8px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nt-groupe legend { font-size: .82rem; font-weight: 650; padding: 0 4px; color: var(--encre-2); }
.nt-groupe legend small { font-weight: 400; color: var(--muet); }
.nt-case { position: relative; display: inline-flex; cursor: pointer; }
.nt-case input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nt-case span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ligne-forte);
  font-size: .88rem; background: var(--surface); transition: background .12s, border-color .12s, color .12s; }
.nt-bien .nt-case input:checked + span { background: var(--ok-doux); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.nt-mieux .nt-case input:checked + span { background: var(--alerte-doux); border-color: var(--alerte); color: var(--alerte); font-weight: 600; }
.nt-case input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.nt-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.nt-pied small { flex: 1 1 260px; }
.nt-form.compact .nt-etoiles-choix label { width: 42px; height: 42px; font-size: 1.8rem; }

/* Les cases et le bouton apparaissent quand une étoile est choisie ; 5 étoiles : pas de point à améliorer ;
   1 ou 2 étoiles : pas de compliment (le serveur applique les mêmes règles). Navigateurs sans :has() : tout reste visible. */
@supports selector(:has(*)) {
  .nt-form:not(:has(input[name="etoiles"]:checked)) .nt-cases,
  .nt-form:not(:has(input[name="etoiles"]:checked)) .nt-pied { display: none; }
  .nt-form:has(input[name="etoiles"][value="5"]:checked) .nt-mieux,
  .nt-form:has(input[name="etoiles"][value="1"]:checked) .nt-bien,
  .nt-form:has(input[name="etoiles"][value="2"]:checked) .nt-bien { display: none; }
  .nt-form:has(input[name="etoiles"][value="5"]:checked) .nt-cases,
  .nt-form:has(input[name="etoiles"][value="1"]:checked) .nt-cases,
  .nt-form:has(input[name="etoiles"][value="2"]:checked) .nt-cases { grid-template-columns: 1fr; }
}

/* Page « Note des clientes » : une carte par soin à noter */
.nt-cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.nt-carte { border: 1px solid var(--ligne); border-radius: var(--r); padding: 14px; background: var(--surface-2); }
.nt-carte-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.nt-carte-tete .titre { font-weight: 650; font-size: 1.02rem; color: var(--encre); text-decoration: none; }
.nt-carte-tete .detail { flex-basis: 100%; font-size: .88rem; }
.nt-regles ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* Synthèse (fiche et espace cliente) */
.nt-synthese { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; }
.nt-grand { font-size: 2.6rem; line-height: 1; font-weight: 750; letter-spacing: -.02em; }
.nt-retirer { margin-left: auto; }
.nt-retirer[open] { flex-basis: 100%; }
.nt-retirer summary { list-style: none; cursor: pointer; }
.nt-retirer summary::-webkit-details-marker { display: none; }
.nt-retirer .form { margin-top: 8px; }
.nt-onglet .liste > li { flex-wrap: wrap; }
.nt-espace .nt-explications { margin-top: 14px; border-top: 1px solid var(--ligne); padding-top: 10px; }
.nt-espace .nt-explications summary { cursor: pointer; font-weight: 600; }
.nt-espace .nt-explications ul { margin: 4px 0 8px; padding-left: 18px; }

@media (max-width: 640px) {
  .nt-cases { grid-template-columns: 1fr; }
  .nt-grand { font-size: 2.2rem; }
  .nt-carte { padding: 12px; }
  .nt-etoiles-choix label { width: 52px; height: 52px; font-size: 2.2rem; }
  .nt-form.compact .nt-etoiles-choix label { width: 50px; height: 50px; font-size: 2.1rem; }
  .nt-pied .btn { width: 100%; justify-content: center; }
}
