/* ========================================
   Bloom'In - Global Design System & Styles
   Shared Components: Header, Footer, Buttons, Forms
   Figma Project Structure
   ======================================== */

/* CSS Variables - Design Tokens */
:root {
  /* Colors */
  --color-primary: #7a815e;
  --color-primary-light: #a0a77e;
  --color-secondary: #b2b993;
  --color-highlight: #ba9636;

  --color-ivory-1: #f7ecdb;
  --color-ivory-2: #f0e3d1;
  --color-ivory-3: #fff6ea;
  --color-ivory-4: #fff4e5;

  --color-green-light: #edf0e0;

  --color-text: #7a815e;
  --color-text-light: #fff6ea;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Open Sans', sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 96px;
  --spacing-page: 288px;

  /* Layout */
  --container-max-width: 1200px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-ivory-4);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* ========================================
   Layout
   ======================================== */

.container {
  width: 90%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
}

h1 {
  font-size: 54px;
  font-weight: 700;
  line-height: 58px;
}

h2 {
  font-size: 44px;
  line-height: 46px;
}

h3 {
  font-size: 32px;
  line-height: 32px;
}

h4 {
  font-size: 24px;
  line-height: 24px;
}

h5 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 12px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-icon {
  width: 16px;
  height: 13px;
  flex-shrink: 0;
  transition: filter var(--transition-fast);
  /* Filter to match --color-text (#7A815E) */
  filter: invert(49%) sepia(11%) saturate(749%) hue-rotate(35deg) brightness(95%) contrast(87%);
}

/* Filter to change SVG color on hover (white/ivory) */
.btn:hover .btn-icon {
  filter: brightness(0) invert(1);
}

.btn-primary {
  background-color: var(--color-ivory-3);
  color: var(--color-text);
  border: 1.5px solid var(--color-primary-light);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-ivory-3);
}

.btn-outline {
  background-color: var(--color-ivory-3);
  color: var(--color-text);
  border: 1.5px solid var(--color-primary-light);
}

.btn-outline:hover {
  background-color: var(--color-primary-light);
  color: var(--color-ivory-3);
}

.btn-secondary {
  background-color: var(--color-ivory-3);
  color: var(--color-text);
  border: 1.5px solid var(--color-primary-light);
}

.btn-secondary:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
  color: var(--color-ivory-3);
}

.btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ========================================
   Header
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-ivory-1);
  height: 96px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 48px;
  gap: 48px;
}

.logo {
  flex-shrink: 0;
  width: 240px;
  height: 60px;
}

.logo-img {
  height: 60px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--color-ivory-2);
}

.nav-icon {
  width: 10px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav-item.has-dropdown:hover .nav-icon {
  transform: rotate(180deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  position: relative;
  height: 524px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 var(--spacing-page);
  padding-top: var(--spacing-page);
  border-radius: 18px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #fff4e5 27.967%, rgba(255, 244, 229, 0) 98.594%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  text-align: center;
  max-width: 864px;
}

.hero-title {
  color: var(--color-text);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 500;
  font-style: italic;
  line-height: 32px;
  color: var(--color-text);
}

/* ========================================
   Contact Section
   ======================================== */

.contact-section {
  position: relative;
  padding: 144px 96px;
  background-color: var(--color-ivory-4);
  overflow: hidden;
}

.contact-container {
  display: flex;
  gap: 24px;
  max-width: 1248px;
  margin: 0 auto;
}

.contact-form-wrapper {
  flex: 1;
  max-width: 884px;
}

.contact-form-card {
  background-color: var(--color-ivory-1);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
}

.form-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
}

.form-icon {
  width: 42px;
  height: 29px;
}

.form-title {
  text-align: center;
}

.form-description {
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  color: var(--color-text);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
}

.form-group {
  width: 100%;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 10px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  color: var(--color-text);
  background-color: var(--color-ivory-1);
  border: 2px solid var(--color-ivory-2);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
}

.form-select-wrapper {
  position: relative;
}

.form-select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 12px;
  color: var(--color-text);
  pointer-events: none;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-checkbox-group {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-lg);
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 25px;
  height: 25px;
  border: 2px solid var(--color-text);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 10px;
  height: 6px;
  border: 2px solid white;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
  margin-bottom: 2px;
}

.checkbox-label {
  font-weight: 600;
  line-height: 22px;
  color: var(--color-text);
}

.btn-submit {
  align-self: center;
  margin-top: var(--spacing-lg);
}

/* ========================================
   Events Sidebar
   ======================================== */

