/*
  Theme Name: Voyages Peeters 2025
  Description: Thème enfant de Kadence - Optimisé pour WordPress 6.8+
  Author: Gil Guminski
  Author URI: http://edge-solutions.be
  Version: 0.1.0
  Update Date: 2025-09-13
  Template: kadence
  Requires at least: 4.4
  Tested up to: 6.8
  Requires PHP: 7.4
*/

/* Kadence */
body #wpfront-notification-bar-spacer{
  display: none !important;
}


/* Languages list */
ul.languages-list {
  position: relative;
  margin:0;
  padding:0;
  list-style: none;
}

.languages-list li {
  display: inline-block;
  border-right-width: 0;
}

.languages-list li a {
  display: inline-block;
  width: 24px !important;
  height: 12px !important;
}

/* Profile Builder: delete account button */
#wppb-delete-account {
  width: auto !important;
}

/* Footer: force middle section 4 to align content to top */
.site-footer-middle-section-4.site-footer-section.footer-section-inner-items-1 {
  justify-content: flex-start !important;
  align-items: flex-start;
}

/* Front‑end flip box: responsive height (override plugin defaults safely) */
.flip-box-block:not(.block-editor-block-list__block) {
  /* Keep the plugin behavior but remove the hard‑coded 500px height. */
  background-color: transparent;
  width: 100% !important;
  /* Portrait ratio close to the team photos; tweak if needed (e.g. 4 / 5). */
  aspect-ratio: 3 / 4;
  perspective: 10000px;
  overflow: hidden; /* clip 3D content without affecting individual faces */
}

/* Inner wrapper: preserves 3D transform behavior */
.flip-box-block:not(.block-editor-block-list__block) .flip-box-block-innner {
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s;
  width: 100%;
}

.flip-box-block:not(.block-editor-block-list__block):hover > .flip-box-block-innner {
  transform: rotateY(180deg);
}

/* Front and back faces: ensure both are stacked correctly */
.flip-box-block:not(.block-editor-block-list__block) .flip-box-block-front,
.flip-box-block:not(.block-editor-block-list__block) .flip-box-block-back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  height: 100%;
  position: absolute;
  transform: rotateX(0deg);
  width: 100%;
}

.flip-box-block:not(.block-editor-block-list__block) .flip-box-block-back {
  transform: rotateY(180deg);
}

/* Reduce the large gap between the flip box and the text below */
.wp-block-flipbox-block-flipbox {
  margin-bottom: 1.25rem; /* tweak this value to taste */
}

