/* ── Variables ── */
:root {
  --blue-vivid:  #0BBBEF;
  --blue-main:   #0087CC;
  --blue-dark:   #463F5F;
  --blue-pale:   #e8f6fd;
  --blue-light:  #f0f9ff;
  --border:      #d1e9f7;
  --border-mid:  #b3d9f0;
  --text:        #1a2333;
  --text-mid:    #3d4f63;
  --text-muted:  #6b7f96;
  --bg:          #ffffff;
  --surface:     #f7fbfe;
  --surface-alt: #edf6fc;
  --success:     #059669;
  --warn:        #d97706;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,135,204,.08), 0 1px 2px rgba(0,135,204,.06);
  --shadow-md:   0 4px 16px rgba(0,135,204,.10), 0 2px 6px rgba(0,135,204,.07);
  --shadow-lg:   0 8px 32px rgba(0,135,204,.13), 0 4px 12px rgba(0,135,204,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Layout ── */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Header bande supérieure ── */
.top-bar {
  background: var(--blue-dark);
  height: 4px;
  width: 100%;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 0;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.logo-icon {
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: #fff;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.logo-text { line-height: 1.2; }

.logo-title {
  font-family: 'Outfit', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--blue-dark);
  letter-spacing: .01em;
}

.logo-sub {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 300;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.fed-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--blue-pale);
  color: var(--blue-main);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .8rem .25rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fed-chip svg {
  width: 13px; height: 13px;
  fill: none; stroke: var(--blue-main);
  stroke-width: 2; stroke-linecap: round;
}

/* ── Main container ── */
main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
  animation: fadeUp .4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero erreur ── */
.error-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.error-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.error-icon-wrap {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-top: .1rem;
}

.error-icon-wrap svg {
  width: 24px; height: 24px;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.error-hero-content { flex: 1; }

.error-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .15rem .55rem;
  margin-bottom: .5rem;
  font-family: 'Outfit', monospace;
}

.error-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .35rem;
  line-height: 1.25;
}

.error-summary {
  font-size: .95rem;
  color: var(--text-mid);
  font-weight: 300;
}

/* ── Cards ── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.card-head svg {
  width: 16px; height: 16px;
  fill: none; stroke: var(--blue-main);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.card-head-title {
  font-family: 'Outfit', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.card-body { 
  padding-top: 0.4rem; 
  padding-left: 0.7rem; 
  padding-right: 0.4rem; 
  padding-bottom: 0.4rem; 
}

/* ── Explication ── */
.explanation {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 1.25rem;
}

.explanation strong { color: var(--text); font-weight: 600; }

.steps-title {
  font-family: 'Outfit', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .75rem;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 1rem;
}

.steps-list li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: .9rem;
  color: var(--text-mid);
}

.step-num {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-pale);
  border: 1.5px solid var(--blue-vivid);
  color: var(--blue-main);
  font-family: 'Outfit', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  display: grid; place-items: center;
}

/* ── Détails techniques ── */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.detail-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.detail-table td {
  padding: .4rem 0rem;
}

.detail-table td:first-child {
  white-space: nowrap;
  width: 200px;
  color: var(--text-muted);
  font-weight: 400;
  font-size: .82rem;
  padding-right: 1rem;
}

.detail-table td:first-child::after {
  content: ' ';
}

.detail-val {
  font-family: 'Outfit', monospace;
  font-size: .8rem;
  color: var(--blue-dark);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .2rem .55rem;
  display: inline-block;
  word-break: break-all;
}

.detail-val.empty {
  color: var(--text-muted);
  background: var(--surface);
  border-style: dashed;
  font-style: italic;
  font-family: 'Source Sans 3', sans-serif;
  font-size: .8rem;
}

/* ── Timestamp row ── */
.ts-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-size: .8rem;
  color: var(--text-muted);
}

.ts-row svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--blue-vivid);
  stroke-width: 2; flex-shrink: 0;
}

/* ── Actions ── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.3rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .18s;
  letter-spacing: .01em;
}

.btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.btn-mail {
  background: linear-gradient(135deg, var(--blue-vivid), var(--blue-main));
  color: #fff;
  box-shadow: 0 2px 10px rgba(11,187,239,.3);
}

.btn-mail:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(11,187,239,.4);
}

.btn-previous {
  background: #fff;
  color: var(--blue-main);
  border: 1.5px solid var(--border-mid);
}

.btn-previous:hover {
  background: var(--blue-pale);
  border-color: var(--blue-vivid);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  font-size: .82rem;
  padding: .5rem 1rem;
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

/* ── Info box REFEDS ── */
.info-refeds {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--blue-light);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue-vivid);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: .82rem;
  color: var(--text-mid);
}

.info-refeds svg {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: .15rem;
  fill: none; stroke: var(--blue-main); stroke-width: 2;
}

.info-refeds a { color: var(--blue-main); }

/* ── Responsive ── */
@media (max-width: 600px) {
  main { padding: 1.5rem 1rem 3rem; }
  .error-hero { padding: 1.25rem; gap: 1rem; }
  .error-title { font-size: 1.2rem; }
  .detail-table td:first-child { width: 130px; }
  .header-inner { padding: .7rem 0; }
  .fed-chip span { display: none; }
}

/* ── Fonts ── */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/outfit-v15-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/outfit-v15-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/outfit-v15-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/outfit-v15-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/outfit-v15-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/source-sans-3-v19-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  src: url('fonts/source-sans-3-v19-latin-300italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/source-sans-3-v19-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/source-sans-3-v19-latin-600.woff2') format('woff2');
}
