/* ==========================================================================
   v4 « studio gris » — pages.css (agent PAGES)
   Pages internes : À propos, Projets, CV + modale projets (#project-modal).
   Surcharge main.css (sections 12 à 16) ; tout est scopé sous .pg / .pg--* ou .modal.
   ========================================================================== */

/* ---------- Jetons locaux ---------- */
.pg,
.modal {
  --pg-ink-grad: linear-gradient(150deg, var(--ink-2) 0%, var(--ink) 62%, #0d1324 100%);
  --pg-line: rgba(17, 23, 42, 0.12);
  --pg-hair: rgba(255, 255, 255, 0.55);
  --pg-glass-blur: saturate(140%) blur(14px);
  --pg-bar: linear-gradient(90deg, var(--ink) 0%, var(--accent-2) 100%);
}

/* ==========================================================================
   A. En-tête de page éditorial (fil d'Ariane mono + grand titre)
   ========================================================================== */
.pg-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.pg-crumbs::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(19, 27, 49, 0.12);
}
.pg-crumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.pg-crumbs a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.pg-crumbs__sep { opacity: 0.5; }
.pg-crumbs [aria-current] { color: var(--ink); font-weight: 500; }

.pg-head__kicker {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.pg-head__kicker::before { content: "// "; opacity: 0.6; }

.pg .pg-head__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: balance;
}
.pg-head__lead {
  max-width: 600px;
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.22rem);
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   B. Page À propos
   ========================================================================== */
.pg--apropos { max-width: 1120px; padding-top: clamp(36px, 6vw, 72px); }

/* En-tête : texte à gauche, portrait encadré à droite */
.pg--apropos .apropos__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(24px, 5vw, 64px);
  margin-bottom: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--pg-line);
  position: relative;
}
.pg--apropos .apropos__hero::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 96px; height: 2px;
  background: var(--ink);
}
.pg--apropos .apropos__header { min-width: 0; }
.pg--apropos .apropos__title {
  display: block;
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.pg--apropos .apropos__subtitle {
  display: inline-block;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--pg-hair);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: var(--pg-glass-blur);
  backdrop-filter: var(--pg-glass-blur);
}

/* Portrait : cadre papier + bloc encre décalé */
.pg .apropos__photo { position: relative; isolation: isolate; }
.pg .apropos__photo::before {
  content: "";
  position: absolute;
  inset: 18px 18px -18px -18px;
  z-index: -1;
  border-radius: 24px;
  background: var(--pg-ink-grad);
  box-shadow: var(--shadow);
}
.pg .apropos__portrait {
  display: block;
  width: clamp(150px, 20vw, 220px);
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 22px;
  border: 6px solid var(--paper);
  box-shadow: var(--shadow-lg);
}

/* Sections : grille éditoriale titre / contenu, numérotées */
.pg--apropos .apropos__content {
  counter-reset: pg-sec;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pg--apropos .apropos__section {
  counter-increment: pg-sec;
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 56px);
  padding: clamp(28px, 4vw, 48px) 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--pg-line);
  border-radius: 0;
  box-shadow: none;
}
.pg--apropos .apropos__section:first-child { border-top: 0; padding-top: 0; }
.pg--apropos .apropos__section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.pg--apropos .apropos__section-title::before {
  content: counter(pg-sec, decimal-leading-zero) " —";
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}
.pg--apropos .apropos__text { line-height: 1.8; color: var(--text); }
.pg--apropos .apropos__section:first-child .apropos__text {
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.28rem);
  line-height: 1.75;
}

