/* Structure principale */
.content-wrapper {
    padding: 0;
    min-height: 100vh;
    background: transparent;
    color: #16213e;
}

.page-title {
    text-align: left;
    font-size: 2rem;
    color: #333;
    margin: 2rem 0 3rem;
    font-weight: 700;
    padding-left: 1rem;
}

/* Effet soulignés Pages */

.souligne {
    display: inline-block; /* important pour que la taille soit prise en compte */
    text-decoration: none; /* On retire le souligné par défaut */
    position: relative; /* nécessaire pour le positionnement du pseudo-élément */
}

.souligne::after {
    content: "";
    position: absolute; /* On positionne le pseudo-élément par rapport à l'élément */
    left: 0;
    right: 0; /* On étire le souligné sur toute la largeur */
    bottom: 7px; /* Ajuste la position du souligné */
    height: 2px; /* Ajuste l'épaisseur du souligné */
 /*   background-image: linear-gradient(to right, transparent, #e4e4e4 30.67%, #898989 85.29%, transparent) ; */
  background-image: linear-gradient(to right, transparent, #ebebeb 30.67%, #d8d8d8 87.82%, transparent); /* Dégradé avec transparence sur les côtés */
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transition: background-size 0.5s ease, bottom 0.3s ease;
}
  /* Effet hover (facultatif) */
.souligne:hover::after {
    background-size: 100% 120%;
     bottom: -4px; /* on descend un peu la bordure au hover */
}

/* Univers des tags */
.tags-universe {
    position: relative;
    height: 56vh;
    max-height: 800px;
    margin: -4rem auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Tag central */
.tags-orbit-center {
    position: absolute;
    z-index: 10;
}

.tag-mega {
    background: var(--primary-color);
      position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    padding: 2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7896bb 100%);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(40, 97, 124, 0.2);
    animation: pulse 2s infinite;
    color: white !important;
    text-decoration: none !important;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
    text-align: center;
}
.tag-mega a {
    color: white;
    text-decoration: none;
     position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
     justify-content: center;
     width: 100%;
    height: 100%;
}
.tag-mega a .tag-content{
  position:relative;
    color: white;
    text-decoration: none;
    z-index: 3;
}

.tag-mega.active {
    opacity: 1;
}

.tag-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    animation: ripple 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

/* Orbites */
.tags-orbit {
    position: absolute;
    width: var(--orbit-size);
    height: var(--orbit-size);
    border: 1px solid rgba(51, 51, 51, 0.15);
    border-radius: 50%;
    transform-style: preserve-3d;
   /* animation: orbit 60s linear infinite; on supprime l'animation css */
    transform: rotateY(30deg) rotateX(30deg);
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .tags-orbit {
        animation-duration: 90s;
    }
}

.orbit-1 {
    --orbit-size: 300px;
    animation: orbit 30s linear infinite;
    font-size:0.8rem;
}

.orbit-2 {
    --orbit-size: 500px;
    animation: orbit 50s linear infinite;
}

.orbit-3 {
    --orbit-size: 700px;
    animation: orbit 60s linear infinite;
    font-size:1.2rem;
}

/* Tags sur les orbites */
.tag-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    transform: rotate(var(--angle)) translateX(calc(var(--orbit-size) / 2)) rotate(calc(-1 * var(--angle)));
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    will-change: transform, opacity;
    backface-visibility: hidden;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .tag-item {
        transition-duration: 0.5s;
    }
}

.tag-item.back {
    opacity: 0.4;
    filter: blur(1px) grayscale(40%);
    transform: rotate(var(--angle)) translateX(calc(var(--orbit-size) / 2)) rotate(calc(-1 * var(--angle))) scale(0.92);
    pointer-events: none;
}

.tag-item span {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: white;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 0 8px var(--secondary-color);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change:transform;
}


.tag-item span{
    animation: orbit-reverse 0s linear infinite; /*suppression de l'animation inverse */
}
.orbit-1 .tag-item span{
    animation: orbit-reverse 30s linear infinite;
}
.orbit-2 .tag-item span{
    animation: orbit-reverse 50s linear infinite;
}
.orbit-3 .tag-item span{
    animation: orbit-reverse 60s linear infinite;
}
.tag-item span:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7896bb 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(239, 68, 176, 0.2);
    color: white;
    opacity: 1;
    filter: blur(0) grayscale(0%);
}


/* Style pour les tooltips */
.tag-item[title]:not([title=""]):hover::after,
.tag-mega[title]:not([title=""]):hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    display:none;
}

/* Section des catégories */
.tags-categories {
    padding: 0 2rem;
    margin-top: 12rem;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Tags en flux */
.tags-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 0 auto;
}

.tag-flow {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: white;
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--secondary-color);
    opacity: 0;
    transform: translateY(20px);
}

.tag-flow.animate {
    animation: fadeInUp 0.5s ease forwards;
}

.tag-flow:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7896bb 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 176, 0.2);
}

/* Animations */
@keyframes orbit {
    0% { transform: rotateY(30deg) rotateX(30deg) rotate(0deg); }
    100% { transform: rotateY(30deg) rotateX(30deg) rotate(360deg); }
}
@keyframes orbit-reverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 4px rgba(40, 97, 124, 0.2);
    }
    50% {
        box-shadow: 0 0 50px rgba(40, 97, 124, 0.5);
    }
    100% {
        box-shadow: 0 2px 4px rgba(40, 97, 124, 0.2);
    }
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 97, 124, 0.3);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(239, 68, 176, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 176, 0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .orbit-1 { --orbit-size: 250px; }
    .orbit-2 { --orbit-size: 400px; }
    .orbit-3 { --orbit-size: 550px; }
    
    .tags-universe {
        margin-top: -3rem;
    }
}

@media (max-width: 768px) {
    .orbit-1 { --orbit-size: 200px; }
    .orbit-2 { --orbit-size: 300px; }
    .orbit-3 { --orbit-size: 400px; }
    
    .tag-mega {
        font-size: 1.5rem;
        padding: 1.5rem 2rem;
    }

    .tags-universe {
        margin-top: -2rem;
        height: 70vh;
    }
}

@media (max-width: 480px) {
    .tags-universe {
        margin-top: -1rem;
        height: 60vh;
    }
    
    .tag-mega {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
}