/*
 * Orchidée template — stacked violet/blush duotone header bands, single column.
 * Shared by browser (edit) and mPDF (pdf). No flexbox, no CSS grid: floats,
 * tables and block layout only, so the two renderers agree.
 *
 * Palette: a solid violet #a21caf name band above a pale blush #fdf4ff info
 * band, then a white single-column body. The bands are FIXED (they define the
 * template's identity); settings.accentColor drives the body accents only
 * (section titles, the short underline tick, chip borders, language dots,
 * bullet markers) — all on white/pale ground where any user colour keeps
 * contrast. Those accent colours are applied inline in the PHP; the values
 * here are the fixed-violet defaults for the bands.
 */

/* ---- page margins (multi-page) ---------------------------------------- *
 * PdfService gives mPDF margin_* = 0, so a PDF's only vertical margin is
 * this wrapper's own padding — and a wrapper's padding-top lands on page 1
 * alone, leaving every later page hard against the sheet edge.
 *
 * @page restores an identical margin on every page; `@page :first` zeroes
 * the top one so page 1 keeps using the wrapper padding it always had and
 * its output is unchanged. Left/right stay 0 — the wrapper's horizontal
 * padding already applies to every page. Inert in the browser (@page is
 * print-only), and builder.js reads these same values back out of CSSOM
 * so its page-count model matches what mPDF actually does. */
@page {
    margin: 40px 0 40px 0;
}
@page :first {
    margin-top: 0;
}

.resume-page.resume-orchidee {
    width: 794px;               /* A4 @ 96dpi -> fills A4 width in mPDF */
    box-sizing: border-box;
    padding: 0;                 /* bands are full-bleed; body carries its own padding */
    background: #ffffff;
    color: #2a1533;
    font-family: 'DejaVu Sans', Helvetica, Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.45;
}

/* mPDF does NOT inherit font-family/size into table cells — anything inside a
   <td> silently falls back to the serif document default (in-td trap class,
   2026-07 slate rework). The bands, rows, chips and bullets are all tables, so
   the font must be declared at td level too. No-op in the browser. */
.resume-orchidee td {
    font-family: 'DejaVu Sans', Helvetica, Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.45;
    color: #2a1533;
}

/* ---- band 1: solid violet — name left, title right --------------------- */
.resume-orchidee .cv-band {
    width: 100%;
    border-collapse: collapse;
}
.resume-orchidee .cv-band-name {
    height: 54px;
    background: #a21caf;
}
.resume-orchidee .cv-band-name td {
    vertical-align: middle;
    padding: 0;
    color: #ffffff;
}
.resume-orchidee .cv-band-name-main {
    text-align: left;
    padding-left: 56px;
}
.resume-orchidee .cv-band-name-side {
    text-align: right;
    width: 38%;
    padding-right: 56px;
}
.resume-orchidee .cv-name {
    font-size: 27px;
    font-weight: bold;
    letter-spacing: 0.4px;
    line-height: 1.1;
    margin: 0;
    color: #ffffff;
}
.resume-orchidee .cv-band-name-side .cv-jobtitle {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.25;
}

/* ---- band 2: pale blush — circle photo left, contact grid right -------- */
.resume-orchidee .cv-band-info {
    height: 90px;
    background: #fdf4ff;
}
.resume-orchidee .cv-band-info td {
    vertical-align: middle;
    padding: 0;
}
.resume-orchidee .cv-band-photo {
    width: 78px;
    padding: 0 20px 0 56px;
}
.resume-orchidee .cv-photo-wrap {
    border-collapse: collapse;
}
.resume-orchidee .cv-photo-wrap td {
    padding: 0;
}
.resume-orchidee .cv-band-contact {
    padding-right: 56px;
}
.resume-orchidee .cv-contact-grid {
    width: 100%;
    border-collapse: collapse;
}
.resume-orchidee .cv-contact-cell {
    width: 50%;
    padding: 4px 12px 4px 0;
    font-size: 12.5px;
    color: #3b1451;
    word-wrap: break-word;
}
.resume-orchidee .cv-icon {
    color: #a21caf;
}
.resume-orchidee .cv-icon.cv-icon-linkedin {
    display: inline-block;
    width: 13px;
    height: 13px;
    line-height: 13px;
    font-size: 8px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    border-radius: 2px;
}

/* ---- body -------------------------------------------------------------- */
.resume-orchidee .cv-body {
    padding: 16px 56px 14px;
}
.resume-orchidee .cv-section {
    margin-bottom: 10px;
}
.resume-orchidee .cv-section:last-child {
    margin-bottom: 0;
}
/* pdf mode: mPDF doesn't reliably honor :last-child, so the server marks
   whichever section/item actually renders last with this plain class instead
   (orchidee.php). Unscoped on purpose — applies to whatever element carries
   it. */
