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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Page d'accueil */
#home-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 50%, #f3e8ff 100%);
    position: relative;
}

/* Éléments d'arrière-plan animés */
.background-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: pulse 6s ease-in-out infinite;
}

.bg-circle-1 {
    width: 320px;
    height: 320px;
    background: rgba(244, 114, 182, 0.2);
    top: -160px;
    right: -160px;
}

.bg-circle-2 {
    width: 320px;
    height: 320px;
    background: rgba(168, 85, 247, 0.2);
    bottom: -160px;
    left: -160px;
    animation-delay: 2s;
}

.bg-circle-3 {
    width: 384px;
    height: 384px;
    background: rgba(251, 113, 133, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

/* Cœurs flottants */
.floating-hearts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
}

.floating-heart {
    position: absolute;
    color: #f472b6;
    font-size: 1rem;
    animation: float 6s ease-in-out infinite;
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    padding: 1.5rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    padding: 0.75rem;
    background: linear-gradient(135deg, #f5419b, #000000);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3);
}

.logo-icon i {
    color: white;
    font-size: 2rem;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #db2777, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

/* Toggle de langue */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 0.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(244, 114, 182, 0.2);
}

.language-toggle i {
    color: #ec4899;
    margin-left: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.lang-btn:hover {
    color: #db2777;
    background: rgba(244, 114, 182, 0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

/* Contenu principal */
.main-content {
    position: relative;
    z-index: 10;
    padding: 3rem 0;
    animation: fadeInUp 1s ease-out;
}

/* Section héro */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 2rem 0 1.5rem;
    background: linear-gradient(135deg, #ec4899, #9333ea, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: #475569;
    margin-bottom: 2rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.powered-by i:first-child {
    color: #f472b6;
}

.powered-by i:last-child {
    color: #a855f7;
    animation: pulse 2s infinite;
}

/* Mascotte chat */
.chat-mascot {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.5s ease;
    margin-bottom: 2rem;
}

.chat-mascot:hover {
    transform: scale(1.1);
}

.chat-message {
    position: absolute;
    top: -6rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    max-width: 20rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
}

.chat-message::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #ec4899;
}

.chat-message.show {
    opacity: 1;
    visibility: visible;
    animation: bounce 0.6s ease;
}

.mascot-body {
    width: 8rem;
    height: 7rem;
    background: linear-gradient(135deg, #ffffff, #fce7f3);
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.2);
    border: 4px solid rgba(244, 114, 182, 0.2);
    position: relative;
    overflow: hidden;
}

.mascot-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.eyes {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.eye {
    width: 0.75rem;
    height: 0.75rem;
    background: #1e293b;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nose {
    width: 0.5rem;
    height: 0.5rem;
    background: #f472b6;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(244, 114, 182, 0.3);
    margin-bottom: 0.25rem;
}

.mouth {
    width: 0.75rem;
    height: 0.25rem;
    border-bottom: 2px solid #64748b;
    border-radius: 0 0 50% 50%;
    transition: all 0.3s ease;
}

.whiskers {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.left-whiskers {
    left: 0.5rem;
}

.right-whiskers {
    right: 0.5rem;
}

.whisker {
    width: 1.5rem;
    height: 2px;
    background: #94a3b8;
    border-radius: 1px;
    margin-bottom: 0.25rem;
}

.right-whiskers .whisker:first-child {
    width: 1rem;
}

.ears {
    position: absolute;
    top: -0.75rem;
    width: 100%;
}

.ear {
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #fce7f3);
    border: 3px solid rgba(244, 114, 182, 0.2);
    border-radius: 50%;
    transform: rotate(45deg);
}

.left-ear {
    left: 1rem;
}

.right-ear {
    right: 1rem;
}

.inner-ear {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.75rem;
    height: 0.75rem;
    background: #f9a8d4;
    border-radius: 50%;
}

.chat-indicator {
    position: absolute;
    bottom: -0.5rem;
    right: -0.5rem;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    border-radius: 50%;
    padding: 0.5rem;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.chat-indicator i {
    color: white;
    font-size: 1rem;
}

/* Sélection de niveau */
.level-selection {
    margin-top: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #db2777, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 75rem;
    margin: 0 auto;
}

.level-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.5s ease;
    border: 3px solid;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.level-card:hover {
    transform: translateY(-0.5rem) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.level-card.easy {
    border-color: #f472b6;
}

.level-card.medium {
    border-color: #a855f7;
}

.level-card.hard {
    border-color: #f43f5e;
}

.card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    transition: opacity 0.5s ease;
}

.level-card:hover .card-bg {
    opacity: 0.1;
}

.level-card.easy .card-bg {
    background: linear-gradient(135deg, #f472b6, #f43f5e);
}

.level-card.medium .card-bg {
    background: linear-gradient(135deg, #a855f7, #f472b6);
}

.level-card.hard .card-bg {
    background: linear-gradient(135deg, #f43f5e, #dc2626);
}

.card-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sparkle-1, .sparkle-2 {
    position: absolute;
    color: #f472b6;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: pulse 2s infinite;
}

.sparkle-1 {
    top: 1rem;
    right: 1rem;
}

.sparkle-2 {
    bottom: 1rem;
    left: 1rem;
    color: #a855f7;
    animation-delay: 0.5s;
}

.level-card:hover .sparkle-1,
.level-card:hover .sparkle-2 {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 10;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon {
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.level-card:hover .card-icon {
    transform: scale(1.1);
}

.level-card.easy .card-icon {
    background: linear-gradient(135deg, #f472b6, #f43f5e);
}

.level-card.medium .card-icon {
    background: linear-gradient(135deg, #a855f7, #f472b6);
}

.level-card.hard .card-icon {
    background: linear-gradient(135deg, #f43f5e, #dc2626);
}

.card-icon i {
    color: white;
    font-size: 2rem;
}

.difficulty {
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.level-card:hover .card-title {
    transform: scale(1.02);
}

.level-card.easy .card-title {
    color: #be185d;
}

.level-card.medium .card-title {
    color: #7c3aed;
}

.level-card.hard .card-title {
    color: #dc2626;
}

.card-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-stats {
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 0.25rem;
    transition: width 0.5s ease;
    width: 0%;
}

.level-card.easy .progress-fill {
    background: linear-gradient(135deg, #f472b6, #f43f5e);
}

.level-card.medium .progress-fill {
    background: linear-gradient(135deg, #a855f7, #f472b6);
}

.level-card.hard .progress-fill {
    background: linear-gradient(135deg, #f43f5e, #dc2626);
}

.card-button {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.level-card.easy .card-button {
    background: linear-gradient(135deg, #f472b6, #f43f5e);
}

.level-card.medium .card-button {
    background: linear-gradient(135deg, #a855f7, #f472b6);
}

.level-card.hard .card-button {
    background: linear-gradient(135deg, #f43f5e, #dc2626);
}

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    margin-top: 5rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(244, 114, 182, 0.2);
}

.footer-text {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* Page de challenge */
#challenge-page {
    min-height: 100vh;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 50%, #f3e8ff 100%);
}

.challenge-container {
    max-width: 64rem;
    margin: 0 auto;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(100, 116, 139, 0.2);
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(244, 114, 182, 0.2);
    backdrop-filter: blur(10px);
}

.timer-display i {
    color: #f43f5e;
    font-size: 1.2rem;
}

#timerDisplay {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.hint-penalty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #ea580c;
    font-size: 0.875rem;
    font-weight: 600;
    animation: pulse 1s ease-in-out 3;
}

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

.progress-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.progress-dots {
    display: flex;
    gap: 0.375rem;
}

.progress-dot {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.progress-dot.completed {
    background: #10b981;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-dot.current {
    background: #f472b6;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(244, 114, 182, 0.6);
    animation: pulse 2s infinite;
}

.challenge-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(244, 114, 182, 0.1);
}

.challenge-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.challenge-icon {
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f472b6, #f43f5e);
    box-shadow: 0 10px 25px rgba(244, 114, 182, 0.3);
}

.challenge-icon i {
    color: white;
    font-size: 1.5rem;
}

.challenge-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.challenge-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
}

.challenge-status.completed::before {
    content: '✓';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background: #10b981;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 1rem;
    font-size: 0.75rem;
}

.challenge-description {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.challenge-description pre {
    color: #475569;
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.challenge-input-section {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.challenge-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.challenge-input:focus {
    outline: none;
    border-color: #f472b6;
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.challenge-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #f472b6, #f43f5e);
    color: white;
    box-shadow: 0 8px 20px rgba(244, 114, 182, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(244, 114, 182, 0.4);
}

.btn-hint {
    background: linear-gradient(135deg, #eab308, #f59e0b);
    color: white;
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.3);
}

.btn-hint:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(234, 179, 8, 0.4);
}

.btn-flag {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3);
}

.btn-flag:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(100, 116, 139, 0.4);
}

.feedback {
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.feedback.success {
    background: rgba(220, 252, 231, 0.9);
    color: #065f46;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.feedback.error {
    background: rgba(254, 242, 242, 0.9);
    color: #991b1b;
    border: 2px solid rgba(220, 38, 38, 0.3);
}

.feedback i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.feedback-content {
    flex: 1;
}

.feedback-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Affichage automatique du FLAG */
.auto-flag-display {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.auto-flag-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #059669;
}

.auto-flag-title i {
    font-size: 1.2rem;
    color: #10b981;
}

.auto-flag-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    color: #059669;
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid rgba(16, 185, 129, 0.2);
    letter-spacing: 0.5px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.next-button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.hint-section,
.flag-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.hint-section {
    background: rgba(254, 252, 232, 0.9);
    border: 2px solid rgba(234, 179, 8, 0.3);
}

.flag-section {
    background: rgba(248, 250, 252, 0.9);
    border: 2px solid rgba(100, 116, 139, 0.3);
}

.hint-title,
.flag-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.hint-title {
    color: #a16207;
}

.flag-title {
    color: #1e293b;
}

.hint-title i,
.flag-title i {
    font-size: 1.2rem;
}

.hint-content {
    color: #a16207;
    line-height: 1.6;
    font-size: 0.95rem;
}

.flag-content {
    background: rgba(30, 41, 59, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    color: #059669;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1px solid rgba(5, 150, 105, 0.2);
    letter-spacing: 0.5px;
}

.completion-section {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.3);
    margin-top: 2rem;
}

.completion-content {
    max-width: 32rem;
    margin: 0 auto;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 1s infinite;
}

.completion-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.completion-text {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.completion-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
}

.completion-stat i {
    font-size: 1.5rem;
}

.completion-stat span:first-of-type {
    font-size: 0.875rem;
    opacity: 0.8;
}

.completion-stat span:last-of-type {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-cat {
  width: 80px;         /* ajuste la taille à ton besoin */
  height: auto;         /* garde les proportions */
  display: block;       /* enlève les espaces indésirables */
  margin: 0 auto;       /* centre l’image dans son conteneur */
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3)); /* petite ombre discrète */
}

/* Utilitaires */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .level-cards {
        grid-template-columns: 1fr;
    }
    
    .challenge-buttons {
        flex-direction: column;
    }
    
    .challenge-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .completion-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .completion-stat {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .timer-display {
        flex: 1;
        justify-content: center;
    }
    
    .challenge-progress {
        flex: 1;
        justify-content: center;
    }
    
    .feedback {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .auto-flag-content {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}