/*
 * StreamNovo — page Contact (page claire), v1.6. Tokens du design system v2 uniquement.
 * Règles de cette page :
 * - Le corail est réservé à 3 usages : le bouton d'envoi, la pastille sélectionnée et la barre du titre principal (h1).
 *   Tout le reste est encre ou gris doux.
 * - Le relief vient des surfaces (blanc franc + ombre très légère), pas des cadres : presque aucun trait.
 * - Capitales condensées uniquement pour les titres (h1, h2, confirmation d'envoi). Le reste en minuscules, en Barlow.
 * Sommaire : 1. En-tête  2. Messageries  3. Email  4. Footer  5. Écrans plus petits
 */

/* Tokens --carte, --relief, --relief-fort et barre des h2 en encre : communs aux pages claires, voir light.css. */

/* 1. En-tête (le badge « Support online » est le composant .sn-badge commun, voir light.css) */
.contact-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.contact-intro .lede { margin-top: 20px; }
.contact-facts { display: grid; gap: 10px; list-style: none; margin: 28px 0 0; padding: 0; font-size: 16px; line-height: 24px; color: var(--encre-douce); }
.contact-facts li { position: relative; padding-left: 16px; }
.contact-facts li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--encre); }
.contact-facts strong { color: var(--encre); }

/* 2. Messageries : cartes blanches en relief, sans bordure ; QR code intégré sur ordinateur */
.channels { display: grid; gap: 16px; }
.channel { display: flex; align-items: center; gap: 20px; min-height: 120px; padding: 24px 28px; background: var(--carte); border-radius: var(--r-md); box-shadow: var(--relief); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.channel:hover { box-shadow: var(--relief-fort); transform: translateY(-1px); }
.channel:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; }
.channel > svg { flex: none; width: 44px; height: 44px; }
.channel-text { display: grid; gap: 4px; min-width: 0; }
.channel-text b { font: 700 24px/30px var(--font-texte); }
.channel-text small { font-size: 15px; line-height: 21px; color: var(--encre-douce); }
.channel-go { margin-left: auto; font: 400 26px/1 var(--font-texte); color: var(--encre-douce); transition: transform .2s, color .2s; }
.channel:hover .channel-go { transform: translateX(4px); color: var(--encre); }
.channel-qr { display: none; }
@media (min-width: 961px) and (hover: hover) {
  .channel-qr:not([hidden]) { display: grid; justify-items: center; gap: 8px; margin-left: auto; }
  .channel-go:has(~ .channel-qr:not([hidden])) { display: none; }
  .channel-qr-img { display: block; width: 76px; height: 76px; }
  .channel-qr-img svg { display: block; width: 100%; height: 100%; }
  .channel-qr-img svg path { fill: var(--encre); }
  .channel-qr small { font-size: 12px; line-height: 14px; color: var(--encre-douce); white-space: nowrap; }
}

/* 3. Email */
#email-us .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); column-gap: 64px; align-items: start; }
.cf-side { position: sticky; top: 104px; }
.cf-next { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 22px; counter-reset: n; }
.cf-next li { counter-increment: n; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
.cf-next li::before { content: counter(n, decimal-leading-zero); grid-row: span 2; font: 800 26px/26px var(--font-titre); color: var(--encre-douce); }
.cf-next h3 { margin: 0 0 4px; font: 700 18px/24px var(--font-texte); }
.cf-next p { margin: 0; font-size: 15px; line-height: 22px; }

.cf-card { padding: 40px; background: var(--carte); border-radius: var(--r-md); box-shadow: var(--relief); }
.cf { display: grid; gap: 26px; }
.cf[hidden], .cf-done[hidden], .cf-extra[hidden], .cf-field[hidden] { display: none; }
.cf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-topics { margin: 0; padding: 0; border: 0; min-width: 0; }
.cf-topics legend, .cf-field label { display: block; padding: 0; margin-bottom: 10px; font: 600 15px/20px var(--font-texte); color: var(--encre); }
.cf-field label span { margin-left: 8px; font-weight: 400; font-size: 14px; color: var(--encre-douce); }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-chips input { position: absolute; opacity: 0; pointer-events: none; }
.cf-chips label { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; background: var(--carte); border: 1px solid rgba(16,19,28,.18); border-radius: var(--r-sm); font: 500 15px/1 var(--font-texte); color: var(--encre); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.cf-chips input:not(:checked) + label:hover { border-color: var(--encre); }
.cf-chips input:checked + label { background: var(--direct); border-color: var(--direct); color: var(--sur-direct); font-weight: 600; }
.cf-chips input:focus-visible + label { outline: 2px solid var(--encre); outline-offset: 2px; }
.cf-hint { margin: 12px 0 0; font-size: 15px; line-height: 22px; color: var(--encre-douce); }
.cf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cf-field { margin: 0; min-width: 0; }
.cf-field input, .cf-field textarea { display: block; width: 100%; padding: 12px 14px; background: var(--carte); border: 1px solid rgba(16,19,28,.22); border-radius: var(--r-sm); color: var(--encre); font: 400 17px/24px var(--font-texte); transition: border-color .15s, box-shadow .15s; }
.cf-field input { height: 50px; }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: rgba(85,91,105,.7); }
.cf-field textarea { resize: vertical; min-height: 150px; }
.cf-field input:hover, .cf-field textarea:hover { border-color: rgba(16,19,28,.45); }
.cf-field input:focus, .cf-field textarea:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); }
.cf-field [aria-invalid] { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); }
.cf-msg { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--encre); }
.cf-msg::before, .cf-error::before { content: "!"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--encre); color: var(--carte); font: 700 11px/1 var(--font-texte); }
.cf-msg[hidden], .cf-error[hidden] { display: none; }
.cf-error { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; background: var(--papier); border-radius: var(--r-sm); font-weight: 600; }
.cf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 4px; }
.cf-privacy { font-size: 14px; line-height: 21px; }
.cf-privacy a { color: var(--encre); text-underline-offset: 4px; }
.cf .btn { min-width: 200px; height: 50px; }
.cf .btn:disabled { opacity: .6; cursor: progress; }

