/*
    Fichier: main.css
    Description: Feuille de style principale du site OrWin3D - Design moderne et responsive
    Auteur: Franck CANO alias OrWin3D
    Email: orwin3d@gmail.com
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.7);
    --accent-primary: #00f7ff;
    --accent-secondary: #0066ff;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation - CSS Fallback */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

/* Cyan halo */
.blob:nth-child(1) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 247, 255, 0.4) 0%, transparent 70%);
    top: 10%;
    left: 5%;
    animation-duration: 18s;
}

/* Magenta halo */
.blob:nth-child(2) {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200, 50, 255, 0.4) 0%, transparent 70%);
    top: 20%;
    right: 10%;
    animation-duration: 22s;
    animation-delay: -5s;
}

/* Pink halo */
.blob:nth-child(3) {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 100, 200, 0.4) 0%, transparent 70%);
    bottom: 15%;
    left: 15%;
    animation-duration: 25s;
    animation-delay: -10s;
}

/* Light cyan halo */
.blob:nth-child(4) {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.35) 0%, transparent 70%);
    bottom: 25%;
    right: 20%;
    animation-duration: 20s;
    animation-delay: -15s;
}

/* Purple halo */
.blob:nth-child(5) {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(180, 80, 255, 0.35) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    animation-duration: 24s;
    animation-delay: -8s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-30px, -40px) scale(1.1);
    }

    50% {
        transform: translate(40px, 30px) scale(0.9);
    }

    75% {
        transform: translate(-20px, 50px) scale(1.05);
    }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav li {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

nav a:hover,
nav a.active {
    color: var(--accent-primary);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.dropdown-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 12px;
    height: 8px;
    margin-left: 0.3rem;
    flex-shrink: 0;
}

.dropdown-arrow path {
    stroke: rgba(0, 247, 255, 0.9);
    stroke-width: 2;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 220px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 247, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 247, 255, 0.1);
    padding: 0.5rem 0;
    list-style: none;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-menu a:hover {
    color: var(--accent-primary);
    background: rgba(0, 247, 255, 0.05);
    transform: translateX(5px);
}

.dropdown-menu a:hover::before {
    transform: scaleY(1);
}

/* Mobile Dropdown Styles */
.mobile-menu-overlay .dropdown-menu {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    margin-top: 0.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay .dropdown.active .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
}

.mobile-menu-overlay .dropdown-menu a {
    font-size: 1.2rem;
    padding: 1rem 2rem;
}


/* Language Selector */
.language-selector {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.language-selector:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 247, 255, 0.1);
}

.language-selector:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
}

.language-selector option {
    background: var(--bg-color);
    color: var(--text-primary);
}


/* Glassmorphism Components */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    line-height: normal;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.4);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-border);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-secondary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 247, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 247, 255, 0.2);
}

.back-to-top:hover {
    background: rgba(0, 247, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(0, 247, 255, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-primary);
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

.mobile-menu-overlay nav ul {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-menu-overlay nav a {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.mobile-menu-overlay nav a:hover,
.mobile-menu-overlay nav a.active {
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .glass-card {
        padding: 1.5rem;
    }
}

/* ========================================
   MOBILE (< 768px)
   ======================================== */
@media (max-width: 767px) {

    /* Container */
    .container {
        padding: 0 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Header */
    header {
        height: 60px;
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    /* Hide desktop menu, show hamburger */
    nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .btn-secondary {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Glass Cards */
    .glass-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    /* Typography - Balanced for Mobile */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* Hero Section - Mobile Optimized */
    .hero {
        padding: 40px 1.5rem !important;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        margin-bottom: 1rem !important;
    }

    .hero p {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
        padding: 0 !important;
    }

    /* About Section - Better Spacing */
    .about {
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem !important;
        padding: 40px 1.5rem !important;
    }

    .about h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center;
    }

    .about p {
        font-size: 1rem !important;
        margin-bottom: 1.2rem !important;
        text-align: left;
    }

    /* Target the handicap quote specifically if possible, or generally styled paragraphs with borders */
    .about p[style*="border-left"] {
        background: rgba(0, 247, 255, 0.05);
        padding: 1rem !important;
        border-radius: 0 12px 12px 0;
        margin-top: 2rem !important;
        font-size: 1.05rem !important;
    }

    .about img {
        border-radius: 20px !important;
        max-height: 300px;
        object-fit: cover;
        width: 100%;
    }

    /* Why Free Section */
    .about p strong {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
    }

    /* Donation Section */
    .donation {
        padding: 50px 1.5rem !important;
    }

    .donation h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }

    .donation p {
        margin-bottom: 1.5rem !important;
    }

    .donation button {
        width: 100%;
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
        font-size: 0.9rem;
    }

    /* Background blobs - smaller on mobile */
    .blob {
        filter: blur(30px);
    }

    .blob:nth-child(1),
    .blob:nth-child(2),
    .blob:nth-child(3),
    .blob:nth-child(4),
    .blob:nth-child(5) {
        width: 250px;
        height: 250px;
    }

    /* Back to top button - smaller on mobile */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   SMALL MOBILE (< 480px)
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    header {
        height: 55px;
    }

    .logo {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    .glass-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   PAGE-SPECIFIC RESPONSIVE STYLES
   ======================================== */

/* Index Page - Application Cards */
@media (max-width: 767px) {
    .apps-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .app-card {
        max-width: 100% !important;
    }

    .hero h1 {
        font-size: 2rem !important;
    }

    .hero p {
        font-size: 1rem !important;
    }
}

/* Contact Page - Form and Image */
@media (max-width: 767px) {
    .contact-form-container {
        padding: 0 !important;
    }

    .contact-form-container form {
        padding: 1.5rem !important;
    }

    .form-group {
        margin-bottom: 1.25rem !important;
    }

    .form-group input,
    .form-group textarea {
        font-size: 1rem !important;
    }

    .form-actions {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .form-actions button {
        width: 100% !important;
    }
}

/* Features Grid (Jingle Machine, Solar, etc.) */
@media (max-width: 767px) {
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .feature-card {
        padding: 1.25rem !important;
    }

    .feature-card h3 {
        font-size: 1.1rem !important;
    }

    .feature-card p {
        font-size: 0.9rem !important;
    }
}

/* Images Responsive */
@media (max-width: 767px) {
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    .app-screenshot,
    .feature-image {
        width: 100% !important;
        border-radius: 12px !important;
    }
}

/* Lightbox System */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.90);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-img-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#lightbox.active #lightbox-img-container {
    transform: scale(1);
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 247, 255, 0.3);
    border: 1px solid var(--glass-border);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    color: var(--accent-primary);
}

.zoomable {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}


/* Social Sharing Buttons */
.social-share-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 247, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 247, 255, 0.2);
}

.share-btn:hover svg {
    transform: scale(1.1);
}

.share-btn:active {
    transform: scale(0.95);
}

/* Tooltip on click for Copy Link */
.share-btn.copied::after {
    content: "Copié !";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    opacity: 1;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}