/* =========================================
   COMPONENTS CSS
   Buttons, Cards, Chatbot, Lightsbox, Modals
   ========================================= */

/* --- Buttons --- */
.btn-primary {
    background: var(--primary-soft);
    color: var(--white);
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(171, 115, 124, 0.4);
    border: 2px solid var(--primary-soft);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-soft);
    border-color: var(--primary-soft);
    transform: translateY(-5px);
}

.btn-secondary {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    border: 2px solid var(--primary-soft);
    color: var(--primary-soft);
    border-radius: 25px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: var(--primary-soft);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(171, 115, 124, 0.3);
}

.btn-text {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 2px;
}

.btn-text:hover {
    color: var(--text-dark);
    border-color: var(--text-dark);
}

/* --- Section Title --- */
.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
    color: var(--primary-soft);
}

.section-title::after {
    content: '✻';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--primary-soft);
    background: var(--bg-body);
    padding: 0 10px;
    z-index: 1;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: #e0d0d0;
    z-index: 0;
}

/* Remove decoration for dark sections */
#livre-or .section-title::after,
#livre-or .section-title::before {
    display: none;
}

/* --- Alert Box --- */
.alert-box {
    background: var(--bg-white);
    border: 1px solid var(--primary-light);
    border-left: 5px solid var(--primary);
    padding: 20px;
    color: var(--text-dark);
    margin-top: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-box i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* --- Service Card (Glassmorphism) --- */
.service-card {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 35px 25px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(171, 115, 124, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(171, 115, 124, 0.1) 0%, transparent 70%);
    transform: scale(0.8);
    transition: 0.5s;
    opacity: 0;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 1;
    transform: scale(1.2);
}

.service-card * {
    position: relative;
    z-index: 2;
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--bg-body);
    color: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    transition: 0.3s;
}

.service-card:hover .icon-wrapper {
    background: var(--primary-soft);
    color: var(--white);
    transform: rotate(10deg);
}

/* --- Info Box --- */
.info-box {
    background: var(--bg-white);
    padding: 40px;
    border: none;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-soft);
}

.info-box h4 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: var(--text-dark);
}

/* --- Chatbot --- */
.chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 30px;
    outline: none;
    border: none;
    height: 60px;
    width: 60px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(171, 115, 124, 0.4);
}

.chatbot-toggler:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 25px rgba(171, 115, 124, 0.5);
}

.chatbot-toggler span {
    color: #fff;
    position: absolute;
    font-size: 1.5rem;
}

.chatbot-toggler span:last-child,
body.show-chatbot .chatbot-toggler span:first-child {
    opacity: 0;
    transform: rotate(90deg);
    transition: all 0.3s ease;
}

body.show-chatbot .chatbot-toggler span:last-child {
    opacity: 1;
    transform: rotate(0);
}

.chatbot {
    position: fixed;
    right: 35px;
    bottom: 100px;
    width: 380px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(171, 115, 124, 0.1);
}

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

.chatbot header {
    padding: 20px 0;
    position: relative;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #d49ba4);
}

.chatbox {
    overflow-y: auto;
    height: 420px;
    padding: 30px 20px 100px;
    background-color: #fafafa;
}

.chatbox .chat {
    display: flex;
    list-style: none;
    margin-bottom: 20px;
}

.chatbox .outgoing {
    margin: 20px 0;
    justify-content: flex-end;
}

.chatbox .incoming span {
    width: 35px;
    height: 35px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #d49ba4);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    align-self: flex-end;
    margin: 0 10px 7px 0;
    box-shadow: 0 2px 5px rgba(171, 115, 124, 0.2);
}

.chatbox .chat p {
    white-space: normal;
    padding: 12px 18px;
    border-radius: 18px 18px 0 18px;
    max-width: 90%;
    color: #fff;
    font-size: 0.95rem;
    background: var(--primary);
    box-shadow: 0 2px 5px rgba(171, 115, 124, 0.15);
}

.chatbox .incoming p {
    border-radius: 18px 18px 18px 0;
    color: #4a4a4a;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-input {
    display: flex;
    gap: 10px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-input textarea {
    height: 50px;
    width: 100%;
    border: 1px solid #eee;
    background: #f8f8f8;
    border-radius: 25px;
    outline: none;
    resize: none;
    padding: 14px 20px;
    font-size: 0.95rem;
}

.chat-input span {
    align-self: flex-end;
    color: var(--primary);
    cursor: pointer;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    font-size: 1.2rem;
    background: rgba(171, 115, 124, 0.1);
    border-radius: 50%;
}

.chat-input textarea:valid~span {
    visibility: visible;
}

.chatbot-btn {
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    margin-right: 5px;
    margin-bottom: 5px;
}

.chatbot-btn:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 490px) {
    .chatbot {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .chatbot .chatbox {
        height: 90%;
    }
}

/* --- Interactive FAB --- */
.fab-booking {
    position: fixed;
    bottom: 110px;
    right: 30px;
    background: var(--primary-soft);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(171, 115, 124, 0.5);
    cursor: pointer;
    z-index: 999;
    animation: pulse 2s infinite;
}

.fab-booking:hover {
    transform: scale(1.1);
}

.fab-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    pointer-events: none;
}

.fab-booking:hover .fab-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(171, 115, 124, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(171, 115, 124, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(171, 115, 124, 0);
    }
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background: #fffafa;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: zoomUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 12px;
    font-family: inherit;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2200;
    justify-content: center;
    align-items: center;
}

.lightbox-content img,
.lightbox-content video {
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
    pointer-events: auto;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 9999;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-soft);
}

/* --- Spacing Fix for Service Cards --- */
.service-card h3 {
    margin-bottom: 30px;
    /* Force gap between title and text */
}

.service-card p {
    margin-bottom: 30px;
    /* Space before button */
    line-height: 1.6;
}

/* --- Custom Header for Mes Réels (Image 2 Style) --- */
.reels-title-custom {
    text-align: center;
    font-size: 3.5rem;
    color: #A85A66;
    /* Mauve/Terracotta */
    margin-bottom: 60px;
    position: relative;
    font-family: var(--font-heading);
    z-index: 1;
}

/* The Line and Box Frame for Flower */
.reels-title-custom::after {
    content: '';
    position: absolute;
    bottom: -15px;
    /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: #d3c0c0;
    z-index: 0;
}

/* The Flower Box */
.reels-title-icon-box {
    position: absolute;
    bottom: -30px;
    /* Centers it on the line approximately */
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 35px;
    background: #fdf6f0;
    /* Beige/Cream background matching page */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    font-size: 1.5rem;
    color: #8e4d57;
}

/* The Circle Behind - REMOVED as requested */
/* .reels-title-custom::before { content: none; } */

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 10000;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideUp 0.5s ease-out;
}

.cookie-banner.hidden {
    display: none !important;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
    transition: 0.3s;
}

.cookie-text a:hover {
    color: var(--primary-soft);
}

.cookie-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s;
}

.cookie-btn:hover {
    background: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(171, 115, 124, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

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

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        padding: 25px 20px;
    }

    .cookie-btn {
        width: 100%;
    }
}