/* Base Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #1abc9c;
    --accent-color: #e74c3c;
    --dark-bg: #1a1a2e;
    --light-text: #f0f0f0;
    --dark-text: #333;
    --navbar-bg: rgba(26, 26, 46, 0.9);
    --transition-speed: 0.3s;
    --section-padding: 80px 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Lissage pour Safari/Chrome */
    -moz-osx-font-smoothing: grayscale; /* Lissage pour Firefox */
    text-rendering: optimizeLegibility; /* Améliore la lisibilité générale */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Amélioration globale de la typographie */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

p, .ikea-description p, .project-info p, .server-details p,
.gallery-overlay p, .shade-info p, .contact-info p {
    color: white; /* Blanc pur pour un contraste maximal */
    font-weight: 500; /* Légèrement plus épais pour une meilleure lisibilité */
    letter-spacing: 0.01em;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.2em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Starry Background */
#starry-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(26, 26, 46, 0.9);
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-option {
    font-weight: 500;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
}

.lang-option:hover {
    opacity: 1;
}

.lang-option.active {
    opacity: 1;
    color: var(--primary-color);
}

.lang-separator {
    color: var(--light-text);
    opacity: 0.5;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background: linear-gradient(rgba(26, 26, 46, 0.3), rgba(26, 26, 46, 0.8));
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none; /* Désactive l'ombre pour le texte en dégradé */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: white;
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    border: 2px solid var(--primary-color);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Sections */
.section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Servers Section */
.server-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.server-item {
    flex: 1 1 45%;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.server-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.server-image {
    height: 250px;
    overflow: hidden;
}

.server-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.server-item:hover .server-image img {
    transform: scale(1.05);
}

.server-details {
    padding: 1.5rem;
}

.server-details h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.server-details p {
    color: white;
    font-size: 1rem;
    line-height: 1.65;
}

/* 3D Section */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8); /* Plus foncé pour un meilleur contraste */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    padding: 1rem;
    text-align: center;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Ikea Remake Section - Amélioration de la lisibilité */
.ikea-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.ikea-description {
    max-width: 700px;
    text-align: center;
}

.ikea-description p {
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.015em;
}

/* Mise en page des projets */
.ikea-project-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
}

/* Cartes de projet */
.project-card {
    flex: 1 1 45%;
    min-width: 300px;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Animation de bordure au survol */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

/* Images des projets */
.project-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Animation d'apparition des images */
.fade-in-image {
    animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Informations sur le projet */
.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.project-info h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.project-card:hover .project-info h3::after {
    width: 100%;
}

.project-info p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: white;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* Styles spécifiques pour chaque carte */
.project-card.hardware .project-info h3 {
    color: #3498db;
}

.project-card.software .project-info h3 {
    color: #2ecc71;
}

/* Animation d'entrée */
.ikea-project-showcase .project-card {
    opacity: 0;
    transform: translateY(30px);
}

.ikea-project-showcase.show .project-card {
    animation: slideUp 0.8s forwards;
}

.ikea-project-showcase.show .project-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shade Controller Section */
.shade-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.shade-info {
    flex: 1 1 45%;
    min-width: 300px;
}

.shade-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.4rem;
}

.shade-info p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: white;
    font-weight: 500;
}

.feature-list {
    margin-top: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.feature-list li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 0.5em;
}

.shade-demo {
    flex: 1 1 45%;
    min-width: 300px;
}

.demo-animation {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.contact-info {
    flex: 1 1 40%;
    min-width: 300px;
}

.contact-info p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: white;
    font-weight: 500;
}

.contact-methods {
    margin-top: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-method i {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-method span {
    color: white;
    font-weight: 500;
    font-size: 1rem;
}

.contact-form {
    flex: 1 1 50%;
    min-width: 300px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-family: inherit;
    font-weight: 500;
    transition: border-color var(--transition-speed) ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.submit-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    font-family: inherit;
}

.submit-button:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 3rem 2rem 1.5rem;
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo .logo {
    height: 50px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--transition-speed) ease;
    font-size: 0;
}

.social-icon:hover {
    background: var(--primary-color);
}

.copyright {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.copyright p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Animation Classes */
.reveal-text, .reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Icons */
.icon-email, .icon-phone {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10px;
}

.icon-email {
    background-image: url('../images/icon-email.svg');
}

.icon-phone {
    background-image: url('../images/icon-phone.svg');
}

.social-icon.linkedin {
    background-image: url('../images/icon-linkedin.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.social-icon.twitter {
    background-image: url('../images/icon-twitter.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.social-icon.instagram {
    background-image: url('../images/icon-instagram.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
}