:root {
    --bg-dark: #0a0e17;
    --bg-lighter: #111827;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background effects (Linear/Stripe style) */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.blob-1 {
    top: -20vh;
    left: -10vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.15) 0%, rgba(10, 14, 23, 0) 70%);
}

.blob-2 {
    bottom: -10vh;
    right: -10vw;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(10, 14, 23, 0) 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar & Animations de la barre */
@keyframes navSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
    transition: all 0.3s ease;
    animation: navSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo {
    height: 56px;
    width: auto;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 6px 10px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.logo-group:hover .logo {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.logo-group:hover .logo-text {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--accent-primary);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 var(--accent-glow);
}

@keyframes btnShine {
    0% {
        left: -100px;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100px;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: btnShine 4s infinite linear;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-card);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* Menu Mobile */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    padding: 24px;
    border-bottom: 1px solid var(--border-card);
    z-index: 99;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    padding: 16px 0;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-card);
}

.mobile-btn {
    margin-top: 24px;
    text-align: center;
}

/* HERO */
.hero {
    padding-top: 160px;
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@keyframes floatBadge {

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

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

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-muted);
    animation: floatBadge 4s ease-in-out infinite;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

@keyframes shineGradient {
    0% {
        background-position: 0% 50%;
    }

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

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

.text-gradient {
    background: linear-gradient(270deg, #ffffff, #3b82f6, #60a5fa, #ffffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineGradient 5s ease infinite;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 25% center;
    display: block;
    aspect-ratio: 4/5;
    transition: transform 0.5s ease;
}

.hero-glass:hover .hero-img {
    transform: scale(1.02);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-darker {
    background-color: var(--bg-lighter);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Actions Menées (Cards) */
.grid {
    display: grid;
    gap: 32px;
}

.actions-grid {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-img-wrapper {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 24px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Chronologie (Timeline) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--border-card);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 15px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.timeline-text {
    color: var(--text-muted);
}

/* Projet PAES-CMZ */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge-accent {
    color: var(--accent-primary);
    border-color: var(--accent-glow);
    background: rgba(59, 130, 246, 0.1);
}

.project-intro {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.project-details {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 24px;
}

.detail-block {
    margin-bottom: 24px;
}

.detail-block:last-child {
    margin-bottom: 0;
}

.detail-title {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.detail-paragraph {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.detail-list {
    list-style-type: none;
    padding-left: 0;
}

.detail-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.detail-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.detail-list li strong {
    color: var(--text-main);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    min-height: 400px;
    background: #0a0e17;
}

/* Styles pour la carte Leaflet (Mode sombre FANGE) */
.leaflet-container {
    background: #0a0e17 !important;
    font-family: var(--font-sans);
}

.animated-pin {
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-glow);
    animation: pulsePin 1.5s infinite;
}

@keyframes pulsePin {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }

    100% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Galerie */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.03);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Donations (Stripe Block) */
.donation-container {
    max-width: 800px;
}

.donation-card {
    border-radius: 24px;
    padding: 48px;
    text-align: center;
}

.donation-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.donation-content p {
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.donation-stripe-block {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: left;
    color: #111827;
}

.stripe-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: #635bff;
    font-weight: 600;
    font-size: 0.95rem;
}

.stripe-icon {
    width: 24px;
    height: 24px;
}

.donation-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.amount-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.amount-btn:hover {
    background: #e5e7eb;
}

.amount-btn.active {
    background: rgba(99, 91, 255, 0.1);
    border-color: #635bff;
    color: #635bff;
}

.btn-block {
    display: flex;
    width: 100%;
    margin-top: 16px;
}

.btn-donate {
    background: #635bff;
    box-shadow: 0 2px 5px rgba(99, 91, 255, 0.3);
    font-size: 1.1rem;
    padding: 14px;
}

.btn-donate:hover {
    background: #5247da;
    box-shadow: 0 4px 10px rgba(99, 91, 255, 0.4);
}

.arrow {
    margin-left: 8px;
    transition: transform 0.2s;
}

.btn-donate:hover .arrow {
    transform: translateX(4px);
}

/* Mot du Président */
.president-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 60px;
    align-items: center;
}

.president-img-wrapper {
    position: relative;
    border-radius: 24px;
    padding: 20px;
}

.blob-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 24px;
    filter: blur(40px);
    opacity: 0.2;
    z-index: -1;
}

.president-img {
    width: 100%;
    border-radius: 16px;
    display: block;
    aspect-ratio: 4/5;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.quote-icon {
    font-family: serif;
    font-size: 8rem;
    line-height: 0;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
    margin-top: 32px;
}

.president-text {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.7;
    font-style: italic;
    font-weight: 300;
}

.president-signature {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
}

.president-signature strong {
    font-size: 1.2rem;
}

.president-signature span {
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-card);
    padding: 80px 0 40px 0;
    background: #060910;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 24px;
}

.footer-desc {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-heading {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.footer-social a {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer-social a svg {
    width: 20px;
    height: 20px;
}

.footer-social a:hover {
    color: white;
    background: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-card);
    padding-top: 32px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--text-main);
}

/* Media Queries (Responsive) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-container,
    .project-grid,
    .president-grid {
        gap: 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section {
        padding: 60px 0;
    }

    .hero-description {
        margin: 0 auto 40px auto;
    }

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

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .president-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 11px;
    }

    .timeline-dot {
        left: 6px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-desc {
        max-width: 100%;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
        margin-top: 16px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .donation-card {
        padding: 32px 24px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   MAGIC ANIMATOR (Effets d'apparition au scroll augmentés)
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animations Spécifiques */
.reveal.zoom-in {
    opacity: 0;
    transform: scale(0.65);
}

.reveal.zoom-in.active {
    opacity: 1;
    transform: scale(1);
}

.reveal.fade-right {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.fade-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal.fade-left {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.fade-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Délais de cascade pour un effet fluide et marqué */
.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.35s;
}

.delay-3 {
    transition-delay: 0.55s;
}

.delay-4 {
    transition-delay: 0.75s;
}

.delay-5 {
    transition-delay: 0.95s;
}

/* =========================================================================
   CHATBOT WIDGET
   ========================================================================= */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-family: var(--font-sans);
}

.chatbot-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes tooltipBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

@keyframes tooltipAppear {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.chatbot-tooltip {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 210px;
    background: white;
    color: #111827;
    padding: 10px 14px;
    border-radius: 12px;
    border-bottom-right-radius: 4px;
    /* Tooltip tail effect */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    line-height: 1.3;
    animation: tooltipAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1s backwards, tooltipBounce 3s infinite 1.5s;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.chatbot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.chatbot-tooltip-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}

.chatbot-tooltip-close:hover {
    color: #374151;
}

.tooltip-content strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 4px;
}

/* Animations pulse for toggle */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.chatbot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--accent-primary);
    padding: 3px;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulseGlow 2.5s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-hover);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 480px;
    background: var(--bg-lighter);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

.chatbot-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-card);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}

.chatbot-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chatbot-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.chatbot-close:hover {
    color: white;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: messageReveal 0.3s ease-out forwards;
}

@keyframes messageReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: var(--bg-card);
    color: var(--text-main);
    align-self: flex-start;
    border: 1px solid var(--border-card);
    border-bottom-left-radius: 2px;
}

.user-message {
    background: var(--accent-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.chat-suggestion-btn {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    align-self: flex-start;
}

.chat-suggestion-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.chatbot-input-area {
    padding: 16px;
    border-top: 1px solid var(--border-card);
    display: flex;
    gap: 12px;
    background: var(--bg-dark);
}

.chatbot-input {
    flex: 1;
    background: var(--bg-lighter);
    border: 1px solid var(--border-card);
    padding: 10px 16px;
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

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

.chatbot-send {
    background: var(--accent-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
}

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

@media (max-width: 480px) {
    .chatbot-window {
        width: 300px;
        right: -10px;
    }
}