/* =========================================================
   Portfolio — Nande Baou
   Design d'origine conservé : bleu nuit, cartes ardoise,
   accent bleu ciel, bandeaux de titre bleus arrondis.
   ========================================================= */

   :root {
    /* Couleurs d'origine */
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #111827;
    --track: #1f2933;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-2: #22d3ee;
    --band: #3676e4;
    --cta: #2563eb;
    --footer: #020617;
    --form-from: #0941bb;
    --form-to: #021c45;
  
    /* Typographie : pour passer tout le texte en Inter (S5),
       remplacer la valeur de --font-body par var(--font-ui). */
    --font-body: "Times New Roman", "Segoe UI", sans-serif;
    --font-ui: "Inter", "Segoe UI", system-ui, sans-serif;
  
    --header-h: 76px;
    --radius: 12px;
    --gutter: clamp(16px, 4vw, 40px);
    --section-pad: clamp(56px, 9vw, 100px);
  }
  
  * { margin: 0; padding: 0; box-sizing: border-box; }
  
  html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
  }
  
  body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 1rem;
    overflow-x: hidden;
  }
  
  img { max-width: 100%; height: auto; display: block; }
  a { color: inherit; }
  ul, ol { list-style: none; }
  
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
  }
  
  .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;
  }
  
  .skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--accent); color: var(--bg); padding: 10px 16px;
    border-radius: 8px; font-family: var(--font-ui); font-weight: 600; text-decoration: none;
  }
  .skip-link:focus { top: 12px; }
  
  .noscript { text-align: center; padding: 20px; color: var(--muted); }
  
  /* ================= EN-TÊTE ================= */
  
  .site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    height: var(--header-h);
    display: flex; align-items: center; gap: 20px;
    padding: 0 40px;
  }
  /* Fond flouté sur un calque séparé : sinon le panneau du menu mobile
     (position: fixed) serait limité à la hauteur de l'en-tête. */
  .site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .logo {
    font-weight: 700; font-size: 1.5rem; letter-spacing: 1px;
    text-decoration: none; white-space: nowrap; margin-right: auto;
  }
  
  .site-nav { display: flex; align-items: center; gap: 28px; }
  
  .nav-links { display: flex; gap: 20px; }
  .nav-links a {
    color: var(--text); text-decoration: none; white-space: nowrap;
    transition: color 0.3s; position: relative; padding: 4px 0;
  }
  .nav-links a:hover,
  .nav-links a.is-active { color: var(--accent); }
  .nav-links a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; background: var(--accent); border-radius: 2px;
  }
  
  .socials { display: flex; gap: 18px; }
  .socials a {
    font-size: 1.3rem; color: var(--text); transition: color 0.3s, transform 0.3s;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .socials a:hover { color: var(--accent); transform: translateY(-5px) scale(1.1); }
  
  .language-switcher {
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
  }
  .language-switcher .sep { color: var(--muted); }
  .lang-btn {
    background: transparent; border: none; color: var(--text);
    font-weight: 700; cursor: pointer; padding: 5px 7px; border-radius: 6px;
    transition: 0.3s; font-family: inherit; font-size: 0.95rem;
  }
  .lang-btn:hover { color: var(--accent); }
  .lang-btn.active { color: var(--accent); background: rgba(56, 189, 248, 0.12); }
  
  .nav-toggle {
    display: none; width: 44px; height: 44px; border: none; background: transparent;
    cursor: pointer; position: relative; border-radius: 8px;
  }
  .nav-toggle span {
    position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text);
    border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
  }
  .nav-toggle span:nth-child(1) { top: 15px; }
  .nav-toggle span:nth-child(2) { top: 21px; }
  .nav-toggle span:nth-child(3) { top: 27px; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  
  /* Menu mobile / tablette */
  @media (max-width: 1179px) {
    :root { --header-h: 64px; }
    .site-header { padding: 0 var(--gutter); gap: 8px; }
    .logo { font-size: 1.25rem; }
    .nav-toggle { display: block; }
  
    .site-nav {
      position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
      flex-direction: column; align-items: stretch; justify-content: space-between;
      gap: 24px; padding: 24px var(--gutter) 32px;
      background: var(--bg); overflow-y: auto;
      visibility: hidden; opacity: 0; transform: translateY(-8px);
      transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s;
    }
    .nav-open .site-nav {
      visibility: visible; opacity: 1; transform: none;
      transition: opacity 0.25s, transform 0.25s;
    }
    .nav-links { flex-direction: column; gap: 0; }
    .nav-links a {
      display: block; padding: 14px 4px; font-size: 1.2rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    }
    .nav-links a.is-active::after { display: none; }
    .site-nav .socials { justify-content: center; gap: 26px; }
    .site-nav .socials a { font-size: 1.5rem; width: 44px; height: 44px; }
    body.nav-open { overflow: hidden; }
  }
  
  /* ================= SECTIONS ================= */
  
  .section {
    padding-block: var(--section-pad);
  }
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--gutter);
  }
  
  /* Bandeau de titre : pleine largeur, sans débordement */
  .all-header {
    background-color: var(--band);
    color: #fff;
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  .all-header h2 {
    margin: 0;
    font-family: var(--font-ui);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
  }
  
  .sub-title {
    font-family: var(--font-ui);
    color: var(--accent);
    font-size: 1.3rem;
    text-align: center;
    margin-top: 60px;
    scroll-margin-top: 20px;
  }
  
  /* Cartes : socle commun */
  .about-card,
  .timeline-card,
  .xp-card,
  .cert-card,
  .activity-card,
  .goal-card {
    background: var(--surface);
    padding: clamp(20px, 3vw, 30px);
    border-radius: var(--radius);
    transition: transform 0.3s;
  }
  @media (hover: hover) {
    .about-card:hover,
    .timeline-card:hover,
    .activity-card:hover,
    .goal-card:hover { transform: translateY(-8px); }
  }
  
  .card-title {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 10px;
  }
  .card-title i { color: var(--accent); width: 1.2em; text-align: center; }
  
  /* ================= ACCUEIL ================= */
  
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex; justify-content: center; align-items: center;
    text-align: center;
    padding: calc(var(--header-h) + 30px) var(--gutter) 50px;
  }
  .hero-inner { max-width: 820px; }
  
  .profile-img {
    width: min(320px, 62vw);
    height: auto;
    aspect-ratio: 320 / 380;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--bg);
    margin: 0 auto 20px;
  }
  
  .hero h1 { font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.15; margin-bottom: 8px; }
  .hero-role {
    font-family: var(--font-ui); color: var(--accent);
    font-size: clamp(0.95rem, 2.4vw, 1.1rem); font-weight: 600; margin-bottom: 14px;
  }
  .hero-quote { font-style: italic; font-size: clamp(1.05rem, 2.6vw, 1.3rem); margin-bottom: 12px; }
  .hero-tagline { max-width: 600px; margin: 0 auto; }
  
  .availability {
    display: inline-flex; align-items: flex-start; gap: 10px; text-align: left;
    margin-top: 22px; padding: 10px 18px; border-radius: 999px;
    background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.35);
    font-family: var(--font-ui); font-size: 0.92rem; max-width: 100%;
  }
  .availability-dot {
    flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 0.45em;
    background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  }
  @media (max-width: 600px) { .availability { border-radius: 14px; } }
  
  .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
  
  .btn {
    display: inline-block; margin-top: 20px; padding: 12px 30px;
    background: var(--accent); color: var(--bg); text-decoration: none;
    border-radius: 30px; font-weight: 600; transition: transform 0.3s;
    border: 2px solid var(--accent); font-family: var(--font-ui);
  }
  .btn:hover { transform: scale(1.05); }
  .btn-outline { background: transparent; color: var(--accent); }
  
  /* ================= À PROPOS ================= */
  
  #about { text-align: center; }
  .about-intro { margin-top: 50px; font-size: 1.15rem; }
  .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .about-grid .about-card { margin-top: 40px; }
  .about-grid .card-title { justify-content: center; }
  
  /* ================= EXPÉRIENCE ================= */
  
  .xp-timeline {
    position: relative;
    margin-top: 50px;
    padding-left: 32px;
    max-width: 1000px;
    margin-inline: auto;
  }
  .xp-timeline::before {
    content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
    width: 2px; background: rgba(56, 189, 248, 0.35); border-radius: 2px;
  }
  .xp-item { position: relative; }
  .xp-item + .xp-item { margin-top: 30px; }
  .xp-item::before {
    content: ""; position: absolute; left: -29px; top: 28px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--bg); border: 3px solid var(--accent);
  }
  .xp-item.is-featured::before { background: var(--accent); }
  
  .xp-card.is-featured { border: 1px solid rgba(56, 189, 248, 0.45); }
  .xp-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600;
    color: var(--bg); background: var(--accent);
    padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
  }
  .xp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; }
  .xp-role { font-family: var(--font-ui); font-size: 1.15rem; }
  .xp-period { font-family: var(--font-ui); color: var(--accent); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
  .xp-meta { color: var(--muted); margin: 2px 0 12px; }
  .xp-meta a { color: var(--text); text-decoration-color: rgba(56, 189, 248, 0.6); text-underline-offset: 3px; }
  .xp-meta a:hover { color: var(--accent); }
  
  .bullets li { position: relative; padding-left: 18px; margin-bottom: 6px; }
  .bullets li::before {
    content: ""; position: absolute; left: 2px; top: 0.65em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  }
  
  .xp-details { margin-top: 14px; }
  .xp-details summary {
    cursor: pointer; font-family: var(--font-ui); font-weight: 600; font-size: 0.92rem;
    color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 0;
  }
  .xp-details summary::-webkit-details-marker { display: none; }
  .xp-details summary i { transition: transform 0.25s; }
  .xp-details[open] summary i { transform: rotate(180deg); }
  .xp-details h4 {
    font-family: var(--font-ui); font-size: 0.95rem; color: var(--text);
    margin: 16px 0 8px;
  }
  
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip {
    font-family: var(--font-ui); font-size: 0.8rem;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(56, 189, 248, 0.1); color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.25);
  }
  
  /* ================= PROJETS ================= */
  
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    margin-top: 24px;
  }
  .group-title { margin-top: 50px; }
  
  /* Séparateur de catégorie au-dessus des fiches */
  .details-group-title {
    font-family: var(--font-ui);
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
    color: var(--accent);
    text-align: center;
    margin-top: clamp(70px, 9vw, 110px);
    display: flex; align-items: center; gap: 16px;
    scroll-margin-top: 16px;
  }
  .details-group-title::before,
  .details-group-title::after {
    content: ""; flex: 1; height: 1px; background: rgba(56, 189, 248, 0.35);
  }
  .details-group-title + div > .project-detail:first-child { margin-top: 30px; }
  
  .project-card {
    background: var(--surface);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, outline-color 0.3s;
    display: flex; flex-direction: column;
    position: relative;
    outline: 2px solid transparent;
  }
  @media (hover: hover) {
    .project-card:hover { transform: translateY(-6px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
  }
  .project-card:has(.open-hint:focus-visible) { outline-color: var(--accent); }
  
  .project-card img { width: 100%; height: 180px; object-fit: cover; background: var(--surface-2); }
  .project-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .project-card h4 { text-align: center; font-size: 1rem; font-family: var(--font-body); }
  .project-card p { color: var(--muted); font-size: 0.92rem; text-align: center; }
  .project-card .chips { justify-content: center; margin-top: auto; padding-top: 6px; }
  .project-card .open-hint {
    font-family: var(--font-ui); font-size: 0.85rem; color: var(--accent);
    text-align: center; font-weight: 600;
    text-decoration: none; padding: 4px; min-height: 32px; display: block;
  }
  /* Toute la carte est cliquable via le bouton */
  .project-card .open-hint::after { content: ""; position: absolute; inset: 0; }
  .project-card .open-hint:focus-visible { outline: none; }
  
  /* Fiches projet : toujours visibles sous la grille */
  .project-detail {
    margin-top: clamp(60px, 8vw, 100px);
    scroll-margin-top: 16px;
  }
  .project-band h4 {
    margin: 0;
    font-family: var(--font-ui);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
  }
  .detail-tags { margin: 20px 0 4px; }
  .detail-tags .chips { justify-content: center; }
  
  /* Deux colonnes : « Le projet » (étapes numérotées) / « Retour d'expérience » */
  .pd-bottom .detail-body {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
    align-items: start;
    margin-top: 24px;
  }
  @media (max-width: 900px) {
    .pd-bottom .detail-body { grid-template-columns: 1fr; }
  }
  .col-story, .col-retex { display: flex; flex-direction: column; gap: 16px; }
  .col-title {
    font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted); margin: 0 0 -4px 4px;
  }
  .col-story { counter-reset: step; position: relative; }
  .col-story::before {
    content: ""; position: absolute; left: 11px; top: 46px; bottom: 30px;
    width: 2px; background: rgba(56, 189, 248, 0.35);
  }
  .col-story .detail-block { position: relative; margin-left: 34px; }
  .col-story .detail-block::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: -34px; top: 22px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: var(--bg);
    font: 700 0.8rem/24px var(--font-ui); text-align: center;
  }
  .col-story .detail-block h5::before { display: none; }
  .col-retex .detail-block { background: var(--surface-2); border-left: 3px solid var(--accent); }
  
  .detail-block {
    margin-top: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: clamp(18px, 3vw, 26px);
  }
  .detail-body .detail-block { margin-top: 0; }
  .detail-block h5 {
    font-family: var(--font-ui); font-size: 1rem; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px; color: var(--accent);
  }
  .detail-block h5::before {
    content: ""; width: 4px; height: 1em; background: var(--accent); border-radius: 2px;
  }
  .facts-row {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, 0.15);
  }
  .facts-row span { font-family: var(--font-ui); font-size: 0.85rem; color: var(--muted); }
  .facts-row b { color: var(--text); font-weight: 600; }
  .doc-links a { color: var(--text); font-family: var(--font-ui); text-underline-offset: 3px; }
  .doc-links a:hover { color: var(--accent); }
  .doc-links i { color: var(--accent); margin-right: 4px; }
  
  .demo-frame { margin-top: 20px; }
  .demo-frame h5 { font-family: var(--font-ui); font-size: 1rem; margin-bottom: 10px; color: var(--accent); }
  .demo-frame iframe {
    display: block; width: 100%; height: 600px; border: none; border-radius: var(--radius);
    background: var(--bg);
  }
  .back-to-projects {
    display: inline-block; margin-top: 18px;
    font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
    color: var(--accent); text-decoration: none;
  }
  .back-to-projects:hover { text-decoration: underline; }
  
  /* ================= COMPÉTENCES ================= */
  
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 30px;
    margin-top: 50px;
  }
  .skill-card {
    background: var(--surface-2);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
  .skill-card h3 {
    margin-bottom: 16px; color: var(--accent); font-family: var(--font-ui); font-size: 1.1rem;
    display: flex; align-items: center; gap: 10px;
  }
  .skill-list li { padding: 10px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
  .skill-list li:last-child { border-bottom: none; }
  .skill-name { display: block; }
  .skill-sources { display: block; margin-top: 4px; font-size: 0.82rem; color: var(--muted); font-family: var(--font-ui); }
  .skill-sources b { color: var(--accent); font-weight: 600; }
  
  /* ================= FORMATION ================= */
  
  .timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 20px;
  }
  .timeline-card { margin-top: 50px; }
  .timeline-card .period { font-family: var(--font-ui); color: var(--accent); font-weight: 600; font-size: 0.9rem; }
  .timeline-card h3 { font-size: 1.15rem; margin: 4px 0 6px; }
  .timeline-card .detail { color: var(--muted); }
  
  .cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 20px;
    margin-top: 24px;
  }
  .cert-card { border-left: 4px solid var(--accent); }
  .cert-card h4 { font-family: var(--font-ui); font-size: 1.1rem; margin-bottom: 12px; }
  .cert-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
  .cert-meta dt { color: var(--muted); font-family: var(--font-ui); font-size: 0.88rem; }
  .cert-meta dd { margin: 0; }
  .cert-card .bullets { margin-top: 6px; }
  .cert-link { display: inline-block; color: var(--accent); font-family: var(--font-ui); font-weight: 600; }
  
  /* Boutons des certificats */
  .cert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
  .cert-view {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; min-height: 40px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--accent); color: var(--bg); font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem;
  }
  .cert-view:hover { filter: brightness(1.08); }
  
  /* Visionneuse de certificats */
  .viewer {
    width: min(960px, 94vw); max-height: 92vh; margin: auto; padding: 0;
    border: 1px solid rgba(56, 189, 248, 0.35); border-radius: 16px;
    background: var(--surface-2); color: var(--text);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }
  .viewer::backdrop { background: rgba(2, 6, 23, 0.8); backdrop-filter: blur(4px); }
  .viewer-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }
  .viewer-head h3 { font-family: var(--font-ui); font-size: 1rem; color: var(--accent); margin-right: auto; }
  .viewer-open { font-family: var(--font-ui); font-size: 0.85rem; color: var(--text); text-underline-offset: 3px; }
  .viewer-open:hover { color: var(--accent); }
  .viewer-close {
    width: 40px; height: 40px; flex: none; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.4); background: transparent; color: var(--text); font-size: 1.4rem; line-height: 1;
  }
  .viewer-close:hover { color: var(--accent); border-color: var(--accent); }
  .viewer-body { padding: 16px; overflow: auto; max-height: calc(92vh - 70px); display: flex; justify-content: center; }
  .viewer-body img { max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
  .viewer-body iframe { width: 100%; height: 75vh; border: none; border-radius: 8px; background: #fff; }
  body.viewer-open-body { overflow: hidden; }
  @media (max-width: 600px) {
    .viewer { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .viewer-head h3 { flex: 1; min-width: 0; }
    .viewer-close { order: 2; }
    .viewer-open { order: 3; flex-basis: 100%; }
    .viewer-body { max-height: calc(100dvh - 120px); padding: 10px; }
    .viewer-body iframe { height: calc(100dvh - 140px); }
  }
  
  /* ================= ACTIVITÉS ================= */
  
  .activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    margin-top: 50px;
  }
  .activity-org { color: var(--accent); font-family: var(--font-ui); font-size: 0.88rem; margin-bottom: 8px; }
  
  /* ================= OBJECTIFS ================= */
  
  .goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 20px;
    margin-top: 50px;
  }
  .goal-card .card-title { color: var(--accent); }
  .goal-sectors { grid-column: 1 / -1; background: var(--surface-2); }
  .goal-sectors p { color: var(--muted); margin-bottom: 10px; }
  .sector-list { display: flex; flex-wrap: wrap; gap: 10px; counter-reset: sector; }
  .sector-list li {
    counter-increment: sector;
    font-family: var(--font-ui); font-size: 0.92rem;
    padding: 8px 14px; border-radius: 999px; background: var(--surface);
    border: 1px solid rgba(56, 189, 248, 0.25);
  }
  .sector-list li::before { content: counter(sector) ". "; color: var(--accent); font-weight: 700; }
  
  /* ================= CONTACT ================= */
  
  .contact-wrapper {
    display: flex; gap: 40px; align-items: center; margin-top: 50px;
  }
  .cv-group { flex: 2; display: flex; gap: 30px; }
  
  .cv-preview { flex: 1; text-align: center; position: relative; }
  .cv-preview img {
    width: 100%; max-width: 350px; margin: 0 auto;
    border-radius: 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: filter 0.4s ease, transform 0.4s ease;
  }
  /* Le flou ne s'applique que là où le survol existe (pas au tactile) */
  @media (hover: hover) {
    .cv-preview img { filter: blur(5px); }
    .cv-preview:hover img,
    .cv-preview:focus-within img { filter: blur(0); transform: scale(1.03); }
  }
  
  .cv-btn {
    display: inline-block; margin-top: 20px; padding: 12px 30px;
    background: var(--cta); color: #fff; border-radius: 999px;
    text-decoration: none; font-weight: 600; font-family: var(--font-ui);
  }
  
  .contact-form {
    flex: 1.3;
    background: linear-gradient(135deg, var(--form-from), var(--form-to));
    padding: clamp(24px, 4vw, 40px);
    border-radius: 30px;
  }
  .contact-form h3 { margin-bottom: 20px; font-size: 1.6rem; }
  
  form input,
  form textarea,
  form select {
    width: 100%; padding: 12px; margin-bottom: 10px;
    border-radius: 6px; border: 2px solid transparent;
    font: inherit; font-size: 1rem; color: #0f172a; background: #fff;
  }
  form select { appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #0f172a 50%), linear-gradient(135deg, #0f172a 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
  }
  form select:invalid { color: #6b7280; }
  form input:focus,
  form textarea:focus,
  form select:focus { outline: none; border-color: var(--accent); }
  form textarea { resize: vertical; min-height: 120px; }
  
  form button {
    width: 100%; padding: 12px; background: var(--accent); border: none;
    font-weight: 600; cursor: pointer; font: inherit; font-weight: 600; color: var(--bg);
  }
  form button:disabled { opacity: 0.7; cursor: wait; }
  
  .form-status { margin-top: 12px; min-height: 1.4em; font-family: var(--font-ui); font-size: 0.92rem; }
  .form-status.is-success { color: #86efac; }
  .form-status.is-error { color: #fca5a5; }
  
  .contact-socials-title { margin-top: 24px; font-family: var(--font-ui); font-size: 0.9rem; color: #cbd5e1; }
  .contact-socials { margin-top: 10px; flex-wrap: wrap; }
  
  @media (max-width: 1100px) {
    .contact-wrapper { flex-direction: column; align-items: stretch; }
    .contact-form { width: 100%; }
  }
  @media (max-width: 560px) {
    .cv-group { flex-direction: column; gap: 40px; }
  }
  
  /* ================= PIED DE PAGE ================= */
  
  .site-footer { text-align: center; padding: 20px var(--gutter); background: var(--footer); }
  
  /* ================= RETOUR EN HAUT ================= */
  
  .back-to-top {
    position: fixed; right: 16px; bottom: 16px; z-index: 90;
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--accent); color: var(--bg); font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  }
  @media (min-width: 1180px) { .back-to-top { display: none; } }
  
  /* ================= APPARITION AU DÉFILEMENT ================= */
  
  .reveal-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
  
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .reveal-ready .reveal { opacity: 1; transform: none; }
  }
  
  /* ================= PETITS ÉCRANS ================= */
  
  @media (max-width: 600px) {
    .all-header { border-radius: 30px; }
    .xp-timeline { padding-left: 24px; }
    .xp-timeline::before { left: 5px; }
    .xp-item::before { left: -25px; width: 12px; height: 12px; }
    .cert-meta { grid-template-columns: 1fr; gap: 0; }
    .cert-meta dd { margin-bottom: 8px; }
    .demo-frame iframe { height: 520px; }
  }
  
  /* ================= IMPRESSION ================= */
  
  @media print {
    .site-header, .back-to-top, .nav-toggle, .skip-link { display: none !important; }
    .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
    .hero { min-height: auto; padding-top: 20px; }
  }