/* ═══════════════════════════════════════════════════════════════
   Medicina CV — v2.6
   Fix : avatar BuddyBoss par défaut masqué, design moderne ++
═══════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────
   0. RESET ANTI-BUDDYBOSS
──────────────────────────────────────────────────────────── */
.medcv-bb-section,
.medcv-bb-section * { box-sizing: border-box; }

.medcv-bb-section img {
    max-width     : none !important;
    width         : auto !important;
    height        : auto !important;
    border-radius : 0 !important;
    display       : inline !important;
    vertical-align: middle;
    box-shadow    : none !important;
}

.medcv-bb-section button,
.medcv-bb-section input[type="button"],
.medcv-bb-section input[type="submit"] {
    -webkit-appearance: none !important;
    appearance        : none !important;
    line-height       : normal !important;
    width             : auto !important;
    height            : auto !important;
    padding           : 0;
    margin            : 0;
    background        : none;
    border            : none;
    box-shadow        : none !important;
    text-transform    : none !important;
    letter-spacing    : normal !important;
    border-radius     : 0;
    font-size         : inherit !important;
}

.medcv-bb-section svg {
    display      : inline-block !important;
    width        : auto !important;
    height       : auto !important;
    max-width    : none !important;
    vertical-align: middle;
    flex-shrink  : 0;
    fill         : none;
    stroke       : currentColor;
    stroke-width : 2;
    stroke-linecap  : round;
    stroke-linejoin : round;
}

.medcv-bb-section ul,
.medcv-bb-section ol { list-style: none; margin: 0; padding: 0; }
.medcv-bb-section p  { margin: 0; padding: 0; }
.medcv-bb-section h2,
.medcv-bb-section h3 { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; line-height: inherit; color: inherit; border: none; background: none; }
.medcv-bb-section a  { text-decoration: none; color: inherit; }

/* ────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
──────────────────────────────────────────────────────────── */
.medcv-bb-section {
    --cv-accent   : #1a6cf5;
    --cv-accent-dk: #1254cc;
    --cv-accent-lt: rgba(26,108,245,.08);
    --cv-dark     : #0d1f42;
    --cv-text     : #1e2533;
    --cv-muted    : #64748b;
    --cv-border   : #e2e8f4;
    --cv-bg       : #f7f9ff;
    --cv-white    : #ffffff;
    --cv-radius   : 12px;
    --cv-shadow   : 0 1px 4px rgba(0,0,0,.06), 0 6px 20px rgba(26,108,245,.07);

    font-family : -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size   : 14px;
    color       : var(--cv-text);
    line-height : 1.5;
}

/* ────────────────────────────────────────────────────────────
   2. WRAPPER
──────────────────────────────────────────────────────────── */
.medcv-bb-section {
    margin-top    : 28px;
    border        : 1px solid var(--cv-border);
    border-radius : var(--cv-radius);
    overflow      : hidden;
    background    : var(--cv-white);
    box-shadow    : var(--cv-shadow);
}