/* Panneaux verre dépoli réutilisés */
.pg--apropos .apropos__skill-card,
.pg--apropos .apropos__experience-card,
.pg--apropos .apropos__interest-item,
.pg--apropos .apropos__timeline-content {
  position: relative;
  padding: clamp(18px, 2.4vw, 24px);
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--pg-hair);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, var(--shadow-sm);
  -webkit-backdrop-filter: var(--pg-glass-blur);
  backdrop-filter: var(--pg-glass-blur);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s;
}
@media (hover: hover) {
  .pg--apropos .apropos__skill-card:hover,
  .pg--apropos .apropos__experience-card:hover,
  .pg--apropos .apropos__interest-item:hover,
  .pg--apropos .apropos__timeline-content:hover {
    transform: translateY(-2px);
    background: var(--glass-strong);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, var(--shadow);
  }
}

/* Timeline du parcours */
.pg--apropos .apropos__timeline { gap: 18px; padding-left: 40px; }
.pg--apropos .apropos__timeline::before {
  left: 11px; top: 22px; bottom: 22px;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 11px);
  opacity: 0.45;
}
.pg--apropos .apropos__timeline-marker {
  left: -40px; top: 22px;
  width: 23px; height: 23px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 5px rgba(242, 241, 244, 0.5);
}
.pg--apropos .apropos__timeline-marker::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.pg--apropos .apropos__timeline-item:not(:first-child) .apropos__timeline-marker::after {
  background: transparent;
  border: 1.5px solid var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  .pg--apropos .apropos__timeline-item:first-child .apropos__timeline-marker::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid var(--ink);
    animation: pg-ping 2.6s var(--ease) infinite;
  }
}
@keyframes pg-ping {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(1.9); opacity: 0; }
}
.pg--apropos .apropos__timeline-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
}
.pg--apropos .apropos__timeline-content > * { grid-column: 1; }
.pg--apropos .apropos__timeline-content h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pg--apropos .apropos__timeline-date {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 2px 0 0;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--on-ink);
  background: var(--ink);
}
.pg--apropos .apropos__timeline-item:not(:first-child) .apropos__timeline-date {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.pg--apropos .apropos__timeline-content p { margin: 0 0 4px; }
.pg--apropos .apropos__timeline-content p:nth-of-type(2) {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-2);
}
.pg--apropos .apropos__timeline-content p:last-child { margin: 8px 0 0; }

