/* =====================================================================
   Cvtheque · Staff public profile
   ---------------------------------------------------------------------
   One stylesheet, two isolated roots — every rule below is scoped:
     .cvt-studio   → intranet page "Ma page professionnelle" (build the sections)
     .cvt-profile  → public page /staff/{academic|administrative}/{id-name}
   Nothing here targets a bare element or a template class, so it can be
   dropped into any project/template without side effects.
   Published to public/modules/cvtheque/css with:
       php artisan module:publish Cvtheque
   ===================================================================== */

/* ---------------------------------------------------------------------
   Shared tokens
   --------------------------------------------------------------------- */
.cvt-studio,
.cvt-profile {
    --cvt-ink: #1b2640;
    --cvt-ink-soft: #4a5672;
    --cvt-muted: #7b86a0;
    --cvt-line: #e6eaf2;
    --cvt-line-strong: #d5dbe8;
    --cvt-surface: #ffffff;
    --cvt-surface-2: #f6f8fc;
    --cvt-danger: #d93a3a;
    --cvt-danger-soft: #fdeeee;
    --cvt-success: #178a5a;
    --cvt-radius: 16px;
    --cvt-radius-sm: 10px;
    --cvt-shadow: 0 1px 2px rgba(20, 34, 66, .05), 0 6px 20px rgba(20, 34, 66, .06);
    --cvt-shadow-lg: 0 24px 60px rgba(15, 28, 58, .22);
    --cvt-ease: cubic-bezier(.2, .7, .2, 1);

    color: var(--cvt-ink);
    line-height: 1.6;
    box-sizing: border-box;
}

.cvt-studio *,
.cvt-studio *::before,
.cvt-studio *::after,
.cvt-profile *,
.cvt-profile *::before,
.cvt-profile *::after {
    box-sizing: border-box;
}

.cvt-studio .cvt-icon,
.cvt-profile .cvt-icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Rich text written by the user (shared by the editor and the public page) */
.cvt-studio .cvt-prose,
.cvt-profile .cvt-prose {
    font-size: 15px;
    color: var(--cvt-ink-soft);
    overflow-wrap: anywhere;
}

.cvt-studio .cvt-prose > :first-child,
.cvt-profile .cvt-prose > :first-child { margin-top: 0; }
.cvt-studio .cvt-prose > :last-child,
.cvt-profile .cvt-prose > :last-child { margin-bottom: 0; }

.cvt-studio .cvt-prose p,
.cvt-profile .cvt-prose p { margin: 0 0 .85em; }

/* Some templates reset these tags (e.g. b { font-weight: 400 }):
   force the formatting the user chose in the editor. */
.cvt-studio .cvt-prose b,
.cvt-studio .cvt-prose strong,
.cvt-profile .cvt-prose b,
.cvt-profile .cvt-prose strong { font-weight: 700; }

.cvt-studio .cvt-prose i,
.cvt-studio .cvt-prose em,
.cvt-profile .cvt-prose i,
.cvt-profile .cvt-prose em { font-style: italic; }

.cvt-studio .cvt-prose u,
.cvt-profile .cvt-prose u { text-decoration: underline; }

.cvt-studio .cvt-prose h3,
.cvt-studio .cvt-prose h4,
.cvt-profile .cvt-prose h3,
.cvt-profile .cvt-prose h4 {
    margin: 1.2em 0 .5em;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--cvt-ink);
}

.cvt-studio .cvt-prose ul,
.cvt-studio .cvt-prose ol,
.cvt-profile .cvt-prose ul,
.cvt-profile .cvt-prose ol {
    margin: 0 0 1em;
    padding-inline-start: 1.4em;
}

.cvt-studio .cvt-prose ul,
.cvt-profile .cvt-prose ul { list-style: disc; }
.cvt-studio .cvt-prose ol,
.cvt-profile .cvt-prose ol { list-style: decimal; }

.cvt-studio .cvt-prose li,
.cvt-profile .cvt-prose li { margin: .3em 0; }

