/* SD CYBER - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0b0d17;
}

::-webkit-scrollbar-thumb {
    background: #00a8e8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0077b6;
}

/* Primary button */
.btn-primary {
    background: linear-gradient(135deg, #00a8e8, #0077b6);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 168, 232, 0.4), 0 0 60px rgba(0, 168, 232, 0.1);
}

/* Glassmorphism card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 168, 232, 0.15);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 168, 232, 0.3);
}

/* Border glow effect */
.border-glow {
    position: relative;
}

.border-glow::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.3), transparent, rgba(0, 119, 182, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.border-glow:hover::after {
    opacity: 1;
}

/* Text glow */
.text-glow {
    text-shadow: 0 0 20px rgba(0, 168, 232, 0.5), 0 0 40px rgba(0, 168, 232, 0.2);
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 168, 232, 0.1);
}

/* Cyber grid background */
.cyber-grid-bg {
    background-image:
        linear-gradient(rgba(0, 168, 232, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 232, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

/* Fade in animation with stagger support */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Navbar styles */
#navbar {
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background: rgba(11, 13, 23, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 168, 232, 0.1);
}

/* FAQ accordion */
.faq-item summary {
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::marker {
    display: none;
}

.faq-item[open] {
    background: rgba(0, 168, 232, 0.03);
    border-color: rgba(0, 168, 232, 0.3);
}

/* Form styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(11, 13, 23, 0.95) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Select dropdown styling */
select option {
    background: #0b0d17;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cyber-grid-bg {
        background-size: 40px 40px;
    }
}

/* Pulse animation for stats */
@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 168, 232, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 168, 232, 0.6), 0 0 40px rgba(0, 168, 232, 0.2);
    }
}

.stat-number {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Table styles */
table th,
table td {
    white-space: nowrap;
}

@media (max-width: 640px) {
    table th,
    table td {
        white-space: normal;
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* Gradient line separator */
.gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 232, 0.5), transparent);
}

/* ========================================
   Cookie Consent Banner (RGPD)
   ======================================== */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem;
    justify-content: center;
    animation: cookieSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cookie-banner-hide {
    animation: cookieSlideDown 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cookieSlideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

.cookie-banner-inner {
    max-width: 900px;
    width: 100%;
    background: rgba(11, 13, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 168, 232, 0.2);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 168, 232, 0.08);
}

.cookie-banner-text {
    flex: 1;
    min-width: 240px;
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #00a8e8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-text a:hover {
    color: #ffffff;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #00a8e8, #0077b6);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-accept:hover {
    box-shadow: 0 0 20px rgba(0, 168, 232, 0.4);
    transform: translateY(-1px);
}

.cookie-btn-refuse {
    background: transparent;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-refuse:hover {
    border-color: rgba(148, 163, 184, 0.6);
    color: #ffffff;
}

@media (max-width: 640px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Legal Pages Styles
   ======================================== */
.legal-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #00a8e8;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    color: #94a3b8;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.legal-content ul li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.legal-content a {
    color: #00a8e8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: #ffffff;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.legal-content table th,
.legal-content table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: normal;
}

.legal-content table th {
    color: #00a8e8;
    font-weight: 600;
    background: rgba(0, 168, 232, 0.05);
}

.legal-content table td {
    color: #94a3b8;
}

.legal-content table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.legal-content strong {
    color: #ffffff;
    font-weight: 600;
}

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a8e8, #0077b6);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    box-shadow: 0 6px 25px rgba(0, 168, 232, 0.5);
    transform: translateY(-2px);
}

.scroll-top-btn.visible:hover {
    transform: translateY(-2px);
}

/* ========================================
   Light Mode Styles
   ======================================== */
body.light-mode {
    background-color: #f0f4f8;
    color: #1a202c;
}

body.light-mode .bg-cyber-dark {
    background-color: #f0f4f8;
}

body.light-mode #navbar.scrolled {
    background: rgba(240, 244, 248, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 168, 232, 0.15);
}

body.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 168, 232, 0.12);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

body.light-mode .glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 168, 232, 0.25);
}

body.light-mode .text-white {
    color: #1a202c;
}

body.light-mode .text-cyber-muted {
    color: #4a5568;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3 {
    color: #1a202c;
}

body.light-mode .text-glow {
    text-shadow: 0 0 15px rgba(0, 168, 232, 0.3), 0 0 30px rgba(0, 168, 232, 0.1);
}

body.light-mode .text-cyber-blue {
    color: #0077b6;
}

body.light-mode .cyber-grid-bg {
    background-image:
        linear-gradient(rgba(0, 168, 232, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 232, 0.06) 1px, transparent 1px);
}

body.light-mode .bg-gradient-to-b {
    --tw-gradient-from: transparent;
    --tw-gradient-to: #f0f4f8;
}

body.light-mode footer {
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode input,
body.light-mode textarea,
body.light-mode select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a202c;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: #a0aec0;
}

body.light-mode select option {
    background: #ffffff;
    color: #1a202c;
}

body.light-mode input:-webkit-autofill,
body.light-mode input:-webkit-autofill:hover,
body.light-mode input:-webkit-autofill:focus,
body.light-mode textarea:-webkit-autofill {
    -webkit-text-fill-color: #1a202c;
    -webkit-box-shadow: 0 0 0px 1000px rgba(240, 244, 248, 0.95) inset;
}

body.light-mode .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 30px rgba(0, 168, 232, 0.08);
}

body.light-mode table td {
    color: #4a5568;
}

body.light-mode table th {
    color: #0077b6;
}

body.light-mode .faq-item[open] {
    background: rgba(0, 168, 232, 0.04);
}

body.light-mode .cookie-banner-inner {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 168, 232, 0.15);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .cookie-banner-text {
    color: #4a5568;
}

body.light-mode .cookie-btn-refuse {
    color: #4a5568;
    border-color: rgba(74, 85, 104, 0.3);
}

body.light-mode ::-webkit-scrollbar-track {
    background: #f0f4f8;
}

body.light-mode #mobile-menu-btn {
    color: #1a202c;
}

body.light-mode .nav-link {
    color: #4a5568;
}

body.light-mode .nav-link:hover {
    color: #0077b6;
}

body.light-mode .scroll-top-btn {
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.2);
}

/* Testimonials section light-mode overrides */
body.light-mode #temoignages .absolute {
    background: linear-gradient(to bottom, #f0f4f8, #e8edf3, #f0f4f8);
}

body.light-mode #temoignages blockquote {
    color: #2d3748;
}

body.light-mode #temoignages .border-t {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ========================================
   Performance & Accessibility Optimizations
   ======================================== */

/* Font-display fallback for any @font-face */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: local('Inter');
}

/* Touch target minimum 48x48 on mobile */
@media (max-width: 768px) {
    .btn-primary {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 24px;
    }

    #navbar a,
    #navbar button,
    #mobile-menu a,
    #mobile-menu button {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
    }

    .faq-item summary {
        min-height: 48px;
        padding: 16px 20px;
    }

    footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Ensure adequate spacing between interactive elements */
@media (max-width: 768px) {
    .faq-item + .faq-item {
        margin-top: 8px;
    }

    #mobile-menu a + a {
        margin-top: 4px;
    }
}

/* Improve contrast for muted text - bump to WCAG AA */
.text-cyber-muted {
    color: #a0aec0;
}

body.light-mode .text-cyber-muted {
    color: #4a5568;
}