/* Variables et typographie */

:root {
  color-scheme: light;
  --ink: #0a0a0a;
  --muted: #777;
  --line: #e2e2e2;
  --accent: #004aad;
  --accent-border: #d8e4f3;
  --logo: 56px;
  --gap: 20px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

/* Règles de base */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 2px;
}

svg {
  display: block;
}

p,
h1,
h2,
h3,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* Structure de la page */

.page {
  width: min(1024px, calc(100% - 64px));
  margin: auto;
}

/* En-tête et navigation */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 76px;
}

.header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
}

.header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Présentation et liens sociaux */

.intro {
  position: relative;
  margin-top: 72px;
}

h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.15;
}

.intro::before {
  content: "";
  position: absolute;
  inset-inline-start: -16px;
  top: 3px;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.bio {
  font-size: 18px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 14px;
}

.profile-links {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 16px;
  line-height: 1;
}

.profile-links .social-icon {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  border-radius: 4px;
  transition: opacity .15s;
}

.profile-links .social-icon:hover {
  opacity: .6;
}

.profile-links .social-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

/* Sections et chronologie */

.section {
  margin-top: 72px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--accent);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -.55px;
  font-weight: 700;
  margin-bottom: 22px;
}

h2::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: var(--accent-border);
}

.timeline {
  list-style: none;
  padding: 0;
}

.entry {
  position: relative;
  padding-left: calc(var(--logo) + var(--gap));
  padding-bottom: 40px;
  min-height: var(--logo);
  scroll-margin-top: 36px;
}

.entry:last-child {
  padding-bottom: 0;
}

.entry:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(var(--logo)/2);
  top: calc(var(--logo)/2);
  bottom: calc(var(--logo)/-2);
  width: 1px;
  background: var(--accent-border);
}

/* Logos des organisations */

.logo {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--logo);
  height: var(--logo);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo img {
  display: block;
  object-fit: contain;
  max-width: 83%;
  height: auto;
}

.photo-logo img {
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo .ariane-logo {
  width: 46px;
}

.logo.education-logo img {
  width: 84%;
  max-height: 78%;
  object-fit: contain;
}

.logo.education-logo.rowan-logo img {
  width: 145%;
  max-width: none;
  max-height: none;
}

/* Contenu des expériences et formations */

.entry-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 32px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.15px;
}

.date {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: normal;
  font-variant-numeric: normal;
}

.role {
  font-size: 16px;
  line-height: 1.4;
  margin-top: 4px;
}

/* Labels de compétences */

.tags {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tags li {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  background: white;
}

/* Détails dépliables */

.entry summary {
  list-style: none;
  cursor: pointer;
}

.entry summary::-webkit-details-marker {
  display: none;
}

.entry summary::marker {
  content: "";
}

.chevron {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #999;
  border-bottom: 1.5px solid #999;
  transform: rotate(45deg);
  margin-left: 8px;
  top: -2px;
  transition: transform .18s;
}

.entry details[open] .chevron {
  border-color: var(--accent);
  transform: rotate(225deg);
  top: 1px;
}

.entry summary:hover h3 {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.entry details[open] h3 {
  color: var(--accent);
}

/* Descriptions et programme de formation */

.description {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  margin-top: 16px;
}

.description p + p {
  margin-top: 12px;
}

.description ul {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

.description li {
  position: relative;
  padding-inline-start: 1.25em;
}

.description li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .65em;
  width: .3em;
  height: .3em;
  border-radius: 50%;
  background: var(--ink);
}

.description li + li {
  margin-top: 8px;
}

.description strong {
  font-weight: 600;
}

.description .course-groups {
  margin-top: 12px;
  margin-bottom: 16px;
}

.description .course-groups li + li {
  margin-top: 12px;
}

.education {
  margin-top: 72px;
}

/* Pied de page */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 20px 28px;
  margin-top: 72px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
}

footer p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1;
}

footer .back-top {
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}

/* Accessibilité */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  padding: 12px;
  background: #0a0a0a;
  color: white;
  z-index: 10;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

/* Écrans intermédiaires */

@media (max-width: 1050px) {
  .header {
    padding-top: 64px;
  }

  .entry-top {
    gap: 10px 24px;
  }
}

/* Mobile */

@media (max-width: 640px) {
  :root {
    --logo: 44px;
    --gap: 16px;
  }

  .page {
    width: calc(100% - 40px);
  }

  .header {
    padding-top: 32px;
  }

  .header nav {
    font-size: 15px;
    gap: 20px;
  }

  .intro {
    margin-top: 56px;
  }

  h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .bio {
    font-size: 16px;
    line-height: 1.5;
  }

  .profile-links {
    gap: 8px;
  }

  .profile-links svg {
    width: 17px;
    height: 17px;
  }

  .section,
  .education {
    margin-top: 56px;
  }

  h2 {
    font-size: 24px;
    margin-bottom: 22px;
    letter-spacing: -.5px;
  }

  .entry {
    padding-bottom: 32px;
  }

  .entry-top {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  h3 {
    font-size: 17px;
    line-height: 1.35;
  }

  .date {
    font-size: 14px;
    white-space: normal;
  }

  .role {
    font-size: 15px;
    line-height: 1.4;
    margin-top: 6px;
  }

  .tags {
    gap: 6px;
    margin-top: 8px;
  }

  .tags li {
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 6px;
  }

  .description {
    font-size: 15px;
    line-height: 1.6;
    margin-top: 14px;
  }

  .logo img {
    max-width: 80%;
  }

  .logo.photo-logo img {
    max-width: 100%;
  }

  .logo .ariane-logo {
    width: 36px;
  }

  footer {
    margin-top: 56px;
    gap: 16px;
    padding-bottom: 32px;
  }

  footer p {
    flex-basis: 100%;
    order: 3;
    font-size: 12px;
  }

  footer .back-top {
    margin-left: auto;
  }
}

/* Petits écrans */

@media (max-width: 380px) {
  :root {
    --logo: 40px;
    --gap: 12px;
  }

  .header nav {
    font-size: 14px;
    gap: 16px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

}

/* Préférence de réduction des animations */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .chevron {
    transition: none;
  }
}

/* Impression */

@media print {
  .header nav,
  .profile-links,
  footer,
  .chevron {
    display: none;
  }

  .header {
    padding-top: 0;
  }

  .intro {
    margin-top: 24px;
  }

  .page {
    width: 100%;
  }

  .section {
    margin-top: 32px;
  }

  .entry {
    break-inside: avoid;
    padding-bottom: 24px;
  }

  body {
    font-size: 12px;
  }

  .bio {
    font-size: 16px;
  }

  .date {
    font-size: 16px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  .tags li {
    font-size: 11px;
  }

  .role {
    font-size: 14px;
  }
}