/* Kadence grid 4: responsive from 1 → 4 columns */
/* Mobile: 1 column */
@media (max-width: 640px) {
  .kadence-grid-4 > .kt-row-column-wrap {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* Small/medium screens: 2 columns */
@media (min-width: 641px) and (max-width: 900px) {
  .kadence-grid-4 > .kt-row-column-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Larger tablets/small desktops: 3 columns */
@media (min-width: 901px) and (max-width: 1200px) {
  .kadence-grid-4 > .kt-row-column-wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Above 1200px, Kadence default (4 columns) remains */

/* Kadence grid 4: align email row to the bottom of each person card
   while keeping all cards in a row at equal height */
.kadence-grid-4 .wp-block-kadence-column {
  display: flex; /* let the column stretch to the grid row height */
}

.kadence-grid-4 .wp-block-kadence-column > .kt-inside-inner-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* fill the full column height */
}

/* The email advanced heading (with icon) is the last block: push it down */
.kadence-grid-4 .wp-block-kadence-column > .kt-inside-inner-col > .kt-adv-heading-has-icon {
  margin-top: auto;
}

/**********************************
  Autocar List
  */

  .autocars-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin: 2rem 0 3rem;
  }

  /* Top / bottom CTA */
  .autocars-list__cta {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .autocars-list__cta--bottom {
    margin-top: 1.5rem;
  }

  .autocars-list__cta .button {
    padding-inline: 2.5rem;
    padding-block: 0.9rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Individual vehicle cards */
  .autocars-list article {
    background-color: #ffffff;
    border-radius: 0.9rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .autocars-list article:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  }

  .autocars-list article header {
    padding: 1rem 1.25rem 0.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .autocars-list article header h1 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .autocars-list article header h1 a {
    font-size: 1.2rem;
    color: var(--wp--preset--color--accent, var(--wp--preset--color--primary, #f97316));
    text-decoration: none;
  }

  .autocars-list article header h1 a:hover {
    text-decoration: underline;
  }

  .autocars-list article header h1 a span {
    font-size: 0.7em;
  }

  /* Slider / image */
  .autocars-list article .metaslider,
  .autocars-list article img {
    display: block;
    width: 100%;
  }

  .autocars-list article footer {
    margin-top: auto;
    padding: 0.75rem 1.25rem 1rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem 0.7rem;
    font-size: 0.86rem;
  }

  .autocars-list article footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .autocars-list article footer span:first-child {
    margin-right: auto;
    font-weight: 600;
    flex-shrink: 1;
  }

  .autocars-list article footer span i {
    font-size: 0.9rem;
  }

  .autocars-list .inactive,
  .autocars-list .fa-inactive {
    opacity: 0.35;
  }

  .autocars-list .fa,
  .autocars-list .icon {
    font-style: normal;
    font-weight: normal;

    display: inline-block;
    text-decoration: inherit;
    width: 1em;
    text-align: center;

    font-variant: normal;
    text-transform: none;
    line-height: 1em;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Legend */
  .autocars-list .legend {
    grid-column: 1 / -1;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }

  .autocars-list .legend header {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .autocars-list .legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
  }

  .autocars-list .legend ul li {
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    color: #4b5563;
  }

  .autocars-list .legend ul li i {
    margin-right: 0.5rem;
  }

  /* Allow wrapping footer content on very small screens */
  @media (max-width: 480px) {
    .autocars-list article footer {
      flex-wrap: wrap;
    }
  }

  /* Misc existing helper */
  .flotte-vehicules img {
    display: inline-block;
    max-height: 299px;
  }

  /**********************************
    Events Manager – custom contact form
    (vp-contact-form)
  **********************************/

  /* For the special contact form, stop using the generic 2‑column grid
     on the whole details section – we’ll handle columns inside
     .vp-contact-grid instead. */
  .em-event-bookings.vp-contact-form .em-booking-form-details.em-booking-section {
    display: block;
  }

  /* Section titles should always span the full width. */
  .em-event-bookings.vp-contact-form .em-booking-form-details h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .em-event-bookings.vp-contact-form .em-booking-form-details h2:first-child {
    margin-top: 0;
  }

  /* Inner grid for each logical block (personal info, general info, etc.) */
  .em-event-bookings.vp-contact-form .vp-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
  }

  /* Columns become real columns on wider screens.
     auto-fit lets the “Définition du voyage” section use 3 columns
     when there is enough space, while 2 columns are used for simpler blocks. */
  @media (min-width: 900px) {
    .em-event-bookings.vp-contact-form .vp-contact-grid {
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
  }

  /* Basic spacing inside each column */
  .em-event-bookings.vp-contact-form .vp-contact-col p {
    margin: 0 0 0.9rem;
  }

  .em-event-bookings.vp-contact-form .vp-contact-col p:last-child {
    margin-bottom: 0;
  }

/* Kadence single-column row: reduce side padding on very small screens
   to give cards/buttons a bit more horizontal space */

/**********************************
  Events Manager – booking & contact forms
  (shared fields + primary button)
**********************************/

/* Inputs: same look & feel as login fields */
.em-event-bookings .em-booking-form-details input[type="text"],
.em-event-bookings .em-booking-form-details input[type="email"],
.em-event-bookings .em-booking-form-details input[type="tel"],
.em-event-bookings .em-booking-form-details input[type="number"],
.em-event-bookings .em-booking-form-details select,
.em-event-bookings .em-booking-form-details textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background-color: #f9fafb;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.em-event-bookings .em-booking-form-details input:focus,
.em-event-bookings .em-booking-form-details select:focus,
.em-event-bookings .em-booking-form-details textarea:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--wp--preset--color--accent, var(--wp--preset--color--primary, #fe9a00));
  box-shadow: 0 0 0 1px rgba(254, 154, 0, 0.35);
}

/* Primary submit button: align with login button */
.em-event-bookings .em-booking-form-buttons .em-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.3rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background-color: #fe9a00;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.45);
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.em-event-bookings .em-booking-form-buttons .em-form-submit:hover {
  background-color: #e17100;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.55);
  transform: translateY(-1px);
}

.em-event-bookings .em-booking-form-buttons .em-form-submit:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.em-event-bookings .em-booking-form-buttons .em-form-submit[disabled] {
  opacity: 0.5;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 480px) {
  .kt-row-column-wrap.kt-has-1-columns.kt-row-layout-equal.kt-mobile-layout-row.kt-row-valign-top.kb-theme-content-width {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Footer: remove extra margin on mobile for the utility list inside the footer */
@media (max-width: 640px) {
  .site-footer-row-container-inner ul {
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-footer-row-container-inner li {
    margin-top: 0rem !important;
  }

  .site-footer-row-container-inner li a {
    display: block;
    padding: 0.5rem;
  }

  .site-footer-row-container-inner li a:hover {
    text-decoration: underline;
  }

  .site-footer-row-container-inner .site-footer-middle-section-3 div {
    text-align: left;
    padding-left: 0 !important;
  }
}

/* Location page: add margin to the location page */
article.type-location {
  margin: 5rem 0;
}

/**********************************
  Profile Builder – login / account pages
  (front-end /login/ and related)
**********************************/

/* Outer wrapper: center the login card and give it breathing room */
#wppb-login-wrap.wppb-user-forms {
  max-width: 460px;
  margin: 3.5rem auto 4.5rem;
  padding: 2.25rem 2.5rem;
  background-color: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

@media (max-width: 600px) {
  #wppb-login-wrap.wppb-user-forms {
    margin: 2.5rem 1.25rem 3rem;
    padding: 1.75rem 1.5rem;
    border-radius: 1rem;
  }
}

/* Align the login block with the rest of the site typography */
#wppb-login-wrap.wppb-user-forms p {
  font-size: 0.95rem;
  color: #4b5563;
}

/* Fix plugin overflow clipping on the submit row so the button shadow is visible */
#wppb-login-wrap p.login-submit {
  overflow: visible;
}

/* Username / password / 2FA rows: modern stacked layout */
#wppb-login-wrap .login-username,
#wppb-login-wrap .login-password,
#wppb-login-wrap .login-auth {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

/* Labels above the fields instead of 30/70 split */
#wppb-login-wrap .login-username label,
#wppb-login-wrap .login-password label,
#wppb-login-wrap .login-auth label {
  width: 100% !important;
  float: none !important;
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}

/* Inputs: full-width, soft borders, subtle focus ring */
#wppb-login-wrap .login-username input,
#wppb-login-wrap .login-password input,
#wppb-login-wrap .login-auth input {
  width: 100% !important;
  float: none !important;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background-color: #f9fafb;
  font-size: 0.95rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

#wppb-login-wrap .login-username input:focus,
#wppb-login-wrap .login-password input:focus,
#wppb-login-wrap .login-auth input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--wp--preset--color--accent, var(--wp--preset--color--primary, #fe9a00));
  box-shadow: 0 0 0 1px rgba(254, 154, 0, 0.35);
}

/* Remember me row */
#wppb-login-wrap .login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}

#wppb-login-wrap .login-remember input {
  cursor: pointer;
}

#wppb-login-wrap .login-remember label {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  cursor: pointer;
}

/* Submit button: follow site button style (orange pill) */
#wppb-login-wrap .login-submit {
  margin-top: 0.25rem;
}

#wppb-login-wrap .login-submit input[type="submit"],
#wppb-login-wrap .login-submit button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.3rem;
  border-radius: 9999px;
  border: none;
  background-color: #fe9a00;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.45);
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

#wppb-login-wrap .login-submit input[type="submit"]:hover,
#wppb-login-wrap .login-submit button[type="submit"]:hover {
  background-color: #e17100;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.55);
  transform: translateY(-1px);
}

#wppb-login-wrap .login-submit input[type="submit"]:focus-visible,
#wppb-login-wrap .login-submit button[type="submit"]:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* Helper links under the form: register / lost password */
#wppb-login-wrap .login-register-lost-password {
  margin-top: 1.5rem;
  margin-bottom: 0;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
}

#wppb-login-wrap .login-register-lost-password a {
  color: var(--wp--preset--color--accent, var(--wp--preset--color--primary, #545454));
  font-weight: 500;
  text-decoration: none;
}

#wppb-login-wrap .login-register-lost-password a:hover {
  color: #687697;
  text-decoration: underline;
}

/* Separator between links */
#wppb-login-wrap .login-register-lost-password .login-separator {
  margin: 0 0.4rem;
  opacity: 0.6;
}

