/*
Theme Name: Le Grand Castillon
Theme URI: https://legrandcastillon.fr
Author: Serafino et Sabrina Incardona
Description: Thème sur mesure pour le gîte Le Grand Castillon
Version: 1.0.0
Text Domain: grand-castillon
*/

/* Reset et variables */
:root {
  --primary: #8C3A2B;
  --primary-light: #8C3A2BB3;
  --secondary: #8fa286;
  --dark-green: #354e39;
  --light-green: #f0f7f4;
  --rouille: #b28051;
  --light-rouille: #fff8f0;
  --white: #ffffff;
  --text: #1d1d1b;
  --text-light: #6b7280;
  --text-ultralight: #999999;
  --gray-500: #cccccc;
  --gray-400: #dddddd;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-input: #f9fafb;
  --error: #ef4444;
  --success: #10b981;
  --warning: #ffc107;
  --warning-light: #fff3cd;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --transition: all 0.3s ease;
  --fw-bold: 700;
  --fw-semibold: 500;
  --fw-normal: 400;
  --radius-pill: 50px;
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-sm: 5px;
  --swiper-theme-color: #b28051;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f9f9f9;
  font-family: "Poppins", sans-serif;
  color: var(--text);
}

:where(html) img {
  border-radius: 10px !important;
}

h2 {
  position: relative;
  font-family: "The Nautigal", serif;
}

ul:not(.mphb_checkout-services-list) {
  /* list-style: none; */
  padding-left: 2rem;

  li {
    margin-top: 0.75rem;

    ul {
      padding-left: 1.5rem;
    }
  }

  /* ou ➜ ➔ ➤ ➢ ⟶ ⇒ */
  /* li:not(.menu-item):not(.elementor-icon-list-item):not(.elementor-editor-element-setting):not(.product-category):not(.product)::before {
        content: "→ ";
        margin-right: 8px;
        color: var(--secondary);
    } */
}

input[type="submit"] {
  &:hover {
    cursor: pointer;
  }
}

/* @media screen and (max-width: 575px) {
    
} */

.h2-deco h1, 
.h2-deco h2, 
.h2-deco h3 {
  display: inline-block;
}

.h2-deco h1::after, 
.h2-deco h2::after, 
.h2-deco h3::after {
  content: "";
  position: absolute;
  bottom: -24px;
  width: 70px;
  height: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.h2-primaire h1 b, 
.h2-primaire h2 b,
.h2-primaire h3 b {
  color: var(--primary);
}

.h2-primaire.h2-deco h1::after,
.h2-primaire.h2-deco h2::after,
.h2-primaire.h2-deco h3::after {
  background-color: var(--primary);
}

.h2-secondaire h1 b, 
.h2-secondaire h2 b,
.h2-secondaire h3 b {
  color: var(--secondary);
}

.h2-secondaire.h2-deco h1::after, 
.h2-secondaire.h2-deco h2::after,
.h2-secondaire.h2-deco h3::after {
  background-color: var(--secondary);
}

#h1-home {
  h1 {
    font-size: 52px;
    line-height: 1.5 !important;
  }
}

@media screen and (max-width: 575px) {
  #h1-home {
    h1 {
      font-size: 40px;
    }
  }
}

#exploreBox {
  max-width: 457px;
  background-color: rgba(0, 0, 0, 0.75);
}

#site-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 1340px;
  width: 100%;
  margin: 100px auto 0 auto;
  padding-top: 70px;
  border-top: 1px solid var(--text-ultralight);

  #footer-left {
    display: flex;
    flex-direction: column;
    align-items: center;

    img {
      margin-bottom: 1.5rem;
    }

    #footer-frames {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
    }
  }

  h3 {
    margin: 2rem 0 1.5rem 0;
  }

  .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;

    .icon-wrapper {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      border: 2px solid var(--secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-right: 15px;
    }

    .icon-wrapper svg {
      width: 24px;
      height: 24px;
      fill: var(--secondary);
    }

    .contact-content {
      a {
        color: #333;
        text-decoration: underline;
        font-size: 16px;

        &:hover {
          color: var(--secondary);
        }
      }

      span {
        color: #333;
        font-size: 16px;
        line-height: 1.5;
      }
    }
  }

  #mentions {
    order: 3;
    position: relative;
    text-align: center;
    margin-top: 50px;
    padding: 2rem 0;

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 500px;
      height: 2px;
      background-color: var(--secondary);
    }
  }
}