.cvt-studio .cvt-prose a,
.cvt-profile .cvt-prose a {
    color: var(--cvt-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cvt-studio .cvt-prose blockquote,
.cvt-profile .cvt-prose blockquote {
    margin: 0 0 1em;
    padding: .6em 1em;
    border-inline-start: 3px solid var(--cvt-accent);
    background: var(--cvt-surface-2);
    border-radius: 0 var(--cvt-radius-sm) var(--cvt-radius-sm) 0;
}

/* =====================================================================
   1) INTRANET — .cvt-studio
   ===================================================================== */
.cvt-studio {
    --cvt-accent: #1d4ed8;
    --cvt-accent-strong: #1740b3;
    --cvt-accent-soft: #eef3ff;
    --cvt-title: #304673;

    margin: 0 0 40px;
    font-size: 14px;
}

.cvt-studio button { font-family: inherit; }

/* ---- Buttons ---- */
.cvt-studio .cvt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s var(--cvt-ease), border-color .2s var(--cvt-ease),
        color .2s var(--cvt-ease), box-shadow .2s var(--cvt-ease), transform .2s var(--cvt-ease);
}

.cvt-studio .cvt-btn:focus-visible,
.cvt-studio .cvt-icon-btn:focus-visible,
.cvt-studio .cvt-chip-btn:focus-visible,
.cvt-studio .cvt-tab:focus-visible {
    outline: 3px solid rgba(29, 78, 216, .35);
    outline-offset: 2px;
}

.cvt-studio .cvt-btn--primary {
    background: var(--cvt-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(29, 78, 216, .25);
}

.cvt-studio .cvt-btn--primary:hover {
    background: var(--cvt-accent-strong);
    color: #fff;
    transform: translateY(-1px);
}

.cvt-studio .cvt-btn--ghost {
    background: var(--cvt-surface);
    border-color: var(--cvt-line-strong);
    color: var(--cvt-title);
}

.cvt-studio .cvt-btn--ghost:hover {
    border-color: var(--cvt-accent);
    color: var(--cvt-accent);
}

.cvt-studio .cvt-btn--danger {
    background: var(--cvt-danger);
    color: #fff;
}

.cvt-studio .cvt-btn--danger:hover { background: #bf2f2f; color: #fff; }

.cvt-studio .cvt-btn[disabled] {
    opacity: .7;
    cursor: progress;
    transform: none;
}

.cvt-studio .cvt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--cvt-muted);
    cursor: pointer;
    transition: background-color .2s var(--cvt-ease), color .2s var(--cvt-ease);
}

.cvt-studio .cvt-icon-btn:hover { background: var(--cvt-accent-soft); color: var(--cvt-accent); }
.cvt-studio .cvt-icon-btn--danger:hover { background: var(--cvt-danger-soft); color: var(--cvt-danger); }
.cvt-studio .cvt-icon-btn[disabled] { opacity: .35; pointer-events: none; }

.cvt-studio .cvt-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cvt-spin .7s linear infinite;
}

@keyframes cvt-spin { to { transform: rotate(360deg); } }

/* ---- Hero ---- */
.cvt-studio .cvt-studio__hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 26px 28px;
    overflow: hidden;
    border: 1px solid var(--cvt-line);
    background: #fff;
    color: #304673;
}

.cvt-studio .cvt-studio__hero-text {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.cvt-studio .cvt-studio__hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--cvt-accent-soft);
    color: var(--cvt-accent);
    flex-shrink: 0;
}

.cvt-studio .cvt-studio__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: #304673;
}

.cvt-studio .cvt-studio__subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: #304673;
    opacity: .75;
}

.cvt-studio .cvt-studio__hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cvt-studio .cvt-studio__hero .cvt-btn--primary { box-shadow: none; }

/* ---- Notices ---- */
.cvt-studio .cvt-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: var(--cvt-radius-sm);
    border: 1px solid #cfe0ff;
    background: #f3f7ff;
    color: #27437e;
}

.cvt-studio .cvt-notice--warn {
    border-color: #f6dca4;
    background: #fff9ec;
    color: #7a5310;
}

/* ---- Meta bar ---- */
.cvt-studio .cvt-studio__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 2px 14px;
}

.cvt-studio .cvt-studio__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cvt-studio .cvt-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--cvt-surface);
    border: 1px solid var(--cvt-line);
    font-size: 13px;
    font-weight: 600;
    color: var(--cvt-title);
}

.cvt-studio .cvt-studio__hint {
    margin: 0;
    font-size: 13px;
    color: var(--cvt-muted);
}

