/* ═══════════════════════════════════════════════════════════
   Operium — page Contact et suivi d'une demande (site public)
   Identité du site (home.css) : fond marine, cartes translucides, accent bleu.
   Contrastes AA au moins sur le fond sombre ; contrôles natifs en thème sombre.
   ═══════════════════════════════════════════════════════════ */

.ct-page {
  --ct-text: #e2e8f0;
  --ct-strong: #f8fafc;
  --ct-muted: #a5b4c8;         /* 8.1:1 sur le fond */
  --ct-subtle: #8a9bb3;        /* 6.0:1 */
  --ct-line: rgba(148, 163, 184, .22);
  --ct-line-strong: rgba(148, 163, 184, .38);
  --ct-field: rgba(2, 6, 23, .55);
  --ct-accent: #3b82f6;
  --ct-accent-soft: rgba(59, 130, 246, .16);
  --ct-ring: 0 0 0 3px rgba(59, 130, 246, .38);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 70vh;
  padding: 128px 24px 96px;
  color: var(--ct-text);
  color-scheme: dark;
}
.ct-page::before {   /* lueur et grille discrètes, comme l'accueil */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(37, 99, 235, .18), transparent 70%),
    radial-gradient(ellipse 50% 35% at 95% 10%, rgba(124, 58, 237, .12), transparent 70%),
    linear-gradient(rgba(37, 99, 235, .05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(37, 99, 235, .05) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, black 0%, black 45%, transparent 85%);
  pointer-events: none;
}

.ct-shell { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); column-gap: 64px; row-gap: 0; align-items: start;
  grid-template-areas: "head panel" "more panel"; }
.ct-shell > .ct-intro-head { grid-area: head; }
.ct-shell > .ct-panel { grid-area: panel; }
.ct-shell > .ct-intro-more { grid-area: more; }
.ct-shell--narrow { max-width: 720px; display: block; }

