/* Contact, commun à toutes les pages : la fenêtre « Demander un appel » (réserver un créneau, WhatsApp ou
   formulaire envoyé par e-mail) et le bouton WhatsApp fixé en bas à droite. Reprend les couleurs de la page. */

/* Bouton WhatsApp fixe */
.rc-whatsapp { position: fixed; right: clamp(1rem, 2.5vw, 1.75rem); bottom: clamp(1rem, 2.5vw, 1.75rem); z-index: 40; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--ink, #1c1c1e); color: #25d366; box-shadow: 0 0 0 1px rgb(253 252 251 / 0.12), 0 14px 30px -12px rgb(20 14 10 / 0.6); transition: transform 0.5s var(--ease, ease), opacity 0.4s var(--ease, ease), visibility 0s, background-color 0.3s; }
.rc-whatsapp:hover { background: #34322f; transform: translateY(-3px); }
.rc-whatsapp svg { width: 1.625rem; height: 1.625rem; }
.rc-whatsapp.is-away { opacity: 0; visibility: hidden; transform: translateY(1rem); transition: transform 0.5s var(--ease, ease), opacity 0.4s var(--ease, ease), visibility 0s linear 0.5s; }
.rc-whatsapp:focus-visible { outline: 2px solid var(--copper, #9e6044); outline-offset: 3px; }

/* Fenêtre */
html.rc-lock { overflow: hidden; }
.rc-dialog { width: min(100% - 2rem, 42rem); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 0; border-radius: 10px; background: var(--paper, #f7f5f4); color: var(--ink, #1c1c1e); font-family: var(--font, "Manrope", Arial, sans-serif); line-height: 1.5; overscroll-behavior: contain; box-shadow: 0 40px 90px -30px rgb(20 14 10 / 0.55); }
.rc-dialog::backdrop { background: rgb(18 16 14 / 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rc-dialog[open] { animation: rc-in 0.5s var(--ease, ease) both; }
.rc-dialog[open]::backdrop { animation: rc-fade 0.4s ease both; }
@keyframes rc-in { from { opacity: 0; transform: translateY(1.5rem) scale(0.98); } }
@keyframes rc-fade { from { opacity: 0; } }

.rc-dialog [hidden] { display: none !important; }
.rc-panel { position: relative; padding: clamp(1.5rem, 4vw, 2.75rem); }
.rc-close { position: absolute; top: 0.875rem; right: 0.875rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: var(--ink-2, #57544f); transition: background-color 0.3s, color 0.3s; }
.rc-close:hover { background: var(--chip, #e8e5e2); color: var(--ink, #1c1c1e); }
.rc-close svg { width: 1rem; height: 1rem; }

.rc-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.5rem; border-radius: 3px; background: var(--chip, #e8e5e2); color: var(--chip-ink, #66625d); font-family: var(--mono, ui-monospace, monospace); font-size: 0.6875rem; line-height: 1.5; }
.rc-chip::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.rc-title { margin-top: 1rem; padding-right: 2.5rem; font-size: clamp(2rem, 1.4rem + 2.4vw, 2.875rem); font-weight: 600; line-height: 1; letter-spacing: -0.05em; text-wrap: balance; }
.rc-title span { color: var(--copper, #9e6044); }
.rc-lead { margin-top: 1rem; max-width: 32rem; color: var(--ink-2, #57544f); font-size: 1rem; text-wrap: pretty; }

/* Les deux voies directes */
.rc-quick { display: grid; gap: 0.75rem; margin-top: 1.75rem; }
.rc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem; min-height: 3.25rem; padding-inline: 1.25rem; border-radius: 4px; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; transition: background-color 0.3s var(--ease, ease), border-color 0.3s, color 0.3s; }
.rc-btn svg { flex: none; width: 1.125rem; height: 1.125rem; }
.rc-btn-copper { background: var(--copper, #9e6044); color: var(--white, #fdfcfb); }
.rc-btn-copper:hover { background: var(--copper-hover, #87503a); }
.rc-btn-line { border: 1px solid var(--line, #e2dfdb); background: var(--white, #fdfcfb); color: var(--ink, #1c1c1e); }
.rc-btn-line:hover { border-color: var(--ink, #1c1c1e); }
.rc-btn-line svg { color: #1da851; }
.rc-btn-ink { background: var(--ink, #1c1c1e); color: var(--white, #fdfcfb); }
.rc-btn-ink:hover { background: #34322f; }
.rc-btn[disabled] { opacity: 0.6; cursor: progress; }

.rc-or { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; font-family: var(--mono, ui-monospace, monospace); font-size: 0.6875rem; color: var(--chip-ink, #66625d); white-space: nowrap; }
.rc-or::before, .rc-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #e2dfdb); }

/* Formulaire */
.rc-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.rc-row { display: grid; gap: 1rem; }
.rc-field { display: grid; gap: 0.375rem; min-width: 0; }
.rc-field label { font-size: 0.8125rem; font-weight: 600; }
.rc-field label small { font-weight: 400; color: var(--ink-3, #75716c); font-size: inherit; }
.rc-field input, .rc-field textarea { width: 100%; min-height: 3rem; padding: 0.75rem 0.875rem; border: 1px solid var(--line, #e2dfdb); border-radius: 4px; background: var(--white, #fdfcfb); color: var(--ink, #1c1c1e); font: inherit; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.rc-field textarea { min-height: 6.5rem; resize: vertical; }
.rc-field input::placeholder, .rc-field textarea::placeholder { color: var(--ink-3, #75716c); opacity: 0.8; }
.rc-field input:hover, .rc-field textarea:hover { border-color: #cfcac4; }
.rc-field input:focus, .rc-field textarea:focus { outline: none; border-color: var(--copper, #9e6044); box-shadow: 0 0 0 3px rgb(158 96 68 / 0.16); }
.rc-field [aria-invalid="true"] { border-color: #b3261e; }
.rc-error { font-size: 0.8125rem; color: #b3261e; }
.rc-error:empty { display: none; }
.rc-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rc-send { display: grid; gap: 0.875rem; margin-top: 0.5rem; }
.rc-note { font-size: 0.8125rem; color: var(--ink-3, #75716c); }
.rc-note a { text-decoration: underline; text-underline-offset: 2px; }
.rc-status { padding: 0.875rem 1rem; border-radius: 4px; background: #f6e7e5; color: #7f1d17; font-size: 0.875rem; }
.rc-status:empty { display: none; }
.rc-status a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Demande envoyée */
.rc-done { margin-top: 1.75rem; padding: 1.5rem; border-radius: 6px; background: var(--card, #eeebe8); }
.rc-done-title { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.rc-done p { margin-top: 0.5rem; color: var(--ink-2, #57544f); }
.rc-done .rc-btn { margin-top: 1.25rem; }

.rc-dialog :focus-visible { outline: 2px solid var(--copper, #9e6044); outline-offset: 3px; }

@media (min-width: 36rem) {
  .rc-quick { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .rc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-send { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 1.25rem; }
}

/* Sur téléphone, la fenêtre occupe tout l'écran et défile. */
@media (max-width: 35.99rem) {
  .rc-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .rc-dialog[open] { animation-name: rc-up; }
  @keyframes rc-up { from { transform: translateY(2.5rem); opacity: 0; } }
  .rc-btn { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-dialog[open], .rc-dialog[open]::backdrop { animation: none; }
  .rc-whatsapp, .rc-whatsapp.is-away { transition: none; }
}
