/* CV public : vert forêt, « code et nature ». Une feuille à l'écran, un A4 à l'impression. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --fond: #e8ebe5;
  --feuille: #ffffff;
  --cote: #edf3ee;
  --encre: #17211c;
  --encre-douce: #4f5c54;
  --ligne: #d5ddd6;
  --vert: #1e5b40;
  --vert-fort: #123d2a;
  --sur-vert: #f3f7f2;
  --sable: #8a6a3a;
  --police: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --titre: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0d1411; --feuille: #16221c; --cote: #1b2a22; --encre: #e6ede8; --encre-douce: #a8b7ad;
    --ligne: #2a3a31; --vert: #7cc79c; --vert-fort: #a3dbb9; --sur-vert: #0d1411; --sable: #d6ab69;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.55 var(--police); -webkit-font-smoothing: antialiased; }
a { color: var(--vert); }
:focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; border-radius: 4px; }
p { margin: 0 0 .6em; }
ul { margin: 0; }

/* ---- barre d'outils ---- */
.outils { width: min(940px, 100% - 32px); margin: 24px auto 14px; display: flex; justify-content: flex-end; align-items: center; gap: 18px; flex-wrap: wrap; }
.outil-bouton {
  background: var(--vert); color: var(--sur-vert); border: 0; border-radius: 10px; padding: 10px 18px;
  font: 600 15px var(--police); cursor: pointer; transition: background .2s, transform .2s;
}
.outil-bouton:hover { background: var(--vert-fort); transform: translateY(-1px); }
a.outil-bouton { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.outil-second { background: transparent; color: var(--vert); box-shadow: inset 0 0 0 1.5px var(--vert); }
.outil-second:hover { background: color-mix(in srgb, var(--vert) 12%, transparent); }
.outil-lien { font-weight: 600; font-size: 15px; }
.outil-retour { margin-right: auto; }
.icone-logo { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; stroke: none; }
.outil-linkedin { gap: 8px; padding: 9px 16px; }
.outil-linkedin .icone-logo { width: 17px; height: 17px; }
.lien-papier { display: none; }

/* ---- page Contact ---- */
.carte-contact {
  width: min(560px, 100% - 32px); margin: 8px auto 28px; padding: 44px 36px 36px; text-align: center;
  background: var(--feuille); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 14px 36px -12px rgba(0, 0, 0, .24);
}
.carte-contact .sigle { width: 96px; font-size: 36px; margin-bottom: 18px; }
.carte-contact h1 { margin: 0; font: 650 clamp(30px, 6vw, 40px)/1.1 var(--titre); letter-spacing: -.02em; }
.contact-nom { margin: 8px 0 26px; color: var(--encre-douce); }
.carte-contact:has(.contact-form) { width: min(640px, 100% - 32px); }
.contact-form { display: grid; gap: 14px; text-align: left; margin: 0 0 22px; }
.contact-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.contact-form .facultatif { font-weight: 400; color: var(--encre-douce); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--ligne); border-radius: 9px;
  background: var(--fond); color: var(--encre); font: 400 15.5px/1.5 var(--police);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--vert); outline-offset: 1px; border-color: var(--vert); }