@media screen and (max-width: 1023px) {
  #site-footer {
    #footer-left {
      order: 2;
      margin-top: 3rem;
    }

    #footer-right {
      order: 1;
      text-align: center;
      padding: 0 1rem;
    }

    #mentions {
      padding-left: 0.5rem;
      padding-right: 0.5rem;

      &::before {
        width: 300px;
      }
    }
  }
}

/* ==========================================================================
   FORMULAIRE CONTACT
   ========================================================================== */

/* Conteneur du formulaire */
.contact-form-container {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  width: 100%;
  max-width: 500px;
  animation: fadeIn 0.5s ease;
}

/* En-tête */
.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* États d'erreur */
.form-group.error input,
.form-group.error textarea {
  border-color: var(--error);
}

.form-group.error input:focus,
.form-group.error textarea:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.error-message::before {
  content: "⚠";
}

/* États de succès */
.form-group.success input,
.form-group.success textarea {
  border-color: var(--success);
}

/* Message de succès */
.success-message {
  background: #ecfdf5;
  border: 2px solid var(--success);
  border-radius: 8px;
  padding: 1rem;
  color: #065f46;
  text-align: center;
  margin-top: 1rem;
  animation: slideDown 0.4s ease;
}

.success-message::before {
  content: "✓";
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

#newsletter .elementor-element {
    width: 100%;
}
#newsletter .forminator-custom-form {
    box-shadow: none;
    background: none;
    padding: 0 3rem;
    max-width: 100%;
}
#newsletter .forminator-custom-form .forminator-button-submit {
    background-color: var(--dark-green);
}
#newsletter .forminator-custom-form .forminator-row {
    display: flex;
    gap: 2rem;
}
#newsletter .forminator-custom-form .forminator-row .forminator-col {
    flex-grow: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .contact-form-container {
      padding: 2rem 1.5rem;
    }

    .form-header h2 {
      font-size: 1.5rem;
    }

    #newsletter .forminator-custom-form .forminator-row {
        flex-direction: column;
    }
}

.booking-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spinLoad 1s linear infinite;
}

.cart-container.loading,
.booking-form.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

/* Styles pour l'erreur clonée en haut de la page checkout */
.mphb-errors-wrapper.firstError {
  position: relative;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
  font-weight: 500;
}

/* Optionnel : ajouter une icône */
.mphb-errors-wrapper.firstError::before {
  content: "⚠️ ";
  margin-right: 8px;
}

/* Animation d'apparition */
.mphb-errors-wrapper.firstError {
  animation: slideDown 0.3s ease-out;
}

/* Masquer l'erreur originale si vous voulez (optionnel) */
/* .mphb-errors-wrapper:not(.firstError) {
    display: none;
} */

.waiting-list {
    position: absolute !important;
    z-index: 1 !important;
    left: 0;
    top: 22%;
}

/* UTILITIES */

@media screen and (min-width: 1400px) {
  /* .position-sticky {
        position: sticky !important;
        top: 10px;
    } */
}

@media screen and (min-width: 991px) and (max-width: 1399px) {
  .position-sticky {
    position: sticky !important;
    top: 10px;
    max-height: 90vh;
    overflow-y: auto !important;
  }

  .position-sticky::after {
    content: "";
    position: sticky;
    bottom: -10px;
    height: 30px;
    flex-shrink: 0;
    order: 9999;
    background: linear-gradient(
      to top,
      rgb(0, 0, 0) 0%,
      rgba(0, 0, 0, 0.75) 50%,
      rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .position-sticky.has-overflow:not(.scrolled-bottom)::after {
    opacity: 1;
  }
}

.text-primary {
  color: var(--primary);
}

.bg-primary {
  background-color: var(--primary) !important;
  color: var(--white);
}

.text-secondary {
  color: var(--secondary);
}

.bg-secondary {
  background-color: var(--secondary) !important;
  color: var(--white);
}

.bg-white {
  background-color: var(--white) !important;
}

.text-dark-green {
  color: var(--dark-green);
}

.shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
