@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #070b24;
    --text-color: #ffffff;
    --accent-color: #7b00ff;
    --card-bg: rgba(15, 20, 54, 0.7);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --border-opacity: 0.5;
    --border-blur: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

a { color: green;
text-decoration: none; 
}
a:hover {
	color: white;
}
.btn-invisible {
	display: none;
}
.galaxy-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0c164d 0%, #030610 100%);
    z-index: -2;
    overflow: hidden;
}

.galaxy-background::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(2px 2px at 40px 60px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 20px 50px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(3px 3px at 30px 100px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 70px 200px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 200px 90px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 220px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
        radial-gradient(3px 3px at 350px 340px, #ffffff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 400px 400px;
    animation: stars-move 50s linear infinite;
    z-index: -1;
}

.galaxy-background::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: 
        radial-gradient(ellipse at center, rgba(124, 0, 255, 0.2) 0%, rgba(0, 0, 0, 0) 60%),
        radial-gradient(ellipse at center, rgba(0, 187, 255, 0.15) 0%, rgba(0, 0, 0, 0) 50%),
        radial-gradient(ellipse at center, rgba(255, 0, 136, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    animation: nebula-shift 20s ease infinite alternate;
    z-index: -1;
    transform-origin: center;
}

.lottery-image {
    max-width: 100%;
    max-height: 100px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 10px;
}

@keyframes stars-move {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-400px);
    }
}

@keyframes nebula-shift {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}


header {
    text-align: center;
    margin-bottom: 2rem;
    z-index: 1;
    padding: 2rem;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #e6ccff, #7b00ff, #9966ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(123, 0, 255, 0.4));
}

header h1 span {
    display: block;
    font-size: 3.5rem;
    animation: text-glow 3s ease-in-out infinite alternate;
}

header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes text-glow {
    0% {
        text-shadow: 0 0 5px rgba(123, 0, 255, 0.3),
                     0 0 10px rgba(123, 0, 255, 0.2);
    }
    100% {
        text-shadow: 0 0 10px rgba(123, 0, 255, 0.5),
                     0 0 15px rgba(123, 0, 255, 0.3),
                     0 0 20px rgba(123, 0, 255, 0.2);
    }
}


.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 2rem;
    max-width: 1400px;
    perspective: 3000px;
    transform-style: preserve-3d;
    z-index: 1;
}


.card {
    position: relative;
    width: 320px;
    height: 450px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5),
                0 0 10px var(--glow, rgba(123, 0, 255, 0.3));
    overflow: visible;
    backdrop-filter: blur(5px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    z-index: 1;
    perspective: 1500px;
    cursor: pointer;
    border: 1px solid var(--glow, rgba(123, 0, 255, 0.3));
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5),
                0 0 20px var(--glow, rgba(123, 0, 255, 0.5));
    border: 1px solid var(--glow, rgba(123, 0, 255, 0.7));
}


.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: inherit;
    transform-origin: center center;
    perspective: 1000px;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 5px 15px var(--glow, rgba(123, 0, 255, 0.6));
}

.card.flipped .card-front {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.card.flipped .card-back {
    opacity: 1;
    visibility: visible;
    z-index: 3;
    transform: rotateY(0deg);
    box-shadow: 0 0 30px var(--glow, rgba(123, 0, 255, 0.5)); 
}

.card.flipped .secret-content {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.5s 0.2s, transform 0.5s 0.2s, visibility 0s;
}


.card.flipping {
    z-index: 100;
    box-shadow: 0 0 70px var(--glow, rgba(123, 0, 255, 0.7));
}

.card.flipping::before {
    content: '';
    position: absolute;
    inset: -5px;
    z-index: -1;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0);
    box-shadow: 0 0 30px 15px var(--glow, rgba(123, 0, 255, 0.8));
    animation: flip-pulse 1.2s ease-out forwards;
}

