:root {
    --font-primary: 'Sora', sans-serif;
    --color-bg: #0D0D12;
    --color-primary: #8A2BE2;
    --color-secondary: #00BFFF;
    --color-text: #E0E0E0;
    --color-text-muted: #B9BBBE;
    --color-glass: rgba(22, 22, 30, 0.4);
    --color-border: rgba(255, 255, 255, 0.07);
    --shadow: 0px 8px 32px rgba(0, 0, 0, 0.2);
    --status-online: #3BA55D;
    --status-idle: #FAA81A;
    --status-dnd: #ED4245;
    --status-offline: #747F8D;
    --profile-bg: #111214;
    --profile-bg-alt: #1c1d21;
    --profile-border: rgba(255, 255, 255, 0.06);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg);
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    overflow-x: hidden;
    cursor: none;
}

a,
button,
.skill-card,
.feature-card,
.lang-switcher,
.pdp-container {
    cursor: none;
}

/* --- AMÉLIORATIONS ANIMATION & BOUTON --- */

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    opacity: 0;
    pointer-events: none;
    z-index: 1001;
    transition: opacity 0.4s ease-in-out;
}

#page-content {
    /* Animation centrée */
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.8, 0.05, 0.4, 1), opacity 0.5s ease-out;
}

#page-content.is-transitioning {
    transform: scale(0);
    opacity: 0;
    transition-timing-function: cubic-bezier(0.8, 0.05, 0.4, 1), ease-in;
}

.lang-switcher {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1002;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-glass);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden; /* Pour arrondir les drapeaux */
}

.lang-switcher:hover {
    border-color: var(--color-primary);
    transform: scale(1.1) rotate(-15deg);
}

.lang-flag {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    border-radius: 50%;
}

.lang-flag.visible {
    opacity: 1;
}

/* --- FIN DES AMÉLIORATIONS --- */


.animated-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.animated-bg::before,
.animated-bg::after {
    content: '';
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
    /* L'animation en boucle est retirée pour être remplacée par l'interaction JS */
    /* animation: move-aurora 15s infinite alternate; */
    transition: transform 1s ease-out;
}

.animated-bg::before {
    background: var(--color-primary);
    top: -30vmax;  /* Positionnement initial au centre-gauche */
    left: -30vmax;
}

.animated-bg::after {
    background: var(--color-secondary);
    top: -30vmax; /* Positionnement initial au centre-droit */
    left: -30vmax;
    /* animation-delay: -7s; */ /* N'est plus nécessaire */
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-text);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
    z-index: 9999;
}

.custom-cursor.hover {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
}

.custom-cursor.text-hover {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-color: transparent;
}

.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title-container {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -2px;
    color: var(--color-text);
}

#hero-title.typing::after {
    content: '|';
    font-weight: 700;
    animation: blink-caret 0.25s step-end infinite;
}

@keyframes blink-caret {
    from,
    to {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.pdp-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.pdp-wrapper:hover .profile-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.pdp-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box, linear-gradient(135deg, var(--color-primary), var(--color-secondary)) border-box;
    border: 3px solid transparent;
    box-shadow: var(--shadow);
    z-index: 10;
}

.pdp-container img#discord-pdp {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pdp-decoration {
    position: absolute;
    top: -16px;
    left: -16px;
    width: calc(100% + 32px);
    height: calc(100% + 32px);
    pointer-events: none;
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 5px solid var(--color-bg);
    z-index: 11;
}

.profile-card {
    position: absolute;
    top: 50%;
    left: calc(100% + 20px);
    width: 340px;
    background-color: var(--profile-bg);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
    text-align: left;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;
    overflow: hidden;
}

.profile-card .banner {
    height: 120px;
    background-size: cover;
    background-position: center;
}

.profile-card .main-info {
    position: relative;
}

.profile-card .pdp-large-wrapper {
    position: absolute;
    top: -52px;
    left: 16px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background-color: var(--profile-bg);
    padding: 6px;
}

.profile-card .pdp-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.profile-card .pdp-large-decoration {
    position: absolute;
    top: -12px;
    left: -12px;
    width: calc(100% + 24px);
    height: calc(100% + 24px);
    pointer-events: none;
}

.status-indicator-large {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 5px solid var(--profile-bg);
}

.status-indicator.online,
.status-indicator-large.online {
    background-color: var(--status-online);
}

.status-indicator.idle,
.status-indicator-large.idle {
    background-color: var(--status-idle);
}

.status-indicator.dnd,
.status-indicator-large.dnd {
    background-color: var(--status-dnd);
}

.status-indicator.offline,
.status-indicator-large.offline {
    background-color: var(--status-offline);
}

.profile-card .content-body {
    padding-top: 48px;
}

.profile-card .names-badges {
    background-color: var(--profile-bg-alt);
    padding: 12px 16px 16px;
    border-radius: 8px;
    margin: 0 8px;
}

