/* 
 * Main CSS file for Trevylaxyna accounting website
 * Responsive design using CSS Grid and Flexbox
 * Color palette: background gradient (#f3f9fa to #e0e4ec), accent #02b2af, buttons #ffd93b
 */

/* === Reset and base styles === */
:root {
    --color-bg-light: #f3f9fa;
    --color-bg-dark: #e0e4ec;
    --color-accent: #02b2af;
    --color-btn: #ffd93b;
    --color-headings: #1e293b;
    --color-text: #475569;
    --color-bg-card: rgba(255, 255, 255, 0.7);
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease-in-out;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 10px base for easier rem calc */
    scroll-behavior: smooth;
    /* Prevent horizontal scroll on mobile */
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(to bottom, var(--color-bg-light), var(--color-bg-dark));
    min-height: 100vh;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Fix horizontal overflow issues */
main, .section, .container {
    overflow-x: hidden;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-headings);
    margin-bottom: 2rem;
    /* Center text */
    text-align: center;
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.8rem;
}

h4 {
    font-size: 2.2rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #018f8d;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    /* Center text */
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.btn {
    display: inline-block;
    background-color: var(--color-btn);
    color: #333;
    font-weight: 600;
    padding: 1.2rem 2.4rem;
    border-radius: 5rem;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.btn:hover {
    background-color: #ffce0b;
    transform: translateY(-3px);
    color: #000;
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

/* Center all buttons */
.btn-center-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.card {
    background-color: var(--color-bg-card);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === Header and Navigation === */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--color-headings);
    font-weight: 700;
    font-size: 2.4rem;
}

.logo svg {
    margin-right: 1rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.main-nav a {
    color: var(--color-headings);
    font-weight: 500;
    position: relative;
}

.main-nav a:hover,
.main-nav .active a {
    color: var(--color-accent);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav .active a::after {
    width: 100%;
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
}

.nav-toggle-label span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-headings);
    margin-bottom: 5px;
    transition: var(--transition);
}

/* === Hero Section === */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(240, 250, 251, 0.8), rgba(224, 228, 236, 0.4));
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 65rem;
    /* Center hero content text */
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 2rem;
    margin-bottom: 3.5rem;
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.hero .btn {
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: both;
}

/* === About Section === */
.about {
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

/* === Services Section === */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 4rem;
}

.service-card {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    color: var(--color-accent);
    margin: 2rem 0;
}

.service-icon {
    margin: 0 auto 2rem;
    width: 8rem;
    height: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(2, 178, 175, 0.1);
    border-radius: 50%;
    color: var(--color-accent);
}

/* === Features Section === */
.features {
    background-color: rgba(2, 178, 175, 0.05);
    padding: 10rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    gap: 4rem;
}

/* Make feature items look like cards */
.feature {
    text-align: center;
    background-color: var(--color-bg-card);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    margin: 0 auto 2rem;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 1rem;
    color: var(--color-accent);
    box-shadow: var(--shadow-soft);
}

/* === Testimonials Section === */
.testimonials {
    position: relative;
    overflow: hidden;
}

.testimonial-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.testimonial {
    padding: 3rem;
    border-radius: 1rem;
    background-color: white;
    box-shadow: var(--shadow-soft);
    position: relative;
    /* Center testimonial text */
    text-align: center;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    /* Center author info */
    justify-content: center;
}

.testimonial-author img {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    margin-right: 1.5rem;
}

.author-info h5 {
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 1.4rem;
    color: #64748b;
}

/* === FAQ Section === */
.faq {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10rem 0;
}

.faq-container {
    max-width: 80rem;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 2rem;
}

.faq-question {
    padding: 2rem;
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h4 {
    margin-bottom: 0;
}

.faq-question::after {
    content: '+';
    font-size: 2.5rem;
    color: var(--color-accent);
    transition: var(--transition);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-radius: 0 0 1rem 1rem;
    background-color: white;
}

.faq-item.active .faq-question {
    background-color: var(--color-accent);
    color: white;
    border-radius: 1rem 1rem 0 0;
}

.faq-item.active .faq-question h4 {
    color: white;
}

.faq-item.active .faq-question::after {
    content: '−';
    color: white;
}

.faq-item.active .faq-answer {
    padding: 2rem;
    max-height: 50rem;
    box-shadow: var(--shadow-soft);
}

/* === Contact Section === */
.contact {
    padding: 10rem 0;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 4rem;
}

.contact-form-container {
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    padding: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.map-container {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-top: 4rem;
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === Form Styling === */
.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    /* Center form labels */
    text-align: left;
}

input,
select,
textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1.6rem;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(2, 178, 175, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 1rem;
    margin-top: 0.5rem;
}

.error {
    color: #e53e3e;
    margin-top: 0.5rem;
    font-size: 1.4rem;
}

/* === Footer === */
.site-footer {
    background-color: #1e293b;
    color: white;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo svg {
    margin-right: 1rem;
}

.footer-logo span {
    color: white;
    font-weight: 700;
    font-size: 2rem;
}

.footer-about p {
    color: #cbd5e1;
}

/* Aligner les titres du footer plus à gauche */
.site-footer h4 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: left;
    padding-left: 1rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer li {
    margin-bottom: 1rem;
}

.site-footer a {
    color: #cbd5e1;
}

.site-footer a:hover {
    color: var(--color-btn);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === Cookie Consent === */
.cookie-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: #1e293b;
    color: white;
    padding: 2rem;
    z-index: 999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.show {
    bottom: 0;
}

.cookie-popup.accepted {
    bottom: -100%;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.cookie-content p {
    margin-bottom: 0;
}

/* === PHP Form Handling === */
.faq-toggle {
    display: none;
}

.faq-toggle:checked + .faq-answer {
    display: block;
}

/* === Thank You Page === */
.thank-you {
    text-align: center;
    padding: 10rem 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.thank-you h1 {
    color: var(--color-accent);
    margin-bottom: 3rem;
}

.thank-you .card {
    max-width: 60rem;
    margin: 0 auto;
    text-align: center;
}

.thank-you .buttons {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 178, 175, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(2, 178, 175, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(2, 178, 175, 0);
    }
}

/* === Responsive Design === */
@media screen and (max-width: 991px) {
    html {
        font-size: 56.25%; /* 9px */
    }

    h1 {
        font-size: 4.2rem;
    }

    h2 {
        font-size: 3.2rem;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 50%; /* 8px */
    }
    
    .nav-toggle-label {
        display: flex;
        flex-direction: column;
        z-index: 101;
    }
    
    .main-nav {
        position: absolute;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 30rem;
        height: 100vh;
        background-color: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 100;
        padding: 10rem 3rem 3rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 3rem;
    }
    
    #nav-toggle:checked ~ .main-nav {
        transform: translateX(0);
    }
    
    #nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    #nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }
    
    #nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .section {
        padding: 6rem 0;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .contact-form-container {
        padding: 3rem;
    }
} 