:root {
  --navy-dark: #0d2b40;
  --navy: #144a63;
  --teal: #1c5770;
  --gold: #c9975b;
  --orange: #d97e2b;
  --green: #2f8f5b;
  --pro-black: #1c1c1c;
  --bg: #f4f6f8;
  --card-bg: #ffffff;
  --text: #232830;
  --text-soft: #5a6472;
  --border: #e0e4e9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.hero {
  background: var(--navy-dark);
  padding: 0 0 1.6rem;
}

.badge {
  position: relative;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.1rem auto 0;
  gap: 0.4rem 1.4rem;
}

@media (min-width: 700px) {
  .site-nav {
    gap: 0.4rem 254px;
  }
}

.site-nav a {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.site-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Menu a points : navigation rapide fixe sur le bord droit de l'ecran.
   Le point se decale vers la gauche au survol/appui long, et l'etiquette
   apparait dans l'espace libere, entre le point et le bord droit. */
.dot-nav {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}

.dot-nav a {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--navy);
  display: block;
  position: relative;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.dot-nav a[hidden] {
  display: none;
}

/* Garde pour mobile/tablette, masque en grand ecran (la nav texte classique
   suffit deja largement sur ordinateur). */
@media (min-width: 1025px) {
  .dot-nav {
    display: none;
  }
}

/* Masque aussi en format telephone : redondant avec les sections
   repliables + le scroll normal sur petit ecran. */
@media (max-width: 480px) {
  .dot-nav {
    display: none;
  }
}

.dot-nav a:hover,
.dot-nav a.touched {
  transform: translateX(-10px) scale(1.15);
}

.dot-nav a.active {
  background: var(--green);
  border-color: var(--green);
}

.dot-nav a .dot-label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy-dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.dot-nav a:hover .dot-label,
.dot-nav a.touched .dot-label {
  opacity: 1;
}

.badge-bg {
  display: block;
  width: 100%;
  height: auto;
}

.hero .logo {
  position: absolute;
  width: 15%;
  left: 50%;
  top: 41%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

.footer-banner .badge {
  position: relative;
}

.footer-banner .logo-footer {
  position: absolute;
  width: 15%;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

#presentation {
  text-align: center;
}

#presentation .pitch {
  max-width: 100%;
  margin: 0 auto;
  font-size: 0.98rem;
  color: var(--text-soft);
  text-align: left;
}

#presentation .availability {
  max-width: 620px;
  margin: 1rem auto 0;
  padding: 0.6rem 1rem;
  border-left: 4px solid var(--orange);
  background: #fdf3e9;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-dark);
  text-align: left;
}

main {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

h2 {
  color: var(--navy);
  font-size: 1.5rem;
  margin: 0 0 1.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}

/* Competences */
.skill-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem 1.2rem;
}

.skill-grid li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  font-size: 0.93rem;
  position: relative;
}

.skill-grid li.type-it {
  border-left-color: var(--green);
}

.skill-grid li.type-pro {
  border-left-color: var(--pro-black);
}

/* Bande degradee vert+noir pour une competence a la fois IT et non-IT,
   sur un pseudo-element separe (un border-image degrade s'appliquerait
   aux 4 cotes de la bordure, pas juste celui de gauche). */
.skill-grid li.type-mixed {
  border-left-color: transparent;
}

.skill-grid li.type-mixed::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--green), var(--pro-black));
  border-radius: 4px 0 0 4px;
}

/* Experience */
.view-switch {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 30px 0;
}

.view-switch label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem 0.55rem calc(0.6rem + 4px);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, color 0.15s;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bandeau colore a gauche, sur un pseudo-element separe du reste de la
   bordure, pour garder un degrade propre uniquement sur cette bande. */
.view-switch label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
  border-radius: 6px 0 0 6px;
}

.view-switch input {
  accent-color: var(--navy);
  margin: 0;
}

/* Le bouton selectionne prend la couleur de ce qu'il affiche : Technicien
   en vert pur (que des postes IT), Complet en degrade vert+noir (melange IT
   et pro). Ca remplace le besoin d'une legende a part. */
.view-switch label:has(input:checked) {
  color: var(--navy-dark);
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(0,0,0,0.14);
}

.view-switch label:has(input[value="tech"]:checked)::before {
  background: var(--green);
}

.view-switch label:has(input[value="complet"]:checked)::before {
  background: linear-gradient(to bottom, var(--green), var(--pro-black));
}

