/* ── Questionnaire de satisfaction (bandeau bas de l'écran, cf. scripts/satisfaction.js) ── */

#satisfaction-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 99;
    width: 400px;
    max-width: calc(100vw - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 18px 20px 16px;
    background: white;
    color: #263238;
    border-radius: 14px;
    border-top: 4px solid #3d7e9d;
    box-shadow: 0 10px 32px -8px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s ease, transform .3s ease;
}

#satisfaction-banner.open {
    opacity: 1;
    transform: none;
}

/* Menu latéral fixe (300px, cf. sidenav.css) : le bandeau se place à sa droite */
@media only screen and (min-width: 993px) {
    body:not(.full-width):not([data-satisfaction-test-only]) #satisfaction-banner {
        left: 324px;
        max-width: calc(100vw - 348px);
    }
}

/* Mobile : pleine largeur, au-dessus du bouton de l'assistant (56px + 24px) */
@media only screen and (max-width: 600px) {
    #satisfaction-banner {
        left: 12px;
        right: 12px;
        bottom: 92px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 120px);
    }
}

#satisfaction-banner .sat-close {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px;
    border: none;
    background: none;
    color: #90a4ae;
    cursor: pointer;
    line-height: 0;
    border-radius: 50%;
}

#satisfaction-banner .sat-close:hover {
    color: #37474f;
    background: #eceff1;
}

#satisfaction-banner .sat-title {
    font-size: 1.1rem;
    font-weight: 600;
    padding-right: 24px;
    margin-bottom: 4px;
}

#satisfaction-banner .sat-sub,
#satisfaction-banner .sat-step {
    font-size: .85rem;
    color: #607d8b;
}

#satisfaction-banner .sat-step {
    margin-bottom: 2px;
}

#satisfaction-banner .sat-progress {
    height: 4px;
    background: #eceff1;
    border-radius: 2px;
    margin: 0 24px 10px 0;
    overflow: hidden;
}

#satisfaction-banner .sat-progress-bar {
    height: 100%;
    background: #3d7e9d;
    transition: width .3s ease;
}

#satisfaction-banner .sat-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

#satisfaction-banner .sat-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

#satisfaction-banner .sat-footer {
    justify-content: flex-end;
}

#satisfaction-banner .sat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #b0bec5;
    background: white;
    color: #263238;
    font-size: .95rem;
    cursor: pointer;
}

#satisfaction-banner .sat-btn:hover {
    background: #eceff1;
}

#satisfaction-banner .sat-btn span {
    font-size: 1.2rem;
    line-height: 1;
}

#satisfaction-banner .sat-primary {
    background: #3d7e9d;
    border-color: #3d7e9d;
    color: white;
}

#satisfaction-banner .sat-primary:hover:not(:disabled) {
    background: #2b5c73;
}

#satisfaction-banner .sat-primary:disabled {
    opacity: .45;
    cursor: default;
}

#satisfaction-banner .sat-link {
    border: none;
    background: none;
    padding: 8px 6px;
    color: #607d8b;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: underline;
}

#satisfaction-banner .sat-chip {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid #b0bec5;
    background: #f5f7f8;
    color: #263238;
    font-size: .9rem;
    cursor: pointer;
    text-align: left;
}

#satisfaction-banner .sat-chip:hover {
    border-color: #3d7e9d;
}

#satisfaction-banner .sat-chip.selected {
    background: #3d7e9d;
    border-color: #3d7e9d;
    color: white;
}

#satisfaction-banner .sat-textarea,
#satisfaction-banner .sat-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    resize: vertical;
}

#satisfaction-banner .sat-textarea:focus,
#satisfaction-banner .sat-input:focus {
    outline: none;
    border-color: #3d7e9d;
}

#satisfaction-banner .sat-callback-tel {
    width: 100%;
}

/* Mot d'accueil au-dessus de la première question (questionnaire sans 👍/👎) */
#satisfaction-banner .sat-greeting {
    margin: 0 24px 8px 0;
    font-size: .85rem;
    color: #607d8b;
}

/* Note de 1 à 5 (étoiles) */
#satisfaction-banner .sat-stars {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

#satisfaction-banner .sat-star {
    padding: 0 4px;
    border: none;
    background: none;
    color: #cfd8dc;
    font-size: 2.2rem;
    line-height: 1.1;
    cursor: pointer;
    transition: color .1s ease, transform .1s ease;
}

#satisfaction-banner .sat-star.filled {
    color: #ffb300;
}

#satisfaction-banner .sat-star:hover {
    transform: scale(1.12);
}

#satisfaction-banner .sat-rating-caption {
    width: 100%;
    min-height: 1.3em;
    text-align: center;
    font-weight: 600;
    color: #37474f;
}

#satisfaction-banner .sat-rating-legend {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: .8rem;
    color: #607d8b;
}

#satisfaction-banner .sat-thanks-text {
    margin: 8px 0 0;
    font-size: .9rem;
    color: #455a64;
}

/* "Précédent" à gauche, "Passer"/"Suivant" à droite */
#satisfaction-banner .sat-back {
    margin-right: auto;
}

/* Partage (recommanderait BTP Box) */
#satisfaction-banner .sat-share-title {
    margin-top: 14px;
    font-weight: 600;
}

#satisfaction-banner .sat-share-link {
    margin-top: 6px;
    padding: 6px 10px;
    background: #f5f7f8;
    border: 1px dashed #b0bec5;
    border-radius: 8px;
    font-size: .9rem;
    color: #3d7e9d;
    user-select: all;
}

#satisfaction-banner a.sat-btn {
    text-decoration: none;
}

#satisfaction-banner .sat-btn i.material-icons {
    font-size: 1.1rem;
}

/* Aperçu depuis /admin/satisfaction */
#satisfaction-banner .sat-test {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #fff3e0;
    color: #e65100;
    font-size: .8rem;
    font-weight: 600;
}
