/* ============================================================
   CV MALIK BABAHAMOU — Feuille de style
   Conventions :
   - Format A4 : 210mm × 297mm
   - 2 colonnes : gauche 44% / droite 56%
   - Fond : blanc #fff
   - Texte principal : #111
   - Accent : #7c3aed (violet)
   - Border sections : 1.5px solid #111, radius 0
   - Font : Inter (local ou CDN fallback)
   - Body size : 11.5px / Line-height : 1.45
   - H2 sections : 13.5px, uppercase, bold
   - H2 underline : 36px, 2.5px, accent
   - Padding section : 10px 12px
   - Gap colonnes : 7px
   - Gap sections : 7px
   - IS_PRIVATE : contrôlé via PHP (.private masqué si public)
   ============================================================ */

/* FONTS */

/* REGULAR (Le standard) */
@font-face {
  font-family: 'Garet';
  src: url('../fonts/Garet-Font/Garet-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* REGULAR ITALIC */
@font-face {
  font-family: 'Garet';
  src: url('../fonts/Garet-Font/Garet-Regular-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* BOLD (Gras) */
@font-face {
  font-family: 'Garet';
  src: url('../fonts/Garet-Font/Garet-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* BLACK (Le plus épais, souvent utilisé pour les titres d'impact) */
@font-face {
  font-family: 'Garet';
  src: url('../fonts/Garet-Font/Garet-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Garet', sans-serif;
  font-size: var(--11);
  line-height: 1.45;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}

/* --- VARIABLES --- */
:root {
  --secondary-color: #5e17eb;
  --border: 2px solid #111;
  --gap-bloc: 18px;
  --col-left: calc(65% - var(--gap-bloc));
  --col-right: calc(100% - var(--col-left) - var(--gap-bloc));

  /* canva pt -> px */
  --10: 13px; /* 13,3334px */
  --11: 15px; /* 14,6667px */
  --12: 16px;
  --14: 19px;
  --16: 22px; /* 21.6px */
  --18: 24px;

  --width-header: 83%;
}

@media screen and (max-width: 700px) {
  :root {
  --10: 12px; /* 13,3334px */
  --11: 14px; /* 14,6667px */
  --12: 15px;
  --14: 17px;
  --16: 20px; /* 21.6px */
  --18: 21px;

  --width-header: 100%;
  }
}

/* --- WRAPPER A4 --- */
#cv {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  color: #111;
  padding: 5mm;
  display: flex;
  flex-direction: column;
  gap: var(--gap-bloc);
}


/* --- COLONNES --- */
#cv a {
  color: #000;
  text-decoration: none;
}

#cv #body {
  display: grid;
  grid-template-columns: var(--col-left) var(--col-right);
  gap: var(--gap-bloc);
  align-items: start;
}

#cv .col {
  display: flex;
  flex-direction: column;
  gap: var(--gap-bloc);
}

/* --- BLOCS SECTIONS --- */
.bloc {
  border: var(--border);
  padding: 0 8px 10px 14px;
  break-inside: avoid;
  box-shadow: -8px 8px 0 #1113;
}

.bloc > *:last-child {
  margin-bottom: 5px;
}

.bold {
  font-weight: 700 !important;
}

.flex {
  display: flex !important;
}

.grid-2 {
  display: flex;
  gap: 5px;
}
.grid-2 ul {
  flex: 1;
}

/* --- TITRE DE SECTION H2 --- */
.bloc > h2 {
  font-size: var(--14);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 15px;
  margin-left: 10px;
  margin-top: 15px;
  position: relative;
  line-height: 1.1;
}

.bloc h3 {
  font-size: var(--12);
  font-weight: bold;
  margin-top: 10px;
}

.bloc > h2 > span.underline {
  border-bottom: 4px solid var(--secondary-color);
  display: inline-block;
}

b {
  color: var(--secondary-color);
  font-weight: 700;
}

span.skill {
  font-weight: 600;
}
span.skill::before {
  content: '[';
}
span.skill::after {
  content: ']';
}

ul {
  list-style-type: none;
  margin-bottom: 5px;
}
.bloc.disc ul {
  list-style-type: disc;
  padding-left: 15px;
  margin-left: 5px;
}

ul.flex > li {
  flex: 1;
}

ul > p {
  transform: translate(calc(-1 * var(--11) / 1.5));
}


/* ============================================================
   PRINT
   ============================================================ */
@media print {
  @page {
    margin: 0;
  }

  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #cv {
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 3mm 4mm 0mm 5mm !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  #cv-print-btn {
    display: none !important;
  }

  #cv .bloc {
    break-inside: avoid;
  }

  #cv a {
    text-decoration: none !important;
    color: inherit !important;
  }

  #cv li#link-to-online-cv {
    display: inline-flex !important;
  }
}

/* ============================================================
   HEADER
   ============================================================ */


#cv #header {
  border: var(--border);
  display: flex;
  gap: 14px;
  padding: 10px 12px;
  width: var(--width-header);
  min-width: min-content;
}

#cv #header .photo {
  border: var(--border);
  display: block;
  height: 85px;
  margin-left: 5px;
  min-width: 80px;
  object-fit: cover;
  width: 80px;
}

#cv #header .text {
  margin-left: 10px;
}

#cv #header .name {
  font-size: var(--16);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 5px;
  text-transform: uppercase;
}
#cv .name > span.underline {
  border-bottom: 5px solid var(--secondary-color);
  display: inline-block;
}


/* ============================================================
   RESPONSIVE ÉCRAN (preview hors A4)
   ============================================================ */
@media screen and (max-width: 230mm) {
  #cv {
    width: 100%;
    padding: 4vw;
  }

  #cv #body {
    grid-template-columns: 1fr;
  }
}