/* ---- Section cards ---- */
.cvt-studio .cvt-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cvt-studio .cvt-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 16px 16px 16px 10px;
    border: 1px solid var(--cvt-line);
    border-radius: var(--cvt-radius);
    background: var(--cvt-surface);
    box-shadow: var(--cvt-shadow);
    transition: border-color .2s var(--cvt-ease), box-shadow .2s var(--cvt-ease), transform .2s var(--cvt-ease), opacity .2s;
    animation: cvt-rise .35s var(--cvt-ease) both;
}

[dir="rtl"] .cvt-studio .cvt-card,
.cvt-studio[dir="rtl"] .cvt-card { padding: 16px 10px 16px 16px; }

.cvt-studio .cvt-card:hover {
    border-color: #c9d6f5;
    box-shadow: 0 2px 4px rgba(20, 34, 66, .05), 0 14px 30px rgba(20, 34, 66, .09);
}

.cvt-studio .cvt-card.is-dragging {
    opacity: .5;
    transform: scale(.99);
}

.cvt-studio .cvt-card.is-drop-target {
    border-color: var(--cvt-accent);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}

@keyframes cvt-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.cvt-studio .cvt-card__grip {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #b5bdd0;
    cursor: grab;
}

.cvt-studio .cvt-card__grip:active { cursor: grabbing; }

.cvt-studio .cvt-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--cvt-accent-soft);
    color: var(--cvt-accent);
    flex-shrink: 0;
}

.cvt-studio .cvt-card__body {
    flex: 1;
    min-width: 0;
}

.cvt-studio .cvt-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.cvt-studio .cvt-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cvt-title);
}

.cvt-studio .cvt-card__langs {
    display: inline-flex;
    gap: 4px;
}

.cvt-studio .cvt-lang {
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f3f8;
    color: #a6afc3;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

.cvt-studio .cvt-lang.is-on {
    background: #e7f6ef;
    color: var(--cvt-success);
}

.cvt-studio .cvt-card__excerpt {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--cvt-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cvt-studio .cvt-card__excerpt.is-empty { font-style: italic; color: #a6afc3; }

.cvt-studio .cvt-card__files {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--cvt-surface-2);
    font-size: 12px;
    font-weight: 600;
    color: var(--cvt-ink-soft);
}

.cvt-studio .cvt-card__actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.cvt-studio .cvt-card__move {
    display: flex;
    flex-direction: column;
    margin-inline-end: 4px;
}

.cvt-studio .cvt-card__move .cvt-icon-btn {
    width: 30px;
    height: 22px;
}

.cvt-studio .cvt-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding: 18px;
    border: 2px dashed #c9d4ec;
    border-radius: var(--cvt-radius);
    background: rgba(255, 255, 255, .6);
    color: var(--cvt-accent);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s var(--cvt-ease), background-color .2s var(--cvt-ease);
}

.cvt-studio .cvt-add:hover {
    border-color: var(--cvt-accent);
    background: var(--cvt-accent-soft);
}

/* ---- Empty state ---- */
.cvt-studio .cvt-empty {
    padding: 44px 24px;
    border: 1px solid var(--cvt-line);
    border-radius: var(--cvt-radius);
    background: var(--cvt-surface);
    box-shadow: var(--cvt-shadow);
    text-align: center;
}

.cvt-studio .cvt-empty__art {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin-bottom: 16px;
    border-radius: 26px;
    background: linear-gradient(135deg, #eef3ff, #dfe8ff);
    color: var(--cvt-accent);
}

.cvt-studio .cvt-empty__title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    color: var(--cvt-title);
}

.cvt-studio .cvt-empty__text {
    max-width: 460px;
    margin: 0 auto 22px;
    color: var(--cvt-muted);
}

/* ---- Suggestion chips ---- */
.cvt-studio .cvt-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cvt-studio .cvt-empty .cvt-suggest { justify-content: center; }

.cvt-studio .cvt-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--cvt-line-strong);
    border-radius: 999px;
    background: var(--cvt-surface);
    color: var(--cvt-ink-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s var(--cvt-ease);
}

.cvt-studio .cvt-chip-btn .cvt-icon { color: var(--cvt-accent); }

.cvt-studio .cvt-chip-btn:hover {
    border-color: var(--cvt-accent);
    color: var(--cvt-accent);
    transform: translateY(-1px);
}

