* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  background-color: #0A0A0A;
  color: #E6ECEF;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  background-color: #0A0A0A;
  border-bottom: 2px solid #CCCCCC;
  overflow: visible;
}

.header-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 20px;
  background-color: #111111;
  color: #FFFFFF;
  font-size: 12px;
  border-bottom: 2px solid #CCCCCC;
}

.topbar-right a {
  margin-left: 15px;
  color: #FFFFFF;
  text-decoration: none;
  transition: 0.3s ease;
}

.topbar-right a:hover,
.topbar-right a:focus-visible {
  padding: 2px 6px;
  background-color: #FFFFFF;
  color: #000000;
  border-radius: 4px;
}

.header-main {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  width: 100%;
  padding: 12px 40px;
  overflow: visible;
}

.logo {
  position: relative;
  z-index: 1002;
}

.logo img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 2px solid #CCCCCC;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  overflow: visible;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  overflow: visible;
}

.nav-link {
  display: inline-block;
  padding: 10px 12px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  text-transform: uppercase;
  transition: 0.3s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background-color: #E6ECEF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.dropdown {
  position: relative;
  list-style: none;
  z-index: 2000;
}

.dropdown:hover,
.dropdown:focus-within {
  z-index: 4000;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5000;
  min-width: 190px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  background-color: #0A0A0A;
  border: 2px solid #CCCCCC;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background-color: #E6ECEF;
  color: #000000;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 1003;
  width: 34px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 4px;
  transition: 0.3s ease;
}

/* CONTENU */

.container {
  width: 100%;
  max-width: 1140px;
  margin: auto;
  padding: 24px 20px 50px;
}

.page-title {
  margin: 12px auto 20px;
  color: #E6ECEF;
  text-align: center;
  font-size: clamp(38px, 8vw, 80px);
  line-height: 1.05;
  font-weight: 800;
  text-transform: uppercase;
}

.page-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin: 14px auto 0;
  background-color: #BFDFFF;
}

.title {
  margin-top: 70px;
  margin-bottom: 30px;
  color: #E6ECEF;
  font-size: clamp(24px, 4vw, 35px);
  text-transform: uppercase;
}

.title span {
  color: #BFDFFF;
}

.bloc-presentation,
.bloc-articles {
  width: 100%;
  margin-bottom: 35px;
  padding: 30px 20px;
  background-color: #000000;
  border: 2px solid #BFDFFF;
  border-radius: 14px;
}

.sources-logos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  margin-bottom: 35px;
}

.sources-logos img {
  justify-self: center;
  width: 95px;
  height: 95px;
  object-fit: contain;
  padding: 10px;
  background-color: #FFFFFF;
  border: 2px solid #000000;
  border-radius: 10px;
}

.intro-section {
  color: #E6ECEF;
  font-size: 18px;
  line-height: 1.8;
  text-align: left;
}

.liste-sources {
  margin-top: 20px;
  list-style: none;
}

.liste-sources li {
  color: #E6ECEF;
  font-size: 17px;
  line-height: 1.8;
}

.liste-sources li::before {
  content: "- ";
  color: #BFDFFF;
}

.source {
  font-weight: 600;
}

.source.com {
  color: #FFFFFF;
}

.articles-title {
  margin-bottom: 25px;
  color: #E6ECEF;
  font-size: 26px;
  text-transform: uppercase;
}

.articles-title::before {
  content: "| ";
  color: #BFDFFF;
}

/* CARTES ARTICLES */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.news-item {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 22px;
  background-color: #F4F6F8;
  color: #111111;
  border: 2px solid #BFDFFF;
  border-radius: 14px;
  transition: 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 18px rgba(191, 223, 255, 0.35);
}

.news-card-top {
  display: grid;
  grid-template-columns: 70px 1fr;
  column-gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.news-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

.news-card-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  padding: 3px;
  background-color: #FFFFFF;
  border: 2px solid #000000;
  border-radius: 4px;
}

.news-card-number {
  margin-top: 8px;
  color: #000000;
  font-size: 12px;
  text-align: center;
}

.news-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 3px;
}

.news-card-source {
  margin-bottom: 12px;
  color: #000000;
  font-size: 15px;
  font-weight: bold;
}

.news-card-date {
  color: #000000;
  font-size: 12px;
}

