/* ===================================================================
   CV Stanislas Beguin - feuille de style
   Couleurs principales modifiables dans :root ci-dessous.
   Tailles en "pt" (texte) et "mm" (mise en page A4).
   =================================================================== */

:root {
  --ink: #0F172A;
  /* texte principal (titres)      */
  --sub: #334155;
  /* texte courant                 */
  --mut: #94A3B8;
  /* texte secondaire / dates      */
  --accent: #2563EB;
  /* couleur d'accent (bleu)       */
  --line: #E8EBF0;
  /* filets clairs                 */
  --rule: #D7DCE6;
  /* barre de séparation verticale */
  --panel: #F7F9FC;
  /* fond des cartes projets       */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: #E9ECF1;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Bandeau d'aide (visible à l'écran, masqué à l'impression) */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-tip {
  flex: 1;
  text-align: center;
}

.bar b {
  color: #9DBBFF;
}

.bar .kbd {
  background: rgba(255, 255, 255, .14);
  border-radius: 5px;
  padding: 2px 7px;
  font-weight: 600;
}

a.dl-btn,
a.dl-btn:link,
a.dl-btn:visited,
a.dl-btn:hover,
a.dl-btn:active {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #2563EB !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 5px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  letter-spacing: .1px !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

a.dl-btn:hover {
  background: #1d4ed8 !important;
}

/* Feuille A4 */
.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 54px auto 40px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
  overflow: hidden;
}

.pad {
  padding: 7.5mm 13mm 6mm;
}

/* ---------- En-tête ---------- */
header {
  display: flex;
  align-items: center;
  gap: 9mm;
}

.h-text {
  flex: 1;
}

.name {
  font-size: 26pt;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--ink);
}

.name span {
  color: var(--accent);
}

.role {
  font-size: 10.1pt;
  font-weight: 600;
  color: var(--sub);
  margin-top: 4pt;
  letter-spacing: .1px;
}

.tagline {
  font-size: 8.5pt;
  font-weight: 400;
  color: var(--mut);
  margin-top: 4pt;
}

.tagline b {
  color: var(--accent);
  font-weight: 600;
}

.photo {
  width: 27mm;
  height: 27mm;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- Coordonnées ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 3pt 16pt;
  margin-top: 3mm;
  padding-top: 2.8mm;
  border-top: 1px solid var(--line);
  font-size: 8.3pt;
  color: var(--sub);
}

.contact span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.contact .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- Deux colonnes + barre de séparation ---------- */
.grid {
  display: flex;
  margin-top: 3.5mm;
  align-items: stretch;
}

.col-main {
  flex: 1.62;
  min-width: 0;
  padding-right: 8mm;
}

.col-side {
  flex: 1;
  min-width: 0;
  padding-left: 8mm;
  border-left: 1px solid var(--rule);
}

/* ---------- Sections ---------- */
.sec {
  margin-bottom: 3mm;
}

.sec:last-child {
  margin-bottom: 0;
}

.sec-h {
  font-size: 8.2pt;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2mm;
}

/* ---------- Entrées (expérience / formation) ---------- */
.item {
  display: flex;
  gap: 6pt;
  align-items: flex-start;
  margin-bottom: 2.5mm;
}

.item:last-child {
  margin-bottom: 0;
}

/* Pastille logo (10mm) - remplace l'image dans images/ */
.logo-chip {
  width: 10mm;
  height: 10mm;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1mm;
  margin-top: 1.5pt;
  overflow: hidden;
}

/* pitStop garde la taille d'origine */
.logo-chip.pitstop {
  width: 8mm;
  height: 8mm;
}

.logo-chip img {
  max-width: 100%;
  max-height: 120%;
  object-fit: contain;
  display: block;
}

.ibody {
  flex: 1;
  min-width: 0;
}

.it-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8pt;
}

.it-title {
  font-size: 9.5pt;
  font-weight: 700;
  color: var(--ink);
}

.it-title .co {
  color: var(--accent);
}

.it-date {
  font-size: 7.7pt;
  font-weight: 600;
  color: var(--mut);
  white-space: nowrap;
}

.it-ctx {
  font-size: 7.9pt;
  color: var(--mut);
  font-style: italic;
  margin: 1.5pt 0 2pt;
  line-height: 1.35;
}

.it-ctx.solo {
  margin-bottom: 0;
}

/* Puces : Action -> Resultat (methode STAR) */
ul {
  list-style: none;
}

