:root {
  --container-max: 1280px;
  --gutter: 24px;
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
}

.container{
    max-width: 1300px;
    margin: 0;
    padding: 0;
    justify-self: center;
}

.header-section {
  padding: 40px 0;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 24px;
}

.header-text h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.header-text p {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-500);
  max-width: 640px;
}

.search-container {
  position: relative;
  width: 320px;
}

.search-input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--gray-300);
  font-family: inherit;
}

.search-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--brand-teal);
  cursor: pointer;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 12px 24px;
  border-radius: 0.7rem;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--gray-300);
  cursor: pointer;
}

.filter-btn:hover {
  background-color: #8cd3d3;
  color: white;
  border: none;
    transition: all 0.2s;
}

.filter-btn.active {
  background-color: var(--brand-teal);
  color: white;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  row-gap: 20px;
column-gap: 12px;
}

.featured-card {
  display: flex;
  height: 100%;
}

.featured-card .card-img-container {
  flex: 0 0 50%;
}

.featured-card .card-content.principal {
  flex: 0 0 50%;
  padding: 24px;
  color: white;
}

.featured-card .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-news {
  grid-column: span 6;
}

.principal{
    background: linear-gradient(
        90deg,
        #044444 0%,
        #022727 100%
    );
}

.secondary-stack {
  grid-column: span 6;
  display: flex;
  gap: 12px;
}

.bottom-card {
  grid-column: span 4;
}

/* Card Styles */
.card {
  background: var(--surface-container-lowest);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
}

.card:not(.featured-card) {
  border-left: 2px solid var(--brand-orange); /* ta couleur */
}

.card-img-container {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.card-img {
  width: 100%;      /* passe en 100% sinon cover ne marche pas bien */
  height: 100%;
  object-fit: cover;
  object-position: 17% center; /* <- ICI on déplace */
  transition: transform 0.5s;
  display: block;
  max-width: none;
}

.card-content {
  flex: 1;              /* prend 1 part */
  min-width: 0;         
  padding: 24px;        /* ajoute du padding au texte */
}

.card:hover .card-img {
  transform: scale(1.05);
}

.badge-container {
  display: flex;
  gap: 137px;
}

.badge {
  border-radius: 0.5rem;
  margin-bottom: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgb(255, 144, 18, 0.3);
  color: #ff9012;
  padding: 2px 10px;
}
.badge-secondary {
  background: rgba(0, 168, 168, 0.3);
  color: var(--brand-teal);
  padding: 2px 10px;
}
.badge-date {
  color: var(--gray-500);
  backdrop-filter: blur(4px);
}

.card-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.featured-card .card-content {
  padding: 32px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-tag-secondary {
  background: rgba(0, 168, 168, 0.3);
  color: var(--brand-teal);
  border-radius: 0.5rem;
  padding: 2px 10px;
}

.meta-tag-primary {
  background: rgba(255, 138, 0, 0.3);
  color: var(--brand-orange);
  border-radius: 0.5rem;
  padding: 2px 10px;
}

.meta-date {
  color: var(--gray-500);
}

.card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}
.card h4 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card p {
  font-size: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}

.meta h4{
    font-size: 18px;
}

.read-more {
    font-size: 14px;
  margin-top: auto;
  color: var(--brand-teal);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s;
}

.read-more:hover {
  gap: 16px;
}

.icon {
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

/* Pagination */
.pagination {
  margin: 64px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--outline-variant);
  background: none;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  color: var(--on-surface);
}

.page-btn:hover {
  background-color: #1bbfd8;
  color: white;
}

.page-btn.active {
  background-color: var(--brand-teal);
  color: white;
  border-color: var(--secondary);
}

/* ==========================================================
   RESPONSIVE
========================================================== */
/* ===========================================
   Desktop moyen (≤ 1200px)
=========================================== */
@media (max-width: 1200px) {

    .container{
        max-width: 1100px;
        padding: 0 24px;
    }

    .header-flex{
        gap: 20px;
    }

    .search-container{
        width: 280px;
    }

    .featured-news{
        grid-column: span 7;
    }

    .secondary-stack{
        grid-column: span 5;
        flex-direction: column;
    }

    .bottom-card{
        grid-column: span 4;
    }

    .featured-card .card-content{
        padding: 20px;
    }

    .card-content{
        padding: 20px;
    }

    .card h3{
        font-size: 20px;
    }

    .card h4{
        font-size: 18px;
    }

    .card p{
        font-size: 13px;
    }

    .badge-container{
        gap: 20px;
        justify-content: space-between;
    }

    .filters{
        gap: 10px;
    }

    .filter-btn{
        padding: 10px 18px;
    }
}

/* -------- Tablette -------- */
@media (max-width: 992px){

    .container{
        width:100%;
        padding:0 20px;
    }

    .header-flex{
        flex-direction:column;
        align-items:flex-start;
        gap:24px;
    }

    .search-container{
        width:100%;
    }

    .news-grid{
        display:grid;
        grid-template-columns:1fr;
        gap:20px;
    }

    .featured-news,
    .secondary-stack,
    .bottom-card{
        grid-column:unset;
    }

    .secondary-stack{
        flex-direction:column;
    }

    .featured-card{
        flex-direction:column;
    }

    .featured-card .card-img-container{
        flex:none;
        height:320px;
    }

    .featured-card .card-content{
        flex:none;
    }

    .card{
        flex-direction:column;
    }

    .card-img-container{
        height:250px;
    }

    .card-img{
        width:100%;
        height:100%;
    }

    .badge-container{
        justify-content:space-between;
        gap:20px;
    }

}


/* -------- Mobile -------- */
@media (max-width:768px){

    .header-section{
        padding:30px 0;
    }

    .header-text h1{
        font-size:30px;
    }

    .header-text p{
        font-size:15px;
    }

    .filters{
        overflow-x:auto;
        flex-wrap:nowrap;
        padding-bottom:8px;
        scrollbar-width:none;
    }

    .filters::-webkit-scrollbar{
        display:none;
    }

    .filter-btn{
        white-space:nowrap;
        flex-shrink:0;
    }

    .featured-card .card-img-container{
        height:250px;
    }

    .card-img-container{
        height:220px;
    }

    .card-content{
        padding:20px;
    }

    .featured-card .card-content{
        padding:24px;
    }

    .card h3{
        font-size:24px;
    }

    .card h4{
        font-size:20px;
    }

    .card p{
        font-size:14px;
    }

    .pagination{
        flex-wrap:wrap;
    }

}


/* -------- Petit mobile -------- */
@media (max-width:480px){

    .container{
        padding:0 16px;
    }

    .header-text h1{
        font-size:26px;
    }

    .header-text p{
        font-size:14px;
    }

    .featured-card .card-img-container{
        height:200px;
    }

    .card-img-container{
        height:180px;
    }

    .badge{
        font-size:8px;
    }

    .badge-date{
        font-size:10px;
    }

    .card h3{
        font-size:21px;
    }

    .card h4{
        font-size:18px;
    }

    .read-more{
        font-size:13px;
    }

}