.cvt-studio .cvt-chip-btn.is-active {
    border-color: var(--cvt-accent);
    background: var(--cvt-accent);
    color: #fff;
}

.cvt-studio .cvt-chip-btn.is-active .cvt-icon { color: #fff; }

.cvt-studio .cvt-chip-btn.is-used:not(.is-active) { opacity: .55; }

/* ---- Modal ---- */
.cvt-studio .cvt-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 16px;
    overflow-y: auto;
}

.cvt-studio .cvt-modal[hidden] { display: none; }

.cvt-studio .cvt-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 22, 45, .5);
    backdrop-filter: blur(3px);
    animation: cvt-fade .2s ease both;
}

.cvt-studio .cvt-modal__panel {
    position: relative;
    width: 100%;
    max-width: 780px;
    margin: auto 0;
    border-radius: 20px;
    background: var(--cvt-surface);
    box-shadow: var(--cvt-shadow-lg);
    animation: cvt-pop .28s var(--cvt-ease) both;
}

.cvt-studio .cvt-modal--sm .cvt-modal__panel { max-width: 440px; }

@keyframes cvt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cvt-pop {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.cvt-studio .cvt-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--cvt-line);
}

.cvt-studio .cvt-modal__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--cvt-title);
}

.cvt-studio .cvt-modal__title .cvt-icon { color: var(--cvt-accent); }

.cvt-studio .cvt-modal__body {
    display: grid;
    gap: 22px;
    padding: 22px 24px;
}

.cvt-studio .cvt-modal__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--cvt-line);
    border-radius: 0 0 20px 20px;
    background: rgba(255, 255, 255, .96);
}

.cvt-studio .cvt-confirm {
    padding: 28px 24px 8px;
    text-align: center;
}

.cvt-studio .cvt-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--cvt-danger-soft);
    color: var(--cvt-danger);
}

.cvt-studio .cvt-confirm__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cvt-title);
}

.cvt-studio .cvt-confirm__text {
    margin: 0;
    color: var(--cvt-muted);
}

.cvt-studio .cvt-modal--sm .cvt-modal__footer {
    justify-content: center;
    border-top: 0;
    padding-bottom: 22px;
}

/* ---- Form fields ---- */
.cvt-studio .cvt-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cvt-title);
}

.cvt-studio .cvt-hint {
    margin: -2px 0 10px;
    font-size: 12.5px;
    color: var(--cvt-muted);
}

.cvt-studio .cvt-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--cvt-line-strong);
    border-radius: 12px;
    background: var(--cvt-surface);
    color: var(--cvt-ink);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .2s var(--cvt-ease), box-shadow .2s var(--cvt-ease);
}

.cvt-studio .cvt-input:focus {
    outline: none;
    border-color: var(--cvt-accent);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
}

.cvt-studio .cvt-input.is-invalid { border-color: var(--cvt-danger); }

/* ---- Language tabs ---- */
.cvt-studio .cvt-langbox {
    border: 1px solid var(--cvt-line);
    border-radius: 16px;
    background: var(--cvt-surface-2);
}

.cvt-studio .cvt-tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    border-bottom: 1px solid var(--cvt-line);
}

.cvt-studio .cvt-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--cvt-muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s var(--cvt-ease), color .2s var(--cvt-ease);
}

.cvt-studio .cvt-tab:hover { color: var(--cvt-title); }

.cvt-studio .cvt-tab.is-active {
    background: var(--cvt-surface);
    color: var(--cvt-accent);
    box-shadow: 0 1px 3px rgba(20, 34, 66, .1);
}

.cvt-studio .cvt-tab__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd2e1;
    transition: background-color .2s;
}

.cvt-studio .cvt-tab.is-filled .cvt-tab__dot { background: var(--cvt-success); }

.cvt-studio .cvt-tabpanel {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.cvt-studio .cvt-tabpanel[hidden] { display: none; }

.cvt-studio .cvt-langbox > .cvt-hint {
    margin: 0;
    padding: 0 16px 14px;
}

/* ---- Rich text editor ---- */
.cvt-studio .cvt-editor {
    border: 1px solid var(--cvt-line-strong);
    border-radius: 12px;
    background: var(--cvt-surface);
    overflow: hidden;
    transition: border-color .2s var(--cvt-ease), box-shadow .2s var(--cvt-ease);
}

.cvt-studio .cvt-editor:focus-within {
    border-color: var(--cvt-accent);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
}

.cvt-studio .cvt-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px;
    border-bottom: 1px solid var(--cvt-line);
    background: #fbfcfe;
}

