/* Le Ranch Bracon — restauration statique du thème « locam-le-ranch-bracon.fr » (Meosis, 2017) */

:root {
  --brun: #462b1c;
  --brun-2: #644b3e;
  --brun-olive: #423514;
  --brun-nuit: #29140f;
  --dore: #f8d486;
  --peche: #f8bb86;
  --creme: #f3e6cc;
  --texte: #fff;
  --gris: #858585;
  --titres: "chunkfive", "Ultra", Georgia, serif;
  --corps: "Open Sans", Arial, Helvetica, sans-serif;
  --largeur: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--brun);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; border: 0; }

a, a:visited { color: var(--texte); }
a:hover, a:focus { color: var(--dore); }

.container {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 16px;
}

.clearfix::after { content: ""; display: table; clear: both; }

/* Fond de page : planches de bois + cow-boy (bg.jpg d'origine) */
#page {
  min-height: 100vh;
  background: var(--brun) url("../img/bg.jpg") right top / 100% auto no-repeat;
  box-shadow: -5px 0 5px rgba(17, 17, 17, .6);
  overflow-x: hidden;
}

/* ---------- Titres ---------- */
h1, h2, h3, h4, h5, h6, .widgettitle {
  font-family: var(--titres);
  font-weight: 400;
  color: var(--texte);
  line-height: 1.25;
  margin: 2em 0 1em;
  letter-spacing: .02em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, .55);
}
h1 { font-size: 2.4em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.2em; }
h1 a, h2 a, h3 a, h4 a { color: inherit; text-decoration: none; }

h1.front-page-title, h1.page-title {
  margin-top: .3em;
  text-align: center;
  color: var(--dore);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .45);
}

/* ---------- En-tête ---------- */
#header {
  position: relative;
  z-index: 3;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(41, 20, 15, .85), rgba(41, 20, 15, 0));
}

#header .infos {
  margin: 0;
  padding: 4px 16px;
  text-align: center;
  font-size: 13px;
}
#header .infos a { text-decoration: none; }

.header-inner {
  position: relative;
  min-height: 230px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#logo { display: block; width: 420px; max-width: 80%; margin: 2% auto 0; }
#logo img { display: block; width: 100%; }

#header .depuis {
  position: absolute;
  right: 16px;
  top: 10px;
  width: 150px;
}

/* ---------- Menu ---------- */
#wrapper-menu { position: relative; z-index: 10; }

.main-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-menu > li { position: relative; margin: 0 10px; }

.main-menu > li::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #fff;
  transition: all .3s ease;
}
.main-menu > li.current-menu-item::before,
.main-menu > li:hover::before { left: 0; bottom: 18px; width: 100%; }

.main-menu > li > a {
  display: block;
  height: 80px;
  line-height: 80px;
  font-family: var(--titres);
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}
.main-menu > li > a:hover { color: #fff; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 10px auto;
  padding: 10px 18px;
  background: var(--brun-2);
  color: #fff;
  border: 0;
  border-radius: 3px;
  font-family: var(--titres);
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* ---------- Diaporama ---------- */
#wrapper-slider { margin-bottom: 20px; }

.slider {
  position: relative;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
  background: var(--brun-nuit);
}
.slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
}
.slider img.is-active { opacity: 1; }

.slider-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  cursor: pointer;
}
.slider-nav::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}
.slider-nav.prev { left: 12px; }
.slider-nav.next { right: 12px; }
.slider-nav.prev::after { transform: translate(-30%, -50%) rotate(-135deg); }
.slider-nav.next::after { transform: translate(-70%, -50%) rotate(45deg); }
.slider-nav:hover { background: rgba(0, 0, 0, .7); }

/* ---------- Contenu ---------- */
#content { position: relative; z-index: 2; }

.inner-content { padding-top: 30px; padding-bottom: 40px; }

#breadcrumbs { margin: 0 0 10px; font-size: 12px; color: var(--creme); text-shadow: 0 0 4px #000; }
#breadcrumbs a { text-decoration: none; }

.article-content { font-size: 15px; text-shadow: 0 0 4px rgba(0, 0, 0, .7); }
.article-content p { margin: 1em 0; }
.article-content a { color: var(--dore); }
.article-content a:hover { color: var(--peche); }

.alignright { float: right; margin: 0 0 15px 20px; }
.alignleft { float: left; margin: 0 20px 15px 0; }
.aligncenter { display: block; margin: 20px auto; }
.article-content img { border-radius: 2px; box-shadow: 0 3px 12px rgba(0, 0, 0, .35); }
.article-content h3 img.alignright { margin-top: -10px; }

.article-content::after { content: ""; display: table; clear: both; }

/* Tableaux de la carte et des menus */
.article-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
.article-content td {
  padding: 6px 20px;
  border-bottom: 1px dashed rgba(248, 212, 134, .25);
  vertical-align: top;
}
.article-content div[align="center"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.article-content div[align="center"] table {
  width: auto;
  min-width: 280px;
  flex: 1 1 320px;
  max-width: 480px;
  background: rgba(41, 20, 15, .55);
  border: 2px solid var(--brun-2);
}
.article-content div[align="center"] td { border: 0; padding: 10px 24px; text-align: center; }
.article-content div[align="center"] h3 { margin-top: .6em; color: var(--dore); }

hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .2); margin: 2em 0; }

