/* =============================================================================
   Santélite Académie : panier déroulant commun (03/11/2026)
   =============================================================================

   Référence : le panier déroulant du Dashboard apprenant.
   Chargé uniquement là où l'apprenant peut ouvrir son panier : site public
   (accueil, catalogue, pages des cours…) et Dashboard apprenant. Jamais dans
   les espaces formateur et administrateur.

   Contenu rendu par public/assets/js/panier-deroulant.js (rendu commun), à
   partir du panier réel de l'utilisateur (GET /api/panier). L'ouverture, la
   fermeture et les ajouts / retraits restent gérés par chaque environnement.
   ========================================================================== */

.sa-panier {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 340px;
    max-width: 100%;
    max-height: min(70vh, 520px);
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, .10);
    border-top: 0;
    border-radius: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #000000;
    text-align: left;
}
.sa-panier[hidden] { display: none; }

/* En-tête : « Mon panier » et nombre de cours */
.sa-panier__entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    margin: 0;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, .10);
    font-size: .875rem;
    font-weight: 600;
}
.sa-panier__titre { margin: 0; font: inherit; color: inherit; }
.sa-panier__nombre { font: inherit; color: inherit; white-space: nowrap; }

/* Liste des cours */
.sa-panier__corps { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: .5rem; list-style: none; }
.sa-panier__item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .5rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.sa-panier__item:hover,
.sa-panier__item:focus-visible { background: #F3F3F3; }
.sa-panier__miniature {
    display: block;
    width: 64px;
    height: auto;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #E9EDF7;
}
.sa-panier__miniature img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sa-panier__texte { flex: 1; min-width: 0; }
.sa-panier__titre-cours { display: block; font-size: .875rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
/* Prix appliqué sur sa propre ligne, prix initial barré en dessous (comme le Dashboard apprenant). */
.sa-panier__prix { display: block; font-size: .875rem; font-weight: 600; color: #092E98; white-space: nowrap; }
.sa-panier__barre { font-size: .75rem; color: rgba(0, 0, 0, .45); white-space: nowrap; }

/* Panier vide : icône centrée et message */
.sa-panier__vide { margin: 0; padding: 2rem 1.25rem; text-align: center; font-size: .875rem; color: rgba(0, 0, 0, .45); }
.sa-panier__vide-icone {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto .5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Pied : bouton bleu « Voir le panier » */
.sa-panier__pied { flex-shrink: 0; margin: 0; padding: .75rem 1.25rem; border-top: 1px solid rgba(0, 0, 0, .10); }
.sa-panier__bouton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: .65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #092E98;
    color: #FFFFFF;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms cubic-bezier(.4, 0, .2, 1);
}
.sa-panier__bouton:hover { background: #071F6B; color: #FFFFFF; }
