:root {
  /* Brand Colors */
  --color-primary: #667eea;
  --color-primary-dark: #764ba2;
  --color-secondary: #6c63ff;
  --color-secondary-dark: #5a52d5;

  /* Text Colors */
  --color-text: #333;
  --color-text-secondary: #666;
  --color-text-light: #999;

  /* Background Colors */
  --color-bg-light: #f8f9fa;
  --color-bg-medium: #e9ecef;
  --color-bg-white: #fff;

  /* Border Colors */
  --color-border: #e1e5e9;
  --color-border-focus: #667eea;

  /* Status Colors */
  --color-success: #28a745;
  --color-success-bg: #d4edda;
  --color-error: #dc3545;
  --color-error-bg: #f8d7da;
  --color-warning: #ffc107;
  --color-warning-bg: #fff3cd;
  --color-info: #17a2b8;
  --color-info-bg: #d1ecf1;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-primary-reverse: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  --gradient-secondary: linear-gradient(135deg, #6c63ff 0%, #5a52d5 100%);
  --gradient-light: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 15px;
  --radius-full: 25px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
  --shadow-primary: 0 5px 15px rgba(102, 126, 234, 0.3);

  /* Z-Index */
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-modal: 1000;
  --z-overlay: 999;
  --z-toast: 9999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
}

/* Global responsive images — max-width only; height kept as-is to avoid
   overriding explicit height attributes on logos and icon images. */
img {
    max-width: 100%;
}

/* Content images (not logos/icons): allow height to scale naturally */
.legal-content img,
.documentation-content img,
.screenshot-placeholder img,
.step-content img,
main article img {
    height: auto;
}

/* Touch-friendly tap highlight */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a.active {
    color: var(--color-primary);
    font-weight: 600;
}

