/* CV Widget - Saturn & Rocket Theme */
.cv-widget-container {
    position: fixed;
    bottom: 40px;
    right: 60px; /* Décalé vers la gauche */
    z-index: 1050; /* Au-dessus du reste mais sans bloquer */
    width: 75px; 
    height: 75px;
    border-radius: 50%;
    /* Couleurs vibrantes de Saturne (Ambré/Doré) pour contraster avec le fond bleu/violet */
    background: radial-gradient(circle at 30% 30%, #fbc531, #e1b12c, #cd6133);
    box-shadow: 0 0 25px rgba(225, 177, 44, 0.6), inset -5px -5px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    text-decoration: none;
}

.cv-widget-container:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(225, 177, 44, 0.9), inset -5px -5px 15px rgba(0,0,0,0.5);
}

/* Anneau arrière de Saturne (derrière le texte) */
.cv-widget-container::before {
    content: '';
    position: absolute;
    width: 170%; 
    height: 40%; 
    border-radius: 50%;
    border: 5px solid rgba(245, 246, 250, 0.5);
    border-bottom: 6px solid rgba(255, 255, 255, 0.9);
    border-top: 2px solid rgba(245, 246, 250, 0.1); 
    transform: rotate(-25deg);
    top: 30%;
    left: -35%;
    box-sizing: border-box;
    transition: transform 0.3s, border-color 0.3s;
    pointer-events: none; 
    z-index: 1; /* Derrière le texte */
    clip-path: polygon(-50% -50%, 150% -50%, 150% 50%, -50% 50%); /* Coupe la moitié basse pour ne garder que l'arrière */
}

/* Anneau avant de Saturne (devant le texte) */
.cv-widget-container::after {
    content: '';
    position: absolute;
    width: 170%; 
    height: 40%; 
    border-radius: 50%;
    border: 5px solid rgba(245, 246, 250, 0.5);
    border-bottom: 6px solid rgba(255, 255, 255, 0.9);
    border-top: 2px solid rgba(245, 246, 250, 0.1); 
    transform: rotate(-25deg);
    top: 30%;
    left: -35%;
    box-sizing: border-box;
    transition: transform 0.3s, border-color 0.3s;
    pointer-events: none; 
    z-index: 3; /* Devant le texte */
    clip-path: polygon(-50% 50%, 150% 50%, 150% 150%, -50% 150%); /* Coupe la moitié haute pour ne garder que l'avant */
}

.cv-widget-container:hover::before,
.cv-widget-container:hover::after {
    transform: rotate(-15deg) scale(1.1);
    border-bottom: 6px solid rgba(251, 197, 49, 1);
}

/* Texte CV */
.cv-widget-icon {
    color: #192a56; 
    font-size: 28px;
    font-weight: 900;
    font-family: 'Poppins', sans-serif, system-ui;
    z-index: 2; /* Coincé entre l'anneau arrière (1) et l'anneau avant (3) */
    transition: opacity 0.2s, transform 0.2s;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
}

/* Fusée pour l'animation (masquée par défaut) */
.cv-widget-rocket {
    position: absolute;
    color: #f5f6fa; 
    font-size: 30px;
    z-index: 4; /* Au dessus de tout */
    bottom: 20px; /* Base au centre de la planète */
    opacity: 0;
    transform: rotate(-45deg);
    transition: none;
    pointer-events: none;
}

/* Animation "Lancement" */
.cv-widget-container.launching .cv-widget-icon {
    opacity: 0;
    transform: scale(0.5);
}

.cv-widget-container.launching .cv-widget-rocket {
    /* ease-in pour un démarrage fluide qui accélère, évitant le saccadement */
    animation: rocketLaunch 0.9s ease-in forwards;
}

@keyframes rocketLaunch {
    0% {
        opacity: 0;
        bottom: 10px; /* Part presque du centre */
    }
    15% {
        opacity: 1;
        bottom: 25px; /* Apparaît clairement au milieu */
    }
    80% {
        opacity: 0; /* Disparition totale avant la fin */
        bottom: 150px; /* S'envole hors de l'écran */
    }
    100% {
        opacity: 0; 
        bottom: 150px; /* Reste invisible jusqu'au téléchargement */
    }
}

/* Tooltip (Texte indicateur style bulle de dialogue) */
.cv-widget-tooltip {
    position: absolute;
    right: 74px; /* Rapproché pour coller à la courbe supérieure gauche de la planète */
    top: 5px; /* Relevé pour pointer vers le quart supérieur gauche */
    background: rgba(15, 12, 41, 0.95);
    color: #fff;
    padding: 8px 15px;
    border-radius: 12px; 
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    border: 1px solid rgba(225, 177, 44, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    pointer-events: none;
}

/* La pointe de la bulle de dialogue qui pointe vers la droite */
.cv-widget-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -7px; 
    transform: translateY(-50%);
    border-width: 7px 0 7px 7px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(15, 12, 41, 0.95);
    z-index: 2;
}

/* Bordure de la pointe (pour correspondre au contour de la bulle) */
.cv-widget-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(225, 177, 44, 0.3);
    z-index: 1;
}

.cv-widget-container:hover .cv-widget-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Responsive pour tablettes (md) */
@media (max-width: 991px) {
    .cv-widget-container {
        bottom: 30px;
        right: 40px;
        width: 65px;
        height: 65px;
    }
    .cv-widget-icon {
        font-size: 24px;
    }
    .cv-widget-tooltip {
        right: 75px; /* Ajusté pour tablette */
    }
}

/* Responsive pour mobiles (sm) */
@media (max-width: 575px) {
    .cv-widget-container {
        bottom: 25px;
        right: 25px;
        width: 55px;
        height: 55px;
    }
    .cv-widget-icon {
        font-size: 20px;
    }
    .cv-widget-rocket {
        font-size: 22px;
    }
    .cv-widget-tooltip {
        display: none; 
    }
}