/* Compétences */
.pg--apropos .apropos__skills {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}
.pg--apropos .apropos__skill-card { display: flex; flex-direction: column; }
.pg--apropos .apropos__skill-icon,
.pg--apropos .apropos__interest-icon {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  font-size: 1.35rem;
  background: var(--pg-ink-grad);
  box-shadow: 0 8px 18px -10px rgba(19, 27, 49, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.pg--apropos .apropos__skill-card h3,
.pg--apropos .apropos__experience-card h3,
.pg--apropos .apropos__interest-item h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pg--apropos .apropos__skill-header { margin-bottom: 10px; }
.pg--apropos .apropos__skill-bar,
.modal .modal__skill-bar {
  height: 6px;
  background: rgba(19, 27, 49, 0.1);
  border: 0;
  box-shadow: inset 0 1px 2px rgba(19, 27, 49, 0.12);
}
.pg--apropos .apropos__skill-bar { margin-bottom: 14px; }
.pg--apropos .apropos__skill-bar-fill,
.modal .modal__skill-bar-fill {
  background: var(--pg-bar);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}
.pg--apropos .apropos__skill-card p { margin: 0; font-size: 0.93rem; line-height: 1.65; }

/* Expériences : la seconde carte passe en encre */
.pg--apropos .apropos__experience { gap: 14px; }
.pg--apropos .apropos__experience-card p { margin: 0 0 8px; }
.pg--apropos .apropos__experience-card p:first-of-type { font-size: 0.92rem; }
.pg--apropos .apropos__experience-card p:last-child { margin: 0; }
.pg--apropos .apropos__experience-card.highlight {
  background: var(--pg-ink-grad);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.pg--apropos .apropos__experience-card.highlight h3 { color: #fff; }
.pg--apropos .apropos__experience-card.highlight p { color: var(--on-ink-muted); }
@media (hover: hover) {
  .pg--apropos .apropos__experience-card.highlight:hover { background: var(--pg-ink-grad); box-shadow: var(--shadow-lg); }
}

/* Centres d'intérêt */
.pg--apropos .apropos__interests {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}
.pg--apropos .apropos__interest-item { gap: 0; }
.pg--apropos .apropos__interest-item p { margin: 0; font-size: 0.95rem; }

/* Projet professionnel : panneau encre */
.pg--apropos .apropos__project {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.5vw, 36px);
  border-radius: 22px;
  background: var(--pg-ink-grad);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
}
.pg--apropos .apropos__project::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px 260px at 100% 0%, rgba(169, 167, 175, 0.2), transparent 70%);
}
.pg--apropos .apropos__project .apropos__text { position: relative; color: var(--on-ink-muted); }
.pg--apropos .apropos__project .apropos__text:first-child {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  color: var(--on-ink);
}
.pg--apropos .apropos__project strong { color: #fff; }
.pg--apropos .apropos__project .apropos__text + .apropos__text {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pg--apropos .apropos__actions {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--pg-line);
}

@media (max-width: 820px) {
  .pg--apropos .apropos__section { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pg--apropos .apropos__section-title { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
}
@media (max-width: 600px) {
  .pg--apropos .apropos__hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
    gap: 36px;
  }
  .pg--apropos .apropos__photo { order: -1; justify-self: start; margin-left: 18px; }
  .pg .apropos__portrait { width: 150px; }
  .pg--apropos .apropos__timeline { padding-left: 32px; }
  .pg--apropos .apropos__timeline::before { left: 8px; }
  .pg--apropos .apropos__timeline-marker { left: -32px; width: 17px; height: 17px; top: 24px; }
  .pg--apropos .apropos__timeline-marker::after { inset: 4px; }
  .pg--apropos .apropos__timeline-content { grid-template-columns: minmax(0, 1fr); }
  .pg--apropos .apropos__timeline-date { grid-column: 1; grid-row: auto; justify-self: start; order: -1; margin: 0 0 10px; }
}

/* ==========================================================================
   C. Page Projets
   ========================================================================== */
.pg--projets .projects-section { max-width: 1120px; }
.pg--projets #mes-projets { padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(24px, 4vw, 40px); }
.pg--projets .pg-head {
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(24px, 4vw, 36px);
  border-bottom: 1px solid var(--pg-line);
  position: relative;
}
.pg--projets .pg-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 96px; height: 2px;
  background: var(--ink);
}

/* Grille 2 colonnes équilibrée */
.pg--projets .cards {
  counter-reset: pg-card;
  max-width: none;
  gap: clamp(14px, 2vw, 22px);
}
.pg--projets .cards--projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Carte verre dépoli */
.pg--projets .card {
  counter-increment: pg-card;
  isolation: isolate;
  padding: clamp(22px, 2.8vw, 30px);
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--pg-hair);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, var(--shadow-sm);
  -webkit-backdrop-filter: var(--pg-glass-blur);
  backdrop-filter: var(--pg-glass-blur);
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s, border-color 0.35s;
}
/* Reflet lumineux */
.pg--projets .card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(420px 200px at 0% 0%, rgba(255, 255, 255, 0.55), transparent 65%),
    linear-gradient(180deg, transparent 55%, rgba(19, 27, 49, 0.06));
  opacity: 0.7;
  transition: opacity 0.35s var(--ease);
}
.pg--projets .card::after {
  content: "→";
  top: clamp(22px, 2.8vw, 30px);
  right: clamp(22px, 2.8vw, 30px);
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--pg-hair);
  opacity: 1;
  transform: none;
  transition: background-color 0.3s, color 0.3s, transform 0.35s var(--ease);
}
.pg--projets .card[target="_blank"]::after { content: "↗"; }
.pg--projets .card.project-modal-trigger::after { content: "+"; font-size: 1.25rem; font-weight: 500; }