/* ── Colonne d'introduction ── */
.ct-intro-head { padding-top: 8px; }
.ct-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(37, 99, 235, .15); color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, .3);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 99px; padding: 5px 14px; margin-bottom: 18px;
}
.ct-title { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 900; color: #fff; letter-spacing: -.035em; line-height: 1.08; margin: 0 0 16px; text-wrap: balance; }
.ct-title--sm { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.ct-lead { color: var(--ct-muted); font-size: 1.05rem; line-height: 1.65; margin: 0 0 32px; max-width: 34rem; }

.ct-topics { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 10px; }
.ct-topic { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--ct-line); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.ct-topic-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: var(--ic, #93c5fd); font-size: .95rem; }
.ct-topic-text { min-width: 0; }
.ct-topic-text strong { display: block; color: var(--ct-strong); font-size: .95rem; font-weight: 700; }
.ct-topic-text > span { display: block; color: var(--ct-muted); font-size: .875rem; line-height: 1.5; margin-top: 2px; }

.ct-assure { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ct-assure li { display: flex; gap: 12px; align-items: flex-start; color: var(--ct-text); font-size: .92rem; line-height: 1.55; }
.ct-assure i { color: #34d399; margin-top: 4px; width: 16px; text-align: center; flex-shrink: 0; }
.ct-assure a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }

/* ── Carte du formulaire ── */
.ct-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.ct-panel-head { margin: 0 0 22px; }
.ct-panel-head h2 { color: #fff; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.ct-panel-head p { color: var(--ct-muted); font-size: .9rem; margin: 0; }

.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ct-field { margin: 0 0 18px; min-width: 0; }
.ct-label, .ct-field > label:not(.ct-check), .ct-legend { display: block; color: var(--ct-strong); font-weight: 600; font-size: .9rem; margin: 0 0 7px; }
.ct-optional { color: var(--ct-subtle); font-weight: 500; }
.ct-input {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px;   /* 16 px : pas de zoom automatique sur iOS */
  color: var(--ct-strong); background: var(--ct-field);
  border: 1px solid var(--ct-line-strong); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ct-input::placeholder { color: var(--ct-subtle); opacity: 1; }
.ct-input:hover { border-color: rgba(148, 163, 184, .55); }
.ct-input:focus { outline: none; border-color: var(--ct-accent); box-shadow: var(--ct-ring); background: rgba(2, 6, 23, .75); }
.ct-input[aria-invalid="true"] { border-color: #f87171; }
textarea.ct-input { min-height: 170px; resize: vertical; line-height: 1.6; }
.ct-count { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--ct-subtle); font-size: .8rem; }
.ct-count output { font-variant-numeric: tabular-nums; margin-left: auto; }

/* Sujets : tuiles à choix unique (boutons radio accessibles) */
.ct-choices { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.ct-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-flow: row dense; gap: 8px; }
.ct-choice--wide { grid-column: span 2; }
.ct-choice { position: relative; display: block; cursor: pointer; }
.ct-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ct-choice-box {
  display: flex; align-items: center; gap: 10px; height: 100%; min-height: 52px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--ct-line-strong); background: var(--ct-field);
  color: var(--ct-text); font-size: .875rem; font-weight: 600; line-height: 1.3;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ct-choice-box i { color: var(--ic, #93c5fd); width: 18px; text-align: center; flex-shrink: 0; }
.ct-choice:hover .ct-choice-box { border-color: rgba(148, 163, 184, .6); }
.ct-choice input:checked + .ct-choice-box { border-color: var(--ct-accent); background: var(--ct-accent-soft); color: #fff; box-shadow: inset 0 0 0 1px var(--ct-accent); }
.ct-choice input:focus-visible + .ct-choice-box { box-shadow: var(--ct-ring); }
.ct-choices[aria-invalid="true"] .ct-choice-box { border-color: rgba(248, 113, 113, .7); }

.ct-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--ct-line); border-radius: 12px; background: rgba(255, 255, 255, .02); color: var(--ct-text); font-size: .9rem; line-height: 1.55; cursor: pointer; }
.ct-check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--ct-accent); cursor: pointer; }
.ct-check a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }
.ct-check:has(input[aria-invalid="true"]) { border-color: rgba(248, 113, 113, .7); }

.ct-error { display: flex; gap: 6px; align-items: flex-start; color: #fca5a5; font-size: .85rem; line-height: 1.45; margin: 7px 0 0; }
.ct-error::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8rem; margin-top: 2px; }
.ct-hint { color: var(--ct-muted); font-size: .85rem; line-height: 1.5; margin: 14px 0 0; display: flex; gap: 8px; align-items: flex-start; }
.ct-hint i { color: #93c5fd; margin-top: 3px; }
.ct-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Boutons ── */
.ct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  border: 1px solid var(--ct-accent); background: #2563eb; color: #fff;
  font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.ct-btn:hover { background: #1d4ed8; box-shadow: 0 10px 28px rgba(37, 99, 235, .35); transform: translateY(-1px); }
.ct-btn:focus-visible { outline: none; box-shadow: var(--ct-ring); }
.ct-btn[disabled], .ct-btn[aria-busy="true"] { opacity: .75; cursor: progress; transform: none; box-shadow: none; }
.ct-btn-block { width: 100%; }
.ct-btn-secondary { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: var(--ct-strong); }
.ct-btn-secondary:hover { background: rgba(255, 255, 255, .1); box-shadow: none; }
.ct-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: ct-spin .8s linear infinite; display: none; }
[aria-busy="true"] > .ct-spinner { display: inline-block; }
[aria-busy="true"] > .ct-btn-icon { display: none; }
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* ── Messages ── */
.ct-alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 14px 16px; margin: 0 0 20px; line-height: 1.55; border: 1px solid; font-size: .93rem; }
.ct-alert::before { font-family: "Font Awesome 6 Free"; font-weight: 900; margin-top: 1px; }
.ct-alert-error { background: rgba(239, 68, 68, .12); border-color: rgba(248, 113, 113, .4); color: #fecaca; }
.ct-alert-error::before { content: "\f071"; color: #f87171; }
.ct-alert-ok { background: rgba(16, 185, 129, .12); border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.ct-alert-ok::before { content: "\f058"; color: #34d399; }
.ct-alert-info { background: rgba(59, 130, 246, .12); border-color: rgba(96, 165, 250, .4); color: #bfdbfe; }
.ct-alert-info::before { content: "\f05a"; color: #60a5fa; }
.ct-alert[hidden] { display: none; }

/* ── États (envoyée, lien, confirmation) ── */
.ct-state { text-align: center; padding: 40px 32px; }
.ct-state-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--ct-accent-soft); border: 1px solid rgba(96, 165, 250, .35); color: #93c5fd; }
.ct-state-icon--ok { background: rgba(16, 185, 129, .14); border-color: rgba(52, 211, 153, .4); color: #6ee7b7; }
.ct-state-icon--warn { background: rgba(245, 158, 11, .14); border-color: rgba(251, 191, 36, .4); color: #fcd34d; }
.ct-state-icon--error { background: rgba(239, 68, 68, .14); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }
.ct-state h2 { color: #fff; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; }
.ct-state p { color: var(--ct-muted); line-height: 1.65; margin: 0 auto 8px; max-width: 32rem; }
.ct-state .ct-actions { justify-content: center; }
.ct-loading { display: inline-flex; gap: 10px; align-items: center; color: var(--ct-muted); }
.ct-loading .ct-spinner { display: inline-block; border-color: rgba(147, 197, 253, .3); border-top-color: #93c5fd; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.ct-steps { list-style: none; counter-reset: ct-step; margin: 28px auto 0; padding: 0; max-width: 30rem; text-align: left; display: grid; gap: 14px; }
.ct-steps li { counter-increment: ct-step; display: flex; gap: 14px; align-items: flex-start; color: var(--ct-text); line-height: 1.5; font-size: .93rem; }
.ct-steps li::before { content: counter(ct-step); flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 800; background: rgba(255, 255, 255, .06); border: 1px solid var(--ct-line-strong); color: var(--ct-strong); }
.ct-steps li.is-done::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; background: rgba(16, 185, 129, .16); border-color: rgba(52, 211, 153, .45); color: #6ee7b7; }
.ct-steps strong { color: var(--ct-strong); }

/* ── Suivi : en-tête, conversation, réponse ── */
.ct-back { display: inline-flex; align-items: center; gap: 8px; color: var(--ct-muted); font-size: .9rem; font-weight: 600; margin-bottom: 20px; }
.ct-back:hover { color: #fff; }
.ct-thread-head { margin-bottom: 24px; }
.ct-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--ct-muted); font-size: .88rem; margin-top: 4px; }
.ct-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ct-muted); font-size: .85rem; letter-spacing: .02em; }
.ct-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px; font-size: .78rem; font-weight: 700; border: 1px solid; }
.ct-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ct-badge--new, .ct-badge--in_progress { background: rgba(59, 130, 246, .14); border-color: rgba(96, 165, 250, .4); color: #bfdbfe; }
.ct-badge--waiting_customer { background: rgba(245, 158, 11, .14); border-color: rgba(251, 191, 36, .45); color: #fde68a; }
.ct-badge--resolved { background: rgba(16, 185, 129, .14); border-color: rgba(52, 211, 153, .45); color: #a7f3d0; }
.ct-badge--closed { background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .4); color: #cbd5e1; }

.ct-thread { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ct-msg { display: flex; gap: 12px; align-items: flex-start; }
.ct-msg--me { flex-direction: row-reverse; }
.ct-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--ct-line-strong); color: var(--ct-strong); }
.ct-avatar--team { background: linear-gradient(135deg, #2563eb, #7c3aed); border-color: transparent; color: #fff; }
.ct-bubble { min-width: 0; max-width: min(100%, 36rem); border-radius: 18px; padding: 14px 16px; border: 1px solid var(--ct-line); background: rgba(255, 255, 255, .045); }
.ct-msg--me .ct-bubble { background: rgba(37, 99, 235, .16); border-color: rgba(96, 165, 250, .35); border-top-right-radius: 6px; }
.ct-msg--team .ct-bubble { border-top-left-radius: 6px; }
.ct-bubble-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .8rem; color: var(--ct-subtle); margin-bottom: 6px; }
.ct-bubble-head strong { color: var(--ct-strong); font-size: .86rem; }
.ct-bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--ct-text); }
.ct-files { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ct-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  background: rgba(2, 6, 23, .45); border: 1px solid var(--ct-line-strong); color: var(--ct-strong); font-size: .85rem; }
.ct-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-file:hover { border-color: var(--ct-accent); }
.ct-event { display: flex; justify-content: center; }
.ct-event > span { display: inline-flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--ct-line); color: var(--ct-muted); font-size: .8rem; background: rgba(255, 255, 255, .02); }
.ct-reply-card { margin-top: 8px; }
.ct-reply-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Petits écrans ── */
@media (max-width: 960px) {
  .ct-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "panel" "more"; row-gap: 32px; }
  .ct-lead { margin-bottom: 24px; }
  .ct-topics { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 24px; }
}
@media (max-width: 640px) {
  .ct-page { padding: 104px 16px 72px; }
  .ct-panel { padding: 22px 18px; border-radius: 18px; }
  .ct-row { grid-template-columns: 1fr; gap: 0; }
  .ct-choice-grid { grid-template-columns: 1fr 1fr; }
  .ct-state { padding: 32px 20px; }
  .ct-avatar { width: 30px; height: 30px; font-size: .7rem; }
  .ct-actions .ct-btn, .ct-actions form, .ct-reply-actions .ct-btn { width: 100%; }
}
@media (max-width: 380px) {
  .ct-choice-grid { grid-template-columns: 1fr; }
  .ct-choice--wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-btn, .ct-input, .ct-choice-box { transition: none; }
  .ct-btn:hover { transform: none; }
  .ct-spinner { animation-duration: 2.4s; }
}

/* Texte réservé aux lecteurs d'écran (absent de home.css) */
.ct-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ct-panel > .ct-state { padding: 12px 0 4px; }
.ct-panel > .ct-state[hidden] { display: none; }