.cvt-studio .cvt-editor__sep {
    width: 1px;
    margin: 6px 4px;
    background: var(--cvt-line-strong);
}

.cvt-studio .cvt-editor__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--cvt-ink-soft);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.cvt-studio .cvt-editor__btn:hover { background: var(--cvt-accent-soft); color: var(--cvt-accent); }
.cvt-studio .cvt-editor__btn.is-on { background: var(--cvt-accent-soft); color: var(--cvt-accent); }

.cvt-studio .cvt-editor__area {
    min-height: 170px;
    max-height: 380px;
    padding: 14px 16px;
    overflow-y: auto;
    outline: none;
}

.cvt-studio .cvt-editor__area:empty::before {
    content: attr(data-placeholder);
    color: #a6afc3;
    pointer-events: none;
}

/* ---- Files ---- */
.cvt-studio .cvt-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 22px 16px;
    border: 2px dashed #c9d4ec;
    border-radius: 14px;
    background: var(--cvt-surface-2);
    color: var(--cvt-ink-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s var(--cvt-ease), background-color .2s var(--cvt-ease);
}

.cvt-studio .cvt-drop:hover,
.cvt-studio .cvt-drop.is-over {
    border-color: var(--cvt-accent);
    background: var(--cvt-accent-soft);
}

.cvt-studio .cvt-drop .cvt-icon { color: var(--cvt-accent); }

.cvt-studio .cvt-drop__text {
    font-weight: 600;
    color: var(--cvt-title);
}

.cvt-studio .cvt-drop__hint {
    font-size: 12px;
    color: var(--cvt-muted);
}

.cvt-studio .cvt-files {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.cvt-studio .cvt-files:empty { display: none; }

.cvt-studio .cvt-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 10px;
    border: 1px solid var(--cvt-line);
    border-radius: 12px;
    background: var(--cvt-surface);
    transition: opacity .2s, background-color .2s;
}

.cvt-studio .cvt-file.is-removed {
    opacity: .55;
    background: var(--cvt-danger-soft);
}

.cvt-studio .cvt-file.is-removed .cvt-file__name { text-decoration: line-through; }

.cvt-studio .cvt-file__thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: var(--cvt-accent-soft);
    color: var(--cvt-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    overflow: hidden;
    flex-shrink: 0;
}

.cvt-studio .cvt-file__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cvt-studio .cvt-file__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--cvt-ink-soft);
}

.cvt-studio .cvt-file__name a { color: inherit; text-decoration: none; }
.cvt-studio .cvt-file__name a:hover { color: var(--cvt-accent); }

.cvt-studio .cvt-file__size {
    flex-shrink: 0;
    color: var(--cvt-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cvt-studio .cvt-file__badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e7f6ef;
    color: var(--cvt-success);
    font-size: 11px;
    font-weight: 700;
}

/* ---- Errors & toast ---- */
.cvt-studio .cvt-errors {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--cvt-danger-soft);
    color: #9b2222;
    font-size: 13.5px;
}

.cvt-studio .cvt-errors[hidden] { display: none; }

.cvt-studio .cvt-errors ul {
    margin: 0;
    padding-inline-start: 18px;
}

.cvt-studio .cvt-toast {
    position: fixed;
    inset-inline-end: 24px;
    bottom: 24px;
    z-index: 10060;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 48px);
    padding: 12px 18px;
    border-radius: 12px;
    background: #16213d;
    color: #fff;
    font-weight: 600;
    box-shadow: var(--cvt-shadow-lg);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .25s var(--cvt-ease), transform .25s var(--cvt-ease);
}

.cvt-studio .cvt-toast.is-visible {
    opacity: 1;
    transform: none;
}

