/* Chat bubbles */
.chat-bubble {
    display: inline-block;
    max-width: 70%;
    padding: 14px 20px 28px 20px;
    border-radius: 18px;
    margin: 24px 0 12px 0;
    position: relative;
    word-break: break-word;
    font-size: 1em;
}
.chat-bubble.sent {
    background: #d2f8c6;
    color: #222;
    margin-left: auto;
    text-align: left;
    box-shadow: 0 1px 2px #0001;
}
.chat-bubble.received {
    background: #fff;
    color: #222;
    margin-right: auto;
    text-align: left;
    box-shadow: 0 1px 2px #0001;
}
.chat-bubble .chat-time {
    display: inline;
    font-size: 0.9em;
    color: #888;
    margin-left: 8px;
}
.chat-bubble .chat-check {
    font-size: 1em;
    font-weight: bold;
    color: #34b7f1;
    opacity: 0.85;
    margin-left: 2px;
}
.chat-bubble .chat-check.unread {
    color: #888;
    opacity: 0.7;
}
/* Style pour le bouton Démo */
.demo-btn {
    background: #43a047;
    color: #fff !important;
    border-radius: 5px;
    padding: 0.2em 1em;
    margin-left: 1em;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.demo-btn:hover {
    background: #388e3c;
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #ece5dd;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #4E342E;
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(90deg, #4E342E 0%, #37474F 100%); /* Gradient header */
    color: #D7CCC8;
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    transition: transform 0.3s ease;
}

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

.header-left {
    display: flex;
    align-items: center;
    width: auto;
}

nav {
    display: flex;
    align-items: center;
    position: relative;
}

nav a {
    color: #D7CCC8;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
}

nav a:hover {
    color: #A06F60; /* Secondary */
    transform: translateY(-2px);
}

nav a i {
    margin-right: 5px;
}

.lang-switch {
    margin-left: 20px;
    color: #D7CCC8;
    font-weight: 600;
    white-space: nowrap;
}

.lang-switch a {
    color: #D7CCC8;
    text-decoration: none;
    margin: 0;
    transition: color 0.3s ease;
}

.lang-switch a:first-child {
    border-right: 1px solid #D7CCC8;
    padding-right: 10px;
}

.lang-switch a:last-child {
    padding-left: 10px;
}

.lang-switch a:hover {
    color: #A06F60;
}

/* Hamburger menu for mobile */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 200;
    margin-left: auto;
    margin-right: 0;
    transition: background 0.2s, transform 0.4s cubic-bezier(.68,-0.55,.27,1.55);
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}
.hamburger span {
    display: block;
    height: 4px;
    width: 28px;
    background: #D7CCC8;
    margin: 5px auto;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(.68,-0.55,.27,1.55);
    position: relative;
}
.hamburger.open {
    transform: translateY(-50%) rotate(90deg);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 20px;
    background: #4E342E;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    flex-direction: column;
    min-width: 160px;
    z-index: 150;
    padding: 10px 0;
}
.mobile-menu a {
    color: #D7CCC8;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    display: block;
    transition: background 0.2s;
}
.mobile-menu a:hover {
    background: #A06F60;
}

/* Main sections */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(55, 71, 79, 0.7) 0%, rgba(78, 52, 46, 0.7) 100%), url('pics/homebckgrnd.jpg') no-repeat center center;
    background-size: cover;
    color: #D7CCC8;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%); /* Modern shape */
}

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

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

.cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #A06F60, #37474F); /* Gradient button */
    color: #D7CCC8;
    text-decoration: none;
    border-radius: 50px; /* Rounded */
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.contact-content {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.contact-content form {
    max-width: 600px;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 1rem;
}

.form-row .input-group {
    flex: 1;
}

.contact-info {
    text-align: center;
    margin-top: 2rem;
}

.contact-info h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #4E342E;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #4E342E;
}

.contact-info a {
    color: #A06F60;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.about, .contact {
    padding: 3rem 0;
    text-align: center;
}

.card {
    background: #D7CCC8; /* Neutral background */
    padding: 2rem;
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card h2, .card h1 {
    margin-bottom: 1rem;
    color: #4E342E;
}

.icon {
    font-size: 2rem;
    color: #A06F60;
    margin-top: 1rem;
}

/* Contact form */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4E342E;
    display: flex;
    align-items: center;
}

.input-group label i {
    margin-right: 8px;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #A06F60;
    border-radius: 10px;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #37474F;
    box-shadow: 0 0 10px rgba(55, 71, 79, 0.3);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
footer {
    background: #4E342E;
    color: #D7CCC8;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        position: relative;
        width: 100%;
    }
    .header-left {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-width: 0;
    }
    .hamburger {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    nav {
        display: none !important;
    }
    .hamburger {
        display: flex;
    }
    .mobile-menu {
        display: flex;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .card {
        padding: 1.5rem;
    }
    .contact-content {
        flex-direction: column;
    }
    .form-row {
        flex-direction: column;
    }
}

/* Form Message Styles */
.form-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    animation: slideDown 0.3s ease;
}

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

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

/* Confirmation message after successful submission */
.form-message.success-confirmation {
    padding: 2rem;
    text-align: center;
    font-size: 1.1rem;
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.form-message.success-confirmation h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #155724;
}

.form-message.success-confirmation p {
    margin: 0.5rem 0;
    line-height: 1.8;
}

.redirect-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #c3e6cb;
}

.redirect-info p {
    margin: 1rem 0;
    font-size: 1rem;
}

#countdown {
    font-weight: bold;
    font-size: 1.3rem;
    color: #155724;
}

.redirect-button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 12px 30px;
    background: linear-gradient(45deg, #A06F60, #37474F);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.redirect-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

/* Infinite scroll styles */
#loading {
    animation: fadeIn 0.3s ease-in;
}

#no-more-posts {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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