@keyframes flip-pulse {
    0% {
        box-shadow: 0 0 30px 15px var(--glow, rgba(123, 0, 255, 0.8));
        opacity: 1;
    }
    40% {
        box-shadow: 0 0 60px 30px var(--glow, rgba(123, 0, 255, 0.9));
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 30px 15px var(--glow, rgba(123, 0, 255, 0.8));
        opacity: 0.5;
    }
}


.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.card-front {
    z-index: 2;
    transform: rotateY(0deg);
    opacity: 1;
    visibility: visible;
}

.card-back {
    transform: rotateY(180deg);
    color: white;
    background: linear-gradient(
        135deg,
        rgba(0, 10, 30, 0.8) 0%,
        rgba(0, 10, 40, 0.9) 100%
    );
    justify-content: center;
    align-items: center;
    display: flex;
    overflow: hidden;
    backface-visibility: hidden;
}


.secret-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, transform 0.5s, visibility 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    z-index: 5;
    pointer-events: auto;
}


.secret-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: white;
    background: linear-gradient(45deg, #ffffff, var(--glow, #7b00ff));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px var(--glow, rgba(123, 0, 255, 0.3)));
    text-align: center;
    width: 100%;
    transition: all 0.5s ease;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.title-first, .title-second {
    display: block;
    background: linear-gradient(45deg, #ffffff, var(--glow, #7b00ff));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px var(--glow, rgba(123, 0, 255, 0.3)));
}

.title-first {
    font-size: 140%;
    margin-bottom: 0.2rem;
}

.title-second {
    font-size: 90%;
    letter-spacing: 0.05em;
}


.card:nth-child(1) .secret-title {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    filter: none;
}

.card:nth-child(1) .secret-title .title-first {
    transform: translateY(2px);
}

.card:nth-child(1) .secret-title .title-second {
    transform: translateY(-2px);
}


.card.flipped .secret-title {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.secret-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.5rem 0 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    width: 100%;
    transition: all 0.5s ease;
    max-width: 90%;
}

.secret-icon {
    font-size: 2.5rem;
    margin: 0 0 0.5rem;
    color: var(--glow, #7b00ff);
    filter: drop-shadow(0 0 10px var(--glow, rgba(123, 0, 255, 0.5)));
    transition: all 0.5s ease;
}


@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

@keyframes cardFlipBack {
    0% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}


.card-back .btn {
    background: var(--glow, rgba(123, 0, 255, 0.7));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 15px var(--glow, rgba(123, 0, 255, 0.5));
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.card.flipped .card-back .btn {
    opacity: 1;
    transform: scale(1);
}

.card-back .btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 0 25px var(--glow, rgba(123, 0, 255, 0.8));
    border-color: rgba(255, 255, 255, 0.6);
    animation: back-btn-hover-pulse 1.2s infinite;
}

@keyframes back-btn-hover-pulse {
    0% {
        box-shadow: 0 0 25px var(--glow, rgba(123, 0, 255, 0.8));
    }
    50% {
        box-shadow: 0 0 40px var(--glow, rgba(123, 0, 255, 1));
    }
    100% {
        box-shadow: 0 0 25px var(--glow, rgba(123, 0, 255, 0.8));
    }
}

.card-back .btn:active {
    transform: scale(0.95);
}


.rune {
    position: absolute;
    font-size: 1.8rem;
    opacity: 0;
    transition: all 0.5s ease;
    filter: blur(1px);
    color: var(--glow, #7b00ff);
    text-shadow: 0 0 10px var(--glow, rgba(123, 0, 255, 0.6));
    animation: glow-rune 2s ease-in-out infinite alternate;
    z-index: 3;
    border: none;
    pointer-events: none;
}

.card.flipped .rune {
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--glow, rgba(123, 0, 255, 0.8)));
    animation: glow-rune 3s infinite alternate;
}

@keyframes glow-rune {
    from { 
        filter: drop-shadow(0 0 5px var(--glow, rgba(123, 0, 255, 0.5))); 
        opacity: 0.7;
    }
    to { 
        filter: drop-shadow(0 0 10px var(--glow, rgba(123, 0, 255, 0.8))); 
        opacity: 1;
    }
}


.card-back .rune:nth-child(2) { top: 24%; left: 30%; font-size: 1.7rem; }
.card-back .rune:nth-child(3) { top: 21%; left: 68%; font-size: 1.6rem; }
.card-back .rune:nth-child(4) { top: 73%; left: 33%; font-size: 1.9rem; }
.card-back .rune:nth-child(5) { top: 69%; left: 72%; font-size: 1.8rem; }
.card-back .rune:nth-child(6) { top: 46%; left: 83%; font-size: 1.5rem; }
.card-back .rune:nth-child(7) { top: 12%; left: 51%; font-size: 1.7rem; }
.card-back .rune:nth-child(8) { top: 82%; left: 56%; font-size: 1.6rem; }


.magical-circle {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px solid var(--glow, rgba(123, 0, 255, 0.3));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 20px var(--glow, rgba(123, 0, 255, 0.3)), inset 0 0 20px var(--glow, rgba(123, 0, 255, 0.2));
    opacity: 0.7;
    pointer-events: none;
}

.card.flipped .magical-circle {
    animation: rotate 20s linear infinite;
    opacity: 1;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}


.card-front .card-content {
    z-index: 2;
}


.card-front .btn {
    z-index: 50;
    position: relative;
    border-width: 2px;
}


.card-front::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
    background-size: cover;
    opacity: 0.1;
    mix-blend-mode: soft-light;
    transition: opacity 0.3s ease;
}

.card:nth-child(1) .card-front::before {
    background-image: url('https://images.unsplash.com/photo-1526304640581-d334cdbbf45e?q=80&w=800');
    background-position: center;
}

.card:nth-child(2) .card-front::before {
    background-image: url('https://images.unsplash.com/photo-1513885535751-8b9238bd345a?q=80&w=800');
    background-position: center;
}

.card:nth-child(3) .card-front::before {
    background-image: url('https://images.unsplash.com/photo-1488085061387-422e29b40080?q=80&w=800');
    background-position: center;
}

.card:hover .card-front::before {
    opacity: 0.2;
}

/* règle pour les cartes FAQ – doit venir après */
.card.faq-card .card-front::before {
    background-image: url('https://plus.unsplash.com/premium_photo-1680303237111-35809e47fcc1?q=80&w=800') !important;
    background-position: center;
}
.card.winner-card .card-front::before {
    background-image: url('https://images.unsplash.com/photo-1578269174936-2709b6aeb913?q=80&w=800') !important;
    background-position: center;
}

.card.contact-card .card-front::before {
    background-image: url('https://images.unsplash.com/photo-1683117927786-f146451082fb?q=80&w=800') !important;
    background-position: center;
}

.card.lottery-card .card-front::before {
    background-image: url('https://plus.unsplash.com/premium_photo-1718169446625-37680c0a3a0a?q=80&w=800') !important;
    background-position: center;
}

.card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        var(--reflective-angle, 135deg),
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.07) 40%,
        rgba(255, 255, 255, 0.05) 75%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border-radius: inherit;
    z-index: 1;
    transition: background 0.5s ease;
    pointer-events: none;
}