.cvt-studio .cvt-toast .cvt-icon { color: #5ee0a4; }
.cvt-studio .cvt-toast.is-error .cvt-icon { color: #ff8f8f; }

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .cvt-studio .cvt-studio__hero { padding: 20px; }
    .cvt-studio .cvt-studio__hero-actions,
    .cvt-studio .cvt-studio__hero-actions .cvt-btn { width: 100%; }

    .cvt-studio .cvt-card {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .cvt-studio .cvt-card__grip { display: none; }
    .cvt-studio .cvt-card__icon { width: 40px; height: 40px; }

    .cvt-studio .cvt-card__body { flex-basis: calc(100% - 60px); }

    .cvt-studio .cvt-card__actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--cvt-line);
    }

    .cvt-studio .cvt-card__move { flex-direction: row; margin-inline-end: auto; }
    .cvt-studio .cvt-card__move .cvt-icon-btn { width: 36px; height: 36px; }

    .cvt-studio .cvt-modal { padding: 0; }
    .cvt-studio .cvt-modal__panel { min-height: 100%; border-radius: 0; }
    .cvt-studio .cvt-modal--sm .cvt-modal__panel { min-height: 0; margin: auto 16px; border-radius: 20px; }
    .cvt-studio .cvt-modal__body { padding: 18px 16px; }
    .cvt-studio .cvt-modal__header,
    .cvt-studio .cvt-modal__footer { padding-inline: 16px; }
    .cvt-studio .cvt-modal__footer { border-radius: 0; }
    .cvt-studio .cvt-tabs { overflow-x: auto; }
}

/* =====================================================================
   2) PUBLIC — .cvt-profile
   Uses the template colours when they exist (--it-theme-1 / --it-theme-2),
   with safe defaults for any other template.
   ===================================================================== */
.cvt-profile {
    --cvt-brand: var(--it-theme-1, #0d3775);
    --cvt-accent: var(--it-theme-2, #009fe2);
    --cvt-brand-soft: rgba(13, 55, 117, .07);
    --cvt-sticky-top: 110px;

    width: 100%;
    font-size: 15px;
}

.cvt-profile a { transition: color .2s var(--cvt-ease); }

.cvt-profile .cvt-profile__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cvt-muted);
    text-decoration: none;
}

.cvt-profile .cvt-profile__back:hover { color: var(--cvt-brand); }

[dir="rtl"] .cvt-profile .cvt-profile__back .cvt-icon,
.cvt-profile[dir="rtl"] .cvt-profile__back .cvt-icon { transform: scaleX(-1); }

.cvt-profile .cvt-profile__layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

/* ---- Identity card ---- */
.cvt-profile .cvt-profile__aside {
    position: sticky;
    top: var(--cvt-sticky-top);
    display: grid;
    gap: 20px;
}

.cvt-profile .cvt-profile__card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cvt-line);
    border-radius: 22px;
    background: var(--cvt-surface);
    text-align: center;
}

.cvt-profile .cvt-profile__cover {
    height: 104px;
    background: var(--cvt-brand);
}

.cvt-profile .cvt-profile__avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    margin: -70px auto 0;
    border: 5px solid #fff;
    border-radius: 50%;
    background: var(--cvt-brand);
    overflow: hidden;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: .02em;
}

.cvt-profile .cvt-profile__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cvt-profile .cvt-profile__identity { padding: 16px 22px 24px; }

.cvt-profile .cvt-profile__name {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cvt-ink);
}

.cvt-profile .cvt-profile__grade {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--cvt-brand-soft);
    color: var(--cvt-brand);
    font-size: 13px;
    font-weight: 600;
}

.cvt-profile .cvt-profile__facts {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--cvt-line);
    list-style: none;
    text-align: start;
}

.cvt-profile .cvt-profile__fact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    color: var(--cvt-ink-soft);
}

.cvt-profile .cvt-profile__fact .cvt-icon {
    margin-top: 2px;
    color: var(--cvt-brand);
}

.cvt-profile .cvt-profile__fact small {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cvt-muted);
}

.cvt-profile .cvt-profile__fact a {
    color: var(--cvt-ink-soft);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.cvt-profile .cvt-profile__fact a:hover { color: var(--cvt-brand); }

/* CV button (download the CV / create it) */
.cvt-profile .cvt-profile__cv {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--cvt-line);
}

.cvt-profile .cvt-profile__cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--cvt-brand);
    border-radius: 12px;
    background: var(--cvt-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s var(--cvt-ease), color .2s var(--cvt-ease);
}

.cvt-profile .cvt-profile__cv-btn:hover,
.cvt-profile .cvt-profile__cv-btn:focus-visible {
    background: var(--cvt-accent);
    border-color: var(--cvt-accent);
    color: #fff;
}