.pg--projets .card:hover,
.pg--projets .card:focus-visible {
  transform: translateY(-4px);
  background: var(--glass-strong);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, var(--shadow-lg);
}
.pg--projets .card:hover::before,
.pg--projets .card:focus-visible::before { opacity: 1; }
.pg--projets .card:hover::after,
.pg--projets .card:focus-visible::after {
  color: var(--on-ink);
  background: var(--ink);
  border-color: var(--ink);
  transform: rotate(-8deg) scale(1.05);
}
.pg--projets .card.project-modal-trigger:hover::after,
.pg--projets .card.project-modal-trigger:focus-visible::after { transform: rotate(90deg); }

.pg--projets .card__icon {
  width: 54px; height: 54px;
  margin-bottom: 22px;
  border-radius: 15px;
  font-size: 1.55rem;
  background: var(--pg-ink-grad);
  box-shadow: 0 10px 22px -12px rgba(19, 27, 49, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.35s var(--ease);
}
.pg--projets .card:hover .card__icon { transform: translateY(-2px) rotate(-4deg); }

.pg--projets .card h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pg--projets .card h3::before {
  content: counter(pg-card, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  opacity: 0.8;
}
.pg--projets .card p { margin: 0; color: var(--muted); line-height: 1.65; }
.pg--projets .card .pills {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--pg-line);
}
.pg--projets .card .pill {
  padding: 4px 10px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--border);
}
.pg--projets .card--ap {
  background: var(--glass);
  border-color: var(--pg-hair);
}

/* Section « Projets AP » : en-tête aligné à gauche */
.pg--projets #projets-ap { padding-top: clamp(24px, 4vw, 48px); }
.pg--projets .pg-sechead {
  max-width: none;
  margin: 0 0 clamp(24px, 4vw, 36px);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.pg--projets .pg-sechead .eyebrow {
  justify-self: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}
.pg--projets .pg-sechead .eyebrow::before { content: "// "; opacity: 0.6; width: auto; height: auto; background: none; box-shadow: none; }
.pg--projets .pg-sechead h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink);
}
.pg--projets .pg-sechead .lead { margin: 0; max-width: 600px; }

.pg--projets .projects-timeline {
  max-width: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.pg--projets .semester-section { display: flex; flex-direction: column; }
.pg--projets .semester-section + .semester-section { margin-top: 0; }
.pg--projets .semester-title {
  gap: 12px;
  margin: 0 0 14px;
  padding: 0 0 12px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: 1px dashed var(--border-strong);
}
.pg--projets .semester-badge {
  width: auto; height: auto;
  padding: 5px 9px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--on-ink);
  background: var(--ink);
}
.pg--projets .cards.cards--solo { flex: 1; grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
.pg--projets .projects-timeline .card h3::before { content: none; }

@media (max-width: 760px) {
  .pg--projets .cards--projects,
  .pg--projets .projects-timeline { grid-template-columns: minmax(0, 1fr); }
  .pg--projets .projects-timeline { gap: 32px; }
}

/* ==========================================================================
   D. Page CV
   ========================================================================== */
.pg--cv .cv { max-width: 1040px; padding-top: clamp(36px, 6vw, 72px); }
.pg--cv .cv__header {
  display: block;
  text-align: left;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.pg--cv .cv__identity {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 48px);
}
.pg--cv .apropos__photo { margin: 0 0 14px 14px; flex-shrink: 0; }
.pg--cv .apropos__portrait { width: clamp(110px, 14vw, 150px); border-width: 5px; }
.pg--cv .apropos__photo::before { inset: 14px 14px -14px -14px; border-radius: 20px; }
.pg--cv .cv__identity-text { min-width: 0; }
.pg--cv .cv__name { margin-bottom: 12px; }
.pg--cv .cv__title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.pg--cv .cv__subtitle {
  max-width: none;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--muted);
}

.pg--cv .cv__preview { margin-top: 0; gap: 0; }

