/* Version web du CV : complète site.css */

/* ---------- En-tête du CV ---------- */
.cv-intro .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 72px);
}
.cv-intro-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cv-intro h1 { font-size: var(--step-4); }
.cv-role {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--brand);
}
.cv-lead { color: var(--muted); max-width: 40em; }
/* Icône pleine de document, format du fichier évidé dans la couleur du fond */
.file-icon { flex: none; margin-block: -5px; fill: currentColor; }
.file-icon .fold { opacity: .55; }
.file-icon text {
  font-family: var(--mono);
  font-weight: 500;
  fill: var(--ground);
}
/* Texte lu par les lecteurs d'écran seulement : le format est porté par l'icône */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cv-intro .card-sheet dd a { text-decoration: none; }
.cv-intro .card-sheet dd a:hover { text-decoration: underline; }

/* ---------- Profil ---------- */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.cv-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cv-card h3 { font-size: var(--step-1); }
.cv-list {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 4px;
}
.cv-list li::marker { color: var(--brand-soft); }

/* ---------- Missions et formation ---------- */
/* Une fiche encadrée, une ligne par mission : période à gauche, détail à droite */
.missions {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.mission {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 6px 28px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.mission:last-child { border-bottom: 0; }
.mission-when {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink);
  padding-top: 3px;
}
.mission-when span {
  display: block;
  color: var(--muted);
}
.mission-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 48em;
}
.mission-body h3 { font-size: var(--step-1); }
.mission-where {
  font-weight: 500;
  color: var(--brand);
  margin-top: -4px;
}
.mission-body ul {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 4px;
}
.mission-body li::marker { color: var(--brand-soft); }
/* Mots-clés en badges à contour, pour les distinguer des étiquettes pleines du profil */
.mission-kw {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.mission-kw span {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
}

/* Missions anciennes repliées */
.missions-more { margin-top: 16px; }
.missions-more summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--display);
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}
.missions-more summary::-webkit-details-marker { display: none; }
.missions-more summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.missions-more[open] summary::before { transform: rotate(45deg); }
.missions-more summary span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--muted);
}
.missions-more summary:hover { background: var(--brand-wash); }
.missions-more summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.missions-more[open] summary { margin-bottom: 16px; }

/* ---------- Frise de carrière ---------- */
/* SVG produit par cv/frise.py et intégré à la page pour suivre le thème :
   textes et axe aux couleurs du site, une couleur par client (classe du client
   dans le script). Sur petit écran, la frise défile dans son cadre. */