.resume-orchidee .is-last {
    margin-bottom: 0;
}

/* Section title + short accent underline tick. A heading's border-bottom
   shrinks to its text width in mPDF, so the underline is a fixed-width
   single-cell rule table (table-layout:fixed keeps mPDF from shrinking it to
   its &nbsp;). The accent colour is applied inline in the PHP. */
.resume-orchidee .cv-title-row {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 6px;
}
.resume-orchidee .cv-title-row td {
    padding: 0;
}
.resume-orchidee .cv-section-title {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0;
    padding: 0;
}
.resume-orchidee .cv-title-rule {
    border-collapse: collapse;
    table-layout: fixed;
    width: 20px;
    margin: 5px 0 0;
}
.resume-orchidee .cv-title-rule td {
    width: 20px;
    padding: 0;
    font-size: 1px;
    line-height: 1px;
    border-top: 2px solid #a21caf;
}
.resume-orchidee .cv-summary {
    text-align: left;
}

/* page-break-after:avoid on the title alone is not reliable in mPDF — a header
   can still land as the last line on a page with its first entry pushed to the
   next. Wrapping the title with its first entry in a page-break-inside:avoid
   group moves the pair to the next page as a unit. */
.resume-orchidee .cv-section-head-group {
    page-break-inside: avoid;
}

/* ---- items ------------------------------------------------------------- */
.resume-orchidee .cv-item {
    position: relative;
    page-break-inside: avoid;
}
/* Inter-item spacing is margin-TOP via additive sibling selectors, never
   margin-bottom: margin-bottom on a repeated page-break-inside:avoid block
   double-counts in mPDF's pagination-height estimate and opens a blank
   trailing page (cvg-template skill §5, toolbox bug class). The first item in
   each section (wrapped in the head-group) matches neither selector and gets
   no top margin. */
.resume-orchidee .cv-section-head-group + .cv-item,
.resume-orchidee .cv-item + .cv-item {
    margin-top: 10px;
}

/* Two-column "title left / dates right" via table (mPDF-safe). */
.resume-orchidee .cv-row {
    width: 100%;
    border-collapse: collapse;
}
.resume-orchidee .cv-row td {
    vertical-align: top;
    padding: 0;
}
.resume-orchidee .cv-row-main {
    text-align: left;
}
.resume-orchidee .cv-row-side {
    text-align: right;
    white-space: nowrap;
    width: 30%;
    color: #6b4b7a;
    font-size: 12.5px;
}
.resume-orchidee .cv-item-title {
    font-weight: bold;
}
.resume-orchidee .cv-item-org {
    font-style: italic;
    color: #4a2c5a;
}
.resume-orchidee .cv-item-sep {
    color: #4a2c5a;
    font-style: normal;
}
.resume-orchidee .cv-item-loc {
    font-style: italic;
}
.resume-orchidee .cv-dates {
    font-weight: bold;
}
.resume-orchidee .cv-item-details {
    margin-top: 3px;
}

/* Bullets — a plain <ul>/<li> with default disc markers (the classic/ledger
   pattern). Real list markers render in mPDF and, unlike a per-bullet table,
   don't inflate mPDF's pagination-height estimate, so browser and export agree
   on where the page breaks. */
.resume-orchidee .cv-bullets {
    margin: 4px 0 0;
    padding-left: 18px;
}
.resume-orchidee .cv-bullets li {
    margin-bottom: 2px;
    position: relative;
}

/* ---- skills: bordered violet chips (name only) ------------------------- */
.resume-orchidee .cv-chips {
    line-height: 1.9;
}
/* inline-block chips: a literal space between each in the markup keeps mPDF
   from merging adjacent inline-blocks into one borderless box (cvg-template
   skill §5). Border colour is applied inline (accent) in the PHP. */
.resume-orchidee .cv-chip {
    display: inline-block;
    margin: 0 5px 5px 0;
    padding: 2px 10px;
    border: 1px solid #a21caf;
    border-radius: 11px;
    font-size: 12.5px;
    color: #3b1451;
}

/* ---- languages / certifications ---------------------------------------- */
.resume-orchidee .cv-inline-item {
    position: relative;
    page-break-inside: avoid;
}
.resume-orchidee .cv-section-head-group + .cv-inline-item,
.resume-orchidee .cv-inline-item + .cv-inline-item {
    margin-top: 3px;
}
.resume-orchidee .cv-muted {
    color: #8a6f97;
}
.resume-orchidee .cv-cert-row {
    width: 100%;
    border-collapse: collapse;
}
.resume-orchidee .cv-cert-row td {
    vertical-align: top;
    padding: 0;
}
.resume-orchidee .cv-cert-side {
    width: 90px;
    text-align: right;
    white-space: nowrap;
    color: #6b4b7a;
    font-size: 12.5px;
}
.resume-orchidee .cv-item-side {
    float: right;
    width: 90px;
    text-align: right;
    color: #6b4b7a;
    font-size: 12.5px;
}