/* Barre d'action encre : téléchargement mis en avant */
.pg--cv .cv__preview-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 24px) clamp(18px, 2.8vw, 28px);
  border-radius: 22px;
  background: var(--pg-ink-grad);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.pg--cv .cv__preview-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(460px 180px at 100% 0%, rgba(169, 167, 175, 0.22), transparent 70%);
}
.pg--cv .cv__doc-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.pg--cv .cv__preview-text {
  flex: 1;
  margin: 0;
  color: var(--on-ink-muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
}
.pg--cv .cv__preview-text strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}
/* Variante scopée du bouton : papier sur encre */
.pg--cv .cv__download.btn.primary {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #fff;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.pg--cv .cv__download.btn.primary:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
}
.pg--cv .cv__download svg { transition: transform 0.25s var(--ease); }
.pg--cv .cv__download:hover svg { transform: translateY(2px); }
.pg--cv .cv__download.btn:focus-visible { outline-color: var(--paper); }

/* Aperçu : fenêtre « document » verre dépoli glissée sous la barre */
.pg--cv .cv__preview-iframe-container {
  display: flex;
  flex-direction: column;
  width: auto;
  margin: -14px 14px 0;
  padding: 14px 0 0;
  height: clamp(560px, 120vh, 1180px);
  border-radius: 0 0 20px 20px;
  background: var(--glass-strong);
  border: 1px solid var(--pg-hair);
  border-top: 0;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--pg-glass-blur);
  backdrop-filter: var(--pg-glass-blur);
}
.pg--cv .cv__viewer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--pg-line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.pg--cv .cv__viewer-dots { display: inline-flex; gap: 6px; }
.pg--cv .cv__viewer-dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(19, 27, 49, 0.22);
}
.pg--cv .cv__viewer-dots i:first-child { background: var(--ink); }
.pg--cv .cv__preview-iframe {
  flex: 1;
  min-height: 0;
  height: auto;
  margin: 12px;
  width: calc(100% - 24px);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--border);
}

.pg--cv .cv__actions { margin-top: clamp(28px, 4vw, 44px); }

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .pg--cv .cv__preview-iframe-container { display: none; }
  .pg--cv .cv__preview-header {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
  }
  .pg--cv .cv__preview-header .btn { width: 100%; }
}
@media (max-width: 600px) {
  .pg--cv .cv__identity { flex-direction: column; align-items: flex-start; gap: 28px; }
}

/* ==========================================================================
   E. Modale projets (#project-modal)
   ========================================================================== */
.modal__overlay {
  background: radial-gradient(900px 600px at 50% 40%, rgba(19, 27, 49, 0.5), rgba(10, 14, 28, 0.78));
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}
.modal__content {
  width: min(860px, 100%);
  background: #e4e3e8;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: 0 40px 100px -30px rgba(5, 8, 18, 0.8), 0 0 0 1px rgba(19, 27, 49, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(19, 27, 49, 0.35) transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .modal__content { transform: translateY(24px) scale(0.97); transition: transform 0.45s var(--ease); }
}

