/* 
 * SkyConnexion - Styles globaux
 * Optimisé pour performances Lighthouse 400/400
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #88CCCF;
    --secondary: #243E4B;
    --light: #FEFFFF;
    --dark: #1a2930;
    --accent: #FFD700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(36, 62, 75, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.logo {
    height: 50px;
    display: flex;
    align-items: center;
    margin-left: 0;
}

.logo img {
    height: 50px;
    width: 178px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--light);
    transition: 0.3s;
}

/* Bouton secret pour le jeu - Desktop */
.secret-game-btn {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
    padding: 0;
    text-decoration: none;
    font-size: 22px;
    line-height: 30px;
}

.secret-game-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.secret-game-btn::before {
    content: '🎮';
}

/* Bouton secret version mobile */
.secret-game-btn-mobile {
    display: none;
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s;
    padding: 0;
    z-index: 999;
    font-size: 28px;
    text-decoration: none;
}

.secret-game-btn-mobile::before {
    content: '🎮';
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 0 5%;
}

.flying-logo {
    position: absolute;
    width: 105px;
    height: 105px;
    opacity: 0.3;
    animation: fly linear infinite paused;
    filter: drop-shadow(0 0 10px rgba(136, 204, 207, 0.3));
    object-fit: contain;
    will-change: transform;
}

@keyframes fly {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(100px) translateY(-50px) rotate(10deg);
    }
    50% {
        transform: translateX(200px) translateY(0) rotate(0deg);
    }
    75% {
        transform: translateX(100px) translateY(50px) rotate(-10deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

.flying-logo:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.flying-logo:nth-child(2) {
    top: 60%;
    left: 70%;
    animation-duration: 25s;
    animation-delay: -10s;
    width: 88px;
    height: 88px;
}

.flying-logo:nth-child(3) {
    top: 40%;
    right: 5%;
    animation-duration: 22s;
    animation-delay: -15s;
    width: 96px;
    height: 96px;
}

.flying-logo:nth-child(4) {
    top: 75%;
    left: 20%;
    animation-duration: 23s;
    animation-delay: -8s;
    width: 91px;
    height: 91px;
}

.flying-logo:nth-child(5) {
    top: 10%;
    left: 60%;
    animation-duration: 24s;
    animation-delay: -12s;
    width: 100px;
    height: 100px;
}

.flying-logo:nth-child(6) {
    bottom: 10%;
    right: 20%;
    animation-duration: 21s;
    animation-delay: -18s;
    width: 93px;
    height: 93px;
}

.hero-content {
    text-align: center;
    color: var(--light);
    max-width: 900px;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.price-highlight {
    color: var(--accent);
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.payment-options {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 2rem;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    will-change: transform;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
}

.btn-primary:hover {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(136, 204, 207, 0.3);
}

.btn-secondary {
    background: transparent;
    border-color: var(--light);
    color: var(--light);
}

.btn-secondary:hover {
    background: var(--light);
    color: var(--secondary);
    transform: translateY(-3px);
}

/* Section générique */
section {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Services Section */
.services {
    background: var(--light);
    max-width: 1400px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(36, 62, 75, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid rgba(136, 204, 207, 0.2);
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(136, 204, 207, 0.2);
    border-color: var(--primary);
    background: rgba(136, 204, 207, 0.1);
}

.service-icon {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    height: 8rem;
}

.service-icon img {
    width: 8rem;
    height: 8rem;
    object-fit: contain;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card p {
    color: var(--secondary);
    opacity: 0.8;
}

/* Portfolio grids */
.portfolio-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-item,
.video-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
    will-change: transform;
    background: #f5f5f5;
}

.portfolio-item {
    aspect-ratio: 2/1;
}

.video-item {
    aspect-ratio: 16/9;
}

.portfolio-item:hover,
.video-item:hover {
    transform: scale(1.05);
}

.portfolio-item img,
.video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay,
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(36, 62, 75, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 2rem;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay,
.video-item:hover .video-overlay {
    opacity: 1;
}

.portfolio-overlay h3,
.video-overlay h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p,
.video-overlay p {
    color: var(--light);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
}

/* Content sections */
.content-section {
    background: var(--light);
    max-width: 1200px;
    margin: 0 auto;
}

.content-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
    font-size: 1.2rem;
    color: var(--secondary);
    opacity: 0.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: rgba(136, 204, 207, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid rgba(136, 204, 207, 0.3);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(136, 204, 207, 0.2);
    border-color: var(--primary);
}

.feature-card h3 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    font-size: 1.5rem;
}

.video-container {
    max-width: 900px;
    margin: 3rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.video-container video,
.video-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* Contact Section */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background: rgba(36, 62, 75, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid rgba(136, 204, 207, 0.2);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form {
    background: rgba(36, 62, 75, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid rgba(136, 204, 207, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid rgba(136, 204, 207, 0.3);
    border-radius: 10px;
    background: white;
    color: var(--secondary);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.map-placeholder {
    width: 100%;
    height: 300px;
    margin-top: 2rem;
    border-radius: 15px;
    overflow: hidden;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--light);
    padding: 2rem 5%;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s;
}

.social-links a:hover img {
    transform: scale(1.1);
}

/* Placeholder pour nouvelles vidéos */
.placeholder-item {
    background: rgba(136, 204, 207, 0.1);
    border: 3px dashed var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1.2rem;
}

.placeholder-item span {
    font-size: 3rem;
}

/* Modal vidéo */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    animation: slideIn 0.3s ease;
}

.video-modal-content video {
    width: 100%;
    border-radius: 10px;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: transform 0.3s;
}

.video-modal-close:hover {
    transform: scale(1.2);
}

.video-modal-info {
    color: white;
    margin-top: 1rem;
    text-align: center;
}

.video-modal-info h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 0 15px;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(36, 62, 75, 0.98);
        width: 100%;
        padding: 2rem;
        transition: 0.3s;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .burger {
        display: flex;
    }

    .logo {
        margin-left: 5px;
        padding: 5px 0;
    }

    .logo img {
        height: 45px;
        width: auto;
    }

    /* Cacher le bouton desktop, afficher le bouton mobile */
    .secret-game-btn {
        display: none;
    }

    .secret-game-btn-mobile {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .portfolio-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0 10px;
    }

    .logo {
        margin-left: 5px;
    }

    .logo img {
        height: 40px;
        width: auto;
    }

    .secret-game-btn-mobile {
        opacity: 0.25;
        width: 32px;
        height: 32px;
        font-size: 26px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .services-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
}