@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --accent-color: #E30613;
    --gray-light: #f4f4f4;
    --gray-medium: #666666;
    --font-main: 'Inter', Roboto, 'San Francisco', sans-serif;
    --spacing-unit: 1em;
}

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

html {
    font-size: 16px;
}

body.h-resume {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5em 1.25em;
    display: grid;
    grid-template-columns: 18em 1fr;
    gap: 1.25em;
}

/* Header & Identity */
header.h-card {
    grid-column: 1 / -1;
    margin-bottom: 1.25em;
    border-top: 0.25em solid var(--text-color);
    border-bottom: 0.25em solid var(--text-color);
    padding: 1.25em 0;
}

h1.p-job-title {
    text-align: right;
}

h1.p-job-title span:first-child {
    display: block;
    font-weight: 800;
    font-size: 1.75em;
    line-height: 1;
}

h1.p-job-title span:last-child {
    display: block;
    font-weight: 400;
    line-height: 1.2;
    color: var(--gray-medium);
    margin-top: 0.3125em;
    font-size: 1.1em;
}

h2.p-name {
    font-weight: 600;
    font-size: 1.75em;
    text-transform: uppercase;
    margin-top: -1.5em;
}

address.p-contact {
    display: flex;
    gap: 1.25em;
    font-size: 0.9em;
    margin-top: 0.625em;
    flex-wrap: wrap;
    font-style: normal;
}

address.p-contact > span {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-weight: 600;
}

address.p-contact a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 0.0625em solid transparent;
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4em;
}

address.p-contact a:hover {
    border-bottom-color: var(--accent-color);
}

/* Icons */
svg {
    width: 0.9em;
    height: 0.9em;
    flex-shrink: 0;
}

h2 svg {
    width: 1em;
    height: 1em;
    fill: var(--accent-color);
    stroke: none;
}

address.p-contact svg {
    width: 0.9em;
    height: 0.9em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--accent-color);
}

address.p-contact a.u-url svg {
    fill: var(--accent-color);
    stroke: none;
}

/* Sections Common */
aside[role="complementary"] > section > h2,
main[role="main"] > h2 {
    font-weight: 600;
    font-size: 1.4em;
    text-transform: uppercase;
    letter-spacing: 0.0625em;
    margin-bottom: 1.25em;
    border-bottom: 0.125em solid var(--text-color);
    padding-bottom: 0.3125em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* Profile Summary */
.p-summary {
    grid-column: 1 / -1;
    margin-bottom: 2em;
    font-size: 1.3em;
    font-weight: 300;
    border-left: 0.25em solid var(--accent-color);
    padding-left: 0.9375em;
}

/* Layout Columns */
aside[role="complementary"] {
    grid-column: 1 / 2;
}

main[role="main"] {
    grid-column: 2 / 3;
}

aside[role="complementary"] > section {
    margin-bottom: 1.875em;
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
}

aside[role="complementary"] > section ul li,
main[role="main"] > article > div ul li {
    margin-bottom: 0.3125em;
    position: relative;
    padding-left: 0.9375em;
}

aside[role="complementary"] > section ul li::before,
main[role="main"] > article > div ul li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

#education ul {
    font-size: 0.85em;
}

aside[role="complementary"] > section > ul ul {
    padding-left: 0.625em;
    font-size: 0.85em;
    margin-top: 0.3125em;
}

main[role="main"] > article > div > ul ul {
    padding-left: 0.9375em;
    font-size: 1em;
    margin-top: 0.3125em;
}

/* Formation */
.p-education {
    margin-bottom: 0.625em;
}

.p-education time {
    font-weight: 600;
}

.p-education time:last-of-type {
    margin-right: 0.625em;
}

/* Skill Set */
.p-category {
    margin-bottom: 1.5625em;
}

.p-category h3 {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 0.125em;
}

.p-skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375em;
    font-size: 0.9em;
}

.p-skill span[aria-hidden="true"] {
    display: none;
}

.p-skill div[aria-hidden="true"] {
    display: flex;
    gap: 0.1875em;
}

.p-skill div[aria-hidden="true"] i {
    width: 7px;
    height: 7px;
    aspect-ratio: 1;
    background-color: #ddd;
    border-radius: 50%;
    display: block;

    flex-shrink: 0;
}

.p-skill[data-level="5"] div[aria-hidden="true"] i:nth-child(-n+5) { background-color: var(--text-color); }
.p-skill[data-level="4"] div[aria-hidden="true"] i:nth-child(-n+4) { background-color: var(--text-color); }
.p-skill[data-level="3"] div[aria-hidden="true"] i:nth-child(-n+3) { background-color: var(--text-color); }
.p-skill[data-level="2"] div[aria-hidden="true"] i:nth-child(-n+2) { background-color: var(--text-color); }
.p-skill[data-level="1"] div[aria-hidden="true"] i:nth-child(-n+1) { background-color: var(--text-color); }

#skills > p {
    font-size: 0.7em;
    color: var(--gray-medium);
    margin-bottom: 0.625em;
    font-style: italic;
}

