/**
 * Hydromanut Theme - Main Stylesheet
 * Architecture épurée, ultra-légère et responsive
 * Intégration optimisée pour Fluent Forms Pro & ACF Pro
 */

:root {
  --hm-bg: #ffffff;
  --hm-text: #0f172a;
  --hm-text-muted: #64748b;
  --hm-border: #e2e8f0;
  --hm-border-subtle: #f1f5f9;
  --hm-primary: #0f172a;
  --hm-primary-hover: #1e293b;
  --hm-primary-contrast: #ffffff;
  --hm-focus-ring: rgba(15, 23, 42, 0.12);
  --hm-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hm-radius-sm: 6px;
  --hm-radius-md: 10px;
  --hm-radius-lg: 14px;
  --hm-transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --hm-logo-max-width: 320px;
}

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

html {
  font-family: var(--hm-font-sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--hm-bg);
  color: var(--hm-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--hm-bg);
  color: var(--hm-text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Accessibilité: Saut au contenu */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--hm-primary);
  color: var(--hm-primary-contrast);
  border-radius: var(--hm-radius-sm);
  clip: auto;
}

/* ==========================================================================
   Layout Split-Screen 2 Colonnes
   ========================================================================== */
.hydromanut-viewport {
  width: 100vw;
  background-color: var(--hm-bg);
}

/* Mode Desktop (≥ 992px) : 2 colonnes 100% hauteur viewport */
@media (min-width: 992px) {
  .hydromanut-viewport {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .hydromanut-split {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
  }

  .hydromanut-col-left {
    flex: 1 1 50%;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem;
    background-color: var(--hm-bg);
    border: none;
    position: relative;
  }

  .hydromanut-col-right {
    flex: 1 1 50%;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem;
    background-color: var(--hm-bg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mode Mobile / Tablette (< 992px) : Empilement vertical */
@media (max-width: 991px) {
  .hydromanut-viewport {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
  }

  .hydromanut-split {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
  }

  .hydromanut-col-left {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem 2rem;
    background-color: var(--hm-bg);
    border: none;
  }

  .hydromanut-col-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem 4rem;
    background-color: var(--hm-bg);
  }
}

/* ==========================================================================
   Colonne Gauche : Identité & Logo Hydromanut (ACF Pro)
   ========================================================================== */
.hydromanut-brand-container {
  width: 100%;
  max-width: min(900px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hydromanut-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform var(--hm-transition);
}

.hydromanut-logo-wrapper:hover {
  transform: translateY(-2px);
}

.hydromanut-logo-img {
  max-width: var(--hm-logo-max-width, 320px);
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hydromanut-tagline {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--hm-text-muted);
  line-height: 1.6;
  margin-top: 0.5rem;
  max-width: 380px;
}

.hydromanut-brand-subtext {
  font-size: 0.875rem;
  color: var(--hm-text-muted);
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* ==========================================================================
   Colonne Droite : Formulaire Fluent Forms Pro
   ========================================================================== */
.hydromanut-form-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.hydromanut-form-header {
  margin-bottom: 2rem;
}

.hydromanut-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hm-text);
  margin-bottom: 0.5rem;
}

.hydromanut-form-desc {
  font-size: 0.9375rem;
  color: var(--hm-text-muted);
  line-height: 1.5;
}

/* Harmonisation & Épuration Fluent Forms */
.fluentform,
.fluentform_wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.fluentform .ff-el-group {
  margin-bottom: 1.25rem !important;
}

.fluentform .ff-el-input--label label {
  display: block !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--hm-text) !important;
  margin-bottom: 0.4rem !important;
}

/* Champs de texte, email, tel, select, textarea */
.fluentform .ff-el-form-control,
.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform input[type="url"],
.fluentform input[type="number"],
.fluentform select,
.fluentform textarea {
  width: 100% !important;
  background-color: #ffffff !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: var(--hm-radius-sm) !important;
  padding: 0.75rem 0.95rem !important;
  font-size: 0.9375rem !important;
  font-family: inherit !important;
  color: var(--hm-text) !important;
  line-height: 1.5 !important;
  transition: border-color var(--hm-transition), box-shadow var(--hm-transition) !important;
  outline: none !important;
  box-shadow: none !important;
}

.fluentform .ff-el-form-control:focus,
.fluentform input:focus,
.fluentform select:focus,
.fluentform textarea:focus {
  border-color: var(--hm-primary) !important;
  box-shadow: 0 0 0 3px var(--hm-focus-ring) !important;
}

.fluentform textarea {
  min-height: 120px !important;
  resize: vertical !important;
}

/* Bouton de validation Fluent Forms */
.fluentform .ff_submit_btn_wrapper,
.fluentform .ff_submit_btn_wrapper_custom {
  margin-top: 1rem !important;
  width: 100% !important;
}

.fluentform button.ff-btn-submit,
.fluentform input[type="submit"].ff-btn-submit,
.fluentform .ff_submit_btn_wrapper button {
  width: 100% !important;
  background-color: var(--hm-primary) !important;
  color: var(--hm-primary-contrast) !important;
  border: 1px solid var(--hm-primary) !important;
  border-radius: var(--hm-radius-sm) !important;
  padding: 0.85rem 1.5rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all var(--hm-transition) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.fluentform button.ff-btn-submit:hover,
.fluentform input[type="submit"].ff-btn-submit:hover,
.fluentform .ff_submit_btn_wrapper button:hover {
  background-color: var(--hm-primary-hover) !important;
  border-color: var(--hm-primary-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
}

.fluentform button.ff-btn-submit:active,
.fluentform .ff_submit_btn_wrapper button:active {
  transform: translateY(0) !important;
}

/* Messages de confirmation & erreurs Fluent Forms */
.ff-message-success {
  background: #f8fafc !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: var(--hm-radius-md) !important;
  padding: 1.5rem !important;
  color: var(--hm-text) !important;
  font-size: 0.9375rem !important;
  line-height: 1.6 !important;
  margin-bottom: 1.5rem !important;
}

.error.text-danger,
.ff-errors-in-stack {
  font-size: 0.8125rem !important;
  color: #dc2626 !important;
  margin-top: 0.35rem !important;
  display: block !important;
}

/* Notice d'aide Admin / Placeholder si formulaire manquant */
.hydromanut-notice-box {
  background: #f8fafc;
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius-md);
  padding: 1.75rem;
  color: var(--hm-text);
}

.hydromanut-notice-box h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hydromanut-notice-box p {
  font-size: 0.875rem;
  color: var(--hm-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.hydromanut-notice-box .notice-steps {
  list-style: decimal inside;
  font-size: 0.84rem;
  color: var(--hm-text);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.hydromanut-btn-admin {
  display: inline-block;
  background: var(--hm-primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--hm-radius-sm);
  text-decoration: none;
  transition: opacity var(--hm-transition);
}

.hydromanut-btn-admin:hover {
  opacity: 0.9;
}