.profile-card .names {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.profile-card .display-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.profile-card .username {
    font-size: 14px;
    color: var(--color-text-muted);
}

.profile-card .badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.profile-card .badge-item-wrapper {
    position: relative;
}

.profile-card .badge-item {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.profile-card .badge-item-wrapper:hover .badge-tooltip {
    opacity: 1;
    visibility: visible;
}

.profile-card .badge-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111214;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.profile-card .profile-body-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-card .body-section {
    padding-top: 16px;
    border-top: 1px solid var(--profile-border);
}

.profile-card .body-section:first-child {
    padding-top: 0;
    border-top: none;
}

.profile-card .body-section h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.profile-card .body-section p {
    font-size: 14px;
    color: var(--color-text);
}

.profile-card .custom-status {
    font-size: 14px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-card .custom-status img {
    width: 18px;
    height: 18px;
}

.profile-card .activity-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.profile-card .activity-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-card .activity-images {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.profile-card .activity-large-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.profile-card .activity-small-image {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--profile-bg);
}

.profile-card .activity-details {
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    color: #DCDDDE;
}

.profile-card .activity-details strong {
    font-weight: 600;
    display: block;
    color: #fff;
}

.profile-card .activity-details span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card .elapsed-time {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.profile-card .note-section textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #DCDDDE;
    font-family: var(--font-primary);
    font-size: 14px;
    resize: none;
    height: 20px;
}

.profile-card .note-section textarea::placeholder {
    color: #72767d;
}

.profile-card .note-section textarea:focus {
    outline: none;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--color-primary);
    color: #fff;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.4);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(138, 43, 226, 0.6);
}

.cta-button:hover i {
    transform: translateX(5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid var(--color-text-muted);
    border-right: 3px solid var(--color-text-muted);
    transform: rotate(45deg);
    margin: -10px;
    animation: scroll-down 2s infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: -0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scroll-down {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-20px, -20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(20px, 20px);
    }
}

main {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 70px;
    font-weight: 700;
}

.section-title span {
    margin-right: 15px;
}

.skills-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card,
.feature-card {
    background: var(--color-glass);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
}

.skill-card:hover,
.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border-hover, var(--color-primary));
}

.feature-card:hover {
     border-color: var(--color-border-hover, var(--color-secondary));
}

.skill-card {
    text-align: center;
}

.skill-card .card-content {
    transform: translateZ(20px);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--color-primary);
    transform: translateZ(50px);
}

.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.skill-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    transform: translateZ(40px);
}

.feature-header i {
    color: var(--color-secondary);
    font-size: 1.5rem;
}

.feature-header h3 {
    font-size: 1.3rem;
}

.feature-body {
    color: var(--color-text-muted);
    line-height: 1.7;
    transform: translateZ(20px);
}

.final-cta {
    padding: 100px 20px;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: auto;
}

.final-cta h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
}

.final-cta p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin: 20px 0 40px;
}

.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: var(--delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (max-width: 960px) {
    .profile-card {
        left: 50%;
        transform: translateX(-50%) scale(0.95);
        top: calc(100% + 15px);
    }
    .pdp-wrapper:hover .profile-card {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .hero-title-container {
        min-height: 150px;
    }
    .custom-cursor {
        display: none;
    }
    body {
        cursor: auto;
    }
    a,
    button,
    .skill-card,
    .feature-card,
    .lang-switcher,
    .pdp-container {
        cursor: pointer;
    }
    section,
    .final-cta {
        padding: 80px 0;
    }
    .lang-switcher {
        top: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    .pdp-wrapper:hover .profile-card {
        display: none;
    }
}

/* ============================================= */
/* == STYLES POUR LA SECTION SCREENSHOT INTERACTIVE == */
/* ============================================= */

.interactive-screenshot-section {
    padding-bottom: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screenshot-container {
    position: relative;
    max-width: 90%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    line-height: 0;
}

#screenshot-img {
    max-width: 100%;
    height: auto;
    display: block;
}

#stream-overlay {
    position: absolute;
    background-color: #313338;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;

    top: 5.67%;
    left: 12.19%;
    width: 37.6%;
    height: 43.7%;
}

#play-stream-button {
    background-color: #4e5058;
    color: #dbdee1;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold; 
    transition: background-color 0.2s ease;
    z-index: 20;
    font-size: 14px;
}

/* Texte du bouton géré par JS, plus par `content` */
/*
#play-stream-button::before {
    content: "Regarder le stream";
}
*/

#play-stream-button:hover {
    background-color: #65676e;
    transform: none;
}

#stream-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: none;
}

.stream-user-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 30;
    display: flex;
    align-items: center;
    background-color: #212224;
    color: #e3e5e8;
    padding: 5px 9px;
    border-radius: 6px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
    pointer-events: none;
    font-size: 12px;
}

.stream-user-tag i {
    margin-left: 6px;
    font-size: 12px;
}

#stream-loader {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
}

#stream-loader::before,
#stream-loader::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    background: #5865F2; 
    border-radius: 0px;
    animation: chase-loader 1.6s infinite ease-in-out;
}

#stream-loader::after {
    animation-delay: -0.8s;
}

@keyframes chase-loader {
    0%, 100% {
        top: 0;
        left: 0;
        transform: scale(1);
    }
    25% {
        top: 0;
        left: calc(100% - 15px);
        transform: scale(1.4);
    }
    50% {
        top: calc(100% - 15px);
        left: calc(100% - 15px);
        transform: scale(1);
    }
    75% {
        top: calc(100% - 15px);
        left: 0;
        transform: scale(1.4);
    }
}