/* ============================================================
   site.css — styles communs à toutes les pages (chargé par includes/layout.php)
   ============================================================ */

/* ── Variables ── */
:root {
  --marine: #1b3c70;
  --marine-light: #2f5aa8;
  --marine-bg: #f5f8ff;
}

body,
input,
select,
button,
textarea {
  font-family: "Poppins", sans-serif;
}

body {
  background: #f0f4fa;
}

/* ── Navbar ── */
.navbar-ycib {
  background: var(--marine);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  padding-top: .25rem;
  padding-bottom: .25rem;
}

.dropdown-menu {

  z-index: 2000;
}

.navbar-ycib .navbar-brand {
  padding: 0;
  line-height: 1;
}

.navbar-ycib .navbar-brand img {
  border-radius: 6px;
}

.navbar-ycib .nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-size: .92rem;
  padding: .4rem .9rem !important;
  border-radius: 8px;
  transition: background .15s;
}

.navbar-ycib .nav-link:hover,
.navbar-ycib .nav-link.active {
  background: rgba(255, 255, 255, .15);
  color: #fff !important;
}

.navbar-ycib .dropdown-menu {
  border-radius: 12px;
  border: 1px solid #dce6f5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, .4);
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* ── Cards ── */
.card {
  border-radius: 14px;
  border: 1px solid #dce6f5;
}

.card-header {
  background: var(--marine-bg);
  color: var(--marine);
  font-weight: 600;
  border-bottom: 1px solid #dce6f5;
  border-radius: 14px 14px 0 0 !important;
}

.card-header.dark {
  background: var(--marine);
  color: #fff;
}

/* ── Boutons ── */
.btn-primary {
  background: var(--marine-light);
  border: none;
  border-radius: 10px;
}

.btn-primary:hover {
  background: #1c4fa8;
}

/* ── Forms ── */
.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid #ccd7e4;
  transition: all .2s;
}

.form-control:focus,
.form-select:focus {
  border-color: #4a8dff;
  box-shadow: 0 0 0 3px rgba(74, 141, 255, .2);
}

/* ── Interrupteur d'état : montre l'état actuel, un clic le bascule ── */
.etat-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: #6b7280;
  border-radius: 999px;
  white-space: nowrap;
}

.etat-switch .piste {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #c9d1dc;
  transition: background .15s;
}

.etat-switch .piste::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  transition: left .15s;
}

.etat-switch.on {
  color: #17663a;
}

.etat-switch.on .piste {
  background: #198754;
}

.etat-switch.on .piste::after {
  left: 18px;
}

.etat-switch:hover .piste {
  filter: brightness(.94);
}

.etat-switch:focus-visible {
  outline: 2px solid var(--marine);
  outline-offset: 2px;
}

/* ── Menu « autres actions » d'une ligne de tableau ── */
.menu-actions .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
}

.menu-actions .dropdown-item i {
  width: 16px;
  text-align: center;
  color: #6b7280;
}

.menu-actions .dropdown-item.text-danger i {
  color: inherit;
}

.menu-actions form {
  margin: 0;
}

/* ── Autocomplete ── */
.autocomplete-list {
  position: absolute;
  z-index: 2000;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  animation: fadeIn .12s ease-out;
}

.autocomplete-item {
  padding: 9px 14px;
  font-size: .9rem;
  border-bottom: 1px solid #f4f5f7;
  cursor: pointer;
  transition: all .15s;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #e8f1ff;
  color: #0c4cb3;
  padding-left: 18px;
}

.autocomplete-list::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-list::-webkit-scrollbar-thumb {
  background: #c8d4e5;
  border-radius: 4px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Utilitaires ── */
.small-muted {
  font-size: .85rem;
  color: #666;
}

.petit_txt {
  font-size: small;
}

.badge-role-superadmin {
  background: #6f42c1;
}

.badge-role-admin-club {
  background: #20c997;
}

.badge-role-responsable {
  background: #fd7e14;
}

.title {
  color: #ff5c31;
  font-weight: bold;
  font-size: x-large;
}

.badge-role-membre {
  background: #0d6efd;
}

@media print {
  .no-print {
    display: none !important;
  }

  .autocomplete-list {
    display: none !important;
  }
}
