  /* Reset minimal */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    font-family: 'Montserrat', sans-serif;
    background-color: #0a0f2f;
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: hidden;
  }
  header {
  background: linear-gradient(135deg, #121633 0%, #1a214f 100%);
  padding: 1.5rem 0 1.5rem 0; /* augmente beaucoup le padding en bas */
  text-align: center;
  box-shadow: 0 0 20px #2979ffaa;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  /* height: 70px; */ /* supprimé */
  box-sizing: border-box;
}


  header.hidden {
    transform: translateY(-100%);
  }

  header.visible {
    transform: translateY(0);
  }

  header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, transparent, #2979ff, transparent);
    animation: neonGlow 3s linear infinite;
  }

  @keyframes neonGlow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
  }

  header h1 {
    margin: 0;
    font-weight: 700;
    font-size: 2rem;
    color: #2979ff;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px #2979ffcc;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
  }

  header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: #2979ff;
    box-shadow: 0 0 10px #2979ff;
  }

  /* Menu Toggle Button - Solution améliorée */
  .menu-toggle {
    position: fixed;
    right: 1.5rem;
    top: 1rem;
    background: none;
    border: none;
    color: #eee;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    background-color: rgba(41, 121, 255, 0.2);
  }

  .menu-toggle:hover {
    background-color: rgba(41, 121, 255, 0.4);
    color: #59a1ff;
  }

  .menu-toggle .icon-container {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .menu-toggle i {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
  }

  .menu-toggle .fa-bars {
    opacity: 1;
    transform: rotate(0deg);
  }

  .menu-toggle .fa-times {
    opacity: 0;
    transform: rotate(-90deg);
  }

  .menu-toggle.open .fa-bars {
    opacity: 0;
    transform: rotate(90deg);
  }

  .menu-toggle.open .fa-times {
    opacity: 1;
    transform: rotate(0deg);
  }

  .sidebar {
    height: 100vh;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #121633 0%, #1a214f 100%);
    overflow-x: hidden;
    overflow-y: auto;
    transition: 0.5s;
    padding-top: 70px;
    box-shadow: -5px 0 20px rgba(41, 121, 255, 0.3);
  }

  .sidebar.open {
    width: 300px;
  }

  .sidebar a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1.2rem;
    color: #bbd0ff;
    display: block;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .sidebar a:hover {
    color: #2979ff;
    background-color: #0d1233;
  }

  .sidebar .closebtn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    color: #bbd0ff;
    transition: color 0.3s ease;
  }

  .sidebar .closebtn:hover {
    color: #ff5959;
  }

  /* Overlay when sidebar is open */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

  main.container {
    flex: 1 0 auto;
    max-width: 1200px;
    margin: 6rem auto 4rem;
    padding: 0 1.5rem;
  }

  /* Section anime par défaut */
  .default-animes {
    margin-bottom: 3rem;
  }

  .default-animes h2 {
    color: #59a1ff;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
  }

  .default-animes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
  }