.cf-done { display: grid; gap: 12px; justify-items: start; }
.cf-done:focus { outline: none; }
.cf-done-title { margin: 0; font: 800 44px/44px var(--font-titre); text-transform: uppercase; }
.cf-done-title::before { content: ""; display: block; width: 48px; height: 4px; background: var(--encre); margin-bottom: 20px; }
.cf-done-ref { margin: 0; font-size: 15px; line-height: 20px; color: var(--encre-douce); }
.cf-done-ref b { display: block; margin-top: 4px; font: 800 34px/36px var(--font-titre); letter-spacing: .02em; color: var(--encre); font-variant-numeric: tabular-nums; }
.cf-done .muted { max-width: 34em; }
.cf-done .text-link { color: var(--encre); font: 600 16px/22px var(--font-texte); letter-spacing: 0; text-transform: none; }

/* 4. Footer : la colonne Contact répéterait les messageries */
.sn-contact .foot-grid > div:nth-child(4) { display: none; }
.sn-contact .foot-grid { grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); }

/* Aucune messagerie configurée : l'en-tête passe sur une colonne et ne parle pas de chat */
.contact-top:not(:has(.channel)) { grid-template-columns: minmax(0, 1fr); }
.contact-top:not(:has(.channel)) .channels, .contact-top:not(:has(.channel)) .if-chat { display: none; }
body:not(:has(.channel)) #contact { padding-bottom: 0; }
body:not(:has(.channel)) #email-us { padding-top: 56px; }

/* 5. Écrans plus petits */
@media (max-width: 960px) {
  .contact-top, #email-us .wrap { grid-template-columns: 1fr; gap: 40px; }
  .sn-contact .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* le formulaire vient juste après le titre, les étapes « What happens next » en dessous */
  #email-us .wrap { row-gap: 0; }
  .cf-side { display: contents; }
  #email-us h2 { order: 1; margin-bottom: 28px; }
  #email-us .cf-card { order: 2; }
  .cf-next { order: 3; margin-top: 36px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 760px) {
  .cf-row { grid-template-columns: 1fr; }
  .cf-next { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 600px) {
  .contact-facts { margin-top: 22px; font-size: 15px; }
  .channel { min-height: 0; padding: 18px; gap: 16px; }
  .channel > svg { width: 34px; height: 34px; }
  .channel-text b { font-size: 21px; line-height: 26px; }
  .channel-text small { font-size: 14px; line-height: 19px; }
  .cf-card { padding: 26px 18px; }
  .cf-chips label { height: 38px; padding: 0 13px; font-size: 14px; }
  .cf-foot .btn { flex: 1 1 100%; }
  .cf-done-title { font-size: 36px; line-height: 36px; }
  body:not(:has(.channel)) #email-us { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .channel, .channel-go, .cf-chips label, .cf-field input, .cf-field textarea { transition: none; }
  .channel:hover { transform: none; }
}