.card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(
        45deg,
        var(--glow, rgba(123, 0, 255, 0.7)) 0%,
        transparent 35%,
        transparent 65%,
        var(--glow, rgba(123, 0, 255, 0.7)) 100%
    );
    z-index: -1;
    filter: blur(var(--border-blur, 4px));
    opacity: var(--border-opacity, 0.5);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.card:hover::after {
    opacity: 0.8;
    filter: blur(6px);
}

.card.active::after {
    opacity: 0.9;
    filter: blur(7px);
}

.card.active .highlight,
.card.active .card-glow,
.card.active .ripple-effect {
    opacity: 1;
}


.card-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        var(--glow, #7b00ff) 0%, 
        transparent 70%
    );
    filter: blur(20px);
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translateZ(0);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% {
        filter: blur(20px) brightness(1);
    }
    100% {
        filter: blur(25px) brightness(1.5);
    }
}

.card.active .card-glow {
    opacity: 0.8;
}


.magnetic-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
}

.magnetic-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(0, 0);
    box-shadow: 0 0 4px 2px rgba(255, 255, 255, 0.4);
    transition: opacity 0.5s ease;
    z-index: 2;
    filter: blur(1px);
    animation: pulsate 2s ease-in-out infinite alternate;
}

@keyframes pulsate {
    0% {
        opacity: var(--particle-base-opacity, 0.3);
        filter: blur(1px) brightness(1);
        box-shadow: 0 0 2px 1px var(--glow, rgba(123, 0, 255, 0.4));
    }
    100% {
        opacity: var(--particle-max-opacity, 0.7);
        filter: blur(2px) brightness(1.5);
        box-shadow: 0 0 6px 3px var(--glow, rgba(123, 0, 255, 0.8));
    }
}


