/* ===============================
   STYLE GLOBAL (style.css)
   Appliqué sur toutes les pages
================================= */

/* ---- VARIABLES CSS ---- */
:root {
  --primary-color: #007bff;
  --primary-dark: #0056b3;
  --secondary-color: #6610f2;
  --accent-color: #ffd166;
  --bg-light: #e9f4ff;
  --text-dark: #333;
  --primary-light: #bed7fa; /* Un bleu clair */
  --primary-light2: #88a1c2; /* Un autre bleu clair mais plus léger */
  --card-radius: 1rem;
  --btn-radius: 0.6rem;
  --shadow-light: 0 6px 20px rgba(0,0,0,0.08);
}

/* ---- GLOBAL ---- */
body {
  font-family: "Inter", "Segoe UI", sans-serif;
  /* --- background: var(--bg-light); */
  background: linear-gradient(135deg, var(--primary-light) 100%, var(--primary-light2) 70%);
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background 0.3s ease;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

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

/* ---- NAVBAR ---- */
.navbar {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.navbar-brand {
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  color: #fff !important;
  font-weight: 700;
}

.navbar .nav-link {
  color: #f8f9fa !important;
  margin: 0 0.5rem;
  font-weight: 500;
  transition: color 0.3s, transform 0.2s;
}

.navbar .nav-link:hover {
  color: var(--accent-color) !important;
  transform: translateY(-1px);
}

/* ---- FOOTER ---- */
.footer {
  background: #003366;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
}

/* ---- ALERTES ---- */
.alert {
  border-radius: var(--btn-radius);
  font-size: 0.95rem;
  animation: fadeInDown 0.5s ease;
}

/* ---- FORM LOGIN ---- */
.login-page {
  background: linear-gradient(135deg, var(--primary-color) 30%, var(--secondary-color) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page .card {
  border-radius: var(--card-radius);
  box-shadow: 0 8px 25px rgba(0,0,0,0.18);
  animation: fadeInUp 0.6s ease;
}

.login-page .form-control {
  border-radius: var(--btn-radius);
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
}

.login-page .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}

/* ---- BOUTONS GLOBAL ---- */
.btn {
  border-radius: var(--btn-radius);
  font-weight: 600;
  padding: 0.45rem 1rem;
  transition: all 0.25s ease-in-out;
  box-shadow: var(--shadow-light);
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
  border: none;
}

.btn-success {
  background: linear-gradient(90deg, #28a745, #218838);
  border: none;
  color: #fff;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- TABLES GLOBAL ---- */
.table {
  vertical-align: middle;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.table thead {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  color: #fff;
}

.table-hover tbody tr:hover {
  background: rgba(0, 123, 255, 0.05);
  transition: background 0.3s ease;
}

/* ---- CARDS GLOBAL ---- */
.card {
  border-radius: var(--card-radius);
  border: none;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Logo Styles – Responsive pour Web/TV */
.logo-img {
    height: 40px; /* Navbar : compact */
    width: auto;
    vertical-align: middle;
    margin-right: 0.5rem; /* Espace fin */
}

.login-logo {
    height: 80px; /* Login : plus visible */
    width: auto;
    display: block;
    margin: 0 auto 1rem; /* Centré + espace bas */
}

/* Media pour TV petite (e.g., 720p) */
@media (max-width: 768px) {
    .logo-img { height: 35px; }
    .login-logo { height: 60px; }
}

/* Indicateurs de connexion */
.connection-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.status-connecté {
    background-color: #28a745;
    color: white;
}

.status-déconnecté {
    background-color: #6c757d;
    color: white;
}

.status-erreur {
    background-color: #dc3545;
    color: white;
}

.status-connexion {
    background-color: #ffc107;
    color: black;
}

/* Amélioration des cartes vidéo */
.video-card {
    position: relative;
    transition: all 0.3s ease;
}

.video-card.focused {
    transform: scale(1.05);
    z-index: 100;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Placeholder amélioré */
.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}