.news {
  margin-top: clamp(1.65rem, 3vw, 2.5rem);
  padding: clamp(1rem, 2.6vw, 1.75rem);
  border: 1px solid var(--rule);
  background: #fbf5e9;
}

.news h3 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
}

.admin-page { min-height: 100vh; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 81px;
}

.admin-header .text-link { text-align: right; }

.admin-main {
  max-width: 46rem;
  padding-block: clamp(2rem, 6vw, 4rem);
}

.admin-main h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1;
}

.admin-main h2 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: normal;
}

.admin-main .news h3 {
  margin-top: 1.5rem;
  font-size: 1.6rem;
}

.news-preview img, .news-post img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  background: #eee0c5;
}

.news [hidden] { display: none; }

.news-message {
  margin-top: .65rem;
  color: #67513a;
}

.news-message:empty { display: none; }

.news-form {
  display: grid;
  gap: .65rem;
  margin-top: 1rem;
  padding: .9rem;
  border: 1px solid var(--rule);
  background: #f5ebd9;
}

.news-form label {
  font-weight: 700;
  color: var(--ink);
}

.news-form-note {
  color: #67513a;
  font-size: .9rem;
}

.news-form textarea {
  resize: vertical;
  width: 100%;
  min-height: 6rem;
  padding: .65rem .75rem;
  border: 1px solid #ad9170;
  border-radius: 2px;
  color: var(--ink);
  background: #fffaf1;
  font: inherit;
}

.news-actions, .news-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
}

.news .button {
  cursor: pointer;
  font-family: inherit;
  min-height: 2.75rem;
  padding: .6rem .85rem;
}

.news .button:disabled {
  cursor: default;
  opacity: .56;
}

.news-secondary {
  border-color: #ad9170;
  color: var(--ink);
  background: #fff8eb;
}

.news-secondary:hover:enabled { background: #ecd9bb; }

.news-preview img {
  max-width: 7rem;
  border: 1px solid var(--rule);
}

.news-feedback {
  margin: 0;
  color: #3b5d36;
  font-size: .9rem;
}

.news-feedback[data-error] { color: #862c21; }
.news-retry { margin-top: .65rem; }

.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  align-items: start;
  gap: .85rem;
  margin-top: 1rem;
}

.news-feed:empty { display: none; }

.news-post {
  position: relative;
  display: grid;
  gap: .65rem;
  padding: .85rem;
  border: 1px solid var(--rule);
  min-width: 0;
  background: #fffaf1;
}

.news-post time {
  color: #715638;
  font-size: .875rem;
  font-weight: 600;
}

.news-new {
  position: absolute;
  top: -.65rem;
  inset-inline-end: 1rem;
  padding: .16rem .65rem;
  border: 1px solid #81552c;
  border-radius: 999px;
  background: #f1d79f;
  color: #50331a;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.25;
}

.news-post p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.news-post img {
  max-width: 22rem;
  justify-self: center;
}

#nouveautes .news-feed { grid-template-columns: minmax(0, 1fr); }
#nouveautes .news-post img {
  max-width: none;
  aspect-ratio: 5 / 7;
}

@media (min-width: 48rem) {
  #nouveautes .news-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #nouveautes .news-post { padding: .55rem; }
}

@media (min-width: 64rem) {
  #nouveautes {
    --gallery-width: min(calc(100vw - 4rem), 96rem);
    width: var(--gallery-width);
    margin-inline: calc((100% - var(--gallery-width)) / 2);
  }
}

@media (max-width: 640px) {
  .news-post img { max-width: none; }
  #nouveautes { padding-inline: .625rem; }
  #nouveautes .news-post { padding: .375rem; }
}
