
:root {
  --ofh-gold: #f7c438;
  --ofh-gold-hover: #ffd55c;
  --ofh-bg: #050505;
  --ofh-panel: #101010;
  --ofh-border: rgba(247,196,56,.65);
  --ofh-text: #fff;
  --ofh-muted: #bdbdbd;
}

.ofh-panel {
  background: var(--ofh-panel);
  border: 1px solid var(--ofh-border);
  color: var(--ofh-text);
  padding: 24px;
  max-width: 900px;
  box-sizing: border-box;
}

.ofh-user-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.ofh-user-head img {
  border-radius: 50%;
}

.ofh-user-head h3 {
  margin: 0 0 4px;
  color: var(--ofh-gold);
}

.ofh-user-head p {
  margin: 0;
  color: var(--ofh-muted);
}

.ofh-current {
  margin: 20px 0;
}

.ofh-current-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #000;
  border: 1px solid var(--ofh-border);
}

.ofh-upload-form {
  display: grid;
  gap: 12px;
}

.ofh-upload-form input[type="file"] {
  color: #fff;
  background: #161616;
  border: 1px solid #444;
  padding: 12px;
}

.ofh-upload-form small {
  color: var(--ofh-muted);
}

.ofh-button {
  display: inline-block;
  width: fit-content;
  border: 0;
  background: var(--ofh-gold);
  color: #000;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
  transition: .2s ease;
}

.ofh-button:hover {
  background: var(--ofh-gold-hover);
}

.ofh-button-danger {
  margin-top: 12px;
  background: #5c1717;
  color: #fff;
}

.ofh-button-danger:hover {
  background: #7a1e1e;
}

.ofh-preview-wrap {
  margin-top: 6px;
  color: var(--ofh-muted);
}

.ofh-preview-wrap img {
  display: block;
  margin-top: 8px;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #000;
  border: 1px solid #333;
}

.ofh-notice {
  padding: 12px 14px;
  margin: 0 0 18px;
  border-left: 4px solid;
  background: #171717;
}

.ofh-notice-success {
  border-color: #4caf50;
}

.ofh-notice-error {
  border-color: #e14b4b;
}

.ofh-gallery {
  display: grid;
  grid-template-columns: repeat(var(--ofh-columns), minmax(0, 1fr));
  gap: 18px;
}

.ofh-card {
  background: var(--ofh-gold);
  border: 3px solid var(--ofh-gold);
  overflow: hidden;
  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}

.ofh-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}

.ofh-card-link {
  display: block;
  background: #080808;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.ofh-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ofh-card-body {
  padding: 13px 16px 15px;
  color: #050505;
}

.ofh-card-title {
  font-weight: 700;
  font-size: 16px;
}

.ofh-card-role {
  margin-top: 3px;
  font-size: 12px;
  opacity: .75;
}

.ofh-empty {
  color: #ddd;
  padding: 20px;
  border: 1px dashed #555;
}

@media (max-width: 1100px) {
  .ofh-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ofh-gallery {
    grid-template-columns: 1fr;
  }
}


.ofh-member-tools {
  margin: 0 0 22px;
}

.ofh-inline-upload {
  margin-top: 16px;
  scroll-margin-top: 120px;
}

.ofh-inline-upload[hidden] {
  display: none !important;
}

.ofh-inline-upload .ofh-panel {
  max-width: none;
  border-color: var(--ofh-gold);
}

.ofh-toggle-upload {
  font-size: 15px;
  border-radius: 3px;
}


/* ===== Correctifs v1.1.1 : charte Outlander + taille des cartes ===== */

.ofh-member-tools {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 24px 0 !important;
  box-sizing: border-box !important;
}

.ofh-member-tools > .ofh-button.ofh-toggle-upload,
button.ofh-button.ofh-toggle-upload {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-block !important;
  width: auto !important;
  min-width: 165px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 11px 18px !important;
  border: 0 !important;
  border-radius: 3px !important;
  background: #f7c438 !important;
  background-image: none !important;
  color: #000000 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 20px !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.ofh-member-tools > .ofh-button.ofh-toggle-upload:hover,
.ofh-member-tools > .ofh-button.ofh-toggle-upload:focus,
button.ofh-button.ofh-toggle-upload:hover,
button.ofh-button.ofh-toggle-upload:focus {
  background: #ffd55c !important;
  background-image: none !important;
  color: #000000 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ofh-gallery {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(var(--ofh-columns), minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start !important;
  justify-items: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ofh-gallery > .ofh-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.ofh-gallery .ofh-card-link {
  width: 100% !important;
  display: block !important;
  aspect-ratio: 16 / 9 !important;
}

.ofh-gallery .ofh-card-image {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

.ofh-gallery .ofh-card-body {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1100px) {
  .ofh-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .ofh-gallery {
    grid-template-columns: 1fr !important;
  }
}


/* ===== v1.2.0 : grandes cartes + rendu validé ===== */

.ofh-gallery {
  grid-template-columns: repeat(var(--ofh-columns), minmax(360px, 1fr)) !important;
  gap: 26px !important;
}

.ofh-gallery > .ofh-card {
  max-width: 560px !important;
  min-width: 360px !important;
}

.ofh-gallery .ofh-card-link {
  aspect-ratio: 16 / 9 !important;
}

.ofh-gallery .ofh-card-image {
  object-fit: contain !important;
  background: #050505 !important;
}

.ofh-gallery .ofh-card-body {
  padding: 15px 18px 17px !important;
}

.ofh-gallery .ofh-card-title {
  font-size: 18px !important;
  font-weight: 700 !important;
}

.ofh-gallery .ofh-card-role {
  font-size: 13px !important;
  margin-top: 4px !important;
}

@media (min-width: 1500px) {
  .ofh-gallery {
    grid-template-columns: repeat(var(--ofh-columns), minmax(420px, 1fr)) !important;
  }
}

@media (max-width: 1200px) {
  .ofh-gallery {
    grid-template-columns: repeat(2, minmax(320px, 1fr)) !important;
  }

  .ofh-gallery > .ofh-card {
    max-width: none !important;
    min-width: 0 !important;
  }
}

@media (max-width: 760px) {
  .ofh-gallery {
    grid-template-columns: 1fr !important;
  }

  .ofh-gallery > .ofh-card {
    max-width: none !important;
    min-width: 0 !important;
  }
}


/* ===== v1.2.1 : affichage public identique ===== */

.ofh-gallery {
  width: 100% !important;
}

.ofh-gallery .ofh-card {
  overflow: hidden !important;
}

.ofh-gallery .ofh-card-link {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 280px !important;
  overflow: hidden !important;
  background: #050505 !important;
}

.ofh-gallery .ofh-card-image {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
}

@media (max-width: 760px) {
  .ofh-gallery .ofh-card-link {
    min-height: 210px !important;
  }
}
