        /* 
           Variables de fallback
           (les vraies viennent de style.css)
         */

        :root {
            --txt:      #111827;
            --txtSub:   #6b7280;
            --radius: 16px;
            --green:    #16a34a;
            --orange:   #d97706;
        }

        /* 
           HERO — profil participant
         */
        .cert-hero {
            display: flex;
            align-items: center;
            padding-bottom: 21px;
            min-height: 40vh;
            flex-direction: row;
            justify-content: space-between;
            background: var(--color);
        }
* {
            font-family: "Work Sans";
        }


        .cert-hero .entreprisesDiv {
            display: flex;
            gap: 20px;
            flex-direction: column;
            align-items: flex-start;
        }

        /* Avatar */
        .cert-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-color: var(--act1);
            color: #fff;
            font-size: 2.2rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-family: var(--bFont);
            line-height: 0;
        }

        /* Infos principales */
        .cert-hero-info { flex: 1 1 260px; }

        .cert-hero-info h1 {
            font-size: 1.8rem;
            font-weight: 800;
            margin: 0 0 4px;
        }

        .cert-hero-info .cert-role {
            font-size: .95rem;
            opacity: .65;
            margin: 0 0 14px;
        }

        .cert-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .cert-badge {
            background-color: var(--color);
            border-radius: 999px;
            padding: 4px 14px;
            font-size: .78rem;
            font-weight: 600;
            opacity: .85;
        }

        .cert-badge.green { background-color: #dcfce7; color: var(--green); }
        .cert-badge.blue  {background-color: var(--act2);color: var(--actText1);}

        /* Métriques globales (réutilise .step) */
        .cert-stats {
            display: flex;
            gap: 14px;
            flex-shrink: 0;
            flex-direction: row;
            width: stretch;
            flex-wrap: wrap;
        }

        .cert-stat {
            background-color: var(--bgCard);
            border-radius: var(--radius);
            padding: 18px 22px;
            min-width: 110px;
            /* text-align: center; */
            display: flex;
            gap: 12px;
            flex-direction: row;
        }

        .cert-stat-val {
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--act1);
            line-height: 1;
        }

        .cert-stat-lbl {
            font-size: .75rem;
            opacity: .6;
            line-height: 1.3;
        }

        /* 
           ONGLETS — réutilise TypeDiv / PartenerBtn
         */
        .cert-tabs-wrap {
            padding: 0;
            translate: 0 0;
            height: auto;
            margin-bottom: 0;
        }

        /* 
           SECTION CONTENU
           (réutilise .entreprises / .entreprisesDiv)
         */
        .tab-panel {/* display: none; */}
        .tab-panel.active {display: block;}

        /*  Planification  */
        .planning-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: stretch;
            justify-content: center;
            width: 100%;
        }

        .planning-card {
            background-color: var(--color);
            border-radius: var(--radius);
            padding: 24px 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            color: var(--text);
            width: stretch;
        }

        .planning-card-head {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        /* réutilise step-num */
        .planning-icon {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background-color: var(--act2);
            color: var(--actText2);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .planning-card-title {
            font-weight: 700;
            font-size: 1.2rem;
            line-height: 1.3;
            color: var(--htext);
        }

        .planning-card-meta {
            font-size: .78rem;
            opacity: .6;
        }

        /* barre de progression — réutilise concepts du processus */
        .prog-bar-wrap {
            background-color: var(--bgCard);
            border-radius: 999px;
            height: 6px;
            overflow: hidden;
        }

        .prog-bar {
            height: 100%;
            border-radius: 999px;
            background-color: var(--act2);
            transition: width .6s ease;
        }

        .prog-bar.done {background-color: var(--act1);}
        .prog-bar.warn {background-color: var(--act1);}

        .prog-labels {
            display: flex;
            justify-content: space-between;
            font-size: .75rem;
            opacity: .6;
        }

        .planning-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
        }

        /*  Certificats  */
        .cert-grid {
            display: grid;
            grid-template-columns: repeat(1, minmax(260px, 1fr));
            gap: 16px;
            width: stretch;
        }

        .cert-card {
            background-color: var(--color);
            border-radius: var(--radius);
            padding: 28px 22px 22px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            position: relative;
            overflow: hidden;
            /* width: 100%; */
        }

        /* décoration coin */
        .cert-card::before {
            content: '';
            position: absolute;
            top: -24px;
            right: -24px;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background-color: var(--act1);
            opacity: .08;
        }

        .cert-card-icon {
            font-size: 1.8rem;
            line-height: 1;
            display: none;
        }

        .cert-card-name {
            font-weight: 500;
            font-size: 1.4rem;
            line-height: 1.35;
            color: var(--htext);
        }

        .cert-card-issued {
            font-size: .78rem;
            opacity: .55;
        }

        .cert-card-id {
            font-family: monospace;
            font-size: .7rem;
            opacity: .4;
            word-break: break-all;
        }

        .cert-card-actions {
            display: flex;
            gap: 8px;
            /* flex-wrap: wrap; */
            margin-top: auto;
            flex-direction: row;
        }

  
       
        /* 
           Responsive
         */
        @media (max-width: 640px) {
            .cert-hero .entreprisesDiv { flex-direction: column; }
            .cert-stats { width: 100%; justify-content: space-between; }
            .cert-stat  { flex: 1 1 80px; }
            .metrics-kpis .kpi { flex: 1 1 80px; }
        }

        /* 
           SKELETON (classes fournies)
         */
        .skull {
            width: 100%;
            min-width: 29px;
            background-color: var(--bg, #e5e7eb);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
            min-height: 30px;
        }
        .skull::after {
            content: "";
            position: absolute;
            top: 0px;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, var(--color), transparent);
            animation: 1.5s linear 0s infinite normal none running shimmer;
        }
        @keyframes shimmer {
            0%   { left: -100%; }
            100% { left:  100%; }
        }

        /* Helpers de mise en page skeleton */
        .skull-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .skull-line { border-radius: 6px; }
        .skull-badge { border-radius: 999px; height: 24px; }
        .skull-stat  { border-radius: var(--radius, 14px); height: 80px; }
        .skull-card  {border-radius: var(--radius, 14px);height: 130px;width: 200px;}
        .skull-tab   { border-radius: 8px; height: 38px; }

        /* Le no-profile ne sert plus — on garde la classe mais on le cache */
        .no-profile { display: none !important; }

        /* 
           RECHERCHE DE CANDIDAT
         */
        .search-section {
            padding: 40px 0 0;
        }

        .search-section .tit h3 {
            margin: 0 0 6px;
        }

        .search-section .tit p {
            font-size: .9rem;
            opacity: .6;
            margin: 0 0 24px;
        }

        .search-bar {
            display: flex;
            gap: 10px;
            width: stretch;
            padding: 6px 8px 6px 4px;
            border-radius: 14px;
            border: 1.5px solid rgba(0,0,0,.1);
            background-color: var(--bgCard);
        }

        .search-input-wrap {
            flex: 1 1 260px;
            position: relative;
        }

        .search-input-wrap svg {
            position: absolute;
            left: 14px;
            top: 50%;
            translate: 0 -50%;
            opacity: .4;
            pointer-events: none;
            color: var(--act1);
        }

        .search-input {
            width: 100%;
            box-sizing: border-box;
            padding: 12px 14px 12px 42px;
            border-radius: 10px;
            border: none;
            background-color: var(--bgCard);
            font-size: .95rem;
            font-family: var(--bFont);
            outline: none;
            transition: border-color .2s;
            color: var(--text);
        }

        .search-input:focus {
            border-color: var(--act1);
        }

        /* Résultats dropdown */
        .search-results {
            display: none;
            /* margin-top: 8px; */
            background-color: var(--color);
            border-radius: 12px;
            border: 1.5px solid rgba(0,0,0,.07);
            overflow: hidden;
            box-shadow: 0 8px 12px rgba(0,0,0,.04);
            width: 100%;
            /* max-width: 465px; */
        }

        .search-results.visible { display: block; }

        .search-result-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 16px;
            cursor: pointer;
            transition: background .15s;
            border-bottom: 1px solid rgba(0,0,0,.05);
        }

        .search-result-item:last-child { border-bottom: none; }

        .search-result-item:hover {background-color: var(--bgCard);}

        .search-result-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: var(--bg);
            color: var(--text);
            font-weight: 700;
            font-size: .8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .avatar{
            width: stretch;
            height: stretch;
            border-radius: 50%;
            background-size: cover;
        }

        .search-result-info { flex: 1; }

        .search-result-name {
            font-weight: 600;
            font-size: .92rem;
            line-height: 1.2;
            color: var(--text);
        }

        .search-result-sub {
            font-size: .75rem;
            opacity: .55;
            margin-top: 1px;
            color: var(--htext);
        }

        .search-result-badge {
            font-size: .7rem;
            font-weight: 600;
            padding: 3px 10px;
            border-radius: 999px;
            background-color: var(--bg);
            color: var(--act1);
            white-space: nowrap;
        }

        .search-empty {
            padding: 20px 16px;
            text-align: center;
            font-size: .88rem;
            opacity: .8;
            color: var(--htext);
        }

        /* Spinner inline */
        .search-spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(0,0,0,.15);
            border-top-color: var(--act1);
            border-radius: 50%;
            animation: spin .6s linear infinite;
            vertical-align: middle;
        }

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

        /* Vue "aucun candidat" — état initial avant toute recherche */
        #profileWrapper {display: flex;width: stretch;flex-direction: column;align-items: center;}

        .no-profile {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
            text-align: center;
            gap: 12px;
            opacity: .5;
        }

        .no-profile.visible { display: flex; }
        .no-profile svg { opacity: .3; }
        .no-profile p { margin: 0; font-size: .95rem; }

        @media (max-width: 640px) {
            .search-bar {flex-wrap: wrap;.search-bar {display: flex;gap: 10px;flex-wrap: wrap;
};.search-bar {display: flex;gap: 10px;flex-wrap: wrap;
};}
            .search-bar button { width: 100%; }
            .cert-grid {
            grid-template-columns: repeat(1, minmax(260px, 1fr));
        }
        }