.contact-form .outil-bouton { justify-self: start; }
.contact-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-ok { background: color-mix(in srgb, var(--vert) 12%, transparent); border-radius: 10px; padding: 18px 16px 8px; margin: 0 0 22px; }
.contact-erreur { background: #f6e1dc; color: #a63d2f; border-radius: 10px; padding: 10px 14px; text-align: left; }
@media (prefers-color-scheme: dark) { .contact-erreur { background: #3a1f1a; color: #e98b7c; } }
.contact-direct { margin: 0 0 8px; color: var(--encre-douce); font-size: 14.5px; overflow-wrap: anywhere; }
.contact-direct a { font-family: var(--mono); font-weight: 600; }
.lien-bouton { background: none; border: 0; padding: 0 0 0 6px; color: var(--encre-douce); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.contact-lieu { margin: 0; color: var(--encre-douce); font-size: 15px; }
@media screen and (max-width: 560px) {
  .contact-form input, .contact-form textarea { font-size: 16px; }  /* iPhone : pas de zoom au toucher */
  .carte-contact { padding: 32px 20px 26px; }
  .contact-grille { grid-template-columns: 1fr; }
  .contact-form .outil-bouton { justify-self: stretch; }
}

/* ---- la feuille (ordinateur ; l'impression et le téléphone ajustent plus bas) ---- */
.outils-cv { width: min(1040px, 100% - 48px); }
.feuille {
  width: min(1040px, 100% - 48px); margin: 0 auto 40px; background: var(--feuille);
  display: grid; grid-template-columns: clamp(250px, 30%, 316px) 1fr; border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(10, 30, 20, .05), 0 28px 64px -28px rgba(10, 30, 20, .38);
}

/* colonne de gauche */
.cote { background: var(--cote); padding: 48px 34px 44px; font-size: 15px; min-width: 0; }
.portrait { margin-bottom: 34px; }
.sigle, .photo {
  display: grid; place-items: center; width: 136px; max-width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; margin: 0 auto;
  background: var(--vert); color: var(--sur-vert); font: 600 50px var(--titre); object-fit: cover;
  box-shadow: 0 0 0 6px var(--feuille), 0 0 0 7px var(--ligne);
}
.cote section + section { margin-top: 28px; }
.cote h2 { margin: 0 0 12px; font: 700 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--vert); }
.cote ul { list-style: none; padding: 0; margin: 0; }

.contact-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.contact-liste li { margin: 0; line-height: 1.4; min-width: 0; }
.contact-liste a, .contact-ville { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.contact-liste a:hover { color: var(--vert); text-decoration: underline; text-underline-offset: 3px; }
.icone { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--vert); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icone.icone-logo { fill: var(--vert); stroke: none; width: 15px; height: 15px; }

.bloc-competences ul, .bloc-rubrique ul { display: flex; flex-wrap: wrap; gap: 6px; }
.bloc-competences li, .bloc-rubrique li {
  padding: 4px 11px; border-radius: 99px; background: var(--feuille); border: 1px solid var(--ligne);
  font-size: 13.5px; line-height: 1.35;
}
.bloc-langues li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--ligne); font-size: 14.5px; }
.bloc-langues li:first-child { padding-top: 0; }
.bloc-langues li:last-child { border-bottom: 0; }
.niveau { color: var(--encre-douce); text-align: right; }

/* colonne principale */
.principal { padding: 52px clamp(28px, 4.6vw, 58px) 48px; min-width: 0; }
.entete { position: relative; padding-bottom: 24px; margin-bottom: 34px; border-bottom: 1px solid var(--ligne); }
.entete::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 3px; border-radius: 3px; background: var(--vert); }
.entete h1 { margin: 0; font: 650 clamp(38px, 4.4vw, 50px)/1.02 var(--titre); letter-spacing: -.025em; }
.titre { margin: 12px 0 0; font-size: 20px; font-weight: 650; color: var(--vert); }
.sous-titre { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--encre-douce); }

.principal section + section { margin-top: 36px; }
.principal h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--vert); }
.principal h2::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }
.profil { font-size: 16px; line-height: 1.7; }
.recherche { margin: 18px 0 0; padding: 14px 18px; background: var(--cote); border-left: 4px solid var(--sable); border-radius: 0 12px 12px 0; font-weight: 500; line-height: 1.55; }

/* parcours : une frise ; l'intitulé à gauche, les dates à droite, le détail sur toute la largeur */
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; position: relative; margin: 0 0 0 6px; padding: 0 0 28px 28px; border-left: 2px solid var(--ligne); break-inside: avoid; }
.ligne:last-child { border-left-color: transparent; padding-bottom: 2px; }
.ligne::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--feuille); border: 3px solid var(--vert); }
.ligne > div { display: contents; }
.date {
  grid-column: 2; grid-row: 1; align-self: start; margin: 0; white-space: nowrap;
  font: 500 12.5px/1 var(--mono); color: var(--vert); background: var(--cote); padding: 6px 11px; border-radius: 99px;
}
.poste { grid-column: 1; grid-row: 1; margin: 0; font-size: 17.5px; font-weight: 650; line-height: 1.3; }
.poste .lieu { display: block; margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--encre-douce); }
.texte { grid-column: 1 / -1; margin: 8px 0 0; color: var(--encre-douce); line-height: 1.55; }
.ligne ul { grid-column: 1 / -1; margin: 12px 0 0; padding-left: 1.15em; color: var(--encre); }
.ligne li { margin-bottom: 6px; font-size: 15.5px; line-height: 1.55; }
.ligne li:last-child { margin-bottom: 0; }
.ligne li::marker { color: var(--vert); }

/* formation : l'école se lit comme l'employeur d'une expérience */
@media screen and (min-width: 761px) {
  .bloc-formation .texte { margin-top: 4px; font-size: 15px; font-weight: 500; }
}