.view-switch label:has(input[value="portfolio"]:checked)::before {
  background: var(--gold);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.job {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
}

.job-flagship h3 {
  font-size: 1.18rem;
}

/* Code couleur : vert = experience IT, noir = experience professionnelle non-IT,
   orange = formations (voir .f-date plus bas) */
.type-it {
  border-left: 5px solid var(--green);
}
.type-it .job-dates {
  color: var(--green);
}

.type-pro {
  border-left: 5px solid var(--pro-black);
}
.type-pro .job-dates {
  color: var(--pro-black);
}

.job-dates {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.job-dates span {
  font-weight: 400;
  color: var(--text-soft);
  text-transform: none;
}

.job h3 {
  margin: 0.25rem 0 0.15rem;
  font-size: 1.08rem;
  color: var(--navy-dark);
}

.job-meta {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-soft);
}

.job p:not(.job-meta) {
  margin: 0.4rem 0 0;
  font-size: 0.93rem;
}

.job-highlight {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--navy);
}

.job-compact {
  padding: 0.8rem 1.1rem;
}

.job-compact h3 {
  font-size: 0.98rem;
}


/* Realisations */
.realisation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.realisation-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 1rem 1.2rem;
}

.realisation-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  color: var(--navy-dark);
}

.realisation-list p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-soft);
}

.realisation-flagship {
  border-left-width: 5px;
}

.realisation-flagship h3 {
  font-size: 1.1rem;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.9rem;
  font-size: 0.85rem;
}

.mini-table th,
.mini-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

.mini-table th {
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mini-table td:first-child {
  font-weight: 600;
  color: var(--navy-dark);
}

.mini-table tr:last-child td {
  border-bottom: none;
}

/* Portfolio outils */
.portfolio-intro {
  max-width: 100%;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.tool-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.tool-grid[hidden] {
  display: none;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tool-card-img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
  box-sizing: border-box;
}

.tool-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-style: italic;
  border-bottom: 1px solid var(--border);
}

.tool-card h3 {
  margin: 0.8rem 0.9rem 0.3rem;
  font-size: 0.98rem;
  color: var(--navy-dark);
}

.tool-card p {
  margin: 0 0.9rem 0.9rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.tool-grid-tagline {
  text-align: center;
  font-style: italic;
  color: var(--text-soft);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

/* Formations */
.formation-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.formation-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}

.formation-list li:last-child { border-bottom: none; }

.f-date {
  display: inline-block;
  min-width: 128px;
  font-weight: 700;
  color: var(--orange);
}

/* Profil */
.profil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.profil-grid h3 {
  color: var(--navy);
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.profil-grid ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.93rem;
}

.profil-grid li { margin-bottom: 0.3rem; }

/* Contact */
.contact-cta {
  text-align: center;
}

#contact a {
  display: inline-block;
  margin-top: 0.3rem;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 1.05rem;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

#contact a:hover { background: #dbab74; }

.footer-banner {
  background: var(--navy-dark);
  padding: 1.6rem 0 0;
  margin-top: 1.5rem;
}

.footer-banner .site-nav {
  margin-top: 0;
  margin-bottom: 1.1rem;
}

.footer-banner .badge-bg {
  display: block;
  width: 100%;
}

@media (max-width: 480px) {
  h2 { font-size: 1.25rem; }
}

/* Impression / export PDF depuis le navigateur : rendu simple 1 colonne,
   pense pour rester lisible par un logiciel ATS (pas de mise en page en
   colonnes, pas de decor, texte noir sur fond blanc). Respecte tel quel le
   filtre CV (Technicien/Complet/Portfolio) deja affiche a l'ecran. */
.print-only { display: none; }

@media print {
  .hero, .site-nav, .view-switch, .footer-banner, #contact .contact-cta {
    display: none !important;
  }

  .print-only { display: block; }

  body {
    background: #fff;
    color: #000;
  }

  main {
    max-width: 100%;
    padding: 0;
  }

  section {
    padding: 0.8rem 0;
    border-bottom: 1px solid #ccc;
    break-inside: avoid;
  }

  h2 {
    color: #000;
    border-bottom-color: #000;
  }

  #presentation { text-align: left; }
  #presentation .pitch { text-align: left; margin: 0; }
  #presentation .availability {
    background: #fff;
    border-left: 2px solid #000;
    color: #000;
  }

  .skill-grid li,
  .job,
  .formation-list li,
  .realisation-list li {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .mini-table th, .mini-table td { border-bottom-color: #ccc; }
  .mini-table th, .mini-table td:first-child { color: #000; }

  #portfolio { break-inside: avoid; }
  .tool-grid { display: none; }

  .job { break-inside: avoid; margin-bottom: 0.5rem; }

  .type-it, .type-pro { border-left-width: 3px; }

  a { color: #000; text-decoration: underline; }

  .job-highlight { color: #000; }

  /* Une section repliee a l'ecran doit quand meme s'imprimer entiere. */
  main > section.collapsed > *:not(h2) { display: revert !important; }
}

/* Sections repliables (cliquer le titre replie/deplie le contenu) */
main > section > h2.collapsible-title {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.collapse-icon {
  font-size: 0.7em;
  color: var(--text-soft);
  margin-left: 0.6em;
}

main > section.collapsed > *:not(h2) {
  display: none;
}
