/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #fbbf24 0%, #3b82f6 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 25%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.08) 0%, transparent 20%),
        radial-gradient(circle at 60% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 15%),
        radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.05) 0%, transparent 15%);
    pointer-events: none;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header et Navigation */
.header {
    background: rgba(250, 248, 235, 0.9);
    border: 2px solid rgba(230, 215, 185, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 20px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    color: #3b82f6;
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo h1 sup {
    font-size: 0.5em;
}

.logo h1:hover {
    transform: scale(1.05);
}

.logo-tagline {
    font-size: 1rem;
    color: #000000;
    font-weight: 600;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}

.logo-tagline div {
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #3b82f6;
    margin: 3px 0;
    transition: 0.3s;
}

/* Contenu principal */
.main-content {
    padding: 0 20px 2rem 20px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Hero */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: rgba(245, 245, 220, 0.85);
    border: 2px solid rgba(220, 220, 190, 0.8);
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 4rem;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* Style global pour tous les © en exposant */
sup {
    font-size: 0.5em;
}

.hero-title sup {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #666;
    font-style: italic;
}

/* Section À propos */
.about-section {
    background: rgba(245, 240, 215, 0.9);
    border: 2px solid rgba(220, 200, 170, 0.8);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    color: #555;
    text-align: justify;
}

.about-content p:last-of-type {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
}

.about-content strong {
    color: #3b82f6;
}

/* Section Contact */
.contact-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 3rem 2rem;
    position: relative;
}

.contact-pikto-decoration {
    margin-bottom: 2rem;
}

.contact-pikto {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
    animation: float 4s ease-in-out infinite;
    display: block;
    margin: 0 auto;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.contact-card {
    background: rgba(245, 240, 215, 0.9);
    border: 2px solid rgba(220, 200, 170, 0.8);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 18px;
    z-index: -1;
}

.contact-email-label {
    font-size: 1.3rem;
    color: #555;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.contact-email-link {
    font-size: 1.6rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    border-radius: 15px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    margin-bottom: 2rem;
}

.contact-email-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    text-decoration: none;
}

.contact-signature {
    border-top: 2px solid rgba(251, 191, 36, 0.3);
    padding-top: 1.5rem;
}

.contact-signature p {
    font-size: 1.3rem;
    color: #666;
    font-style: italic;
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid rgba(200, 180, 140, 0.6);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(252, 250, 240, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.btn-submit {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    align-self: center;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Sections enKoder et nerGO */
.enkoder-section,
.nergo-section {
    background: rgba(245, 240, 215, 0.9);
    border: 2px solid rgba(220, 200, 170, 0.8);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.enkoder-section h2,
.nergo-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kodex-content,
.memory-nergo-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.kodex-content h3,
.memory-nergo-content h3 {
    color: #3b82f6;
    margin: 1.5rem 0 1rem 0;
}

.kodex-content ul,
.memory-nergo-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.enkoder-demo,
.enkoder-tool,
.spiktoracine-tool,
.nergo-preview {
    background: rgba(252, 250, 240, 0.9);
    border: 2px solid rgba(200, 180, 150, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.demo-letters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.demo-letter {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.demo-pikto {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.demo-letter span {
    font-weight: bold;
    color: #3b82f6;
    font-size: 1.2rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 1rem;
    justify-items: center;
    margin: 1rem 0;
}

.preview-pikto {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.preview-pikto:hover {
    transform: scale(1.2);
}

.nergo-cta {
    text-align: center;
    margin: 2rem 0;
}

.btn-nergo {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.btn-nergo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Styles pour le jeu memory */
.nergo-game-container {
    background: rgba(252, 250, 240, 0.9);
    border: 2px solid rgba(200, 180, 150, 0.8);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.memory-game {
    max-width: 600px;
    margin: 0 auto;
}

.game-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-title-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.nergo-title {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.nergo-title sup {
    font-size: 0.5em;
}

.game-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-restart-game {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.btn-restart-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.btn-quit-game {
    background: linear-gradient(45deg, #4b5563, #374151);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(75, 85, 99, 0.3);
}

.btn-quit-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 85, 99, 0.4);
    background: linear-gradient(45deg, #374151, #1f2937);
}

/* Liste des jeux nerGO */
.nergo-games-list {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.nergo-game-option {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.nergo-game-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.nergo-game-option .nergo-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.game-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.btn-game-select {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-game-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Styles pour nerGO©combo */
.combo-game {
    max-width: 600px;
    margin: 0 auto;
}

.combo-ui {
    text-align: center;
    margin-bottom: 25px;
}

.combo-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.combo-stats span {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#combo-score.score-update {
    animation: score-bounce 0.5s ease-out;
}

#combo-combo.combo-active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    color: #FFD700;
    animation: combo-glow 1s ease-in-out infinite alternate;
}

.combo-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    max-width: 450px;
    margin: 20px auto;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.combo-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.combo-cell:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.combo-cell.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.6), rgba(255, 215, 0, 0.4));
    border: 2px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: pulse-selected 0.6s ease-in-out infinite alternate;
}

.combo-cell.swapping {
    animation: swap-animation 0.4s ease-in-out;
    z-index: 10;
}

.combo-cell.invalid-swap {
    animation: shake 0.6s ease-in-out;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.3), rgba(255, 0, 0, 0.1));
}

.combo-cell.matched {
    animation: match-disappear 0.5s ease-in-out forwards;
    z-index: 5;
}

.combo-cell.animate-in {
    animation: drop-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.combo-cell.dragging {
    transform: scale(1.1);
    z-index: 20;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: grabbing;
}

.combo-cell.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.6), rgba(255, 215, 0, 0.4));
    border: 3px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    transform: scale(1.1);
    z-index: 15;
}

.combo-cell.selection-path {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 215, 0, 0.2));
    border: 2px solid #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.combo-cell.removing {
    animation: remove-bounce 0.5s ease-in-out forwards;
    z-index: 20;
}

.pikto-piece {
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.combo-cell:hover .pikto-piece {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.combo-cell img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.combo-message {
    text-align: center;
    margin-top: 20px;
    min-height: 35px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.combo-message.success {
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    animation: message-glow 0.5s ease-out;
}

.combo-message.warning {
    color: #FF9800;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.combo-message.info {
    color: #2196F3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}

/* Animations */
@keyframes pulse-selected {
    0% { transform: scale(1.08); box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    100% { transform: scale(1.12); box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

@keyframes swap-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}

@keyframes match-disappear {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes drop-in {
    0% { transform: translateY(-100px) scale(0.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes score-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #FFD700; }
    100% { transform: scale(1); }
}

@keyframes combo-glow {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

@keyframes message-glow {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Particules */
.particles {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: absolute;
    animation: particle-explode 1s ease-out forwards;
}

@keyframes particle-explode {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(0) translate(var(--random-x, 20px), var(--random-y, -30px));
        opacity: 0;
    }
}

@keyframes remove-bounce {
    0% { 
        transform: scale(1.1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.3) rotate(10deg); 
        opacity: 0.7; 
    }
    100% { 
        transform: scale(0) rotate(45deg); 
        opacity: 0; 
    }
}

/* Animations de gravité */
.combo-cell.dropping {
    animation: drop-fall 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.combo-cell.dropped {
    animation: drop-bounce 0.3s ease-out;
}

.combo-cell.new-pikto {
    animation: new-pikto-appear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes drop-fall {
    0% { 
        transform: translateY(-20px) scale(0.9); 
        opacity: 0.8; 
    }
    100% { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

@keyframes drop-bounce {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
    100% { 
        transform: scale(1); 
    }
}

@keyframes new-pikto-appear {
    0% { 
        transform: translateY(-50px) scale(0.5); 
        opacity: 0; 
    }
    70% { 
        transform: translateY(5px) scale(1.1); 
        opacity: 0.9; 
    }
    100% { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

/* Preview de sélection */
.selection-preview {
    text-align: center;
    margin-top: 15px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    font-weight: bold;
    color: #FFD700;
    display: none;
    animation: selection-pulse 1s ease-in-out infinite alternate;
}

@keyframes selection-pulse {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

/* Highlight pour le meilleur combo */
.best-combo-highlight {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: best-combo-glow 2s ease-in-out infinite;
}

@keyframes best-combo-glow {
    0%, 100% { 
        color: #FFD700; 
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    50% { 
        color: #FFF700; 
        text-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}

.game-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-weight: bold;
    color: #555;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.memory-card {
    aspect-ratio: 1;
    background: rgba(244, 240, 228, 0.9);
    border: 2px solid rgba(200, 180, 150, 0.6);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.memory-card:hover {
    transform: scale(1.05);
    border-color: #3b82f6;
}

.memory-card.flipped {
    background: rgba(244, 240, 228, 0.95);
    border-color: #fbbf24;
}

.memory-card.matched {
    background: rgba(244, 240, 228, 0.95);
    border-color: #3b82f6;
    cursor: default;
}

.memory-card.matched:hover {
    transform: none;
}

.memory-card img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.memory-card.flipped img,
.memory-card.matched img {
    opacity: 1;
}

.card-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(251, 191, 36, 0.3), rgba(59, 130, 246, 0.3));
    border: 2px solid rgba(251, 191, 36, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
    transition: opacity 0.3s ease;
}

.memory-card.flipped .card-back,
.memory-card.matched .card-back {
    opacity: 0;
}

.game-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #3b82f6;
    margin-top: 1rem;
    min-height: 1.5rem;
}

/* Styles pour l'enKodeur */
.enkoder-tool h4,
.spiktoracine-tool h4 {
    color: #3b82f6;
    text-align: center;
    margin-bottom: 1.5rem;
}

.encoder-input {
    margin-bottom: 1.5rem;
}

.encoder-actions {
    margin-top: 2rem;
    text-align: center;
}

.encoder-input label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 0.5rem;
}

.encoder-input input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(200, 180, 140, 0.6);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease;
}

.encoder-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.encoder-output {
    min-height: 80px;
}

.output-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 1rem;
    text-align: center;
}

.encoded-result {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-height: 60px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(200, 180, 150, 0.6);
    border-radius: 8px;
}

.encoded-letter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.encoded-letter img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.encoded-letter span {
    font-size: 0.8rem;
    font-weight: bold;
    color: #3b82f6;
}

/* Styles pour spiKtoRacine */
.racine-input {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    align-items: flex-end;
}

.racine-input input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(200, 180, 140, 0.6);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease;
}

.racine-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-racine {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.btn-racine:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.racine-result {
    min-height: 60px;
    padding: 1rem;
    background: rgba(244, 240, 228, 0.9);
    border: 2px dashed rgba(200, 180, 150, 0.6);
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.racine-calculation {
    font-family: monospace;
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
}

.racine-final {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3b82f6;
    margin: 1rem 0;
}

/* Message d'erreur pour limite de caractères */
.character-limit-error {
    position: relative;
    display: inline-block;
    background: rgba(75, 85, 99, 0.15);
    color: #4b5563;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(75, 85, 99, 0.3);
    margin-top: 0.5rem;
    animation: shake-error 0.5s ease-in-out;
}

.character-limit-error::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(75, 85, 99, 0.8);
}

@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse-error {
    0% { 
        transform: scale(1); 
        background: rgba(239, 68, 68, 0.1);
    }
    50% { 
        transform: scale(1.05); 
        background: rgba(75, 85, 99, 0.25);
    }
    100% { 
        transform: scale(1); 
        background: rgba(239, 68, 68, 0.1);
    }
}

.character-limit-error.max-reached {
    border-color: rgba(75, 85, 99, 0.5);
    font-weight: 600;
}

/* Section À propos - Lettres spiKto */
.spikto-letters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: nowrap;
    min-width: fit-content;
    overflow-x: auto;
}

.spikto-letter {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.spikto-letter:hover {
    transform: scale(1.2);
}

.spikto-k {
    width: 60px;
    height: 60px;
}

/* Image piKto intégrée au texte */
.inline-pikto {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin: 0 3px;
    object-fit: contain;
}

/* Bouton enKoder */
.enkoder-cta {
    text-align: center;
    margin: 1.5rem 0;
}

.btn-enkoder {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.btn-enkoder:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Contact alternative */
.contact-alternative {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.contact-alternative a {
    color: #3b82f6;
    text-decoration: none;
}

.contact-alternative a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Styles pour la checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(200, 180, 140, 0.6);
    border-radius: 4px;
    background: rgba(252, 250, 240, 0.9);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    border-color: #3b82f6;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Style pour le menu dépliant piKto */
.pikto-definition {
    background: rgba(252, 250, 240, 0.9);
    border: 2px solid rgba(200, 180, 150, 0.8);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 1rem 0;
}

.pikto-definition summary {
    cursor: pointer;
    font-weight: 600;
    color: #3b82f6;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pikto-definition summary:hover {
    background: rgba(59, 130, 246, 0.1);
}

.pikto-definition p {
    margin: 0.5rem 0 0 0;
    padding: 0.5rem;
    font-style: italic;
    color: #654321;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        background-size: 200% 200%;
        animation: gradientShift 10s ease infinite;
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header {
        margin: 15px;
        margin-bottom: 25px;
    }
    
    .main-content {
        padding: 0 15px 2rem 15px;
    }
    
    .about-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .enkoder-section,
    .nergo-section {
        padding: 2rem 1.5rem;
        margin: 1.5rem 10px;
    }

    .demo-letters {
        gap: 0.5rem;
    }

    .demo-pikto {
        width: 40px;
        height: 40px;
    }

    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .preview-pikto {
        width: 40px;
        height: 40px;
    }

    .nergo-game-container {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .memory-grid {
        max-width: 300px;
        gap: 0.5rem;
    }

    .game-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .game-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .enkoder-tool,
    .spiktoracine-tool {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .racine-input {
        flex-direction: column;
        gap: 0.75rem;
    }

    .encoded-letter img {
        width: 35px;
        height: 35px;
    }

.nav-menu {
        position: fixed;
        left: 50%;
        transform: translateX(calc(-50% - 100vw));
        top: 70px;
        flex-direction: column;
        background: rgba(245, 240, 215, 0.9);
        width: calc(100% - 40px);
        max-width: 400px;
        border-radius: 15px;
        text-align: center;
        transition: transform 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        gap: 0;
        padding: 1.5rem 0;
        overflow: hidden;
        visibility: hidden;
    }

    .nav-menu.active {
        transform: translateX(-50%);
        visibility: visible;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .forecast-section,
    .about-section {
        padding: 2rem 1.5rem;
        margin: 1.5rem 10px;
    }
    
    .contact-section {
        padding: 2rem 1rem;
        min-height: 60vh;
    }
    
    .contact-pikto {
        width: 60px;
        height: 60px;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .contact-email-label {
        font-size: 1.1rem;
    }
    
    .contact-email-link {
        font-size: 1.3rem;
        padding: 0.8rem 1.5rem;
    }
    
    .contact-signature p {
        font-size: 1.1rem;
    }

    .about-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        background-size: 150% 150%;
        animation: gradientShift 8s ease infinite;
        font-size: 13px;
    }
    
    .header {
        margin: 10px;
        margin-bottom: 20px;
    }
    
    .navigation {
        padding: 0.8rem 1rem;
    }
    
    .main-content {
        padding: 0 10px 2rem 10px;
    }
    
    .about-content p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .inline-pikto {
        width: 24px;
        height: 24px;
        margin: 0 2px;
    }
    
    .nav-menu {
        width: calc(100% - 20px);
        top: 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .about-section,
    .contact-section,
    .enkoder-section,
    .nergo-section {
        padding: 1.5rem 1rem;
        margin: 1rem 5px;
    }

    .enkoder-tool,
    .spiktoracine-tool {
        padding: 1rem;
        margin: 1rem 0;
    }

    .encoded-letter img {
        width: 30px;
        height: 30px;
    }

    .nergo-game-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .memory-grid {
        max-width: 250px;
    }
    
    .game-title-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nergo-title {
        font-size: 1.5rem;
    }
    
    .nergo-games-list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .nergo-game-option {
        min-width: auto;
        max-width: 100%;
        width: 100%;
        padding: 1.5rem;
    }
    
    .nergo-game-option .nergo-title {
        font-size: 1.3rem;
    }
    
    .btn-game-select {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .combo-grid {
        max-width: 320px;
        gap: 2px;
        padding: 8px;
    }
    
    .combo-stats {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 1rem;
    }
    
    .combo-stats span {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .combo-cell {
        border-radius: 4px;
    }

    .btn-submit {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .password-container {
        max-width: 350px;
        width: 90%;
    }
    
    .password-header h1 {
        font-size: 2rem;
    }
}

/* Écran de connexion par mot de passe */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fbbf24 0%, #3b82f6 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.password-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 25%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.08) 0%, transparent 20%),
        radial-gradient(circle at 60% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 15%),
        radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.05) 0%, transparent 15%);
    pointer-events: none;
    z-index: -1;
}

.password-container {
    background: rgba(250, 248, 235, 0.95);
    border: 2px solid rgba(230, 215, 185, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.password-header h1 {
    color: #3b82f6;
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #fbbf24, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.password-header h1 sup {
    font-size: 0.5em;
}

.password-header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.password-form {
    width: 100%;
}

.password-input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.password-input-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid rgba(230, 215, 185, 0.8);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
}

.toggle-password-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
    user-select: none;
}

.toggle-password-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    opacity: 1;
}

.toggle-password-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.password-input-group input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-password {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #fbbf24 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-password:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-password:active {
    transform: translateY(0);
}

.password-error {
    background: rgba(75, 85, 99, 0.15);
    color: #4b5563;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Animation de tremblement pour erreur */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ======================================
   STYLES D'AUTHENTIFICATION SUPABASE
   ====================================== */

/* Overlay de l'écran d'authentification */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

/* Container principal d'authentification */
.auth-container {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
}

/* Header de l'authentification */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.auth-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Conteneurs de formulaires */
.auth-form-container {
    animation: fadeIn 0.3s ease-in-out;
}

.auth-form-container h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Formulaires */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Groupes d'inputs */
.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-input-group label {
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-input-group input[type="email"],
.auth-input-group input[type="password"] {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Container pour mot de passe avec bouton toggle */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    flex: 1;
    padding-right: 3rem;
}

.password-input-container .toggle-password-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: transform 0.2s;
}

.password-input-container .toggle-password-btn:hover {
    transform: scale(1.1);
}

/* Boutons d'authentification */
.btn-auth {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-google {
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

.btn-google:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Divider "OU" */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    padding: 0 1rem;
}

/* Liens de navigation */
.auth-links {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
}

.auth-links a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Messages d'erreur et de succès */
.auth-error,
.auth-success {
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.auth-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Bouton de déconnexion */
.btn-logout {
    background: #4a5568;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: none;
    display: inline-block;
    vertical-align: middle;
}

.btn-logout:hover {
    background: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 85, 104, 0.3);
}

.btn-logout:active {
    transform: translateY(0);
}

/* Aligner le bouton de déconnexion avec les autres onglets */
.nav-menu li {
    display: flex;
    align-items: center;
}

/* Checkbox newsletter obligatoire */
.auth-checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #3b82f6;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
}

.newsletter-info {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.2);
    border-left: 4px solid #fbbf24;
    border-radius: 4px;
    color: #fbbf24;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 2rem;
        max-width: 95%;
    }

    .auth-header h1 {
        font-size: 2rem;
    }

    .btn-logout {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .auth-form-container h3 {
        font-size: 1.25rem;
    }

    .btn-auth {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Style spécial pour le K de métaK avec police Shantell Sans */
.metak-special {
    font-family: 'Shantell Sans', cursive !important;
    font-weight: 700 !important;
    font-size: 1.4em !important;
    color: #0080FF !important;
    display: inline-block;
}

/* Tagline dans l'écran d'authentification */
.auth-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0 1rem 0;
    font-weight: 300;
}