/* PLC Forge & Games - Main Stylesheet */

:root {
    /* Palette principale - Thème de flamme */
    --primary-color: #e63900;    /* Rouge feu plus profond */
    --secondary-color: #ff7700;   /* Orange flamme vif */
    --accent-color: #ffb700;      /* Jaune doré */
    --dark-color: #2a2a2a;        /* Noir charbon */
    --light-color: #f8f4e8;       /* Blanc cassé chaud */
    --danger-color: #cc2936;      /* Rouge danger ajusté */
    --success-color: #2a9d4a;     /* Vert succès ajusté */
    
    /* Couleurs pour effets pixel art */
    --pixel-red: #e63900;         /* Aligné avec primary */
    --pixel-orange: #ff7700;      /* Aligné avec secondary */
    --pixel-yellow: #ffb700;      /* Aligné avec accent */
    --pixel-dark: #1a1a1a;        /* Noir plus profond pour contraste */
    --pixel-light: #fff8e8;       /* Blanc chaud pour pixel art */
    
    /* Couleurs additionnelles pour dégradés */
    --flame-dark: #992600;        /* Rouge foncé pour dégradés profonds */
    --flame-highlight: #ffcc55;   /* Jaune clair pour effets de brillance */
}

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

body {
    font-family: 'Press Start 2P', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--dark-color);
    image-rendering: pixelated;
}

/* Pixel Border Utility Class */
.pixel-border {
    border-style: solid;
    border-width: 4px;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v8H0V0zm0 0h4v4H0V0zm4 4h4v4H4V4z' fill='%23ff4500'/%3E%3C/svg%3E") 2 stretch;
    image-rendering: pixelated;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 0; /* Pixel art style - sharp corners */
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.1s steps(4); /* Pixelated transition */
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); /* Pixel art shadow */
    position: relative;
    image-rendering: pixelated;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px) translateX(-2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.5);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--dark-color), #222);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--primary-color);
    margin-right: 10px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section Styles */
.hero {
    background: #000;
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

/* Ajout du conteneur de jeu rétro dans le hero */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0h4v4H0V0zm8 0h4v4H8V0zm8 0h4v4h-4V0zm-16 8h4v4H0V8zm8 0h4v4H8V8zm8 0h4v4h-4V8zm-16 8h4v4H0v-4zm8 0h4v4H8v-4zm8 0h4v4h-4v-4z' fill='%23333' fill-opacity='0.15'/%3E%3C/svg%3E");
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    image-rendering: pixelated;
    animation: grid-pulse 8s infinite linear;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--light-color) 0%, transparent 100%);
    z-index: 1;
}

