:root {
    --bg-light: #f9f9f9;
    --text-light: #222;
    --box-light: #fff;
    --border-light: #ddd;
    --bg-dark: #18191a;
    --text-dark: #eee;
    --box-dark: #222327;
    --border-dark: #444;
    --tag-dark: #232b41;
    --tag-light: #eee;
    --accent: #1d3557;
}

html[data-theme="light"] {
    background-color: var(--bg-light);
    color: var(--text-light)
}

html[data-theme="dark"] {
    background-color: var(--bg-dark);
    color: var(--text-dark)
}

body {
    background: inherit;
    color: inherit;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.45;
    transition: background .2s, color .2s;
}

.cv-container {
    max-width: 850px;
    margin: 40px auto;
    background: var(--box-light);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
    padding: 20px 50px 20px 50px;
    transition: background .4s, color .4s;
}

html[data-theme="dark"] .cv-container {
    background: var(--box-dark);
    color: var(--text-dark);
    box-shadow: 0 6px 36px rgba(0, 0, 0, .07);
}

h1 {
    font-size: 2.6em;
    margin: 0 0 15px 0
}

h2 {
    border-bottom: 1.5px solid var(--border-light);
    padding-bottom: 5px;
    margin-top: 40px;
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 1.25em;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color .2s, border-bottom .2s;
}

html[data-theme="dark"] h2 {
    color: #6db4ff;
    border-bottom: 1.5px solid var(--border-dark)
}

.infos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    text-align: left !important;
}

.infos div {
    min-width: auto;
    text-align: left !important;
    margin-left: 0 !important;
}

.infos a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit
}

.infos svg {
    margin-right: 6px;
    flex: 0 0 auto
}

.title-description {
    font-size: 1.2em;
    font-weight: 500;
    margin: 8px 0 6px 0;
}

.adjectives {
    font-size: 1.05em;
    color: #555;
    margin-bottom: 24px;
}

html[data-theme="dark"] .adjectives {
    color: #c0c7d1;
}

ul {
    margin: 0;
    padding-left: 18px
}

.section {
    margin-bottom: 18px
}

.langues span,
.competences span {
    display: inline-block;
    margin-right: 12px;
    padding: 4px 8px;
    background: var(--tag-light);
    border-radius: 7px;
    font-size: .98em;
    color: #0b3d91;
    margin-bottom: 5px;
    transition: background .2s, color .2s;
}

html[data-theme="dark"] .langues span,
html[data-theme="dark"] .competences span {
    background: var(--tag-dark);
    color: #86b3fd
}

footer {
    max-width: 850px;
    margin: 40px auto 0;
    font-size: .98em;
    text-align: center;
    color: #888;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: border-color .2s, color .2s;
}

html[data-theme="dark"] footer {
    border-top: 1px solid var(--border-dark);
    color: #bbb
}

.btn {
    padding: 5px 14px;
    border: 1px solid #aaa;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 1em;
    cursor: pointer;
    transition: background .2s, border .2s, color .2s
}

.btn:hover {
    background: #e3e3e3
}

html[data-theme="dark"] .btn:hover {
    background: #353b46;
    border-color: #666;
    color: #fff
}

@media (max-width:850px) {
    .cv-container {
        padding: 22px 20px;
        margin: 12px;
    }
}


.personal-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cv-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    transition: transform .3s ease;
}

.cv-photo:hover {
    transform: scale(1.05);
}

.personal-info a {
    color: inherit;
    text-decoration: none;
}

.personal-info a:hover {
    text-decoration: underline;
}

html[data-theme="dark"] .cv-photo {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.section {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 12px;
    align-items: start;
}

.section b {
    white-space: nowrap;
}

.timeline {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 14px;
    align-items: start;
}

.timeline-row {
    display: contents;
}

.timeline-period {
    font-weight: bold;
    white-space: nowrap;
}

.timeline-text {
    line-height: 1.4;
}

.personal-info {
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.personal-info > div {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 20px;
    row-gap: 2px;
}

.personal-info > div > div {
    display: contents; 
}


/* -------- THEME CLAIR FOR PRINT -------- */
@media print {
  /* Force clair theme for print */
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  :root {
    --bg: #ffffff !important;
    --fd: #181818 !important; 
    --txt: #000000 !important;
    --border: rgba(0, 0, 0, 0.2) !important;
    --bg-card: #ffffff !important;
  }

  .dark, [data-theme="dark"] {
    background: #ffffff !important;
    color: #000000 !important;
  }
}


/* -------- HIDE FOOTER WHEN PRINTING -------- */
@media print {
  footer {
    display: none !important;
  }
}