.nav-links a.login-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.nav-links a.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.nav-links a.login-btn.active {
    background: var(--gradient-primary-reverse);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('website_banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 6rem 2rem 10px 2rem;
    min-height: calc(6rem + 20px + 350px);
    position: relative;
    overflow: hidden;
}

.no-tech-ribbon {
    position: absolute;
    top: 90px;
    left: -110px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    padding: 10px 80px;
    font-size: 1.1rem;
    font-weight: bold;
    transform: rotate(-45deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 10;
    white-space: nowrap;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    margin-top: -20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}


.price-highlight {
    margin: 2rem 0 3rem 0;
}

.price {
    background: var(--gradient-primary);
    padding: 1.3rem 2.6rem;
    border-radius: 50px;
    font-size: 3.25rem;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
    animation: pulse 2s infinite;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    text-decoration: none;
    color: white;
}

.price:hover {
    text-decoration: none;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.price-subtitle {
    font-size: 1.04rem;
    color: rgba(255,255,255,0.8);
    font-weight: bold;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: block;
    margin-top: -0.2rem;
}

.cta-button {
    background: #fff;
    color: var(--color-primary);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.cta-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Service Details */
.service-details {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.service-details h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-text);
}

.features-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    overflow-x: auto;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s;
    min-width: 200px;
    text-align: center;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.feature h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.1rem;
    white-space: nowrap;
}

/* AI Demo */
.ai-demo {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    text-align: center;
}

.ai-demo h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.ai-demo p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.demo-videos {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.video-container {
    flex: 1;
    max-width: 780px;
    height: 353px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: 370px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* SEO Benefits */
.seo-benefits {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    color: var(--color-text);
    padding: 4rem 2rem;
}

.seo-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding: 0 2rem;
}

.seo-animation {
    flex: none;
    width: 500px;
    min-width: 500px;
}

.seo-animation iframe {
    width: 500px;
    height: 400px;
    border: none;
    display: block;
}

.seo-text {
    flex: 2;
    text-align: left;
}

.seo-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.seo-text p {
    font-size: 1.2rem;
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Pricing */
.pricing {
    padding: 5rem 2rem;
    text-align: center;
    margin: 0 auto;
}

.pricing h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-text);
    text-align: center;
    width: 100%;
    line-height: 1.2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: #fff;
    padding: 2.1rem 1.4rem;
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.1);
    border: 2px solid var(--color-primary);
    position: relative;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.no-commitment-ribbon {
    position: absolute;
    top: 50px;
    left: -50px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 8px 45px;
    font-size: 0.9rem;
    font-weight: bold;
    transform: rotate(-45deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.price-detail {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 2rem;
}

.currency {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.amount {
    font-size: 4rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 0 0.5rem;
}

.period {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    color: var(--color-text);
    font-weight: 500;
}

.pricing-cta {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: transform 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pricing-cta:hover {
    transform: translateY(-2px);
}

/* Contact (index.html landing page CTA section - gradient version)
 * NOTE: This definition is intentionally overridden by the second .contact definition below
 * (contact.html page - light grey version). CSS cascade means last-defined wins.
 * Both are kept for documentation purposes. The gradient styling here applies only
 * when this class is used before the second definition loads (i.e., never in practice
 * since both definitions are in the same file). The index.html landing page actually
 * uses a separate .contact-cta-section class for its CTA. */
.contact {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: 5rem 2rem;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* .contact-cta (index.html landing page - white bg with primary text color)
 * NOTE: Overridden by the second .contact-cta definition below (contact.html - gradient bg).
 * CSS last-defined wins. Both are on different pages so no visual conflict. */
.contact-cta {
    background: #fff;
    color: var(--color-primary);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.contact-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

/* Login Page Styles */
.login-main {
    min-height: 100vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 585px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

.login-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.tab-btn.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--color-text);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.forgot-password {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}


.logo a {
    text-decoration: none;
}

.email-option {
    margin-bottom: 1.5rem;
}

.email-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: all 0.3s;
    color: var(--color-primary);
    font-size: 1rem;
}

.email-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.back-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.signup-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--color-primary);
}

/* Hamburger menu button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

.nav-overlay.open {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: white;
        z-index: 1000;
        padding: 5rem 2rem 2rem;
        align-items: flex-start;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--color-bg-medium);
    }

    .nav-links li:last-child {
        border-bottom: none;
        margin-top: 1rem;
    }

    .nav-links a {
        display: block;
        padding: 0.9rem 0;
        font-size: 1.05rem;
    }

    .nav-links a.login-btn {
        display: inline-block;
        margin-top: 0.5rem;
        padding: 0.75rem 1.5rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .no-tech-ribbon {
        display: none;
    }
    
    .features-grid {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        min-width: unset;
        width: 100%;
    }

    .feature h3 {
        white-space: normal;
    }
    
    .demo-examples {
        grid-template-columns: 1fr;
    }

    .demo-videos {
        flex-direction: column;
    }

    .video-container {
        height: auto;
        max-width: 100%;
    }

    .video-container video {
        height: auto;
        width: 100%;
    }

    .seo-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .seo-animation {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        margin: 0 auto;
    }

    .seo-animation iframe {
        width: 100%;
        height: 380px;
        border: none;
        display: block;
    }

    .seo-text {
        text-align: center;
    }

    .seo-text h2 {
        font-size: 2rem;
    }

    .service-details h2,
    .ai-demo h2,
    .pricing h2,
    .contact h2,
    .contact-cta-section h2,
    .contact-info h2 {
        font-size: 1.75rem;
    }

    .hero {
        background-attachment: scroll;
        min-height: auto;
        padding: 4rem 1rem 60px 1rem;
    }

    .price {
        font-size: 2rem;
        padding: 1rem 1.5rem;
    }

    .cta-button {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 1.5rem;
    }

    .cta-button:hover {
        transform: translateY(-2px);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    
    .login-main {
        padding: 1rem;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Validation Popup */
.validation-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.validation-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-status-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup-content.account-status-popup-content {
    position: relative;
    max-width: 520px;
    width: min(92vw, 520px);
    text-align: left;
}

.account-status-popup-body {
    padding-top: 1.25rem;
}

.account-status-popup-body .popup-info {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.account-status-popup-actions {
    display: flex;
    justify-content: center;
}

.account-status-popup-actions .auth-btn {
    min-width: 160px;
}

/* .popup-content (login.html - validation/account popups, 400px max-width) */
.popup-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-header h3 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.popup-header p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.spinner-container {
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.popup-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: left;
}

.popup-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

.popup-info strong {
    color: var(--color-primary);
}

.validation-status {
    color: var(--color-text-secondary);
}

.cancel-btn {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    color: var(--color-text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 1rem;
}

.cancel-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: var(--color-text);
}

/* Existing Account Popup */
.existing-account-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.existing-account-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.existing-account-icon {
    margin: 1.5rem 0;
    text-align: center;
}

.existing-account-icon svg {
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.redirect-info {
    color: var(--color-primary);
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
}

/* Forgot Password Popups */
.forgot-password-popup,
.forgot-password-sent-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.forgot-password-popup.show,
.forgot-password-sent-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-password-form {
    text-align: left;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-actions .cancel-btn {
    margin-top: 0;
}

/* Password Reset Page */
.reset-password-content {
    text-align: center;
}

.reset-password-content .auth-form {
    text-align: left;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
}

.success-message p {
    margin: 0;
    font-weight: 500;
}

/* Password Reset Success Popup */
.reset-success-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.reset-success-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon {
    margin: 1.5rem 0;
    text-align: center;
}

.success-icon svg {
    animation: bounceIn 0.5s ease-out;
}

/* Form Row Layout for Validation Page */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fff;
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form-group input:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 1.5rem;
    }
}

/* Error Message */
.error-message {
    background: #ffe6e6;
    border: 1px solid #ff9999;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: #cc0000;
    font-size: 0.9rem;
    text-align: center;
}

.error-message p {
    margin: 0;
    font-weight: 500;
}

/* Dashboard Page Styles */
.dashboard-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.4rem 0;
    margin-bottom: 0.25rem;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.dashboard-nav .logo {
    display: flex;
    align-items: center;
}

.dashboard-nav .logo img {
    transition: transform 0.3s ease;
}

.dashboard-nav .logo img:hover {
    transform: scale(1.05);
}

.dashboard-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    display: inline-block;
}

.menu-link:hover {
    color: var(--color-primary);
    background: rgba(102, 126, 234, 0.1);
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Domain Warning Box */
    
.domain-warning-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, #fef3c7 0%, #fdba74 100%);
}

.domain-warning-box .warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.domain-warning-box .warning-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.domain-warning-box .warning-title {
    font-weight: 600;
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.2;
}

.domain-warning-box .warning-subtitle {
    font-size: 0.8rem;
    color: #a16207;
    line-height: 1.2;
}

.domain-warning-box .warning-arrow {
    font-size: 1rem;
    color: #92400e;
    font-weight: bold;
    flex-shrink: 0;
}

@keyframes pulse-slow {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}


.dashboard-welcome {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    text-align: center;
}

.dashboard-welcome h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.dashboard-welcome p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.dashboard-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.clickable-card {
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    color: var(--color-text);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-card p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-action {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s;
    text-decoration: none;
    display: inline-block;
}

.card-action:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 0.4rem 0;
    }

    .dashboard-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.4rem;
        padding: 0 0.5rem;
    }

    .dashboard-nav .logo {
        flex-shrink: 0;
    }

    .dashboard-nav .logo img {
        height: 28px;
        width: auto;
    }

    .dashboard-user-menu {
        flex: 1;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.2rem;
        min-width: 0;
    }

    .menu-link {
        padding: 0.3rem 0.45rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .logout-btn {
        font-size: 0.78rem;
        padding: 0.3rem 0.45rem;
        white-space: nowrap;
    }
}

/* Short nav labels: hidden by default, shown only on very narrow screens */
.nav-label-short {
    display: none;
}

@media (max-width: 480px) {
    .nav-label-full {
        display: none;
    }

    .nav-label-short {
        display: inline;
    }

    .dashboard-nav .logo img {
        height: 24px;
    }

    .dashboard-user-menu {
        gap: 0.05rem;
    }

    .menu-link {
        padding: 0.25rem 0.3rem;
        font-size: 0.7rem;
    }

    .logout-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.3rem;
    }
    
    .dashboard-welcome h1 {
        font-size: 2rem;
    }
    
    .dashboard-main {
        padding: 0 1rem;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
}

/* Account Management Styles */
.account-management {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 2rem;
}

.account-header {
    margin-bottom: 2rem;
}

.account-header h2 {
    color: var(--color-text);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.account-header p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

/* Section cards for grouped fields */
.account-section-card {
    background: white;
    border-radius: 15px;
    padding: 1.75rem 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 1.25rem;
}

.account-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eef0f3;
}

.account-section-title svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.section-optional-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: #f0f2f5;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    margin-left: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Two-column row for paired fields */
.account-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.account-form .form-group:last-child {
    margin-bottom: 0;
}

.account-form .form-row .form-group {
    margin-bottom: 0;
}

.account-form .form-row {
    margin-bottom: 1.25rem;
}

.account-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.account-form input,
.account-form select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
}

.account-form input:focus,
.account-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.account-form input:disabled {
    background: #f8f9fa;
    color: var(--color-text-secondary);
    cursor: not-allowed;
}

/* Email readonly container with lock icon */
.email-readonly-container {
    position: relative;
    display: flex;
    align-items: center;
}

.email-readonly-container input {
    padding-right: 2.5rem;
}

.email-lock-icon {
    position: absolute;
    right: 0.75rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
    pointer-events: none;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Submit button inside form */
.account-form > .auth-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    pointer-events: none;
    max-width: 400px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-notification.success {
    background: #d4edda;
    border: 1px solid #b7dfbf;
    color: #155724;
}

.toast-notification.error {
    background: #f8d7da;
    border: 1px solid #f1c0c5;
    color: #721c24;
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Mobile sticky save bar */
.mobile-sticky-save {
    display: none;
}

@media (max-width: 768px) {
    .mobile-sticky-save {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .mobile-sticky-save .auth-btn {
        width: 100%;
        margin: 0;
    }

    /* Hide the in-form submit on mobile */
    .account-form > #account-submit-btn {
        display: none;
    }

    /* Add bottom padding to main so content isn't hidden behind sticky bar */
    .account-management {
        padding-bottom: 5rem;
    }
}

.website-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.website-input-container input {
    flex: 1;
    padding: 0.95rem 1.15rem;
    border-radius: 14px;
    border: 1px solid rgba(102, 126, 234, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 255, 0.98) 100%);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.12);
    color: #324277;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.website-input-container input:disabled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 255, 0.98) 100%);
    color: #324277;
    opacity: 1;
    -webkit-text-fill-color: #324277;
}

.website-link-btn {
    background: var(--color-primary);
    border: none;
    border-radius: 6px;
    padding: 0.75rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.website-link-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.website-link-btn:active {
    transform: translateY(0);
}

.website-link-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.website-link-btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .website-input-container input {
        font-size: 1.02rem;
    }
}

/* Account page: no domain reserved warning box */
.account-no-domain-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 1.25rem 1.5rem 0;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe0e0 100%);
    border: 2px solid var(--color-error);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    animation: account-no-domain-pulse 2.5s ease-in-out infinite;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.account-no-domain-box:hover {
    background: linear-gradient(135deg, #ffe0e0 0%, #ffc8c8 100%);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.25);
    transform: translateY(-2px);
    animation: none;
    border-color: #b02035;
}

.account-no-domain-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1.1rem;
}

.account-no-domain-title {
    font-weight: 700;
    color: #9b1c2a;
    font-size: 1rem;
    line-height: 1.3;
}

.account-no-domain-subtitle {
    font-size: 0.85rem;
    color: #b02035;
    line-height: 1.4;
}

.account-no-domain-cta {
    display: block;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    background: var(--color-error);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.325rem 1rem;
    text-align: center;
    transition: background 0.2s ease;
}

.account-no-domain-box:hover .account-no-domain-cta {
    background: #b02035;
}

@keyframes account-no-domain-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); border-color: var(--color-error); }
    50% { box-shadow: 0 0 0 5px rgba(220, 53, 69, 0.12); border-color: #b02035; }
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.password-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc3545;
    font-weight: 500;
}