@keyframes pixel-wave {
    0% { background-position: 0 0; }
    100% { background-position: 160px 0; }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Pixel Flame Animation */
.flame-text {
    display: inline-block;
    background: linear-gradient(to bottom, #ffcc00, #ff4500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    position: relative;
    font-family: 'Press Start 2P', cursive;
    text-shadow: 2px 2px 0 var(--light-dark);
    letter-spacing: 1px;
}

.flame-text::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 8h2V6h2V4h2V2h2V0h2v2h2v2h2v2h2v2h2V8H0z' fill='%23ff4500'/%3E%3C/svg%3E") repeat-x;
    background-size: 16px 8px;
    image-rendering: pixelated;
    animation: pixel-flicker 1s steps(4) infinite alternate;
}

@keyframes pixel-flicker {
    0%, 100% { opacity: 1; transform: translateY(0); }
    25% { opacity: 0.8; transform: translateY(-1px); }
    50% { opacity: 1; transform: translateY(-2px); }
    75% { opacity: 0.9; transform: translateY(-1px); }
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.features-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.feature-card {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    background-color: white;
    border-radius: 0; /* Pixel art style */
    padding: 30px;
    text-align: center;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.1s steps(3), box-shadow 0.1s steps(3);
    border: 4px solid var(--dark-color);
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v1H1v7H0V0zm7 7h1v1H7V7zm-1 0h1v1H6V7zm-1 0h1v1H5V7zm-1 0h1v1H4V7zm-1 0h1v1H3V7zm-1 0h1v1H2V7zm5-1h1v1H7V6zm0-1h1v1H7V5zm0-1h1v1H7V4zm0-1h1v1H7V3zm0-1h1v1H7V2zm0-1h1v1H7V1z' fill='%23333333'/%3E%3C/svg%3E") 2 stretch;
    image-rendering: pixelated;
}

.feature-card:hover {
    transform: translateY(-4px) translateX(-4px);
    box-shadow: 8px 8px 0 rgba(255, 69, 0, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0; /* Pixel art style */
    color: white;
    font-size: 2rem;
    clip-path: polygon(
        0% 25%, 25% 0%, 75% 0%, 100% 25%,
        100% 75%, 75% 100%, 25% 100%, 0% 75%
    ); /* Octagon shape for pixel art style */
    image-rendering: pixelated;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
    margin-bottom: 20px;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: #f9f9f9;
    position: relative;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    z-index: -1;
}

.about-content {
    flex: 1;
    min-width: 300px;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.05), rgba(255, 140, 0, 0.05));
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer Styles - Pixel Art Theme */
footer {
    background: var(--pixel-dark);
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
    position: relative;
    border-top: 4px solid;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h2v2H0V0zm2 2h2v2H2V2zm2-2h2v2H4V0zm2 2h2v2H6V2z' fill='%23ff4500'/%3E%3C/svg%3E") 2 repeat;
    image-rendering: pixelated;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0h4v4H0V0zm8 0h4v4H8V0zm8 0h4v4h-4V0zm-16 8h4v4H0V8zm8 0h4v4H8V8zm8 0h4v4h-4V8zm-16 8h4v4H0v-4zm8 0h4v4H8v-4zm8 0h4v4h-4v-4z' fill='%23333' fill-opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
    image-rendering: pixelated;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.footer-section {
    flex: 1;
    margin: 0 1rem;
    min-width: 250px;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v1H1v7H0V0zm7 7h1v1H7V7zm-1 0h1v1H6V7zm-1 0h1v1H5V7zm-1 0h1v1H4V7zm-1 0h1v1H3V7zm-1 0h1v1H2V7zm5-1h1v1H7V6zm0-1h1v1H7V5zm0-1h1v1H7V4zm0-1h1v1H7V3zm0-1h1v1H7V2zm0-1h1v1H7V1z' fill='%23ffcc00'/%3E%3C/svg%3E") 2 stretch;
    image-rendering: pixelated;
    transition: transform 0.2s steps(2);
}

.footer-section:hover {
    transform: translateY(-4px);
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='2' viewBox='0 0 8 2'%3E%3Cpath d='M0 0h2v2H0V0zm2 0h2v2H2V0zm2 0h2v2H4V0zm2 0h2v2H6V0z' fill='%23ffcc00'/%3E%3C/svg%3E") repeat-x;
    background-size: 8px 2px;
    image-rendering: pixelated;
}

.footer-section p, .footer-section a {
    color: #ddd;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s steps(2);
}

.footer-section a {
    position: relative;
    padding-left: 15px;
}

.footer-section a::before {
    content: '►';
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s steps(2), transform 0.2s steps(2);
    transform: translateX(-5px);
}

.footer-section a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-section a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.social-links {
    display: flex;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.2s steps(2);
    padding-left: 0;
    clip-path: polygon(
        0% 25%, 25% 0%, 75% 0%, 100% 25%,
        100% 75%, 75% 100%, 25% 100%, 0% 75%
    ); /* Octagon shape for pixel art style */
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.3));
}

.social-links a:hover::before {
    opacity: 0;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 2px solid;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='2' viewBox='0 0 8 2'%3E%3Cpath d='M0 0h2v2H0V0zm2 0h2v2H2V0zm2 0h2v2H4V0zm2 0h2v2H6V0z' fill='%23333'/%3E%3C/svg%3E") 2 repeat;
    width: 100%;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: -0.5px;
}

/* Main Content Area */
main {
    margin-top: 80px; /* To account for fixed header */
    min-height: calc(100vh - 80px - 300px); /* Minimum height accounting for header and footer */
}

/* Pixel Art Elements */
.pixel-divider {
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 0h4v4H0V0zm4 4h4v4H4V4zm4-4h4v4H8V0zm4 4h4v4h-4V4z' fill='%23ff4500'/%3E%3C/svg%3E") repeat-x;
    background-size: 16px 8px;
    margin: 2rem 0;
    image-rendering: pixelated;
}

/* Retro Game Background Elements */
.retro-game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    image-rendering: pixelated;
    pointer-events: none;
    opacity: 0.7;
}

.tetris-block {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--pixel-orange);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    transition: transform 0.2s steps(2);
    z-index: 1;
}

.asteroid {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--pixel-light);
    border-radius: 50%;
    filter: drop-shadow(0 0 3px rgba(200, 200, 200, 0.5));
    z-index: 1;
}

.retro-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
    animation: grid-pulse 8s infinite linear;
}

@keyframes grid-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

/* Pixel Art Animation for Hover Effects */
@keyframes pixel-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pixel-pulse:hover {
    animation: pixel-pulse 0.5s steps(5) infinite;
}

/* Notification */
#notification{
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 999;
    padding: 1rem 1.5rem;
    border-style: solid;
    border-width: 4px;
    border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 0h8v8H0V0zm0 0h4v4H0V0zm4 4h4v4H4V4z' fill='%23ff4500'/%3E%3C/svg%3E") 2 stretch;
    image-rendering: pixelated;
    font-size: 0.9rem;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transform: translateY(0);
    animation: notification-slide-in 0.3s ease-out forwards;
    max-width: 90%;
    display: flex;
    align-items: center;
}

#notification::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert_error{
    background-color: rgba(204, 41, 54, 0.9);
    color: var(--light-color);
    border-color: var(--danger-color);
}

.alert_error::before {
    content: '\f06a';
    color: var(--light-color);
}

.alert_success{
    background-color: rgba(42, 157, 74, 0.9);
    color: var(--light-color);
    border-color: var(--success-color);
}

.alert_success::before {
    content: '\f058';
    color: var(--light-color);
}

.alert_warning{
    background-color: rgba(255, 183, 0, 0.9);
    color: var(--dark-color);
    border-color: var(--accent-color);
}

.alert_warning::before {
    content: '\f071';
    color: var(--dark-color);
}

@keyframes notification-slide-in {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes notification-slide-out {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-card {
        min-width: 100%;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .about-image, .about-content {
        min-width: 100%;
    }
    
    .footer-section {
        flex: 100%;
        margin-bottom: 2rem;
    }
}