/*
  Formulaire de retours des maquettes (composant partagé A, B, C). Styles du bouton flottant et du volet.
  S'appuie sur les jetons de la page (--accent, --encre, --carte, --trait, --fond, --titres, --corps, --barre-tests, --texte-2).
  Le bouton « Donner mon avis » se place AU-DESSUS du bouton de chat (chat à 76 px du bas), jamais à côté.
*/
.retours-bouton { position: fixed; right: 24px; bottom: 150px; z-index: 76; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--encre); color: #fff; font-family: var(--titres); font-weight: 600; font-size: 0.95rem; box-shadow: 0 10px 28px rgba(20,32,51,.28); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.retours-bouton:hover { transform: translateY(-2px); background: #0C1522; }
.retours-bouton svg { width: 20px; height: 20px; }
.retours-fond { position: fixed; inset: 0; background: rgba(20,32,51,.35); z-index: 84; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
.retours-volet { position: fixed; top: var(--barre-tests, 0px); right: 0; bottom: 0; width: min(460px, 100vw); background: var(--carte); color: var(--encre); z-index: 85; box-shadow: -20px 0 60px rgba(20,32,51,.18); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; }
html.retours-ouvert .retours-fond { opacity: 1; visibility: visible; }
html.retours-ouvert .retours-volet { transform: none; }
html.retours-ouvert { overflow: hidden; }
.retours-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--trait); flex: none; }
.retours-entete strong { font-family: var(--titres); font-size: 1.15rem; }
.retours-entete .fermer { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--trait); background: var(--carte); color: var(--encre); display: grid; place-items: center; cursor: pointer; }
.retours-entete .fermer:hover { background: var(--fond); }
.retours-entete .fermer svg { width: 18px; height: 18px; }
.retours-formulaire { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.retours-corps { overflow-y: auto; padding: 8px 20px 32px; flex: 1; min-height: 0; overscroll-behavior: contain; font-size: 0.98rem; }
.retours-corps fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.retours-corps legend, .retours-corps h4 { font-family: var(--titres); font-weight: 700; font-size: 1rem; margin: 22px 0 10px; padding: 0; color: var(--encre); }
.retours-corps h4 small { display: block; font-family: var(--corps); font-weight: 400; font-size: 0.86rem; color: var(--texte-2); margin-top: 2px; }
.retours-corps label { display: block; font-weight: 600; font-size: 0.9rem; margin: 10px 0 4px; }
.retours-corps input[type="text"], .retours-corps textarea, .retours-corps select { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 10px; background: var(--fond); color: var(--encre); min-height: 44px; }
.retours-corps textarea { min-height: 64px; resize: vertical; }
.retours-corps input:focus, .retours-corps textarea:focus, .retours-corps select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.retours-qui { display: flex; gap: 8px; }
.retours-qui label { flex: 1; margin: 0; }
.retours-qui input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.retours-qui span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--trait); border-radius: 10px; background: var(--fond); cursor: pointer; font-weight: 600; }
.retours-qui input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.retours-qui input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.retours-section { border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px 14px; margin: 0 0 10px; background: var(--carte); }
.retours-section .titre { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.retours-section .titre strong { font-family: var(--titres); font-size: 0.98rem; }
.retours-section .aller { font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--accent-fonce); background: none; border: 0; padding: 10px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; white-space: nowrap; }
.retours-avis { display: flex; gap: 6px; margin-bottom: 8px; }
.retours-avis label { flex: 1; margin: 0; }
.retours-avis input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.retours-avis span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--trait); border-radius: 999px; background: var(--fond); cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--encre); }
.retours-avis input:checked + span { color: #fff; border-color: transparent; }
.retours-avis input[value="j-aime"]:checked + span { background: var(--valide, #1B7F5C); }
.retours-avis input[value="mitige"]:checked + span { background: #B38600; }
.retours-avis input[value="je-n-aime-pas"]:checked + span { background: #B23A3A; }
.retours-avis input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.retours-section textarea { min-height: 44px; }
.retours-pied { padding: 14px 20px; border-top: 1px solid var(--trait); display: flex; align-items: center; gap: 12px; flex: none; background: var(--carte); }
.retours-pied .btn { min-height: 48px; }
.retours-pied .etat { font-size: 0.86rem; color: var(--texte-2); }
.retours-confirmation { display: none; padding: 32px 20px; text-align: center; }
.retours-confirmation strong { display: block; font-family: var(--titres); font-size: 1.3rem; margin-bottom: 8px; }
.retours-confirmation p { color: var(--texte-2); margin: 0 0 18px; }
html.retours-envoye .retours-corps, html.retours-envoye .retours-pied { display: none; }
html.retours-envoye .retours-confirmation { display: block; }
.retours-erreur { display: none; color: #B23A3A; font-size: 0.9rem; margin-top: 8px; }
.retours-erreur.visible { display: block; }
.retours-cache { display: none; }
/* Sans JavaScript : le volet devient une section ordinaire en bas de page, le formulaire s'envoie en page classique */
html:not(.js) .retours-volet { position: static; transform: none; width: auto; max-width: 720px; margin: 48px auto; box-shadow: none; border: 1px solid var(--trait); border-radius: 20px; }
html:not(.js) .retours-corps { overflow: visible; }
@media (max-width: 640px) {
  .retours-bouton { right: 16px; bottom: 144px; padding: 0 14px 0 12px; font-size: 0.9rem; }
  .retours-volet { width: 100vw; }
}