.cinematic-flare {
    display: none;
}

.highlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        transparent 70%
    );
    opacity: 0;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: blur(10px);
}

.card.active .highlight {
    opacity: 0.8;
    animation: highlight-pulse 3s infinite alternate;
}

@keyframes highlight-pulse {
    0% {
        opacity: 0.6;
        filter: blur(10px);
    }
    100% {
        opacity: 0.9;
        filter: blur(15px);
    }
}


.edge-glow {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 25px;
    border: 2px solid var(--glow, #7b00ff);
    background: linear-gradient(135deg, var(--glow, #7b00ff), transparent 70%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 0;
    opacity: 0.5;
    filter: blur(3px);
    transition: opacity 0.3s ease;
    animation: pulse-edge 2s ease-in-out infinite;
    box-shadow: 0 0 15px 5px var(--glow, rgba(123, 0, 255, 0.4));
}

.card.active .edge-glow {
    opacity: 0.9;
    filter: blur(4px);
    box-shadow: 0 0 20px 8px var(--glow, rgba(123, 0, 255, 0.7));
}

@keyframes pulse-edge {
    0% {
        filter: blur(3px) brightness(1);
        box-shadow: 0 0 15px 5px var(--glow, rgba(123, 0, 255, 0.4));
    }
    50% {
        filter: blur(4px) brightness(1.5);
        box-shadow: 0 0 20px 8px var(--glow, rgba(123, 0, 255, 0.7));
    }
    100% {
        filter: blur(3px) brightness(1);
        box-shadow: 0 0 15px 5px var(--glow, rgba(123, 0, 255, 0.4));
    }
}


.ripple-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 11;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        var(--glow, rgba(123, 0, 255, 0.2)) 0%,
        transparent 70%
    );
    transform: scale(0);
    opacity: 0.6;
}

.card.active .ripple-effect {
    opacity: 1;
}


.btn {
    position: relative;
    display: inline-block;
    padding: 0.9rem 2rem;
    background: rgba(10, 10, 20, 0.6);
    color: #fff;
    border: 2px solid var(--glow, rgba(123, 0, 255, 0.5));
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1.2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3),
                0 0 10px var(--glow, rgba(123, 0, 255, 0.3));
    backdrop-filter: blur(4px);
    outline: none;
    z-index: 5;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--glow, rgba(123, 0, 255, 0.8)), 
        var(--glow, rgba(123, 0, 255, 0.6))
    );
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: 28px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3),
                0 0 20px var(--glow, rgba(123, 0, 255, 0.6));
    border-color: var(--glow, rgba(123, 0, 255, 0.8));
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    letter-spacing: 1.5px;
    animation: btn-hover-pulse 1.2s infinite;
}