.cvt-profile .cvt-profile__cv-btn--ghost {
    background: transparent;
    color: var(--cvt-brand);
}

.cvt-profile .cvt-profile__cv-btn--ghost:hover,
.cvt-profile .cvt-profile__cv-btn--ghost:focus-visible {
    background: var(--cvt-brand);
    border-color: var(--cvt-brand);
    color: #fff;
}

.cvt-profile .cvt-profile__cv-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--cvt-muted);
}

/* ---- Table of contents ---- */
.cvt-profile .cvt-profile__toc {
    padding: 18px;
    border: 1px solid var(--cvt-line);
    border-radius: 18px;
    background: var(--cvt-surface);
    box-shadow: var(--cvt-shadow);
}

.cvt-profile .cvt-profile__toc-title {
    margin: 0 0 10px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cvt-muted);
}

.cvt-profile .cvt-profile__toc-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cvt-profile .cvt-profile__toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 11px;
    color: var(--cvt-ink-soft);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color .2s var(--cvt-ease), color .2s var(--cvt-ease);
}

.cvt-profile .cvt-profile__toc-link .cvt-icon { color: var(--cvt-muted); transition: color .2s; }

.cvt-profile .cvt-profile__toc-link:hover,
.cvt-profile .cvt-profile__toc-link.is-active {
    background: var(--cvt-brand-soft);
    color: var(--cvt-brand);
}

.cvt-profile .cvt-profile__toc-link:hover .cvt-icon,
.cvt-profile .cvt-profile__toc-link.is-active .cvt-icon { color: var(--cvt-brand); }

/* ---- Sections ---- */
.cvt-profile .cvt-profile__main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.cvt-profile .cvt-profile__section {
    scroll-margin-top: calc(var(--cvt-sticky-top) + 10px);
    overflow: hidden;
    border: 1px solid var(--cvt-line);
    border-radius: 22px;
    background: var(--cvt-surface);
    box-shadow: var(--cvt-shadow);
    animation: cvt-rise .45s var(--cvt-ease) both;
    transition: border-color .25s var(--cvt-ease);
}

/* ---- Accordion: title row (a button) ---- */
.cvt-profile .cvt-profile__section-heading {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

.cvt-profile .cvt-profile__section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 20px 26px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: background-color .2s var(--cvt-ease);
}

.cvt-profile .cvt-profile__section-head:hover { background: var(--cvt-surface-2); }

.cvt-profile .cvt-profile__section-head:focus { outline: none; }

.cvt-profile .cvt-profile__section-head:focus-visible {
    outline: 3px solid rgba(13, 55, 117, .25);
    outline-offset: -3px;
}

.cvt-profile .cvt-profile__section-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-inline-start: auto;
    border-radius: 50%;
    background: var(--cvt-surface-2);
    color: var(--cvt-muted);
    flex-shrink: 0;
    transition: transform .3s var(--cvt-ease), background-color .2s, color .2s;
}

/* ---- Accordion: content (open by default, so it works without JavaScript) ---- */
.cvt-profile .cvt-profile__section-panel {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows .32s var(--cvt-ease);
}

.cvt-profile .cvt-profile__section-clip {
    min-height: 0;
    overflow: hidden;
}

.cvt-profile .cvt-profile__section-content {
    margin: 0 26px;
    padding: 20px 0 26px;
    border-top: 1px solid var(--cvt-line);
    transition: opacity .25s var(--cvt-ease);
}

.cvt-profile .cvt-profile__section-content > .cvt-profile__block-title:first-child { margin-top: 0; }

/* A section with only a title: no empty divider/space under it. */
.cvt-profile .cvt-profile__section-content.is-empty { display: none; }

/* Once the script runs: only the open section shows its content. */
.cvt-profile.is-accordion .cvt-profile__section:not(.is-open) .cvt-profile__section-panel { grid-template-rows: 0fr; }
.cvt-profile.is-accordion .cvt-profile__section:not(.is-open) .cvt-profile__section-content { opacity: 0; }
.cvt-profile.is-accordion .cvt-profile__section:not(.is-open) .cvt-profile__section-panel { visibility: hidden; transition: grid-template-rows .32s var(--cvt-ease), visibility 0s .32s; }