ul li {
  font-size: 8.5pt;
  line-height: 1.38;
  color: var(--sub);
  padding-left: 11pt;
  position: relative;
  margin-bottom: 1.5pt;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5.6pt;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

ul li:last-child {
  margin-bottom: 0;
}

.arr {
  color: var(--accent);
  font-weight: 700;
  padding: 0 1px;
}

/* la fleche -> */
ul li b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Profil ---------- */
.summary {
  font-size: 8.6pt;
  line-height: 1.48;
  color: var(--sub);
}

.summary b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Compétences ---------- */
.skill {
  margin-bottom: 2.5mm;
}

.skill:last-child {
  margin-bottom: 0;
}

.skill .cat {
  font-size: 8.2pt;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2pt;
}

.skill .val {
  font-size: 8.3pt;
  line-height: 1.5;
  color: var(--sub);
}

/* ---------- Langues ---------- */
.lang {
  display: flex;
  justify-content: space-between;
  font-size: 8.3pt;
  padding: 3pt 0;
  border-bottom: 1px solid var(--line);
}

.lang:last-child {
  border-bottom: none;
}

.lang .l {
  color: var(--ink);
  font-weight: 600;
}

.lang .v {
  color: var(--mut);
}

/* ---------- Formation (descriptions) ---------- */
.edu .it-title {
  font-size: 8.9pt;
}

.edu .desc {
  font-size: 7.75pt;
  line-height: 1.42;
  color: var(--mut);
  margin-top: 2pt;
}

/* ---------- Projets SIGL (cartes pleine largeur) ---------- */
.full {
  margin-top: 3.5mm;
}

.proj-grid {
  display: flex;
  gap: 5mm;
}

.pcard {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3mm 4mm;
}

.pcard .pt {
  font-size: 8.7pt;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.pcard .pc {
  font-size: 7.5pt;
  font-weight: 600;
  color: var(--accent);
  margin: 2pt 0 3pt;
}

.pcard .pd {
  font-size: 7.8pt;
  line-height: 1.42;
  color: var(--sub);
}

.pcard .pd b {
  color: var(--ink);
  font-weight: 600;
}

/* ===================================================================
   MOBILE (écran uniquement — n'affecte pas l'impression PDF)
   =================================================================== */
@media screen and (max-width: 700px) {

  .bar {
    justify-content: space-between;
    padding: 8px 12px;
  }

  .bar-tip {
    display: none;
  }

  a.dl-btn {
    width: 100%;
    justify-content: center;
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 8px;
  }

  .sheet {
    width: 100%;
    margin: 42px 0 0;
    border-radius: 0;
    box-shadow: none;
    min-height: unset;
  }

  .pad {
    padding: 5mm 4mm 8mm;
  }

  header {
    gap: 3.5mm;
  }

  .photo {
    width: 17mm;
    height: 17mm;
  }

  .name {
    font-size: 18pt;
    letter-spacing: -.5px;
  }

  .role {
    font-size: 9pt;
    margin-top: 3pt;
  }

  .tagline {
    font-size: 8pt;
    margin-top: 3pt;
  }

  .contact {
    flex-direction: column;
    gap: 4pt;
  }

  .grid {
    flex-direction: column;
    margin-top: 3mm;
  }

  .col-main {
    padding-right: 0;
  }

  .col-side {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-top: 4mm;
    margin-top: 3mm;
  }

  .proj-grid {
    flex-direction: column;
    gap: 3mm;
  }

  .pcard {
    padding: 3.5mm 4mm;
  }

  .it-top {
    flex-wrap: wrap;
    gap: 2pt;
  }

  .it-date {
    flex-shrink: 0;
  }
}

/* ===================================================================
   IMPRESSION : Ctrl/Cmd + P  ->  Enregistrer en PDF
   Marges : Aucune  |  cocher "Graphismes d'arrière-plan"
   =================================================================== */
@page {
  size: A4;
  margin: 0;
}

@media print {

  html,
  body {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bar {
    display: none;
  }

  .sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    box-shadow: none;
  }
}
/* ===================================================================
   PLEINE PAGE : espacements de base compacts (garantis de tenir sur
   1 page A4), puis flexbox répartit l'espace libre sur toute la
   hauteur — le CV "respire" et occupe exactement la feuille.
   =================================================================== */

/* Espacements minimaux (marges de sécurité pour tenir sur 1 page) */
.pad{ padding:6mm 13mm; }
.grid{ margin-top:2.5mm; }
.sec{ margin-bottom:2.2mm; }
.sec-h{ margin-bottom:1.6mm; }
.item{ margin-bottom:1.8mm; }
.skill{ margin-bottom:1.8mm; }
.full{ margin-top:2.5mm; }
.pcard{ padding:2.6mm 3.6mm; }
.logo-chip{ width:8.5mm; height:8.5mm; }
.it-title{ font-size:9.2pt; }
.it-date{ font-size:7.5pt; }
.it-ctx{ font-size:7.7pt; margin:1pt 0 1.5pt; }
ul li{ font-size:8.4pt; line-height:1.38; margin-bottom:1pt; }
.summary{ font-size:8.5pt; line-height:1.45; }
.skill .val{ font-size:8.2pt; line-height:1.5; }
.tagline{ font-size:8.3pt; }

/* Répartition verticale : écran large + impression PDF */
@media screen and (min-width:701px), print {

  .pad{
    display:flex;
    flex-direction:column;
    height:297mm;
  }

  /* le corps (2 colonnes) absorbe toute la hauteur restante */
  .grid{ flex:1; }

  /* Colonne principale : la section Expérience s'étire et
     l'espace libre se répartit entre ses entrées */
  .col-main{
    display:flex;
    flex-direction:column;
  }

  .col-main .sec:last-child{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    margin-bottom:0;
  }

  /* Colonne latérale : les sections se répartissent sur la hauteur */
  .col-side{
    display:flex;
    flex-direction:column;
    justify-content:space-between;
  }
}

@media print {
  /* légèrement sous 297mm pour éviter qu'un arrondi de rendu
     ne crée une 2e page blanche */
  .pad{ height:296.5mm; }

  .full,
  .pcard,
  .item{
    break-inside:avoid;
    page-break-inside:avoid;
  }
}
