/* ==========================================
   TunisiaJourney - Premium Design 2024
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Cormorant+Garamond:wght@300;400;500;600;700&display=swap');

:root {
    /* Palette Officielle */
    --rouge-tunisie: #93032E;
    --bleu-tunisie: #083D77;
    --menthe: #DFF8EB;
    --turquoise: #50A2A7;
    --olive: #447604;

    /* Variables dérivées */
    --rouge-dark: #6B0221;
    --bleu-dark: #05294D;
    --turquoise-dark: #3D7A7E;
    --olive-dark: #335903;
    --menthe-dark: #C4E8D6;

    /* Neutres */
    --white: #FFFFFF;
    --black: #0D0D0D;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-600: #757575;
    --gray-800: #424242;

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-display: 'Cormorant Garamond', serif;

    /* Spacing */
    --container: 1280px;
    --section-spacer: 120px 0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(8, 61, 119, 0.08);
    --shadow-md: 0 8px 24px rgba(8, 61, 119, 0.12);
    --shadow-lg: 0 16px 48px rgba(8, 61, 119, 0.15);
    --shadow-xl: 0 24px 64px rgba(8, 61, 119, 0.2);
    --shadow-glow: 0 0 40px rgba(147, 3, 46, 0.15);
}

/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--bleu-tunisie);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   LAYOUT
   ========================================== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* ==========================================
   COMPONENTS: BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--rouge-tunisie), var(--rouge-dark));
    color: var(--white);
    box-shadow: 0 4px 16px rgba(147, 3, 46, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(147, 3, 46, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--rouge-tunisie);
    transform: translateY(-3px);
}

.btn-cta {
    background: var(--white);
    color: var(--rouge-tunisie);
    font-weight: 700;
}

.btn-cta:hover {
    background: var(--rouge-tunisie);
    color: var(--white);
    transform: translateY(-3px) scale(1.02);
}

/* ==========================================
   HEADER
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 55px;
    width: auto;
    transition: transform 0.3s ease;
}

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

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rouge-tunisie);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--rouge-tunisie);
}

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

.nav-link.active {
    color: var(--rouge-tunisie);
}

.nav-btn {
    background: var(--turquoise);
    color: var(--white);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--turquoise-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 162, 167, 0.3);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: var(--rouge-tunisie);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bleu-tunisie) 0%, var(--turquoise) 50%, var(--olive) 100%);
    overflow: hidden;
}

/* Monument Background */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1591621667304-309d50214ff8?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.25;
    filter: saturate(1.2) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(8, 61, 119, 0.85) 0%,
        rgba(80, 162, 167, 0.75) 50%,
        rgba(68, 118, 4, 0.85) 100%);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 40%, rgba(147, 3, 46, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(223, 248, 235, 0.15) 0%, transparent 50%);
    animation: patternPulse 15s ease-in-out infinite alternate;
}

@keyframes patternPulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--menthe);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.hero-title {
    color: var(--white);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
    line-height: 1.1;
}

.hero-subtitle {
    color: var(--menthe);
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 300;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    animation: fadeInUp 1s ease 1s both, bounce 2s infinite 1.5s;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.8;
}

.scroll-indicator .arrow {
    width: 24px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .arrow::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0%, 100% {
        opacity: 0;
        top: 8px;
    }
    50% {
        opacity: 1;
        top: 20px;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
    padding: var(--section-spacer);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--rouge-tunisie);
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 1.5rem;
}

.section-description {
    color: var(--gray-600);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   FEATURES SECTION
   ========================================== */
.features {
    background: linear-gradient(180deg, var(--menthe) 0%, var(--white) 50%, var(--menthe) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rouge-tunisie), var(--turquoise), var(--olive));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--rouge-tunisie), var(--turquoise));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

.feature-title {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: var(--bleu-tunisie);
}

.feature-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--rouge-tunisie);
    font-weight: 600;
    font-size: 0.875rem;
    transition: gap 0.3s ease;
}

.feature-link:hover {
    gap: 0.75rem;
}

/* ==========================================
   DESTINATIONS SECTION
   ========================================== */
.destinations {
    background: var(--white);
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.destination-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2);
    cursor: pointer;
}

.destination-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
}

.destination-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.destination-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.destination-card:hover .destination-image img {
    transform: scale(1.1);
}

.destination-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(8, 61, 119, 0.95));
    color: var(--white);
    transition: all 0.4s ease;
}

.destination-title {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.destination-subtitle {
    color: var(--menthe);
    font-size: 1rem;
    font-weight: 400;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.cta {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--rouge-tunisie) 0%, var(--bleu-tunisie) 100%);
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1585427795251-f0c5c26e8e87?w=1920&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(147, 3, 46, 0.9) 0%,
        rgba(8, 61, 119, 0.9) 100%);
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cta-title {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

.cta-description {
    color: var(--menthe);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--bleu-tunisie);
    color: var(--menthe);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: var(--menthe);
    opacity: 0.9;
    line-height: 1.8;
    font-size: 0.9375rem;
}

.footer-title {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--menthe);
    opacity: 0.85;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--white);
    opacity: 1;
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--menthe);
    opacity: 0.9;
    font-size: 0.9375rem;
}

.footer-contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--turquoise);
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: var(--turquoise);
    border-color: var(--turquoise);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
    color: var(--menthe);
    opacity: 0.8;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    :root {
        --section-spacer: 100px 0;
    }

    .nav-list {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 70px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        font-size: 1.125rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--gray-200);
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .features-grid,
    .destinations-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
