@page {
    size: A4;
    margin: 8mm;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8.6pt;
    line-height: 1.18;
}

* {
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

#cv {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    box-shadow: none;
}

#top {
    padding: 0 0 5mm;
    margin: 0 0 4mm;
    border-bottom: 1.2pt solid #000;
}

.identity {
    display: table;
    width: 100%;
}

.identity-main,
.contact-block {
    display: table-cell;
    vertical-align: top;
}

.identity-main {
    width: 67%;
    padding-right: 5mm;
}

.contact-block {
    width: 33%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.name {
    margin: 0 0 1.5mm;
    font-size: 16pt;
    line-height: 1.05;
    color: #000 !important;
}

.job {
    margin: 0 0 2mm;
    font-size: 10pt;
    font-weight: 700;
    color: #000 !important;
}

.summary {
    margin: 0;
    max-width: none;
    color: #000 !important;
}

.section-label,
.section-title,
.sidebar-section h2,
.contact-label,
.contact-value,
.experience-role,
.experience-date,
.education-year,
.strong,
.project-card h3,
a {
    color: #000 !important;
}

.section-label,
.section-title,
.sidebar-section h2 {
    margin: 0 0 1.8mm;
    font-size: 9.3pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li + li {
    margin-top: 1.1mm;
}

.contact-label {
    display: block;
    font-size: 7.6pt;
    font-weight: 700;
    text-transform: uppercase;
}

.contact-value {
    display: block;
    font-size: 8.3pt;
    word-break: break-word;
}

#main-layout {
    display: table;
    width: 100%;
    table-layout: fixed;
}

#content,
#sidebar {
    display: table-cell;
    vertical-align: top;
    padding: 0;
    background: transparent;
    border: 0;
}

#content {
    width: 68%;
    padding-right: 5mm;
}

#sidebar {
    width: 32%;
}

.section,
.sidebar-section,
.project-card,
.experience-item,
.education-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

.section + .section,
.sidebar-section + .sidebar-section {
    margin-top: 3.2mm;
}

.experience-item {
    padding: 0 0 2.2mm;
    margin: 0 0 2.2mm;
    border-bottom: 0.7pt solid #bdbdbd;
}

.experience-header {
    display: table;
    width: 100%;
    margin-bottom: 1.2mm;
}

.experience-main,
.experience-date {
    display: table-cell;
    vertical-align: top;
}

.experience-main {
    width: 73%;
    padding-right: 3mm;
}

.experience-role {
    margin: 0 0 0.5mm;
    font-size: 8.9pt;
    font-weight: 700;
}

.experience-meta {
    margin: 0;
    font-size: 8pt;
}

.experience-date {
    width: 27%;
    text-align: right;
    font-size: 8pt;
    font-weight: 700;
}

.experience-context {
    margin: 0 0 1mm;
    font-size: 8.05pt;
}

.experience-list,
.project-list {
    margin: 0;
    padding-left: 3.6mm;
}

.experience-list li + li,
.project-list li + li,
.sidebar-section li + li {
    margin-top: 0.65mm;
}

.education-list {
    margin: 0;
}

.education-item {
    display: table;
    width: 100%;
}

.education-item + .education-item {
    margin-top: 1.2mm;
}

.education-year,
.education-content {
    display: table-cell;
    vertical-align: top;
}

.education-year {
    width: 16%;
    font-size: 8pt;
    font-weight: 700;
}

.education-content h3 {
    margin: 0 0 0.3mm;
    font-size: 8.35pt;
}

.education-school,
.education-details {
    margin: 0;
    font-size: 7.95pt;
}

.project-card {
    padding: 2mm 2.2mm;
    border: 0.7pt solid #bdbdbd;
    background: transparent;
}

.project-card h3 {
    margin: 0 0 1mm;
    font-size: 8.6pt;
}

.project-stack,
.project-summary {
    margin: 0 0 1mm;
    font-size: 8pt;
}

.sidebar-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-section li {
    display: block;
}

.strong {
    display: block;
    font-size: 8pt;
    font-weight: 700;
}

.sidebar-section li span:last-child {
    display: block;
    font-size: 8pt;
}

a {
    text-decoration: none;
}

/* =========================
   MODE COMPACT A4 + COULEUR
   ========================= */

body.print-compact {
    font-size: 8pt !important;
    line-height: 1.1 !important;
}

/* Couleurs principales */
body.print-compact {
    color: #1a1a1a;
}

/* Nom + titre */
body.print-compact .name {
    color: #0a66c2 !important;
    font-weight: bold;
}

body.print-compact .job {
    color: #333 !important;
    font-weight: bold;
}

/* Titres sections */
body.print-compact .title,
body.print-compact h1,
body.print-compact h2,
body.print-compact h3 {
    color: #0a66c2 !important;
}

/* Dates */
body.print-compact .date {
    color: #555 !important;
    font-weight: bold;
}

/* Bordures / séparateurs */
body.print-compact .experience {
    /*border-right: 2px solid #0a66c2 !important;*/
}

/* Compétences */
body.print-compact #competence h3 {
    color: #0a66c2 !important;
}

/* Lien */
body.print-compact a {
    color: #0a66c2 !important;
    text-decoration: none;
}

/* Réduction espacements */
body.print-compact #top {
    padding: 4px !important;
    height: auto !important;
}

body.print-compact .experience .element {
    margin-bottom: 3px !important;
}

body.print-compact .experience .element .content p {
    margin: 2px 0 !important;
}

body.print-compact #competence {
    line-height: 1.6 !important;
}

/* Projet perso */
body.print-compact .experience-pers {
    margin-top: 5px !important;
}

body.print-compact .experience-pers .content {
    line-height: 1.5 !important;
}

body.print-compact #top {
    border-bottom: 2px solid #0a66c2 !important;
}