.frise {
  --fr-bee: #d49a12;
  --fr-eat: #245b8f;
  --fr-ros: #7d5ba6;
  margin: 0 0 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.frise-scroll { overflow-x: auto; padding: 12px 16px 8px; }
.frise svg { display: block; width: 100%; min-width: 720px; height: auto; }
.frise .lbl { font: 500 13px var(--display); fill: var(--ink); }
.frise .sub { font: 400 11px var(--body); fill: var(--muted); }
.frise .yr { font: 400 11px var(--mono); fill: var(--muted); }
/* Axe des années en plan de métro : trait épais, une station pleine par année */
.frise .axis { stroke: var(--line-strong); stroke-width: 2; }
.frise .tick { fill: var(--line-strong); }
.frise .bee { fill: var(--fr-bee); }
.frise .alv { fill: #c4513a; }
.frise .eat { fill: var(--fr-eat); }
.frise .sch { fill: #3f9a4a; }
.frise .ros { fill: var(--fr-ros); }
.frise .fls { fill: #d0648c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .frise { --fr-bee: #c28a0e; --fr-eat: #4a7fc0; --fr-ros: #8a68b8; }
}
:root[data-theme="dark"] .frise { --fr-bee: #c28a0e; --fr-eat: #4a7fc0; --fr-ros: #8a68b8; }

/* ---------- Questions sur le parcours ---------- */
button.btn { font-family: inherit; cursor: pointer; }
button.btn:disabled { opacity: .6; cursor: wait; }
.ask {
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden; /* seul le fil des échanges défile */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -24px rgba(0, 50, 97, .5);
}
.ask[open] { display: flex; flex-direction: column; }
.ask::backdrop { background: rgba(6, 17, 29, .55); }
.ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
}
.ask-head h2 { font-size: var(--step-1); }
.ask-close {
  display: grid;
  place-items: center;
  padding: 6px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.ask-close:hover { color: var(--brand); background: var(--brand-wash); }
.ask-thread {
  flex: 1 1 auto;
  min-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.ask-intro { color: var(--muted); }
.ask-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ask-examples button {
  padding: 6px 12px;
  font: inherit;
  font-size: var(--step--1);
  color: var(--brand);
  background: var(--brand-wash);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.ask-examples button:hover { border-color: var(--brand-soft); }
/* Question du visiteur à droite, réponse encadrée à gauche */
.ask-q {
  align-self: flex-end;
  max-width: 85%;
  padding: 10px 14px;
  background: var(--brand-wash);
  border-radius: var(--radius);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.ask-a {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  padding: 14px 16px;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ask-a p { white-space: pre-line; }
.ask-a ul { margin: 0; padding-left: 1.2em; }
.ask-a .actions { padding-top: 2px; }
/* Attente : une puce dont l'opacité pulse devant « Réponse en cours… » */
.ask-a[aria-busy="true"] { flex-direction: row; align-items: center; color: var(--muted); font-style: italic; }
.ask-a[aria-busy="true"]::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: ask-pulse 1.2s ease-in-out infinite;
}
@keyframes ask-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}
@media (prefers-reduced-motion: reduce) {
  .ask-a[aria-busy="true"]::before { animation: none; opacity: .6; }
}
.ask-error { border-color: var(--line-strong); color: var(--muted); }
.ask-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--line);
}
.ask-form label { font-weight: 600; font-size: var(--step--1); }
.ask-field { display: flex; gap: 10px; align-items: flex-end; }
.ask-field textarea {
  flex: 1;
  min-width: 0;
  min-height: 3.2em;
  max-height: 10em;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  resize: vertical;
}
.ask-field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ask-note { font-size: var(--step--1); color: var(--muted); }

/* ---------- Réactivité ---------- */
@media (max-width: 900px) {
  .cv-intro .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mission { grid-template-columns: 1fr; padding: 20px 16px; }
  .mission-when span { display: inline; }
  .mission-when span::before { content: " · "; }
  .missions-more summary { padding-inline: 16px; }
}

/* ---------- Impression ---------- */
/* Couleurs du thème clair, sans en-tête, pied de page ni boutons */
@media print {
  :root, :root[data-theme="dark"] {
    --ground: #fff;
    --surface: #fff;
    --ink: #102539;
    --muted: #4d6177;
    --line: #d2deea;
    --line-strong: #a3bcdc;
    --brand: #245b8f;
    --brand-deep: #003261;
    --brand-soft: #5a88c0;
    --brand-wash: #e6eef7;
  }
  body { font-size: 10.5pt; line-height: 1.45; }
  .site-header, .site-footer, .cv-intro .actions, .missions-more summary { display: none; }
  .cv-intro .wrap { grid-template-columns: 1.4fr 1fr; padding-block: 0 16px; }
  .section { padding-block: 16px; }
  .section-flush { padding-top: 0; }
  .section-head { margin-bottom: 12px; }
  .wrap { max-width: none; padding-inline: 0; }
  .card-sheet, .cv-card, .missions { box-shadow: none; }
  :root:not([data-theme="light"]) .frise, :root[data-theme="dark"] .frise { --fr-bee: #d49a12; --fr-eat: #245b8f; --fr-ros: #7d5ba6; }
  .frise { break-inside: avoid; }
  .frise svg { min-width: 0; }
  .cv-card, .mission { break-inside: avoid; }
  .mission { padding: 12px 16px; }
  .missions-more { margin-top: 0; }
  .missions-more .missions { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
  a { color: inherit; text-decoration: none; }
}