/* Links */
a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 0.0625em solid var(--accent-color);
    font-size: 1.1em;
}

/* Experience List */
.p-experience {
    margin-bottom: 2.1875em;
    display: grid;
    grid-template-columns: 7.5em 1fr;
    gap: 1.25em;
}

.p-experience > header {
    text-align: right;
    border-right: 0.0625em solid #ddd;
    padding-right: 1.25em;
    font-size: 0.85em;
    color: var(--gray-medium);
}

.p-experience > header > div:first-child {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    margin-bottom: 0.25em;
}

.p-experience > header time.dt-start:only-child::before {
    content: "depuis ";
}

.p-experience > header time.dt-start:not(:only-child)::before {
    content: "de ";
}

.p-experience > header time.dt-end::before {
    content: "à ";
}

.p-experience > header time {
    display: block;
}

.p-experience > header data.dt-duration {
    font-size: 0.75em;
    display: block;
    margin-bottom: 0.25em;
    font-style: italic;
}

.p-experience > header span.p-location {
    display: block;
}

.p-description {
    position: relative;
}

.p-description h3.p-name {
    font-weight: 600;
    font-size: 1.3em;
    display: inline;
    margin-right: 1em;
    margin-top: -0.25em;
    line-height: 2em;
}

.p-description h3.p-name::before {
    content: '';
    position: absolute;
    left: calc(-1.10em);
    top: 0;
    height: 2em; /* même que line-height du titre */
    width: 0.18em; /* plus gras */
    background-color: var(--accent-color);
}

.p-description h4.p-org {
    font-weight: 400;
    font-size: 1em;
    color: var(--text-color);
    display: inline;
    float: right;
    margin: 0 0 1em;
}

.p-description p,
.p-description ul,
.p-description > div:last-of-type {
    clear: both;
}

.p-description > div:last-of-type {
    margin-top: 0.625em;
    font-size: 0.85em;
    font-family: monospace;
    background: var(--gray-light);
    padding: 0.3125em 0.625em;
    border-radius: 0.25em;
    display: inline-block;
}

/* Media Queries */
@media screen and (max-width: 48em) {
    body.h-resume {
        grid-template-columns: 1fr;
        padding: 1.25em;
    }

    header.h-card {
        text-align: center;
    }

    address.p-contact {
        justify-content: center;
    }

    h1.p-job-title {
        text-align: center;
    }

    h1.p-job-title span:first-child {
        font-size: 2.5em;
    }

    aside[role="complementary"], main[role="main"] {
        grid-column: 1 / -1;
    }

    .p-experience {
        grid-template-columns: 1fr;
        gap: 0.625em;
        border-left: 0.125em solid #eee;
        padding-left: 0.9375em;
        position: relative;
    }

    .p-description h3.p-name::before {
        display: none;
    }

    .p-experience > header {
        text-align: left;
        border: none;
        padding: 0;
        margin-bottom: 0.3125em;
    }

    .p-description h3.p-name {
        display: block;
        margin-right: 0;
    }

    .p-description h4.p-org {
        display: block;
        float: none;
        margin: 0;
    }
}

@media print {
    html {
        font-size: 11px;
    }

    body.h-resume {
        line-height: 1.3;
        display: block;
        padding: 0;
        max-width: none;
    }

    header.h-card, .p-summary {
        width: 100%;
    }

    aside[role="complementary"] {
        float: left;
        width: 20%;
    }

    main[role="main"] {
        float: right;
        width: 77%;
    }

    body.h-resume::after {
        content: "";
        display: table;
        clear: both;
    }

    .p-experience {
        display: block;
        margin-bottom: 2em;
    }

    .p-experience > header {
        text-align: left;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding-right: 0;
        padding-bottom: 0.25em;
        margin-bottom: 0.5em;
        display: flex;
        gap: 1em;
        width: 100%;
        align-items: baseline;
        flex-wrap: nowrap;
    }

    .p-experience > header > * {
        display: inline-block;
    }

    .p-experience > header > div:first-child {
        flex-direction: row;
        gap: 0;
        justify-content: flex-start;
        align-items: baseline;
    }

    .p-experience > header time {
        display: inline;
    }

    .p-experience > header time.dt-start:not(:only-child)::after {
        content: "-";
        margin: 0 0.3em;
    }

    .p-experience > header time.dt-start:not(:only-child)::before,
    .p-experience > header time.dt-end::before {
        content: none;
    }

    .p-experience > header span.p-location {
        margin-left: auto;
        white-space: nowrap;
        text-align: right;
    }

    .p-description > div:last-of-type {
        margin-top: 0;
    }

    .p-description > * {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-before: avoid;
        break-before: avoid;
    }

    .p-description > p {
        page-break-before: auto;
        break-before: auto;
    }

    aside[role="complementary"] > section {
        page-break-inside: avoid;
    }

    h2 {
        margin-bottom: 0.8em;
    }

    aside[role="complementary"] h2 {
        font-size: 1.2em;
    }
    .p-description h3.p-name::before {
        display: none;
    }
}