/* Titre du menu*/
    .sidebar h1 {
    font-size: 24px;
    color: #3e6dd3;
    text-align: center;
    margin: 20px 0;

  }

  /* Formulaire amélioré */
  .search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    align-items: center;
  }

  .search-box {
    display: flex;
    flex-grow: 1;
    min-width: 250px;
    max-width: 500px;
    position: relative;
  }

  input[type=text] {
    padding: 0.8rem 1rem 0.8rem 3rem;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 2px solid #2979ff;
    outline: none;
    background-color: #1a214f;
    color: #eee;
    width: 100%;
    transition: all 0.3s ease;
  }

  input[type=text]:focus {
    box-shadow: 0 0 15px #2979ffcc;
    border-color: #59a1ff;
  }

  .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #59a1ff;
    font-size: 1.2rem;
  }

  select {
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 2px solid #2979ff;
    outline: none;
    background-color: #1a214f;
    color: #eee;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  select:focus {
    box-shadow: 0 0 15px #2979ffcc;
    border-color: #59a1ff;
  }

  button {
    background-color: #2979ff;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 12px #2979ffaa;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  button:hover, button:focus {
    background-color: #1a5fff;
    box-shadow: 0 0 20px #2979ffdd;
    transform: translateY(-2px);
  }

  button:active {
    background-color: #1153cc;
    transform: translateY(0);
  }

  /* Cards grid améliorée */
  #results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
  }

  .anime-card {
    background: linear-gradient(135deg, #141a40 0%, #1a214f 100%);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(41, 121, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #2979ff33;
  }

  .anime-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(41, 121, 255, 0.5);
    border-color: #2979ff;
  }

  .anime-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    background: linear-gradient(135deg, #22254b 0%, #1a214f 100%);
    border-bottom: 1px solid #2979ff33;
  }

  .card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }

  .card-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #59a1ff;
    text-shadow: 0 0 5px #59a1ffaa;
  }

  .card-text {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #d1d9ffcc;
    margin-bottom: 1rem;
    overflow: hidden;
  }

  .card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
  }

  .episodes, .score {
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .episodes {
    color: #bbd0ff;
  }

  .score {
    color: #ffd966;
  }

  .btn-trailer {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2979ff;
    background: transparent;
    border: 2px solid #2979ff;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .btn-trailer:hover {
    background-color: #2979ff;
    color: white;
    box-shadow: 0 0 10px #2979ffcc;
  }

  /* Spinner centré */
  .loading-spinner {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 3rem 0;
  }

  .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.5rem;
    border-color: #2979ff transparent transparent transparent;
    border-radius: 50%;
    animation: spin 1.1s linear infinite;
  }

  @keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
  }

  /* Alert messages améliorés */
  .alert {
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 600;
    grid-column: 1 / -1;
  }

  .alert-warning {
    background-color: rgba(42, 46, 105, 0.8);
    color: #ffd966;
    border: 1px solid #ffd96633;
    box-shadow: 0 0 15px #ffd96644;
  }

  .alert-danger {
    background-color: rgba(64, 0, 0, 0.8);
    color: #ff8a8a;
    border: 1px solid #ff595933;
    box-shadow: 0 0 15px #ff595944;
  }

  /* Footer amélioré et responsive */
  footer {
    background: linear-gradient(135deg, #121633 0%, #1a214f 100%);
    color: #bbd0ff;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 -2px 20px #2979ff99;
    margin-top: auto;
  }

  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .footer-links a {
    color: #59a1ff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .footer-links a:hover {
    color: #bbd0ff;
    text-shadow: 0 0 5px #59a1ffaa;
  }

  .copyright {
    font-size: 0.9rem;
    color: #59a1ff;
  }

  .social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .social-links a {
    color: #bbd0ff;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0.5rem;
  }

  .social-links a:hover {
    color: #2979ff;
    transform: translateY(-3px);
  }

  /* Responsive amélioré */
  @media (max-width: 768px) {
    header {
      padding: 0.8rem 0;
      height: 60px;
    }

    header h1 {
      font-size: 1.5rem;
    }

    .menu-toggle {
      top: 0.8rem;
      right: 1rem;
      width: 36px;
      height: 36px;
      font-size: 1.5rem;
    }

    main.container {
      margin-top: 5rem;
    }

    .search-row {
      flex-direction: column;
      align-items: stretch;
    }

    .search-box {
      min-width: 100%;
    }

    button {
      justify-content: center;
      width: 100%;
    }

    .anime-image {
      height: 280px;
    }

    .footer-links {
      flex-direction: column;
      gap: 1rem;
      align-items: center;
    }

    .sidebar {
      width: 0;
      padding-top: 60px;
    }

    .sidebar.open {
      width: 250px;
    }

    .sidebar a {
      font-size: 1.1rem;
      padding: 12px 20px;
    }
  }

  @media (max-width: 480px) {
    header h1 {
      font-size: 1.3rem;
      max-width: 70%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .anime-image {
      height: 220px;
    }

    .sidebar.open {
      width: 100%;
    }
  }
