/* ==========================================================
   Style « Tech » : écriture de terminal pour les titres et les détails.
   4 looks (réglage « Look du style Tech ») :
   - clair (cv--tech-light), sombre (cv--tech-dark), code commenté (cv--tech-comment) : une colonne ;
   - éditeur de code (cv--tech-editor) : deux colonnes, la colonne de gauche sombre.
   ========================================================== */
.cv--tech {
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --code-bg: #f6f8fa;
  --code-line: #e3e7ec;
  --acc-light: color-mix(in srgb, var(--accent) 45%, #fff); /* couleur lisible sur fond sombre */
  background: #fff;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 8.6pt;
}

/* ---------- Une colonne (clair, sombre, code commenté) ---------- */
.cv--tech:not(.cv--tech-editor) {
  --break-top: 13mm; --break-bottom: 12mm;
  --head-top: 13mm; --head-left: 15mm; --head-right: 15mm; /* réglage « En-tête » */
  padding: var(--break-top) 15mm var(--break-bottom);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* En-tête : nom avec un curseur « _ », poste précédé de « > » */
.cv--tech .cv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm; margin-bottom: 6mm; }
.cv--tech .cv-head__text { flex: 1 1 auto; min-width: 0; }
.cv--tech .cv-name { color: var(--ink); font-family: var(--mono); font-size: 22pt; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.cv--tech .cv-name > :last-child::after { content: '_'; color: var(--accent); }
.cv--tech .cv-title { margin-top: 2mm; color: var(--accent-ink); font-family: var(--mono); font-size: 10pt; font-weight: 500; }
.cv--tech .cv-title::before { content: '> '; color: var(--ink-mute); }
.cv--tech .cv-contact--inline {
  flex-direction: row; flex-wrap: wrap; gap: 1.5mm 4.5mm;
  margin-top: 3.5mm;
  color: var(--ink-soft); font-family: var(--mono); font-size: 7.4pt;
}
.cv--tech .cv-contact .cv-ico { color: var(--accent); }
.cv--tech:not(.cv--tech-editor):is(.cv--head-band, .cv--head-gradient, .cv--head-dark) .cv-head { padding-bottom: 7mm; }
/* Sur un en-tête de couleur : curseur et « > » de la couleur du texte */
.cv--tech:is(.cv--head-band, .cv--head-gradient, .cv--head-dark) .cv-name > :last-child::after { color: inherit; }
.cv--tech:is(.cv--head-band, .cv--head-gradient, .cv--head-dark) .cv-title::before { color: inherit; opacity: .7; }

/* Photo : à droite du nom, à gauche, ou centrée au-dessus (l'en-tête se centre alors) */
.cv--tech { --photo-size: 24mm; }
.cv--tech:is(.cv--photo-left, .cv--photo-center) .cv-head > .cv-photo { order: -1; }
.cv--tech.cv--photo-center:not(.cv--tech-editor) .cv-head { flex-direction: column; align-items: center; gap: 4mm; text-align: center; }
.cv--tech.cv--photo-center:not(.cv--tech-editor) .cv-contact--inline { justify-content: center; }

/* Titres de section : « ## Profil » suivi d'un trait en pointillés */
.cv--tech .cv-sec { margin-bottom: 5mm; }
.cv--tech .cv-h {
  display: flex; align-items: center; gap: 2.5mm;
  margin-bottom: 2.6mm;
  color: var(--ink);
  font-family: var(--mono); font-size: 10pt; font-weight: 700;
}
.cv--tech .cv-h::before { content: '##'; color: var(--accent); }
.cv--tech .cv-h::after { content: ''; flex: 1; border-top: 1px dashed #cfd5dd; }
.cv--tech .cv-text { color: var(--ink-soft); line-height: 1.55; }

/* Entrées : dates en écriture de terminal, puces « ▹ » */
.cv--tech .cv-entries { gap: 3.6mm; }
.cv--tech .cv-entry__title { color: var(--ink); font-size: 9.8pt; font-weight: 700; }
.cv--tech .cv-entry__date { color: var(--ink-mute); font-family: var(--mono); font-size: 7.4pt; }
.cv--tech .cv-entry__sub { margin-top: .4mm; color: var(--accent-ink); font-weight: 500; }
.cv--tech .cv-entry__body { margin-top: 1.3mm; color: var(--ink-body); line-height: 1.5; }
.cv--tech .cv-bullets li { padding-left: 4mm; }
.cv--tech .cv-bullets li::before {
  content: '▹'; top: 0; left: 0;
  width: auto; height: auto; border-radius: 0;
  background: none; color: var(--accent);
}

/* Stack technique et technos : comme du code */
.cv--tech .cv-stack { border: 1px solid var(--code-line); border-radius: 1.2mm; background: var(--code-bg); font-family: var(--mono); }
.cv--tech .cv-stack__label { color: var(--ink-mute); letter-spacing: .04em; }
.cv--tech .cv-stack__label::before { content: '$ '; color: var(--accent); }
.cv--tech .cv-stack__list { color: var(--ink-soft); font-size: .86em; font-weight: 400; }
.cv--tech .cv-tag {
  border: 1px solid var(--code-line); border-radius: .8mm;
  background: var(--code-bg); color: var(--ink-soft);
  font-family: var(--mono); font-size: 6.6pt;
}
.cv--tech .cv-dots i { width: 5px; height: 5px; border-radius: 1px; }

/* Compétences : deux colonnes avec niveaux ; avec technos, une ligne par compétence
   → nom | technos | niveau */
.cv--tech:not(.cv--tech-editor) .cv-skills--dots { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2mm 10mm; }
.cv--tech:not(.cv--tech-editor) .cv-skills--dots .cv-skill { display: flex; align-items: center; justify-content: space-between; gap: 4mm; }
.cv--tech:not(.cv--tech-editor) .cv-skills--tagged { display: flex; flex-direction: column; gap: 2mm; }
.cv--tech:not(.cv--tech-editor) .cv-skills--tagged .cv-skill { display: grid; grid-template-columns: 44mm 1fr auto; align-items: start; column-gap: 4mm; }
.cv--tech:not(.cv--tech-editor) .cv-skills--tagged .cv-skill__name { color: var(--ink); font-weight: 600; }
.cv--tech:not(.cv--tech-editor) .cv-skills--tagged .cv-tags { grid-column: 2; grid-row: 1; margin-top: 0; }
.cv--tech:not(.cv--tech-editor) .cv-skills--tagged .cv-dots { grid-column: 3; grid-row: 1; margin-top: .45em; gap: 2px; }

/* Langues et centres d'intérêt */
.cv--tech .cv-langs { display: flex; flex-wrap: wrap; gap: 2mm 8mm; }
.cv--tech .cv-lang { display: flex; gap: 2mm; }
.cv--tech .cv-lang__name { font-weight: 600; }
.cv--tech .cv-lang__level { color: var(--ink-mute); font-family: var(--mono); font-size: .92em; }
.cv--tech .cv-inline { color: var(--ink-soft); }

/* ---------- Terminal sombre : l'en-tête comme une fenêtre de terminal ---------- */
.cv--tech.cv--tech-dark { --head-top: 0mm; --head-left: 0mm; --head-right: 0mm; } /* l'en-tête touche déjà les bords */
.cv--tech-dark .cv-head {
  position: relative;
  margin: calc(-1 * var(--break-top)) -15mm 6mm;
  padding: 14mm 15mm 8mm;
  background: #0f172a;
}
/* Les 3 points de couleur d'une fenêtre */
.cv--tech-dark .cv-head__text::before {
  content: ''; position: absolute; top: 5mm; left: 15mm;
  width: 2.6mm; height: 2.6mm; border-radius: 50%;
  background: #ff5f57;
  box-shadow: 4mm 0 0 #febc2e, 8mm 0 0 #28c840;
}
.cv--tech-dark .cv-name { color: #f8fafc; }
.cv--tech-dark .cv-title,
.cv--tech-dark .cv-contact .cv-ico { color: var(--acc-light); }
.cv--tech-dark .cv-title::before { color: #64748b; }
.cv--tech-dark .cv-contact--inline { color: #cbd5e1; }
/* Un autre en-tête choisi (bandeau, dégradé, bloc foncé) remplace le fond sombre */
.cv--tech-dark:is(.cv--head-band, .cv--head-gradient, .cv--head-dark) .cv-head { background: none; }

/* ---------- Code commenté : « // PROFIL », « /* poste */ », dates entre crochets ---------- */
.cv--tech-comment .cv-name > :last-child::after { content: none; }
.cv--tech-comment .cv-name__first { color: var(--accent); }
.cv--tech-comment .cv-title { color: var(--ink-mute); }
.cv--tech-comment .cv-title::before { content: '/* '; }
.cv--tech-comment .cv-title::after { content: ' */'; }
.cv--tech-comment .cv-h { color: var(--ink-mute); font-size: 8.4pt; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.cv--tech-comment .cv-h::before { content: '//'; font-weight: 700; }
.cv--tech-comment .cv-h::after { border-top-style: solid; border-color: var(--rule); }
.cv--tech-comment .cv-entry { padding-left: 3.5mm; border-left: 2px solid var(--accent-tint); }
.cv--tech-comment .cv-entry__date::before { content: '['; }
.cv--tech-comment .cv-entry__date::after { content: ']'; }

/* ---------- Éditeur de code : deux colonnes, la colonne de gauche sombre ---------- */
.cv--tech-editor {
  --break-top: 15mm; --break-bottom: 12mm;
  --head-top: 15mm; --head-left: 81mm; --head-right: 13mm; /* réglage « En-tête » */
  display: grid;
  grid-template-columns: 70mm 1fr;
  /* Le fond de la colonne est peint sur toute la hauteur (même sur la page 2) */
  background: linear-gradient(to right, #0f172a 70mm, #fff 70mm);
  font-size: 9pt;
}
.cv--tech-editor.cv--head-dark { --head-left: 11mm; } /* bloc foncé : colonne principale seulement */
/* À l'impression, la colonne sombre est peinte sur chaque page (comme le style Moderne) */
@media print {
  .cv--tech-editor { z-index: 0; background: #fff; }
  .cv--tech-editor::before {
    content: ''; position: fixed; z-index: -1;
    top: 0; bottom: 0; left: 0; width: 70mm;
    background: #0f172a;
  }
}
.cv--tech-editor .cv-aside,
.cv--tech-editor .cv-main {
  display: flex; flex-direction: column; gap: 7mm;
  min-width: 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.cv--tech-editor .cv-aside { padding: 14mm 8mm var(--break-bottom) 10mm; color: #cbd5e1; }
.cv--tech-editor .cv-main { padding: var(--break-top) 13mm var(--break-bottom) 11mm; }
.cv--tech-editor:is(.cv--head-band, .cv--head-gradient, .cv--head-dark) .cv-main .cv-head { padding-bottom: 6mm; }

/* Photo : en haut de la colonne, à gauche, au centre ou à droite */
.cv--tech-editor { --photo-size: 34mm; }
.cv--tech-editor.cv--photo-center .cv-photo { align-self: center; }
.cv--tech-editor.cv--photo-right .cv-photo { align-self: flex-end; }
.cv--tech-editor .cv-photo--initials .cv-photo__crop { background: var(--accent); color: var(--on-accent); }

/* En-tête : prénom fin, nom en gras, poste précédé de « $ » */
.cv--tech-editor .cv-head { display: block; margin-bottom: 0; }
.cv--tech-editor .cv-name { font-size: 24pt; font-weight: 400; line-height: 1.05; }
.cv--tech-editor .cv-name__last { font-weight: 800; }
.cv--tech-editor .cv-name > :last-child::after { content: none; }
.cv--tech-editor .cv-title { margin-top: 3mm; }
.cv--tech-editor .cv-title::before { content: '$ '; }

/* Titres de section : « ~/Contact » dans la colonne, « # Profil » à droite */
.cv--tech-editor .cv-aside .cv-h { margin-bottom: 3.2mm; color: var(--acc-light); font-size: 9pt; }
.cv--tech-editor .cv-aside .cv-h::before { content: '~/'; color: #64748b; }
.cv--tech-editor .cv-aside .cv-h::after { content: none; }
.cv--tech-editor .cv-main .cv-h::before { content: '#'; }

/* Colonne : contact, compétences, langues, intérêts */
.cv--tech-editor .cv-contact { gap: 2.4mm; color: #cbd5e1; font-size: 8.4pt; }
.cv--tech-editor .cv-contact__item { align-items: flex-start; }
.cv--tech-editor .cv-contact .cv-ico { margin-top: .1em; color: var(--acc-light); }
.cv--tech-editor .cv-skills--bars,
.cv--tech-editor .cv-langs { display: flex; flex-direction: column; gap: 2.6mm; }
.cv--tech-editor .cv-skill__name { display: block; margin-bottom: 1.2mm; color: #f1f5f9; font-size: 8.5pt; font-weight: 500; }
.cv--tech-editor .cv-aside .cv-meter { background: rgba(255, 255, 255, .14); }
.cv--tech-editor .cv-aside .cv-meter__fill { background: var(--acc-light); }
/* Avec technos : niveau en 5 carrés à droite du nom, technos en dessous */
.cv--tech-editor .cv-skills--dots { display: flex; flex-direction: column; gap: 3.8mm; }
.cv--tech-editor .cv-skills--dots .cv-skill { display: grid; grid-template-columns: 1fr auto; align-items: start; column-gap: 3mm; }
.cv--tech-editor .cv-skills--dots .cv-skill__name { margin-bottom: 0; font-size: 8.6pt; font-weight: 600; }
.cv--tech-editor .cv-skills--dots .cv-dots { gap: 3px; margin-top: .45em; }
.cv--tech-editor .cv-skills--dots .cv-dots i { background: rgba(255, 255, 255, .16); }
.cv--tech-editor .cv-skills--dots .cv-dots i.on { background: var(--acc-light); }
.cv--tech-editor .cv-skills--dots .cv-tags { grid-column: 1 / -1; gap: 1.1mm; margin-top: 1.8mm; }
.cv--tech-editor .cv-aside .cv-tag { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); color: #e2e8f0; font-weight: 500; }
.cv--tech-editor .cv-lang { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: 1.2mm; }
.cv--tech-editor .cv-lang__name { color: #f1f5f9; font-size: 8.5pt; }
.cv--tech-editor .cv-lang__level { color: #94a3b8; font-size: 7.6pt; }
.cv--tech-editor .cv-lang .cv-meter { grid-column: 1 / -1; }
.cv--tech-editor .cv-aside .cv-chip { background: rgba(255, 255, 255, .1); color: #e2e8f0; font-size: 8pt; }

/* Entrées : un petit carré devant chaque titre (le logo le remplace) */
.cv--tech-editor .cv-main .cv-entries { gap: 4.5mm; }
.cv--tech-editor .cv-main .cv-entry { position: relative; padding-left: 5mm; }
.cv--tech-editor .cv-main .cv-entry::before {
  content: ''; position: absolute; left: 0; top: .42em;
  width: 9px; height: 9px; border-radius: 2px;
  background: #fff; border: 2px solid var(--accent);
}
.cv--tech-editor .cv-main .cv-entry.has-logo { padding-left: 0; }
.cv--tech-editor .cv-main .cv-entry.has-logo::before { display: none; }
.cv--tech-editor .cv-entry__date { color: var(--accent-ink); font-weight: 600; }
.cv--tech-editor .cv-entry__sub { color: var(--ink-soft); }
.cv--tech-editor .cv-entry__body { font-size: 8.6pt; }

/* Avec des icônes devant les titres : l'icône remplace « ## », « // » ou « ~/ » */
.cv--tech[class*="cv--ico-"] .cv-sec .cv-h::before { content: none; }