@keyframes btn-hover-pulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3),
                    0 0 20px var(--glow, rgba(123, 0, 255, 0.6));
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3),
                    0 0 35px var(--glow, rgba(123, 0, 255, 0.9));
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3),
                    0 0 20px var(--glow, rgba(123, 0, 255, 0.6));
    }
}

.btn:hover::before {
    width: 100%;
    animation: btn-hover-shimmer 1.5s infinite;
}

@keyframes btn-hover-shimmer {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.6;
    }
}

.btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 0 30px var(--glow, rgba(123, 0, 255, 0.9));
}

nav ul, li {
	list-style: none;
}
.btn.flip-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        var(--glow, rgba(123, 0, 255, 0.8)) 0%,
        transparent 70%
    );
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    animation: btn-pulse 0.5s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
    z-index: -1;
    opacity: 0.6;
}

@keyframes btn-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }
    80% {
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}


.card-front .btn {
    z-index: 50;
    position: relative;
    border-width: 2px;
}


.card-back .btn {
    background: var(--glow, rgba(123, 0, 255, 0.7));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 15px var(--glow, rgba(123, 0, 255, 0.5));
}

.card-back .btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 0 25px var(--glow, rgba(123, 0, 255, 0.8));
    border-color: rgba(255, 255, 255, 0.6);
    animation: back-btn-hover-pulse 1.2s infinite;
}

.card-back .btn:active {
    transform: scale(0.95);
}

.card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    height: 100%;
    text-align: center;
    z-index: 10;
    pointer-events: auto;
}

.icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--icon-color, var(--glow, #7b00ff));
    filter: drop-shadow(0 0 10px var(--glow, rgba(123, 0, 255, 0.6)));
    animation: icon-glow 2s ease-in-out infinite alternate;
}

@keyframes icon-glow {
    0% {
        filter: drop-shadow(0 0 10px var(--glow, rgba(123, 0, 255, 0.4)));
    }
    100% {
        filter: drop-shadow(0 0 20px var(--glow, rgba(123, 0, 255, 0.8)));
    }
}

.card-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, var(--glow, #7b00ff));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px var(--glow, rgba(123, 0, 255, 0.3)));
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% {
        filter: drop-shadow(0 0 5px var(--glow, rgba(123, 0, 255, 0.3)));
    }
    100% {
        filter: drop-shadow(0 0 15px var(--glow, rgba(123, 0, 255, 0.7)));
    }
}

.card-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}


footer {
    text-align: center;
    padding-top: 5%;
	padding-bottom: 5%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    width: 100%;
    z-index: 1;
}


