/* Variables CSS globales */
:root {
  --couleur-principale: #808080;
  --couleur-secondaire: rgba(13, 110, 253);
  --couleur-tertiaire: rgba(211, 211, 211, 0.257);
  --taille-texte: 18px;
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #3498db;
  --background-color: #f8f9fa;
  --text-color: #2c3e50;
  --navbar-height: 70px;
}

/* Reset CSS */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset pour les anciens navigateurs */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

/* Styles de base */
body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

main {
  flex: 1 0 auto;
  padding-top: calc(var(--navbar-height) + 20px);
}

html,
body {
  height: 100%;
  margin: 0;
}

h1,
h2 {
  color: #333;
  text-align: center;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  margin-top: 20px;
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

th {
  background-color: var(--couleur-tertiaire);
  color: white;
}

tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

footer {
  flex-shrink: 0;
}

/* Style cohérent pour le footer */
.custom-footer {
  background: linear-gradient(135deg, #a8c0ff 0%, #b8a9c9 100%) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.custom-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.footer-text {
  color: var(--primary-color);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.copyright {
  color: var(--primary-color);
}

.primary {
  color: var(--primary-color);
}

.secondary {
  color: var(--secondary-color);
}

.mes_btn,
.btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  cursor: pointer;
}

.mes_btn:hover,
.btn:hover {
  background: linear-gradient(135deg, #2980b9 0%, var(--accent-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
  color: white;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, var(--accent-color) 100%);
}

.table thead.secondary,
.table thead th {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #2c3e50 100%);
  color: white;
}

.mon_tableau {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-container {
  padding: 20px 0;
  min-height: calc(100vh - var(--navbar-height) - 100px);
}

.page-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
}

.page-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.page-subtitle {
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
  color: white;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-body {
  padding: 1.5rem;
}

.table {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.table thead th {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  font-weight: 600;
  padding: 1rem;
  border: none;
  text-align: center;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.1);
  transform: scale(1.01);
}

.table tbody td {
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  cursor: pointer;
}

.btn:hover {
  background: linear-gradient(135deg, #2980b9 0%, var(--accent-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
  color: white;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, var(--accent-color) 100%);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
  color: white;
}

.form-control {
  border: 2px solid rgba(52, 152, 219, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
  background: rgba(255, 255, 255, 1);
}

.form-label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.badge {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
  border-radius: 20px;
  padding: 0.5rem 1rem;
}

.bg-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%) !important;
}

.bg-primary {
  background: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    #2980b9 100%
  ) !important;
}

.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

.bg-info {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%) !important;
}

.filters-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.filters-bar:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  white-space: nowrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid rgba(52, 152, 219, 0.2);
  color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.filter-btn:hover {
  background: rgba(52, 152, 219, 0.2);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  color: var(--accent-color);
  text-decoration: none;
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
  border-color: var(--accent-color);
  color: white;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.filter-btn.active:hover {
  background: linear-gradient(135deg, #2980b9 0%, var(--accent-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
  color: white;
}

@media (max-width: 767.98px) {
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-buttons {
    justify-content: center;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
  }
}

.alert {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.alert-success {
  background: linear-gradient(
    135deg,
    rgba(40, 167, 69, 0.1) 0%,
    rgba(32, 201, 151, 0.1) 100%
  );
  border-color: rgba(40, 167, 69, 0.3);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(
    135deg,
    rgba(220, 53, 69, 0.1) 0%,
    rgba(231, 76, 60, 0.1) 100%
  );
  border-color: rgba(220, 53, 69, 0.3);
  color: #721c24;
}

.alert-warning {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.1) 0%,
    rgba(253, 126, 20, 0.1) 100%
  );
  border-color: rgba(255, 193, 7, 0.3);
  color: #856404;
}

.alert-info {
  background: linear-gradient(
    135deg,
    rgba(23, 162, 184, 0.1) 0%,
    rgba(32, 201, 151, 0.1) 100%
  );
  border-color: rgba(23, 162, 184, 0.3);
  color: #0c5460;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .d-flex.align-items-center {
    margin-top: 1rem;
  }
}

/* Production optimizations */
@media (min-width: 768px) {
  .container {
    max-width: 1200px;
  }
}

/* Security headers support */
.content-security-policy {
  font-display: swap;
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
}

/* Accessibility improvements */
.nav-link:focus,
.dropdown-item:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navbar,
  .dropdown-menu,
  .btn {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
