/* ==============================================
   DOMAIN - Site de Services Comptables
   Palette de couleurs unique et design moderne
   ============================================== */

:root {
    /* Palette de couleurs unique */
    --primary-teal: #0ABAB5;
    --secondary-coral: #FF6B4A;
    --gradient-light-teal: #A1E4E3;
    --gradient-peach: #FFD6C2;
    --text-dark: #2A2A2A;
    --text-light: #FFFFFF;
    --accent-lime: #F6E05E;
    
    /* Typographie */
    --font-main: 'Poppins', 'Open Sans', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-bold: 600;
    --font-weight-extra-bold: 800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Глобальные правила для предотвращения горизонтальной прокрутки на всех устройствах */
html {
    overflow-x: hidden;
    /* Отступ для якорных ссылок, чтобы заголовки были видны под фиксированным header */
    scroll-padding-top: 120px;
    scroll-behavior: smooth;
}

/* Специальные правила для мобильных WebKit браузеров */
@media screen and (max-device-width: 768px) {
    html, body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    body {
        position: relative;
        overflow-x: hidden !important;
    }
}

/* ==============================================
   ANIMATIONS CSS PURES
   ============================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==============================================
   HEADER & NAVIGATION
   ============================================== */

.header {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral));
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: var(--font-weight-extra-bold);
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: -1px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: var(--font-weight-normal);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: -1;
}

.nav a:hover::before {
    left: 0;
}

.nav a:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Menu burger pour mobile */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ==============================================
   SECTIONS PRINCIPALES
   ============================================== */

.main-content {
    margin-top: 80px;
}

.section {
    padding: 5rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Hero */
.hero {
    background: linear-gradient(135deg, var(--gradient-light-teal), var(--gradient-peach));
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./img/H6fuwo.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    font-weight: var(--font-weight-extra-bold);
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-teal), var(--secondary-coral));
    color: var(--text-light);
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-lime), var(--primary-teal));
    transition: all 0.3s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Sections de contenu */
.content-section {
    padding: 5rem 0;
    /* Отступ для якорных ссылок */
    scroll-margin-top: 100px;
}

.content-section:nth-child(even) {
    background: linear-gradient(135deg, #f8f9ff, #fff5f5);
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-extra-bold);
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-teal), var(--secondary-coral));
    border-radius: 2px;
}

/* Grille de services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--text-light);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: bounceIn 0.6s ease-out;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(45deg, var(--primary-teal), var(--secondary-coral));
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.service-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-teal), var(--secondary-coral));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-light);
    animation: pulse 2s infinite;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* ==============================================
   FORMULAIRE UNIQUE
   ============================================== */

.form-section {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral));
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    /* Отступ для якорных ссылок */
    scroll-margin-top: 100px;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./img/MJWZ3t.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.form-container {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    background: var(--text-light);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.8s ease-out;
}

.form-title {
    font-size: 2rem;
    font-weight: var(--font-weight-extra-bold);
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-teal);
    background: var(--text-light);
    box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.2rem;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--primary-teal);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.submit-button {
    width: 100%;
    background: linear-gradient(45deg, var(--primary-teal), var(--secondary-coral));
    color: var(--text-light);
    padding: 1.2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-lime), var(--primary-teal));
    transition: all 0.3s ease;
    z-index: -1;
}

.submit-button:hover::before {
    left: 0;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ==============================================
   FOOTER
   ============================================== */

.footer {
    background: linear-gradient(135deg, var(--text-dark), #1a1a1a);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    color: var(--accent-lime);
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-teal);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* ==============================================
   COOKIE BANNER
   ============================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--text-dark), #1a1a1a);
    color: var(--text-light);
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: all 0.5s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text a {
    color: var(--accent-lime);
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-accept {
    background: var(--primary-teal);
    color: var(--text-light);
}

.cookie-accept:hover {
    background: var(--secondary-coral);
    transform: translateY(-2px);
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    /* Предотвращение горизонтальной прокрутки на мобильных */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    /* Корректировка scroll-padding для мобильных */
    html {
        scroll-padding-top: 100px !important;
    }
    
    .content-section, .form-section {
        scroll-margin-top: 80px !important;
    }
    
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
    }
    
    /* Предотвращение выхода текста за границы */
    p, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral));
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .burger-menu {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-container {
        margin: 0 1rem;
        padding: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Дополнительные правила для предотвращения горизонтальной прокрутки */
    .hero-content, .form-container, .service-card {
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Убираем лишние отступы у специфических элементов */
    .hero, .content-section, .form-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Adaptation du section Présentation Domain pour mobile */
    #presentation div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    #presentation div[style*="display: flex; gap: 2rem"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: center !important;
    }
    
    #presentation img {
        max-width: 280px !important;
        margin-bottom: 2rem !important;
    }
    
    /* Adaptation des statistiques dans Présentation Domain */
    #presentation div[style*="text-align: center"] div[style*="font-size: 2.5rem"] {
        font-size: 2rem !important;
    }
    
    /* Adaptation du section Pourquoi Nous Choisir pour mobile */
    section[style*="background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral))"] div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    section[style*="background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral))"] h3[style*="font-size: 2.2rem"] {
        font-size: 1.8rem !important;
    }
    
    section[style*="background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral))"] div[style*="padding: 1.5rem"] {
        margin-bottom: 1rem !important;
    }
    
    section[style*="background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral))"] div[style*="animation: pulse 3s infinite"] {
        margin-top: 2rem !important;
        padding: 2rem !important;
    }
}

@media (max-width: 480px) {
    /* Усиленные правила для предотвращения горизонтальной прокрутки на маленьких экранах */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Корректировка scroll-padding для очень маленьких экранов */
    html {
        scroll-padding-top: 90px !important;
    }
    
    .content-section, .form-section {
        scroll-margin-top: 70px !important;
    }
    
    * {
        max-width: 100% !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* Adaptation supplémentaire pour Présentation Domain sur très petits écrans */
    #presentation img {
        max-width: 250px !important;
    }
    
    #presentation div[style*="display: flex; gap: 2rem"] {
        gap: 1rem !important;
    }
    
    /* Adaptation supplémentaire pour Pourquoi Nous Choisir sur très petits écrans */
    section[style*="background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral))"] h3[style*="font-size: 2.2rem"] {
        font-size: 1.5rem !important;
    }
    
    section[style*="background: linear-gradient(135deg, var(--primary-teal), var(--secondary-coral))"] div[style*="padding: 1.5rem"] {
        padding: 1rem !important;
    }
    
    .service-image {
        height: 150px;
    }
    
    /* Дополнительные правила для маленьких экранов */
    .header-container {
        max-width: 100% !important;
        padding: 0 0.5rem !important;
    }
    
    .form-container {
        margin: 0 0.5rem !important;
        padding: 1rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .service-card {
        margin: 0 !important;
        padding: 1rem !important;
    }
    
    /* Предотвращение overflow для специфических элементов */
    .hero-content, .section-title {
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }
}

/* Animations d'entrée pour les éléments visibles */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
