/*
Theme Name: Smayla
Theme URI: https://smayla.com
Author: Christian & Emmanuelle
Description: Carnets de route — thème sur mesure pour smayla.com.
Version: 1.0.21
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: smayla
*/

body { margin: 0; background: #1C1A17; color: #F2EBDD; font-family: 'Libre Franklin', sans-serif; }
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0 !important; }
.smayla a { color: #E3A447; text-decoration: none; }
.smayla a:hover { color: #F2C27A; }
.smayla .on-paper a { color: #8A4B1C; }
.smayla .on-paper a:hover { color: #6A3612; }
.smayla h1, .smayla h2, .smayla h3 { font-family: 'DM Serif Display', serif; font-weight: 400; }
.smayla .label { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
@media (max-width: 640px) {
  .smayla .site-tag { display: none; }
  .smayla .site-nav { gap: 14px 18px !important; font-size: 15px !important; letter-spacing: 1px !important; }
  .smayla .era { justify-content: space-between; }
  .smayla .era-line { display: none; }
  .smayla .era-label { order: 3; flex-basis: 100%; text-align: center; }
  .smayla .hero-tag { left: 16px !important; bottom: 16px !important; }
  .smayla .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.smayla-page { max-width: 760px; margin: 0 auto; padding: 64px 24px; font-family: 'Libre Franklin', sans-serif; line-height: 1.7; }
.smayla-page a { color: #E3A447; }

/* ---------- Carnet ---------- */
.carnet { font-size: 18px; line-height: 1.7; color: #F2EBDD; }
.carnet .c-head { max-width: 1280px; margin: 0 auto; padding: 40px 32px 48px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 32px; align-items: end; }
.carnet .c-head > div:first-child { grid-column: span 8; }
.carnet .c-facts { grid-column: span 4; margin: 0; display: grid; gap: 14px; border-top: 1px solid #4A4339; padding-top: 18px; }
.carnet .c-facts dt { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #9C927F; }
.carnet .c-facts dd { margin: 0; color: #F2EBDD; }
.carnet h1 { margin: 12px 0 20px; font-size: clamp(42px, 6.5vw, 84px); line-height: 1; color: #F2EBDD; }
.carnet .c-lead { margin: 0; font-size: 21px; color: #CFC6B4; max-width: 680px; }
.carnet .c-hero { margin: 0; }
.carnet .c-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.carnet .c-body { background: #F2EBDD; color: #2A2520; }
.carnet .c-sec { max-width: 1280px; margin: 0 auto; padding: 88px 32px 0; }
.carnet .c-sec:last-child { padding-bottom: 96px; }
.carnet .c-text { max-width: 720px; }
.carnet .c-sec .label { color: #8A4B1C; font-size: 16px; letter-spacing: 4px; margin: 0; }
.carnet .c-sec h2 { margin: 8px 0 20px; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; color: #1C1A17; }
.carnet .c-sec p { margin: 0 0 18px; }
.carnet .c-rows { margin-top: 36px; display: flex; flex-direction: column; gap: 12px; }
.carnet .c-row { display: flex; gap: 12px; width: 100%; margin: 0 auto; }
.carnet .c-row figure { margin: 0; min-width: 0; }
.carnet .c-row a { display: block; cursor: zoom-in; }
.carnet .c-row img { display: block; width: 100%; height: auto; border-radius: 2px; }
.carnet .c-end { max-width: 1280px; margin: 0 auto; padding: 56px 32px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
@media (max-width: 800px) {
  .carnet .c-head > div:first-child, .carnet .c-facts { grid-column: span 12; }
  .carnet .c-row { flex-direction: column; max-width: none !important; }
  .carnet .c-row figure { flex: none !important; width: 100%; }
  .carnet .c-sec { padding: 64px 20px 0; }
  .carnet .c-head, .carnet .c-end { padding-left: 20px; padding-right: 20px; }
}

/* ---------- Visionneuse ---------- */
.smayla-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(20, 18, 15, 0.96); display: flex; align-items: center; justify-content: center; }
.smayla-lb img { max-width: 94vw; max-height: 88vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.smayla-lb figcaption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #CFC6B4; font-family: 'Libre Franklin', sans-serif; font-size: 15px; padding: 0 70px; }
.smayla-lb button { position: absolute; background: none; border: 0; color: #F2EBDD; font-size: 44px; line-height: 1; cursor: pointer; padding: 12px 18px; font-family: 'DM Serif Display', serif; }
.smayla-lb button:hover { color: #E3A447; }
.smayla-lb .lb-close { top: 8px; right: 10px; font-size: 40px; }
.smayla-lb .lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.smayla-lb .lb-next { right: 6px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) { .sc-form { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- Randonnées ---------- */
.carnet .c-map { max-width: 1280px; margin: 0 auto; padding: 72px 32px 0; }
.carnet .c-map .label { color: #8A4B1C; font-size: 16px; letter-spacing: 4px; margin: 0 0 14px; }
.smayla-route { height: 420px; border-radius: 3px; background: #D6C9AF; }
.smayla-route .leaflet-tile-pane, #smayla-hikes-map .leaflet-tile-pane { filter: sepia(0.35) saturate(0.75) brightness(1.02); }
.hikes { color: #F2EBDD; }
.hikes .hk-head { max-width: 1280px; margin: 0 auto; padding: 40px 32px 40px; }
.hikes h1 { margin: 12px 0 20px; font-size: clamp(42px, 6.5vw, 84px); line-height: 1; }
.hikes .hk-lead { margin: 0; font-size: 21px; color: #CFC6B4; max-width: 720px; line-height: 1.6; }
.hikes .hk-body { background: #F2EBDD; color: #2A2520; padding: 56px 0 96px; }
.hikes .hk-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
#smayla-hikes-map { height: 520px; border-radius: 3px; background: #D6C9AF; }
#smayla-hikes-map .leaflet-popup-content-wrapper { background: #F2EBDD; color: #1C1A17; border-radius: 3px; }
#smayla-hikes-map .leaflet-popup-content { margin: 14px 18px; font-family: 'Libre Franklin', sans-serif; }
#smayla-hikes-map .leaflet-popup-content .t { font-family: 'DM Serif Display', serif; font-size: 20px; line-height: 1.1; margin: 4px 0 8px; }
#smayla-hikes-map .leaflet-popup-content .k { font-family: 'Barlow Condensed', sans-serif; letter-spacing: 2px; text-transform: uppercase; font-size: 12px; color: #8A4B1C; }
#smayla-hikes-map .leaflet-popup-content a { color: #8A4B1C; font-weight: 600; }
.hikes .hk-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 28px; }
.hikes .hk-pills button { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; background: transparent; border: 1px solid #B8A98C; color: #1C1A17; border-radius: 40px; padding: 6px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.hikes .hk-pills button i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hikes .hk-pills button.on, .hikes .hk-pills button:hover { background: #1C1A17; color: #F2EBDD; border-color: #1C1A17; }
.hikes .hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px 24px; }
.hikes .hk-card a { display: block; color: #1C1A17; text-decoration: none; }
.hikes .hk-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.hikes .hk-card .label { margin: 14px 0 4px; font-size: 13px; letter-spacing: 2px; color: #8A4B1C; }
.hikes .hk-card h2 { margin: 0 0 6px; font-size: 25px; line-height: 1.1; color: #1C1A17; }
.hikes .hk-card p.m { margin: 0; font-size: 15px; color: #6B6253; }
.hikes .hk-card a:hover h2 { color: #8A4B1C; }
@media (max-width: 800px) {
  .carnet .c-map, .hikes .hk-head, .hikes .hk-wrap { padding-left: 20px; padding-right: 20px; }
  .smayla-route { height: 320px; }
  #smayla-hikes-map { height: 400px; }
}

/* Fiche randonnée liée, dans un carnet */
.carnet .c-hike { display: flex; gap: 18px; align-items: center; max-width: 600px; margin: 10px 0 0; padding: 14px; background: #EAE0CC; border: 1px solid #D6C8AC; border-radius: 3px; color: #1C1A17; text-decoration: none; transition: border-color .2s, background .2s; }
.carnet .c-hike:hover { border-color: #8A4B1C; background: #E6DAC2; }
.carnet .c-hike img { flex: none; width: 140px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; display: block; }
.carnet .c-hike .label { display: block; font-size: 13px; letter-spacing: 3px; color: #8A4B1C; }
.carnet .c-hike strong { display: block; margin: 4px 0 4px; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 24px; line-height: 1.1; }
.carnet .c-hike .m { display: block; font-size: 15px; color: #4A4338; }
.carnet .c-hike .go { display: block; margin-top: 6px; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 2px; text-transform: uppercase; font-size: 15px; color: #8A4B1C; }
@media (max-width: 520px) { .carnet .c-hike { flex-direction: column; align-items: stretch; } .carnet .c-hike img { width: 100%; } }
