/*--------------------------------------------------------------
Base CSS — whereistheoagain
Minimal reset + typographie + layout de base
--------------------------------------------------------------*/

/* Box-sizing universel */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Reset de base */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
menu,
ol,
ul,
li,
fieldset,
form,
label,
legend,
caption,
table,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
main,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
  font: inherit;
  font-size: 100%;
}

/* HTML5 display-role reset */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section {
  display: block;
}

/* Body base */
body {
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #fff;
  color: #222;
  font-size: 16px;
  padding: 1rem;
}

/* Titres */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: bold;
  line-height: 1.2;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Paragraphes */
p {
  margin-bottom: 1em;
}

/* Liens */
a {
  color: #0066cc;
  text-decoration: underline;
}

a:hover {
  color: #003366;
}

/* Listes */
ul,
ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.5em;
}

/* Images et médias */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}


/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.5em;
  border-bottom: 1px solid #ddd;
}

/* Formulaires */
input,
textarea,
select,
button {
  font: inherit;
  font-size: 100%;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 0.25em;
}

textarea {
  width: 100%;
  resize: vertical;
}

/* Accessibilité : screen-reader only */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ce que je rajoute */

@font-face {
  font-family: 'MaPolice';
  src: url('fonts/fonnts.com-Rigid_Square_Bold.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

.accueil-intro {
  position: absolute;
  top: 2rem;
  left: 1.5rem;
  z-index: 10;
  pointer-events: none;
  /* le titre ne gêne pas les interactions */
}

.accueil-titre {
  font-family: 'MaPolice', sans-serif;
  font-weight: 400;
  font-size: 3rem;
  margin: 0;
  color: var(--accent-color);
  /* adapte selon le fond */
}

/* ===== Carte plein écran (mode map) ===== */
body.home #map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

body.home header,
body.home footer,
body.home .site-header,
body.home .site-footer {
  display: none;
}

/* ===== Filtre catégorie sur carte ===== */
.category-filter {
  position: absolute;
  top: 10px;
  right: 70px;
  z-index: 1000;
  background: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 1rem;
  border: 1px solid #ccc;
  /* petit trait gris clair */
}

.category-select {
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
}

.category-filter-map {
  position: absolute;
  top: 10px;
  right: 70px;
  z-index: 1000;
  background: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 1rem;
  border: 1px solid #ccc;
  /* petit trait gris clair */
}

.category-select-map {
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
}

/* Responsive mobile */
@media (max-width: 768px) {
  .category-filter {
    top: 150px;
    right: 50%;
    transform: translateX(50%);
    font-size: 0.95rem;
    padding: 6px 12px;
  }

  .category-select {
    font-size: 1rem;
    padding: 4px 8px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .category-filter-map {
    top: 150px;
    left: 10px;
    transform: translateX(10%);
    font-size: 0.95rem;
    padding: 6px 12px;
    width: 150px;
  }

  .category-select-map {
    font-size: 1rem;
    padding: 4px 8px;
    width: 100%;
  }
}

/* début CSS formulaire nouvel article */
.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-column {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: block;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-group textarea {
  resize: vertical;
}

#media-preview {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

.media-gallery-item {
  box-sizing: border-box;
  position: relative;
}

.media-content.ratio-3-4 {
  aspect-ratio: 3 / 4;
}

.media-content.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.media-content {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.media-content img,
.media-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.bw-filter img,
.bw-filter video {
  filter: grayscale(100%);
}

.media-gallery-item button,
.media-gallery-item input[type="text"],
.media-gallery-item label {
  margin-top: 1em;
  margin-right: 0.5em;
}

.drag-handle {
  cursor: grab;
  font-size: 1.2rem;
  user-select: none;
  position: absolute;
  top: 8px;
  right: 8px;
}

.form-submit {
  background: #222;
  color: #fff;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-submit:hover {
  background: #000;
}

/* fin formulaire nouvel article */

/* début style-1 */
body.style-1 .site-header,
body.style-1 .site-footer {
  display: none;
}

.single-style-1 {
  display: flex;
  flex-direction: column;
  padding-top: 6rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 1.5rem;
}

.single-style-1 h1 {
  margin-top: 0.2rem;
  color: var(--accent-color);
  opacity: 70%;
}

@media (max-width: 768px) {
  .single-style-1 h1 {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .single-style-1 {
    display: flex;
    flex-direction: column;
    padding-top: 6.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1.5rem;
  }

}

.post-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 3rem;
}

.post-info {
  flex: 1;
  min-width: 300px;
}

.post-map {
  flex: 1;
  min-height: 300px;
  background: #eee;
  border: 1px solid #ccc;
}

.post-media .media-item {
  flex: 0 0 auto;
  overflow: visible;
  height: 350px;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  position: relative;
}

@media (max-width: 768px) {
  .post-media .media-item audio {
    height: 54px;
  }

  .post-media .media-item:has(audio) {
    height: auto !important;
    justify-content: flex-start;
  }
}

.post-media .media-content-single1 {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  align-items: flex-end;
  row-gap: 3rem;
}

/* Ratio portrait */
.media-item.ratio-3-4 {
  width: 262.5px;
  height: auto;
}

/* Ratio paysage */
.media-item.ratio-4-3 {
  width: 525px;
  height: auto;
}

/* Images et vidéos */
.media-item img,
.media-item video {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

/* Audio : pleine largeur, pas de ratio */
.media-item audio {
  width: 262.5px;
  height: 54px;
  display: block;
}

/* Commentaires */
.media-comment {
  position: absolute;
  bottom: -2.4em;
  /* ou ajuste si tu veux plus ou moins d’écart */
  left: 0;
  width: 100%;
  margin: 0;
  font-style: italic;
  font-size: 0.9em;
  padding-left: 0.4rem;
  pointer-events: none;
  /* ← optionnel : pour ne pas interférer avec les clics */
}

/* Noir & blanc */
.media-bw img,
.media-bw video {
  filter: grayscale(100%) contrast(130%) brightness(90%);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {

  /* Ratio portrait */
  .media-item.ratio-3-4 {
    width: 262.5px;
    height: auto;
  }

  /* Ratio paysage */
  .media-item.ratio-4-3 {
    width: 525px;
    height: auto;
  }

  .media-item {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .media-item img,
  .media-item video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .post-header {
    flex-direction: column;
  }
}

.external-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  transition: text-decoration 0.2s ease, color 0.2s ease;
}

.external-link i {
  font-size: 1em;
}

.external-link:hover {
  text-decoration: underline;
}

/* Ne pas colorer les liens déjà visités */
.external-link:visited {
  color: inherit;
}

/* fin style-1 */

/* début affichage liste */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 7rem 0;
  padding-left: 1.5rem;
}

@media (max-width: 768px) {
  .post-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 11rem 0;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
  }
}

.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #ddd;
  padding-bottom: 2rem;
  transition: background 0.2s;
}

.post-list-item:hover {
  background: #f9f9f9;
}

.post-list-content {
  flex: 2;
  padding-right: 2rem;
}

.post-list-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
  color: var(--accent-color);
  opacity: 70%;
}

.post-list-content h2:visited {
  color: black;
}

.post-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.post-meta .post-date {
  margin-right: 1rem;
}

.post-list-content p {
  margin: 0;
  line-height: 1.6;
  color: #444;
  font-size: 1rem;
}

.post-list-media {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  max-width: none;
}

@media (max-width: 768px) {
  .post-list-media {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: none;
  }
}

.post-list-media img {
  width: 100%;
  max-width: 120px;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.no-thumbnail {
  width: 120px;
  height: 120px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.2rem;
  border-radius: 6px;
}

/* fin affichage liste */

body.negative-mode {
  background-color: #000;
}