/* Light Theme (Default) */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #f97316;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #4CAF50;
    --success-hover: #45a049;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #fb923c;
    --background: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --success-hover: #16a34a;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.25rem;
}

/* Adjust notification colors for dark mode */
[data-theme="dark"] .notification,
[data-theme="dark"] .easter-egg,
[data-theme="dark"] #browser-warning {
    background-color: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] #easter-egg-christmas {
    color: #fb7185;
    border-left: 4px solid #e11d48;
}

[data-theme="dark"] #easter-egg-matinale {
    color: #38bdf8;
    border-left: 4px solid #0284c7;
}

[data-theme="dark"] #browser-warning {
    color: #fcd34d;
    border-left: 4px solid #eab308;
}

/* Adjust section separator for dark mode */
[data-theme="dark"] .section-separator h2 {
    background-color: var(--background);
}

/* Adjust snowflake color for dark mode */
[data-theme="dark"] .snowflake {
    color: #94a3b8;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Ajout de la police Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Header */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 8s ease infinite;
    background-size: 200% 200%;
}

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

/* Container principal */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
    flex-grow: 1;
}

/* Style pour les grilles */
.boxes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

/* Style pour les cartes */
.box {
    background-color: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    position: relative;
    height: 300px;
    width: 260px;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    border: none;
}

.box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.box:hover::after {
    transform: scaleX(1);
}

.box img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.box:hover img {
    transform: scale(1.05);
}

.box-content, .text {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.box p {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    color: var(--text);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 -10px 15px -3px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
    width: 100%;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Bouton retour au menu */
.back-to-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #45a049;
    color: white;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.back-to-menu:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* Notifications et Easter Eggs */
.notification, .easter-egg {
    position: fixed;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(8px);
    animation: slideIn 0.5s ease forwards;
}

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

#easter-egg-christmas {
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #e11d48;
    color: #e11d48;
}

#easter-egg-matinale {
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #0284c7;
    color: #0284c7;
}

#browser-warning {
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #eab308;
    color: #854d0e;
    max-width: 320px;
}

#browser-warning p {
    margin-bottom: 0.75rem;
}

.notification button, #browser-warning button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    float: right;
    margin-top: 0.5rem;
}

.notification button:hover, #browser-warning button:hover {
    background-color: var(--primary-hover);
}

/* Snowflake Animation */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    animation: fall linear infinite;
    z-index: 999;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* Section separators */
.section-separator {
    width: 100%;
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.section-separator h2 {
    background-color: var(--background);
    display: inline-block;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
}

.section-separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border);
    z-index: 0;
}

/* Version page styles */
.center-logo {
    display: block;
    margin: 0 auto 2rem;
    max-width: 200px;
    transition: transform 1s ease;
}

.rotate {
    animation: spin 1s ease;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bubble {
    display: none;
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 101;
}

.show-bubble {
    display: block;
    animation: fadeinout 3s ease;
}

@keyframes fadeinout {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Version history styles */
h1 {
    color: var(--primary);
    font-size: 1.75rem;
    margin: 1.5rem 0 1rem;
}

ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

ul li {
    position: relative;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
}

ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Snake game overlay */
.snake-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

canvas {
    display: block;
    border: 3px solid var(--primary);
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
        margin: 2rem auto;
        gap: 1.5rem;
    }

    .box {
        width: 250px;
        height: 300px;
    }

    .section-separator h2 {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 0.75rem;
        gap: 1.25rem;
    }

    .box {
        width: 100%;
        max-width: 300px;
    }

    .notification, .easter-egg {
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }

    .back-to-menu {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Ajouter ces styles spécifiques pour la page version.html */

/* Amélioration du conteneur pour la page version */
.container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

/* Style spécifique pour la page version */
.container h1 {
  color: var(--primary);
  font-size: 1.75rem;
  margin: 1.5rem 0 1rem;
  width: 100%;
  text-align: left;
}

/* Correction des listes pour la page version */
.container ul {
  list-style-type: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.container ul li {
  position: relative;
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.container ul li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

/* Style pour le logo central */
.center-logo {
  display: block;
  margin: 0 auto 2rem;
  max-width: 200px;
  transition: transform 1s ease;
  width: 100%;
}

/* Style pour les titres de version */
.container h1.version-title {
  color: var(--primary);
  font-size: 2rem;
  margin: 2.5rem 0 1.5rem;
  width: 100%;
  text-align: center;
}

/* Ajout d'un séparateur entre les versions */
.version-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 2rem 0;
}