/* Couverture animée et transitions (site public seulement, pas dans l'éditeur) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
.gite-entete { view-transition-name: entete; }

.couv { background: var(--fond, #eef3ef); transition: background-color .9s; }
.couv { overflow-x: clip; }
.couv-volets > figure:not(:first-child) { display: none; }
.cv-cadre { position: relative; height: min(54vh, 460px); perspective: 2400px; cursor: pointer; }
.couv-volets .cv-cadre figure { position: absolute; inset: 0; margin: 0; overflow: hidden; visibility: hidden; display: block; }
.couv-volets .cv-cadre figure.vu { visibility: visible; }
.couv-volets .cv-cadre figure img { width: 100%; height: 100% !important; object-fit: cover; }
.couv-volets .cv-cadre figcaption { display: none; }
.cv-volet { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; border: 10px solid #6f9c88; backface-visibility: visible;
  background: linear-gradient(#6f9c88, #6f9c88) center/100% 12px no-repeat, repeating-linear-gradient(to bottom, #8fbaa7 0 11px, #5f8a77 11px 13px, #7faa97 13px 16px);
  transition: transform .9s cubic-bezier(.6,.05,.25,1); }
.cv-volet.g { left: 0; transform-origin: left; transform: rotateY(-96deg); }
.cv-volet.d { right: 0; transform-origin: right; transform: rotateY(96deg); }
.ferme .cv-volet { transform: rotateY(0); transition: transform .7s cubic-bezier(.5,0,.6,1); }
.direct .cv-volet { transition: none; }
.cv-volet::after { content: ""; position: absolute; top: 50%; width: 9px; height: 26px; margin-top: -13px; background: #1e2a25; border-radius: 5px; }
.cv-volet.g::after { right: -6px; } .cv-volet.d::after { left: -6px; }
/* Une vraie fenêtre : encadrement de bois mouluré, vitre sans petits bois, appui de bois, volets épais à pentures */
.cv-cadre { box-shadow: 0 0 0 3px #5e3a1f, 0 0 0 9px #9a6538, 0 0 0 11px #b07a48, 0 0 0 15px #7c4d2a, 0 0 0 16px rgba(40,25,10,.35),
  0 18px 30px -18px rgba(40,30,20,.5); }
