/* ====== RESET ET BASE ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  background: #222;
  color: #fff;
}

header h1 {
  font-size: 2rem;
}

header p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ====== BOUTONS ET FILTRES ====== */
button,
.filters button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 10px;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.3s ease;
}

button:hover,
.filters button:hover {
  background: #555;
}

/* Filtres projets */
.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

/* ====== GRILLE BENTO ====== */
main .bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 200px;
  gap: 1rem;
  padding: 2rem 10%;
}

/* ====== BENTO ITEMS ====== */
.bento-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 16px;
  padding: 1rem;
  cursor: pointer;
  overflow: hidden;
  border: 4px solid transparent;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
}

.bento-item:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

/* ====== TAILLES ====== */
.bento-item.small {
  grid-row: span 1;
  grid-column: span 1;
  padding: 0.8rem;
}

.bento-item.medium {
  grid-row: span 2;
  padding: 1.5rem;
}

.bento-item.medium-horizontal {
  grid-row: span 1;
  grid-column: span 2;
  padding: 1rem;
}

.bento-item.large {
  grid-row: span 2;
  grid-column: span 2;
  padding: 1.5rem;
}

/* ====== COULEURS ====== */
.color1 {
  background: linear-gradient(135deg, #90caf9, #bbdefb);
  border-top-color: #87c8fc;
}

.color2 {
  background: linear-gradient(135deg, #a5d6a7, #c8e6c9);
  border-left-color: #b8eaba;
}

.color3 {
  background: linear-gradient(135deg, #ffcc80, #ffe0b2);
  border-bottom-color: #fac87e;
}

.color4 {
  background: linear-gradient(135deg, #352727, #888888);
  border-bottom-color: #909090;
}

.color1:hover {
  background: linear-gradient(135deg, #a6d0ff, #d0e6ff);
}

.color2:hover {
  background: linear-gradient(135deg, #b8e0b8, #e0f5e0);
}

.color3:hover {
  background: linear-gradient(135deg, #ffd699, #ffe6c0);
}

/* ====== TITRES ET TEXTES ====== */
.bento-item h2 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.bento-item p,
.bento-item ul {
  font-size: 0.95rem;
  line-height: 1.4;
}

.bento-item ul {
  list-style: disc;
  margin-left: 1rem;
}

/* ====== IMAGES ====== */
.item-img {
  width: 100%;
  height: 90%;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.bento-item:hover .item-img {
  transform: scale(1.03);
}

/* ====== MODAL ====== */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 14px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-img {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 10px;
}
