/* ============================================================
   MENTALITY — Landing Page
   Palette santé mentale : lumineuse, apaisante, professionnelle
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg:           #f5f4f0;
  --bg-white:     #ffffff;
  --bg-surface:   #f0eeea;
  --border:       rgba(0,0,0,0.08);
  --border-focus: rgba(74,111,165,0.4);

  --accent:       #4a6fa5;   /* bleu calme, médical */
  --accent-light: #edf2f9;
  --accent-dim:   rgba(74,111,165,0.12);

  --text:         #1c1c28;
  --text-secondary: #6b6b7e;
  --text-tertiary:  #a8a8b8;

  --success:      #2e9e6e;
  --danger:       #c0392b;
  --warning:      #b8860b;

  --radius:       12px;
  --radius-sm:    8px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Layout ---- */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navbar ---- */
.navbar {
  padding: 24px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.navbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.nav-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--accent-light);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ---- Hero ---- */
.hero {
  padding: 64px 0 48px;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -1.2px;
  color: var(--text);
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lead {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 44px;
  font-weight: 400;
}

/* ---- Counter Block ---- */
.counter-block {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.counter-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.counter-value {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
}

.counter-total {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Progress Bar */
.progress-track {
  background: var(--bg-surface);
  border-radius: 3px;
  height: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.75;
}

.counter-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.counter-meta .places-left {
  color: var(--text-secondary);
  font-weight: 500;
}

.counter-meta .places-left.urgent {
  color: var(--warning);
}

/* ---- Buttons ---- */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  letter-spacing: -0.1px;
  box-shadow: 0 2px 8px rgba(74,111,165,0.25);
}

.btn-primary:hover {
  background: #3d5f8f;
  box-shadow: 0 4px 14px rgba(74,111,165,0.35);
}

.btn-outline {
  display: block;
  width: 100%;
  padding: 13px 20px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  background: var(--bg-white);
}

.btn-outline:hover {
  border-color: rgba(0,0,0,0.18);
  color: var(--text);
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 52px 0;
}

/* ---- Features ---- */
.features-section {
  padding-bottom: 52px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.features-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.feature-item {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  transition: background 0.15s;
}

.feature-item:hover {
  background: var(--accent-light);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-item h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.feature-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 400;
}

.feature-index {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ---- Form Section ---- */
.form-section {
  padding-bottom: 80px;
}

.form-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.form-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 5px;
  color: var(--text);
}

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

/* Form fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath stroke='%23a8a8b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
  cursor: pointer;
}

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

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-white);
}

input.error, select.error {
  border-color: var(--danger);
}

.field-error {
  font-size: 0.73rem;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
  cursor: pointer;
  letter-spacing: 0;
  margin-bottom: 0;
}

.checkbox-group label a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
}

/* Global error */
.form-error-global {
  background: #fdf2f2;
  border: 1px solid #f5c6c6;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.82rem;
  padding: 10px 13px;
  margin-bottom: 16px;
  display: none;
}

.form-error-global.visible {
  display: block;
}

/* Submit */
.btn-submit {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  letter-spacing: -0.1px;
  box-shadow: 0 2px 8px rgba(74,111,165,0.25);
}

.btn-submit:hover:not(:disabled) {
  background: #3d5f8f;
  box-shadow: 0 4px 14px rgba(74,111,165,0.35);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .spinner  { display: block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-note {
  font-size: 0.73rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 14px;
  line-height: 1.55;
}

/* ---- Urgency Bar ---- */
.urgency-bar {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.urgency-bar .urgency-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.urgency-bar .urgency-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

/* ---- Footer ---- */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ---- Confirmation Page ---- */
.confirmation-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.confirmation-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--success);
  background: rgba(46,158,110,0.08);
  border: 1px solid rgba(46,158,110,0.2);
  border-radius: 100px;
  padding: 5px 12px;
  margin-bottom: 28px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.confirmation-body h1 {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  line-height: 1.18;
  color: var(--text);
}

.confirmation-body .sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 420px;
  line-height: 1.7;
}

.place-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.place-card .place-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: 5px;
}

.place-card .place-number {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
}

.place-card .place-status {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--success);
  background: rgba(46,158,110,0.08);
  border: 1px solid rgba(46,158,110,0.2);
  padding: 4px 10px;
  border-radius: 100px;
}

.share-block {
  margin-bottom: 20px;
}

.share-block .share-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: 10px;
}

.share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-share:hover {
  border-color: rgba(0,0,0,0.16);
  color: var(--text);
  background: var(--bg-surface);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 24px 20px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Counter update */
@keyframes fadeUp {
  from { opacity: 0.4; transform: translateY(3px); }
  to   { opacity: 1;   transform: translateY(0); }
}

.counter-value.updated {
  animation: fadeUp 0.35s ease forwards;
}