.cv-cadre::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border: 8px solid #8a5a32; border-top-color: #6f4526; border-left-color: #7a4d2b;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), inset 0 12px 16px -8px rgba(0,0,0,.4);
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.14) 47%, transparent 56%); }
.cv-cadre::after { content: ""; position: absolute; left: -30px; right: -30px; bottom: -34px; height: 18px; z-index: 4; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 23px), linear-gradient(#b07a48, #7c4d2a); border-radius: 2px;
  box-shadow: 0 2px 0 #c58d58 inset, 0 8px 12px -6px rgba(40,30,20,.5); }
/* Épaisseur des volets : bord biseauté et chant visible quand ils sont ouverts */
.cv-volet { border-width: 12px; border-color: #7aa894 #557f6c #4d7564 #6f9c88; transform-style: preserve-3d;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), inset 0 0 6px rgba(0,0,0,.25); }
.cv-volet::before { content: ""; position: absolute; top: -12px; bottom: -12px; width: 14px; background: linear-gradient(90deg, #3f6455, #557f6c); }
.cv-volet.g::before { right: -12px; transform-origin: right; transform: rotateY(90deg); }
.cv-volet.d::before { left: -12px; transform-origin: left; transform: rotateY(-90deg); }
.cv-volet.g { background: linear-gradient(#2b302d, #2b302d) left 0 top 14% / 72% 6px no-repeat, linear-gradient(#2b302d, #2b302d) left 0 bottom 14% / 72% 6px no-repeat,
  linear-gradient(#6f9c88, #6f9c88) center/100% 12px no-repeat, repeating-linear-gradient(to bottom, #8fbaa7 0 11px, #5f8a77 11px 13px, #7faa97 13px 16px); }
.cv-volet.d { background: linear-gradient(#2b302d, #2b302d) right 0 top 14% / 72% 6px no-repeat, linear-gradient(#2b302d, #2b302d) right 0 bottom 14% / 72% 6px no-repeat,
  linear-gradient(#6f9c88, #6f9c88) center/100% 12px no-repeat, repeating-linear-gradient(to bottom, #8fbaa7 0 11px, #5f8a77 11px 13px, #7faa97 13px 16px); }
.couv-volets .cv-cmd { margin-top: 2.6rem; }
/* Deux lignes de taille fixe (légende, puis points) : rien ne bouge, même avec beaucoup de photos */
.cv-cmd { height: 3.3rem; overflow: hidden; margin-top: .7rem; font-size: .85rem; }
.cv-cmd p { margin: 0; height: 1.6rem; line-height: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-points { display: flex; align-items: center; height: 1.6rem; margin: 0 !important; }
.cv-points button:focus-visible { outline: 2px solid var(--brique); outline-offset: -2px; border-radius: 12px; }
.cv-points button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.cv-point { flex: 0 1 22px; min-width: 10px; height: 24px; padding: 0; display: grid; place-items: center; }
.cv-point::before { content: ""; width: 9px; height: 9px; border-radius: 9px; border: 1.5px solid var(--encre); transition: width .3s, background .3s; }
.cv-point[aria-current=true]::before { background: var(--encre); width: min(18px, 100%); }
.cv-points .cv-pause { flex: none; order: -1; margin-left: -7px; width: 28px; height: 24px; padding: 0; display: grid; place-items: center; }
.couv .wp-block-columns { align-items: center !important; }
/* Les volets ouverts ne passent jamais sur le titre ni sur les infos de droite */
.couv h1, .couv .wp-block-columns > .wp-block-column:last-child { position: relative; z-index: 5; }
@media (min-width: 782px) { .couv .wp-block-columns { gap: 6rem !important; } .couv h1 { padding-bottom: 2.2rem; } }

@media (prefers-reduced-motion: no-preference) {
  .cv-cadre figure.vu img { animation: cv-zoom 9s ease-out both; }
  @keyframes cv-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
  .cv-mot { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
  .cv-mot > span { display: inline-block; animation: cv-mot .8s cubic-bezier(.2,.8,.2,1) backwards; }
  @keyframes cv-mot { from { transform: translateY(105%) rotate(5deg); } }
  .couv .intro, .couv .wp-block-buttons, .couv .reperes li { animation: cv-glisse .7s cubic-bezier(.2,.8,.2,1) backwards .5s; }
  .couv .wp-block-buttons { animation-delay: .65s; }
  .couv .reperes li:nth-child(1) { animation-delay: .8s; } .couv .reperes li:nth-child(2) { animation-delay: .9s; } .couv .reperes li:nth-child(3) { animation-delay: 1s; } .couv .reperes li:nth-child(4) { animation-delay: 1.1s; }
  @keyframes cv-glisse { from { transform: translateX(30px); opacity: 0; } }
  .wp-block-button__link, .gs-puces button { transition: transform .2s, background-color .2s; }
  .wp-block-button__link:hover { transform: translateY(-2px); }
  @supports (animation-timeline: view()) {
    .etage, .gs-grille .gs-carte, .prix, .distances tr { animation: cv-monte linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    @keyframes cv-monte { from { transform: translateY(34px); } }
    .region > figure.pleine { overflow: hidden; }
    .region > figure.pleine img { animation: cv-panorama linear both; animation-timeline: view(); }
    @keyframes cv-panorama { from { transform: scale(1.25); } to { transform: scale(1); } }
  }
}
@media (prefers-reduced-motion: reduce) { .cv-volet, .couv { transition: none; } }
/* En-tête et menu toujours visibles (c'est le bloc parent qui colle en haut) */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 40; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
.gite-entete .wp-block-navigation a { padding: .3rem 0; text-decoration: none; box-shadow: inset 0 0 0 var(--brique); transition: box-shadow .25s; }
.gite-entete .wp-block-navigation a:hover, .gite-entete .wp-block-navigation a[aria-current] { box-shadow: inset 0 -3px 0 var(--brique); }
.page-tete { background: #eef3ef; padding: clamp(1.4rem, 3vw, 2.4rem) 1.25rem; margin-block: 0 !important; }
.page-tete + * { margin-top: 0 !important; }
.page-tete h1 { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.02em; }
.portes { gap: 1.6rem !important; }
.portes figure a { display: block; }
.portes figure { overflow: hidden; border-radius: 6px; }
.portes img { width: 100%; height: 200px !important; object-fit: cover; transition: transform .6s; }
.portes .wp-block-column:hover img { transform: scale(1.05); }
.portes h3 { margin: .9rem 0 .2rem; }
.portes h3 a { text-decoration: none; }
.portes p { margin: 0; }
@media (max-width: 781px) {
  .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
  .entete-menu { display: contents !important; }
  .entete-ligne { gap: .1rem 1rem !important; }
  .entete-ligne .wp-block-navigation { order: 3; width: 100%; font-size: .9rem; }
  .entete-ligne .wp-block-navigation__container { width: 100%; justify-content: space-between; gap: 0 .5rem !important; flex-wrap: nowrap; }
  .entete-ligne .wp-block-navigation a { white-space: nowrap; }
}
@media (max-width: 350px) { .entete-ligne .wp-block-navigation { font-size: .78rem; } }

/* Retour direct en haut */
.gite-haut { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .95rem; border: 1.5px solid #fff; border-radius: 99px; background: var(--vert); color: #fff; font: 600 .9rem/1 var(--wp--preset--font-family--texte); cursor: pointer; view-transition-name: haut; }
.gite-haut[hidden] { display: none; }
.gite-haut:hover { background: var(--brique); }
[tabindex="-1"]:focus { outline: none; }

/* Blog */
.blog-cats { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.blog-cats a { display: block; padding: .25rem .8rem; border: 1.5px solid var(--filet); border-radius: 99px; background: #fff; text-decoration: none; font-size: .88rem; font-weight: 500; }
.blog-cats a:hover, .blog-cats .current-cat a { background: var(--vert); border-color: var(--vert); color: #fff; }
ul.blog-grille { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 2rem 1.4rem; }
.blog-grille > li { margin: 0 !important; }
.blog-grille figure { margin: 0 0 .7rem; overflow: hidden; border-radius: 6px; }
.blog-grille img { transition: transform .6s; }
.blog-grille li:hover img { transform: scale(1.04); }
.blog-grille .wp-block-post-date { font-size: .88rem; color: var(--doux); margin: 0; }
.blog-grille h2 { font-size: 1.15rem; line-height: 1.22; margin: .2rem 0 0; }
.blog-grille h2 a { text-decoration: none; }
.blog-grille h2 a:hover { text-decoration: underline; }
.gite-article h2 { font-size: 1.4rem; }
.gite-article .wp-block-image img { border-radius: 6px; }
.gite-article figure.wp-block-image > img { max-height: 78vh; width: auto; }
.gite-article .wp-block-gallery img { max-height: none; }
.article-infos { gap: .3rem 1.2rem !important; font-size: .92rem; color: var(--doux); margin-bottom: 1.6rem; }
.article-suite { border-top: 1px solid var(--filet); padding-top: 1.2rem; margin-top: 2.5rem !important; font-size: .95rem; }
.article-suite > div { max-width: 46%; }
.lire time { display: block; font-size: .85rem; color: var(--doux); }

@media (max-width: 781px) { .cv-cadre { height: 46vh; } }

.gite-langues a { text-decoration: none; padding: .2rem; }
.gite-langues a:hover { text-decoration: underline; }
.gite-langues strong { padding: .2rem; }
@media (max-width: 781px) { .langue-es .entete-ligne .wp-block-navigation, .langue-en .entete-ligne .wp-block-navigation { font-size: .82rem; letter-spacing: -.01em; } }
@media (max-width: 350px) { .langue-es .entete-ligne .wp-block-navigation { font-size: .7rem; } }