/* Skill/language level dots (tpl_dots). Filled dots take the accent inline;
   empty dots are a pale blush so the gauge still reads on white. */
.resume-orchidee .cv-level {
    font-size: 10px;
    letter-spacing: 1px;
    margin-left: 2px;
    white-space: nowrap;
}
.resume-orchidee .cv-dot-on {
    color: #a21caf;
}
.resume-orchidee .cv-dot-off {
    color: #f3e8ff;
}

/* =====================================================================
 * Edit-mode affordances (browser only — these elements are never emitted in
 * pdf mode, so none of this reaches mPDF). Every [contenteditable]/[data-ph]
 * selector keeps at most ONE class before the pseudo-chunk so mPDF's partial
 * parse can't repaint a band (graphite/cacao finding).
 * ===================================================================== */

.resume-orchidee [contenteditable][data-ph]:empty:before {
    content: attr(data-ph);
    color: #b7a3c0;
    font-style: italic;
    pointer-events: none;
}
.cv-band-name [contenteditable][data-ph]:empty:before {
    color: rgba(255, 255, 255, 0.7);
}
.resume-orchidee [contenteditable] {
    outline: none;
    border-radius: 2px;
    transition: box-shadow 0.12s ease, background 0.12s ease;
}
.resume-orchidee [contenteditable]:hover {
    box-shadow: 0 0 0 1px #eecdf5;
}
.resume-orchidee [contenteditable]:focus {
    box-shadow: 0 0 0 2px #a21caf;
    background: #fdf4ff;
}
.cv-band-name [contenteditable]:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.cv-band-name [contenteditable]:focus {
    box-shadow: 0 0 0 2px #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.resume-orchidee .edit-controls {
    position: absolute;
    top: -2px;
    right: -44px;
    opacity: 0;
    transition: opacity 0.12s ease;
    white-space: nowrap;
    z-index: 5;
}
.resume-orchidee .edit-controls--inline {
    position: absolute;
    left: -26px;
    right: auto;
    top: 0;
}
.resume-orchidee .cv-item:hover > .edit-controls,
.resume-orchidee .cv-inline-item:hover > .edit-controls,
.resume-orchidee .cv-bullets li:hover > .edit-controls,
.resume-orchidee .edit-controls:hover {
    opacity: 1;
}
.resume-orchidee .edit-controls button {
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    width: 20px;
    height: 20px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #444;
    border-radius: 3px;
    cursor: pointer;
}
.resume-orchidee .edit-controls button:hover {
    background: #a21caf;
    border-color: #a21caf;
    color: #fff;
}

.resume-orchidee .cv-add {
    font-family: inherit;
    font-size: 12.5px;
    margin-top: 6px;
    padding: 4px 10px;
    border: 1px dashed #e0aeee;
    background: #fff;
    color: #a21caf;
    border-radius: 4px;
    cursor: pointer;
}
.resume-orchidee .cv-add:hover {
    background: #fdf4ff;
    border-color: #a21caf;
}
.resume-orchidee .cv-add--sm {
    font-size: 11.5px;
    padding: 2px 8px;
}

/* Skill chip remove button (browser only). */
.resume-orchidee .cv-chip {
    position: relative;
}
.resume-orchidee .cv-chip-x {
    font-family: inherit;
    border: none;
    background: none;
    color: #b00;
    cursor: pointer;
    padding: 0 0 0 4px;
    opacity: 0;
    font-size: 13px;
}
.resume-orchidee .cv-chip:hover .cv-chip-x {
    opacity: 1;
}

/* Level dot editor (languages). */
.resume-orchidee .cv-dot-btn {
    font-family: inherit;
    font-size: 10px;
    line-height: 1;
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0 1px;
    border: none;
    background: none;
    cursor: pointer;
}
.resume-orchidee .cv-level-toggle {
    font-family: inherit;
    font-size: 9px;
    line-height: 1;
    padding: 1px 3px;
    margin-left: 3px;
    border: 1px solid #ccc;
    background: #fff;
    color: #777;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.resume-orchidee .cv-inline-item:hover .cv-level-toggle {
    opacity: 1;
}

.resume-orchidee .cv-current {
    display: block;
    font-family: inherit;
    font-size: 11px;
    font-weight: normal;
    color: #8a6f97;
    margin-top: 2px;
    white-space: nowrap;
    cursor: pointer;
}
.resume-orchidee .cv-current input {
    vertical-align: middle;
}