/* écran moyen : les dates passent au-dessus de l'intitulé */
@media screen and (min-width: 761px) and (max-width: 960px) {
  .ligne .date { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin-bottom: 8px; }
  .ligne .poste { grid-row: auto; }
}

.pied { text-align: center; font-size: 13px; color: var(--encre-douce); padding: 0 16px 32px; }
.pied p { margin: 0; display: inline-flex; align-items: center; gap: 10px; }
.lien-espace { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--encre-douce); opacity: .55; transition: opacity .2s, color .2s, transform .4s; }
.lien-espace:hover, .lien-espace:focus-visible { opacity: 1; color: var(--vert); transform: rotate(60deg); }
@media (prefers-reduced-motion: reduce) { .lien-espace:hover { transform: none; } }

.seulement-mobile { display: none !important; }

/* ---- téléphone : un vrai CV mobile, pas la feuille A4 rétrécie ----
   .cote et .principal s'effacent (display: contents) : leurs blocs se rangent dans l'ordre de lecture. */
@media screen and (max-width: 760px) {
  body { background: var(--feuille); font-size: 16px; }
  .outils-cv { display: none; }
  .feuille { display: flex; flex-direction: column; width: 100%; margin: 0; border-radius: 0; box-shadow: none; }
  .cote, .principal { display: contents; }

  .portrait { order: 1; } .entete { order: 2; } .bloc-contact { order: 3; }
  .bloc-profil { order: 4; } .bloc-competences { order: 5; } .bloc-experience { order: 6; }
  .bloc-engagement { order: 7; } .bloc-formation { order: 8; } .bloc-langues { order: 9; } .bloc-rubrique { order: 10; }

  /* bandeau d'en-tête : portrait, nom, titre, contact */
  .portrait, .entete, .bloc-contact { background: var(--cote); text-align: center; }
  .portrait { padding: 30px 20px 2px; margin: 0; }
  .entete::after { display: none; }
  .portrait .sigle, .portrait .photo { width: 92px; max-width: none; font-size: 36px; margin: 0 auto; box-shadow: 0 0 0 4px var(--feuille); }
  .entete { border: 0; margin: 0; padding: 12px 22px 4px; }
  .entete h1 { font-size: clamp(30px, 9vw, 38px); }
  .titre { font-size: 18px; margin-top: 6px; }
  .sous-titre { font-size: 14px; line-height: 1.5; max-width: 32ch; margin: 6px auto 0; }
  .bloc-contact { padding: 14px 16px 24px; margin: 0; border-bottom: 1px solid var(--ligne); }
  .bloc-contact h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .contact-liste { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .contact-liste a, .contact-liste .contact-ville {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border-radius: 99px;
    background: var(--feuille); border: 1px solid var(--ligne); color: var(--encre); font-size: 14.5px; text-decoration: none;
  }
  .contact-liste a.contact-ecrire { background: var(--vert); border-color: var(--vert); color: var(--sur-vert); font-weight: 600; }
  .icone { display: inline-block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .icone.icone-logo { fill: currentColor; stroke: none; width: 15px; height: 15px; }
  .seulement-mobile { display: revert !important; }

  /* blocs de contenu */
  .bloc-profil, .bloc-competences, .bloc-parcours, .bloc-langues, .bloc-rubrique { padding: 0 22px; margin: 28px 0 0; }
  .bloc-competences + .bloc-competences, .bloc-rubrique + .bloc-rubrique, .bloc-langues + .bloc-rubrique { margin-top: 16px; }
  .cote h2, .principal h2 { margin: 0 0 10px; font-size: 12.5px; }
  .profil { text-align: left; hyphens: manual; }
  .recherche { margin-top: 14px; padding: 12px 14px; border-left-width: 4px; background: var(--cote); border-radius: 0 10px 10px 0; }

  /* compétences, langues, loisirs : des étiquettes */
  .bloc-competences ul, .bloc-langues ul, .bloc-rubrique ul { display: flex; flex-wrap: wrap; gap: 7px; }
  .bloc-competences li, .bloc-langues li, .bloc-rubrique li { margin: 0; padding: 6px 12px; border: 0; border-radius: 99px; background: var(--cote); font-size: 14.5px; line-height: 1.3; }
  .bloc-langues li { display: inline-flex; gap: 0; }
  .bloc-langues .niveau { color: var(--encre); }
  .bloc-langues .niveau::before { content: "\00a0· "; }

  /* parcours : une frise */
  .ligne { grid-template-columns: 1fr; gap: 3px; margin: 0 0 0 4px; padding: 0 0 20px 20px; }
  .ligne::before { top: 1px; }
  .ligne:last-child { padding-bottom: 0; }
  .ligne .date, .ligne .poste, .ligne .texte, .ligne ul { grid-column: auto; grid-row: auto; }
  .ligne .date { justify-self: start; margin: 0; padding: 0; background: none; font-size: 12.5px; line-height: 1.4; }
  .poste { font-size: 16.5px; }
  .poste span { display: block; font-size: 14.5px; margin-top: 1px; }
  .texte { font-size: 15px; }
  .ligne ul { padding-left: 1.05em; }
  .ligne li { font-size: 15px; margin-bottom: 4px; }

  /* pied : impression et accès à l'espace */
  .pied { margin-top: 36px; padding: 22px 16px 36px; border-top: 1px solid var(--ligne); display: grid; gap: 14px; justify-items: center; }
  .pied-imprimer { background: none; border: 1px solid var(--vert); color: var(--vert); border-radius: 99px; padding: 9px 18px; font: 600 14.5px var(--police); cursor: pointer; }
}

/* ---- impression : un A4, couleurs claires quoi qu'il arrive ---- */
@media print {
  @page { size: A4; margin: 0; }
  :root {
    --fond: #fff; --feuille: #fff; --cote: #edf3ee; --encre: #17211c; --encre-douce: #4f5c54; --ligne: #d5ddd6;
    --vert: #1e5b40; --vert-fort: #123d2a; --sur-vert: #f3f7f2; --sable: #8a6a3a;
    color-scheme: light;  /* toujours imprimé en clair, même en mode sombre */
  }
  html { background: #fff; }
  body { background: #fff; font-size: 8.4pt; line-height: 1.38; }
  .sans-impression, .icone { display: none !important; }
  .feuille { width: 210mm; min-height: 297mm; margin: 0; box-shadow: none; border-radius: 0; grid-template-columns: 29% 1fr; }
  .cote, .principal { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .cote { padding: 10mm 6mm 8mm; font-size: 8.2pt; }
  .portrait { margin-bottom: 5mm; }
  .sigle, .photo { width: 27mm; font-size: 23pt; box-shadow: 0 0 0 1.1mm #fff, 0 0 0 1.35mm var(--ligne); }
  .cote section + section { margin-top: 4.2mm; }
  .cote h2 { margin: 0 0 1.6mm; font-size: 7pt; }
  .contact-liste { gap: .5mm; }
  .contact-liste a, .contact-ville { font-size: 8pt; }
  .lien-ecran { display: none; }
  .lien-papier { display: inline; font-size: 7.4pt; }  /* sur papier, l'adresse en clair */
  .bloc-competences ul, .bloc-rubrique ul { gap: 1mm; }
  .bloc-competences li, .bloc-rubrique li { padding: .45mm 1.9mm; font-size: 7.3pt; line-height: 1.3; }
  .bloc-langues li { padding: .8mm 0; font-size: 7.8pt; }

  .principal { padding: 8.5mm 9mm 6mm 8mm; }
  .entete { padding-bottom: 2.4mm; margin-bottom: 3.4mm; }
  .entete::after { width: 14mm; height: .7mm; bottom: -.4mm; }
  .entete h1 { font-size: 23pt; }
  .titre { font-size: 11pt; margin-top: 1.2mm; }
  .sous-titre { font-size: 8.2pt; margin-top: .5mm; }
  .principal section + section { margin-top: 3mm; }
  .principal h2 { gap: 2.5mm; margin-bottom: 2mm; font-size: 7.2pt; }
  .profil { font-size: 8.4pt; line-height: 1.42; text-align: justify; hyphens: auto; }
  .recherche { margin-top: 2mm; padding: 1.6mm 3mm; border-left-width: .8mm; border-radius: 0 2mm 2mm 0; line-height: 1.38; }

  .ligne { margin-left: 1.2mm; padding: 0 0 1.8mm 4.6mm; border-left-width: .35mm; column-gap: 3mm; }
  .ligne:last-child { padding-bottom: 0; }
  .ligne::before { width: 2.6mm; height: 2.6mm; left: -1.5mm; top: .4mm; border-width: .55mm; }
  .date { font-size: 6.8pt; padding: .65mm 1.8mm; }
  .poste { font-size: 8.8pt; line-height: 1.25; }
  .poste .lieu { margin-top: .2mm; font-size: 7.9pt; }
  .texte { margin-top: .5mm; font-size: 8pt; line-height: 1.3; }
  .ligne ul { margin-top: .8mm; }
  .ligne li { margin-bottom: .15mm; font-size: 8pt; line-height: 1.28; }
  a { color: inherit; text-decoration: none; }
}
