/* =====================================================================
   ESISFSFA — compléments au thème de la maquette (style.css)
   ===================================================================== */
.pager a.pg { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--ink-2); display: inline-grid; place-items: center; text-decoration: none; padding: 0 .4rem; }
.pager a.pg svg { width: 16px; height: 16px; }
.pager a.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager a.pg:hover:not(.on) { background: var(--brand-50); }
.pv-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pv-media { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 10px; }
.was-validated .pw-box input:invalid ~ .invalid-feedback, .pw-box .invalid-feedback { display: none; }
.was-validated .pw-box .input-group:has(input:invalid) + .invalid-feedback { display: block; }
.btn-icon.disabled-lock { cursor: default; opacity: .7; }
button.card.add-card { cursor: pointer; }
/* Connexion (panneau vert) : titre plus discret, espacements réguliers, conseils de connexion */
.login-art { gap: 1.75rem; padding: 2.5rem 3rem; }
.login-art h1 { font-size: clamp(1.45rem, 2.1vw, 1.95rem); line-height: 1.2; max-width: 450px; margin: 0; }
.login-art .lead { font-size: .95rem; max-width: 470px; }
.login-tips { margin-top: 1.6rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: .9rem 1rem .3rem; max-width: 520px; backdrop-filter: blur(2px); }
.login-tips .lt-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #f3d98f; margin-bottom: .65rem; display: flex; align-items: center; gap: .4rem; }
.login-tips .lt-title svg { width: 15px; height: 15px; }
.login-tips .feat { align-items: flex-start; font-size: .84rem; line-height: 1.4; margin-bottom: .7rem; color: #eef7f1; }
.login-tips .feat span { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; }
.login-tips .feat span svg { width: 16px; height: 16px; }
.login-tips .feat b { color: #fff; }
/* Écrans peu hauts (ex. 1366 × 768 avec barres du navigateur) */
@media (max-height: 680px) {
  .login-art { padding: 1.75rem 2.5rem; gap: 1.1rem; }
  .login-art .lead { display: none; }
  .login-tips { margin-top: 1.25rem; }
  .login-art .logo-cercle { width: 64px; height: 64px; }
}
/* Pied de page : signature */
.app-footer a.signature { color: var(--brand); font-weight: 600; text-decoration: none; }
.app-footer a.signature:hover { text-decoration: underline; }

/* Logos ronds SF / INF : médaillon ivoire, liseré doré et halo discret (s'accorde au thème vert / ocre) */
.logo-cercle {
  width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0; padding: 3px; object-fit: contain;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #fbf6ea 55%, #efe2bf 100%);
  border: 2px solid #d4b062;
  box-shadow: 0 0 0 4px rgba(255,255,255,.10), 0 0 18px rgba(212,176,98,.35), 0 10px 22px -12px rgba(0,0,0,.7);
}
/* Connexion (ordinateur) : logo SF à gauche, titre centré, logo INF à droite */
.login-art { background: linear-gradient(160deg, rgba(10,61,32,.94) 0%, rgba(26,127,67,.80) 50%, rgba(165,121,31,.86) 100%), url('../img/background.jpg') center / cover no-repeat !important; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 1.6rem; }
.login-brand .lb-text { text-align: center; min-width: 0; }
.login-brand .lb-text b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: .15rem 0 .2rem; }
.login-brand .school-full { color: #e3f1e7; font-size: .85rem; line-height: 1.4; }
/* Menu latéral : logo SF à gauche, titre centré, logo INF à droite */
.sb-brand.sb-brand-centre { justify-content: space-between; gap: .5rem; padding: 1.2rem 1rem .9rem; }
.sb-brand-centre .sb-title { flex: 1; min-width: 0; text-align: center; line-height: 1.25; }
.sb-brand-centre .sb-title b { font-size: 1.1rem; letter-spacing: .06em; }
.sb-brand-centre .sb-title small { display: block; color: #e2c47f; font-size: .64rem; letter-spacing: .02em; white-space: nowrap; }
.sb-brand-centre .logo-cercle { width: 44px; height: 44px; padding: 2px; border-width: 1.5px; box-shadow: 0 0 0 3px rgba(255,255,255,.06), 0 0 12px rgba(212,176,98,.30); }

/* Connexion sur mobile / tablette : fond vert transparent sur la photo du bâtiment,
   logo + nom de l'école centrés, formulaire dans une carte blanche. */
@media (max-width: 991.98px) {
  .login-form-wrap {
    flex-direction: column; justify-content: flex-start; min-height: 100vh; padding: 2rem 1rem;
    background: linear-gradient(160deg, rgba(10,61,32,.94) 0%, rgba(26,127,67,.80) 50%, rgba(165,121,31,.86) 100%), url('../img/background.jpg') center / cover no-repeat;
  }
  .login-mobile-brand { text-align: center; color: #fff; margin: .5rem 0 1.5rem; max-width: 410px; }
  .login-mobile-brand .lm-logos { display: flex; justify-content: center; gap: 1rem; margin-bottom: .85rem; }
  .login-mobile-brand .logo-cercle { width: 72px; height: 72px; }
  .login-mobile-brand .univ { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f3d98f; }
  .login-mobile-brand b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: .15rem 0 .25rem; }
  .login-mobile-brand .school-full { font-size: .8rem; color: #e3f1e7; line-height: 1.4; }
  .login-card { background: #fff; border-radius: 18px; padding: 1.75rem 1.25rem; box-shadow: 0 18px 40px -18px rgba(0,0,0,.55); }
  .login-card h2, .login-card #lg-sub { text-align: center; }
}

/* =====================================================================
   Écrans 1366 px (résolution principale des utilisateurs) et responsive
   ===================================================================== */
/* Listes déroulantes : place réservée à la flèche, texte long coupé proprement */
.form-select { padding-right: 2.25rem; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.form-select-sm { padding-right: 1.9rem; }
/* Badges filière / classe : sur une seule ligne dans les tableaux */
.data-table td .chip { white-space: nowrap; }
/* Dates des listes de documents : pas de retour à la ligne */
.list-item > .text-end { white-space: nowrap; flex-shrink: 0; }
/* Nom + photo dans une même cellule (liste des étudiants) */
.cell-person { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.cell-person .avatar { flex-shrink: 0; }
/* Champ mot de passe : texte d'aide lisible même dans une colonne étroite */
.pw-box input[name=password]::placeholder { font-family: var(--bs-body-font-family); font-size: .8rem; }
/* Colonne « Actions » toujours visible : collée au bord droit si le tableau doit défiler */
.data-table th:last-child.text-end, .data-table td:last-child.text-end {
  position: sticky; right: 0; z-index: 2; white-space: nowrap;
  background-color: var(--bs-table-bg, #fff);
  box-shadow: -10px 0 10px -10px rgba(15, 61, 35, .25);
}
.data-table thead th:last-child.text-end { background-color: #f8fafc; z-index: 3; }
.data-table tbody tr:hover td:last-child.text-end { background-color: #fafbff; }
.data-table tr.selected td:last-child.text-end { background-color: #e8f5ec; }
.data-table td .row-actions { flex-wrap: nowrap; }

/* Portables 1200–1599 px : tableaux plus compacts pour éviter le défilement horizontal */
@media (min-width: 992px) and (max-width: 1599.98px) {
  .data-table { font-size: .86rem; }
  .data-table thead th { padding: .7rem .5rem; letter-spacing: .03em; }
  .data-table td { padding: .55rem .5rem; }
  .data-table .row-actions { gap: .15rem; }
  .data-table .btn-icon { width: 30px; height: 30px; }
  .data-table .id-chip { font-size: .72rem; padding: .15rem .4rem; }
  .page-head h1 { font-size: 1.4rem; }
  .content { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* Blocs de filtres compacts (listes Documents / Étudiants) : moins hauts, surtout en 1366 px */
.filters-compact .card-body { padding: .8rem 1rem; }
.filters-compact .row.g-2 { --bs-gutter-x: .5rem; --bs-gutter-y: .45rem; }
.filters-compact .form-label { font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.filters-compact .form-control, .filters-compact .form-select { height: 36px; padding-top: .3rem; padding-bottom: .3rem; font-size: .82rem; border-radius: 9px; }
.filters-compact .form-select-sm { height: 30px; font-size: .78rem; }
.filters-compact .input-icon .form-control { padding-left: 2.1rem; }
.filters-compact .input-icon > svg { width: 15px; height: 15px; left: .7rem; }
.filters-compact .btn-light.w-100 { height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; }
.filters-compact .border-top { margin-top: .6rem !important; padding-top: .55rem !important; }
.filters-compact .view-toggle .btn { padding: .25rem .5rem; }
.filters-compact .view-toggle .btn svg { width: 16px; height: 16px; }
.filters-compact .form-label .badge-soft { text-transform: none; letter-spacing: 0; font-size: .68rem; padding: .05rem .4rem; vertical-align: 1px; }

/* Remise de devoir : tableau de statut (style « Statut de remise ») et récapitulatif direction */
.remise-titre { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin-bottom: .75rem; }
.remise-statut { border: 1px solid var(--line); font-size: .86rem; --bs-table-bg: #fff; }
.remise-statut th { width: 34%; background: #f8f9fa !important; color: var(--ink); font-weight: 700; vertical-align: top; border-right: 1px solid var(--line); }
.remise-statut th, .remise-statut td { padding: .7rem .85rem; border-color: var(--line); }
.remise-form { border-top: 1px dashed var(--line); padding-top: .9rem; }
.remise-resume { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.remise-resume > div { display: flex; flex-direction: column; min-width: 90px; }
.remise-resume small { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.remise-resume b { font-size: 1.05rem; color: var(--ink); }
#remises details summary { cursor: pointer; }

/* Connexion : 2 profils (Étudiant, Direction) */
.role-pick { grid-template-columns: repeat(2, 1fr) !important; }

/* Statuts étudiant : 3 choix empilés */
.status-options { grid-template-columns: 1fr; }
.status-options .status-opt:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.status-options .status-opt input:checked { background-color: var(--c); border-color: var(--c); }
.statut-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; }