/* ────────────────────────────────────────────────────────────
   3. HEADER NAV
──────────────────────────────────────────────────────────── */
.medcv-bb-header {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    flex-wrap       : wrap;
    gap             : 8px;
    padding         : 10px 16px;
    background      : linear-gradient(110deg, #f7f9ff 0%, #eef3ff 100%);
    border-bottom   : 1px solid var(--cv-border);
}

.medcv-section-heading {
    display     : flex !important;
    align-items : center !important;
    gap         : 7px !important;
    font-size   : .875rem !important;
    font-weight : 700 !important;
    color       : var(--cv-dark) !important;
    line-height : 1 !important;
    margin      : 0 !important;
}
.medcv-section-heading svg { width: 16px !important; height: 16px !important; stroke: var(--cv-accent) !important; }

.medcv-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.medcv-hbtn {
    all            : unset !important;
    display        : inline-flex !important;
    align-items    : center !important;
    gap            : 4px !important;
    padding        : 5px 11px !important;
    border-radius  : 7px !important;
    border         : 1px solid var(--cv-border) !important;
    background     : var(--cv-white) !important;
    color          : var(--cv-muted) !important;
    font-size      : .73rem !important;
    font-weight    : 600 !important;
    cursor         : pointer !important;
    transition     : all .15s ease !important;
    white-space    : nowrap !important;
    font-family    : inherit !important;
    line-height    : 1 !important;
    box-sizing     : border-box !important;
    box-shadow     : 0 1px 2px rgba(0,0,0,.05) !important;
    user-select    : none !important;
}
.medcv-hbtn svg { width: 11px !important; height: 11px !important; flex-shrink: 0 !important; stroke: currentColor !important; }
.medcv-hbtn:hover {
    border-color: var(--cv-accent) !important;
    color       : var(--cv-accent) !important;
    background  : var(--cv-accent-lt) !important;
    box-shadow  : 0 2px 8px rgba(26,108,245,.14) !important;
    transform   : translateY(-1px) !important;
}
.medcv-hbtn--active, .medcv-hbtn[aria-pressed="true"] {
    background  : var(--cv-accent) !important;
    border-color: var(--cv-accent) !important;
    color       : #fff !important;
    box-shadow  : 0 2px 10px rgba(26,108,245,.3) !important;
}
.medcv-hbtn--edit {
    background  : var(--cv-dark) !important;
    border-color: var(--cv-dark) !important;
    color       : #fff !important;
}
.medcv-hbtn--edit:hover { background: #0a1830 !important; border-color: #0a1830 !important; color: #fff !important; }

.medcv-hbtn-sep { width: 1px; height: 20px; background: var(--cv-border); margin: 0 2px; flex-shrink: 0; }

/* ────────────────────────────────────────────────────────────
   4. ÉTAT VIDE
──────────────────────────────────────────────────────────── */
.medcv-empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 48px 24px; gap: 10px; color: var(--cv-muted); text-align: center;
}
.medcv-empty-state svg  { width: 48px !important; height: 48px !important; opacity: .2; }
.medcv-empty-state p    { margin: 0 !important; font-size: 1rem !important; font-weight: 600; color: var(--cv-dark) !important; }
.medcv-empty-state span { font-size: .83rem; }

/* ────────────────────────────────────────────────────────────
   5. RENDU CV — rich text commun
──────────────────────────────────────────────────────────── */
.medcv-render { width: 100%; overflow: hidden; }

.cv-rich { font-size: .84rem; line-height: 1.7; color: var(--cv-text); }
.cv-rich p              { margin: 0 0 .4em !important; }
.cv-rich ul             { list-style: disc !important; margin: .25em 0 .5em 1.4em !important; padding: 0 !important; }
.cv-rich ol             { list-style: decimal !important; margin: .25em 0 .5em 1.4em !important; padding: 0 !important; }
.cv-rich li             { margin-bottom: .18em !important; }
.cv-rich strong, .cv-rich b { font-weight: 700; }
.cv-rich em, .cv-rich i     { font-style: italic; }
.cv-rich u              { text-decoration: underline; }
.cv-rich s              { text-decoration: line-through; }
.cv-rich h2             { font-size: .95rem !important; font-weight: 700 !important; margin: .5em 0 .2em !important; color: var(--cv-dark) !important; }
.cv-rich h3             { font-size: .85rem !important; font-weight: 700 !important; margin: .4em 0 .15em !important; color: var(--cv-dark) !important; }
.cv-rich a              { color: var(--cv-accent) !important; text-decoration: underline !important; }
.cv-rich hr             { border: none !important; border-top: 1.5px solid var(--cv-border) !important; margin: .6em 0 !important; }

/* ────────────────────────────────────────────────────────────
   6. STYLE MEDICINA — header + 2 colonnes
──────────────────────────────────────────────────────────── */
.cv-moderna-header {
    display    : flex;
    align-items: center;
    gap        : 20px;
    padding    : 26px 28px;
    background : linear-gradient(135deg, #04091a 0%, #0c1d45 50%, #183580 100%);
    color      : #fff;
    position   : relative;
    overflow   : hidden;
}
.cv-moderna-header::before {
    content: ''; position: absolute;
    top: -80px; right: -80px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.025);
}
.cv-moderna-header::after {
    content: ''; position: absolute;
    bottom: -50px; left: 30%;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: rgba(26,108,245,.08);
}

/* Avatar — masqué si avatar par défaut BB (géré par PHP show_photo=false)
   Mais on sécurise aussi côté CSS en contraignant la taille */
.cv-avatar {
    display       : block !important;
    width         : 82px !important;
    height        : 82px !important;
    min-width     : 82px !important;
    max-width     : 82px !important;
    min-height    : 82px !important;
    max-height    : 82px !important;
    border-radius : 50% !important;
    border        : 3px solid rgba(255,255,255,.25) !important;
    object-fit    : cover !important;
    flex-shrink   : 0 !important;
    overflow      : hidden !important;
    box-shadow    : 0 0 0 5px rgba(255,255,255,.07), 0 4px 16px rgba(0,0,0,.2) !important;
    position      : relative;
    z-index       : 1;
}

.cv-moderna-identity { flex: 1; min-width: 0; position: relative; z-index: 1; }

.cv-name {
    margin       : 0 0 3px !important;
    font-size    : 1.4rem !important;
    font-weight  : 800 !important;
    letter-spacing: -.02em !important;
    color        : #fff !important;
    line-height  : 1.2 !important;
}
.cv-title {
    margin : 0 0 4px !important;
    font-size: .9rem !important;
    color  : rgba(255,255,255,.8) !important;
    font-weight: 500 !important;
}
.cv-institution {
    display: flex !important; align-items: center !important; gap: 5px !important;
    margin: 0 0 10px !important; font-size: .76rem !important;
    color: rgba(255,255,255,.55) !important;
}
.cv-institution svg { width: 11px !important; height: 11px !important; }

.cv-contacts { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 10px; }
.cv-contact-item {
    display: inline-flex !important; align-items: center !important; gap: 4px !important;
    font-size: .72rem !important; color: rgba(255,255,255,.72) !important;
    text-decoration: none !important; transition: color .15s !important;
}
.cv-contact-item svg   { width: 10px !important; height: 10px !important; }
.cv-contact-item:hover { color: #fff !important; }

.cv-moderna-body { display: grid; grid-template-columns: 195px 1fr; }

/* ── Colonne gauche ── */
.cv-col-left {
    background    : #eef3ff;
    border-right  : 1px solid #d8e2f8;
    padding       : 22px 16px;
    display       : flex;
    flex-direction: column;
}
.cv-section         { margin-bottom: 20px; }
.cv-section:last-child { margin-bottom: 0; }
.cv-section-title {
    display       : flex !important; align-items: center !important; gap: 7px !important;
    font-size     : .64rem !important; font-weight: 800 !important;
    letter-spacing: .1em; text-transform: uppercase;
    color         : var(--cv-accent) !important;
    margin        : 0 0 10px !important;
}
.cv-section-bar { display: block; width: 3px; height: 12px; border-radius: 2px; background: var(--cv-accent); flex-shrink: 0; }

.cv-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cv-tag  {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    background: rgba(26,108,245,.1); color: var(--cv-accent) !important;
    font-size: .71rem !important; font-weight: 600;
    border: 1px solid rgba(26,108,245,.2); line-height: 1.5;
}
.cv-lang-list       { list-style: disc !important; margin: 0 0 0 15px !important; padding: 0 !important; }
.cv-lang-list li    { font-size: .79rem !important; margin-bottom: 4px !important; color: var(--cv-text); list-style: disc !important; }

.cv-certif          { margin-bottom: 11px; }
.cv-certif strong   { display: block; font-size: .79rem !important; font-weight: 700; color: var(--cv-text); margin-bottom: 1px; }
.cv-certif span     { display: block; font-size: .71rem !important; color: var(--cv-muted); }
.cv-certif em       { display: block; font-size: .69rem !important; color: var(--cv-accent); font-style: normal; }
.cv-certif a        { display: inline-block !important; font-size: .69rem !important; color: var(--cv-accent) !important; margin-top: 2px; }

.cv-pub             { margin-bottom: 12px; padding-left: 8px; border-left: 2px solid rgba(26,108,245,.25); }
.cv-pub strong      { display: block; font-size: .79rem !important; font-weight: 700; color: var(--cv-text); margin-bottom: 2px; }
.cv-pub-revue       { display: block; font-size: .71rem !important; color: var(--cv-muted); font-style: italic; }
.cv-pub-year        { display: block; font-size: .69rem !important; color: var(--cv-accent); }
.cv-pub-desc        { margin: 4px 0 0 !important; font-size: .75rem !important; color: var(--cv-muted); }
.cv-pub-link        { display: inline-block !important; font-size: .69rem !important; color: var(--cv-accent) !important; margin-top: 3px; }
.cv-small           { font-size: .77rem !important; color: var(--cv-muted); margin: 0 !important; }

/* ── Colonne droite ── */
.cv-col-right { padding: 22px 24px; display: flex; flex-direction: column; }
.cv-summary   { font-size: .85rem; line-height: 1.7; color: var(--cv-text); }

.cv-entry {
    margin-bottom : 15px; padding-bottom: 13px;
    border-bottom : 1px dashed var(--cv-border);
}
.cv-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cv-entry-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 3px;
}
.cv-entry-header strong { font-size: .88rem !important; font-weight: 700 !important; color: var(--cv-dark) !important; line-height: 1.3; }
.cv-entry-date {
    font-size: .7rem !important; color: var(--cv-accent) !important;
    font-weight: 600; white-space: nowrap;
    background: rgba(26,108,245,.08); padding: 2px 8px; border-radius: 20px; flex-shrink: 0;
}
.cv-entry-sub  { font-size: .77rem !important; color: var(--cv-muted) !important; margin: 0 0 4px !important; font-style: italic; }
.cv-entry-desc { margin-top: 6px; }

.cv-refs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; }
.cv-ref {
    background: var(--cv-bg); border: 1px solid var(--cv-border);
    border-radius: 8px; padding: 11px 12px; font-size: .77rem; transition: box-shadow .15s;
}
.cv-ref:hover  { box-shadow: 0 2px 10px rgba(26,108,245,.1); }
.cv-ref strong { display: block; font-weight: 700; margin-bottom: 3px; font-size: .8rem !important; }
.cv-ref span   { display: block; color: var(--cv-muted) !important; font-size: .72rem !important; margin-bottom: 1px; }
.cv-ref a      { display: block !important; color: var(--cv-accent) !important; font-size: .72rem !important; margin-top: 3px; }