/* Plan du site / listes */
.article-content ul { padding-left: 1.4em; }
.article-content li { margin: .3em 0; }

.post-excerpt h2 { margin-top: .5em; }
.article-footer { font-size: 12px; color: var(--creme); }

/* ---------- Formulaires (contact, livre d'or) ---------- */
.mailto-form { max-width: 640px; }
.mailto-form .field { margin: 0 0 14px; }
.mailto-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.mailto-form input,
.mailto-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--brun-2);
  border-radius: 3px;
  background: #fff;
  color: #222;
  font: inherit;
}
.mailto-form input:focus,
.mailto-form textarea:focus { outline: 2px solid var(--dore); outline-offset: 1px; }
.required { color: var(--peche); }
.form-note, .comment-notes, .map-note { font-size: 12px; color: var(--creme); }

.button {
  display: inline-block;
  padding: 10px 26px;
  border: 0;
  border-radius: 3px;
  background: var(--brun-2);
  color: #fff;
  font-family: var(--titres);
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease;
}
.button:hover { background: var(--brun-olive); }

.location { margin-bottom: 20px; }

#comments { width: 80%; margin: 0 auto; padding-top: 15px; }
.commentlist { padding: 0; list-style: none; }
.commentlist .comment {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px;
  background: rgba(41, 20, 15, .55);
  border-left: 4px solid var(--brun-2);
  font-size: 14px;
}
.comment-author { min-width: 160px; }
.comment-author .avatar { float: left; margin-right: 10px; border-radius: 50%; box-shadow: none; }
.comment-author .fn { font-weight: 700; }
.comment-author time { font-size: 12px; color: var(--creme); }
.comment-content p { margin: 0; }

/* ---------- Pied de page ---------- */
#footer {
  padding: 40px 0 20px;
  background: linear-gradient(180deg, rgba(41, 20, 15, .6), var(--brun-nuit) 40%);
  font-size: 14px;
}

#footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}

#footer .widgettitle {
  margin: 0 0 .75em;
  padding-bottom: .75em;
  border-bottom: 4px solid var(--brun-2);
  font-family: var(--corps);
  font-size: 18px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#footer address { font-style: normal; }
#footer a { text-decoration: none; }
#footer ul.menu { margin: 0; padding: 0; list-style: none; }
#footer ul.menu li { margin: 0 0 6px; }

.opening-hours { border-collapse: collapse; }
.opening-hours td { padding: 1px 8px 1px 0; vertical-align: top; }
.opening-hours .day { text-transform: capitalize; }

.map {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, .06) center / cover;
  border: 1px solid rgba(255, 255, 255, .15);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load {
  padding: 8px 14px;
  border: 1px solid var(--dore);
  background: transparent;
  color: var(--dore);
  font: inherit;
  cursor: pointer;
}
.map-load:hover { background: var(--dore); color: var(--brun); }

.social-menu { margin: 20px auto 10px; text-align: center; }
.social-menu img { display: inline-block; }

.copyright { margin: 10px auto; text-align: center; line-height: 16px; }
.copyright a { font-size: 11px; }

#recherches-pop {
  padding: 10px 16px;
  background: #000;
  color: #6b6b6b;
  text-align: center;
  font-size: 13px;
}
#recherches-pop a { color: #fff; }

#scrollTop {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 10px 0;
  background: #333;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .6;
  transition: opacity .2s ease-out;
}
#scrollTop::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #fff;
}
#scrollTop:hover { opacity: 1; }
#scrollTop span { display: block; padding: 3px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  #footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #header .depuis { width: 110px; }
  .main-menu > li { margin: 0 7px; }
  .main-menu > li > a { font-size: 13px; }
}

@media (max-width: 760px) {
  #page { background-size: 160% auto; }
  #header .infos { font-size: 12px; }
  .header-inner { min-height: 0; padding: 10px 0; }
  #logo { width: 250px; margin: 10px auto; }
  #header .depuis { display: none; }

  .menu-toggle { display: flex; }
  .main-menu { display: none; flex-direction: column; background: var(--brun-nuit); }
  .main-menu.is-open { display: flex; }
  .main-menu > li { margin: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .main-menu > li::before { display: none; }
  .main-menu > li > a { height: auto; line-height: 1.4; padding: 12px 16px; }
  .main-menu > li.current-menu-item > a { background: var(--brun-2); }

  h1 { font-size: 1.8em; }
  h2 { font-size: 1.45em; }
  h3 { font-size: 1.2em; }

  .alignright, .alignleft { float: none; display: block; margin: 15px auto; }
  .article-content td { padding: 6px 8px; }
  .article-content div[align="center"] table { min-width: 0; flex-basis: 100%; }
  #header .infos a[href^="mailto"] { overflow-wrap: anywhere; }

  #comments { width: 100%; }
  #footer-widgets { grid-template-columns: 1fr; }
}
