/* LoopIoT - Base Styles & Variables */
:root {
    --dark-bg: #0a0a0f;
    --dark-card: #1a1a2e;
    --dark-accent: #16213e;
    --rgb-blue: #00d4ff;
    --rgb-purple: #b347d9;
    --rgb-pink: #ff6b9d;
    --rgb-green: #00ff88;
    --rgb-orange: #ff9500;
    --font-inter: 'Inter', sans-serif;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-inter);
    background-color: var(--dark-bg);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Ensure the main content takes up remaining vertical space so footer is pushed down */
main {
    flex: 1 0 auto;
    /* Account for fixed header height so content isn't squashed underneath */
    padding-top: 5vh;
}

@media (min-width: 640px) {
    main {
        padding-top: 6rem;
    }
}

.text-gray {
    color: #d1d5db;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* LoopIoT - Reusable Components */

/* Effets RGB globaux */
.rgb-glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3),
        0 0 40px rgba(179, 71, 217, 0.2),
        0 0 60px rgba(255, 107, 157, 0.1);
}

.rgb-border {
    border: 2px solid transparent;
    background: linear-gradient(45deg, var(--rgb-blue), var(--rgb-purple), var(--rgb-pink), var(--rgb-green)) border-box;
    border-radius: 12px;
}

@media print {

    .rgb-glow,
    .rgb-border {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Button Hover Spotlight Effect */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease-out;
}

.btn-hover-effect:hover {
    transform: scale(1.03);
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-hover-effect:hover::before {
    left: 100%;
    width: 300px;
    height: 300px;
    opacity: 1;
}

.btn-hover-effect>* {
    position: relative;
    z-index: 2;
}

/* Common Popup Styles */
.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    transform: scale(0.7);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-popup.active .popup-content {
    transform: scale(1);
}

/* Legal Pages Typography */
.legal-content h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: var(--rgb-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content ul {
    color: rgb(209, 213, 219);
    line-height: 1.625;
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style-type: disc;
    list-style-position: inside;
    margin-left: 1rem;
}

.legal-content a {
    color: var(--rgb-green);
}

.legal-content a:hover {
    text-decoration: underline;
}

/* Utilitaires Globaux */
.section-spacing {
    padding-top: 5rem;
}

.will-change-transform {
    will-change: transform;
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
}

.will-change-opacity {
    will-change: opacity;
}

/* Accessibility */
button:focus,
a:focus {
    outline: 2px solid var(--rgb-blue);
    outline-offset: 2px;
}

/* Hero Section */
.hero-section {
    padding-top: 5vh;
    padding-bottom: 3vh;
    padding-left: 1vw;
    padding-right: 1vw;
    min-height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.hero-container {
    max-width: 80rem;
    margin: 0 1vw;
    height: auto;
}

.hero-content {
    text-align: center;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-divider {
    width: 6rem;
    height: 0.25rem;
    background: linear-gradient(to right, var(--rgb-blue), var(--rgb-pink));
    margin: 0 auto 1.5rem auto;
    border-radius: 9999px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgb(209, 213, 219);
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.625;
}

@media (min-width: 640px) {
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-subtitle {
        font-size: 1.875rem;
    }
}

.hero-description {
    font-size: 1rem;
    color: rgb(156, 163, 175);
    margin-bottom: 3rem;
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.625;
}

@media (min-width: 640px) {
    .hero-description {
        font-size: 1.125rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 4rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.hero-btn-primary {
    background-color: var(--dark-card);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn-primary:hover {
    background-color: var(--dark-accent);
    transform: scale(1.05);
}

.hero-btn-secondary {
    border: 1px solid rgb(75, 85, 99);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    background: transparent;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn-secondary:hover {
    border-color: var(--rgb-blue);
    color: var(--rgb-blue);
}

/* Features Section */
.features-section {
    padding: 4rem 1rem;
}

@media (min-width: 640px) {
    .features-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .features-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.features-container {
    max-width: 80rem;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .features-title {
        font-size: 2.25rem;
    }
}

.features-subtitle {
    color: rgb(156, 163, 175);
    font-size: 1.125rem;
    max-width: 32rem;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: var(--dark-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgb(31, 41, 55);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
}

.feature-card:nth-child(2) {
    animation-delay: 0.5s;
}

.feature-card:nth-child(3) {
    animation-delay: 1s;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon.blue-purple {
    background: linear-gradient(45deg, var(--rgb-blue), var(--rgb-purple));
}

.feature-icon.pink-orange {
    background: linear-gradient(45deg, var(--rgb-pink), var(--rgb-orange));
}

.feature-icon.green-blue {
    background: linear-gradient(45deg, var(--rgb-green), var(--rgb-blue));
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.feature-description {
    color: rgb(156, 163, 175);
    line-height: 1.625;
    text-align: center;
}

/* Contact Section */
.contact-section {
    padding: 4rem 1rem;
    background-color: rgba(26, 26, 46, 0.5);
}

@media (min-width: 640px) {
    .contact-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .contact-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.contact-container {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.contact-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .contact-title {
        font-size: 2.25rem;
    }
}

.contact-description {
    color: rgb(156, 163, 175);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

/* LoopIoT - Animations */
.gradient-text {
    background: linear-gradient(45deg, var(--rgb-blue), var(--rgb-purple), var(--rgb-pink), var(--rgb-green));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.pulse-rgb {
    animation: pulseRGB 2s ease-in-out infinite;
}

@keyframes pulseRGB {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.5),
            0 0 10px rgba(179, 71, 217, 0.3),
            0 0 15px rgba(255, 107, 157, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.8),
            0 0 40px rgba(179, 71, 217, 0.6),
            0 0 60px rgba(255, 107, 157, 0.4);
    }
}

@keyframes blink {

    0%,
    50% {
        border-color: var(--rgb-blue);
    }

    51%,
    100% {
        border-color: transparent;
    }
}

/* Print styles for animations */
@media print {

    .floating,
    .pulse-rgb,
    .gradient-text,
    .animate-bounce,
    .animate-pulse,
    .animate-fade-in-up {
        animation: none !important;
    }
}

/* Global Animation Utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* --- Added Global Utilities & Components (Tailwind Replacement) --- */

/* Layout & Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.space-y-1> :not([hidden])~ :not([hidden]) {
    margin-top: 0.25rem;
}

.space-y-2> :not([hidden])~ :not([hidden]) {
    margin-top: 0.5rem;
}

.space-y-5> :not([hidden])~ :not([hidden]) {
    margin-top: 1.25rem;
}

.space-y-6> :not([hidden])~ :not([hidden]) {
    margin-top: 1.5rem;
}

/* Positioning & Display */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.hidden {
    display: none;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Spacing */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* Typography */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.font-mono {
    font-family: monospace;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.text-white {
    color: #fff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-red-400 {
    color: #f87171;
}

.text-red-500 {
    color: #ef4444;
}

.text-orange-500 {
    color: #f97316;
}

.text-yellow-500 {
    color: #eab308;
}

.text-rgb-blue {
    color: var(--rgb-blue);
}

.text-rgb-green {
    color: var(--rgb-green);
}

.text-rgb-purple {
    color: var(--rgb-purple);
}

/* Transitions & Transforms */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transform {
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

/* Common Auth Components */
.auth-page-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    padding-top: 6rem;
}

.auth-bg-blob {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 9999px;
    filter: blur(64px);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
    z-index: -10;
}

.auth-card {
    background-color: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(4px);
    margin-left: auto;
    margin-right: auto;
    transform: translateZ(0);
    transition: all 0.3s ease;
    position: relative;
}

.auth-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.auth-card-green:hover {
    border-color: rgba(0, 255, 136, 0.3);
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 0;
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #9ca3af;
    transition: color 0.15s ease;
}

.auth-input {
    display: block;
    width: 100%;
    padding-left: 2.5rem;
    padding-right: 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: rgba(10, 10, 15, 0.5);
    border: 1px solid #374151;
    border-radius: 0.75rem;
    color: #fff;
    outline: none;
    transition: all 0.15s ease;
}

.auth-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.5);
    border-color: var(--rgb-blue);
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--rgb-blue);
}

.auth-input.focus-purple:focus {
    box-shadow: 0 0 0 2px rgba(179, 71, 217, 0.5);
    border-color: var(--rgb-purple);
}

.auth-input-group:focus-within .auth-input-icon.icon-purple {
    color: var(--rgb-purple);
}

.auth-input.focus-green:focus {
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.5);
    border-color: var(--rgb-green);
}

.auth-input-group:focus-within .auth-input-icon.icon-green {
    color: var(--rgb-green);
}

.auth-btn-blue {
    background: linear-gradient(to right, var(--rgb-blue), var(--rgb-purple));
    box-shadow: 0 10px 15px -3px rgba(0, 212, 255, 0.2), 0 4px 6px -2px rgba(0, 212, 255, 0.1);
}

.auth-btn-blue:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 212, 255, 0.4), 0 4px 6px -2px rgba(0, 212, 255, 0.2);
    transform: translateY(-4px);
}

.auth-btn-green {
    background: linear-gradient(to right, var(--rgb-green), var(--rgb-blue));
    box-shadow: 0 10px 15px -3px rgba(0, 255, 136, 0.2), 0 4px 6px -2px rgba(0, 255, 136, 0.1);
}

.auth-btn-green:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 255, 136, 0.4), 0 4px 6px -2px rgba(0, 255, 136, 0.2);
    transform: translateY(-4px);
}