/* ==========================================================================
   Prix du Nord — page Contact (formulaire, confirmation, coordonnées)
   Propriétés logiques uniquement (RTL prêt). Tokens : css/tokens.css
   ========================================================================== */

.page-contact .main-nav a[aria-current="page"] { color: var(--petrol-900); }
.btn-outline { background: transparent; color: var(--petrol-900); box-shadow: inset 0 0 0 1.5px var(--petrol-700); }
.btn-outline:hover { background: var(--petrol-900); color: var(--on-dark); }

/* ---------- En-tête de page ---------- */
.pg-head {
  position: relative; overflow: hidden;
  background: var(--petrol-900); color: var(--on-dark);
  padding-block: clamp(24px, 3.5vw, 40px) clamp(48px, 6vw, 88px);
}
/* symbole officiel en filigrane clair : image inversée (fond blanc → noir) puis « screen » sur le bleu marine, seul le symbole ressort */
.pg-head-mark {
  position: absolute; inset-inline-end: clamp(-140px, -6vw, -48px); bottom: clamp(-90px, -5vw, -36px);
  width: clamp(220px, 28vw, 420px); aspect-ratio: 720 / 585;
  background: url("../assets/brand/pdn-symbole-hd.webp") center / contain no-repeat;
  filter: invert(1) grayscale(1); mix-blend-mode: screen; opacity: 0.1; pointer-events: none;
}
.pg-head-inner { position: relative; }
.pg-crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 clamp(20px, 3vw, 36px); padding: 0; font-size: var(--fs-xs); color: var(--on-dark-muted); }
.pg-crumbs li:not(:last-child)::after { content: "/"; margin-inline: 8px; opacity: 0.6; }
.pg-crumbs a { color: var(--on-dark-muted); text-decoration: none; }
.pg-crumbs a:hover { color: var(--on-dark); text-decoration: underline; }
.pg-crumbs [aria-current] { color: var(--on-dark); }
.pg-h1 {
  font-family: var(--font-display); font-weight: 680; font-variation-settings: "wdth" var(--wdth-display);
  font-size: clamp(2.2rem, 1.3rem + 3.4vw, 4.25rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 16ch; text-wrap: balance;
}
.pg-h1::after { content: ""; display: block; width: 72px; height: 4px; margin-top: clamp(18px, 2vw, 26px); background: var(--sky-500); }
:lang(ar) .pg-h1 { letter-spacing: 0; line-height: 1.35; }
.pg-lead { margin-top: 18px; max-width: 56ch; font-size: var(--fs-lead); line-height: 1.55; color: var(--on-dark-muted); }

/* ---------- Mise en page ---------- */
.ct-section { padding-block: clamp(40px, 6vw, 96px) var(--section-y); }
.ct-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); align-items: start; }
.ct-panel { grid-column: 1 / span 8; margin-top: calc(-1 * clamp(64px, 8vw, 128px)); position: relative; background: #fff; padding: clamp(24px, 4vw, 56px); box-shadow: 0 1px 0 var(--rule); }
.ct-aside { grid-column: 9 / -1; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1023px) {
  .ct-panel, .ct-aside { grid-column: 1 / -1; }
  .ct-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .ct-panel { margin-top: calc(-1 * clamp(32px, 8vw, 48px)); margin-inline: calc(-1 * var(--gutter) / 2); padding-inline: max(16px, calc(var(--gutter) / 2 + 4px)); }
  .ct-aside { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Formulaire ---------- */
.ct-form-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.ct-h2 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 650; font-variation-settings: "wdth" var(--wdth-heading); line-height: 1.2; }
.ct-req-note { font-size: var(--fs-xs); color: var(--text-muted); }
.ct-star { color: var(--copper-700); font-weight: 700; }
.ct-opt { font-weight: 400; color: var(--text-muted); }

.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(16px, 2vw, 28px); }
.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-field--wide { grid-column: 1 / -1; }
@media (max-width: 599px) { .ct-grid { grid-template-columns: minmax(0, 1fr); } }

.ct-field label { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.ct-field input, .ct-field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid var(--slate-300); border-radius: 0; background: var(--ecru-50); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.45;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.ct-field textarea { min-height: 180px; resize: vertical; }
.ct-field input:hover, .ct-field textarea:hover { border-color: var(--slate-500); }
.ct-field input:focus, .ct-field textarea:focus { border-color: var(--petrol-700); background: #fff; outline: 2px solid var(--copper-400); outline-offset: 1px; }
.ct-field input::placeholder { color: var(--slate-400); }
/* e-mail et téléphone saisis de gauche à droite, alignés comme les autres champs en arabe */
[dir="rtl"] .ct-field input[dir="ltr"] { text-align: end; }.ct-field [aria-invalid="true"] { border-color: var(--copper-700); border-width: 2px; background: #fdf6f0; }
.ct-hint { font-size: var(--fs-xs); color: var(--text-muted); }
.ct-err { display: flex; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--copper-800); }
.ct-err::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-top: 2px; background: var(--copper-700); color: #fff; font-size: 11px; line-height: 1; }
.ct-err[hidden] { display: none; }

/* champ piège : hors écran, jamais visible ni atteignable au clavier */
.ct-hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(24px, 3vw, 36px); padding-top: clamp(20px, 2.5vw, 28px); border-top: 1px solid var(--rule); }
.ct-privacy { flex: 1 1 260px; font-size: var(--fs-xs); color: var(--text-muted); max-width: 52ch; }
.ct-submit { min-width: 220px; }
.ct-submit[aria-disabled="true"] { cursor: progress; background: var(--copper-700); }
.ct-spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; }
.ct-submit.is-busy .ct-spinner { display: inline-block; animation: ct-spin 0.8s linear infinite; }
@keyframes ct-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ct-submit.is-busy .ct-spinner { animation-duration: 2.4s; } }
@media (max-width: 599px) { .ct-submit { width: 100%; } }

