@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&family=Varela+Round&display=swap');

:root {
  --bleu: #004461;
  --orange: #E94D2A;
  --orange-hero: #FF8F4D;
  --vert: #01C69C;
  --bg: #F8F7FA;
  --bg-alt: #E7EEF3;
  --text: #334155;
  --max: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Raleway', sans-serif;
  color: var(--bleu);
  line-height: 1.25;
  margin: 0;
}

.meta, .tag, nav, button, .btn, .stat-label, .contact-row {
  font-family: 'Varela Round', sans-serif;
}

a { color: var(--bleu); }
a:hover { color: var(--orange); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / Hero ---------- */

.hero {
  background: var(--bleu);
  color: #fff;
  padding: 3.5rem 0 2.75rem;
}

.hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-align: left;
}

.avatar-btn {
  flex: none;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}
.avatar-btn:hover .avatar-photo,
.avatar-btn:focus-visible .avatar-photo {
  border-color: rgba(255,255,255,0.75);
}
.avatar-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.avatar-photo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  flex: none;
  transition: border-color 0.2s ease;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero h1 {
  color: #fff;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero .role {
  font-family: 'Varela Round', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--orange-hero);
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  margin: 0;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(1,198,156,0.15);
  border: 1px solid var(--vert);
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vert);
  flex: none;
  box-shadow: 0 0 0 3px rgba(1,198,156,0.25);
}

.contact-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1.1rem;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}

.contact-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.92);
}

.contact-row a { color: rgba(255,255,255,0.92); text-decoration: none; }
.contact-row a:hover { color: var(--orange); }
.contact-row svg { flex: none; opacity: 0.85; }

/* ---------- Quick nav ---------- */

.quicknav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--bg-alt);
  box-shadow: 0 1px 4px rgba(0,68,97,0.06);
}

.quicknav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.quicknav a {
  font-family: 'Varela Round', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bleu);
  text-decoration: none;
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  white-space: nowrap;
}

.quicknav a:hover {
  color: #fff;
  background: var(--orange);
}

/* ---------- Sections ---------- */

main { padding-bottom: 1rem; }

section {
  padding: 2.75rem 0;
  scroll-margin-top: 76px;
}

section:nth-of-type(even) {
  background: var(--bg-alt);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1.75rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
}

/* ---------- Profil ---------- */

.profil p { margin: 0 0 1rem; max-width: 62ch; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--bg-alt);
  border-left: 4px solid var(--vert);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.95rem;
  color: var(--bleu);
  margin-top: 0.5rem;
}
.badge svg { flex: none; color: var(--vert); }

/* ---------- Compétences ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.skill-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}

.skill-card h3 {
  font-family: 'Varela Round', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bleu);
  margin-bottom: 0.4rem;
}

.skill-card p { margin: 0; font-size: 0.93rem; }

/* ---------- Expérience / Projets ---------- */

.job, .project {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}

.job:last-child, .project:last-child { margin-bottom: 0; }

.job-head, .project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.15rem;
}

.job-title, .project-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bleu);
}

.job-dates {
  font-family: 'Varela Round', sans-serif;
  font-size: 0.85rem;
  color: var(--orange);
  white-space: nowrap;
}

.job-role {
  font-style: italic;
  color: var(--text);
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.job ul, .project ul {
  margin: 0;
  padding-left: 1.15rem;
}

.job li, .project li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.job li:last-child, .project li:last-child { margin-bottom: 0; }

.job-link, .cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
}
.job-link:hover, .cta-link:hover { background: #cf3f20; color: #fff; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.cta-row .cta-link { margin-top: 0; }

.aside-box {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.aside-box p { margin: 0 0 0.6rem; }
.aside-box p:last-child { margin-bottom: 0; }
.aside-box strong { color: var(--bleu); }

.compact-entry { font-size: 0.93rem; margin-bottom: 0.6rem; }
.compact-entry:last-child { margin-bottom: 0; }
.compact-entry .job-dates { color: var(--bleu); font-weight: 700; }

/* ---------- Diplômes / Certifications ---------- */

.formations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .formations-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.diploma-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.4rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}

.diploma-list { list-style: none; margin: 0; padding: 0; }
.diploma-list li {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--bg-alt);
  font-size: 0.95rem;
}
.diploma-list li:last-child { border-bottom: none; }
.diploma-year {
  font-family: 'Varela Round', sans-serif;
  font-weight: 700;
  color: var(--orange);
  flex: none;
  width: 4rem;
}

/* ---------- Chiffres ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}

.stat-value {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--orange);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.25rem;
}

/* ---------- Certifications ---------- */

.cert-list { display: grid; gap: 0.9rem; }
.cert-item {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}
.cert-code {
  font-family: 'Varela Round', sans-serif;
  font-weight: 700;
  color: #fff;
  background: var(--bleu);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  flex: none;
}

/* ---------- Réalisations en ligne ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.platform-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}
.platform-card h3 { font-family: 'Varela Round', sans-serif; font-size: 1rem; margin-bottom: 0.35rem; }
.platform-card p { font-size: 0.9rem; margin: 0 0 0.7rem; }

.video-embed {
  background: #fff;
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 2px rgba(0,68,97,0.06);
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption p { font-size: 0.9rem; margin: 1rem 0 0; }

.sites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem 1.5rem;
}
.sites-list li {
  font-size: 0.93rem;
  padding-left: 1rem;
  position: relative;
}
.sites-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- Centres d'intérêt ---------- */

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.interest-tags span {
  font-family: 'Varela Round', sans-serif;
  background: #fff;
  border: 1px solid var(--bg-alt);
  color: var(--bleu);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */

footer {
  background: var(--bleu);
  color: rgba(255,255,255,0.85);
  padding: 2.25rem 0;
  text-align: center;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.88rem;
}
footer a { color: #fff; }

/* ---------- Modale photo ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,20,30,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay[hidden] { display: none; }

.modal-image {
  max-width: min(600px, 100%);
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}

.modal-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.modal-close:hover { background: var(--orange); }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-top { flex-direction: column; text-align: center; }
  section { padding: 2rem 0; }
  .job-head, .project-head { flex-direction: column; }
}

@media print {
  .hero { background: none !important; color: var(--bleu) !important; padding-top: 0; }
  .hero .role { color: var(--orange) !important; text-shadow: none !important; }
  .contact-row li, .contact-row a { color: var(--text) !important; }
  section:nth-of-type(even) { background: none !important; }
  .avatar-photo { border-color: var(--bg-alt); }
  .availability { color: var(--bleu) !important; background: none !important; border-color: var(--vert) !important; }
  .hero .cta-link, .cta-row { display: none; }
  .quicknav { display: none; }
  footer { display: none; }
  .job, .project, .skill-card, .stat-card, .platform-card, .cert-item, .video-embed, .diploma-card { box-shadow: none !important; border: 1px solid var(--bg-alt); }
  .video-frame { display: none; }
}
