/*
Theme Name: Quinta de Faro UK
Theme URI: https://www.quintadefaro.uk
Author: Serip Groupe
Description: Thème bloc de Quinta de Faro (villas de luxe en Algarve). Reprend à l'identique la mise en page de l'ancien site, entièrement éditable dans Gutenberg.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: quintadefaro-uk
*/

/* ============ Base ============ */
:root {
  --qdf-orange: #ff7f02; --qdf-blue: #1450cc; --qdf-brown: #4d4423;
  --qdf-navy: #081c37; --qdf-sand: #f4d4ac; --qdf-text: #5f6263; --qdf-title: #222;
  --qdf-gutter: 50px; --qdf-wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0; font: 400 13px/26px Raleway, sans-serif; color: var(--qdf-text); background-color: #fff;
  background-image: url(https://www.quintadefaro.uk/wp-content/uploads/2024/09/Background_QuintoDeFaro_Orange_10.png);
  background-repeat: no-repeat; background-position: center center; background-size: auto; background-attachment: fixed;
  overflow-wrap: break-word; word-wrap: break-word; overflow-x: clip;
}
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--qdf-orange); text-decoration: none; }
:root p { margin: 0 0 25px; }
:root :is(h1, h2, h3, h4, h5, h6) { margin: 0 0 15px; color: var(--qdf-title); font-family: Montserrat, sans-serif; }
:root h2 { margin-bottom: 20px; }
:root :is(h5, h6) { margin-bottom: 8px; }
:root :is(ul, ol) { margin: 0 0 25px; padding-left: 17px; }
:root li { margin-bottom: 10px; }
:root li:last-child { margin-bottom: 0; }
.wp-site-blocks > * { margin-block: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }

/* ============ En-tête ============ */
.qdf-header { position: sticky; top: 0; z-index: 100; background: #fff; display: flex; align-items: center; height: 140px; }
.admin-bar .qdf-header { top: 32px; }
.qdf-header__row { display: flex; align-items: stretch; width: calc(100% - 0px); max-width: var(--qdf-wrap); margin: 0 auto; padding: 15px 0; height: 140px; }
.qdf-header__col { display: flex; align-items: center; flex: 0 1 33.33%; min-width: 0; }
.qdf-header__col--l { justify-content: flex-start; }
.qdf-header__col--c, .qdf-header__col--r { justify-content: flex-end; }
.qdf-header .wp-block-image { margin: 0; }
.qdf-header .qdf-logo-1 img { width: 110px; height: 110px; display: block; }
.qdf-header .qdf-logo-2 img { width: 100%; height: auto; display: block; }
.qdf-header .qdf-logo-2 { width: 100%; }
.qdf-lang { margin: 0 30px 0 0; padding: 7px; }
.qdf-lang ul { list-style: none; margin: 0; padding: 0; }
.qdf-lang li { display: inline-block; }
.qdf-lang a { display: block; padding: 5px 8px; color: var(--qdf-text); font: 400 13px/15px Raleway, sans-serif; }
.qdf-lang a[aria-current] { color: var(--qdf-orange); }
.qdf-lang img { margin-right: 8px; vertical-align: middle; width: 18px; height: 12px; }
.qdf-menu { margin: 0; }
.qdf-menu .wp-block-navigation__responsive-container-open { color: #000; width: 27px; height: 16px; }
.qdf-menu .wp-block-navigation__responsive-container-open svg { width: 27px; height: 16px; }
.qdf-menu .wp-block-navigation__responsive-container.is-menu-open {
  left: auto; right: 0; width: 300px; padding: 40px 30px; background: #fff; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .8);
}
.qdf-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; gap: 5px; }
.qdf-menu .wp-block-navigation-item__content { font: 600 14px/22px Montserrat, sans-serif; letter-spacing: -.14px; color: #343638; }
.qdf-menu .wp-block-navigation-item__content:hover { color: var(--qdf-orange); }
.qdf-menu .wp-block-navigation__responsive-container-close { color: #000; }

/* ============ Sections, rangées, colonnes ============ */
.qdf-section { position: relative; padding: 0; margin: 0; max-width: none; overflow-x: clip; }
.wp-block-cover.qdf-section { min-height: 0; width: 100%; }
.wp-block-cover.qdf-section .wp-block-cover__inner-container { width: 100%; max-width: none; }
.qdf-row { width: calc(100% - 90px); max-width: var(--qdf-wrap); margin-left: auto; margin-right: auto; }
:root .qdf-row { margin-bottom: 50px; }
:root .qdf-section .qdf-row:last-child { margin-bottom: 0; }
.qdf-row--full { width: 100%; max-width: none; }
:root .qdf-row:last-child > .qdf-cols > .wp-block-column { margin-bottom: 0 !important; }
.qdf-row--inner { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
.qdf-row--g10 > .qdf-cols { gap: 10px; }
:where(.qdf-row) > .wp-block-group, :where(.qdf-row) > .wp-block-columns { max-width: none; }
.qdf-cols { display: flex; flex-wrap: nowrap; gap: var(--qdf-gutter); margin: 0; }
.qdf-cols > .wp-block-column { min-width: 0; margin: 0; }
:where(.qdf-cols) > .wp-block-column { flex: 1 1 0; }
.qdf-row--fullcols { display: flex; flex-direction: column; }
.qdf-row--fullcols > * { flex: 1 1 auto; }
@media (min-width: 768px) { .qdf-row--fullcols { min-height: 100vh; } }
.qdf-row--fullcols .qdf-cols { gap: 0; }
.qdf-row--swap .qdf-cols { flex-direction: row-reverse; }
.qdf-cols > .wp-block-column.is-vertically-aligned-center { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.qdf-cols > .wp-block-column.is-vertically-aligned-bottom { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
:where(.qdf-cols) > .wp-block-column > * { max-width: 100%; }
.qdf-col1.qdf-va-middle { display: flex; flex-direction: column; justify-content: center; }
.qdf-col1.qdf-va-bottom { display: flex; flex-direction: column; justify-content: flex-end; }

/* ============ En-têtes de section (special heading) ============ */
.qdf-sh { text-align: center; margin-bottom: 30px; display: flow-root; }
.qdf-sh.qdf-sh--m0 { margin-bottom: 0; }
.qdf-sh .wp-block-separator.qdf-sh__line { display: block; width: 1px; height: 45px; min-height: 45px; max-width: 1px; margin: 0 auto 29px; border: 0; background: var(--qdf-orange); color: var(--qdf-orange); opacity: 1; }
.qdf-sh .qdf-sh__line--bottom { margin-bottom: 9px !important; }
.qdf-sh--blue .qdf-sh__line { background: var(--qdf-blue) !important; color: var(--qdf-blue) !important; }
.qdf-sh--o2 .qdf-sh__line { background: #ff6700 !important; color: #ff6700 !important; }
:root .qdf-sh .special-h-tag { margin: 0 0 30px; }
.qdf-sh .qdf-sh__line--bottom { margin-top: 0; }

/* Dernier module d'une colonne : pas de marge basse (comme Tatsu) */
:root .qdf-section :is(.qdf-row, .qdf-col1, .wp-block-column) > :last-child { margin-bottom: 0 !important; }

/* ============ Textes ============ */
.qdf-text { width: 100%; }
:root .qdf-text > :last-child { margin-bottom: 0 !important; }
:root .qdf-wa-center { margin-left: auto; margin-right: auto; }
.qdf-text ul, .qdf-text ol { margin-bottom: 25px; }
.qdf-text strong { font-weight: 700; }

/* ============ Images ============ */
:root .wp-block-image.qdf-img { margin: 0 0 60px; }
:root .wp-block-image.qdf-img.qdf-img--m0 { margin-bottom: 0; }
.qdf-img img { display: block; width: 100%; height: auto; }
:root :is(.qdf-img, .qdf-header .wp-block-image) a { display: block; line-height: 0; }
:root .qdf-img.qdf-al-left { margin-right: auto; }
:root .qdf-img.qdf-al-right { margin-left: auto; }
:root .qdf-img.qdf-al-center { margin-left: auto; margin-right: auto; }
.qdf-bleed { width: 100%; }
.qdf-layers { position: relative; }
.qdf-layers .wp-block-image { margin: 0; position: relative; z-index: 1; width: auto; }
.qdf-layers .qdf-layer img { width: 100%; }
.qdf-layers .qdf-layer:not(:first-child) { position: absolute; top: 0; left: 0; }
.qdf-layers .qdf-layer:first-child { width: 100%; }

/* ============ Boutons ============ */
.qdf-buttons { display: flex; margin: 0; gap: 0; }
.qdf-buttons--center { justify-content: center; }
.qdf-buttons--left { justify-content: flex-start; }
.qdf-buttons--right { justify-content: flex-end; }
.qdf-btn .wp-block-button__link {
  display: inline-block; padding: 14px 34px; border: 1px solid var(--qdf-navy); border-radius: 32px; background: var(--qdf-navy); color: #fff;
  font: 600 12px/12px Montserrat, sans-serif; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; transition: .3s linear;
}
.qdf-btn--orange .wp-block-button__link { background: var(--qdf-orange); border-color: var(--qdf-orange); }
.qdf-btn--orange .wp-block-button__link:hover { background: #fff; color: var(--qdf-orange); }
.qdf-btn--blue .wp-block-button__link { background: var(--qdf-blue); border-color: var(--qdf-blue); }
.qdf-btn--blue .wp-block-button__link:hover { background: #fff; color: var(--qdf-blue); }
.qdf-btn--navy .wp-block-button__link:hover { background: #fff; color: var(--qdf-navy); }
.qdf-btn--sm .wp-block-button__link { padding: 11px 25px; }

/* ============ Compteurs, sliders, visite 3D, formulaires ============ */
.qdf-number { text-align: center; }
:root .qdf-number__n { margin: 0 0 10px; font: 400 60px/60px Raleway, sans-serif; color: var(--qdf-blue); }
:root .qdf-number__c { margin: 0; font-size: 30px; line-height: 40px; font-weight: 400; color: var(--qdf-brown); }
.qdf-visite iframe { display: block; width: 100%; border: 0; }
.qdf-slider { width: 100%; margin-bottom: 60px; }
.qdf-form { width: 100%; }


/* ============ Formulaires (Contact Form 7, présentation reprise de l'ancien WPForms) ============ */
.wpcf7 { width: 100%; }
.wpcf7 form { margin: 0; }
.wpcf7 .cf-field, .wpcf7 .cf-row, .wpcf7 .cf-optin { margin: 0 0 25px; }
.wpcf7 .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wpcf7 .cf-row > div, .wpcf7 .cf-field > div { min-width: 0; }
.wpcf7 .cf-label { display: block; margin: 0 0 5px; font: 400 14px/20px Raleway, sans-serif; color: #333; }
.wpcf7 .cf-label .req, .wpcf7 .cf-label abbr { color: #d63637; text-decoration: none; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 input[type=number], .wpcf7 select, .wpcf7 textarea {
  display: block; width: 100%; height: 45px; padding: 6px 14px; border: 1px solid rgba(0, 0, 0, .25); border-radius: 3px; background: #fff;
  font: 400 16px/1.3 Raleway, sans-serif; color: #333; box-sizing: border-box;
}
.wpcf7 textarea { height: 120px; }
.wpcf7 input::placeholder { color: rgba(0, 0, 0, .35); }
.wpcf7 .cf-field input[type=tel] { max-width: 50%; }
.wpcf7 .cf-sub { display: block; margin: 5px 0 0; font: 400 12px/15px Raleway, sans-serif; color: #666; }
.wpcf7 .cf-optin label { font: 400 16px/22px Raleway, sans-serif; color: #333; }
.wpcf7 .cf-optin input[type=checkbox] { width: 16px; height: 16px; margin: 0 10px 0 0; vertical-align: middle; }
.wpcf7 .cf-submit { margin: 60px 0 0; }
.wpcf7 input[type=submit] { display: inline-block; height: auto; padding: 12px 15px; border: 0; border-radius: 3px; background: #066aab; color: #fff; cursor: pointer; font: 400 12px/1.2 Raleway, sans-serif; text-transform: uppercase; }
.wpcf7 input[type=submit]:hover { background: #055a91; }
.wpcf7 .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wpcf7-not-valid-tip { font: 400 12px/18px Raleway, sans-serif; color: #d63637; }
.wpcf7 form .wpcf7-response-output { margin: 20px 0 0; padding: 10px 15px; font: 400 14px/20px Raleway, sans-serif; }
@media (max-width: 767px) { .wpcf7 .cf-row { grid-template-columns: 1fr; } .wpcf7 .cf-field input[type=tel] { max-width: none; } }

/* ============ Plan du site ============ */
.qdf-plan { padding: 20px 10px 10px; font-family: 'Courier New', Courier, monospace; }
:root .qdf-plan ul { margin: 0; }

/* ============ Pied de page ============ */
:root .qdf-footer-menu { gap: 5px; margin: 0; padding: 0; }
:root .qdf-footer-menu .wp-block-navigation-item { margin: 0; }
.qdf-footer-menu .wp-block-navigation-item__content { font: 600 14px/22px Montserrat, sans-serif; letter-spacing: -.14px; color: var(--qdf-orange); padding: 0; }
.qdf-footer-menu .wp-block-navigation__container { gap: 5px; }
.qdf-footer-menu .wp-block-navigation-item__content:hover { color: var(--qdf-blue); }
:root .qdf-copyright { padding-top: 37px; text-align: center; }
:root .qdf-copyright p { margin: 0; }


/* ============ Page Actualités (grille d'articles) ============ */
.qdf-blog { width: 100%; }
:root .qdf-blog__list { list-style: none; margin: 0; padding: 0; display: block; }
:root .qdf-blog__list > li { margin: 0; padding: 0; }
.qdf-post { display: flex; align-items: center; gap: 40px; padding: 45px 0; border-bottom: 1px solid #ececec; }
.qdf-blog__list > li:last-child .qdf-post { border-bottom: 0; }
.qdf-post__thumb { flex: 0 0 580px; width: 580px; margin: 0; }
.qdf-post__thumb img { display: block; width: 100%; height: auto; }
.qdf-post__body { flex: 1 1 0; min-width: 0; padding: 35px 40px 0 0; }
:root .qdf-post__title { margin: 0 0 10px; font: 600 35px/46px Montserrat, sans-serif; letter-spacing: -.35px; color: #343638; }
.qdf-post__title a { color: inherit; }
:root .qdf-post__date { margin: 0 0 25px; font: 400 11px/17px Raleway, sans-serif; color: var(--qdf-text); }
:root .qdf-post__text { font: 400 16px/28px Roboto, sans-serif; color: #848991; }
:root .qdf-post__text .qdf-more { margin: 25px 0 0; }
.qdf-post__text a.wp-block-latest-posts__more, .qdf-post__text .more-link { font: 400 10px/26px Montserrat, sans-serif; letter-spacing: 1px; text-transform: uppercase; text-decoration: underline; color: var(--qdf-text); }
:root .qdf-pagination { margin: 60px 0 0; gap: 5px; }
.qdf-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 31px; height: 31px; padding: 0 8px; border: 1px solid #e0e0e0; color: var(--qdf-text); font: 400 12px/1 Raleway, sans-serif; }
.qdf-pagination .page-numbers.current { background: var(--qdf-orange); border-color: var(--qdf-orange); color: #fff; }

/* ============ Article ============ */
.qdf-single-hero.wp-block-cover { padding: 50px 0; }
:root .qdf-single-title { max-width: 760px; margin: 0 auto 22px; font: 600 46px/58px Montserrat, sans-serif; color: #fff; text-align: center; }
:root .qdf-single-date { margin: 0; color: #fff; font: 600 13px/26px Raleway, sans-serif; text-align: center; }
:root .qdf-single-row { margin-top: 70px; }
:root .qdf-single-cols { gap: 70px; margin: 0; }
.wp-block-columns.qdf-single-cols > .wp-block-column.qdf-single-main { flex: 0 0 810px; padding-left: 10px; }
.wp-block-columns.qdf-single-cols > .wp-block-column.qdf-single-side { flex: 0 0 280px; }
:root .qdf-post-text { font: 400 17px/30px Roboto, sans-serif; color: #848991; }
:root .qdf-post-text > * { max-width: none; }
.qdf-post-text strong { font-weight: 700; color: #5d6168; }
:root .wp-block-separator.qdf-rule { width: 100%; max-width: none; margin: 55px 0 30px; border: 0; border-top: 1px solid #e5e5e5; background: none; opacity: 1; }
.qdf-share { display: flex; flex-wrap: wrap; }
.qdf-share__btn { display: inline-block; margin: 0 5px 10px 0; padding: 8px 12px; color: #fff; font: 400 13px/15px Raleway, sans-serif; }
.qdf-share__btn--facebook { background: #3b5998; }
.qdf-share__btn--twitter { background: #00aced; }
.qdf-share__btn--pinterest { background: #cb2027; }
.qdf-share__btn--linkedin { background: #4875b4; }
:root .qdf-side__title { margin: 0 0 20px; }
:root .qdf-side .wp-block-latest-posts { margin: 0; padding: 0; list-style: none; font: 400 16px/28px Roboto, sans-serif; color: #848991; }
.qdf-side .wp-block-latest-posts li { margin: 0 0 10px; }
.qdf-postnav { margin: 90px 0 0; padding: 22px 40px; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec; font: 500 14px/20px Montserrat, sans-serif; }
.qdf-postnav a { color: #222; display: inline-block; max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.qdf-postnav .post-navigation-link__label { display: block; margin-bottom: 4px; font: 400 10px/12px Montserrat, sans-serif; letter-spacing: 1px; color: #888; }
.qdf-postnav__next { text-align: right; }

@media (max-width: 767px) {
  .qdf-post { flex-direction: column; gap: 0; }
  .qdf-post__thumb { flex: 0 0 auto; width: 100%; }
  .qdf-post__body { padding: 25px 0 0; }
  :root .qdf-single-title { font-size: 32px; line-height: 42px; }
  .wp-block-columns.qdf-single-cols { flex-direction: column; }
  .wp-block-columns.qdf-single-cols > .wp-block-column.qdf-single-main, .wp-block-columns.qdf-single-cols > .wp-block-column.qdf-single-side { flex: 0 0 auto; width: 100%; padding-left: 0; }
}

/* ============ Visibilité ============ */
@media (min-width: 1025px) { .qdf-hide-d { display: none !important; } }
@media (max-width: 1024px) and (min-width: 768px) { .qdf-hide-t { display: none !important; } }
@media (max-width: 767px) { .qdf-hide-m { display: none !important; } }

/* ============ Mobile ============ */
@media (max-width: 767px) {
  .qdf-cols { flex-direction: column; gap: 50px; }
  .qdf-row--g10 > .qdf-cols { gap: 50px; }
  :root .qdf-fullscreen { min-height: 0 !important; }
  .qdf-cols > .wp-block-column { flex: 0 0 auto !important; width: 100%; }
  .qdf-row--full .qdf-cols { gap: 0; }
  .qdf-header__row { padding: 15px 30px; }
  .qdf-lang ul { display: block; }
  .qdf-lang li { display: block; }
}