.news-item h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.35;
}

.news-item h3 a {
  color: #111111;
  text-decoration: none;
}

.news-item h3 a:hover,
.news-item h3 a:focus-visible {
  color: #2A6FBB;
}

.news-description {
  flex-grow: 1;
  margin-bottom: 18px;
  padding: 14px;
  background-color: #EEF1F4;
  color: #222222;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.8;
}

.news-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 12px 14px;
  color: #FFFFFF;
  background-color: #0F1C2E;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  transition: 0.3s ease;
}

.news-link:hover,
.news-link:focus-visible {
  background-color: #2A6FBB;
}

.loading-news,
.error-news {
  grid-column: 1 / -1;
  padding: 30px;
  color: #E6ECEF;
  font-size: 18px;
  text-align: center;
}

/* FOOTER */

.footer {
  padding: 40px 20px 10px;
  background-color: #0E0E0E;
  color: #E6ECEF;
  font-size: 14px;
  border-top: 2px solid #CCCCCC;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-section {
  min-width: 0;
}

.footer-section:nth-child(1) {
  justify-self: start;
  text-align: left;
}

.footer-section:nth-child(2) {
  justify-self: center;
  text-align: left;
}

.footer-section:nth-child(3) {
  justify-self: end;
  text-align: left;
}

.footer-section h4 {
  margin-bottom: 10px;
  color: #E6ECEF;
  font-size: 15px;
  text-transform: uppercase;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 6px;
}

.footer-section a {
  color: #E6ECEF;
  text-decoration: none;
  transition: 0.2s ease;
}

.footer-section a:hover,
.footer-section a:focus-visible {
  color: #CCCCCC;
}

.footer-divider {
  width: 100%;
  margin-top: 20px;
  border-top: 1px solid #CCCCCC;
}

.footer-bottom {
  margin-top: 10px;
  color: #E6ECEF;
  font-size: 15px;
  text-align: center;
}

.scroll-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999;
  padding: 8px 12px;
  background-color: #CCCCCC;
  color: #000000;
  border: none;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  transition: 0.3s ease;
}

.scroll-top.visible {
  opacity: 0.8;
  visibility: visible;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  opacity: 1;
  transform: scale(1.1);
}

/* TABLETTE */

@media (max-width: 1024px) {
  .header-main {
    padding: 12px 24px;
  }

  .nav-list {
    gap: 10px;
  }

  .nav-link {
    padding: 9px 8px;
    font-size: 12px;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 768px) {
  .header-topbar {
    justify-content: center;
    text-align: center;
  }

  .topbar-right a {
    margin: 0 8px;
  }

  .header-main {
    padding: 12px 18px;
  }

  .logo img {
    width: 42px;
    height: 42px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    height: 100dvh;
    padding: 120px 20px 24px;
    background-color: #0A0A0A;
    border-top: 1px solid #CCCCCC;
    overflow-y: auto;
    z-index: 1000;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-size: 14px;
    text-align: center;
  }

  .dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    border-width: 1px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .dropdown:hover > .dropdown-menu,
  .dropdown:focus-within > .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    text-align: center;
    white-space: normal;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
  }

  .container {
    padding: 20px 14px 40px;
  }

  .title {
    margin-top: 42px;
    margin-bottom: 20px;
  }

  .bloc-presentation,
  .bloc-articles {
    margin-bottom: 28px;
    padding: 18px 12px;
  }

  .sources-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .sources-logos img {
    width: 74px;
    height: 74px;
    padding: 8px;
  }

  .intro-section {
    font-size: 16px;
    text-align: left;
  }

  .liste-sources li {
    font-size: 15px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-item {
    min-height: auto;
    padding: 18px;
  }

  .news-card-top {
    grid-template-columns: 60px 1fr;
    column-gap: 14px;
  }

  .news-card-left {
    width: 60px;
  }

  .news-card-logo {
    width: 54px;
    height: 54px;
  }

  .news-item h3 {
    font-size: 18px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-section:nth-child(1),
  .footer-section:nth-child(2),
  .footer-section:nth-child(3) {
    justify-self: center;
    text-align: center;
  }

  .scroll-top {
    right: 18px;
    bottom: 18px;
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .sources-logos {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-card-top {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .news-card-left {
    align-items: flex-start;
  }
}