/* Compact layout on very small devices */
@media (max-width: 480px) {
  #wppb-login-wrap.wppb-user-forms {
    margin-top: 2rem;
    padding-inline: 1.25rem;
  }

  #wppb-login-wrap .login-submit input[type="submit"],
  #wppb-login-wrap .login-submit button[type="submit"] {
    width: 100%;
  }
}

/**********************************
  Events Manager – inline login (em-login size-large)
  inside booking forms
**********************************/

/* Wrapper: width & spacing depending on viewport */
.em-event-bookings .em-login.size-large {
  max-width: 70%;
  margin: 1rem auto;
}

@media (max-width: 900px) {
  .em-event-bookings .em-login.size-large {
    max-width: 100%;
    margin: 3rem 0;
  }
}

/* Turn the inline login into a small card matching the main login style */
.em-event-bookings .em-login.size-large .em-login-content {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.5rem;
  background-color: #ffffff;
  border-radius: 1.1rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

@media (min-width: 900px) {
  .em-event-bookings .em-login.size-large .em-login-content {
    padding: 1.75rem 2rem;
  }
}

.em-event-bookings .em-login.size-large .em-login-content p:first-of-type {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #111827;
}

/* Stack username/password rows similar to the main login */
.em-event-bookings .em-login.size-large .em-login-form p {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 1rem;
}

.em-event-bookings .em-login.size-large .em-login-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.em-event-bookings .em-login.size-large .em-login-form input[type="text"],
.em-event-bookings .em-login.size-large .em-login-form input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background-color: #f9fafb;
  font-size: 0.95rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.em-event-bookings .em-login.size-large .em-login-form input[type="text"]:focus,
.em-event-bookings .em-login.size-large .em-login-form input[type="password"]:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--wp--preset--color--accent, var(--wp--preset--color--primary, #fe9a00));
  box-shadow: 0 0 0 1px rgba(254, 154, 0, 0.35);
}

/* Actions row + buttons: align with main button style */
.em-event-bookings .em-login.size-large .em-login-actions {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.em-event-bookings .em-login.size-large .em-login-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.em-event-bookings .em-login.size-large .em-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.9rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background-color: #fe9a00;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.45);
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.em-event-bookings .em-login.size-large .em-login-submit:hover {
  background-color: #e17100;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.55);
  transform: translateY(-1px);
}

.em-event-bookings .em-login.size-large .em-login-submit:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.em-event-bookings .em-login.size-large .em-login-cancel {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  color: #4b5563;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.em-event-bookings .em-login.size-large .em-login-meta {
  padding-left: 0;
  color: #4b5563;
}

.em-event-bookings .em-login.size-large .em-login-rememberme input {
  margin-right: 0.4rem;
}

.em-event-bookings .em-login.size-large .em-login-links span {
  opacity: 0.6;
}

.em-event-bookings .em-login.size-large .em-login-links a {
  color: var(--wp--preset--color--accent, var(--wp--preset--color--primary, #545454));
  text-decoration: none;
}

.em-event-bookings .em-login.size-large .em-login-links a:hover {
  color: #687697;
  text-decoration: underline;
}