@keyframes card-appear {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card:nth-child(1) {
    animation: card-appear 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.card:nth-child(2) {
    animation: card-appear 1s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

.card:nth-child(3) {
    animation: card-appear 1s cubic-bezier(0.23, 1, 0.32, 1) 0.4s forwards;
}

.participer-btn {
  transition: transform 0.2s ease;
  transform-origin: center;
  will-change: transform;
  touch-action: pan-y;
}


@media screen and (max-width: 1200px) {
    .cards-container {
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
	.card {
		animation: none;
	}
	  /* Désactiver animations gourmandes */
  .card-glow,
  .highlight,
  .edge-glow,
  .ripple-effect,
  .rune,
  .card-inner::after {
    display: none !important;
  }

  /* Neutraliser hover (inefficace sur mobile) */
  .card:hover,
  .btn:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .btn:hover::before {
    width: 0 !important;
  }
}

@media (max-width: 480px) {

  body {
    padding: 0 1rem;
  }

  header h1 {
    font-size: 2rem;
  }

  header h1 span {
    font-size: 2.5rem;
  }

  .cards-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .card {
    width: 70vw;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  .card-content {
    padding: 1.2rem;
  }

  .secret-content {
    padding: 1rem;
  }

  .secret-title {
    font-size: 50px;
  }

  .title-first {
    font-size: 50px;
  }

  .title-second {
    font-size: 1rem;
  }

  .secret-description {
    font-size: 0.9rem;
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .card-content h2 {
    font-size: 1.4rem;
  }

  .icon {
    font-size: 2.2rem;
  }

  footer {
    font-size: 0.8rem;
    padding-top: 30px;
  }

  /* Désactiver animations gourmandes */
  .card-glow,
  .highlight,
  .edge-glow,
  .ripple-effect,
  .magnetic-particle,
  .rune,
  .card-inner::after,
  .galaxy-background  {
    display: none !important;
	animation: none !important;
  }

  /* Neutraliser hover (inefficace sur mobile) */
  .card:hover,
  .btn:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .btn:hover::before {
    width: 0 !important;
  }
}



.card-glow, .highlight, .edge-glow, .ripple-effect, .magnetic-particles {
    pointer-events: none;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 3px;
    background: linear-gradient(
        135deg,
        var(--glow, #7b00ff) 0%,
        transparent 50%,
        var(--glow, #7b00ff) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: var(--border-opacity, 0.8);
    transition: opacity 0.3s ease;
    z-index: 1;
    filter: blur(var(--border-blur, 1px));
    box-shadow: 0 0 15px var(--glow, rgba(123, 0, 255, 0.8));
}

.card:hover::before {
    opacity: 1;
    filter: blur(1px) brightness(1.5);
    box-shadow: 0 0 20px var(--glow, rgba(123, 0, 255, 1));
}


.card.flip-animation::after,
.card.flip-back-animation::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 25px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--glow, rgba(123, 0, 255, 0.1)) 25%,
        var(--glow, rgba(123, 0, 255, 0.7)) 50%,
        var(--glow, rgba(123, 0, 255, 0.1)) 75%,
        transparent 100%
    );
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    animation: edge-shine 1.2s ease-in-out forwards;
}

@keyframes edge-shine {
    0% {
        opacity: 0;
        transform: translateX(-100%) rotateY(0deg);
    }
    25% {
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(100%) rotateY(0deg);
    }
}


.card.flip-animation .card-inner::before,
.card.flip-back-animation .card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        circle at center,
        var(--glow, rgba(123, 0, 255, 0.8)) 0%,
        transparent 70%
    );
    z-index: 5;
    opacity: 0;
    filter: blur(20px);
    animation: flip-glow 1.2s ease-in-out forwards;
}

@keyframes flip-glow {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
    }
}


.card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(
        45deg,
        var(--glow, rgba(123, 0, 255, 0.7)) 0%,
        transparent 35%,
        transparent 65%,
        var(--glow, rgba(123, 0, 255, 0.7)) 100%
    );
    z-index: -1;
    filter: blur(var(--border-blur, 4px));
    opacity: var(--border-opacity, 0.5);
    transition: opacity 0.3s ease, filter 0.3s ease;
}


.card.flip-animation {
    z-index: 100;
}

.card.flip-animation .card-inner {
    animation: card-flip-animation 1.2s cubic-bezier(0.4, 0.2, 0.2, 1) forwards;
    box-shadow: 0 0 50px var(--glow, rgba(123, 0, 255, 0.7));
}

.card.flip-back-animation {
    z-index: 100;
}

.card.flip-back-animation .card-inner {
    animation: card-flip-back-animation 1.2s cubic-bezier(0.4, 0.2, 0.2, 1) forwards;
    box-shadow: 0 0 50px var(--glow, rgba(123, 0, 255, 0.7));
}


.card.flipped .secret-title {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.card.flipped .secret-description {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

.card.flipped .secret-icon {
    opacity: 1;
    transform: scale(1);
}


.card-front .card-content,
.card-back .secret-content {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}


.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: inherit;
    transform-origin: center center;
    perspective: 1000px;
}


.card-front, 
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}


.debug-borders .card-front {
    border: 2px solid red;
}

.debug-borders .card-back {
    border: 2px solid blue;
}


.debug-back-visible .card .card-back,
.debug-back-visible .card .secret-content {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
}

.debug-back-visible .card .secret-icon,
.debug-back-visible .card .secret-title,
.debug-back-visible .card .secret-description,
.debug-back-visible .card .card-back .btn,
.debug-back-visible .card .rune {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}


.debug-borders .card-front {
    border: 3px solid red !important;
}

.debug-borders .card-back {
    border: 3px solid blue !important;
}

.debug-borders .secret-content {
    border: 3px solid green !important;
}

.debug-borders .card-inner {
    border: 3px solid purple !important;
}


.debug-borders * {
  outline: 1px solid rgba(255, 0, 0, 0.5) !important;
}

.debug-back-visible .card-back {
  opacity: 0.9 !important;
  z-index: 10 !important;
  pointer-events: all !important;
  transform: none !important;
}


.debug-controls {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.debug-controls h3 {
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  font-size: 14px;
}

.debug-controls button {
  background-color: #444;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  margin: 2px 0;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.debug-controls button:hover {
  background-color: #666;
}


.card.flipped .card-inner {
    transform: rotateY(180deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 5px 15px var(--glow, rgba(123, 0, 255, 0.6));
}

.card.flipped .card-front {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.card.flipped .card-back {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0deg);
    z-index: 3;
    box-shadow: 0 0 30px var(--glow, rgba(123, 0, 255, 0.5));
}

.card.flipped .secret-content {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.5s 0.2s, transform 0.5s 0.2s, visibility 0s;
}


.btn.flip-btn {
    position: relative;
    z-index: 10;
    transform: translateZ(20px);
    will-change: transform;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn.flip-btn:hover {
    transform: translateZ(30px) scale(1.05) translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 6px 10px var(--glow, rgba(123, 0, 255, 0.4));
}

.btn.flip-btn:active {
    transform: translateZ(15px) scale(0.95);
}


.secret-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, transform 0.5s, visibility 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    z-index: 5;
}


.card.flipped .rune {
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--glow, rgba(123, 0, 255, 0.8)));
    animation: glow-rune 3s infinite alternate;
}


.card-back .rune:nth-child(2) { top: 25%; left: 30%; }
.card-back .rune:nth-child(3) { top: 20%; left: 70%; }
.card-back .rune:nth-child(4) { top: 75%; left: 35%; }
.card-back .rune:nth-child(5) { top: 70%; left: 70%; }
.card-back .rune:nth-child(6) { top: 45%; left: 85%; }
.card-back .rune:nth-child(7) { top: 15%; left: 50%; }
.card-back .rune:nth-child(8) { top: 85%; left: 55%; }


.card[data-color="#00ffe1"] .secret-icon {
    font-size: 3rem;
    color: var(--glow, #00ffe1);
    filter: drop-shadow(0 0 10px var(--glow, rgba(0, 255, 225, 0.7)));
    animation: simple-star-pulse 3s infinite alternate;
}

@keyframes simple-star-pulse {
    from {
        filter: drop-shadow(0 0 5px var(--glow, rgba(0, 255, 225, 0.5)));
    }
    to {
        filter: drop-shadow(0 0 15px var(--glow, rgba(0, 255, 225, 0.9)));
    }
}

.btn.flip-btn:hover {
    background: rgba(20, 20, 40, 0.7);
    text-shadow: 0 0 10px rgba(255, 255, 255, 1);
    color: white;
}

.btn.flip-btn:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: btn-shine 1.5s infinite;
    border-radius: 30px;
}

@keyframes btn-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}


.card:nth-child(1) .secret-title {
    font-size: 1.6rem;
}

.card:nth-child(1) .secret-title br + * {
    font-size: 1.6rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: border 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #00ffe1;
    box-shadow: 0 0 8px #00ffe1;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    margin-top: 15px;
    color: #00ff88;
    font-weight: bold;
    text-align: center;
}

.form-error {
    margin-top: 15px;
    color: #ff4d4d;
    font-weight: bold;
    text-align: center;
}