/* ===============================
   GENOTE - Thème principal
   =============================== */

:root {
  --genote-primary: #001f3f; /* Bleu marine */
  --genote-primary-soft: #023e8a;
  --genote-orange: #ff8800; /* Orange */
  --genote-orange-soft: #ffe3bf;
  --genote-bg: #f5f7fb;
  --genote-text: #222222;
  --genote-muted: #6c757d;
  --genote-radius-lg: 0.75rem;
  --genote-shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* Reset léger & typographie */
html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--genote-bg);
  color: var(--genote-text);
}

/* Liens */
a {
  color: var(--genote-primary-soft);
  text-decoration: none;
}

a:hover {
  color: var(--genote-orange);
  text-decoration: none;
}

/* ====== Navbar globale (admin/direction/prof/parents) ====== */

.navbar-genote {
  background: linear-gradient(90deg, var(--genote-primary) 0%, #000814 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.navbar-genote .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.navbar-genote .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding-inline: 0.9rem;
}

.navbar-genote .nav-link:hover,
.navbar-genote .nav-link:focus,
.navbar-genote .nav-link.active {
  color: #ffffff;
  position: relative;
}

.navbar-genote .nav-link.active::after,
.navbar-genote .nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 999px;
  background: var(--genote-orange);
}

/* Badge année scolaire */
.badge-year {
  background-color: var(--genote-orange-soft);
  color: var(--genote-primary);
  border-radius: 999px;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
}

/* Toggler mobile (hamburger / X) */
.navbar-toggler {
  border: none;
  outline: none !important;
  box-shadow: none !important;
}

.navbar-toggler-icon-custom {
  font-size: 1.5rem;
  color: #ffffff;
}

/* ====== Offcanvas (menu mobile qui sort de gauche) ====== */

.offcanvas-genote {
  background: #011627;
  color: #ffffff;
}

.offcanvas-genote .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.offcanvas-genote .offcanvas-title {
  font-weight: 600;
}

.offcanvas-genote .btn-close {
  filter: invert(1) grayscale(100%);
  opacity: 0.8;
}

.offcanvas-genote .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.6rem 0;
  border-radius: 0.4rem;
}

.offcanvas-genote .nav-link:hover,
.offcanvas-genote .nav-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* ====== Boutons ====== */

.btn-genote-primary {
  background: linear-gradient(
    135deg,
    var(--genote-primary) 0%,
    var(--genote-primary-soft) 100%
  );
  border: none;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  box-shadow: var(--genote-shadow-soft);
  font-weight: 600;
}

.btn-genote-primary:hover {
  filter: brightness(1.05);
  color: #ffffff;
}

.btn-genote-orange {
  background: linear-gradient(
    135deg,
    var(--genote-orange) 100%,
    var(--genote-orange-soft) 100%
  );
  border: none;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  box-shadow: var(--genote-shadow-soft);
  font-weight: 600;
}

.btn-genote-orange:hover {
  filter: brightness(1.05);
  color: #ffffff;
}

.btn-genote-outline {
  border-radius: 999px;
  border: 1px solid var(--genote-primary-soft);
  color: var(--genote-primary-soft);
  background-color: #ffffff;
  font-weight: 500;
}

.btn-genote-outline:hover {
  background-color: var(--genote-primary-soft);
  color: #ffffff;
}

/* Remplacement visuel des classes Bootstrap natives */
.btn-primary {
  background-color: var(--genote-primary-soft) !important;
  border-color: var(--genote-primary-soft) !important;
}

.btn-primary:hover {
  background-color: var(--genote-primary) !important;
  border-color: var(--genote-primary) !important;
}

.btn-warning {
  background-color: var(--genote-orange) !important;
  border-color: var(--genote-orange) !important;
  color: #000 !important;
}

/* ====== Cards / tableaux ====== */

.card-genote {
  border: none;
  border-radius: var(--genote-radius-lg);
  box-shadow: var(--genote-shadow-soft);
  background-color: #ffffff;
}

.card-genote-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding: 0.85rem 1.25rem;
}

.card-genote-header h1,
.card-genote-header h2,
.card-genote-header h3,
.card-genote-header h4 {
  font-size: 1.05rem;
  margin: 0;
}

.table-genote thead {
  background-color: #f1f3f7;
}

.table-genote thead th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--genote-muted);
}

.table-genote tbody tr:hover {
  background-color: #f9fbff;
}

/* Switch (statut actif/inactif) */

.form-switch .form-check-input {
  width: 2.3rem;
  height: 1.2rem;
}

.form-switch .form-check-input:checked {
  background-color: var(--genote-orange);
  border-color: var(--genote-orange);
}

/* ====== Alertes & messages ====== */

.alert-genote {
  border-radius: 0.75rem;
  border: none;
  box-shadow: var(--genote-shadow-soft);
}

.alert-genote.alert-success {
  background: #e9f9ee;
  color: #1e7b45;
}

.alert-genote.alert-danger {
  background: #ffe8e8;
  color: #b02a37;
}

.alert-genote.alert-warning {
  background: #fff3cd;
}

/* Auto-hide animation (JS ajoute .fade-out) */
.alert.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

/* ====== Formulaires ====== */

.form-label {
  font-weight: 500;
  color: var(--genote-muted);
}

.form-control,
.form-select {
  border-radius: 0.55rem;
  border-color: #dde1ea;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--genote-primary-soft);
  box-shadow: 0 0 0 0.2rem rgba(2, 62, 138, 0.15);
}

/* ====== Footer ====== */

.footer-genote {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #ffffff;
  font-size: 0.85rem;
}

/* ====== Utilitaires ====== */

.shadow-soft {
  box-shadow: var(--genote-shadow-soft);
}

.text-genote-primary {
  color: var(--genote-primary) !important;
}

.text-genote-orange {
  color: var(--genote-orange) !important;
}

/* ====== Responsive ====== */

@media (max-width: 767.98px) {
  .navbar-genote .nav-link.active::after,
  .navbar-genote .nav-link:hover::after {
    display: none;
  }
}