.cvt-profile .cvt-profile__section.is-open { border-color: var(--cvt-line-strong); }

.cvt-profile .cvt-profile__section.is-open .cvt-profile__section-chevron {
    transform: rotate(180deg);
    background: var(--cvt-brand);
    color: #fff;
}

.cvt-profile .cvt-profile__section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--cvt-brand);
    color: #fff;
    flex-shrink: 0;
}

.cvt-profile .cvt-profile__section-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cvt-ink);
}

.cvt-profile .cvt-profile__block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--cvt-muted);
}


/* Gallery */
.cvt-profile .cvt-profile__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.cvt-profile .cvt-profile__shot {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--cvt-surface-2);
}

.cvt-profile .cvt-profile__shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--cvt-ease);
}

.cvt-profile .cvt-profile__shot:hover img { transform: scale(1.06); }

/* Documents */
.cvt-profile .cvt-profile__docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cvt-profile .cvt-profile__doc {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--cvt-line);
    border-radius: 14px;
    background: var(--cvt-surface-2);
    color: var(--cvt-ink);
    text-decoration: none;
    transition: border-color .2s var(--cvt-ease), background-color .2s var(--cvt-ease), transform .2s var(--cvt-ease);
}

.cvt-profile .cvt-profile__doc:hover {
    border-color: var(--cvt-brand);
    background: var(--cvt-surface);
    color: var(--cvt-ink);
    transform: translateY(-2px);
}

.cvt-profile .cvt-profile__doc-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--cvt-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.cvt-profile .cvt-profile__doc-ext--pdf { background: #d6453d; }
.cvt-profile .cvt-profile__doc-ext--doc,
.cvt-profile .cvt-profile__doc-ext--docx,
.cvt-profile .cvt-profile__doc-ext--odt { background: #2b5fb8; }
.cvt-profile .cvt-profile__doc-ext--xls,
.cvt-profile .cvt-profile__doc-ext--xlsx { background: #1f8a4c; }
.cvt-profile .cvt-profile__doc-ext--ppt,
.cvt-profile .cvt-profile__doc-ext--pptx { background: #d86a2b; }

.cvt-profile .cvt-profile__doc-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.cvt-profile .cvt-profile__doc .cvt-icon { color: var(--cvt-muted); }
.cvt-profile .cvt-profile__doc:hover .cvt-icon { color: var(--cvt-brand); }

/* Empty */
.cvt-profile .cvt-profile__empty {
    padding: 56px 24px;
    border: 1px dashed var(--cvt-line-strong);
    border-radius: 22px;
    background: var(--cvt-surface);
    text-align: center;
}

.cvt-profile .cvt-profile__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 14px;
    border-radius: 24px;
    background: var(--cvt-brand-soft);
    color: var(--cvt-brand);
}

.cvt-profile .cvt-profile__empty h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--cvt-ink);
}

.cvt-profile .cvt-profile__empty p {
    margin: 0;
    color: var(--cvt-muted);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .cvt-profile .cvt-profile__layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .cvt-profile .cvt-profile__aside { position: static; }

    /* Contents become a horizontal, scrollable bar */
    .cvt-profile .cvt-profile__toc {
        position: sticky;
        top: 0;
        z-index: 5;
        padding: 8px;
        border-radius: 14px;
    }

    .cvt-profile .cvt-profile__toc-title { display: none; }

    .cvt-profile .cvt-profile__toc-list {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .cvt-profile .cvt-profile__toc-list::-webkit-scrollbar { display: none; }

    .cvt-profile .cvt-profile__toc-link { white-space: nowrap; }
}

@media (max-width: 575px) {
    .cvt-profile .cvt-profile__section { border-radius: 18px; }
    .cvt-profile .cvt-profile__section-head { padding: 16px 18px; gap: 12px; }
    .cvt-profile .cvt-profile__section-content { margin: 0 18px; padding: 16px 0 20px; }
    .cvt-profile .cvt-profile__section-title { font-size: 18px; }
    .cvt-profile .cvt-profile__section-icon { width: 40px; height: 40px; }
    .cvt-profile .cvt-profile__docs { grid-template-columns: minmax(0, 1fr); }
    .cvt-profile .cvt-profile__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .cvt-studio *,
    .cvt-profile * {
        animation: none !important;
        transition: none !important;
    }
}