/* En-tête encre */
.modal__header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 4px;
  align-items: center;
  margin-top: -58px; /* passe sous le bouton fermer flottant */
  padding: clamp(28px, 4vw, 40px) 84px clamp(28px, 4vw, 40px) clamp(22px, 4vw, 40px);
  border-bottom: 0;
  background: var(--pg-ink-grad);
  overflow: hidden;
}
.modal__header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(169, 167, 175, 0.22), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 22px;
}
.modal__icon {
  grid-row: 1 / 3;
  position: relative;
  width: 64px; height: 64px;
  border-radius: 18px;
  font-size: 1.9rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.modal__title {
  position: relative;
  align-self: end;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}
.modal__date {
  position: relative;
  align-self: start;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.modal__date::before { content: "// "; opacity: 0.6; }

/* Bouton fermer : pastille papier sur l'encre */
.modal__close {
  top: 16px;
  margin: 16px 16px 0 0;
  z-index: 3;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(242, 241, 244, 0.86);
  color: var(--ink);
  font-size: 1.5rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}
.modal__close:hover { border-color: #fff; color: var(--ink); background: #fff; }
.modal__close:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }

/* Corps */
.modal__body { padding: clamp(24px, 4vw, 40px); }
.modal__section { margin-bottom: 34px; }
.modal__section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.modal__section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--pg-line);
}
.modal__section li {
  padding: 7px 0 7px 24px;
  color: var(--text);
  border-bottom: 1px solid rgba(17, 23, 42, 0.07);
}
.modal__section li:last-child { border-bottom: 0; }
.modal__section li::before {
  content: "";
  top: 18px; left: 2px;
  width: 9px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.modal__section--env {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-left: 3px solid var(--ink);
}
.modal__section--env p { margin: 0; font-size: 0.93rem; color: var(--text); }
.modal__section--env strong {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.modal__qa {
  margin-bottom: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.modal__qa:last-child { margin-bottom: 0; }
.modal__qa strong { color: var(--ink); font-family: var(--display); font-weight: 600; }
.modal__qa p { margin: 6px 0 0; color: var(--muted); }

.modal__technos { gap: 8px; }
.modal__technos .modal__filter-item {
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
}
.modal__filters { gap: 10px; }
.modal__filter-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.modal__filter-item strong { color: var(--ink); font-size: 0.93rem; }
.modal__filter-item p { color: var(--muted); }
.modal__filter-item .modal__raid-tolerance { color: var(--text); font-size: 0.9rem; margin-top: 4px; }
.modal__filter-item code,
.modal__section li code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #e7ebf5;
  background: var(--ink);
  border-radius: 8px;
}
.modal__filter-item code {
  display: block;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.modal__filter-item code::before { content: "$ "; color: #8f9bb8; }
.modal__section li code { padding: 2px 7px; }

.modal__skills { gap: 16px; }
.modal__skill-name { color: var(--text); }
.modal__skill-percent { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; color: var(--ink); }

.modal__map {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}
.modal__map-link a { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); }

/* Code source : fenêtre encre lisible */
.modal__code-container {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0f1528;
  box-shadow: var(--shadow);
}
.modal__code-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #8f9bb8;
}
.modal__code-dots { display: inline-flex; gap: 6px; }
.modal__code-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.modal__code {
  padding: 18px 20px 22px;
  color: #d9deea;
  font-size: 0.8rem;
  line-height: 1.75;
  tab-size: 4;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.modal__code .php-tag { color: #a9b8e8; }
.modal__code .php-keyword { color: #c9b6f0; font-weight: 500; }
.modal__code .php-function { color: #9ccbe8; }
.modal__code .php-variable { color: #e8cf9a; }
.modal__code .php-string { color: #a8d5b4; }
.modal__code .php-comment { color: #8792a8; }

.modal__image { border-radius: 14px; box-shadow: var(--shadow); }
.modal__image-caption { font-family: var(--mono); font-style: normal; font-size: 0.78rem; }

@media (max-width: 600px) {
  .modal__content { border-radius: 24px 24px 0 0; max-height: 94dvh; }
  .modal__header {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -54px;
    padding: 30px 70px 26px 22px;
    row-gap: 6px;
  }
  .modal__icon { grid-row: auto; width: 52px; height: 52px; font-size: 1.55rem; margin-bottom: 8px; }
  .modal__close { margin: 12px 12px 0 0; top: 12px; }
}

@media print {
  .pg--apropos .apropos__project,
  .pg--apropos .apropos__experience-card.highlight { background: #fff; }
  .pg--apropos .apropos__project .apropos__text,
  .pg--apropos .apropos__project strong,
  .pg--apropos .apropos__experience-card.highlight h3,
  .pg--apropos .apropos__experience-card.highlight p { color: #000; }
}