/* ────────────────────────────────────────────────────────────
   7. STYLE ATS
──────────────────────────────────────────────────────────── */
.medcv-ats     { padding: 30px 36px; font-family: 'Times New Roman', Georgia, serif; background: #fff; }
.ats-name      { font-size: 1.5rem !important; font-weight: 700 !important; text-align: center; color: #111 !important; }
.ats-title     { text-align: center; font-size: .9rem; color: #555 !important; margin-top: 4px !important; }
.ats-contacts  {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 0;
    margin-top: 7px !important; font-size: .78rem; color: #444 !important;
}
/* Nouveaux wrappers avec classes distinctes social/direct */
.ats-contact-cell { padding: 0 8px; border-right: 1px solid #bbb; display: inline; }
.ats-contact-cell:last-child { border-right: none; }
/* Rétrocompat : anciens <span> directs encore utilisés quelque part */
.ats-contacts span { padding: 0 8px; border-right: 1px solid #bbb; }
.ats-contacts span:last-child { border-right: none; }
/* Lien ATS sobre : discret, pas de couleur vive */
.ats-contact-a {
    color           : #333 !important;
    text-decoration : none !important;
}
.ats-contact-a:hover { text-decoration: underline !important; }
.ats-hr        { border: none; border-top: 2px solid #222; margin: 13px 0; }
.ats-section   { margin-bottom: 16px; }
.ats-section-title {
    font-size: .75rem !important; font-weight: 700 !important; letter-spacing: .12em;
    text-transform: uppercase; border-bottom: 1.5px solid #ccc;
    padding-bottom: 4px; margin-bottom: 9px !important; color: #111 !important;
}
.ats-entry          { margin-bottom: 11px; }
.ats-entry-row      { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ats-entry-row strong { font-size: .86rem !important; font-weight: 700 !important; color: #111 !important; }
.ats-entry-row span { font-size: .77rem !important; color: #666 !important; white-space: nowrap; }
.ats-entry-sub      { font-size: .78rem !important; color: #666 !important; font-style: italic; margin: 2px 0 4px !important; }
.ats-entry .cv-rich { font-family: inherit; font-size: .82rem; }
.ats-entry .cv-rich ul { list-style: disc !important; margin-left: 1.2em !important; }

/* Liens dans le style ATS : norme ATS = sobriété, pas de couleur vive.
   Le lien reste cliquable à l'écran mais en gris foncé discret,
   jamais en bleu accent, pour rester conforme au format texte épuré
   attendu par les robots de tri (ATS = Applicant Tracking System). */
.ats-entry .medcv-plink,
.ats-entry a.medcv-plink {
    color           : #444 !important;
    font-family     : inherit !important;
    font-style      : italic !important;
    text-decoration : underline !important;
}
.ats-entry .medcv-plink:hover { color: #111 !important; }

/* ────────────────────────────────────────────────────────────
   8. STYLE EUROPASS
──────────────────────────────────────────────────────────── */
.medcv-europass { background: #fff; }
.ep-topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(90deg, #002b80, #0040c8);
    color: #fff; padding: 10px 22px;
}
.ep-logo  { display: flex !important; align-items: center !important; gap: 8px !important; font-weight: 700; font-size: .85rem !important; color: #fff !important; }
.ep-logo svg { width: 20px !important; height: 20px !important; stroke: #fff !important; }
.ep-label { font-size: .74rem; opacity: .82; color: #fff !important; font-style: italic; }
.ep-body  { padding: 24px 26px; }
.ep-section { margin-bottom: 20px; }
.ep-section-label {
    font-size: .64rem !important; font-weight: 800 !important; letter-spacing: .12em;
    text-transform: uppercase; color: #0040c8 !important;
    border-left: 3px solid #0040c8; padding-left: 8px; margin-bottom: 12px !important;
}
.ep-personal { display: flex; align-items: flex-start; gap: 18px; }
/* Photo Europass — taille fixe portrait */
.ep-photo {
    display      : block !important;
    width        : 78px !important; height: 98px !important;
    min-width    : 78px !important; max-width: 78px !important;
    min-height   : 98px !important; max-height: 98px !important;
    border-radius: 4px !important; object-fit: cover !important;
    border       : 1.5px solid #c0d0f0 !important; flex-shrink: 0 !important;
    box-shadow   : 0 2px 8px rgba(0,0,0,.12) !important;
}
.ep-personal-data { flex: 1; }
.ep-name     { font-size: 1.2rem !important; font-weight: 700 !important; color: #0040c8 !important; margin-bottom: 3px !important; }
.ep-subtitle { font-size: .85rem; color: #555 !important; margin-bottom: 8px !important; }
.ep-table    { border-collapse: collapse; font-size: .77rem; width: 100%; }
.ep-table th { width: 118px; color: #666 !important; font-weight: 600; padding: 2px 8px 2px 0; vertical-align: top; white-space: nowrap; }
.ep-table td { color: #222 !important; padding: 2px 0; }
.ep-entry {
    display: grid; grid-template-columns: 110px 1fr;
    gap: 0 14px; margin-bottom: 13px; align-items: start;
}
.ep-entry-date    { font-size: .74rem !important; color: #666 !important; font-weight: 600; padding-top: 2px; }
.ep-entry-content strong { display: block; font-weight: 700 !important; font-size: .86rem !important; color: #111 !important; margin-bottom: 2px; }
.ep-entry-org     { font-size: .77rem !important; color: #666 !important; font-style: italic; margin-bottom: 3px !important; }
.ep-text          { font-size: .81rem; line-height: 1.6; color: #444 !important; margin: 0 !important; }
.ep-lang-grid     { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-lang-item     {
    background: #dce8ff; color: #0040c8 !important;
    padding: 3px 11px; border-radius: 4px;
    font-size: .74rem !important; font-weight: 600; border: 1px solid #b0c8f8;
}

/* ────────────────────────────────────────────────────────────
   9. STYLE CANADIEN
──────────────────────────────────────────────────────────── */
.medcv-canadien { background: #fff; }
.ca-header  { padding: 26px 30px 0; }
.ca-name    { font-size: 1.45rem !important; font-weight: 800 !important; color: #111 !important; letter-spacing: -.02em; margin: 0 !important; }
.ca-title   { font-size: .88rem !important; color: var(--cv-accent) !important; font-weight: 600; margin: 4px 0 10px !important; }
.ca-contacts { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: .77rem; color: #666; margin-bottom: 14px !important; }
.ca-contacts a    { color: var(--cv-accent) !important; text-decoration: none !important; }
.ca-contacts span { color: #666 !important; }
.ca-divider { height: 3px; background: linear-gradient(90deg, var(--cv-accent) 0%, #60a5fa 100%); border-radius: 2px; }
.ca-section { padding: 16px 30px 0; }
.ca-section-title {
    font-size: .64rem !important; font-weight: 800 !important; letter-spacing: .12em;
    text-transform: uppercase; color: var(--cv-accent) !important;
    margin-bottom: 10px !important; display: flex; align-items: center; gap: 8px;
}
.ca-section-title::after { content: ''; flex: 1; height: 1px; background: var(--cv-border); }
.ca-entry       { margin-bottom: 13px; }
.ca-entry-top   { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.ca-entry-top strong { font-size: .87rem !important; font-weight: 700 !important; color: #111 !important; }
.ca-entry-date  { font-size: .72rem !important; color: var(--cv-muted) !important; white-space: nowrap; }
.ca-entry-org   { font-size: .77rem !important; color: var(--cv-muted) !important; font-style: italic; margin-bottom: 3px !important; }
.ca-text        { font-size: .82rem; line-height: 1.65; color: #333 !important; margin: 3px 0 0 !important; }
.ca-link        { font-size: .74rem !important; color: var(--cv-accent) !important; text-decoration: none !important; }
.ca-link:hover  { text-decoration: underline !important; }
.ca-skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 14px; }
.ca-skills-subtitle { font-size: .68rem !important; font-weight: 700; color: var(--cv-muted) !important; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 6px !important; }
.ca-tags        { display: flex; flex-wrap: wrap; gap: 5px; }
.ca-tag         { padding: 3px 10px; background: var(--cv-bg); border: 1px solid var(--cv-border); border-radius: 5px; font-size: .73rem !important; color: var(--cv-text) !important; font-weight: 500; }
.ca-refs-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 10px; }
.ca-ref         { border: 1px solid var(--cv-border); border-radius: 8px; padding: 11px 13px; font-size: .77rem; transition: box-shadow .15s; }
.ca-ref:hover   { box-shadow: 0 2px 8px rgba(26,108,245,.09); }
.ca-ref strong  { display: block; font-weight: 700; margin-bottom: 2px; }
.ca-ref span    { display: block; color: var(--cv-muted) !important; font-size: .71rem !important; }
.ca-ref a       { color: var(--cv-accent) !important; font-size: .71rem !important; }

/* ────────────────────────────────────────────────────────────
   10. PANNEAU ÉDITION — design moderne
──────────────────────────────────────────────────────────── */
.medcv-edit-panel {
    border-top: 1px solid var(--cv-border);
    background: linear-gradient(180deg, #f7f9ff 0%, #f2f6ff 100%);
}
.medcv-form-wrap { padding: 24px; max-width: 920px; margin: 0 auto; }

/* En-tête formulaire */
.medcv-form-header {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 22px; padding: 16px 18px;
    background: linear-gradient(135deg, rgba(26,108,245,.06), rgba(13,31,66,.03));
    border-radius: 10px; border: 1px solid rgba(26,108,245,.12);
}
.medcv-form-header-icon {
    width: 38px; height: 38px; min-width: 38px;
    background: var(--cv-accent); border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(26,108,245,.3);
}
.medcv-form-header-icon svg { width: 16px !important; height: 16px !important; stroke: #fff !important; }
.medcv-form-header h3 { margin: 0 0 3px !important; font-size: .9rem !important; font-weight: 700 !important; color: var(--cv-dark) !important; }
.medcv-form-header p  { margin: 0 !important; font-size: .77rem !important; color: var(--cv-muted) !important; }

/* Fieldsets */
.medcv-fieldset {
    border: 1px solid var(--cv-border); border-radius: 10px;
    padding: 18px 18px 16px; margin-bottom: 16px;
    background: var(--cv-white);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.medcv-fieldset:focus-within { box-shadow: 0 2px 12px rgba(26,108,245,.08); }
.medcv-fieldset legend {
    font-size: .79rem !important; font-weight: 700 !important;
    color: var(--cv-dark) !important; padding: 0 8px; background: var(--cv-white);
}
.medcv-fieldset--display { background: var(--cv-bg); }
.medcv-optional-label    { font-weight: 400 !important; color: var(--cv-muted) !important; font-size: .72rem !important; }

.medcv-row-2 { display: grid; grid-template-columns: 1fr 1fr;     gap: 10px; }
.medcv-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.medcv-row-display { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

.medcv-field        { display: flex; flex-direction: column; gap: 4px; }
.medcv-field label  { font-size: .73rem !important; font-weight: 600 !important; color: var(--cv-dark) !important; }
.medcv-field label small { font-weight: 400 !important; color: var(--cv-muted) !important; font-size: .68rem !important; }
.medcv-field .req   { color: #e53e3e; }

.medcv-input, .medcv-textarea, .medcv-select {
    padding      : 8px 11px !important;
    border       : 1.5px solid var(--cv-border) !important;
    border-radius: 7px !important;
    font-size    : .83rem !important;
    font-family  : inherit !important;
    color        : var(--cv-text) !important;
    background   : var(--cv-white) !important;
    transition   : border-color .15s, box-shadow .15s;
    width        : 100% !important;
    box-sizing   : border-box !important;
    box-shadow   : none !important;
    outline      : none !important;
    line-height  : 1.4 !important;
}
.medcv-input:focus, .medcv-textarea:focus, .medcv-select:focus {
    border-color: var(--cv-accent) !important;
    box-shadow  : 0 0 0 3px rgba(26,108,245,.1) !important;
}
.medcv-textarea { resize: vertical; min-height: 70px; }

/* Toggle */
.medcv-toggle-label  { display: flex; align-items: center; gap: 9px; font-size: .81rem !important; cursor: pointer; user-select: none; }
.medcv-toggle-input  { display: none !important; }
.medcv-toggle-track  { width: 36px; height: 20px; background: #cbd5e1; border-radius: 20px; position: relative; transition: background .2s; flex-shrink: 0; }
.medcv-toggle-input:checked + .medcv-toggle-track { background: var(--cv-accent); }
.medcv-toggle-thumb  { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.medcv-toggle-input:checked + .medcv-toggle-track .medcv-toggle-thumb { left: 18px; }

.medcv-color-field  { flex-direction: row !important; align-items: center !important; gap: 8px !important; }
.medcv-color-wrap   { display: flex; align-items: center; gap: 7px; }
.medcv-color-input  { width: 34px !important; height: 34px !important; padding: 2px !important; border: 1.5px solid var(--cv-border) !important; border-radius: 7px !important; cursor: pointer; background: none !important; }
.medcv-color-label  { font-size: .76rem !important; color: var(--cv-muted) !important; font-family: 'SFMono-Regular', Consolas, monospace; }

/* ────────────────────────────────────────────────────────────
   11. WYSIWYG — LISTES UNIQUEMENT (v3.0)
   Barre réduite : Liste à puces + Liste numérotée.
   Tous les boutons de formatage inline ont été supprimés.
──────────────────────────────────────────────────────────── */

/* Conteneur */
.medcv-rich-wrap {
    border        : 1.5px solid var(--cv-border);
    border-radius : 8px;
    overflow      : hidden;
    background    : var(--cv-white);
    transition    : border-color .15s, box-shadow .15s;
}
.medcv-rich-wrap:focus-within {
    border-color : var(--cv-accent);
    box-shadow   : 0 0 0 3px rgba(26,108,245,.1);
}

/* Flash rouge quand la limite est atteinte */
@keyframes medcv-limit-flash {
    0%   { border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.25); }
    100% { border-color:var(--cv-accent); box-shadow:0 0 0 3px rgba(26,108,245,.1); }
}
.medcv-rich-wrap--limit { animation: medcv-limit-flash .6s ease forwards; }

/* Barre d'outils : très compacte, 2 boutons seulement */
.medcv-rich-toolbar {
    display        : flex;
    align-items    : center;
    gap            : 2px;
    padding        : 5px 8px;
    background     : linear-gradient(to bottom, #f0f4fb, #e8eef9);
    border-bottom  : 1px solid var(--cv-border);
    min-height     : 36px;
}

.mrt-group {
    display        : flex;
    align-items    : center;
    gap            : 1px;
    background     : rgba(255,255,255,.5);
    border-radius  : 6px;
    padding        : 1px;
}

/* Boutons */
.medcv-rtb {
    all             : unset !important;
    display         : inline-flex !important;
    align-items     : center !important;
    justify-content : center !important;
    width           : 30px !important;
    height          : 28px !important;
    border          : 1px solid transparent !important;
    border-radius   : 5px !important;
    background      : transparent !important;
    cursor          : pointer !important;
    color           : #4a5568 !important;
    font-family     : inherit !important;
    transition      : all .1s !important;
    box-sizing      : border-box !important;
    flex-shrink     : 0 !important;
}
.medcv-rtb svg {
    width           : 14px !important;
    height          : 14px !important;
    stroke          : currentColor !important;
    stroke-width    : 2 !important;
    fill            : none !important;
    stroke-linecap  : round !important;
    stroke-linejoin : round !important;
}
.medcv-rtb:hover {
    background   : var(--cv-white) !important;
    border-color : var(--cv-border) !important;
    color        : var(--cv-accent) !important;
    box-shadow   : 0 1px 3px rgba(0,0,0,.08) !important;
}
.medcv-rtb--active {
    background   : rgba(26,108,245,.12) !important;
    border-color : rgba(26,108,245,.3) !important;
    color        : var(--cv-accent) !important;
}

/* Zone éditable — taille généreuse pour les textes longs */
.medcv-rich-editor {
    min-height   : 160px;
    max-height   : 500px;
    overflow-y   : auto;
    padding      : 12px 14px !important;
    font-size    : .875rem !important;
    line-height  : 1.8 !important;
    color        : var(--cv-text) !important;
    outline      : none !important;
    font-family  : inherit !important;
    background   : var(--cv-white) !important;
    caret-color  : var(--cv-accent);
    word-break   : break-word;
    overflow-wrap: break-word;
}
.medcv-rich-editor ul { list-style:disc    !important; margin:.35em 0 .35em 1.5em !important; padding:0 !important; }
.medcv-rich-editor ol { list-style:decimal !important; margin:.35em 0 .35em 1.5em !important; padding:0 !important; }
.medcv-rich-editor li { margin-bottom:.15em !important; }
.medcv-rich-editor p  { margin:0 0 .35em !important; }

/* Placeholder */
.medcv-rich-editor:empty::before,
.medcv-rich-editor.medcv-rich--empty::before {
    content       : attr(data-placeholder);
    color         : #a0aec0;
    pointer-events: none;
    font-style    : italic;
    font-size     : .82rem !important;
}

/* Compteur de caractères */
.medcv-rich-counter {
    display         : flex;
    justify-content : flex-end;
    padding         : 4px 10px 5px;
    background      : #f8faff;
    border-top      : 1px solid var(--cv-border);
}
.medcv-rich-counter-text {
    font-size   : .69rem !important;
    color       : #94a3b8 !important;
    font-family : 'SFMono-Regular', Consolas, monospace;
    transition  : color .15s;
}
.medcv-rich-counter-text.medcv-rich-counter--warn  { color:#f59e0b !important; font-weight:600; }
.medcv-rich-counter-text.medcv-rich-counter--limit { color:#ef4444 !important; font-weight:700; }
/* ────────────────────────────────────────────────────────────
   12. REPEATERS
──────────────────────────────────────────────────────────── */
.medcv-repeater-item {
    border       : 1px solid var(--cv-border);
    border-radius: 9px; padding: 15px; margin-bottom: 10px;
    background   : #fafcff;
    transition   : box-shadow .15s, border-color .15s;
}
.medcv-repeater-item:hover { box-shadow: 0 2px 12px rgba(26,108,245,.09); border-color: rgba(26,108,245,.22); }
.medcv-repeater-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 10px;
    border-bottom: 1px dashed var(--cv-border);
}
.medcv-repeater-label { font-size: .71rem !important; font-weight: 700 !important; color: var(--cv-accent) !important; letter-spacing: .06em; text-transform: uppercase; }

.medcv-remove-btn {
    all           : unset !important;
    display       : flex !important; align-items: center !important; justify-content: center !important;
    width         : 22px !important; height: 22px !important;
    border-radius : 6px !important; border: 1.5px solid #fca5a5 !important;
    background    : #fff5f5 !important; color: #dc2626 !important;
    cursor        : pointer !important; transition: all .14s !important;
    flex-shrink   : 0 !important; box-sizing: border-box !important;
}
.medcv-remove-btn svg   { width: 11px !important; height: 11px !important; stroke: currentColor !important; fill: none !important; }
.medcv-remove-btn:hover { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }

.medcv-add-btn {
    all          : unset !important;
    display      : inline-flex !important; align-items: center !important; gap: 6px !important;
    padding      : 7px 14px !important; border-radius: 8px !important;
    border       : 1.5px dashed rgba(26,108,245,.4) !important;
    background   : rgba(26,108,245,.03) !important; color: var(--cv-accent) !important;
    font-size    : .77rem !important; font-weight: 600 !important;
    cursor       : pointer !important; transition: all .15s !important;
    margin-top   : 6px !important; font-family: inherit !important; box-sizing: border-box !important;
}
.medcv-add-btn svg   { width: 12px !important; height: 12px !important; stroke: currentColor !important; fill: none !important; }
.medcv-add-btn:hover { background: rgba(26,108,245,.08) !important; border-color: var(--cv-accent) !important; box-shadow: 0 2px 8px rgba(26,108,245,.1) !important; }

/* ────────────────────────────────────────────────────────────
   13. ACTIONS SAUVEGARDE
──────────────────────────────────────────────────────────── */
.medcv-form-actions { display: flex; align-items: center; gap: 12px; padding-top: 8px; flex-wrap: wrap; }
.medcv-btn {
    all         : unset !important;
    display     : inline-flex !important; align-items: center !important; gap: 7px !important;
    padding     : 10px 22px !important; border-radius: 9px !important;
    font-size   : .84rem !important; font-weight: 700 !important;
    cursor      : pointer !important; transition: all .15s !important;
    font-family : inherit !important; box-sizing: border-box !important;
    line-height : 1 !important; user-select: none !important;
}
.medcv-btn svg           { width: 14px !important; height: 14px !important; stroke: currentColor !important; fill: none !important; }
.medcv-btn--primary      { background: var(--cv-accent) !important; color: #fff !important; box-shadow: 0 2px 10px rgba(26,108,245,.3) !important; }
.medcv-btn--primary:hover { background: var(--cv-accent-dk) !important; box-shadow: 0 4px 16px rgba(26,108,245,.4) !important; transform: translateY(-1px) !important; }
.medcv-btn--primary:disabled { opacity: .55; cursor: not-allowed !important; transform: none !important; }

.medcv-status          { font-size: .78rem !important; font-weight: 600; padding: 7px 12px; border-radius: 7px; }
.medcv-status--success { background: #f0fdf4; color: #15803d !important; border: 1px solid #bbf7d0; }
.medcv-status--error   { background: #fef2f2; color: #b91c1c !important; border: 1px solid #fecaca; }

/* ────────────────────────────────────────────────────────────
   14. RESPONSIVE
──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .cv-moderna-body   { grid-template-columns: 1fr; }
    .cv-col-left       { border-right: none; border-bottom: 1px solid #d8e2f8; }
    .cv-moderna-header { flex-direction: column; text-align: center; padding: 20px 16px; gap: 12px; }
    .cv-contacts       { justify-content: center; }
    .medcv-row-2, .medcv-row-3 { grid-template-columns: 1fr; }
    .ep-entry          { grid-template-columns: 1fr; }
    .ep-entry-date     { margin-bottom: 4px !important; }
    .medcv-form-wrap   { padding: 14px; }
    .ca-header         { padding: 18px 16px 0; }
    .ca-section        { padding: 13px 16px 0; }
    .medcv-ats         { padding: 20px 16px; }
    .ep-body           { padding: 18px 14px; }
    .ep-personal       { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .medcv-hbtn        { padding: 4px 7px !important; font-size: .68rem !important; }
    .cv-name           { font-size: 1.15rem !important; }
    .medcv-form-header { flex-direction: column; }
    .cv-avatar         { width: 68px !important; height: 68px !important; min-width: 68px !important; max-width: 68px !important; min-height: 68px !important; max-height: 68px !important; }
    .medcv-rich-toolbar { padding: 4px 5px; }
    .mrt-sep           { margin: 0 2px; }
    .mrt-group         { padding: 1px; }
}

/* ────────────────────────────────────────────────────────────
   15. PRINT
──────────────────────────────────────────────────────────── */
@media print {
    .medcv-bb-header, .medcv-edit-panel, .medcv-empty-state { display: none !important; }
    .medcv-bb-section { border: none !important; box-shadow: none !important; margin: 0 !important; border-radius: 0 !important; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    /* ── SIDEBAR MULTI-PAGE (Medicina) ──
       Une grille CSS (display:grid) qui s'étend sur plusieurs pages ne
       se fragmente pas correctement à l'impression : le navigateur
       renvoie la ligne de grille ENTIÈRE à la page suivante si elle ne
       rentre pas -> grand espace blanc après l'en-tête, et le fond bleu
       de la colonne gauche ne peut pas suivre la colonne droite sur les
       pages suivantes. On remplace donc la grille par : une colonne
       gauche en float (qui se coupe normalement entre les pages comme
       n'importe quel bloc), une colonne droite décalée par margin-left
       (toujours au même endroit, page après page), et un bandeau bleu
       séparé en position:fixed qui — comme tout élément fixed en média
       paginé — se RÉPÈTE automatiquement à l'identique sur chaque page
       imprimée, donnant l'effet d'un vrai CV pro où le bleu continue
       jusqu'en bas de chaque page. */
    .cv-moderna-body {
        display  : block !important;
        position : relative !important;
    }
    .cv-moderna-body::after { content: ''; display: block; clear: both; }
    .cv-col-left {
        display    : block !important;
        float      : left !important;
        width      : 195px !important;
        box-sizing : border-box !important;
        position   : relative !important;
        z-index    : 1 !important;
    }
    .cv-col-right {
        display     : block !important;
        margin-left : 195px !important;
        box-sizing  : border-box !important;
    }
    /* Bandeau décoratif : touche le bord de la page (fond plein bord),
       répété à l'identique sur chaque page imprimée. */
    .cv-col-left::before {
        content    : '';
        position   : fixed !important;
        top        : 0; bottom: 0; left: 0;
        width      : 195px;
        background : #eef3ff !important;
        z-index    : -1;
    }

    /* Couleurs de fond forcées */
    .cv-moderna-header { background: linear-gradient(135deg,#04091a 0%,#0c1d45 50%,#183580 100%) !important; }
    .cv-col-left        { background: #eef3ff !important; }
    .ep-topbar          { background: linear-gradient(90deg,#002b80,#0040c8) !important; }
    .ca-divider         { background: linear-gradient(90deg,var(--cv-accent),#60a5fa) !important; }
    .cv-tag             { background: rgba(26,108,245,.1) !important; }

    /* ── break-inside SEULEMENT sur les petites unités atomiques ──
       JAMAIS sur une entrée complète d'expérience/formation (cv-entry,
       ca-entry, ep-entry, ats-entry) : ces blocs peuvent contenir
       plusieurs lignes de description et dépasser la place restante
       en bas de page. Si on leur interdit toute coupure, le navigateur
       renvoie le bloc ENTIER à la page suivante -> grand espace blanc
       en bas de la page précédente (c'est exactement le bug constaté
       sur les modèles ATS et Europass). On les laisse donc se couper
       normalement d'une page à l'autre. */
    .cv-pub, .cv-certif, .cv-ref, .ca-ref {
        break-inside : avoid !important;
        page-break-inside : avoid !important;
    }

    /* En contrepartie, on évite qu'un titre d'expérience (poste + date)
       se retrouve orphelin tout seul en bas de page, séparé de sa
       description : on interdit juste la coupure APRÈS ces lignes
       d'en-tête, sans bloquer la coupure ailleurs dans le bloc. */
    .cv-entry-header, .cv-entry-sub,
    .ats-entry-row, .ats-entry-sub,
    .ep-entry-org, .ep-entry-content strong,
    .ca-entry-top, .ca-entry-org {
        break-after : avoid !important;
        page-break-after : avoid !important;
    }

    /* Les titres de section ne doivent jamais se retrouver seuls
       en bas de page, juste avant un saut de page */
    .cv-section-title, .ats-section-title,
    .ep-section-label, .ca-section-title {
        break-after : avoid !important;
        page-break-after : avoid !important;
    }

    /* Empêche qu'une seule ligne de texte/liste reste isolée
       en haut ou en bas de page (veuves/orphelines) */
    .cv-rich, .ep-text, .ats-entry .cv-rich, .cv-entry-desc {
        orphans : 3 !important;
        widows  : 3 !important;
    }

    /* ── PADDING IDENTIQUE PARTOUT, SUR CHAQUE PAGE ──
       Même valeur (16px), sur les 4 côtés (haut/bas/gauche/droite),
       pour TOUS les modèles à l'impression : le texte se retrouve
       toujours à la même distance du bord du fond coloré/blanc,
       quel que soit le modèle choisi (Medicina, ATS, Europass, Canadien).
       box-decoration-break:clone fait en sorte que ce padding (et le
       fond coloré) se RÉPÈTE sur chaque fragment de page, et pas
       seulement au tout début / à la toute fin du bloc — sinon, pour
       un bloc qui s'étend sur 2-3 pages (.medcv-ats, .ep-body, etc.),
       seules la 1ère et la dernière page auraient ce padding. */
    .cv-moderna-header,
    .cv-col-left, .cv-col-right,
    .medcv-ats,
    .ep-topbar, .ep-body,
    .ca-header, .ca-section {
        padding: 16px !important;
        box-decoration-break: clone !important;
        -webkit-box-decoration-break: clone !important;
    }
    .cv-section { margin-bottom: 12px !important; }
    .cv-entry   { margin-bottom: 9px !important; padding-bottom: 8px !important; }

    /* Empêche les répétitions d'arrière-plan sur chaque page (impression
       par défaut peut tenter de répéter le header sur chaque page) */
    .cv-moderna-header { position: static !important; }

    /* ── FOND COLORÉ JUSQU'AU BORD DE PAGE ──
       Pas de marge de page : le fond (bleu du header, bleu clair de la
       colonne gauche, blanc des autres modèles) doit toucher les limites
       physiques de la page. L'espace entre le texte et le bord de page
       vient UNIQUEMENT du padding interne ci-dessus (et du bandeau fixe
       de la colonne gauche), jamais d'une marge externe. */
    @page { size: A4 portrait; margin: 0; }
}

/* ────────────────────────────────────────────────────────────
   16. CONTACTS & RÉSEAUX SOCIAUX — styles communs
──────────────────────────────────────────────────────────── */

/* ── Canadien : contacts en ligne avec icônes ── */
.ca-contacts { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: .77rem; margin-bottom: 14px !important; }

.ca-contact-item {
    display        : inline-flex !important;
    align-items    : center !important;
    gap            : 5px !important;
    font-size      : .73rem !important;
    color          : var(--sc, #6366f1) !important;
    text-decoration: none !important;
    transition     : opacity .15s !important;
}
.ca-contact-item:hover  { opacity: .78 !important; }
.ca-contact-icon {
    display         : inline-flex !important;
    align-items     : center !important;
    justify-content : center !important;
    width           : 14px !important;
    height          : 14px !important;
    flex-shrink     : 0 !important;
    color           : var(--sc, #6366f1) !important;
}
.ca-contact-icon svg {
    width  : 13px !important;
    height : 13px !important;
    stroke : currentColor !important;
    fill   : currentColor !important;
}
/* Pour les icônes qui sont fill=none (téléphone, email, etc.) */
.ca-contact-icon svg[fill="none"] { fill: none !important; }

/* ── Grille réseaux sociaux (pied de CV Medicina/ATS) ── */
.cv-social-grid {
    display   : flex;
    flex-wrap : wrap;
    gap       : 6px 14px;
    padding   : 8px 24px 16px;
    border-top: 1px solid var(--cv-border);
    margin-top: 4px;
}

.cv-social-item {
    display        : inline-flex !important;
    align-items    : center !important;
    gap            : 4px !important;
    font-size      : .72rem !important;
    font-weight    : 600 !important;
    color          : var(--sc, #6366f1) !important;
    text-decoration: none !important;
    transition     : opacity .15s !important;
}
.cv-social-item:hover   { opacity: .75 !important; }
.cv-social-icon {
    display         : inline-flex !important;
    align-items     : center !important;
    justify-content : center !important;
    width           : 13px !important;
    height          : 13px !important;
    flex-shrink     : 0 !important;
    color           : var(--sc, #6366f1) !important;
}
.cv-social-icon svg {
    width  : 13px !important;
    height : 13px !important;
    fill   : currentColor !important;
    stroke : none !important;
}
.cv-social-icon svg[fill="none"] { fill: none !important; stroke: currentColor !important; }
.cv-social-label { line-height: 1; }

/* ── Header Medicina : contacts avec icônes colorées ── */
.cv-contact-item span:last-child { font-size: .72rem !important; }

/* ── Séparateur section dans le formulaire d'édition ── */
.medcv-social-section-label {
    display     : flex;
    align-items : center;
    gap         : 7px;
    font-size   : .71rem !important;
    font-weight : 700 !important;
    color       : var(--cv-muted) !important;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin      : 14px 0 8px !important;
}
.medcv-social-section-label svg {
    width  : 12px !important;
    height : 12px !important;
    stroke : currentColor !important;
    fill   : none !important;
    flex-shrink: 0 !important;
}
.medcv-social-section-label::after {
    content    : '';
    flex       : 1;
    height     : 1px;
    background : var(--cv-border);
}

/* Icônes dans les labels de champs */
.medcv-field-icon {
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    width          : 16px;
    height         : 16px;
    font-size      : .75rem;
    font-weight    : 700;
    border-radius  : 3px;
    flex-shrink    : 0;
    vertical-align : middle;
}
.medcv-field-icon svg {
    width  : 11px !important;
    height : 11px !important;
    fill   : currentColor !important;
    stroke : none !important;
}
.medcv-field-icon--email   { background: #eef2ff; color: #6366f1 !important; }
.medcv-field-icon--linkedin { background: #dbeafe; color: #0077b5 !important; font-style: normal; }

/* ── ATS contacts sur deux lignes ── */
/* ── Europass : liens cliquables dans la table ── */
.ep-table td a { color: #0040c8 !important; text-decoration: none !important; }
.ep-table td a:hover { text-decoration: underline !important; }

/* ────────────────────────────────────────────────────────────
   17. FIX CANADIEN — pas d'images dans les publications
──────────────────────────────────────────────────────────── */
/* S'assurer que les liens texte ne génèrent pas d'images parasites */
.ca-link {
    display      : inline-block !important;
    font-size    : .74rem !important;
    color        : var(--cv-accent) !important;
    text-decoration: none !important;
    margin-top   : 3px !important;
    padding      : 2px 8px !important;
    border        : 1px solid rgba(26,108,245,.25) !important;
    border-radius : 4px !important;
    background   : rgba(26,108,245,.04) !important;
    transition   : all .15s !important;
}
.ca-link:hover { background: rgba(26,108,245,.1) !important; border-color: var(--cv-accent) !important; }

/* Masquer toute img parasite dans le corps des CV (hors avatars) */
.medcv-moderna .cv-col-right img:not(.cv-avatar),
.medcv-canadien img:not(.cv-avatar),
.medcv-ats img,
.medcv-europass .ep-body img:not(.ep-photo) {
    display: none !important;
}

/* ────────────────────────────────────────────────────────────
   18. LIENS "PRINT-SAFE" — affichage écran vs impression
   À l'écran : lien cliquable compact avec libellé.
   À l'impression : l'URL complète redevient un texte simple,
   car un lien cliquable n'a aucun sens sur papier/PDF.
──────────────────────────────────────────────────────────── */

/* ── Écran : afficher seulement le libellé, masquer l'URL brute ──
   (le style complet avec variantes cv-pub-link/ca-link est défini
   plus bas, juste avant le bloc @media print) ── */

/* URL brute affichée pour DOI/liens déjà en clair (ATS, Europass) */
.medcv-ats-url {
    font-size     : .73rem !important;
    color         : var(--cv-muted) !important;
    word-break    : break-all;
    font-style    : normal !important;
}

/* ── Liens cliquables avec libellé court à l'écran (Vérifier, Lire, Consulter…)
   L'URL ne s'affiche jamais sur la plateforme — uniquement à l'impression
   via la règle .medcv-plink-url dans le bloc @media print plus bas. ── */
.medcv-plink {
    display        : inline-flex !important;
    align-items    : center !important;
    gap            : 4px !important;
    font-size      : .72rem !important;
    font-weight    : 600 !important;
    color          : var(--cv-accent) !important;
    text-decoration: none !important;
}
.medcv-plink:hover { text-decoration: underline !important; }
.medcv-plink-label::after { content: ' ↗'; }
/* Pas de flèche décorative dans le contexte ATS — sobriété requise */
.ats-entry .medcv-plink-label::after { content: ''; }
.medcv-plink-url   { display: none !important; } /* masquée à l'écran, révélée à l'impression */

/* Variante : lien de vérification de certification */
.medcv-plink:not(.cv-pub-link):not(.ca-link) {
    margin-top : 2px;
}

/* Variante publication colonne gauche Medicina */
.medcv-plink.cv-pub-link { font-size: .7rem !important; margin-top: 3px; }

/* Variante canadien — bouton discret */
.medcv-plink.ca-link {
    margin-top    : 4px !important;
    padding       : 2px 9px !important;
    border        : 1px solid rgba(26,108,245,.25) !important;
    border-radius : 5px !important;
    background    : rgba(26,108,245,.05) !important;
}
.medcv-plink.ca-link:hover { background: rgba(26,108,245,.1) !important; text-decoration: none !important; }

/* ── Impression : remplacer le lien cliquable par texte + URL visible ── */
@media print {
    /* Les liens de type "Vérifier ↗ / Lire ↗ / Consulter ↗" deviennent du texte simple
       avec l'URL complète visible juste après, car cliquer est impossible sur papier.
       Spécificité renforcée (a.medcv-plink) pour neutraliser .cv-pub-link / .ca-link
       qui imposent sinon une couleur bleue accent peu lisible sur papier. */
    a.medcv-plink {
        color           : #1a1a1a !important;
        text-decoration : none !important;
        display         : block !important;
        gap             : 0 !important;
        background      : none !important;
        border          : none !important;
        padding         : 0 !important;
    }
    .medcv-plink-label { display: none !important; }
    html body .medcv-plink-url,
    .medcv-render .medcv-plink-url,
    a.medcv-plink .medcv-plink-url {
        display    : inline !important;
        font-size  : .72rem !important;
        color      : #000000 !important;
        font-weight: 700 !important;
        word-break : break-all;
        -webkit-text-fill-color: #000000 !important;
    }

    /* Réseaux sociaux (LinkedIn, Facebook, Instagram, X, YouTube, TikTok,
       GitHub, Behance, Dribbble, site web) : sur papier, un libellé comme
       "Instagram" n'est pas cliquable et n'apporte rien — on masque ce
       libellé générique et on affiche l'URL complète à la place.
       Email / téléphone / WhatsApp / localisation restent inchangés car
       leur libellé EST déjà l'info utile (l'adresse, le numéro). */
    .cv-contact-item--social span:last-child,
    .cv-social-item--social .cv-social-label,
    .ca-contact-item--social span:last-child {
        display: none !important;
    }
    /* Ces URLs apparaissent dans le header bleu marine sombre du style
       Medicina (.cv-moderna-header) — il faut du blanc/clair, pas du gris
       foncé qui devient quasi invisible sur ce fond sombre. */
    .cv-contact-item--social[href]::after {
        content     : attr(href);
        font-size   : .66rem;
        color       : #ffffff !important;
        font-weight : 500;
        word-break  : break-all;
        margin-left : 3px;
        opacity     : .92;
    }
    /* Grille sociale en pied de page (fond clair) : couleur foncée lisible */
    .cv-social-item--social[href]::after {
        content     : attr(href);
        font-size   : .66rem;
        color       : #333333 !important;
        font-weight : 400;
        word-break  : break-all;
        margin-left : 3px;
    }
    /* Le style Canadien affiche ses contacts sur fond BLANC (pas sombre) :
       garder une couleur foncée lisible sur papier clair. */
    .ca-contact-item--social[href]::after {
        content     : attr(href);
        font-size   : .66rem;
        color       : #333333 !important;
        font-weight : 400;
        word-break  : break-all;
        margin-left : 3px;
    }

    /* ── ATS : réseaux sociaux affichés en URL à l'impression ──
       Les contacts tagués .ats-contact--social masquent le nom
       (LinkedIn, Facebook…) et affichent l'URL complète à la place.
       Les contacts directs (email, tél, localisation) restent inchangés.
       IMPORTANT : .ats-contacts est en display:flex à l'écran, ce qui
       annule le display:block des enfants (un flex-item garde son
       comportement de ligne). On force donc le conteneur lui-même en
       block à l'impression pour permettre un vrai empilement vertical
       propre des URLs, avec un espacement net entre chaque entrée. */
    .ats-contacts {
        display    : block !important;
        text-align : center !important;
    }
    .ats-contact-cell {
        display      : inline !important;
        border-right : 1px solid #bbb !important;
        padding      : 0 8px !important;
    }
    .ats-contact-cell:last-child { border-right: none !important; }

    .ats-contact-cell.ats-contact--social {
        display      : block !important;
        border-right : none !important;
        padding      : 2px 0 !important;
        margin       : 2px 0 !important;
        text-align   : center !important;
    }
    .ats-contact-a.ats-contact--social {
        color           : #1a1a1a !important;
        text-decoration : none !important;
        font-style      : normal !important;
        font-size       : .71rem !important;
        display         : block !important;
        line-height     : 1.5 !important;
    }
    /* Cacher le nom générique (LinkedIn, Instagram…) et afficher l'URL */
    .ats-contact-a.ats-contact--social::before {
        content      : attr(href);
        display      : block !important;
        color        : #000 !important;
        font-weight  : 600 !important;
        word-break   : break-all;
        font-style   : normal !important;
    }
    .ats-contact-a.ats-contact--social > * {
        display : none !important;
    }
    /* Pour les liens ATS directs (email, tel…) : affichage normal en ligne */
    .ats-contact-a:not(.ats-contact--social) {
        color           : #333 !important;
        text-decoration : none !important;
    }

    /* Les liens restent visuellement neutres (pas de couleur bleue de lien actif) */
    .medcv-bb-section a {
        color           : inherit !important;
        text-decoration : none !important;
    }

    /* Les icônes SVG des réseaux sociaux restent visibles en couleur à l'impression */
    .cv-contact-item svg, .cv-social-icon svg, .ca-contact-icon svg {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}