/* ---------- Alerte (échec d'envoi ou champs à corriger) ---------- */
.ct-alert { display: flex; gap: 14px; margin-bottom: 24px; padding: 16px 18px; background: #f8e9dc; border-inline-start: 4px solid var(--copper-700); color: var(--ink); }
.ct-alert:focus { outline: none; }
.ct-alert:focus-visible { outline: 2px solid var(--copper-400); outline-offset: 2px; }
.ct-alert[hidden] { display: none; }
.ct-alert-icon { flex: none; width: 24px; height: 24px; color: var(--copper-700); }
.ct-alert-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-alert-text { font-weight: 600; }
.ct-alert-alt { font-size: var(--fs-small); color: var(--ink-soft); }
.ct-alert-alt[hidden] { display: none; }
.ct-alert-alt a { color: var(--petrol-900); font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Confirmation ---------- */
.ct-success { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-block: clamp(8px, 2vw, 24px); }
.ct-success[hidden] { display: none; }
.ct-success-mark { display: grid; place-items: center; width: 64px; height: 64px; background: var(--sky-100); color: var(--petrol-800); --c: 14px; clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c)); }
[dir="rtl"] .ct-success-mark { clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%); }
.ct-success-mark svg { width: 34px; height: 34px; }
.ct-success .ct-h2 { font-size: var(--fs-h2); }
.ct-success .ct-h2:focus { outline: none; }
.ct-success p { max-width: 56ch; color: var(--ink-soft); }
.ct-ref { font-size: var(--fs-small); }
.ct-ref strong { display: inline-block; margin-inline-start: 4px; padding: 2px 10px; background: var(--ecru-100); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.ct-success .btn { margin-top: 8px; }

/* ---------- Coordonnées et conseils ---------- */
.ct-card { background: var(--mist-200); padding: clamp(22px, 2.5vw, 32px); }
.ct-card--tips { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.ct-card-title { font-size: var(--fs-small); font-weight: 650; color: var(--copper-700); margin-bottom: 16px; }
.ct-info { display: flex; flex-direction: column; gap: 16px; }
.ct-info li { display: flex; gap: 12px; align-items: flex-start; }
.ct-info svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--petrol-700); }
.ct-info li > span { display: flex; flex-direction: column; min-width: 0; }
.ct-info-label { font-size: var(--fs-xs); color: var(--text-muted); }
.ct-info a { color: var(--petrol-900); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ct-info a:hover { text-decoration: underline; }
[dir="rtl"] .ct-info a[dir="ltr"] { text-align: end; }
.ct-tips { list-style: none; counter-reset: tip; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-small); color: var(--ink-soft); }
.ct-tips li { counter-increment: tip; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
.ct-tips li::before { content: counter(tip, decimal-leading-zero); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--petrol-700); }