.events-sidebar {
  width: 340px;
  flex-shrink: 0;
  background-color: var(--color-secondary);
  border: 1.5px solid var(--color-primary-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.events-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.events-icon {
  width: 36px;
  height: 40px;
}

.events-title {
  color: var(--color-ivory-3);
  text-align: center;
  white-space: pre-line;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card {
  position: relative;
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 117px;
}

/* Badge "Complet" for full events */
.event-card-badge-full {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #c0392b;
  color: #ffffff;
}

.event-grid-card,
.atelier-card {
  position: relative;
}

.event-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.event-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.event-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(255, 246, 234, 0) 23.077%, #fff6ea 68.75%);
}

.event-content {
  position: relative;
  z-index: 1;
}

.event-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.event-date {
  background-color: var(--color-highlight);
  color: var(--color-ivory-3);
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  padding: 6px 8px;
  border-radius: 45px;
}

.event-tag {
  background-color: var(--color-ivory-2);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  padding: 6px;
  border-radius: 45px;
}

.event-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 800;
  line-height: 18px;
  color: var(--color-text);
  padding-left: 4px;
}

/* Decorations */
.decoration-flower {
  position: absolute;
  left: -244px;
  top: 275px;
  width: 508px;
  height: 1081px;
  background: url('../assets/images/flower-decoration.svg') no-repeat center;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

.decoration-shape {
  position: absolute;
  right: -100px;
  top: -98px;
  width: 264px;
  height: 267px;
  background: url('../assets/images/shape-decoration.svg') no-repeat center;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background-color: var(--color-ivory-3);
}

.footer-banner {
  background-color: var(--color-highlight);
  padding: 24px 48px;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
  color: var(--color-green-light);
}

.banner-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-green-light);
  border-radius: 50%;
}

.footer-main {
  display: flex;
  gap: 112px;
  padding: 48px 96px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.footer-logo {
  width: 143px;
  height: 97px;
}

.footer-qr {
  width: 85px;
  height: 85px;
  object-fit: cover;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  flex: 1;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-heading {
  color: var(--color-text);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-list a {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  color: var(--color-text);
}

.footer-list a:hover {
  text-decoration: underline;
}

.footer-newsletter {
  padding: 0 96px 48px;
}

.newsletter-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: var(--color-ivory-1);
  border: 1.5px solid var(--color-ivory-2);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 500;
  line-height: 24px;
  color: var(--color-text);
  white-space: nowrap;
}

.newsletter-form {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 16px;
}

.newsletter-input {
  flex: 1;
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 20px;
  color: var(--color-text);
  background: transparent;
  border: 2px solid var(--color-text);
  border-radius: var(--radius-md);
}

.newsletter-input::placeholder {
  color: var(--color-text);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-primary-light);
}

.newsletter-btn {
  width: 21px;
  height: 18px;
  color: var(--color-text);
  transition: transform var(--transition-fast);
}

.newsletter-btn:hover {
  transform: translateX(4px);
}

.footer-bottom {
  background-color: var(--color-primary);
  padding: 24px 48px;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.footer-legal a {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  color: var(--color-green-light);
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-green-light);
  border-radius: 50%;
}

/* ========================================
   FAQ Section - Reusable Component
   Figma Node: 218:10833
   ======================================== */

.faq-section {
  background-color: var(--color-ivory-3);
  padding: 96px var(--spacing-page);
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-header h2 {
  color: var(--color-text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 864px;
  margin: 0 auto;
}

.faq-item {
  display: flex;
  flex-direction: column;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-question-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: var(--color-text);
}

.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-text);
  transition: transform var(--transition-fast);
}

.faq-icon svg {
  width: 8px;
  height: 5px;
}

/* Closed state - chevron pointing right */
.faq-item:not(.faq-item-open) .faq-icon {
  transform: rotate(-90deg);
}

/* Open state - chevron pointing down */
.faq-item-open .faq-icon {
  transform: rotate(0deg);
}

.faq-answer {
  display: none;
  padding: 0 0 16px 0;
}

.faq-item-open .faq-answer {
  display: block;
}

.faq-answer p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: var(--color-text);
}

.faq-separator {
  height: 1.5px;
  background-color: var(--color-ivory-2);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1280px) {
  :root {
    --spacing-page: 144px;
  }

  .contact-container {
    flex-direction: column;
  }

  .contact-form-wrapper {
    max-width: 100%;
  }

  .events-sidebar {
    width: 100%;
  }

  .footer-main {
    flex-wrap: wrap;
    gap: 48px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 32px;
  }

  .faq-section {
    padding: 96px 96px;
  }
}

@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }

  .hero {
    height: auto;
    padding: 96px 48px 48px;
  }

  h1 {
    font-size: 42px;
    line-height: 46px;
  }

  .contact-section {
    padding: 96px 48px;
  }

  .footer-main {
    padding: 48px;
  }

  .footer-newsletter {
    padding: 0 48px 48px;
  }

  .newsletter-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form {
    width: 100%;
  }

  .faq-section {
    padding: 96px 48px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
    line-height: 38px;
  }

  h2 {
    font-size: 32px;
    line-height: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
    line-height: 26px;
  }

  .contact-form-card {
    padding: var(--spacing-lg);
  }

  .events-sidebar {
    padding: var(--spacing-lg);
  }

  .banner-content {
    flex-direction: column;
    gap: 8px;
  }

  .banner-dot {
    display: none;
  }

  .footer-links {
    flex-direction: column;
    gap: 24px;
  }

  .footer-legal {
    flex-direction: column;
    gap: 12px;
  }

  .footer-dot {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0 24px;
  }

  .nav-actions .btn {
    padding: 12px 8px;
    font-size: 14px;
  }

  .hero {
    padding: 48px 24px;
  }

  .contact-section {
    padding: 48px 24px;
  }

  .footer-main {
    padding: 24px;
  }

  .footer-newsletter {
    padding: 0 24px 24px;
  }

  .faq-section {
    padding: 48px 24px;
  }

  .faq-question-text {
    font-size: 16px;
  }
}