.account-form input.password-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* .message (mon-compte.html - account form status messages) */
.message {
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message p {
    margin: 0;
}

/* Disabled Button Style */
.auth-btn.disabled-button {
    background: #dc3545;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-btn.disabled-button:hover {
    transform: none;
    box-shadow: none;
}

/* Site Management Section */
.site-management {
    max-width: none;
    margin: 0;
    padding: 0.5rem;
    height: calc(100vh - 100px); /* Adjusted for compact header */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

/* Buttons row container */
.buttons-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.1rem;
}

/* Chrome bar alert for unpublished changes */
/* Chrome alert (unpublished / no domain) */
.chrome-alert {
    color: #dc3545;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Desktop: show static text, hide scroll wrapper */
.chrome-alert-scroll {
    display: none;
}

.chrome-alert-static {
    display: inline;
}

.chrome-title-short {
    display: none;
}

/* Publish Button Blinking Animation */
@keyframes pulse-publish {
    0% {
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        opacity: 1;
    }
    50% {
        box-shadow: 0 5px 25px rgba(102, 126, 234, 0.6);
        opacity: 0.85;
    }
    100% {
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        opacity: 1;
    }
}

.site-btn.primary.blink {
    animation: pulse-publish 1.5s ease-in-out infinite;
}

.site-btn {
    background: #fff;
    border: 2px solid #ddd;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.site-btn.primary {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.site-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Disabled Button Styles */
.site-btn.disabled,
.site-btn:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

.site-btn.primary.disabled,
.site-btn.primary:disabled {
    background: #ccc;
    color: #888;
    border-color: #bbb;
    cursor: not-allowed;
    opacity: 0.6;
}

.site-btn.disabled:hover,
.site-btn:disabled:hover,
.site-btn.primary.disabled:hover,
.site-btn.primary:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: inherit;
    color: inherit;
}

.site-preview {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    width: calc(100vw - 20px);
    margin-left: calc(-50vw + 50% + 10px);
    margin-right: calc(-50vw + 50% + 10px);
    display: flex;
    flex-direction: column;
    border: 1px solid #b0b7c3;
}

/* Browser chrome bar above iframe */
.site-preview-chrome {
    display: flex;
    align-items: center;
    min-height: 32px;
    background: #d0d5dd;
    border-bottom: 1px solid #b0b7c3;
    padding: 4px 12px;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.site-preview-chrome .chrome-alert {
    margin-left: auto;
}

.chrome-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.chrome-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.chrome-dot.red { background: #ff5f57; }
.chrome-dot.yellow { background: #febc2e; }
.chrome-dot.green { background: #28c840; }

.chrome-title {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    color: #4a5060;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    min-width: 0;
}

.site-preview iframe {
    width: 100%;
    flex: 1;
    border: none;
    background: #fff;
}

/* Loading state for iframe */
.site-preview::after {
    content: "Chargement du site...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    z-index: 1;
}

.site-preview.loaded::after {
    display: none;
}

@media (max-width: 768px) {
    .account-management {
        padding: 0 0.75rem;
    }

    .account-header h2 {
        font-size: 1.5rem;
    }

    .account-section-card {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }

    .account-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .account-form .form-row .form-group {
        margin-bottom: 1.25rem;
    }

    .account-form .form-row .form-group:last-child {
        margin-bottom: 0;
    }

    .toast-notification {
        top: auto;
        bottom: 5rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
    }
    
    .site-management {
        padding: 1rem;
        height: calc(100vh - 65px);
    }

    .buttons-row {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .buttons-row .site-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        justify-content: center;
    }

    .site-toolbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .site-preview {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .chrome-title {
        font-size: 0.85rem;
    }

    .chrome-dot {
        width: 8px;
        height: 8px;
    }

    .site-preview-chrome {
        min-height: 28px;
        padding: 4px 10px;
    }
}

/* Private Access Notice Styles */
.private-access-notice {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.private-access-icon {
    margin-bottom: 1rem;
}

.private-access-notice h3 {
    color: #495057;
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.private-access-message {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* Disabled Form Elements */
.disabled-form-section {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
}

.email-option.disabled button {
    cursor: not-allowed;
    background: #e9ecef;
    color: #6c757d;
}

.auth-form.disabled {
    opacity: 0.6;
}

.auth-form.disabled input {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

.auth-form.disabled button {
    background: #6c757d;
    cursor: not-allowed;
}


/* Contact CTA Section (index.html) */
.contact-cta-section {
    text-align: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    color: var(--color-text);
}

.contact-cta-section h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.contact-cta-section h2 a {
    color: var(--color-text);
    text-decoration: underline;
    font-weight: 500;
}

.contact-cta-section h2 a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* Contact Section Styles (contact.html - light grey background, overrides above definition) */
.contact {
    background: var(--gradient-light);
    padding: 4rem 2rem;
}

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

.contact-container h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-align: center;
}

.contact-container > p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-info h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.contact-info p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-icon {
    font-size: 1.25rem;
}

.contact-form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: white;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-submit-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.contact-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.contact-message {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.contact-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-message h3 {
    margin: 0.5rem 0;
}

.contact-message p {
    margin: 0;
}

.success-note {
    margin-top: 1rem !important;
    font-style: italic;
    opacity: 0.8;
}

.cta-section {
    text-align: center;
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #dee2e6;
}

.cta-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

/* .contact-cta (contact.html page - gradient bg, overrides index.html version above) */
.contact-cta {
    background: var(--gradient-secondary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    transition: transform 0.2s;
}

.contact-cta:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-container h1 {
        font-size: 2rem;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .contact-info h2 {
        font-size: 2rem;
    }
}

/* Save Popup Styles */
.save-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-popup {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.save-popup h3 {
    margin: 0 0 1rem 0;
    color: var(--color-text);
    font-size: 1.5rem;
}

.save-popup p {
    margin: 0 0 1.5rem 0;
    color: var(--color-text-secondary);
}

.save-popup textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.save-popup textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.save-popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.save-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn.cancel {
    background: #f8f9fa;
    color: var(--color-text-secondary);
    border: 2px solid #ddd;
}

.save-btn.cancel:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.save-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.save-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.save-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* History Popup Styles */
.history-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-popup {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e5e9;
}

.history-header h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: var(--color-text);
}

.history-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.history-loading, .history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--color-text-secondary);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #f8f9fa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.current {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid var(--color-primary);
}

.history-item.current-modifications {
    background: rgba(255, 107, 53, 0.1);
    border-left: 4px solid #ff6b35;
    position: relative;
}

.history-item.current-modifications:hover {
    background: rgba(255, 107, 53, 0.15);
}

.history-info {
    flex: 1;
}

.history-message {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.history-date {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-btn.restore {
    background: var(--gradient-primary);
    color: white;
}

.history-btn.restore:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.history-btn.restore:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.current-indicator {
    background: #28a745;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-indicator.editing-indicator {
    background: #ff6b35;
    color: white;
    font-weight: bold;
}

.production-indicator {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    margin-right: 0.5rem;
}

/* Publish Popup Styles */
.publish-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.publish-popup {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.publish-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.publish-popup h3 {
    margin: 0 0 1rem 0;
    color: var(--color-text);
    font-size: 1.5rem;
}

.publish-popup p {
    margin: 0 0 1rem 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

#publish-message {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1.5rem;
    background: #fafbfc;
    transition: all 0.3s ease;
}

#publish-message:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.publish-popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.publish-btn-popup {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.publish-btn-popup.cancel {
    background: #f8f9fa;
    color: var(--color-text-secondary);
    border: 2px solid #ddd;
}

.publish-btn-popup.cancel:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.publish-btn-popup.primary {
    background: var(--gradient-primary);
    color: white;
}

.publish-btn-popup.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.publish-btn-popup.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Restore Error Popup Styles */
.restore-error-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.restore-error-popup {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.restore-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.restore-error-popup h3 {
    margin: 0 0 1rem 0;
    color: #d32f2f;
    font-size: 1.5rem;
}

.restore-error-popup p {
    margin: 0 0 1.5rem 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.restore-error-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.restore-error-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.restore-error-btn.primary {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
}

.restore-error-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
}

/* Payment Error Popup Styles */
.error-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-popup {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-popup h3 {
    margin: 0 0 1rem 0;
    color: #d32f2f;
    font-size: 1.5rem;
}

.error-popup p {
    margin: 0 0 1.5rem 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.error-popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.error-btn.primary {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
}

.error-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
}

/* Chatbot Styles */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 420px;
    height: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chatbot-container.minimized {
    height: 44px; /* Header height + padding */
    overflow: hidden;
}

.chatbot-container.fullscreen {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    border-radius: 15px;
    position: fixed;
    z-index: 1000;
}

.chatbot-container.fullscreen .chatbot-messages {
    max-height: calc(100vh - 160px);
}

.chatbot-header {
    background: var(--gradient-primary);
    padding: 4px 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    height: 36px; /* Logo 32px + 4px margin */
}

.chatbot-logo-centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-logo-centered img {
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.chatbot-controls {
    display: flex;
    gap: 5px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    height: 24px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    transition: background 0.3s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Persistent domain warning banner at the top of the chatbot */
@keyframes banner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.6); border-bottom-color: #f0ad4e; }
    50%       { box-shadow: 0 0 0 4px rgba(240, 173, 78, 0); border-bottom-color: #d4850a; }
}

@keyframes banner-icon-bounce {
    0%, 100% { transform: translateY(0); }
    30%       { transform: translateY(-4px); }
    60%       { transform: translateY(-2px); }
}

@keyframes banner-arrow-nudge {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(4px); }
}

.chatbot-domain-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff3cd, #ffe8a1);
    border-bottom: 2px solid #f0ad4e;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
    text-decoration: none;
    animation: banner-pulse 2s ease-in-out infinite;
}

.chatbot-domain-banner:hover {
    background: linear-gradient(135deg, #ffe8a1, #ffd966);
    animation: none;
    box-shadow: 0 0 0 3px rgba(240, 173, 78, 0.4);
}

.chatbot-domain-banner-icon {
    font-size: 16px;
    flex-shrink: 0;
    animation: banner-icon-bounce 2s ease-in-out infinite;
}

.chatbot-domain-banner-text {
    flex: 1;
    font-size: 12px;
    color: #856404;
    line-height: 1.4;
}

.chatbot-domain-banner-arrow {
    font-size: 16px;
    color: #856404;
    font-weight: bold;
    flex-shrink: 0;
    animation: banner-arrow-nudge 1s ease-in-out infinite;
}

.chatbot-messages {
    flex: 1;
    padding: 4px;
    overflow-y: auto;
    max-height: 456px;
}

/* .message (mon-site.html - chatbot messages, overrides above on different page) */
.message {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
    gap: 10px;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
}

.message-content {
    background: #f1f3f5;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1;
}

/* Markdown content styles in bot messages */
.bot-message .message-content h1,
.bot-message .message-content h2,
.bot-message .message-content h3,
.bot-message .message-content h4,
.bot-message .message-content h5,
.bot-message .message-content h6 {
    margin: 0.5em 0 0.3em 0;
    color: var(--color-text);
    font-weight: 600;
}

.bot-message .message-content h1 { font-size: 1.2em; }
.bot-message .message-content h2 { font-size: 1.1em; }
.bot-message .message-content h3 { font-size: 1.05em; }
.bot-message .message-content h4,
.bot-message .message-content h5,
.bot-message .message-content h6 { font-size: 1em; }

.bot-message .message-content p {
    margin: 0.5em 0;
}

.bot-message .message-content ul,
.bot-message .message-content ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.bot-message .message-content li {
    margin: 0.2em 0;
}

.bot-message .message-content blockquote {
    border-left: 3px solid var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
    margin: 0.5em 0;
    padding: 0.5em 1em;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.bot-message .message-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #e91e63;
}

.bot-message .message-content pre {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 1em;
    margin: 0.5em 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    line-height: 1.4;
}

.bot-message .message-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.bot-message .message-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.bot-message .message-content a:hover {
    border-bottom-color: var(--color-primary);
}

.bot-message .message-content strong,
.bot-message .message-content b {
    font-weight: 600;
    color: var(--color-text);
}

.bot-message .message-content em,
.bot-message .message-content i {
    font-style: italic;
    color: #555;
}

.bot-message .message-content hr {
    border: none;
    height: 1px;
    background: #e1e5e9;
    margin: 1em 0;
}

.bot-message .message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5em 0;
    font-size: 0.9em;
}

.bot-message .message-content th,
.bot-message .message-content td {
    padding: 6px 8px;
    border: 1px solid #e1e5e9;
    text-align: left;
}

.bot-message .message-content th {
    background: rgba(102, 126, 234, 0.1);
    font-weight: 600;
}

.bot-message .message-content {
    background: rgba(102, 126, 234, 0.1);
    border-bottom-left-radius: 5px;
    max-width: 100%;
    width: 100%;
}

.bot-message {
    gap: 0px;
    padding-left: 0px;
}

.user-message {
    flex-direction: row-reverse;
    gap: 0px;
    padding-right: 0px;
    justify-content: flex-end;
}

.user-message .message-content {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 5px;
    max-width: 100%;
    width: 100%;
}

/* Processing Message */
.processing-message {
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    border-bottom: 1px solid #e1e5e9;
    background-color: #f8f9fa;
    text-align: center;
}

.processing-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.processing-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.processing-warning {
    font-size: 12px;
    color: #dc3545;
    font-weight: 500;
    margin-bottom: 10px;
}

.processing-actions {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.chatbot-input {
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chatbot-input textarea {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    line-height: 1.4;
    overflow-y: hidden;
    transition: border-color 0.3s, height 0.2s ease;
}

.chatbot-input textarea:focus {
    border-color: var(--color-primary);
}

.send-btn {
    background: var(--gradient-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.3s;
}

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

.send-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.send-btn.disabled:hover {
    transform: none;
}

/* Loading message styles */
.loading-message .message-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loading-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-action {
    font-size: 13px;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: 5px;
    opacity: 1;
    transition: opacity 0.3s ease;
    min-height: 16px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-style: italic;
    color: var(--color-text-secondary);
}


/* Task output styles */
.task-output {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.output-line {
    margin-bottom: 4px;
    color: var(--color-text);
    word-wrap: break-word;
}

.output-line:last-child {
    margin-bottom: 0;
}

/* Disabled input styles */
.chatbot-input textarea:disabled {
    background-color: #f8f9fa;
    color: var(--color-text-secondary);
    cursor: not-allowed;
}

/* Chatbot entrance animation */
@keyframes chatbotSlideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chatbot-container.show {
    animation: chatbotSlideIn 0.3s ease-out;
}

/* Responsive design for mobile — default overlay (overridden by mobile-tab-mode) */
@media (max-width: 768px) {
    .chatbot-container:not(.mobile-tab-mode) {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 10px;
        right: 20px;
        left: 20px;
    }
}

/* Loading Button */
.auth-btn.loading {
    position: relative;
    background-color: #95a5a6 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn.loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

.auth-btn.loading .loading-text {
    color: #ffffff;
}


/* === FILE MANAGER STYLES === */

/* Backdrop overlay */
.files-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}

.files-popup-overlay.show {
    display: flex;
}

/* Explorer window */
.files-explorer {
    display: flex;
    flex-direction: column;
    width: 94vw;
    max-width: 1140px;
    height: 84vh;
    max-height: 800px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.08);
    overflow: hidden;
    animation: filesExplorerIn 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* Title bar */
.files-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 16px;
    height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
    gap: 8px;
}

.files-titlebar-left,
.files-titlebar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.files-window-title {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

/* Mobile hamburger button (hidden on desktop) */
.files-sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    padding: 8px 7px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.files-sidebar-toggle span {
    display: block;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
}

.files-sidebar-toggle:hover {
    background: rgba(255,255,255,0.28);
}

.files-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255,255,255,0.9);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.files-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Toolbar */
.files-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.files-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.files-action-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.files-action-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.files-action-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd6, #6b3fa0);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.45);
}

.files-action-btn.danger {
    color: #dc2626;
    border-color: #fca5a5;
}

.files-action-btn.danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #f87171;
}

.files-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Main area: sidebar + splitter + content */
.files-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Left sidebar – tree */
.files-sidebar {
    display: flex;
    flex-direction: column;
    width: 220px;
    min-width: 150px;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.files-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 9px;
    border-bottom: 1px solid #e2e8f0;
}

.files-sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
}

/* Mobile sidebar close button (hidden on desktop) */
.files-sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    align-items: center;
    justify-content: center;
}

.files-sidebar-close-btn:hover {
    background: #e2e8f0;
}

.files-tree-container {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.files-tree-container::-webkit-scrollbar {
    width: 5px;
}

.files-tree-container::-webkit-scrollbar-track {
    background: transparent;
}

.files-tree-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.files-tree {
    padding: 0 8px;
}

/* Resizable splitter */
.files-splitter {
    width: 5px;
    background: transparent;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s;
}

.files-splitter::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 1px;
    background: #e2e8f0;
    transition: background 0.15s, width 0.15s, left 0.15s;
}

.files-splitter:hover::after {
    left: 1px;
    width: 3px;
    background: #a5b4fc;
}

/* Right content area */
.files-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

/* Drag & drop overlay */
.files-drop-overlay {
    display: none;
    position: absolute;
    inset: 8px;
    background: rgba(102, 126, 234, 0.07);
    border: 2px dashed #667eea;
    border-radius: 12px;
    z-index: 10;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.files-drop-overlay.show {
    display: flex;
}

.files-drop-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #4338ca;
}

.files-drop-subtext {
    font-size: 0.82rem;
    color: #6366f1;
}

/* File list */
.files-list-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.files-list-header {
    display: flex;
    align-items: center;
    padding: 7px 12px 7px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    flex-shrink: 0;
    gap: 8px;
}

.files-column {
    flex-shrink: 0;
}

.files-column-name {
    flex: 1;
    min-width: 0;
}

.files-column-size {
    width: 80px;
    text-align: right;
}

.files-column-date {
    width: 130px;
    text-align: right;
}

.files-column-actions {
    width: 36px;
}

.files-list-content {
    flex: 1;
    overflow-y: auto;
}

.files-list-content::-webkit-scrollbar {
    width: 6px;
}

.files-list-content::-webkit-scrollbar-track {
    background: transparent;
}

.files-list-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

/* Status bar */
.files-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
    flex-shrink: 0;
    gap: 12px;
    min-height: 34px;
}

.files-status-left,
.files-status-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.files-storage-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.files-storage-text {
    white-space: nowrap;
    font-size: 0.74rem;
}

/* Upload zone (invisible, used for drag events) */
.files-upload-zone {
    display: none;
}

/* File list items */
.files-list-item {
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
    gap: 8px;
}

.files-list-item:last-child {
    border-bottom: none;
}

.files-list-item:hover {
    background: #f8fafc;
}

.files-list-item.selected {
    background: #eef2ff;
}

.files-list-item.drag-over {
    background: #ede9fe;
    outline: 2px dashed #7c3aed;
    outline-offset: -2px;
    border-radius: 4px;
}

.files-file-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border-radius: 6px;
}

.files-list-item.folder .files-file-icon {
    background: #fef3c7;
}

.files-list-item.file .files-file-icon {
    background: #eff6ff;
}

.files-file-name {
    flex: 1;
    font-size: 0.86rem;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 450;
    min-width: 0;
}

.files-list-item.folder .files-file-name {
    font-weight: 550;
}

.files-file-size {
    width: 80px;
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.files-file-date {
    width: 130px;
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.files-file-actions {
    width: 36px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.files-delete-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    color: #94a3b8;
    font-size: 0.85rem;
}

.files-list-item:hover .files-delete-file-btn {
    opacity: 1;
}

.files-delete-file-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Tree items */
.files-tree-item {
    display: block;
}

.files-tree-node {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 6px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s;
}

.files-tree-node:hover {
    background: #edf2f7;
}

.files-tree-node.selected {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}

.files-tree-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.6rem;
    color: #94a3b8;
    padding: 0;
    width: 16px;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.files-tree-icon {
    flex-shrink: 0;
    font-size: 0.95rem;
}

.files-tree-name {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.files-tree-children {
    padding-left: 16px;
}

/* Delete confirmation list */
.files-delete-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.85rem;
    color: #374151;
}

.files-delete-list {
    margin: 8px 0;
    max-height: 160px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
}

.files-warning-note {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 10px;
    font-weight: 500;
}

.files-delete-warning {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.files-warning-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Modal buttons */
.files-btn {
    padding: 9px 18px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.87rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.files-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.files-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.files-btn.primary:hover {
    background: linear-gradient(135deg, #5a6fd6, #6b3fa0);
}

.files-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.files-btn.secondary:hover {
    background: #e2e8f0;
}

.files-btn.danger {
    background: #dc2626;
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.files-btn.danger:hover {
    background: #b91c1c;
}

.files-btn.icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}

.files-btn.icon.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Breadcrumb navigation bar */
.files-breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e6ed;
    background: white;
}

.files-nav-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s;
}

.files-nav-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #a0aec0;
}

.files-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.files-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-left: 6px;
}

.files-breadcrumb-item {
    padding: 3px 8px;
    border-radius: 5px;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.files-breadcrumb-item:hover {
    background: #eef2ff;
}

.files-breadcrumb-item.active {
    color: #374151;
    cursor: default;
    font-weight: 600;
}

.files-breadcrumb-item.active:hover {
    background: transparent;
}

.files-breadcrumb-separator {
    color: #a0aec0;
    font-size: 13px;
}

/* Main content area (grid view - preserved) */
.files-main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.files-view {
    height: 100%;
    overflow: auto;
    padding: 16px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    min-height: 0;
}

.files-view.grid-view .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
}

.file-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.file-item.drag-over {
    border-color: #667eea;
    background: #eef2ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.files-view.grid-view .file-item {
    flex-direction: column;
    text-align: center;
    padding: 16px 12px;
}

.file-icon { font-size: 2rem; flex-shrink: 0; }
.files-view.grid-view .file-icon { font-size: 2.5rem; margin-bottom: 8px; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; color: #1e293b; font-size: 14px; margin-bottom: 2px; word-break: break-word; }
.file-meta { display: flex; gap: 12px; font-size: 12px; color: #64748b; }
.files-view.grid-view .file-meta { flex-direction: column; gap: 2px; text-align: center; }
.file-actions { opacity: 0; transition: opacity 0.2s; }
.file-item:hover .file-actions { opacity: 1; }
.file-action-btn { width: 28px; height: 28px; border: none; border-radius: 4px; background: #f7fafc; color: #4a5568; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: all 0.15s; }
.file-action-btn:hover { background: #edf2f7; }

/* Empty and loading states */
.files-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 200px;
    color: #94a3b8;
    text-align: center;
    padding: 32px;
}

.files-empty-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #64748b;
}

.files-empty-subtext {
    font-size: 0.82rem;
    color: #94a3b8;
}

.files-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 200px;
    color: #94a3b8;
}

.files-loading-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 14px;
}

.files-loading-text {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Storage bar */
.files-storage-bar {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.files-storage-percentage {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.files-storage-progress {
    width: 100px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.files-storage-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #68d391);
    transition: width 0.4s ease;
    border-radius: 3px;
}

.files-storage-progress-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.files-storage-progress-bar.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Modals */
.files-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 16px;
}

.files-modal {
    background: white;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    animation: filesModalIn 0.2s ease-out;
}

.files-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.files-modal-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 600;
}

.files-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.15s;
}

.files-modal-close:hover {
    background: #e2e8f0;
    color: #374151;
}

.files-modal-body {
    padding: 20px 24px;
}

.files-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.15s;
    box-sizing: border-box;
}

.files-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.files-input-help {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.4;
}

.files-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px 20px;
    border-top: 1px solid #e2e8f0;
}

/* Context menu */
.files-context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 5px;
    z-index: 1002;
    min-width: 170px;
    animation: filesContextIn 0.12s ease-out;
}

.files-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 0.87rem;
    color: #374151;
}

.files-context-item:hover {
    background: #f1f5f9;
}

.files-context-item.danger {
    color: #dc2626;
}

.files-context-item.danger:hover {
    background: #fef2f2;
}

.files-context-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.files-context-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Mobile sidebar backdrop */
.files-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1001;
}

/* Animations */
@keyframes filesExplorerIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

@keyframes filesModalIn {
    from { opacity: 0; transform: scale(0.94) translateY(-8px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

@keyframes filesContextIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1);    }
}

/* Keep for other modals on the page */
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0);     }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Bottom sheet on mobile */
    .files-popup-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .files-explorer {
        width: 100%;
        height: 96dvh;
        max-height: 96dvh;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        animation: filesMobileIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }

    /* Show hamburger toggle */
    .files-sidebar-toggle {
        display: flex;
    }

    /* Hide splitter on mobile */
    .files-splitter {
        display: none;
    }

    /* Sidebar becomes a slide-in drawer */
    .files-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 75vw;
        max-width: 280px;
        z-index: 1002;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
        transform: translateX(-100%);
        border-right: none;
        border-radius: 0 16px 16px 0;
    }

    .files-sidebar.open {
        transform: translateX(0);
    }

    /* Show backdrop behind drawer */
    .files-sidebar-backdrop.visible {
        display: block;
    }

    /* Show close button in sidebar header */
    .files-sidebar-close-btn {
        display: flex;
    }

    /* Breadcrumb: compact on mobile */
    .files-breadcrumb-bar {
        padding: 8px 12px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .files-breadcrumb-bar::-webkit-scrollbar {
        display: none;
    }

    .files-breadcrumb {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .files-nav-btn {
        min-width: 36px;
        min-height: 36px;
        flex-shrink: 0;
    }

    /* Toolbar: scrollable single row, no wrap */
    .files-toolbar {
        padding: 8px 12px;
        gap: 7px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .files-toolbar::-webkit-scrollbar {
        display: none;
    }

    .files-action-btn {
        padding: 8px 12px;
        font-size: 0.81rem;
        flex-shrink: 0;
    }

    /* Larger touch targets */
    .files-list-item {
        padding: 12px 12px 12px 14px;
    }

    /* Always visible delete button on mobile */
    .files-delete-file-btn {
        opacity: 1;
    }

    /* Hide date column on small screens */
    .files-file-date,
    .files-column-date {
        display: none;
    }

    /* Adjust size column */
    .files-file-size,
    .files-column-size {
        width: 65px;
    }

    /* Bigger tree nodes for finger tapping */
    .files-tree-node {
        padding: 9px 6px;
        font-size: 0.9rem;
    }

    /* Status bar simplified */
    .files-statusbar {
        padding: 5px 12px;
        font-size: 0.72rem;
        flex-wrap: wrap;
        gap: 6px;
    }

    .files-status-info {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .files-storage-progress {
        width: 70px;
    }

    /* Context menu as bottom sheet on mobile */
    .files-context-menu {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        border-radius: 16px 16px 0 0;
        padding: 8px 8px 24px;
        min-width: unset;
        width: 100%;
        box-shadow: 0 -4px 32px rgba(0,0,0,0.15);
    }

    .files-context-item {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .files-context-separator {
        margin: 6px 0;
    }
}

@keyframes filesMobileIn {
    from { transform: translateY(100%); }
    to   { transform: translateY(0);    }
}


/* Support Section Styles */
.support-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem;
}

.support-header {
    margin-bottom: 2rem;
    text-align: center;
}

.support-header h2 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.support-header p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.support-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.support-form .form-group {
    margin-bottom: 1.5rem;
}

.support-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.support-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.support-form .form-help {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    display: block;
}

.support-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.support-form .checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

#support-submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
}


/* Support Messages */
#support-message {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .support-section {
        padding: 0 1rem;
    }
    
    .support-header h2 {
        font-size: 1.5rem;
    }
    
    .support-form-container {
        padding: 1.5rem;
    }
}

/* Statistics Section Styles */
.stats-section {
    max-width: none;
    margin: 0;
    padding: 2rem;
}

.stats-header {
    margin-bottom: 2rem;
    text-align: center;
}

.stats-header h2 {
    color: var(--color-text);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stats-header p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* stats-cards: inner grid used by statistiques.html */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

/* chart-wrapper: ensure canvas is responsive */
.chart-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.stats-card h3 {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stats-label {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.stats-chart-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.stats-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 1rem;
}

.stats-chart-title {
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.stats-chart-period {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.stats-chart-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
}

.stats-chart-canvas {
    max-height: 100%;
}

/* Statistics: no domain reserved alert */
.stats-no-domain {
    display: none;
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #fff3cd, #ffe8a1);
    border: 2px solid #f0ad4e;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    animation: banner-pulse 2s ease-in-out infinite;
}

.stats-no-domain:hover {
    background: linear-gradient(135deg, #ffe8a1, #ffd966);
    animation: none;
    box-shadow: 0 4px 20px rgba(240, 173, 78, 0.35);
    transform: translateY(-2px);
}

.stats-no-domain-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.stats-no-domain h3 {
    color: #856404;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-style: normal;
}

.stats-no-domain p {
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.stats-no-domain-cta {
    display: inline-block;
    color: #664d03;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.stats-no-domain:hover .stats-no-domain-cta {
    background: rgba(255, 255, 255, 0.8);
}

.stats-no-data {
    display: none;
    text-align: center;
    color: var(--color-text-secondary);
    font-style: italic;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stats-no-data.show {
    display: block;
}

.stats-no-data-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.stats-error {
    text-align: center;
    color: #dc3545;
    padding: 2rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 1rem 0;
}

.stats-loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-secondary);
}

.stats-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}


@media (max-width: 768px) {
    .stats-section {
        padding: 1rem;
    }
    
    .stats-header h2 {
        font-size: 1.5rem;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }

    .stats-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-value {
        font-size: 1.5rem;
    }
    
    .stats-chart-container {
        padding: 1rem;
    }
    
    .stats-chart-wrapper {
        height: 300px;
    }
    
    .stats-chart-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Domain Selection Section Styles */

/* Override dashboard-main constraints when it contains the domain chat */
.dashboard-main:has(.domain-selection-section) {
    max-width: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: calc(100vh - 90px);
}

.domain-selection-section {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.domain-selection-header {
    margin-bottom: 3rem;
    text-align: center;
}

.domain-selection-header h2 {
    color: var(--color-text);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.domain-selection-header p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.domain-selection-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Main layout: chat on the left, suggestions on the right */
.domain-main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Domain Chat Interface */
.domain-chat-interface {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.domain-chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-shrink: 0;
}

.domain-chat-avatar {
    flex-shrink: 0;
}

.domain-chat-avatar img {
    border-radius: 50%;
    background: white;
    padding: 4px;
}

.domain-chat-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.domain-chat-info p {
    margin: 0;
    opacity: 0.93;
    font-size: 0.95rem;
    line-height: 1.5;
}

.domain-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--color-bg-light);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.domain-chat-message {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 100%;
    animation: slideInUp 0.3s ease-out;
}

.domain-chat-message.user-message {
    flex-direction: row-reverse;
}

.domain-chat-message.assistant-message {
    align-self: flex-start;
}

.domain-chat-message .message-avatar {
    display: none;
}

.message-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.message-avatar img {
    width: 26px;
    height: 26px;
}

.message-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    word-wrap: break-word;
    line-height: 1.55;
}

.domain-chat-message .message-content {
    width: 100%;
    max-width: 100%;
}

.user-message .message-content {
    background: var(--gradient-primary);
    color: white;
}

.message-content p {
    margin: 0 0 0.75rem 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin-bottom: 0.25rem;
}

.domain-suggestions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    max-width: 100%;
}

.domain-suggestion {
    background: var(--gradient-light);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.domain-suggestion:hover {
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.2);
}

.domain-suggestion.selected {
    border-color: var(--color-secondary);
    background: var(--gradient-primary);
    color: white;
}

.domain-suggestion-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.domain-suggestion-price {
    font-size: 0.9rem;
    opacity: 0.8;
}

.domain-chat-input-section {
    border-top: 1px solid var(--color-border);
    padding: 0.85rem 1rem;
    background: white;
    flex-shrink: 0;
}

.domain-chat-input-container {
    display: flex;
    gap: 0.6rem;
    align-items: flex-end;
}

#domain-chat-input {
    flex: 1;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    resize: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    line-height: 1.4;
}

#domain-chat-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.domain-chat-send-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.domain-chat-send-btn:enabled:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.domain-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.domain-chat-help {
    margin-top: 0.5rem;
    text-align: center;
}

.domain-chat-help small {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

/* Inline domain suggestion button styles */
.domain-suggestion-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.domain-suggestion-btn:hover {
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #4a44c4 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(108, 99, 255, 0.3);
}

.domain-suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(108, 99, 255, 0.2);
}

.domain-suggestion-btn:disabled,
.domain-suggestion-btn.unavailable {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* More specific selectors beat the :hover rule without needing !important */
.domain-suggestion-btn:disabled:hover,
.domain-suggestion-btn.unavailable:hover {
    transform: none;
    box-shadow: none;
    background: #6c757d;
}

/* Domain suggestions area */
.domain-suggestions-panel {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    animation: slideIn 0.3s ease-out;
    flex: 0 0 350px;
    max-height: 600px;
    overflow-y: auto;
}

.suggestions-header {
    margin-bottom: 1rem;
    text-align: center;
}

.suggestions-header h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.suggestions-header small {
    color: #6c757d;
    font-size: 0.9rem;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.domain-suggestion-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.domain-suggestion-item:hover {
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.2);
}

.domain-suggestion-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(108, 99, 255, 0.15);
}

.domain-suggestion-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.domain-suggestion-reason {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Domain confirmation popup */
.domain-confirmation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* .popup-content (choisir-domaine.html - domain confirmation popup, 500px max-width, overrides above) */
.popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: popupSlideInSubtle 0.3s ease-out;
}

@keyframes popupSlideInSubtle {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--color-text);
}

.popup-body {
    padding: 1.5rem;
    text-align: center;
}

.popup-body p {
    margin: 0 0 1rem 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.domain-to-validate {
    background: var(--gradient-light);
    border: 2px solid var(--color-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}

.warning-message {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #f0c040;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-message p {
    margin: 0.5rem 0;
    color: #856404;
}

.popup-actions {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.popup-btn {
    flex: 1;
    max-width: 150px;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-btn.cancel {
    background: var(--gradient-light);
    color: var(--color-text-secondary);
    border: 2px solid #dee2e6;
}

.popup-btn.cancel:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.popup-btn.validate {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #5a54d6 100%);
    color: white;
    border: 2px solid var(--color-secondary);
}

.popup-btn.validate:hover {
    background: linear-gradient(135deg, #5a54d6 0%, #4c46c4 100%);
    border-color: #5a54d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}


/* Payment Popup Styles */
.payment-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-content {
    max-width: 500px;
    width: 90%;
}

.payment-info {
    margin-bottom: 1.5rem;
}

.domain-to-pay {
    background: var(--gradient-light);
    border: 2px solid var(--color-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #2d3748;
    font-family: 'Courier New', monospace;
}

.price-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4e7d4 100%);
    border: 1px solid #4ade80;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.price-label {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
    font-size: 0.9rem;
}

.price-amount {
    margin: 0;
    color: #22543d;
    font-size: 1.5rem;
    font-weight: 700;
}

#stripe-payment-element {
    margin: 1.5rem 0;
    min-height: 60px;
}

.payment-loading {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

.payment-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid var(--color-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}


.payment-loading p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Payment Page Styles */
.payment-main {
    min-height: calc(100vh - 80px);
    background: var(--gradient-light);
    padding: 2rem 0;
}

.payment-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 0 2rem;
}

.payment-left {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: fit-content;
}

.payment-right {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pricing-summary h2 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    text-align: center;
}

.order-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.order-summary h3 {
    margin-bottom: 1rem;
    color: #2d3748;
    font-size: 1.2rem;
}

.domain-info p {
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
}

.domain-display {
    background: var(--gradient-light);
    border: 2px solid var(--color-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #2d3748;
    font-family: 'Courier New', monospace;
}

.price-breakdown {
    margin: 1.5rem 0;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.price-line.total {
    border-bottom: 2px solid var(--color-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3748;
    margin-top: 1rem;
    padding-top: 1rem;
}

.billing-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #4ade80;
}

.billing-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #22543d;
}

.payment-form {
    margin-bottom: 2rem;
}

.payment-form h3 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.2rem;
}

#stripe-payment-element {
    margin: 1.5rem 0;
    min-height: 60px;
}

.payment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.payment-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-btn.cancel {
    background: #f8f9fa;
    color: var(--color-text-secondary);
    border: 2px solid #dee2e6;
}

.payment-btn.cancel:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.payment-btn.primary {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #5a54d6 100%);
    color: white;
    border: 2px solid var(--color-secondary);
}

.payment-btn.primary:hover {
    background: linear-gradient(135deg, #5a54d6 0%, #4c46c4 100%);
    border-color: #5a54d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.payment-btn:disabled,
.payment-btn:disabled:hover {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.security-info {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.security-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Responsive design for payment page */
@media (max-width: 768px) {
    .payment-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .payment-actions {
        flex-direction: column;
    }
}

/* Domain Reservation Status */
.domain-reservation-status {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid #28a745;
}

.reservation-success {
    margin-bottom: 2rem;
}

.reservation-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.reservation-details h3 {
    color: #155724;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.reserved-domain-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #155724;
    margin-bottom: 0.5rem;
}

.reservation-info {
    color: #155724;
    font-size: 1rem;
    opacity: 0.9;
}

.reservation-actions {
    display: flex;
    justify-content: center;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: 1rem;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typingPulse 1.4s ease-in-out infinite both;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingPulse {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.domain-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.domain-btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 180px;
}

.domain-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.domain-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.domain-btn.secondary {
    background: white;
    color: var(--color-text-secondary);
    border: 2px solid #e1e5e9;
}

.domain-btn.secondary:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-2px);
}

.domain-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Domain Messages */
#domain-message {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Responsive Design — Domain chat */
@media (max-width: 768px) {
    .dashboard-main:has(.domain-selection-section) {
        height: calc(100dvh - 50px);
    }

    .domain-selection-section {
        padding: 0;
        max-width: none;
    }

    .domain-selection-header h2 {
        font-size: 1.6rem;
    }

    .domain-selection-container {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        flex: 1;
        min-height: 0;
    }

    /* Mobile layout: suggestions below chat */
    .domain-main-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .domain-chat-interface {
        min-width: 0;
        border-radius: 0;
    }

    .domain-suggestions-panel {
        flex: none;
        max-height: 300px;
    }

    .domain-chat-header {
        padding: 0.85rem 1rem;
    }

    .domain-chat-info h3 {
        font-size: 1rem;
    }

    .domain-chat-info p {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .domain-chat-messages {
        flex: 1;
        padding: 0.85rem;
        min-height: 0;
    }

    .domain-chat-message {
        max-width: 100%;
        width: 100%;
    }

    .domain-suggestions {
        grid-template-columns: 1fr;
    }

    .domain-chat-input-container {
        flex-direction: row;
        align-items: flex-end;
    }

    .domain-chat-send-btn {
        width: 46px;
        height: 42px;
    }

    .domain-chat-input-section {
        padding: 0.65rem 0.75rem;
    }

    .reservation-actions {
        flex-direction: column;
        align-items: center;
    }

    .domain-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Legal Pages (cgu.html, confidentialite.html) */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.legal-content h1 {
    color: var(--color-text);
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.legal-content h2 {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content p, .legal-content li {
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* =============================================
   MOBILE RESPONSIVENESS FIXES
   Additional responsive rules (768px breakpoint)
   ============================================= */

@media (max-width: 768px) {
    /* File manager sidebar hidden on mobile */
    .files-sidebar {
        display: none;
    }

    .files-splitter {
        display: none;
    }

    .files-column-size,
    .files-file-size {
        display: none;
    }

    .files-column-date,
    .files-file-date {
        display: none;
    }

    /* History popup mobile layout */
    .history-popup {
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
        width: 100%;
    }

    .history-header {
        padding: 1rem;
    }

    .history-header h3 {
        font-size: 1.2rem;
    }

    .history-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        padding: 0.75rem 1rem;
    }

    .history-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Chatbot fullscreen true fullscreen on mobile (only when NOT in tab mode) */
    .chatbot-container.fullscreen:not(.mobile-tab-mode) {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .chatbot-container.fullscreen:not(.mobile-tab-mode) .chatbot-messages {
        max-height: calc(100vh - 120px);
    }

    /* Legal pages padding */
    .legal-content {
        padding: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        border-radius: 0;
    }

    .legal-content h1 {
        font-size: 1.5rem;
    }

    /* Documentation inline image styles override */
    .screenshot-placeholder img,
    .documentation-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Documentation sub-step inline flex override */
    .sub-step {
        margin-left: 0 !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center;
    }

    /* Payment page pricing card */
    .pricing-card {
        max-width: 100%;
    }

    /* Checkbox touch target */
    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        cursor: pointer;
    }

    /* Dashboard welcome heading */
    .dashboard-welcome h1 {
        font-size: 1.75rem;
    }
}

/* =============================================
   MOBILE TAB BAR — Chat / Site toggle (mon-site.html)
   Hidden on desktop, shown on mobile <=768px
   ============================================= */

/* Hidden by default (desktop) */
.mobile-tab-bar {
    display: none;
}

@media (max-width: 768px) {
    /* Tab bar fixed at bottom */
    .mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: var(--color-surface, #fff);
        border-top: 1px solid var(--color-border, #e2e8f0);
        z-index: 1001;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }

    .mobile-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--color-text-secondary, #64748b);
        font-size: 0.7rem;
        font-weight: 500;
        cursor: pointer;
        position: relative;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-tab svg {
        transition: transform 0.2s ease;
    }

    .mobile-tab.active {
        color: var(--color-primary, #667eea);
    }

    .mobile-tab.active svg {
        transform: scale(1.1);
    }

    /* Notification badge on Chat tab */
    .mobile-tab-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 22px);
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        background: #ef4444;
        color: #fff;
        font-size: 0.65rem;
        font-weight: 700;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes badgePop {
        0% { transform: scale(0); }
        100% { transform: scale(1); }
    }

    /* Make room for the tab bar at the bottom */
    .site-management {
        height: calc(100vh - 56px - 56px); /* compact header + tab bar */
        padding-bottom: 0;
    }

    /* === MOBILE TAB MODE: chatbot layout overrides === */

    /* When mobile-tab-mode is active, chatbot is no longer a fixed overlay.
       It becomes a full-height panel that fills the main area. */
    .chatbot-container.mobile-tab-mode {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        /* No bottom/height — JS sets the height explicitly */
        width: 100vw;
        border-radius: 0;
        z-index: 998; /* below tab bar */
        box-shadow: none;
        transition: none;
        overflow: hidden;
    }

    .chatbot-container.mobile-tab-mode .chatbot-messages {
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }

    /* Hide chatbot header controls (minimize/fullscreen) in tab mode — 
       the tab bar replaces them */
    .chatbot-container.mobile-tab-mode .chatbot-controls {
        display: none;
    }

    /* When "site" tab is active, hide chatbot */
    .chatbot-container.mobile-tab-hidden {
        display: none !important;
    }

    /* When "chat" or "tools" tab is active, hide the main content area */
    .site-management.mobile-tab-hidden {
        display: none !important;
    }

    /* Also hide the dashboard header when chat is active for more space */
    .dashboard-header.mobile-tab-chat-active {
        display: none;
    }

    /* Adjust chatbot position when header is hidden — no-op now,
       JS handles the height via visualViewport */
    .chatbot-container.mobile-tab-mode.mobile-tab-no-header {
        top: 0;
    }

    /* === MOBILE TAB: Site tab — hide toolbar, iframe fills screen === */
    .site-management.mobile-tab-site-active .buttons-row {
        display: none !important;
    }

    /* Remove all padding from dashboard-main in site-active tab */
    .dashboard-main.mobile-tab-site-active {
        padding: 0;
        max-width: none;
    }

    /* Site management fills viewport minus header and tab bar */
    .site-management.mobile-tab-site-active {
        padding: 0;
        gap: 0;
        margin: 0;
        height: calc(100vh - 56px - 56px);
        height: calc(100dvh - 56px - 56px); /* dynamic viewport for mobile browsers */
    }

    /* Site preview fills edge-to-edge with no decorations */
    .site-management.mobile-tab-site-active .site-preview {
        border-radius: 0;
        box-shadow: none;
    }

    .site-management.mobile-tab-site-active .site-preview-chrome {
        border-radius: 0;
    }

    /* === MOBILE TAB: Tools tab — buttons panel fills screen, no iframe === */
    .site-management.mobile-tab-tools-active .site-preview {
        display: none !important;
    }

    .site-management.mobile-tab-tools-active {
        justify-content: flex-start;
        padding: 1rem;
        gap: 1rem;
        overflow-y: auto;
    }

    /* In tools tab, buttons are full-width stacked */
    .site-management.mobile-tab-tools-active .buttons-row {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .site-management.mobile-tab-tools-active .buttons-row .site-btn {
        flex: none;
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        justify-content: flex-start;
        border-radius: 12px;
    }

    .chrome-dots {
        display: none;
    }

    .chrome-title-full {
        display: none;
    }

    .chrome-title-short {
        display: inline;
    }

    .chrome-title {
        position: static;
        transform: none;
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
        padding: 4px 0;
    }

    .site-preview-chrome {
        flex-wrap: wrap;
        padding: 0;
    }

    .chrome-alert-static {
        display: none;
    }

    .site-preview-chrome .chrome-alert {
        order: -1;
        width: 100%;
        margin-left: 0;
        overflow: hidden;
        font-size: 0.75rem;
        white-space: nowrap;
        background: #fff5f5;
        border-bottom: 1px solid #f5c6cb;
        padding: 3px 10px;
        line-height: 18px;
    }

    .chrome-alert-scroll {
        display: inline-block;
        animation: scroll-alert 18s linear infinite;
    }

    @keyframes scroll-alert {
        0% { transform: translateX(0%); }
        100% { transform: translateX(-50%); }
    }
}

/* =============================================
   480px BREAKPOINT — very small phones
   ============================================= */

@media (max-width: 480px) {
    /* Stats cards single column */
    .stats-cards {
        grid-template-columns: 1fr;
    }

    /* Chatbot size on small phones (only when NOT in tab mode) */
    .chatbot-container:not(.mobile-tab-mode) {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    /* Form action buttons stack */
    .form-actions {
        flex-direction: column;
    }

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

    /* Intro slides font sizes for very small screens */
    .pricing-card .no-commitment-ribbon {
        font-size: 0.7rem;
        padding: 6px 35px;
        top: 35px;
        left: -55px;
    }

    /* Hero content font */
    .hero-content h2 {
        font-size: 1.6rem;
    }

    /* Price badge smaller */
    .price {
        font-size: 1.6rem;
        padding: 0.8rem 1.2rem;
    }

    /* Section headings smaller */
    .service-details h2,
    .ai-demo h2,
    .pricing h2,
    .contact h2,
    .contact-cta-section h2,
    .contact-info h2 {
        font-size: 1.4rem;
    }

    /* Domain selection container */
    .domain-selection-container {
        min-height: auto;
    }
}

/* ============================================================
   PWA INSTALL BANNER
   Mobile-only install prompt for Add to Home Screen
   ============================================================ */

.pwa-install-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-width: 360px;
    width: calc(100% - 32px);
}

.pwa-install-banner--visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Only show on mobile */
@media (max-width: 768px) {
    .pwa-install-banner {
        display: flex;
    }

    /* Banner at top — no interaction with mobile tab bar needed */
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: cover;
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-install-text strong {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.3;
}

.pwa-install-text span {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.3;
}

.pwa-install-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}

.pwa-install-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

.pwa-install-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--color-text-light);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.pwa-install-close:active {
    background: var(--color-bg-medium);
}

/* ============================================================
   PUSH NOTIFICATION OPT-IN BANNER
   Mobile-only prompt asking users to enable push notifications.
   Shown on authenticated pages (mon-site, mon-compte) when
   permission has not yet been granted or denied.
   ============================================================ */

.push-optin-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-width: 360px;
    width: calc(100% - 32px);
}

.push-optin-banner--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Only show on mobile */
@media (max-width: 768px) {
    .push-optin-banner {
        display: flex;
    }
}

.push-optin-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 10px;
    color: #fff;
}

.push-optin-icon svg {
    width: 22px;
    height: 22px;
}

.push-optin-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.push-optin-text strong {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.3;
}

.push-optin-text span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.3;
}

.push-optin-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}

.push-optin-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

.push-optin-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.push-optin-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-light);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.push-optin-close:active {
    background: var(--color-bg-medium);
}

/* Offre Popup (mon-site.html) */
.offre-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.offre-popup-inner {
    position: relative;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.offre-popup-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.offre-popup-close:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.5);
}

/* "Notre Offre" nav button — highlighted in purple gradient */
.offre-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.3);
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.offre-nav-btn:hover {
    color: white !important;
    background: linear-gradient(135deg, #5a6fd6 0%, #6a3d9a 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.45) !important;
}

.offre-popup-inner .price-detail {
    margin-bottom: 1rem;
}

.offre-publish-notice {
    margin-top: 1.5rem;
    background: #fff8e1;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    text-align: left;
}

.offre-publish-notice strong {
    display: block;
    color: #b45309;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.offre-publish-notice p {
    color: #78350f;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.offre-no-commitment {
    font-style: italic;
    font-weight: 600;
    color: #059669 !important;
    margin-bottom: 1rem !important;
}

.offre-subscribe-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.offre-subscribe-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Logo button (mon-site.html — acts like Accueil nav item) */
.logo-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Accueil section inside dashboard — needs full viewport width like the index page */
.accueil-section {
    width: 100%;
    overflow-y: auto;
}

/* When accueil is active, remove dashboard-main constraints so content fills full width */
body.accueil-active .dashboard-main {
    max-width: none;
    padding: 0;
}
