/* Concours photo — page publique (/concours-photo) */

.pc-page {
  --pc-orange: #e6631a;
  --pc-orange-deep: #bd490e;
  --pc-night: #24231e;
  max-width: 1280px;
}

.pc-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 34px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 34px 36px;
  overflow: hidden;
  border: 1px solid #e3dcc9;
  border-radius: 18px;
  background:
    radial-gradient(circle at 94% 6%, rgba(230, 99, 26, .13), transparent 34%),
    #fffdf9;
}
.pc-intro::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 5px;
  background: var(--pc-orange);
  content: "";
}
.pc-intro__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.pc-intro__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.pc-intro__bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    100deg,
    rgba(255, 253, 249, .97) 0%,
    rgba(255, 253, 249, .93) 46%,
    rgba(255, 253, 249, .62) 68%,
    rgba(255, 253, 249, .28) 100%
  );
}
.pc-intro__content { position: relative; z-index: 1; min-width: 0; align-self: center; }
.pc-intro__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  font: 500 11px/1 'DM Mono', monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #776e5d;
}
.pc-intro__eyebrow > .lw-icon { color: var(--pc-orange); font-size: 18px; }
.pc-intro__title {
  max-width: 23ch;
  margin: 0 0 10px;
  font: 800 clamp(30px, 3.5vw, 48px)/1.02 'Archivo', sans-serif;
  letter-spacing: -.04em;
  color: #1d1c17;
  text-wrap: balance;
}
.pc-intro__theme {
  margin: 0 0 12px;
  font: 700 clamp(19px, 2vw, 25px)/1.2 'Archivo', sans-serif;
  color: var(--pc-orange-deep);
  text-wrap: balance;
}
.pc-intro__desc {
  max-width: 68ch;
  margin: 0;
  font: 400 15px/1.55 'DM Sans', sans-serif;
  color: #625c50;
  text-wrap: pretty;
}
.pc-intro__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
  font: 500 12px/1.35 'DM Sans', sans-serif;
  color: #776e5d;
}
.pc-intro__meta .lw-icon { font-size: 17px; color: var(--pc-orange); }
.pc-intro__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pc-intro__actions a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pc-intro__side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.pc-intro__remaining {
  align-self: center;
  margin-top: 11px;
  font: 500 11px/1.2 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #776e5d;
}
.pc-intro__remaining strong { margin-right: 3px; color: var(--pc-orange-deep); }
.pc-intro__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 24px;
  border-radius: 14px;
  background: var(--pc-night);
  color: #fffdf9;
  text-align: center;
}
.pc-intro__status .lw-icon { margin-bottom: 8px; font-size: 32px; color: #f2801f; }
.pc-intro__status strong { font: 700 20px/1.2 'Archivo', sans-serif; }
.pc-intro__status span { margin-top: 7px; font-size: 13px; color: #cfc8ba; }

.pc-phase {
  display: inline-block; padding: 2px 9px; border-radius: var(--lw-radius-pill);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  background: var(--lw-moss); color: var(--lw-forest);
}
.pc-phase--open { background: var(--lw-forest); color: #fff; }
.pc-phase--upcoming { background: #fbefd6; color: #8a5a10; }
.pc-phase--ended { background: var(--lw-paper-deep); color: var(--lw-muted); }

.pc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid #e3dcc9;
  border-radius: 16px;
  background: #fffdf9;
  color: #776e5d;
}
.pc-stats > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 0;
  padding: 15px 12px;
  border-right: 1px solid #eee7d7;
  font: 400 12px/1.25 'DM Sans', sans-serif;
}
.pc-stats > div:last-child { border-right: 0; }
.pc-stats .lw-icon { flex: none; font-size: 20px; color: var(--pc-orange); }
.pc-stats span { min-width: 0; }
.pc-stats strong { display: block; font: 800 21px/1 'Archivo', sans-serif; color: #1d1c17; }

.pc-countdown {
  padding: 19px;
  border-radius: 14px;
  background: var(--pc-night);
  color: #f1efe6;
  text-align: center;
}
.pc-countdown--over { background: var(--lw-ink); }
.pc-countdown__label {
  font-family: var(--lw-font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .8; margin-bottom: 10px;
}
.pc-countdown__cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pc-countdown__cell {
  min-width: 0;
  padding: 9px 4px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
}
.pc-countdown__num { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.pc-countdown__unit { display: block; font-size: 11px; opacity: .75; margin-top: 4px; }
.pc-countdown__until { margin-top: 10px; font-size: 12.5px; opacity: .8; }
.pc-countdown.is-over .pc-countdown__cells { opacity: .5; }

.pc-featured {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px;
  background: #fff; border: 2px solid var(--lw-clay); border-radius: var(--lw-radius);
  padding: 18px; margin-bottom: 26px;
}
.pc-featured__media img { width: 100%; max-height: 560px; object-fit: contain; background: var(--lw-paper-deep); border-radius: 8px; display: block; }
.pc-featured__title { font-size: 24px; margin: 6px 0 10px; }
.pc-featured__all { display: inline-block; margin-top: 14px; font-weight: 600; }
.pc-featured .share { margin-top: 16px; }

.pc-podium { margin-bottom: 30px; }
.pc-podium__list {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end;
}
.pc-podium__item { background: #fff; border: 1px solid var(--lw-line); border-radius: var(--lw-radius); overflow: hidden; }
.pc-podium__item--1 { order: 2; border-color: var(--lw-gold); box-shadow: 0 8px 24px rgba(227, 166, 60, .25); }
.pc-podium__item--2 { order: 1; }
.pc-podium__item--3 { order: 3; }
.pc-podium__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--lw-paper-deep); }
.pc-podium__item--1 .pc-podium__media { aspect-ratio: 1; }
.pc-podium__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-podium__media .pc-rank { position: absolute; top: 10px; left: 10px; }
.pc-podium__body { padding: 12px 14px 14px; }
.pc-podium__name { font-weight: 700; }
.pc-podium__title { color: var(--lw-ink-soft); font-size: 14px; }
.pc-podium__votes { color: var(--lw-clay); font-weight: 600; font-size: 14px; margin-top: 4px; }
.pc-podium__prize { margin-top: 8px; font-size: 13.5px; display: flex; gap: 6px; align-items: center; color: #8a5a10; }

.pc-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: 15px;
  background: var(--lw-ink); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.pc-rank sup { font-size: 9px; margin-left: 1px; }
.pc-rank--1 { background: var(--lw-gold); color: var(--lw-ink); }
.pc-rank--2 { background: #cfd3d8; color: var(--lw-ink); }
.pc-rank--3 { background: #cf9a6b; color: var(--lw-ink); }

.pc-mine { margin-bottom: 26px; border-color: var(--lw-forest) !important; }
.pc-mine__grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.pc-mine__thumb { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--lw-paper-deep); }
.pc-mine__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-mine__title { font-size: 21px; margin: 6px 0 8px; }
.pc-mine__votes { margin: 0 0 12px; font-size: 15px; }
.pc-mine__link { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.pc-mine__linkrow { display: flex; gap: 8px; margin-top: 6px; }
.pc-mine__linkrow input {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 13.5px; padding: 8px 10px;
  border: 1px solid var(--lw-line); border-radius: var(--lw-radius-sm); background: var(--lw-paper);
}
.pc-mine__hint { font-size: 13px; color: var(--lw-muted); margin: 10px 0 0; font-style: italic; }
.pc-mine__withdraw { margin-top: 12px; }
.pc-linkbtn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px;
  color: var(--lw-clay); text-decoration: underline; cursor: pointer;
}

.pc-gallery__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e3dcc9;
}
.pc-gallery__votes { margin: 4px 0 0; font-size: 14px; color: var(--lw-muted); }
.pc-gallery__sort { display: flex; gap: 8px; }

.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pc-card {
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e3dcc9;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 8px 24px rgba(64, 49, 24, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pc-card:hover {
  transform: translateY(-2px);
  border-color: #d7c9ad;
  box-shadow: 0 12px 30px rgba(64, 49, 24, .09);
}
.pc-card:target { border-color: var(--lw-clay); box-shadow: 0 0 0 3px rgba(192, 86, 47, .2); }
.pc-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--lw-paper-deep); }
.pc-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.pc-card__media:hover img { transform: scale(1.03); }
.pc-card__body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pc-card__title { font: 700 17px/1.25 'Archivo', sans-serif; color: #1d1c17; }
.pc-card__author { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--lw-ink-soft); }
.pc-card__author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.pc-card__commune { color: var(--lw-muted); }
.pc-card__caption { margin: 0; font-size: 13.5px; color: var(--lw-muted); line-height: 1.45; }

.pc-vote { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.pc-vote__count { font-size: 13.5px; font-weight: 600; color: var(--lw-clay); }
.pc-vote__mine { font-size: 12.5px; color: var(--lw-muted); font-style: italic; }
.pc-vote__btn {
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 7px 14px; border-radius: var(--lw-radius-pill);
  border: 1px solid var(--lw-ink); background: #fff; color: var(--lw-ink);
  transition: background .15s ease, color .15s ease;
}
.pc-vote__btn:hover { background: var(--lw-ink); color: #fff; }
.pc-vote__btn.is-on { background: var(--lw-clay); border-color: var(--lw-clay); color: #fff; }
.pc-vote__btn.is-on:hover { background: var(--lw-clay-deep); border-color: var(--lw-clay-deep); }
.pc-vote__btn[disabled] { opacity: .45; cursor: not-allowed; }
.pc-vote__btn[disabled]:hover { background: #fff; color: var(--lw-ink); }
.pc-vote--closed .pc-vote__count { color: var(--lw-muted); }

.pc-split { gap: 30px; }
.pc-split > .s353 { flex-basis: 650px; }
.pc-aside {
  flex: 0 1 320px;
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pc-prize__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin: 10px 0 6px; display: block; }
.pc-prize__title { font-size: 19px; font-weight: 700; margin: 8px 0 6px; }
.pc-prize__desc { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.pc-prize__who { margin: 0; font-size: 12.5px; color: var(--lw-muted); }
.pc-rules__list { margin: 10px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; display: grid; gap: 6px; }
.pc-rules__custom { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--lw-line); font-size: 13.5px; line-height: 1.55; color: var(--lw-ink-soft); }
.pc-others__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.pc-others__list a { display: grid; gap: 3px; color: inherit; text-decoration: none; padding: 10px 12px; border: 1px solid var(--lw-line); border-radius: var(--lw-radius-sm); }
.pc-others__list a:hover { border-color: var(--lw-clay); }
.pc-others__list .pc-phase { justify-self: start; }
.pc-others__title { font-weight: 600; font-size: 14.5px; }
.pc-others__dates { font-size: 12.5px; color: var(--lw-muted); }

@media (max-width: 900px) {
  .pc-intro, .pc-featured { grid-template-columns: 1fr; }
  .pc-intro { gap: 24px; padding: 28px; }
  .pc-intro__bg::after {
    background: linear-gradient(180deg, rgba(255, 253, 249, .96) 0%, rgba(255, 253, 249, .9) 60%, rgba(255, 253, 249, .55) 100%);
  }
  .pc-intro__side { max-width: 520px; }
  .pc-aside { position: static; flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-podium__list { grid-template-columns: 1fr; align-items: stretch; }
  .pc-podium__item--1, .pc-podium__item--2, .pc-podium__item--3 { order: initial; }
  .pc-podium__item--1 .pc-podium__media { aspect-ratio: 4 / 3; }
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-stats > div:nth-child(2) { border-right: 0; }
  .pc-stats > div:nth-child(-n+2) { border-bottom: 1px solid #eee7d7; }
}
@media (max-width: 560px) {
  .pc-page { padding: 16px 12px 32px; }
  .pc-intro { gap: 20px; padding: 23px 18px 20px 21px; border-radius: 14px; }
  .pc-intro__title { font-size: 30px; }
  .pc-intro__theme { font-size: 19px; }
  .pc-intro__meta > span[aria-hidden] { display: none; }
  .pc-intro__actions { display: grid; grid-template-columns: 1fr; }
  .pc-intro__actions a { width: 100%; box-sizing: border-box; }
  .pc-countdown { padding: 14px 10px; }
  .pc-countdown__cells { gap: 4px; }
  .pc-countdown__cell { padding: 8px 2px; }
  .pc-stats { border-radius: 12px; }
  .pc-stats > div { justify-content: flex-start; padding: 13px 10px; }
  .pc-stats .lw-icon { font-size: 18px; }
  .pc-stats strong { font-size: 18px; }
  .pc-grid { grid-template-columns: 1fr; }
  .pc-aside { grid-template-columns: 1fr; }
  .pc-mine__grid { grid-template-columns: 1fr; }
  .pc-mine__thumb { max-width: 220px; }
  .pc-countdown__num { font-size: 22px; }
}

.s800 > .pc-stats {
  margin-bottom: 30px;
}
.pc-mine.s284 { margin-bottom: 26px; }
.pc-mine__linkrow .s947 { flex: 1 1 auto; min-width: 0; }
.pc-mine__linkrow .s806 { flex: none; }

/* Zone de dépôt (main.css n’est pas chargé en V3). */
.photo-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 200px;
  margin: 2px 0 12px;
  padding: 28px 22px;
  border: 1.5px dashed var(--lw-line-soft);
  border-radius: var(--lw-radius);
  background: var(--lw-paper-deep);
  color: var(--lw-ink);
  cursor: pointer;
  overflow: hidden;
}
.photo-drop.is-dragover {
  border-color: var(--lw-clay);
  background: var(--lw-blush);
}
.photo-drop.is-filled {
  min-height: 0;
  padding: 0;
  border-style: solid;
  border-color: var(--lw-line);
  background: #fff;
  cursor: default;
}
.photo-drop:focus-within {
  outline: 2px solid var(--lw-clay);
  outline-offset: 2px;
}
.photo-drop__input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.photo-drop.is-filled .photo-drop__input { cursor: default; }
.photo-drop__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 34em;
  text-align: center;
  pointer-events: none;
}
.photo-drop__placeholder[hidden] { display: none; }
.photo-drop__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: var(--lw-clay);
  font-size: 26px;
  line-height: 1;
}
.photo-drop__icon .lw-icon { font-size: 26px; }
.photo-drop__title {
  font-family: var(--lw-font-serif);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--lw-ink);
}
.photo-drop__cta {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--lw-clay);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.photo-drop__hint {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--lw-muted);
}
.photo-drop__preview { position: relative; width: 100%; }
.photo-drop__preview[hidden] { display: none; }
.photo-drop__preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: var(--lw-paper-deep);
}
.photo-drop__clear {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--lw-ink);
  border-radius: var(--lw-radius-sm);
  background: rgba(245, 242, 233, .94);
  color: var(--lw-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.photo-drop__clear:hover {
  background: #fff;
  color: var(--lw-clay);
  border-color: var(--lw-clay);
}
.photo-drop__meta {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--lw-muted);
}
.photo-contribute__warn {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fbf0ec;
  border: 1.5px solid var(--lw-clay);
  color: #7a2e1c;
  font-size: 14px;
}
.photo-contribute__warn--info {
  background: var(--lw-paper);
  border-color: var(--lw-line);
  color: #3a4d2e;
}
.s944 .s511 { margin-top: 8px; }
@media (max-width: 640px) {
  .photo-drop {
    min-height: 168px;
    padding: 22px 16px;
  }
}
